/* Last Call Charging design tokens.
   Two colour versions share one set of variable names. site/js/theme.js sets
   <html data-theme="calm"> or <html data-theme="party">. Calm is also the
   default, so a page still has colours if that script has not run.
   How to use every token: docs/design-brief.md. */

/* ---------- Colour: Calm (mostly white, black type, blue accent) ---------- */
:root,
:root[data-theme="calm"] {
  --bg: #FFFFFF;          /* page background */
  --surface: #F4F6FA;     /* tinted section bands and cards */
  --surface-2: #E9EEF7;   /* a card or field sitting on --surface */
  --ink: #0E0F13;         /* headlines and body text (Night) */
  --muted: #4A5160;       /* secondary text, field borders */
  --line: #E3E7EF;        /* hairlines and dividers (decoration only) */
  --accent: #00A8FF;      /* B9 sky blue (Chris, Nov 15): button and selected fills, progress */
  --accent-ink: #0E0F13;  /* text on --accent: Night, 7.3:1 (white is only 2.6:1) */
  --accent-text: #006FAB; /* deep B9 for blue text, links, borders and focus rings: 5.4:1 on white */
  --accent-2: #D7FF3A;    /* Volt, used sparingly, never as a text colour */
  --danger: #B3261E;      /* form errors */
  --logo-ground: #FFFFFF; /* the only background a logo may sit on */
  color-scheme: light;
}

/* ---------- Colour: Party (Night ground, white type, Volt and blue) ---------- */
:root[data-theme="party"] {
  --bg: #0E0F13;          /* page background (Night, so the logo can sit on it) */
  --surface: #111A33;     /* blue-black section bands and cards */
  --surface-2: #17224A;   /* a card or field sitting on --surface */
  --ink: #FFFFFF;         /* headlines and body text */
  --muted: #A9B3C9;       /* secondary text, field borders */
  --line: #22305A;        /* hairlines and dividers (decoration only) */
  --accent: #D7FF3A;      /* Volt: buttons, selected states, progress */
  --accent-ink: #0E0F13;  /* text on --accent */
  --accent-2: #3D7BFF;    /* blue: small labels and links, on --bg only */
  --accent-text: #D7FF3A; /* Volt: accent text, borders and focus rings on Night */
  --danger: #FF8A80;      /* form errors */
  --logo-ground: #0E0F13; /* the only background a logo may sit on */
  color-scheme: dark;
}

/* ---------- Everything below is the same in both versions ---------- */
:root {
  /* The three brand colours by name, for the few places that must not change
     with the theme (for example Night text on a Volt tag). */
  --night: #0E0F13;
  --volt: #D7FF3A;
  --logo-blue: #00A8FF; /* B9 sky blue: logo tile, bolt and CHARGING (Chris, Nov 15) */
  --white: #FFFFFF;

  /* Type. The fallback faces are defined in base.css. */
  --font: 'Barlow Condensed', 'LCC Fallback', 'Arial Narrow', sans-serif;

  /* Type scale. Each size grows in a straight line from a 390 px wide screen
     (first value) to a 1280 px wide screen (last value). */
  --fs-display: clamp(4rem, 2.247rem + 7.191vw, 8rem);        /* 64 to 128 px: hero headline */
  --fs-h2: clamp(2.75rem, 1.983rem + 3.146vw, 4.5rem);        /* 44 to 72 px: section headline */
  --fs-h3: clamp(2.25rem, 1.702rem + 2.247vw, 3.5rem);        /* 36 to 56 px: funnel question */
  --fs-title: clamp(1.75rem, 1.64rem + 0.449vw, 2rem);        /* 28 to 32 px: card title */
  --fs-lead: clamp(1.375rem, 1.265rem + 0.449vw, 1.625rem);   /* 22 to 26 px: intro line */
  --fs-body: clamp(1.1875rem, 1.16rem + 0.112vw, 1.25rem);    /* 19 to 20 px: body text */
  --fs-small: 1rem;                                           /* 16 px: consent, footer, hints */
  --fs-label: clamp(0.875rem, 0.82rem + 0.225vw, 1rem);       /* 14 to 16 px: labels */
  --fs-button: 1.25rem;                                       /* 20 px: button text */

  --lh-display: 0.88;
  --lh-heading: 0.95;
  --lh-title: 1;
  --lh-lead: 1.35;
  --lh-body: 1.45;
  --lh-label: 1.2;

  --ls-label: 0.16em;   /* labels: wide */
  --ls-button: 0.08em;  /* buttons and chips */

  /* Spacing scale (px): 4 8 12 16 24 32 48 64 96 128 */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  --gutter: clamp(1.25rem, 0.483rem + 3.146vw, 3rem);     /* 20 to 48 px: page side padding */
  --section-pad: clamp(4rem, 2.247rem + 7.191vw, 8rem);   /* 64 to 128 px: section top and bottom */

  /* Widths */
  --w-page: 70rem;    /* 1120 px: widest content */
  --w-text: 35rem;    /* 560 px: longest line of body text */
  --w-funnel: 35rem;  /* 560 px: funnel column */

  /* Radii */
  --r-sm: 0.5rem;     /* 8 px: chips, tags */
  --r-md: 0.875rem;   /* 14 px: fields, answer cards */
  --r-lg: 1.5rem;     /* 24 px: panels */
  --r-pill: 62.5rem;  /* buttons */

  /* Sizes */
  --tap: 3.5rem;        /* 56 px: buttons, fields, answer cards (minimum height) */
  --header-h: 5rem;     /* 80 px: header bar */
  --logo-header: 2.5rem;  /* 40 px: logo tile in the header (20 px clear space) */
  --logo-footer: 3rem;    /* 48 px: logo tile in the footer */
  --logo-hero: clamp(7.5rem, 5.309rem + 8.989vw, 12.5rem); /* 120 to 200 px: hero logo tile */

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);       /* things arriving */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);    /* things moving across */
  --ease-snap: cubic-bezier(0.34, 1.4, 0.64, 1);    /* small pop on chips */
  --t-press: 120ms;   /* button press */
  --t-chip: 150ms;    /* chip and answer card select */
  --t-screen: 220ms;  /* funnel screen change, progress bar */
  --t-hero-tilt: 520ms;
  --t-hero-step: 200ms;
}
