:root {
  /* ============ resting: the house's ivory ============ */
  /* Ivory is the paper ground named in both brand docs; the house rests on the same
     paper its brands print on. */
  --color-canvas: #F7F1E4;
  --color-text: #1A1512;
  --color-text-dim: #5C4A40;
  --color-border: #DCCFB4;
  --color-control: #6E5A4A;
  /* Maroon velvet carries links and focus; it is a documented brand colour and clears
     text contrast on ivory. */
  --color-accent: #3B0A10;
  /* Antique gold measures 2.76:1 on ivory — ornament only, never type. */
  --color-ornament: #B98A3C;

  /* ---- accessibility settings (WCAG 1.4.1, 1.4.4, 1.4.6, 2.2.2) ---- */
  --color-text-hc: #000000;
  --color-text-dim-hc: #1E1712;
  --color-control-hc: #2B2119;
  --color-border-hc: #2B2119;
  --color-play-hc: #FFFFFF;
  --color-scrim-strong: rgba(20, 17, 15, 0.6);

  /* ---- the dot field: a paper texture, not a decoration on top of one ---- */
  --color-dots: rgba(59, 10, 16, 0.22);
  --color-dot-pulse: rgba(185, 138, 60, 0.42);
  --color-dot-lens: rgba(59, 10, 16, 0.46);
  --color-mask: #000000;
  --dot-r: 1px;
  --dot-r-lens: 2.5px;
  --dot-pitch: 22px;
  --lens-r: 230px;
  --pulse: 5200ms;

  /* ---- type: the stack both brand docs share ---- */
  --font-display: "Marcellus", Georgia, "Times New Roman", serif;
  --font-text: "Karla", ui-sans-serif, system-ui, sans-serif;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 17px;
  --text-lg: 21px;
  --text-xl: 30px;
  --text-2xl: 44px;

  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-body: 1.6;
  --tracking-wide: 0.16em;

  /* ---- space: 4px grid ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  --radius: 0px;
  --rule: 1px;
  --tap: 44px;
  --measure: 40ch;

  /* ---- the fixed stage: viewport-derived, so the page never scrolls ---- */
  --sticker: clamp(40px, min(13vw, 9dvh), 96px);
  --step: calc(var(--sticker) + var(--space-6));
  --deck-scale: 0.6;
  --deck-step: calc(var(--sticker) * 0.34);
  --hero-scale: 1.5;
  --logo-w: min(46vw, 30dvh, 440px);
  --logo-h: calc(var(--logo-w) * 0.606);
  --base-h: clamp(52px, 8dvh, 72px);
  --band-cy: calc(100dvh - var(--base-h) - var(--space-5) - var(--sticker) / 2);
  --hero-cx: 26vw;
  --hero-cy: 50dvh;
  --watermark: min(38dvh, 320px);

  /* ---- motion ---- */
  --motion-fast: 140ms;
  --motion-base: 240ms;
  --motion-slow: 420ms;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0.06, 0.68, 0.19);
  --ease-in-out: cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

/* ============ per-brand playing palettes ============
   lovemadisar and tamboolamsarees come from docs/brand-languages/*.md in
   ../storivo-marketing. The other three are derived from each brand's own logo, because no
   brand doc exists for them — see VOICE.md.
   Each scrim alpha is the smallest that clears 4.5:1 for that brand's text over a
   pure-white video pixel, plus a margin; --play-composite is that worst case. */
body[data-brand="lovemadisar"] {
  --play-ground: #3B0A10;
  --play-text: #F7F1E4;
  --play-accent: #B98A3C;
  --play-scrim: rgba(59, 10, 16, 0.68);
  --play-composite: #7A585C;
}

body[data-brand="tamboolamsarees"] {
  --play-ground: #2B0A2E;
  --play-text: #F7F1E4;
  --play-accent: #B98A3C;
  --play-scrim: rgba(43, 10, 46, 0.68);
  --play-composite: #6F5871;
}

body[data-brand="pattukuttypavadai"] {
  --play-ground: #301860;
  --play-text: #FFFFFF;
  --play-accent: #FFFFFF;
  --play-scrim: rgba(48, 24, 96, 0.68);
  --play-composite: #726293;
}

body[data-brand="tamarai"] {
  --play-ground: #901860;
  --play-text: #FFF7F2;
  --play-accent: #D8F0F0;
  --play-scrim: rgba(144, 24, 96, 0.8);
  --play-composite: #A64680;
}

body[data-brand="hakinaki"] {
  --play-ground: #343121;
  --play-text: #FCEBCD;
  --play-accent: #8FA176;
  --play-scrim: rgba(52, 49, 33, 0.77);
  --play-composite: #636054;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0ms;
    --motion-base: 0ms;
    --motion-slow: 0ms;
  }
}
