/* Elite waitlist page. Tokens are the Elite app's closed palette (Spec #19, "The look"):
   use these and tints of them only. Dark only. */

@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/pt-serif-5.3.0/pt-serif-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "PT Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/pt-serif-5.3.0/pt-serif-latin-400-italic.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0c0c0c;
  --panel-2: #111111;
  --line: #1c1810;
  --text: #f1ebda;
  --muted: #8a8273;
  --gold: #c9a45c;
  --gold-light: #e2c078;
  --gold-deep: #7e5e2a;
  --bad: #ff5d6c; /* the app's error colour, for form errors only */
  --r: 14px;      /* panels and cards */
  --rc: 10px;     /* buttons and inputs */
  --col: 560px;   /* the text column */
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.21, 0.61, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  scrollbar-color: var(--gold-deep) var(--bg);
}
body { min-height: 100vh; overflow-x: clip; background: var(--bg); }

:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; }

/* The one gold headline word. */
.au { color: var(--gold-light); }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 60px; padding: 10px 20px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.wm { display: flex; gap: 10px; align-items: center; }
.wm img { width: 34px; height: 34px; }
.wm b { display: block; font: 700 18px/1 var(--sans); }
.wm small { display: block; margin-top: 3px; font: 600 9px/1 var(--sans); letter-spacing: 2px; color: var(--muted); }

/* Hero */
.hero {
  position: relative; isolation: isolate;
  display: grid; justify-items: center; gap: 22px;
  padding: 56px 20px 64px; text-align: center;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -60px;
  width: 100vw; height: 680px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(62% 62% at 50% 0%, rgba(201, 164, 92, 0.24), rgba(201, 164, 92, 0.07) 52%, transparent 76%);
}
h1 { font-size: clamp(2.8rem, 12.5vw, 4.75rem); line-height: 1; letter-spacing: -0.015em; max-width: 12ch; }
.lead { font-size: 18px; line-height: 1.55; max-width: 38ch; }
.status { font-size: 14px; color: var(--muted); max-width: 44ch; }

/* ===== Form card (#22) ======================================================================
   The Signup form card and its states (empty, invalid, saving, failed, joined). Everything here is
   scoped to .card; the Join button reuses the page's .cta from "The story (#24)".
   Gold: the Join button is the page's only solid gold block; focus and a chosen Phone type are
   gold as the Spec allows; the joined tick is a gold-deep hairline, not one of the five golds. */
.card {
  width: 100%; max-width: 480px; padding: 22px;
  background: var(--panel-2);
  border: 1px solid rgba(126, 94, 42, 0.6); border-radius: var(--r);
  box-shadow: 0 30px 70px -34px rgba(201, 164, 92, 0.35);
  text-align: start;
}
.card .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.card .signup { display: grid; gap: 14px; }
.card .field { display: grid; gap: 6px; }
.card input[type="email"] {
  width: 100%; min-height: 52px; padding: 13px 14px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--gold-deep); border-radius: var(--rc);
  font: 16px/1.4 var(--sans);
}
.card input[type="email"]::placeholder { color: var(--muted); opacity: 1; }
/* Focus: the gold border (Spec), plus the page's focus ring for keyboard users. */
.card input[type="email"]:focus { outline: 0; border-color: var(--gold); }
.card input[type="email"]:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.card input[type="email"][aria-invalid="true"] { border-color: var(--bad); }

