/* =========================================================
   Flowline — Landing Page Styles
   ========================================================= */

:root {
  --navy: #0b1426;
  --navy-light: #111d35;
  --white: #ffffff;
  --gray-100: #f0f1f3;
  --gray-200: #d8dbe1;
  --gray-400: #8a90a0;
  --gray-500: #6b7280;
  --accent: #4a7cff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--gray-200);
  background-color: var(--navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3 {
  color: var(--white);
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

h2 {
  font-size: 1.65rem;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

a {
  color: var(--gray-200);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-500);
  transition: color 0.15s, border-color 0.15s;
}

a:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ---- Hero ---- */
.hero {
  padding: 80px 0 100px;
}

.hero-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
}

.hero-logo img,
.hero-logo .logo {
  height: 56px;
  width: auto;
  max-width: none;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.hero-logo-text {
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--gray-400);
  margin-bottom: 20px;
  font-style: italic;
}

.hero-body {
  font-size: 1.05rem;
  max-width: 620px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-bottom: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background-color 0.15s, color 0.15s;
}

.btn-primary {
  background-color: var(--white);
  color: var(--navy);
  padding: 12px 28px;
}

.btn-primary:hover {
  background-color: var(--gray-200);
  color: var(--navy);
  border-color: transparent;
}

.btn-outline {
  background-color: transparent;
  color: var(--white);
  padding: 12px 28px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

.link-subtle {
  color: var(--gray-400);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--gray-500);
}

.link-subtle:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ---- Sections ---- */
.section {
  padding: 80px 0;
}

.section-alt {
  background-color: var(--navy-light);
}

.section-intro {
  font-size: 1.05rem;
  color: var(--gray-400);
  max-width: 620px;
  margin-bottom: 40px;
}

/* Risk List */
.risk-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin-bottom: 32px;
}

.risk-item {
  padding: 14px 0 14px 18px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  cursor: default;
  transition: border-color 0.15s;
}

.risk-item:hover {
  border-left-color: rgba(255, 255, 255, 0.35);
}

.risk-item h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.4;
}

.risk-item p {
  font-size: 0.82rem;
  color: var(--gray-400);
  line-height: 1.55;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
}

.risk-item:hover p {
  max-height: 120px;
  opacity: 1;
  margin-top: 6px;
}

.risk-coda {
  font-size: 0.95rem;
  color: var(--gray-400);
  margin-top: 8px;
}

/* ---- Features Grid ---- */
.grid-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  padding: 24px 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  cursor: default;
  text-align: center;
  transition: border-color 0.15s;
}

.feature:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.feature-icon {
  color: var(--gray-400);
  margin-bottom: 14px;
}

.feature h3 {
  font-size: 0.85rem;
  margin-bottom: 0;
  line-height: 1.4;
}

.feature p {
  font-size: 0.82rem;
  color: var(--gray-400);
  line-height: 1.55;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
}

.feature:hover p {
  max-height: 120px;
  opacity: 1;
  margin-top: 10px;
}

.section-cta {
  text-align: center;
  margin-top: 32px;
}

