/*
 * thanku.tech tokens. Every colour, size and duration the site uses is here; styles.css
 * only reads these variables. The overlay values come from docs/DESIGN.md section 4 and
 * app/tailwind.config.js (`overlay`, `accent`, `danger`); the icon colours from
 * app/resources/icon/source/app-icon.svg.
 */
:root {
  color-scheme: dark;

  /* Page: darker than the overlay surface, so the drawn overlay sits on it. */
  --page: #08090b;
  --page-raised: #0e0f12;
  --page-band: #111216;

  /* The overlay's colours (docs/DESIGN.md section 4). */
  --ov-surface: rgba(16, 17, 20, 0.72);
  --ov-band-input: rgba(255, 255, 255, 0.14);
  --ov-band-toolbar: rgba(0, 0, 0, 0.16);
  --ov-bubble: rgba(255, 255, 255, 0.13);
  --ov-fill-hover: rgba(255, 255, 255, 0.09);
  --ov-fill-active: rgba(255, 255, 255, 0.15);
  --ov-hairline: rgba(255, 255, 255, 0.08);
  --ov-text: rgba(255, 255, 255, 0.92);
  --ov-text-2: rgba(255, 255, 255, 0.72);
  --ov-text-3: rgba(255, 255, 255, 0.52);
  --ov-text-4: rgba(255, 255, 255, 0.36);

  /* Text levels on the page: the overlay's four text tokens. */
  --text: var(--ov-text);
  --text-2: var(--ov-text-2);
  --text-3: var(--ov-text-3);
  --text-4: var(--ov-text-4);
  --hairline: var(--ov-hairline);
  --fill-hover: var(--ov-fill-hover);
  --fill-active: var(--ov-fill-active);

  /* Accent (app/tailwind.config.js `accent`). The call to action is filled with a deeper
     step of it so its white label keeps 4.5:1. */
  --accent: #0090ff;
  --accent-soft: rgba(0, 144, 255, 0.18);
  --accent-ring: rgba(0, 144, 255, 0.35);
  --accent-fill: #0070dc;
  --accent-fill-hover: #0067cc;
  --accent-fill-active: #005cb8;
  --on-accent: #ffffff;
  --danger: #ef4444;

  /* The app icon's gradient, for the wordmark. */
  --icon-from: #6d8bff;
  --icon-to: #4a5cf0;
  --icon-mark: #ffffff;

  /* A glow behind the drawn overlay. */
  --glow: rgba(74, 92, 240, 0.22);
  --shadow-overlay: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);

  /* Type: the system stack, weights 400, 500 and 600 only. */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --w-regular: 400;
  --w-medium: 500;
  --w-semibold: 600;

  --hero-size: 56px;
  --hero-line: 60px;
  --h2-size: 32px;
  --h2-line: 38px;
  --lead-size: 19px;
  --lead-line: 30px;
  --body-size: 17px;
  --body-line: 28px;
  --small-size: 14px;
  --small-line: 22px;
  --tracking-tight: -0.02em;

  /* Spacing: the 4 px scale. */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-24: 96px;
  --section-gap: 96px;
  --gutter: 24px;

  /* Widths. */
  --content: 1120px;
  --measure: 600px;
  --measure-wide: 720px;
  --header-h: 64px;

  /* Radii. */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;
  --line: 1px;
  --focus-w: 2px;
  --focus-gap: 3px;
  --mark-size: 28px;
  --step-badge: 28px;

  /*
   * The drawn overlay is laid out in the app's own pixel sizes (docs/DESIGN.md sections 2
   * to 4), as unitless numbers, and multiplied by --ov-u in styles.css so that it scales
   * down with its column instead of being cut off.
   */
  --unit: 1px;
  --ov-width: 690;
  --ov-input-h: 56;
  --ov-toolbar-h: 48;
  --ov-control: 40;
  --ov-send: 32;
  --ov-pad: 12;
  --ov-gap-1: 4;
  --ov-gap-2: 8;
  --ov-gap-3: 12;
  --ov-gap-4: 16;
  --ov-r-sm: 6;
  --ov-r-md: 8;
  --ov-r-lg: 12;
  --ov-r-xl: 16;
  --ov-r-tail: 6;
  --ov-caption: 11;
  --ov-caption-line: 14;
  --ov-label: 12;
  --ov-label-line: 16;
  --ov-ui: 13;
  --ov-ui-line: 20;
  --ov-body: 14;
  --ov-body-line: 24;
  --ov-input: 15;
  --ov-input-line: 20;
  --ov-icon: 18;
  --ov-dot: 8;
  --ov-blur: 12;
  --ov-bubble-max: 78%;
  --ov-content-h: 196;
  --ov-heard-gap: 12;

  /* Motion: transform and opacity only, off under reduced motion. */
  --t-fast: 120ms;
  --t-rise: 520ms;
  --t-line: 360ms;
  --rise-from: 12px;
  --line-from: 6px;
  --press-scale: 0.98;
  --line-delay-1: 700ms;
  --line-delay-2: 1000ms;
  --line-delay-3: 1300ms;
  --line-delay-4: 1600ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Smaller screens: 768 px and up to 1199 px. */
@media (max-width: 1199px) {
  :root {
    --hero-size: 40px;
    --hero-line: 44px;
  }
}

/* Phones: under 480 px. */
@media (max-width: 479px) {
  :root {
    --hero-size: 32px;
    --hero-line: 38px;
    --h2-size: 24px;
    --h2-line: 30px;
    --lead-size: 17px;
    --lead-line: 28px;
    --section-gap: 64px;
    --gutter: 16px;
    /* The drawn overlay is drawn narrower on phones, with fewer toolbar controls, so its
       text stays readable when scaled to the column. */
    --ov-width: 460;
  }
}