.card .phone { border: 0; padding: 0; min-width: 0; }
.card .phone legend { padding: 0; margin-bottom: 8px; font-size: 14px; }
.card .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card .seg label {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 12px; cursor: pointer;
  border: 1px solid var(--gold-deep); border-radius: var(--rc);
  font: 600 15px/1 var(--sans);
  transition: transform 0.12s var(--ease);
}
.card .seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.card .seg label:has(input:checked) { border-color: var(--gold); background: rgba(201, 164, 92, 0.13); color: var(--gold-light); }
.card .seg label:has(input:focus-visible) { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.card .seg label:active { transform: scale(0.97); }
.card .phone .msg { margin-top: 8px; }

.card .msg { font-size: 14px; color: var(--bad); }
.card .msg.box {
  padding: 12px 14px; color: var(--text);
  border: 1px solid var(--bad); border-radius: var(--rc); background: rgba(255, 93, 108, 0.08);
}
/* A state the card is not in stays hidden, whatever display its rules give it. */
.card [hidden] { display: none !important; }

/* The Join button is the page's .cta (styled under "The story (#24)"); only the form's extras here. */
.card .cta { width: 100%; cursor: pointer; }
.card .cta:disabled, .card .cta[aria-disabled="true"] { cursor: default; }
.card .consent { font-size: 13px; line-height: 1.5; color: var(--muted); }

/* The honeypot: off screen and inert, so no person meets it. */
.card .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.card .hp input { background: var(--panel-2); color: var(--text); border: 1px solid var(--gold-deep); }

.card .joined { display: grid; gap: 10px; }
.card .joined:not([hidden]) { animation: settle 0.3s var(--ease) both; }
.card .joined h3 { display: flex; align-items: center; font-size: 26px; line-height: 1.15; }
.card .joined h3::before {
  content: ""; flex: none; width: 11px; height: 6px; margin: 0 12px 6px 2px;
  border-left: 2px solid var(--gold-deep); border-bottom: 2px solid var(--gold-deep);
  transform: rotate(-45deg);
}
.card .joined h3:focus { outline: 0; }
.card .joined h3:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.card .joined p { font-size: 15px; }
.card .joined b { font-weight: 600; overflow-wrap: anywhere; }
.card .link {
  padding: 0; background: none; border: 0; cursor: pointer;
  color: var(--text); font: inherit;
  text-decoration: underline; text-decoration-color: var(--gold-deep); text-underline-offset: 3px;
}
.card .link:hover { text-decoration-color: var(--text); }
/* ===== end form card (#22) ================================================================== */

/* ===== The Struggle question (#26) ==========================================================
   Under a fresh Signup's thank-you, after a hairline. The Send button is outlined, never solid
   gold; a chosen pill turns gold like a chosen Phone type. Selectors are specific enough to win
   over the page's .cta (and its :hover), which is defined further down. */
.card .struggle { display: grid; gap: 12px; margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.card .struggle form { display: grid; gap: 12px; }
.card .struggle .opt { font-size: 13px; color: var(--muted); }
.card .struggle label { font: 700 19px/1.3 var(--serif); }
.card .struggle textarea {
  width: 100%; min-height: 96px; padding: 13px 14px; resize: vertical;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--gold-deep); border-radius: var(--rc);
  font: 16px/1.4 var(--sans);
}
.card .struggle textarea::placeholder { color: var(--muted); opacity: 1; }
.card .struggle textarea:focus { outline: 0; border-color: var(--gold); }
.card .struggle textarea:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.card .struggle .count { margin-top: -6px; font-size: 13px; color: var(--muted); }
.card .struggle .pick { font-size: 14px; }
.card .struggle .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.card .struggle .chips button {
  min-height: 44px; padding: 9px 13px; cursor: pointer;
  background: transparent; color: var(--text);
  border: 1px solid var(--gold-deep); border-radius: 20px;
  font: 14px/1.3 var(--sans); text-align: start;
  transition: transform 0.12s var(--ease);
}
.card .struggle .chips button[aria-pressed="true"] { border-color: var(--gold); background: rgba(201, 164, 92, 0.13); color: var(--gold-light); }
.card .struggle .chips button:active { transform: scale(0.97); }
.card .struggle .cta.ghost,
.card .struggle .cta.ghost:hover { width: auto; justify-self: start; background: transparent; color: var(--text); border: 1px solid var(--gold-deep); }
.card .struggle .cta.ghost:hover { border-color: var(--text); }
.card .struggle .sent { font-size: 15px; }
.card .struggle .sent:focus { outline: 0; }
.card .struggle .sent:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
/* ===== end Struggle question (#26) ========================================================== */

/* Motion: one-shot settle on load (12px rise and fade, 420ms, 40ms stagger). Content is never
   hidden waiting for a script; this runs from CSS alone. Stagger steps are classes, not inline
   styles, because the page's Content-Security-Policy allows no inline styles. */
@keyframes settle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.in { animation: settle 0.42s var(--ease) both; }
.in-0 { animation-delay: 0ms; }
.in-2 { animation-delay: 80ms; }
.in-4 { animation-delay: 160ms; }

@media (min-width: 900px) {
  .hero { padding: 88px 20px 104px; }
}

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

/* ==================== The story (#24): top-bar button, diagrams, sections 3 to 9 ====================
   Gold (--gold, --gold-light) is used only in the Spec's five places: the Join button, the headline
   word, the staircase, the pulled quote and the step numbers (plus the two ambient glows the Spec
   knowingly allows, and the keyboard focus ring). Every other accent is --gold-deep, the hairline tone. */

::selection { background: var(--gold-deep); color: var(--text); }
a {
  color: var(--text);
  text-decoration: underline 1px var(--gold-deep);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--text); }
