/* ==========================================================================
   AutoRemit marketing site, single stylesheet
   --------------------------------------------------------------------------
   Contents
     1. Design tokens (custom properties)
     2. Reset + base typography
     3. Utilities (layout wrap, kickers, chips, buttons, reveal)
     4. Header + navigation
     5. Hero + processing vignette
     6. Audience strip
     7. How it works (steps)
     8. Guardrails (dark band)
     9. References (three cards)
    10. Proof: activity feed + demo (two-up)
    11. FAQ
    12. Final CTA
    13. Footer
    14. Legal pages (privacy.html / terms.html)
    15. Responsive
    16. Reduced motion
   --------------------------------------------------------------------------
   Brand palette is fixed, do not change these three:
     deep blue #1A5BAD · brand blue #1F7AC4 · brand green #6CB33F
   Neutrals are derived cool greys/navies and may be tuned.
   ========================================================================== */

/* 1. Design tokens ------------------------------------------------------- */
:root {
  /* brand, fixed */
  --c-deep:  #1A5BAD;
  --c-blue:  #1F7AC4;
  --c-green: #6CB33F;

  /* neutrals */
  --ink:    #17273F;   /* near-navy body text */
  --ink-2:  #4C5D77;   /* muted text */
  --ink-3:  #8090A8;   /* faint text, captions */
  --paper:  #FBFCFE;   /* page background */
  --wash:   #F2F6FA;   /* alternate section background */
  --line:   #DFE7F0;   /* hairlines */

  /* dark band */
  --navy:      #13233F;
  --navy-2:    #1A2E4F;
  --navy-line: rgba(255, 255, 255, 0.14);
  --on-navy:   #C4D2E6; /* body text on navy */
  --on-navy-2: #8FA3C0; /* muted text on navy */

  /* functional tints (UI states, not brand recolours) */
  --blue-wash:  #E9F1FA;
  --green-wash: #EEF6E5;
  --green-text: #3E7A1B; /* accessible green for small text on light */

  /* type */
  --font-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;

  /* misc */
  --radius: 12px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(19, 35, 63, 0.05), 0 16px 40px -20px rgba(19, 35, 63, 0.22);
  --header-h: 72px;
}

/* 2. Reset + base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0 0 0.6em; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.15rem, 4.5vw, 3.3rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--c-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-blue); }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--blue-wash); color: var(--c-deep); }

:focus-visible { outline: 3px solid rgba(31, 122, 196, 0.5); outline-offset: 2px; border-radius: 4px; }

/* 3. Utilities ----------------------------------------------------------- */
.wrap { max-width: 1140px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }

.section { padding-block: clamp(64px, 9vw, 108px); }
.section--wash { background: var(--wash); }

/* small over-line label above headings */
.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-blue);
  margin-bottom: 14px;
}

.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 58ch; }

.mono { font-family: var(--font-mono); }

/* skip link */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-deep); color: #fff; padding: 10px 16px; z-index: 100;
  font-weight: 600; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; color: #fff; }

