/* waveidea.ai design tokens: the one source for the homepage, /waitlist and
   the 404 page. The legal pages keep css/tokens.css; never mix the two.
   Sources: .cursorrules § Brand & Design (colours, gradient, faces), the
   app's DESIGN.md (card corners, the brand pill glow) and the landing's own
   DESIGN.md (the lyric sheet: scales, print, motion). */

/* ------------------------------------------------------------------------
   The launch switch. Three states; set the five lines below to one of them
   (and change nothing else) and every page follows (site.css § The action).

   Before launch: the waitlist everywhere.
     contents  contents  none      none      none
   Google Play only: its badge, and the waitlist for iPhone.
     contents  none      contents  contents  none
   Both stores (launch day): both badges, no waitlist.
     none      none      contents  none      contents

   Each value is the display of one class: .launch-waitlist (the forms, until
   the App Store has the app), .launch-before (words true only while no store
   has it), .launch-stores ("Get the app", once a store has it),
   .launch-play-only (the Google Play badge with the line for iPhone above
   each form, and words true only while Google Play has the app and the App
   Store does not), .launch-both (both badges, and words true once both
   stores have it). Today: Google Play only.
   ------------------------------------------------------------------------ */
:root {
  --launch-waitlist: contents;
  --launch-before: none;
  --launch-stores: contents;
  --launch-play-only: contents;
  --launch-both: none;
}