.muted { color: var(--muted); }

/* The Join button: the page's only solid gold block. Presses to 0.97. */
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 13px 22px;
  background: var(--gold); color: var(--bg);
  border: 0; border-radius: var(--rc);
  font: 700 15px/1 var(--sans); text-decoration: none;
  transition: transform 0.12s var(--ease), background-color 0.2s var(--ease);
}
.cta:hover { background: var(--gold-light); }
.cta:active { transform: scale(0.97); }
.cta.sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }

/* Sections */
.story { padding: 64px 20px; }
.story-follows { padding-top: 0; }
.wrap { max-width: var(--col); margin: 0 auto; }
h2 { font-size: clamp(1.9rem, 8vw, 2.75rem); line-height: 1.1; margin-bottom: 20px; }
.wrap p { font-size: 17px; }
.wrap p + p { margin-top: 16px; }

/* 4. What changes: three lines on raised hairline panels */
.lines { list-style: none; padding: 0; margin-top: 8px; }
.lines li {
  position: relative; margin-top: 10px; padding: 18px 18px 18px 48px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  font: 700 21px/1.3 var(--serif);
}
.lines li::before {
  content: ""; position: absolute; left: 18px; top: 30px; width: 14px; height: 2px;
  background: var(--gold-deep);
}
.wrap .after-lines { margin-top: 20px; }

/* Diagrams: inline drawings on hairline panels. Drawn by default; the script arms (.armed) only
   diagrams still below the fold, so nothing is ever hidden waiting for it. */
.dia {
  position: relative; max-width: 920px; width: calc(100% - 40px); margin: 0 auto;
  padding: 26px 18px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
}
.plot { position: relative; }
.dia svg { display: block; width: 100%; height: auto; overflow: visible; }
.dia .grid, .dia .base, .dia .line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dia .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.dia .base { stroke: var(--line); stroke-width: 1.5; }
.dia .line { stroke-width: 2.5; }
.dia .area { stroke: none; }
.dia-loop .line { stroke: var(--muted); }
.dia-loop circle { fill: var(--muted); }
.dia-climb .line { stroke: var(--gold); }
.dia-climb circle { fill: var(--gold); }
.lbl {
  position: absolute; transform: translateX(-50%);
  font-size: 12px; line-height: 1.2; white-space: nowrap; color: var(--muted);
}
.dia-climb .lbl { color: var(--gold-light); }
.l-big-plan { left: 16%; top: 5%; }
.l-hard-day { left: 28%; top: 52%; }
.l-start-over-1 { left: 44%; top: 89%; }
.l-start-over-2 { left: 75%; top: 89%; }
.l-small-start { left: 10%; top: 89%; }
.l-dip { left: 56%; top: 75%; }
.l-back-again { left: 86%; top: 30%; }
.cap {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font: 700 17px/1.3 var(--serif); text-align: center;
}
/* One-shot draw: the line draws (~900ms), then its fill, dots and labels fade in. Arming is
   instant (no transition), so only the draw itself moves. */
.dia.armed .line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.dia.armed .area, .dia.armed circle, .dia.armed .lbl { opacity: 0; }
.dia.armed.on .line { stroke-dashoffset: 0; transition: stroke-dashoffset 0.9s var(--ease); }
.dia.armed.on .area { opacity: 1; transition: opacity 0.6s var(--ease) 0.5s; }
.dia.armed.on circle { opacity: 1; transition: opacity 0.3s var(--ease) 0.8s; }
.dia.armed.on .lbl { opacity: 1; transition: opacity 0.3s var(--ease) 0.7s; }

