/* ============================================================
   COMPASS — pre-launch landing (compass-invest.app)
   Mobile-first marketing site. Editorial fintech-meets-education.
   ============================================================ */

:root {
  /* brand */
  --accent:      #5B4FCF;   /* indigo */
  --accent-deep: #4840A8;
  --accent-soft: rgba(91, 79, 207, 0.10);
  --accent-line: rgba(91, 79, 207, 0.18);
  --violet:      #433361;   /* wordmark ink */
  --navy:        #0B1F3A;   /* dark panels */
  --navy-2:      #0e264a;
  --bg:          #FAFAF8;   /* warm off-white */
  --surface:     #FFFFFF;
  --ink:         #111111;
  --ink-2:       #565163;
  --ink-3:       #8b8794;
  --line:        #ece9e4;
  --line-2:      #f1efeb;
  --pos:         #16A34A;   /* up / wins */
  --pos-soft:    rgba(22, 163, 74, 0.12);

  /* type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "Inter", system-ui, sans-serif;

  /* form */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(17,17,17,0.05), 0 1px 1px rgba(17,17,17,0.03);
  --shadow-md: 0 10px 30px -12px rgba(40,30,80,0.18), 0 2px 6px rgba(17,17,17,0.04);
  --shadow-lg: 0 30px 70px -24px rgba(40,30,80,0.30), 0 8px 20px -10px rgba(17,17,17,0.10);

  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

/* ---------- type helpers ---------- */
.eyebrow {
  font-family: var(--body);
  font-weight: 600; font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-deep);
}
.eyebrow-dim { color: var(--ink-3); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
p { margin: 0; }
.mono { font-family: "Space Grotesk", monospace; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav[data-scrolled="true"] { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 27px; letter-spacing: -0.03em; color: var(--violet); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 14.5px;
  padding: 10px 18px; border-radius: var(--r-pill, 999px); border-radius: 999px;
  background: var(--ink); color: #fff; border: none; cursor: pointer;
  transition: transform .14s ease, background .14s ease;
}
.nav-cta:hover { transform: translateY(-1px); background: #000; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(620px 420px at 84% 8%, rgba(91,79,207,0.10), transparent 70%),
    radial-gradient(520px 360px at 6% 30%, rgba(67,51,97,0.07), transparent 70%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr; gap: 44px;
  padding: 40px 0 64px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 13px 7px 9px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  box-shadow: var(--shadow-sm); width: max-content; max-width: 100%;
}
.hero-badge-ico { color: var(--accent); flex-shrink: 0; }
.hero-badge-sep { color: var(--ink-3); }
.hero-badge-accent { color: var(--accent-deep); font-weight: 700; }
.hero h1 {
  font-size: clamp(40px, 9vw, 62px); margin-top: 22px;
  letter-spacing: -0.035em;
}
.hero h1 .accent { color: var(--accent); font-style: italic; font-weight: 500; }
.hero-lede {
  font-size: clamp(16.5px, 2.2vw, 19px); color: var(--ink-2);
  margin-top: 20px; max-width: 32em; text-wrap: pretty;
}
.hero-trust { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--ink-3); font-size: 13.5px; }
.hero-trust svg { color: var(--accent); flex-shrink: 0; }

/* ---------- CTA (swappable) ---------- */
.cta { margin-top: 30px; max-width: 480px; }
.cta-launch { display: none; }
body[data-launch="true"] .cta-prelaunch { display: none; }
body[data-launch="true"] .cta-launch { display: block; }

.signup { display: flex; flex-direction: column; gap: 12px; }
.qualifier { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qualifier-label { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button {
  border: none; background: none; cursor: pointer; font-family: var(--body);
  font-weight: 600; font-size: 13px; color: var(--ink-2);
  padding: 6px 14px; border-radius: 999px; transition: all .15s ease;
}
.seg button[data-on="true"] { background: var(--accent-soft); color: var(--accent-deep); }

.field-row { display: flex; gap: 10px; }
.email-field {
  flex: 1; min-width: 0; height: 54px; padding: 0 18px;
  font-family: var(--body); font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color .15s ease, box-shadow .15s ease; outline: none;
}
.email-field::placeholder { color: var(--ink-3); }
.email-field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.btn-primary {
  flex-shrink: 0; height: 54px; padding: 0 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 15.5px;
  color: #fff; background: var(--accent); border: none; border-radius: var(--r-md);
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 20px -8px rgba(91,79,207,0.55);
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary[disabled] { opacity: .6; cursor: default; transform: none; }
.cta-fine { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.cta-error { font-size: 13px; color: var(--neg, #d4493a); margin-top: 2px; display: none; }
.signup.is-error .cta-error { display: block; }

/* success state */
.signup.is-done .field-row, .signup.is-done .qualifier { display: none; }
.signup-success { display: none; align-items: flex-start; gap: 13px; padding: 16px 18px; background: var(--pos-soft); border: 1px solid rgba(22,163,74,0.25); border-radius: var(--r-md); }
.signup.is-done .signup-success { display: flex; }
.signup-success .check { width: 26px; height: 26px; border-radius: 50%; background: var(--pos); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.signup-success strong { font-family: var(--display); font-weight: 600; }
.signup-success p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }

/* App Store button (launch mode) */
.appstore-btn {
  display: inline-flex; align-items: center; gap: 13px;
  padding: 13px 24px 13px 20px; border-radius: var(--r-md);
  background: var(--ink); color: #fff; cursor: pointer; border: none;
  box-shadow: var(--shadow-md); transition: transform .14s ease, background .14s ease;
}
.appstore-btn:hover { transform: translateY(-1px); background: #000; }
.appstore-btn > span { display: flex; flex-direction: column; align-items: flex-start; }
.appstore-btn .sub { font-size: 11px; letter-spacing: 0.02em; opacity: .82; line-height: 1.1; }
.appstore-btn .main { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.1; margin-top: 2px; }

/* ============================================================
   iPHONE MOCKUP
   ============================================================ */
.phone-stage {
  display: flex; justify-content: center; align-items: flex-start;
  flex-wrap: wrap; gap: clamp(16px, 3vw, 32px); perspective: 1600px;
}
.phone {
  position: relative; width: clamp(220px, 30vw, 300px); aspect-ratio: 300 / 612;
  flex-shrink: 0;
  background: #0c0c10; border-radius: 52px; padding: 11px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,0.06);
}
.phone-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background: var(--bg); border-radius: 42px;
  display: flex; flex-direction: column;
}
.phone-shot {
  width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block;
}
.statusbar { display: flex; align-items: center; justify-content: space-between; padding: 15px 26px 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.statusbar .icons { display: flex; align-items: center; gap: 6px; }

/* ---- phone interior: faithful Compass Mobile dashboard ---- */
.phone-screen {
  --pa-pos:          oklch(0.60 0.10 155);
  --pa-accent:       #5B4FCF;
  --pa-accent-soft:  rgba(91, 79, 207, 0.12);
  --pa-accent-softer:rgba(91, 79, 207, 0.06);
  --pa-accent-ink:   #463aa6;
  --pa-ink:          #221f2b;
  --pa-ink-2:        #5f5a6b;
  --pa-ink-3:        #8e8a97;
  --pa-line:         #ecebe6;
  --pa-surface:      #ffffff;
  --pa-bg:           #faf9f6;
  --pa-serif:        "Newsreader", Georgia, serif;
  --pa-mono:         "JetBrains Mono", ui-monospace, monospace;
  background: var(--pa-bg);
}
.pa-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 15px 9px; border-bottom: 1px solid var(--pa-line);
  background: color-mix(in oklab, var(--pa-bg) 88%, transparent);
}
.pa-eyebrow { font-family: var(--pa-mono); font-size: 7.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pa-ink-3); }
.pa-title { font-family: var(--pa-serif); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; color: var(--pa-ink); line-height: 1.08; margin-top: 2px; }
.pa-head-r { display: flex; align-items: center; gap: 8px; }
.pa-icon-btn { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--pa-line); background: var(--pa-surface); color: var(--pa-ink-2); }
.pa-icon-accent { background: var(--pa-accent); border-color: transparent; color: #fff; }
.pa-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--pa-accent-soft); color: var(--pa-accent-ink); display: grid; place-items: center; font-family: var(--pa-serif); font-weight: 600; font-size: 13px; }

.pa-scroll { flex: 1; overflow: hidden; padding: 13px 14px 0; display: flex; flex-direction: column; gap: 12px; }

.pa-card { background: var(--pa-surface); border: 1px solid var(--pa-line); border-radius: 16px; padding: 14px; }
.pa-label { font-family: var(--pa-mono); font-size: 8px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pa-ink-3); }
.pa-balance { font-family: var(--pa-serif); font-size: 33px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; color: var(--pa-ink); margin-top: 6px; }
.pa-delta { display: flex; align-items: baseline; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.pa-delta-main { font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pa-delta-abs { color: var(--pa-ink-3); font-weight: 500; margin-left: 6px; }
.pa-today { font-size: 10.5px; color: var(--pa-ink-3); }
.pa-pos { color: var(--pa-pos); }
.pa-chart { margin: 12px -2px 0; }
.pa-seg { display: flex; gap: 3px; margin-top: 12px; background: oklch(0.975 0.004 95); border: 1px solid var(--pa-line); border-radius: 999px; padding: 3px; }
.pa-seg span { flex: 1; text-align: center; font-size: 10px; font-weight: 600; color: var(--pa-ink-2); padding: 5px 0; border-radius: 999px; }
.pa-seg span[data-on="true"] { background: var(--pa-surface); color: var(--pa-ink); box-shadow: var(--shadow-sm); }
.pa-stats { display: flex; border-top: 1px solid var(--pa-line); margin-top: 13px; padding-top: 11px; }
.pa-stats > div { flex: 1; }
.pa-stats > div + div { border-left: 1px solid var(--pa-line); padding-left: 12px; }
.pa-k { font-size: 9px; color: var(--pa-ink-3); }
.pa-v { font-family: var(--pa-mono); font-size: 13px; font-weight: 600; color: var(--pa-ink); margin-top: 3px; }

.pa-coach { background: linear-gradient(180deg, var(--pa-accent-softer), transparent); border: 1px solid var(--pa-accent-soft); border-radius: 16px; padding: 13px; display: flex; gap: 10px; align-items: flex-start; }
.pa-coach-ava { width: 30px; height: 30px; border-radius: 50%; background: var(--pa-surface); border: 1px solid var(--pa-accent-soft); display: grid; place-items: center; flex-shrink: 0; }
.pa-coach-body { flex: 1; min-width: 0; }
.pa-coach-head { display: flex; align-items: center; gap: 6px; }
.pa-coach-name { font-weight: 700; font-size: 12px; color: var(--pa-ink); }
.pa-coach-badge { font-size: 7.5px; font-weight: 700; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 999px; background: var(--pa-accent-soft); color: var(--pa-accent-ink); text-transform: uppercase; }
.pa-coach-msg { font-size: 11.5px; line-height: 1.5; color: var(--pa-ink-2); margin-top: 6px; }
.pa-coach-msg strong { color: var(--pa-accent-ink); font-weight: 600; }
.pa-coach-cta { display: inline-flex; align-items: center; gap: 5px; margin-top: 11px; padding: 7px 12px; border-radius: 999px; background: var(--pa-accent-soft); color: var(--pa-accent-ink); font-size: 11px; font-weight: 600; }
.pa-coach-cta svg { color: var(--pa-accent-ink); }

.pa-pos-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.pa-pos-title { font-family: var(--pa-serif); font-size: 15px; font-weight: 600; color: var(--pa-ink); }
.pa-badge-n { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: oklch(0.975 0.004 95); border: 1px solid var(--pa-line); color: var(--pa-ink-2); }
.pa-pos-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--pa-line); }
.pa-tkr { width: 30px; height: 30px; border-radius: 9px; background: var(--pa-accent-soft); color: var(--pa-accent-ink); display: grid; place-items: center; font-family: var(--pa-mono); font-weight: 600; font-size: 10px; flex-shrink: 0; }
.pa-pos-meta { flex: 1; min-width: 0; }
.pa-pos-sym { font-family: var(--pa-mono); font-weight: 600; font-size: 12px; color: var(--pa-ink); display: block; }
.pa-pos-sub { font-size: 9.5px; color: var(--pa-ink-3); }
.pa-pos-num { text-align: right; }
.pa-pos-px { font-family: var(--pa-mono); font-weight: 600; font-size: 12px; color: var(--pa-ink); display: block; }
.pa-pos-gl { font-family: var(--pa-mono); font-size: 10px; }

.pa-tabbar { display: flex; padding: 7px 4px 14px; border-top: 1px solid var(--pa-line); background: color-mix(in oklab, var(--pa-bg) 85%, transparent); }
.pa-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 8px; font-weight: 600; color: var(--pa-ink-3); }
.pa-tab[data-on="true"] { color: var(--pa-accent); }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section { padding: 72px 0; }
.section-head { max-width: 620px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 5vw, 40px); margin-top: 14px; }
.section-head p { color: var(--ink-2); font-size: 16.5px; margin-top: 16px; text-wrap: pretty; }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 40px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.step-n { font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--accent); letter-spacing: 0.06em; }
.step-ico { width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); display: grid; place-items: center; margin: 14px 0 16px; }
.step-ico svg { color: var(--accent); }
.step h3 { font-size: 20px; }
.step p { color: var(--ink-2); font-size: 14.5px; margin-top: 9px; text-wrap: pretty; }

