/*
  pair design tokens: the one place to change a colour, size, radius or timing.

  What it does: defines every design token the site uses and the page to
  page view transition.
  It mirrors the app's design tokens (pair-app src/theme/tokens.js); change a
  colour there and here together.

  Who loads it, always first:
    - the home page, /quiz/, /privacy, /terms, /support, /delete-account and
      /waitlist/remove link it directly (then /components.css, then their
      own sheet: /quiz/shell.css or /pages.css or an inline block);
    - /quiz/founder/, /quiz/success/ and /quiz/cancel/ get it through the
      @import in /quiz/quiz.css;
    - /auth/confirm and /auth/reset do not: they use /legal.css.

  Rules: no other file declares a :root block (site-checks/test-quiz-pages.mjs
  fails if one does). Every border-radius is a --r token, every duration a
  --dur token, every font size a --t or --d token.
*/
:root{
  /* ── colour: grounds, lines, ink, the two lights ─────────────────── */
  --bg-0:#070513; --bg-1:#0B0819; --bg-2:#141028; --bg-3:#1B1438; --bg-rear:#241A4D;
  --line-0:#2A2148; --line-1:#3A2F63;
  --line-field:#6F6893;            /* field borders: about 4:1 on the ground */
  --ink-0:#F7F5FF; --ink-1:#B7B0D6; --ink-2:#8B84AE;
  --ink-lead:#D9D4F2;              /* the hero lead, a step brighter than --ink-1 */
  --ink-hint:#9C95BF;              /* placeholder text */
  --ai-0:#A99BFF; --ai-1:#8B7CF6; --ai-deep:#6644E8;
  --warm-0:#FF9E8A; --warm-1:#FF7A63; --warm-2:#FFB4A4;
  --ok:#5DD9A7; --err:#FF7B87;
  --grad-warm:linear-gradient(135deg,#FFB4A2,#FF8C77); /* dark ink on this passes 4.5:1 end to end */
  --grad-score:linear-gradient(120deg,var(--ai-0) 0%,var(--warm-0) 100%);

  /* ── colour: surfaces, borders and glows (alpha steps of the tokens above) ── */
  --glass-1:rgba(247,245,255,.04);
  --glass-2:rgba(247,245,255,.06);
  --glass-3:rgba(247,245,255,.08);
  --glass-4:rgba(247,245,255,.12);
  --hair:rgba(247,245,255,.16);
  --panel:linear-gradient(180deg,rgba(27,20,56,.86),rgba(11,8,25,.76));
  --ai-tint:rgba(139,124,246,.16);
  --ai-line:rgba(169,155,255,.55);
  --ai-glow:rgba(139,124,246,.24);
  --warm-tint:rgba(255,158,138,.10);
  --warm-line:rgba(255,158,138,.45);
  --warm-glow:rgba(255,122,99,.14);
  --ok-tint:rgba(93,217,167,.12); --ok-line:rgba(93,217,167,.4);
  --err-tint:rgba(255,123,135,.12); --err-line:rgba(255,123,135,.5);
  --shadow-card:0 40px 90px rgba(0,0,0,.5);
  --shadow-lift:0 30px 60px rgba(0,0,0,.55),0 8px 18px rgba(0,0,0,.4); /* a card standing off the page */
  --shadow-deep:0 60px 120px rgba(0,0,0,.6),0 18px 36px rgba(0,0,0,.45); /* the front card of a stack */
  --shadow-warm:0 12px 30px rgba(255,106,91,.3);
  --shadow-warm-hi:0 18px 38px rgba(255,106,91,.42);

  /* ── type: the app's pairing (pair-app src/theme/tokens.js): Quicksand for words, JetBrains Mono for data ── */
  --f-display:'Quicksand','Quicksand fallback',-apple-system,system-ui,sans-serif; /* headings: always set at weight 700 */
  --f-sans:'Quicksand','Quicksand fallback',-apple-system,system-ui,sans-serif;
  --f-mono:'JetBrains Mono',ui-monospace,Menlo,monospace;                          /* data moments only: scores, counters, labels */
  /* text scale: small labels, small print, controls, body, lead, card names */
  --t-xs:12px; --t-sm:14px; --t-base:16px; --t-md:17px; --t-lg:clamp(17px,1.6vw,19px); --t-xl:22px;
  /* display scale: small headings, questions, section heads, the big lines, numerals */
  --d-1:clamp(21px,2.2vw,26px);
  --d-2:clamp(26px,3.5vw,39px);
  --d-3:clamp(34px,4.8vw,68px);
  --d-num:clamp(62px,8.6vw,112px);
  /* the home page's scale: each named for where it is used */
  --d-tile:clamp(24px,2.1vw,29px);    /* a small card title */
  --d-q:clamp(28px,3.8vw,54px);       /* a quiz question and the quiz titles */
  --d-deck:clamp(30px,4.2vw,54px);    /* the questions head, the path head */
  --d-row:clamp(28px,5vw,68px);       /* the five rows of what pair is against */
  --d-feat:clamp(40px,6.4vw,96px);    /* a feature name beside the photo frame */
  --d-5:clamp(38px,6.2vw,94px);       /* the big section heads */
  --d-meet:clamp(50px,10.6vw,144px);  /* "Meet your pair." */
  --d-test:clamp(54px,11vw,168px);    /* "Find your type." on the test band */
  --d-hero:clamp(46px,7.6vw,120px);   /* the hero headline */
  --d-hero-fbar:min(var(--d-hero),20svh); /* the hero headline while the founder bar is up, on a short window */
  --d-low:clamp(36px,11svh,64px);     /* the hero headline on a short screen (a phone on its side) */
  --d-giant:clamp(120px,22vw,300px);  /* the score counting up */
  --d-badge:clamp(20px,2vw,26px);     /* a score on a profile card */

  /* ── shape ───────────────────────────────────────────────────────── */
  --r-sm:12px; --r-md:16px; --r-opt:20px; --r-lg:24px; --r-xl:32px; --r-xs:6px; --r-pill:999px; /* --r-opt: a quiz answer row */

  /* ── rhythm ──────────────────────────────────────────────────────── */
  --gutter:clamp(20px,5vw,64px);
  --max:1240px;
  --header-h:68px;
  --tap:44px;                      /* the smallest tap target */
  --control-h:54px;                /* buttons and fields */

  /* ── motion: two curves, a short set of durations ────────────────── */
  --ease:cubic-bezier(.22,1,.36,1);       /* everything that arrives or settles */
  --ease-exit:cubic-bezier(.55,0,.8,.2);  /* something leaving: a card going off the table */
  --dur-press:90ms;                /* a button or option under the finger */
  --dur-fast:150ms;                /* hover in, colour changes */
  --dur-base:250ms;                /* small state changes */
  --dur-slow:500ms;                /* a light stepping, a panel appearing */
  --dur-enter:800ms;               /* the hero entrance, each part */
  --dur-deal:620ms;                /* the quiz: one card dealt, one card leaving */
  --dur-hold:260ms;                /* the quiz: the chosen answer shows before the next card */
  --dur-stagger:45ms;              /* the quiz: answers following their card */
  --dur-word:13ms;                 /* the quiz: each word of a question rising after the one before (ten places at most, so a question lands within --dur-hold plus --dur-deal of the tap) */
  --dur-drift:3600ms;              /* the quiz: one sway of the two lights resting on the ring before the first question */
  --dur-turn:1100ms;               /* the result card turning over, the lights meeting */
  --dur-spin:700ms;                /* one spinner turn */
  --dur-meet:1600ms;               /* the home page: the two lights drifting together at the close */
  --dur-ribbon:46s;                /* the home page: one loop of the line above the stamps */
  --dur-orbit:70s;
  --dur-swap:2600ms;               /* the home page: the test card's letter slots, one turn through both letters */                 /* the home page: one turn of the hero's ring */
}
/* ── the moment before the web fonts arrive ──────────────────────────
   Local stand ins, shaped to Quicksand's measurements (width, ascent and
   descent, measured in the browser), so text does not jump when the real
   font swaps in. No file
   is fetched: local() uses a font already on the device; where it is missing
   the next name in the stack is used, as before. Chrome scales the overrides
   by size-adjust, so each override is the real value divided by it (Quicksand:
   ascent 1, descent .25, about 1.065 of Arial's width, 1.024 in bold). */
@font-face{font-family:'Quicksand fallback';src:local('Arial'),local('ArialMT');font-weight:300 600;size-adjust:106.5%;ascent-override:93.9%;descent-override:23.5%;line-gap-override:0%}
@font-face{font-family:'Quicksand fallback';src:local('Arial Bold'),local('Arial-BoldMT');font-weight:700;size-adjust:102.4%;ascent-override:97.7%;descent-override:24.4%;line-gap-override:0%}

/* phones: a shorter header */
@media(max-width:860px){
  :root{--header-h:56px}
}

/* ── page to page: one continuous surface ────────────────────────────
   Cross document view transitions (progressive enhancement; a browser
   without them simply navigates). The pair logo keeps its place while the
   page beneath it crossfades. Off under reduced motion.
   The crossfade is short (--dur-fast) on purpose (measured 15 Nov 2026 on a
   throttled phone): the new page is held back by its own network round
   trips, with or without the transition, and a long crossfade on top of
   that left two pages overlapping for half a second, so a tap on Terms or
   Privacy felt dead and then slow. Keep it short. */
@media(prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  .site-header .brand,.q-header .brand,.legal .logo,.remove-page .brand{view-transition-name:pair-logo}
  ::view-transition-old(root),::view-transition-new(root){animation-duration:var(--dur-fast);animation-timing-function:var(--ease)}
  ::view-transition-group(pair-logo){animation-duration:var(--dur-fast);animation-timing-function:var(--ease)}
}

/* The ground sits on the root element and the page is declared dark, so a phone browser's own bars (the address bar, the
   status bar) and the area shown when the page is pulled past its end take the site's colour instead of white. Every page
   also carries <meta name="theme-color"> and <meta name="color-scheme" content="dark">. */
html{background:var(--bg-0);color-scheme:dark}
/* tick boxes keep their light, easy to see box on the dark ground (the consent box must be plain to find) */
input[type="checkbox"],input[type="radio"]{color-scheme:light}