/* 5. A different approach: full-width band on the panel colour, with the pulled quote */
.band { margin-top: 64px; background: var(--panel); border-block: 1px solid var(--line); }
.wrap .pull {
  margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--gold-deep);
  font: italic 400 clamp(1.5rem, 6.2vw, 2.3rem)/1.35 var(--serif); color: var(--gold-light);
}

/* 6. The plan: three steps joined by a line, the habit tiles, the mechanics line */
.wrap .plan-lead { margin-bottom: 28px; }
.steps { list-style: none; padding: 0; margin-top: 8px; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 36px 52px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--gold); color: var(--bg); font: 700 16px/1 var(--serif);
}
.steps > li::after {
  content: ""; position: absolute; left: 17px; top: 34px; bottom: 0; width: 1px;
  background: var(--gold-deep);
}
.steps > li:last-child::after { display: none; }
.steps h3 { font-size: 22px; line-height: 1.25; margin-bottom: 6px; padding-top: 2px; }
.tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding: 0; list-style: none; }
.tiles li { width: 64px; text-align: center; font-size: 12px; line-height: 1.25; color: var(--muted); }
/* All six tiles are one image (one request); each shows its own sixth of it. */
.tile { width: 64px; height: 64px; margin-bottom: 6px; border-radius: var(--r); object-fit: cover; }
.t-0 { object-position: 0% 0; }
.t-1 { object-position: 20% 0; }
.t-2 { object-position: 40% 0; }
.t-3 { object-position: 60% 0; }
.t-4 { object-position: 80% 0; }
.t-5 { object-position: 100% 0; }
/* Product glimpse slots: empty at launch and taking no space. */
.glimpse:empty { display: none; }
.glimpse img { width: min(260px, 86%); margin-top: 16px; border: 1px solid var(--gold-deep); border-radius: var(--r); }
.after { display: grid; gap: 20px; justify-items: start; margin-top: 4px; }
.wrap .after p { font-size: 15px; color: var(--muted); }

/* 7. Closing invitation, with the second glow from the bottom */
.close {
  position: relative; isolation: isolate;
  display: grid; justify-items: center; gap: 22px;
  padding: 64px 20px; text-align: center; border-top: 1px solid var(--line);
}
.close::before {
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: 0;
  width: 100vw; height: 520px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(60% 70% at 50% 100%, rgba(201, 164, 92, 0.2), rgba(201, 164, 92, 0.05) 55%, transparent 78%);
}
.close h2 { margin: 0; max-width: 16ch; }
.close .sub { max-width: 36ch; }
.follow { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 20px; padding: 0; list-style: none; font-size: 15px; }
.follow a { display: inline-block; padding: 10px 4px; }
.close .follow { margin-top: -18px; }

/* 8. FAQ: native disclosure rows; the chevron turns in 200ms */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; cursor: pointer; list-style: none;
  font: 600 17px/1.35 var(--sans);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-inline-end: 4px;
  border-right: 1.5px solid var(--gold-deep); border-bottom: 1.5px solid var(--gold-deep);
  transform: translateY(-3px) rotate(45deg); transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.wrap details p { margin: 0; padding: 0 0 14px; max-width: 62ch; font-size: 16px; opacity: 0.86; }
.wrap details p:last-child { padding-bottom: 20px; }

/* 9. Footer */
.foot {
  display: grid; justify-items: center; gap: 18px;
  padding: 48px 20px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted); text-align: center;
}
.foot .wm > div { text-align: start; }
.foot .wm b { color: var(--text); }
.foot p { max-width: 52ch; }

@media (min-width: 900px) {
  .story, .close { padding: 104px 20px; }
  .story-follows { padding-top: 0; }
  .steps > li:has(.glimpse:not(:empty)) { display: grid; grid-template-columns: 1fr 240px; gap: 32px; align-items: start; }
  .glimpse img { width: 240px; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dia.armed .line { stroke-dashoffset: 0; }
  .dia.armed .area, .dia.armed circle, .dia.armed .lbl { opacity: 1; }
}
/* ==================== end of the story (#24) ==================== */

/* ===== Second form card and the return visit (#25) ===== */
/* The top bar's button while a form card is on screen or in the joined state (page.js adds .hide).
   Instant, and out of the tab order and the accessibility tree; the bar keeps its height. */
.bar .cta.hide { visibility: hidden; }
/* ===== end second form card (#25) ===== */
