/* ==========================================================================
   ALGORHYTHMIC — design tokens
   Source of truth: "Encoding animation color pallet.pdf"
   Two primaries (Ember, Signal) on a deep night background.
   ========================================================================== */

/* Non-Latin scripts (Hindi / Thai / Arabic). Loaded only when their glyphs
   appear, via unicode-range. Latin keeps Sora/Geist. */
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("/fonts/noto-sans-devanagari.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF;
}
@font-face {
  font-family: "Noto Sans Thai";
  src: url("/fonts/noto-sans-thai.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Noto Sans Arabic";
  src: url("/fonts/noto-sans-arabic.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-var.woff2") format("woff2-variations"), url("../fonts/sora-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-var.woff2") format("woff2-variations"), url("../fonts/geist-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-var.woff2") format("woff2-variations"), url("../fonts/geist-mono-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* ---- Primaries ---- */
  --ember: #E22A3E;
  --signal: #E22A3E;
  --grad-signature: linear-gradient(90deg, #E22A3E 0%, #F2EBE7 28%, #FFFFFF 50%, #FFC4CA 72%, #E22A3E 100%);
  --grad-signature-v: linear-gradient(180deg, #E22A3E 0%, #F2EBE7 28%, #FFFFFF 50%, #FFC4CA 72%, #E22A3E 100%);

  /* ---- Ember ramp ---- */
  --ember-50: #FFF3EF;  --ember-100: #FFE0E3; --ember-200: #F2EBE7; --ember-300: #FFC2AA;
  --ember-400: #FFB09A; --ember-500: #FF7784; --ember-600: #FF8A70; --ember-700: #FF7A5A;
  --ember-800: #E22A3E; --ember-900: #7A4448; --ember-950: #3E1E28; --ember-990: #1C0C14;

  /* ---- Signal ramp ---- */
  --signal-50: #F2F0FF;  --signal-100: #DFE4FF; --signal-200: #FFC4CA; --signal-300: #AEB6F4;
  --signal-400: #FF7784; --signal-500: #F0313F; --signal-600: #5A6CFF; --signal-700: #E22A3E;
  --signal-800: #406EFF; --signal-900: #262A64; --signal-950: #16183C; --signal-990: #0C0D28;

  /* ---- Violet bridge ---- */
  --mist: #B9B4E8; --lilac: #8F7AE0; --periwinkle: #7C7CF4; --iris: #6F67E8; --plum: #2A1530; --dusk: #1A1030;

  /* ---- Night ---- */
  --night-base: #050102; --night-void: #04051A; --night-deep: #06061A; --night-sky: #0A0203;
  --night-floor: #140506; --night-panel: #170607; --night-horizon: #1C2256; --night-rim: #34387A;

  /* ---- Semantic accents (use only with meaning) ---- */
  --acc-red: #FF3B4F; --acc-heart: #F0243F; --acc-green: #2EE080; --acc-mint: #8FF5BD; --acc-sky: #4AA4FF;

  /* ---- Text on night ---- */
  --text-headline: #FFF3EF;
  --text-secondary: #F2EBE7;
  --text-cool: #FFC4CA;
  --text-muted: rgba(185, 194, 255, 0.58);

  /* ---- Bits / system states ---- */
  --bit-off-bg: rgba(226, 42, 62, 0.16);
  --bit-off-rim: rgba(160, 170, 255, 0.28);
  --panel-bg: rgba(20, 22, 56, 0.62);
  --panel-rim: rgba(160, 170, 255, 0.22);

  /* ---- Type families ---- */
  --font-display: "Sora", "Noto Sans Devanagari", "Noto Sans Thai", "Noto Sans Arabic", "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Geist", "Noto Sans Devanagari", "Noto Sans Thai", "Noto Sans Arabic", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "Noto Sans Devanagari", "Noto Sans Thai", "Noto Sans Arabic", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* ---- Fluid type scale (1440 reference, ~1.25 ratio at body, wider at display) ---- */
  --text-hero: clamp(2.4rem, 1.2rem + 4.6vw, 6.25rem);
  --text-h1: clamp(2rem, 1.1rem + 3.1vw, 4.25rem);
  --text-h2: clamp(1.5rem, 1rem + 1.7vw, 2.6rem);
  --text-h3: clamp(1.12rem, 0.95rem + 0.6vw, 1.5rem);
  --text-body: clamp(0.98rem, 0.92rem + 0.22vw, 1.14rem);
  --text-label: clamp(0.72rem, 0.68rem + 0.14vw, 0.82rem);
  --text-caption: clamp(0.66rem, 0.63rem + 0.1vw, 0.74rem);

  --tracking-hero: 0.34em;      /* the deck's spaced wordmark */
  --tracking-display: -0.022em;
  --tracking-label: 0.02em;
  --leading-display: 1.02;
  --leading-body: 1.55;
  --measure: 34ch;

  /* ---- Spacing ---- */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 72px; --space-9: 112px;
  --gutter: clamp(20px, 6.5vw, 112px);

  /* ---- Radii (hierarchy, not one radius everywhere) ---- */
  --radius-bit: 999px;
  --radius-card: 14px;
  --radius-pane: 20px;

  /* ---- Motion (mirrors js/motion.js) ---- */
  --ease-cinematic: cubic-bezier(0.65, 0, 0.25, 1);
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-settle: cubic-bezier(0.33, 1, 0.68, 1);
  --dur-micro: 180ms;
  --dur-ui: 420ms;
  --dur-reveal: 900ms;

  /* ---- Depth classes (parallax amplitude multipliers) ---- */
  --depth-atmosphere: 0.15;
  --depth-background: 0.35;
  --depth-midground: 0.65;
  --depth-subject: 1;
  --depth-foreground: 1.45;
}
