/* ===========================================================================
   The public site — the marketing home at / and the user guide at /docs.
   ===========================================================================

   These two pages are not the app. They load css/tokens.css and this file and
   nothing else: no auth-gate, no sprite, none of the other forty stylesheets.
   That is the point of them — a page a stranger can read has to render before
   there is a session, a database or a House, and the fastest way to guarantee
   that is to depend on none of it.

   Tokens are shared with the app on purpose, so a change to the palette moves
   both at once and the site never drifts from the product it is selling. What
   is *not* shared is layout: the app is dense and 14px, the site is roomy and
   17px, and trying to serve both from one set of rules made both worse.

   `.st-` prefixes everything here. The app's global namespace is one shared
   room (see CLAUDE.md) and these pages sit in it even though nothing else they
   load does.
   =========================================================================== */

/* This page loads no base.css, so the reset and the family have to happen here
   — the two stylesheets it links are the whole cascade. */
* { box-sizing: border-box; margin: 0; padding: 0; }

.st-page {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.st-page img { max-width: 100%; height: auto; }

.st-wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
@media (max-width: 640px) { .st-wrap { width: min(1120px, 100% - 32px); } }

/* --- type ------------------------------------------------------------------ */

.st-display {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: var(--track-display);
}
.st-h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  font-weight: 750;
  letter-spacing: var(--track-display);
}
.st-h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: var(--track-heading); }
.st-lead { font-size: clamp(1.02rem, 1.6vw, 1.24rem); color: var(--text-soft); }
.st-muted { color: var(--text-muted); }

/* A short all-caps label above a heading. The brand's own layouts use one to
   name the section before the headline says anything. */
.st-eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-teal);
}

/* --- the mark --------------------------------------------------------------- */

.st-mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.st-mark svg { width: 28px; height: 28px; flex: none; }
.st-mark b { font-size: 1.08rem; font-weight: 750; letter-spacing: var(--track-heading); }

/* --- header ----------------------------------------------------------------- */

