/* ---------- Tokens ---------- */
:root {
  --navy: #03204C;
  --navy-text: #DCE5F2;
  --navy-muted: #B8C7DC;
  --navy-faint: #8FA3C0;
  --ink: #14223A;
  --body: #42516A;
  --muted: #5A6B85;
  --line: #E3E8F0;
  --tint: #F4F7FB;
  --amber: #FBBA23;
  --ok: #0E7A4F;
  --ok-bg: #E3F5EC;
  --flag: #A2560B;
  --radius: 14px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.025em; }
p { margin: 0; }
a { color: #16325C; }
a:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 1040px; margin: 0 auto; padding: 64px 24px 0; }
.section { padding-top: 96px; padding-bottom: 96px; }
.muted { color: var(--muted); }
.small { font-size: 13px; margin-top: 14px; }
.strong { font-weight: 600; }

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 32px;
  background: var(--amber);
  color: var(--navy);
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s;
}
.btn:hover { background: #FCC94F; color: var(--navy); }

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: var(--navy-text); overflow: hidden; }

.header { display: flex; align-items: center; gap: 10px; padding-top: 28px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { display: block; flex-shrink: 0; }
.logo-text { font-weight: 800; font-size: 20px; color: #fff; letter-spacing: -0.01em; }

.hero-copy { padding-top: 72px; text-align: center; }
.hero-copy h1 {
  max-width: 15em;
  margin: 0 auto 24px;
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.hero-sub { max-width: 34em; margin: 0 auto 36px; font-size: 20px; color: var(--navy-muted); }
.hero-note { margin-top: 14px; font-size: 15px; color: var(--navy-faint); }

/* ---------- App window mock ---------- */
.app-window {
  margin: 0;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -10px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.app-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.app-title { font-weight: 700; }
.badge-ok {
  font-size: 14px;
  font-weight: 700;
  color: var(--ok);
  background: var(--ok-bg);
  padding: 4px 12px;
  border-radius: 999px;
}
.app-body { display: flex; flex-wrap: wrap; }
.app-files {
  flex: 1 1 300px;
  padding: 24px;
  background: #F7F9FC;
  border-right: 1px solid var(--line);
}
.app-results { flex: 2 1 420px; min-width: 0; padding: 24px; }
.app-label { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-bottom: 16px; }

.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}

.results { width: 100%; border-collapse: collapse; font-size: 15px; }
.results th {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-align: right;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.results td { text-align: right; padding: 12px 0; border-bottom: 1px solid var(--line); }
.results th:first-child,
.results td:first-child { text-align: left; }
.results th + th,
.results td + td { padding-left: 16px; }
.results td + td { white-space: nowrap; }
.results tr:last-child td { border-bottom: 0; }
.results .flag { color: var(--flag); font-weight: 700; }

/* ---------- Sections ---------- */
h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; font-weight: 800; }
.section-title { margin-bottom: 48px; }

.split { display: flex; flex-wrap: wrap; gap: 40px 80px; align-items: flex-start; }
.split h2 { flex: 1 1 320px; }
.body-text { flex: 1.4 1 420px; min-width: 0; font-size: 18px; color: var(--body); }
.body-text p + p { margin-top: 18px; }

.tint { background: var(--tint); }
.border-top { border-top: 1px solid var(--line); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.grid-3.plain { gap: 40px; }
.grid-3 h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.01em; }
.grid-3 p { color: var(--body); }

.card { background: #fff; border-radius: var(--radius); padding: 32px; }
.card svg { display: block; margin-bottom: 20px; }
.card h3 { font-size: 20px; margin-bottom: 10px; }

/* ---------- CTA ---------- */
.cta-wrap { padding: 0 24px 96px; }
.cta {
  max-width: 1192px;
  margin: 0 auto;
  background: var(--navy);
  color: var(--navy-text);
  border-radius: 20px;
  padding: 80px 32px;
  text-align: center;
}
.cta h2 {
  max-width: 14em;
  margin: 0 auto 18px;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #fff;
}
.cta p { max-width: 34em; margin: 0 auto 36px; font-size: 19px; color: var(--navy-muted); }

/* ---------- Intake form ---------- */
.intake {
  max-width: 620px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 14px; font-weight: 600; color: var(--navy-text); }
.field input,
.field select {
  font: inherit;
  font-size: 16px;
  min-height: 50px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 2px solid transparent;
  border-radius: 10px;
}
.field input:focus,
.field select:focus { outline: none; border-color: var(--amber); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--navy-muted); }
.check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--amber); }
.intake .btn { border: 0; cursor: pointer; align-self: flex-start; font-family: inherit; }
.intake .btn:disabled { opacity: 0.6; cursor: progress; }
.hidden-field { position: absolute; left: -9999px; }
.form-status { min-height: 1.5em; font-weight: 600; color: #fff; }
.form-status.error { color: #FFB4A8; }
.intake.is-sent .field-row,
.intake.is-sent .field,
.intake.is-sent .check,
.intake.is-sent .btn { display: none; }
.intake.is-sent .form-status { font-size: 20px; text-align: center; }

/* ---------- Hero load animation (only with JS, skipped for reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .app-window { opacity: 0; transform: translateY(48px); }
  .js .results tbody tr { opacity: 0; transform: translateY(8px); }
  .js .badge-ok { opacity: 0; transform: scale(0.9); }

  .js .is-playing .app-window,
  .js .app-window.is-playing {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .js .is-playing .results tbody tr {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  }
  .js .is-playing .results tbody tr:nth-child(1) { transition-delay: 0.5s; }
  .js .is-playing .results tbody tr:nth-child(2) { transition-delay: 0.7s; }
  .js .is-playing .results tbody tr:nth-child(3) { transition-delay: 0.9s; }
  .js .badge-ok.is-on {
    opacity: 1;
    transform: none;
    transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
  }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Tablet: keep 3-item grids in one even row ---------- */
@media (min-width: 721px) and (max-width: 959px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-3.plain { gap: 28px; }
  .card { padding: 24px; }
  .card h3 { font-size: 18px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .hero-copy { padding-top: 48px; }
  .hero-sub { font-size: 18px; }
  .app-files { border-right: 0; border-bottom: 1px solid var(--line); }
  .results { font-size: 14px; }
  .results th + th,
  .results td + td { padding-left: 8px; }
  .app-results { padding: 20px 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .cta { padding: 56px 20px; }
  .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