/* ---------- feature cards ---------- */
.features { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 40px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-line); }
.feature-top { display: flex; align-items: center; gap: 12px; }
.feature-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; flex-shrink: 0; }
.feature-ico svg { color: var(--accent); }
.feature-tag { font-size: 11.5px; font-weight: 600; color: var(--accent-deep); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; margin-left: auto; }
.feature h3 { font-size: 20px; margin-top: 18px; }
.feature p { color: var(--ink-2); font-size: 14.5px; margin-top: 9px; text-wrap: pretty; }
.feature-points { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 9px; }
.feature-points li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.feature-points svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.feature.wide { display: flex; flex-direction: column; }

/* ---------- trust strip ---------- */
.trust { background: var(--navy); color: #fff; border-radius: var(--r-xl); padding: 48px 32px; text-align: center; position: relative; overflow: hidden; }
.trust::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 50% -30%, rgba(91,79,207,0.4), transparent 70%); }
.trust > * { position: relative; z-index: 1; }
.trust .eyebrow { color: #9b93e8; }
.trust h2 { font-size: clamp(26px, 4.5vw, 38px); margin-top: 14px; color: #fff; max-width: 16em; margin-inline: auto; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 30px; margin-top: 30px; }
.trust-item { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 500; color: #d7d3ec; }
.trust-item svg { color: #9b93e8; flex-shrink: 0; }

/* ============================================================
   FOOTER CTA + FOOTER
   ============================================================ */
.footer-cta { text-align: center; padding: 72px 0 64px; }
.footer-cta h2 { font-size: clamp(28px, 5vw, 42px); max-width: 14em; margin-inline: auto; }
.footer-cta p { color: var(--ink-2); font-size: 16.5px; margin: 16px auto 0; max-width: 34em; }
.footer-cta .cta { margin-inline: auto; margin-top: 28px; }
.footer-cta .signup { align-items: center; }
.footer-cta .field-row { width: 100%; }

.footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-direction: column; gap: 28px; padding: 40px 0 28px; }
.footer-brand { max-width: 300px; }
.footer-brand p { color: var(--ink-3); font-size: 13.5px; margin-top: 14px; line-height: 1.6; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--body); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; font-weight: 600; }
.footer-col a { display: block; color: var(--ink-2); font-size: 14px; padding: 5px 0; transition: color .14s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0 40px; }
.footer-bottom p { color: var(--ink-3); font-size: 12px; line-height: 1.6; max-width: 760px; }
.footer-bottom .copy { margin-top: 10px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; align-items: start; gap: 48px; padding: 64px 0 88px; }
  .hero-copy { max-width: 720px; }
  .hero-vis { justify-self: stretch; }
  .section { padding: 88px 0; }
  .feature.feature-span { grid-column: span 2; }
  .feature.feature-span { flex-direction: row; align-items: center; gap: 40px; }
  .feature.feature-span .feature-main { flex: 1; }
  .feature.feature-span .feature-points { flex: 1; margin-top: 0; }
}

/* entrance */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