/* status chips, mono, uppercase, quiet */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip--auto   { background: var(--green-wash); border-color: #CBE5B4; color: var(--green-text); }
.chip--review { background: var(--blue-wash);  border-color: #C2D9F0; color: var(--c-deep); }
.chip--held   { background: #F1F4F9; border-color: #CBD6E5; color: var(--ink-2); }
.chip--part   { background: transparent; border-color: #A9CF8B; color: var(--green-text); }
.chip--plain  { background: #F1F4F9; border-color: #DCE4EF; color: var(--ink-2); text-transform: none; letter-spacing: 0.02em; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans);
  font-size: 0.95rem; font-weight: 600;
  padding: 13px 24px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-deep); color: #fff; }
.btn--primary:hover { background: #154D93; color: #fff; }
.btn--ghost { border-color: #C4D4E7; color: var(--c-deep); background: transparent; }
.btn--ghost:hover { background: var(--blue-wash); color: var(--c-deep); }
.btn--sm { padding: 9px 18px; font-size: 0.88rem; }
.btn .arrow { font-family: var(--font-mono); font-weight: 500; }

/* scroll-reveal: JS adds .in when the element enters the viewport.
   --d is an optional per-element stagger delay, e.g. style="--d:.15s" */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease var(--d, 0s), transform 0.55s ease var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; } /* graceful without JS */

/* 4. Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 252, 254, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px -10px rgba(19, 35, 63, 0.25); }

.header-in { display: flex; align-items: center; gap: 32px; height: var(--header-h); }

/* clear space rule: the logo keeps ≥ one chevron height of padding on all
   sides, the header height and flex gaps provide it. Don't crowd this. */
.logo-link { display: inline-flex; flex-shrink: 0; }
.logo-link img { height: 34px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.site-nav a:not(.btn) {
  font-size: 0.92rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--ink); }

/* mobile toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none; border: 1.5px solid var(--line); border-radius: 8px;
  width: 42px; height: 38px; padding: 0; cursor: pointer; position: relative;
}
.nav-toggle span.nav-toggle span::before.nav-toggle span::after {
  content: ""; position: absolute; left: 50%; translate: -50% 0;
  width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span { top: 50%; margin-top: -1px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* 5. Hero ----------------------------------------------------------------- */
.hero { padding-block: clamp(56px, 8vw, 96px) clamp(64px, 9vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: clamp(40px, 6vw, 72px); align-items: center; }

.hero h1 em { font-style: italic; color: var(--c-deep); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-note {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* the vignette: remittance document → matched ledger */
.vig { margin: 0; }
.vig-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.vig-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}
.vig-head .addr { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }

.vig-doc-body { padding: 16px 18px; }
.vig-doc-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.vig-doc-title strong { font-size: 0.95rem; }
.vig-doc-title .file { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-3); }

.vig-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; margin: 0; }
.vig-meta div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted var(--line); padding-bottom: 6px; }
.vig-meta dt { font-size: 0.78rem; font-weight: 600; color: var(--ink-3); }
.vig-meta dd { margin: 0; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; color: var(--ink); text-align: right; }

/* connector between the two cards: dashes + the brand mark (as-is, never recoloured) */
.vig-link { display: flex; flex-direction: column; align-items: center; padding: 6px 0; }
.vig-link::before.vig-link::after { content: ""; width: 0; height: 14px; border-left: 2px dashed #B9C9DE; }
.vig-link img { height: 26px; width: auto; margin: 4px 0; }

/* ledger rows */
.vig-ledger-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.vig-ledger-head strong { font-size: 0.88rem; }
.vig-ledger-head .thresh { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-3); }

.vig-rows { list-style: none; margin: 0; padding: 0; }
.vig-rows li {
  display: grid; grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: center; gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.8rem;
}
.vig-rows .ref { font-weight: 600; color: var(--ink); }
.vig-rows .amt { font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* the held banner row at the foot of the ledger */
.vig-held {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 18px;
  background: var(--wash);
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.55;
  color: var(--ink-2);
}
.vig-held strong { color: var(--ink); font-weight: 600; }

.vig figcaption { margin-top: 12px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-3); letter-spacing: 0.04em; }

/* 6. Audience strip -------------------------------------------------------- */
.aud-strip { background: var(--wash); border-block: 1px solid var(--line); padding-block: 22px; }
.aud-strip p { margin: 0; font-size: 0.95rem; color: var(--ink-2); max-width: none; text-align: center; }
.aud-strip strong { color: var(--ink); font-weight: 600; }

/* 7. How it works ----------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 36px); margin-top: 48px; }
.step { border-top: 2px solid var(--ink); padding-top: 18px; }
.step .num { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--c-deep); letter-spacing: 0.1em; }
.step h3 { margin: 8px 0 10px; font-size: 1.05rem; }
.step p { font-size: 0.92rem; color: var(--ink-2); }

/* 8. Guardrails (dark band) ------------------------------------------------- */
.dark { background: var(--navy); color: var(--on-navy); }
.dark h2 { color: #fff; max-width: 22ch; }
.dark .kicker { color: var(--c-green); }
.dark .lede { color: var(--on-navy); }

.gr-head { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 5vw, 64px); align-items: end; margin-bottom: 48px; }

.gr-rows { border-top: 1px solid var(--navy-line); }
.gr-row {
  display: grid; grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 32px;
  padding-block: 26px;
  border-bottom: 1px solid var(--navy-line);
}
.gr-row h3 { color: #fff; font-size: 1.08rem; margin-bottom: 8px; }
.gr-row p { color: var(--on-navy); font-size: 0.95rem; max-width: 62ch; margin: 0; }

/* chips on navy */
.gr-chip {
  justify-self: start; align-self: start;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 5px; border: 1px solid var(--navy-line);
  color: var(--on-navy); white-space: nowrap; margin-top: 4px;
}
.gr-chip--green { border-color: var(--c-green); color: var(--c-green); }

.gr-close {
  margin-top: 36px; padding-top: 22px;
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.7;
  color: var(--on-navy-2); max-width: 74ch;
}
.gr-close strong { color: var(--on-navy); font-weight: 500; }

/* 9. References -------------------------------------------------------------- */
.ref-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.ref-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.ref-card .lbl {
  display: block; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-deep); margin-bottom: 14px;
}
.ref-card .ex {
  display: inline-block; font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  background: var(--wash); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 10px; margin-bottom: 14px; color: var(--ink);
}
.ref-card p { font-size: 0.9rem; color: var(--ink-2); margin: 0; }

/* 10. Proof: feed + demo ------------------------------------------------------ */
.proof-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: stretch; }
.proof-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.proof-card h3 { font-size: 1.15rem; }
.proof-card > p { font-size: 0.93rem; color: var(--ink-2); }
.proof-card .btn { align-self: flex-start; margin-top: auto; }

.feed { list-style: none; margin: 18px 0 20px; padding: 14px 16px; background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.feed li {
  display: flex; gap: 12px;
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.5;
  padding-block: 5px;
  color: var(--ink-2);
}
.feed li + li { border-top: 1px dotted var(--line); }
.feed .t { color: var(--ink-3); flex-shrink: 0; }
.feed .ok { color: var(--green-text); }
.feed .hold { color: var(--ink); font-weight: 500; }

/* 11. FAQ ---------------------------------------------------------------------- */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 4px;
  font-weight: 600; font-size: 1rem;
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 1.1rem; color: var(--c-deep);
  transition: transform 0.2s ease; flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 22px; color: var(--ink-2); font-size: 0.95rem; max-width: 64ch; }

/* 12. Final CTA ------------------------------------------------------------------ */
.cta-final { text-align: center; border-top: 1px solid var(--line); }
.cta-final img { height: 130px; width: auto; margin: 0 auto 30px; }
.cta-final h2 { margin-bottom: 14px; }
.cta-final .lede { margin-inline: auto; }
.cta-final .hero-ctas { justify-content: center; }
.cta-final .hero-note { text-align: center; }

/* 13. Footer ----------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: var(--on-navy); padding-block: 60px 32px; }
.site-footer a { color: var(--on-navy); text-decoration: none; }
.site-footer a:hover { color: #fff; }

.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-brand img { height: 30px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 0.88rem; color: var(--on-navy-2); max-width: 30ch; }

.footer-col h4 {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-navy-2);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; font-size: 0.9rem; }

.footer-fine {
  border-top: 1px solid var(--navy-line); padding-top: 24px;
  font-size: 0.8rem; line-height: 1.7; color: var(--on-navy-2);
}
.footer-fine p { max-width: 84ch; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  margin-top: 24px; font-size: 0.8rem; color: var(--on-navy-2);
}
.footer-bottom .mono { font-size: 0.74rem; }

/* 14. Legal pages ------------------------------------------------------------------- */
.legal-main { max-width: 780px; margin-inline: auto; padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 40px) 80px; }
.legal-main h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.legal-main h2 { font-size: 1.25rem; margin-top: 2.2em; }
.legal-main p.legal-main li { color: var(--ink-2); font-size: 0.96rem; }
.legal-main ul { padding-left: 22px; }
.legal-main li { margin-bottom: 8px; }

.legal-updated { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-3); margin-bottom: 36px; }

/* the draft banner, remove before launch */
.draft-banner {
  border: 1.5px solid var(--c-blue); background: var(--blue-wash);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 40px;
  font-size: 0.9rem; color: var(--ink);
}
.draft-banner strong { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-deep); display: block; margin-bottom: 6px; }