.st-head {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.st-head .st-wrap { display: flex; align-items: center; gap: 24px; }
.st-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
/* :not(.st-btn) matters more than it looks. `.st-nav a` outranks
   `.st-btn-primary` on specificity, so without it the one button in the header
   gets muted link-grey text on a Deep Coastal fill and stops being readable. */
.st-nav a:not(.st-btn) { color: var(--text-soft); text-decoration: none; font-weight: 550; font-size: .96rem; }
.st-nav a:not(.st-btn):hover { color: var(--text); }
@media (max-width: 860px) { .st-nav .st-nav-hide { display: none; } }

/* --- buttons ---------------------------------------------------------------- */

.st-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 650; font-size: .98rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.st-btn:active { transform: translateY(1px); }
.st-btn-primary { background: var(--accent); color: var(--accent-contrast); }
.st-btn-primary:hover { background: var(--accent-hover); }
.st-btn-ghost { border-color: var(--border-strong); color: var(--text); }
.st-btn-ghost:hover { border-color: var(--text-muted); background: var(--surface-2); }

/* Sunrise, on a Deep Coastal panel — the pairing the guidelines lead with.
   Kept to calls to action that sit on the dark hero, so the colour keeps
   meaning "press this" rather than becoming decoration. */
.st-btn-sun { background: var(--brand-sun); color: #ffffff; }
.st-btn-sun:hover { background: #e2792c; }
.st-btn-onsun { border-color: rgba(255,255,255,.34); color: #ffffff; }
.st-btn-onsun:hover { border-color: #ffffff; background: rgba(255,255,255,.1); }

/* --- hero ------------------------------------------------------------------- */

.st-hero {
  position: relative; overflow: hidden;
  margin: 24px auto 0;
  border-radius: var(--radius-lg);
  background: var(--brand-deep);
  color: #ffffff;
  padding: clamp(48px, 8vw, 104px) 0;
}
.st-hero .st-wrap { position: relative; z-index: 1; width: min(1120px, 100% - 80px); }
@media (max-width: 640px) { .st-hero .st-wrap { width: min(1120px, 100% - 40px); } }
.st-hero h1 { max-width: 15ch; }
.st-hero p { max-width: 52ch; color: rgba(255,255,255,.78); margin-top: 20px; }
.st-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.st-hero-note { margin-top: 20px; font-size: .9rem; color: rgba(255,255,255,.55); }

/* The graphic system from the brand book is diagonal bands of Sunrise cutting
   across Deep Coastal. Rendered as one repeating-linear-gradient rather than an
   image so it costs nothing and scales to any hero height. */
.st-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(
    -52deg,
    transparent 0 62px,
    color-mix(in srgb, var(--brand-sun) 62%, transparent) 62px 104px
  );
  mask-image: linear-gradient(to left, #000 0%, transparent 46%);
  -webkit-mask-image: linear-gradient(to left, #000 0%, transparent 46%);
}
@media (max-width: 720px) { .st-hero::after { opacity: .5; } }

/* --- sections --------------------------------------------------------------- */

.st-sec { padding: clamp(56px, 9vw, 108px) 0; }
.st-sec-head { max-width: 62ch; margin-bottom: 44px; }
.st-sec-head .st-h2 { margin-top: 10px; }
.st-sec-head .st-lead { margin-top: 14px; }

/* 300px rather than a smaller floor so a wide screen lands on three columns and
   the six cards fill two even rows. At 248px it fitted four and left a ragged
   pair underneath. */
.st-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.st-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.st-card .st-h3 { margin-bottom: 8px; }
.st-card p { color: var(--text-soft); font-size: .98rem; }

.st-ico {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--accent-soft); color: var(--accent);
}
.st-ico svg { width: 21px; height: 21px; }

/* --- numbered steps --------------------------------------------------------- */

.st-steps { counter-reset: st-step; display: grid; gap: 4px; }
.st-step {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start;
  padding: 24px 0; border-top: 1px solid var(--border);
}
.st-step:last-child { border-bottom: 1px solid var(--border); }
.st-step::before {
  counter-increment: st-step; content: counter(st-step, decimal-leading-zero);
  font-size: 1.5rem; font-weight: 750; color: var(--brand-mist);
  letter-spacing: var(--track-heading);
}
.st-step p { color: var(--text-soft); margin-top: 6px; font-size: .98rem; }

/* --- packs ------------------------------------------------------------------ */

.st-packs { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }

.st-pack {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.st-pack-top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.st-pack-top .st-h3 { margin-right: auto; }
.st-pack p { color: var(--text-soft); font-size: .96rem; flex: 1; }
.st-pack-foot { margin-top: 20px; display: flex; align-items: center; gap: 12px; }

.st-price { font-size: 1.28rem; font-weight: 750; letter-spacing: var(--track-heading); }
.st-price small { font-size: .72rem; font-weight: 550; color: var(--text-muted); margin-left: 4px; }

.st-chip {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
/* Sunrise earns its place here: a paid pack is the one thing on the page the
   eye should find before it reads anything. */
.st-chip-paid { background: color-mix(in srgb, var(--brand-sun) 15%, transparent); color: var(--brand-sun); }

.st-pack-count { font-size: .86rem; color: var(--text-muted); }

/* --- closing call to action -------------------------------------------------- */

.st-cta {
  border-radius: var(--radius-lg);
  background: var(--brand-sun);
  color: var(--brand-deep);
  padding: clamp(44px, 7vw, 76px) 32px;
  text-align: center;
}
.st-cta p { max-width: 48ch; margin: 16px auto 0; color: color-mix(in srgb, var(--brand-deep) 82%, transparent); }
.st-cta .st-hero-cta { justify-content: center; }
.st-btn-oncta { background: var(--brand-deep); color: #ffffff; }
.st-btn-oncta:hover { background: #0d4f50; }

/* --- footer ----------------------------------------------------------------- */

.st-foot {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  margin-top: clamp(56px, 9vw, 108px);
  font-size: .92rem;
  color: var(--text-muted);
}
.st-foot .st-wrap { display: flex; flex-wrap: wrap; gap: 20px 34px; align-items: center; }
.st-foot nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.st-foot a { color: var(--text-soft); text-decoration: none; }
.st-foot a:hover { color: var(--text); text-decoration: underline; }

/* ===========================================================================
   The user guide at /docs
   =========================================================================== */

.st-docs { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .st-docs { grid-template-columns: 1fr; gap: 32px; } }

.st-toc { position: sticky; top: 92px; font-size: .95rem; }
@media (max-width: 900px) {
  .st-toc {
    position: static;
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; background: var(--surface-2);
  }
}
.st-toc h2 { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
             color: var(--text-muted); margin-bottom: 14px; }
.st-toc a { display: block; padding: 7px 0; color: var(--text-soft); text-decoration: none; }
.st-toc a:hover { color: var(--accent); }

.st-doc-sec { padding-bottom: 48px; scroll-margin-top: 96px; }
.st-doc-sec > p { color: var(--text-soft); margin-top: 14px; max-width: 68ch; }
.st-doc-sec .st-h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }

/* Sections whose text is not written yet say so, rather than showing a
   convincing paragraph of nothing. Same rule as the app: no invented content
   where the honest answer is "not yet". */
.st-todo {
  margin-top: 18px; padding: 16px 18px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-2); color: var(--text-muted); font-size: .94rem;
}

/* ===========================================================================
   Borrowed from the first run
   ===========================================================================

   The home page wears the setup wizard's clothes on purpose. Somebody who
   signs up has already used these controls once — the step pips, the kicker,
   the tick tile with its square, the running tally — so the first screen after
   sign-up is a place they have been rather than a new thing to learn.

   These are deliberate copies of css/setup.css rather than shared rules. The
   wizard is 13px and dense because it is showing two hundred tiles; the home
   page is 17px and roomy because it is showing twelve. One set of rules that
   did both would be a set of rules that did neither, and the wizard is the
   thing that has to keep working. When setup.css changes shape, this follows
   it by hand.
   =========================================================================== */

/* --- the step pips ---------------------------------------------------------- */

.st-pips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }

.st-pip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px 7px 11px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  font-size: .8rem; font-weight: 650;
  color: rgba(255,255,255,.6);
}
.st-pip i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.3); }
.st-pip.on {
  color: #ffffff;
  border-color: var(--brand-sun);
  background: color-mix(in srgb, var(--brand-sun) 22%, transparent);
}
.st-pip.on i { background: var(--brand-sun); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-sun) 30%, transparent); }

/* On a light section rather than the hero. */
.st-pips-light .st-pip { border-color: var(--border); color: var(--text-muted); background: var(--surface); }
.st-pips-light .st-pip i { background: var(--border-strong); }
.st-pips-light .st-pip.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.st-pips-light .st-pip.on i { background: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

/* --- the demo: tick what you've got ------------------------------------------ */

.st-demo {
  display: grid; gap: 28px;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 940px) { .st-demo { grid-template-columns: 1fr; } }

.st-demo-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.st-tally {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding: 11px 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius-sm);
  /* Opaque on purpose — --accent-soft is part-transparent after dark, and a
     tally bar you can read the page through is worse than no bar. Same
     reasoning as .sw-count in css/setup.css. */
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  font-size: .92rem; color: var(--text-soft);
}
.st-tally b { color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }

.st-tiles { display: grid; gap: 9px; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }

.st-tile {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit; font-size: .93rem; text-align: left;
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease, color .12s ease;
}
.st-tile:hover { border-color: var(--border-strong); background: var(--surface-2); }

.st-tick {
  display: grid; place-items: center; flex: none;
  width: 23px; height: 23px;
  border: 1.5px solid var(--border-strong);
  border-radius: 7px;
  color: transparent;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.st-tick svg { width: 13px; height: 13px; }

.st-tile[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}
.st-tile[aria-pressed="true"] .st-tick {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

/* --- the demo's answer ------------------------------------------------------- */

.st-match { position: sticky; top: 96px; }
@media (max-width: 940px) { .st-match { position: static; } }

.st-match-list { display: grid; gap: 8px; margin-top: 16px; }

.st-match-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: .93rem;
}
.st-match-row b { margin-right: auto; font-weight: 650; color: var(--text); }
.st-match-row.ready { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.st-match-row.ready b { color: var(--accent); }

.st-match-need { font-size: .82rem; color: var(--text-muted); text-align: right; }
.st-match-row.ready .st-match-need { color: var(--accent); font-weight: 650; }

.st-match-empty {
  margin-top: 16px; padding: 22px 18px;
  border: 1px dashed var(--border-strong); border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-muted); font-size: .93rem; text-align: center;
}

/* --- the four numbers -------------------------------------------------------- */

.st-stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 8px; }
.st-stat {
  padding: 22px 24px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.st-stat b { display: block; font-size: 2.1rem; line-height: 1.05; color: var(--accent);
             font-variant-numeric: tabular-nums; letter-spacing: var(--track-display); }
.st-stat span { display: block; margin-top: 6px; font-size: .92rem; line-height: 1.45; color: var(--text-muted); }

/* --- reveal on scroll -------------------------------------------------------- */

/* The hiding is gated on `.st-js`, which the inline script in <head> adds and
   then takes back off again if site.js hasn't checked in within two seconds.
   Without that gate a blocked or dropped script leaves a page of invisible
   divs — the reveal animation would be the thing that stopped anyone reading
   the site. Same failsafe shape as js/auth-gate.js. */
.st-js .st-reveal { opacity: 0; transform: translateY(14px); }
.st-js .st-reveal.st-in {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,.8,.3,1);
}

/* --- shared: skip link and motion ------------------------------------------- */

.st-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-contrast);
  padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0; z-index: 100;
}
.st-skip:focus { left: 0; }

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