/* Refresh — company-facing landing page.
 *
 * Tokens are lifted verbatim from source_code/apps/aesthetic_board/design/tokens.css
 * so the page and the product cannot drift. If a value here disagrees with that
 * file, that file wins.
 *
 * REGISTER NOTE. DESIGN.md governs every screen in the APP and bans page-load
 * choreography, because a dermatologist glancing between patients should not wait
 * for anything to finish moving. This page is the brand register, where the job is
 * to carry an argument to a stranger, so scroll-triggered reveals are allowed.
 * What is NOT allowed, here or anywhere: motion that teaches nothing, which is
 * why the only moving thing on this page is a short fade-and-rise as sections
 * arrive. The product is shown in screenshots, not animated into being.
 *
 * THE ORGANIZING RULE STILL APPLIES: board ink marks board attention only. It is
 * never used to make something look nice.
 */

:root {
  --bg-page:   #F6F4EE;
  --bg-sheet:  #FDFCF9;
  --bg-well:   #EFEDE4;
  --ground-label:    #F3F3F1;
  --ground-practice: #FAF5E9;

  --ink:   #1D1C16;
  --ink-2: #494740;
  --ink-3: #6F6C61;
  --ink-4: #9C988B;

  --line-1: #E5E2D8;
  --line-2: #D3CFC1;

  --board:      #1F5F4E;
  --board-down: #164437;
  --board-tint: #E3EFE8;
  --board-line: #BFDACC;

  /* Pend amber means "in the queue", calm, never a warning. The boards are
   * being seated, which is exactly what this semantic is for. */
  --pend:      #8A6200;
  --pend-dot:  #C98F1B;
  --pend-tint: #F6EDD6;
  --pend-line: #E6D6A6;

  --font-sans:  "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 1rem;
  --measure: 62ch;
}

/* Dark is a supported reading-room preference, never the canonical one. Guarded
 * so an explicit light choice wins, per the theming rule in DESIGN.md. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-page:  #161510;
    --bg-sheet: #1F1E18;
    --bg-well:  #12110D;
    --ground-label:    #1B1B19;
    --ground-practice: #201D15;
    --ink:   #ECE9DD;
    --ink-2: #B9B5A8;
    --ink-3: #8A8579;
    --ink-4: #6B675C;
    --line-1: #34322A;
    --line-2: #423F35;
    --board:      #82C7B1;
    --board-down: #A4D9C7;
    --board-tint: #17302A;
    --board-line: #2D5147;
    --pend:      #D9A93C;
    --pend-tint: #2A2416;
    --pend-line: #4A3E22;
  }
}
:root[data-theme="dark"] {
  --bg-page:  #161510;
  --bg-sheet: #1F1E18;
  --bg-well:  #12110D;
  --ground-label:    #1B1B19;
  --ground-practice: #201D15;
  --ink:   #ECE9DD;
  --ink-2: #B9B5A8;
  --ink-3: #8A8579;
  --ink-4: #6B675C;
  --line-1: #34322A;
  --line-2: #423F35;
  --board:      #82C7B1;
  --board-down: #A4D9C7;
  --board-tint: #17302A;
  --board-line: #2D5147;
  --pend:      #D9A93C;
  --pend-tint: #2A2416;
  --pend-line: #4A3E22;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  font-synthesis-weight: none;
}

.wrap { max-width: 68rem; margin: 0 auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: 46rem; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--bg-sheet);
  padding: 0.6rem 1rem; z-index: 50;
}
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--board); outline-offset: 3px; border-radius: 2px; }

/* ── type ────────────────────────────────────────────────────── */

.caps {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.75rem;
}

h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 6.2vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.016em;
  margin: 0 0 1.25rem;
  max-width: 16ch;
}

.h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.014em;
  margin: 0 0 1.5rem;
  max-width: 24ch;
}

h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: 0 0 0.6rem;
}

.dek, .prose {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: var(--measure);
  margin: 0 0 1.1rem;
}
.dek { font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); max-width: 54ch; }

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

.cite {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.6;
  color: var(--ink-4);
  margin: 0;
}
.cite a { color: var(--ink-3); }

.board-ink { color: var(--board); }

a { color: var(--board); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ── buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 1.15rem;
  background: var(--ink); color: var(--bg-sheet);
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600;
  text-decoration: none; border-radius: 6px;
  transition: background 120ms var(--ease), transform 120ms var(--ease);
}
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 36px; font-size: 0.8125rem; padding: 0 0.85rem; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--bg-well); }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.75rem 0 0; }

/* ── header ──────────────────────────────────────────────────── */

.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg-page) 92%, transparent);
  border-bottom: 1px solid var(--line-1);
  backdrop-filter: saturate(1.1);
}
.top-in { display: flex; align-items: center; gap: 0.75rem; min-height: 56px; }
.mark {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 1.0625rem; letter-spacing: -0.012em;
}
.mark-sub {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-4);
  padding-left: 0.75rem; border-left: 1px solid var(--line-2);
}
.top .btn { margin-left: auto; }

/* ── hero ────────────────────────────────────────────────────── */

.hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(3rem, 6vw, 4.5rem); }

/* Hero. Two columns on desktop: the argument on the left, the actual product on
 * the right. v1 put nothing there and left a third of the page empty, which
 * Nikhil correctly called terrible. A landing page for a product that EXISTS
 * should show the product above the fold, which is also what the playbook says
 * the hero shot is for. */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
.hero-text { min-width: 0; }
.hero-shot { display: flex; justify-content: flex-start; }

/* A phone, drawn rather than composited: a rounded border and a hairline, no
 * glass, no drop shadow stack, no device chrome PNG to download. */
.phone {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 26px;
  border: 1px solid var(--line-2);
  background: var(--bg-sheet);
}

@media (min-width: 54rem) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .hero-shot { justify-content: center; }
  .phone { max-width: 300px; }
}

/* ── what you get ────────────────────────────────────────────── */

.gets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 2.5rem;
}
.get {
  padding: clamp(1.5rem, 3.5vw, 2rem) 0;
  border-top: 1px solid var(--line-1);
}
.get:last-child { border-bottom: 1px solid var(--line-1); }
.get p {
  font-family: var(--font-serif);
  font-size: 1.0625rem; line-height: 1.6;
  color: var(--ink-2);
  max-width: 54ch;
  margin: 0 0 0.75rem;
}
.instead {
  font-family: var(--font-sans) !important;
  font-size: 0.8125rem !important;
  line-height: 1.55 !important;
  color: var(--ink-3) !important;
  margin: 0 !important;
}

@media (min-width: 54rem) {
  .gets { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .get:nth-child(2) { border-top: 1px solid var(--line-1); }
  .get:nth-last-child(2) { border-bottom: 1px solid var(--line-1); }
}

/* ── app gallery ─────────────────────────────────────────────── */

.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 3.5rem);
  margin-top: 2.5rem;
}
.shot { margin: 0; display: grid; gap: 1.25rem; align-content: start; }
.shot figcaption h3 { margin-bottom: 0.4rem; }
.shot figcaption p {
  font-family: var(--font-serif);
  font-size: 1rem; line-height: 1.6;
  color: var(--ink-2);
  max-width: 44ch;
  margin: 0;
}

@media (min-width: 40rem) {
  .shots { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 62rem) {
  .shots { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .shot .phone { max-width: 100%; }
}

/* ── bands and sections ──────────────────────────────────────── */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.band { background: var(--bg-sheet); border-block: 1px solid var(--line-1); }
.band.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

/* ── ledger ──────────────────────────────────────────────────── */

.ledger { list-style: none; margin: 2rem 0; padding: 0; }
.ledger li {
  font-family: var(--font-serif);
  font-size: 1.0625rem; line-height: 1.55;
  color: var(--ink-2);
  padding: 1rem 0;
  border-top: 1px solid var(--line-1);
  max-width: var(--measure);
}
.ledger li:last-child { border-bottom: 1px solid var(--line-1); }
.ledger .caps { display: block; margin-bottom: 0.25rem; }

/* ── steps ───────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 2.5rem;
}
.step { padding-top: 1rem; border-top: 1px solid var(--line-2); }
.step-n {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-4); margin: 0 0 0.75rem;
}
.step p:not(.step-n) {
  font-family: var(--font-serif); font-size: 1rem; line-height: 1.6;
  color: var(--ink-2); margin: 0;
}
@media (min-width: 52rem) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

/* ── stage note ──────────────────────────────────────────────── */

.stage {
  /* Pend, not board. The boards are in the queue, not seated, and the amber
   * semantic says precisely that without reading as a warning. */
  background: var(--pend-tint);
  border: 1px solid var(--pend-line);
  border-radius: 10px;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.stage .caps { color: var(--pend); }
.stage .prose:last-child { margin-bottom: 0; }

/* ── closing + footer ────────────────────────────────────────── */

.closing { border-top: 1px solid var(--line-1); }
.closing .cite { margin-top: 1rem; }

.foot {
  background: var(--bg-well);
  border-top: 1px solid var(--line-1);
  padding: 2.5rem 0 3.5rem;
}
.foot .cite { max-width: 62ch; margin-bottom: 0.75rem; }

/* ── reveals ─────────────────────────────────────────────────── */

/* A page that is blank when JavaScript fails is a page that loses the visitor
 * with no error and no clue. <html> ships with .no-js and reveal.js removes it,
 * so if that file 404s or is blocked, everything renders in its finished state. */
.no-js .reveal { opacity: 1; transform: none; }

.reveal { opacity: 0; transform: translateY(12px); }
.reveal.in {
  animation: reveal 420ms var(--ease) forwards;
}
.reveal.d1.in { animation-delay: 70ms; }
.reveal.d2.in { animation-delay: 140ms; }
.reveal.d3.in { animation-delay: 210ms; }
.reveal.d4.in { animation-delay: 280ms; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* Nothing on this page needs motion to be legible. Anyone who asks for less gets
 * the finished state immediately, including the staggered hero list. */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; animation: none; }
  .btn { transition: none; }
}
