/* RetirementGene site — trail-map direction.
   Retirement drawn as an elevation profile: navy night sky, sunrise orange marks the moment you stop working,
   contour lines as the quiet texture. Left-aligned, generous measure, one bold element per page. */
:root {
  --navy: #102944;          /* brand theme-color from the live parking page */
  --navy-deep: #0a1c31;
  --sun: #f07a2b;           /* sunrise orange — the one accent */
  --sun-soft: #f7b27d;
  --ridge: #5d7894;         /* slate ridge / secondary ink on navy */
  --paper: #f4f7fa;         /* cool off-white, not cream */
  --ink: #12202f;
  --muted: #55657a;
  --line: #d6dee8;
  --card: #ffffff;
  --contour: rgba(16, 41, 68, 0.07);

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Source Serif 4", "Iowan Old Style", Georgia, serif;

  --step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 0.9vw, 2.1rem);
  --step-3: clamp(2.2rem, 1.7rem + 2.2vw, 3.6rem);
  --step-4: clamp(2.8rem, 2rem + 3.6vw, 5.2rem);
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1828; --ink: #e6edf5; --muted: #9fb0c3; --line: #22364d; --card: #12233a;
    --contour: rgba(160, 190, 220, 0.06); --ridge: #8aa3bd; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c1828; --ink: #e6edf5; --muted: #9fb0c3; --line: #22364d; --card: #12233a;
  --contour: rgba(160, 190, 220, 0.06); --ridge: #8aa3bd; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: var(--step-0); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); font-weight: 700; font-stretch: 85%; }