/* inline placeholder for values the client must fill in */
.ph {
  font-family: var(--font-mono); font-size: 0.85em; font-weight: 500;
  background: var(--blue-wash); color: var(--c-deep);
  padding: 1px 7px; border-radius: 4px; white-space: nowrap;
}

.legal-header { border-bottom: 1px solid var(--line); }
.legal-header .header-in { height: 64px; }
.legal-header .back { margin-left: auto; font-size: 0.88rem; font-weight: 600; text-decoration: none; }

.legal-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.legal-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; font-size: 0.82rem; color: var(--ink-3); }
.legal-footer a { color: var(--ink-2); }

/* 15. Responsive ---------------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-grid > div:first-child { max-width: 620px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gr-head { grid-template-columns: 1fr; align-items: start; }
  .ref-cards { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  /* collapse nav behind the toggle */
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px;
    box-shadow: 0 20px 30px -20px rgba(19, 35, 63, 0.3);
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 16px; justify-content: center; }

  .steps { grid-template-columns: 1fr; }
  .gr-row { grid-template-columns: 1fr; gap: 8px; }
  .vig-meta { grid-template-columns: 1fr; }
  .vig-rows li { grid-template-columns: minmax(0, 1fr) max-content; }
  .vig-rows li .chip { grid-column: 2; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* 16. Reduced motion -------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn.nav-toggle span.faq summary::after { transition: none; }
}