/* ---- Söhne, self-hosted (the only licensed faces) ---------------------- */
@font-face { font-family: "Söhne"; src: url("/fonts/soehne-buch.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Söhne"; src: url("/fonts/soehne-kraftig.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Söhne"; src: url("/fonts/soehne-halbfett.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* Fallbacks with Söhne's metrics, so the swap moves nothing. Söhne: 1000
   units per em, ascent 1171, descent 423, no line gap (all three weights).
   size-adjust is Söhne's width over the fallback's for the page's own copy,
   measured in Chrome with canvas measureText; Arial covers Windows, macOS and iOS.
   The Roboto values (Android) are estimated from Arial's and still to be
   checked on a device. */
@font-face { font-family: "Söhne Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 400; size-adjust: 98.8%; ascent-override: 118.5%; descent-override: 42.8%; line-gap-override: 0%; }
@font-face { font-family: "Söhne Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 500; size-adjust: 98.05%; ascent-override: 119.4%; descent-override: 43.1%; line-gap-override: 0%; }
@font-face { font-family: "Söhne Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600; size-adjust: 93.17%; ascent-override: 125.7%; descent-override: 45.4%; line-gap-override: 0%; }
@font-face { font-family: "Söhne Fallback Android"; src: local("Roboto"), local("Roboto-Regular"); font-weight: 400; size-adjust: 98%; ascent-override: 119.5%; descent-override: 43.2%; line-gap-override: 0%; }
@font-face { font-family: "Söhne Fallback Android"; src: local("Roboto Medium"), local("Roboto-Medium"); font-weight: 500; size-adjust: 97.3%; ascent-override: 120.3%; descent-override: 43.5%; line-gap-override: 0%; }
@font-face { font-family: "Söhne Fallback Android"; src: local("Roboto Bold"), local("Roboto-Bold"); font-weight: 600; size-adjust: 96.6%; ascent-override: 121.2%; descent-override: 43.8%; line-gap-override: 0%; }

:root {
  /* ---- Colour roles (.cursorrules § Brand & Design) -------------------- */
  --paper: #ffffff;                  /* AppColors.white: the page, the printed panels */
  --ink: #02001b;                    /* AppColors.deepNight: all primary text */
  --ink-muted: rgb(2 0 27 / 0.6);    /* mutedInk: 5.61 : 1 on paper; never below 0.55 */
  --pen: #8252c6;                    /* AppColors.vividPurple: the edit's marks, focus, kept words */
  --soft-blue: #5b7a8c;              /* AppColors.softBlue: an unselected pill's hover edge, and every edge under prefers-contrast: more (4.56 : 1) */
  --surface-light: #f4f6fa;          /* AppColors.surfaceLight: first-paint ground, inlays */
  --surface-mid: #e2e5ec;            /* AppColors.surfaceMid: field and pill borders */
  --error-ink: #d0343a;              /* AppPalette.errorInk (approved for the app 2026-10-27): 4.96 : 1 */
  --grad-start: #8252c6;
  --grad-end: #6ca9cb;
  --grad: linear-gradient(180deg, var(--grad-start) 0%, var(--grad-end) 100%); /* AppColors.brandGradient: actions only */
  --on-action: #ffffff;              /* AppColors.white as the foreground on the gradient and on ink actions */

  /* The lyric sheet: print, rules and draft paper. */
  --print-sung: #d3c2eb;             /* a sung word of the hero's print: the pen at 35 % on white; muted ink keeps 4.7 : 1 over it and ink 12.5 : 1, so the print may lie behind any text */
  --print: #eee7f7;                  /* the chorus printed huge: the pen's purple at 14 % on white (9 % read as a ghost to every juror), opaque so overlapping glyphs don't darken */
  --rule: var(--surface-mid);        /* hairline print rules between sections, rows and columns */
  --draft: var(--surface-light);     /* the voice note's draft paper */
  --draft-rule: #dde2ec;             /* its ruled lines: Surface Mid a step deeper, so they read on Surface Light */

  /* ---- Type (Söhne Buch 400, Kräftig 500, Halbfett 600) ----------------- */
  --font: "Söhne", "Söhne Fallback", "Söhne Fallback Android", system-ui, -apple-system, "Segoe UI",
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Apple SD Gothic Neo", "Malgun Gothic",
    "PingFang TC", "PingFang SC", "Microsoft JhengHei", "Microsoft YaHei", "Noto Sans CJK JP",
    "Kohinoor Devanagari", "Nirmala UI", "Noto Sans Devanagari", sans-serif;
  /* Fluid sizes exact at 390 px and 1440 px wide; the rem term keeps text
     growing under browser zoom (a vw-only size would shrink). */
  --text-h1: clamp(2.625rem, 1.557rem + 4.381vw, 5.5rem);    /* 42 → 88 px */
  --text-h2: clamp(2rem, 1.45rem + 2.1vw, 3.25rem);          /* 32 → 52 px (60 until phase 4: too close to the h1 for hierarchy by scale) */
  --text-h3: clamp(1.25rem, 1.111rem + 0.571vw, 1.625rem);   /* 20 → 26 px */
  --text-lead: clamp(1.0625rem, 0.993rem + 0.286vw, 1.25rem); /* 17 → 20 px */
  --text-body: clamp(1rem, 0.954rem + 0.19vw, 1.125rem);     /* 16 → 18 px */
  --text-lyric: clamp(1.125rem, 0.939rem + 0.762vw, 1.625rem); /* 18 → 26 px */
  --text-said: clamp(0.9375rem, 0.845rem + 0.381vw, 1.1875rem); /* 15 → 19 px */
  --text-action: 1.5rem;                                   /* 24 px: large text on the gradient */
  --text-label: 0.9375rem;                                 /* 15 px */
  --text-small: 0.875rem;                                  /* 14 px */
  --text-fine: 0.8125rem;                                  /* 13 px */
  --leading-display: 1;
  --leading-heading: 1.02;
  --leading-lyric: 1.15;
  --leading-body: 1.45;
  --track-display: -0.035em;
  --track-heading: -0.03em;
  --track-lyric: -0.015em;
  --measure: 34ch;
  --measure-wide: 62ch;

  /* ---- Space, radii, layers -------------------------------------------- */
  --space-1: 4px;  --space-2: 6px;  --space-3: 8px;  --space-4: 10px;  --space-5: 12px;
  --space-6: 16px; --space-7: 20px; --space-8: 24px; --space-9: 32px;  --space-10: 40px;
  --space-11: 56px; --space-12: 72px; --space-13: 96px; --space-14: 128px;
  --gutter: clamp(16px, 5vw, 96px);
  --content: 1296px;                 /* the text column at 1440 (1440 − 2 × 72) */
  --section-gap: clamp(72px, 9vw, 128px);
  --header-h: 72px;
  --radius-card: 14px;               /* DESIGN.md card corners */
  --radius-cover: 12px;
  --radius-print: 4px;               /* a printed panel: near-square, ruled, not a UI card */
  --radius-pill: 999px;
  --z-print: 0;
  --z-content: 1;
  --z-header: 5;
  --z-skip: 10;
  /* Breakpoint (in media queries, which can't read variables): 900px is
     where the phone composition becomes the desktop one. */

  /* ---- Depth: flat paper; only objects (covers) and the action lift ------- */
  --shadow-cover: 0 18px 30px -16px rgb(2 0 27 / 0.3);
  --shadow-lift: 0 10px 24px -12px rgb(2 0 27 / 0.24);
  --shadow-action: 0 8px 18px rgb(130 82 198 / 0.28), 0 2px 6px rgb(130 82 198 / 0.14); /* DESIGN.md brand pill glow */

  /* ---- Motion: one easing vocabulary, one duration scale ---------------- */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);        /* every enter and press */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);    /* on-screen moves */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);     /* sheets */
  --ease-color: ease;                                /* hover, colour and opacity states */
  --ease-linear: linear;                             /* narrative fades, and between dense physics keyframes */
  /* Interface (Emil's rules: under 300 ms). Nothing a key starts animates:
     focus rings, the skip link and tab switches are instant. */
  --dur-press: 140ms;
  --dur-ui-1: 120ms;
  --dur-ui-2: 160ms;
  --dur-ui-3: 200ms;
  --dur-ui-4: 240ms;
  /* Narrative motion. A fade that accompanies a move runs linear
     at two thirds of the move: --dur-n-1 lands in 280 ms and fades in 185 ms. */
  --dur-n-1: 280ms;
  --dur-n-2: 320ms;
  --dur-n-3: 600ms;
  --dur-n-4: 1000ms;
  --dur-n-5: 1100ms;
}

/* Phones (the phone composition, below 900 px): a shorter header. */
@media (max-width: 899px) {
  :root { --header-h: 60px; }
}