h2 { font-size: var(--step-3); font-weight: 650; font-stretch: 90%; }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; max-width: 62ch; }
.lede { font-size: var(--step-1); line-height: 1.5; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--navy); }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--navy); color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { font-family: var(--display); text-decoration: none; padding: 6px 12px; border-radius: 999px; color: #c9d6e4; font-size: 0.98rem; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.1); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600;
  text-decoration: none; padding: 11px 20px; border-radius: 999px; border: 0; cursor: pointer; font-size: 1rem;
  background: var(--sun); color: #1b0d02;
}
.btn:hover { background: var(--sun-soft); }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.topbar .btn { padding: 8px 16px; }
@media (max-width: 640px) {
  .topbar .btn { display: none; }
  .topbar .wrap { flex-wrap: wrap; gap: 8px; padding-block: 10px; }
  .nav { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .nav a { padding: 5px 10px; white-space: nowrap; font-size: 0.92rem; }
}
.chartscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chartscroll svg { min-width: 640px; }

/* ---------- navy hero band (same in both themes by design) ---------- */
.night { background: var(--navy); color: #eef3f8; position: relative; overflow: hidden; }
.night canvas.contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.night .wrap { position: relative; }
.night .lede, .night p { color: #c3d1e0; }
.hero { padding-block: clamp(48px, 7vw, 96px) 0; }
.hero h1 { max-width: 14ch; color: #fff; }
.hero .lede { margin-top: 20px; max-width: 46ch; }

/* trail profile */
.profile { margin-top: 40px; padding-bottom: 28px; }
.profile svg { width: 100%; height: auto; display: block; overflow: visible; }
.profile .controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 32px; margin-top: 18px; align-items: end; }
.ctl label { display: flex; justify-content: space-between; font-family: var(--display); font-size: 0.95rem; color: #c3d1e0; }
.ctl output { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.ctl input[type=range] { width: 100%; accent-color: var(--sun); margin-top: 6px; }
.readout { font-family: var(--display); }
.readout .big { font-size: var(--step-2); font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.readout .small { font-size: 0.9rem; color: #c3d1e0; }
.footnote { margin-top: 14px; font-size: var(--step--1); color: #8fa6bf !important; max-width: 80ch; }

/* ---------- light sections ---------- */
.section { padding-block: clamp(56px, 8vw, 112px); position: relative; }
.section-head { display: grid; gap: 16px; margin-bottom: 40px; }
.section-head p { color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* map legend: the app's five places */
.legend { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.legend li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.legend .glyph { width: 44px; height: 44px; }
.legend h3 { margin-bottom: 4px; }
.legend p { color: var(--muted); }

/* questions */
.questions { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 40px; }
.q { padding: 22px 0; border-top: 1px solid var(--line); }
.q h3 { font-size: var(--step-1); }
.q p { color: var(--muted); margin-top: 8px; font-size: 0.98rem; }
.q .where { display: inline-block; margin-top: 10px; font-family: var(--display); font-size: 0.85rem; color: var(--sun); font-weight: 600; }

/* waitlist */
.signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 760px) { .signup { grid-template-columns: 1fr; } }
.form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.form input[type=email] {
  flex: 1 1 220px; min-width: 0; font: inherit; font-size: 1rem; padding: 11px 16px; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.06); color: #fff;
}
.form input::placeholder { color: #9db1c6; }
.sr, .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.platform { flex-basis: 100%; border: 0; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-family: var(--display); }
.platform legend { float: left; margin-right: 6px; color: #c3d1e0; padding: 0; }
.platform label { display: inline-flex; align-items: center; gap: 6px; color: #fff; cursor: pointer; }
.platform input { accent-color: var(--sun); width: 18px; height: 18px; }
.form .state-label { flex-basis: 100%; font-family: var(--display); color: #c3d1e0; font-size: 0.95rem; }
.form select { flex-basis: 100%; font: inherit; font-size: 1rem; padding: 11px 16px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,0.35); background: #16324f; color: #fff; appearance: auto; }
.form .consent { flex-basis: 100%; font-size: var(--step--1); color: #8fa6bf !important; max-width: 52ch; }
.form .msg { flex-basis: 100%; font-family: var(--display); font-size: 0.95rem; color: var(--sun-soft); min-height: 1.4em; }
.stores { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.store { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.25); font-family: var(--display); line-height: 1.2; }
.store small { display: block; font-size: 0.72rem; color: #9db1c6; }
.store svg { width: 22px; height: 22px; fill: currentColor; }

/* footer */
.footer { padding-block: 40px; border-top: 1px solid rgba(255,255,255,0.12); font-size: var(--step--1); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.footer p { color: #9db1c6 !important; max-width: 70ch; }

/* ---------- story page: trail log ---------- */
.log { list-style: none; margin: 0; padding: 0; position: relative; }
.log::before { content: ""; position: absolute; left: 118px; top: 8px; bottom: 8px; border-left: 2px dashed var(--line); }
.log li { display: grid; grid-template-columns: 100px 36px minmax(0, 1fr); gap: 0 16px; padding-bottom: 44px; position: relative; }
.log .when { font-family: var(--display); font-weight: 600; color: var(--muted); text-align: right; padding-top: 2px; font-variant-numeric: tabular-nums; }
.log .pin { width: 20px; height: 20px; border-radius: 50%; background: var(--paper); border: 3px solid var(--sun); margin: 4px 0 0 0; position: relative; z-index: 1; justify-self: center; }
.log li:last-child .pin { background: var(--sun); }
.log h3 { margin-bottom: 8px; }
.log p { color: var(--muted); }
.log .proof { margin-top: 10px; font-family: var(--display); font-size: 0.9rem; color: var(--ink); }
@media (max-width: 600px) {
  .log::before { left: 9px; }
  .log li { grid-template-columns: 20px minmax(0, 1fr); }
  .log .when { grid-column: 2; grid-row: 1; text-align: left; }
  .log .pin { grid-column: 1; grid-row: 1 / span 3; justify-self: start; margin-top: 4px; }
  .log li > div { grid-column: 2; }
}
.splits { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px; border-top: 1.5px solid var(--ink); padding-top: 24px; }
.splits .v { font-family: var(--display); font-weight: 700; font-size: var(--step-3); line-height: 1; font-variant-numeric: tabular-nums; }
.splits .k { color: var(--muted); margin-top: 8px; font-size: 0.98rem; }
.quote { font-family: var(--display); font-size: var(--step-2); font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; max-width: 26ch; color: #fff; }

/* ---------- vision page ---------- */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 36px 48px; }
.principle h3 { margin: 14px 0 8px; }
.principle p { color: var(--muted); }
.principle svg { width: 52px; height: 52px; }
.road { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); }
.road > div { padding: 22px 24px 0 0; }
.road .stage { font-family: var(--display); font-weight: 700; font-size: var(--step-1); display: flex; align-items: center; gap: 10px; }
.road .stage i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); display: inline-block; }
.road .now .stage i { background: var(--sun); box-shadow: 0 0 0 5px rgba(240,122,43,0.25); }
.road ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.road li { margin-bottom: 6px; }
@media (max-width: 760px) { .road { grid-template-columns: 1fr; } .road > div { padding-bottom: 18px; border-bottom: 1px solid var(--line); } }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-family: var(--display); font-weight: 600; font-size: var(--step-1); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--sun); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 10px; }
.pagehero { padding-block: clamp(48px, 7vw, 96px); }
.pagehero h1 { max-width: 16ch; color: #fff; }
.pagehero .lede { margin-top: 20px; max-width: 52ch; }

/* ---------- legal page ---------- */
.legal { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.legal .toc { position: sticky; top: 96px; display: grid; gap: 8px; font-family: var(--display); }
.legal .toc a { text-decoration: none; color: var(--muted); }
.legal .toc a:hover { color: var(--ink); }
.legal article { max-width: 68ch; }
.legal article h2 { font-size: var(--step-2); margin: 56px 0 8px; scroll-margin-top: 96px; }
.legal article h2:first-child { margin-top: 0; }
.legal article h3 { margin: 28px 0 8px; }
.legal article p + p { margin-top: 12px; }
.legal article ul { margin: 8px 0 12px; padding-left: 20px; }
.legal article li { margin-bottom: 6px; }
.legal .email { font-family: var(--display); font-weight: 600; user-select: all; }
@media (max-width: 760px) { .legal { grid-template-columns: 1fr; } .legal .toc { position: static; display: flex; gap: 18px; } }
.footer a, .consent a { color: inherit; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