/* ---- Steps ---- */
.steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.step {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.steps.in-view .step:nth-child(1) { transition-delay: 0s; }
.steps.in-view .step:nth-child(2) { transition-delay: 0.15s; }
.steps.in-view .step:nth-child(3) { transition-delay: 0.3s; }

.steps.in-view .step {
  opacity: 1;
  transform: translateY(0);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-500);
  color: var(--gray-400);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.steps.in-view .step-num {
  animation: numPulse 1.2s ease 0.5s 1;
}

@keyframes numPulse {
  0%   { border-color: var(--gray-500); color: var(--gray-400); }
  40%  { border-color: var(--white); color: var(--white); }
  100% { border-color: var(--gray-500); color: var(--gray-400); }
}

.step-icon {
  display: block;
  color: var(--gray-400);
  margin-bottom: 14px;
}

.steps.in-view .step-icon {
  animation: iconFloat 2.5s ease-in-out 0.6s infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

.step p {
  font-size: 0.95rem;
  color: var(--gray-400);
}

/* ---- Who / Checklist ---- */
.who-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.who-text .section-intro {
  margin-bottom: 0;
}

.checklist {
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 1.05rem;
  color: var(--gray-200);
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.checklist.in-view li:nth-child(1) { transition-delay: 0s; }
.checklist.in-view li:nth-child(2) { transition-delay: 0.1s; }
.checklist.in-view li:nth-child(3) { transition-delay: 0.2s; }
.checklist.in-view li:nth-child(4) { transition-delay: 0.3s; }
.checklist.in-view li:nth-child(5) { transition-delay: 0.4s; }

.checklist.in-view li {
  opacity: 1;
  transform: translateX(0);
}

.check-icon {
  flex-shrink: 0;
  color: var(--gray-400);
}

.check-path {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  transition: stroke-dashoffset 0.4s ease;
}

.checklist.in-view li:nth-child(1) .check-path { transition-delay: 0.15s; }
.checklist.in-view li:nth-child(2) .check-path { transition-delay: 0.25s; }
.checklist.in-view li:nth-child(3) .check-path { transition-delay: 0.35s; }
.checklist.in-view li:nth-child(4) .check-path { transition-delay: 0.45s; }
.checklist.in-view li:nth-child(5) .check-path { transition-delay: 0.55s; }

.checklist.in-view .check-path {
  stroke-dashoffset: 0;
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info p {
  margin-bottom: 8px;
}

.contact-info a {
  color: var(--white);
  font-size: 1.05rem;
  border-bottom-color: var(--gray-500);
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 6px;
  margin-top: 16px;
}

.contact-form label:first-child {
  margin-top: 0;
}

.contact-form .optional {
  font-weight: 400;
  color: var(--gray-500);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background-color: var(--navy);
  border: 1px solid var(--gray-500);
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.15s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gray-200);
}

.contact-form .btn {
  margin-top: 20px;
  width: 100%;
}

.form-note {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--gray-400);
}

.form-note.success {
  color: #6ee7a0;
}

.form-note.error {
  color: #f87171;
}

/* ---- Footer ---- */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* ---- PDF Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 90vw;
  max-width: 960px;
  height: 85vh;
  background-color: var(--navy-light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.3s ease;
}

.modal-overlay.is-active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--gray-200);
  font-size: 1.3rem;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.modal-close:hover {
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--white);
}

.modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .hero {
    padding: 56px 0 72px;
  }

  .section {
    padding: 60px 0;
  }

  .risk-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .risk-item p,
  .risk-item:hover p {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
  }

  .risk-item.expanded p {
    max-height: 200px;
    opacity: 1;
    margin-top: 6px;
  }

  .grid-features {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .feature {
    text-align: left;
  }

  .feature p,
  .feature:hover p {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
  }

  .feature.expanded p {
    max-height: 200px;
    opacity: 1;
    margin-top: 10px;
  }

  /* Chevron indicator for expandable items */
  .risk-item h3,
  .feature h3 {
    position: relative;
    padding-right: 20px;
    cursor: pointer;
  }

  .risk-item h3::after,
  .feature h3::after {
    content: '\203A';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.1em;
    color: var(--gray-500);
    transform: rotate(90deg);
    transition: transform 0.25s ease;
  }

  .risk-item.expanded h3::after,
  .feature.expanded h3::after {
    transform: rotate(270deg);
  }

  .modal-content {
    width: 95vw;
    height: 90vh;
    border-radius: 4px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .who-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .who-text .section-intro {
    margin-bottom: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.55rem;
  }

  .hero-logo {
    margin-bottom: 40px;
  }

  .hero-sub {
    font-size: 1.1rem;
  }

  .grid-features {
    grid-template-columns: 1fr;
  }
}
