/* ============================================================
   tokens.css  —  every colour + geometry decision lives here.
   Nothing else in the codebase hardcodes a colour.

   Two themes, one rustic Indian heritage language:
     daylight  — sandstone, parchment, turmeric, terracotta  (default)
     lamplight — temple interior at night: lamp-black stone,
                 ghee-lamp gold, brass, deepened terracotta
   ============================================================ */

:root{
  /* ---------- type ---------- */
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-ui: 'Manrope', ui-sans-serif, system-ui, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* ---------- geometry ---------- */
  --notch: 18px;                          /* carved corner depth */
  --nd: calc(var(--notch) * 0.7072);      /* perpendicular distance of the cut = notch / sqrt 2 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --rail-w: 238px;
  --topbar-h: 62px;
  --gap: 18px;
  --pad: 22px;
  --maxw: 1480px;

  /* ---------- motion ---------- */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-sky: cubic-bezier(.45,.05,.25,1);
  --fast: 120ms;
  --med: 220ms;
  --slow: 420ms;
  --celestial: 1900ms;                    /* sunset / moonrise */
  --ease-set:  cubic-bezier(.55,.02,.86,.38);   /* the sun accelerates as it drops */
  --ease-rise: cubic-bezier(.16,.72,.34,1);     /* the moon decelerates as it climbs */
}

/* ============================================================
   DAYLIGHT — warm sandstone & parchment   (default)
   ============================================================ */
:root,
html[data-theme='daylight']{
  color-scheme: light;

  --bg-0:#e8d9c0;
  --bg-1:#f7efe0;
  --ink:#2c2015;
  --ink-2:#6a563c;
  --ink-3:#9c876a;
  --ink-inv:#fdf8ee;

  --panel: rgba(255,252,244,.76);
  --panel-2: rgba(255,251,241,.54);
  --panel-3: rgba(255,250,238,.34);
  --panel-solid:#fffcf5;
  --raise: rgba(255,255,255,.94);

  --line: rgba(124,86,44,.24);
  --line-2: rgba(124,86,44,.13);
  --sheen: rgba(255,255,255,.82);

  --accent:#a8411c;             /* terracotta / sindoor */
  --accent-ink:#fff8ec;
  --accent-soft: rgba(168,65,28,.11);
  --accent-line: rgba(168,65,28,.38);

  --brass:#9a6c16;              /* turmeric brass */
  --indigo:#2d5286;
  --tulsi:#4a7c45;
  --stone:#7b6a55;

  --ok:#4a7c45;      --ok-soft: rgba(74,124,69,.12);   --ok-line: rgba(74,124,69,.34);
  --warn:#9a6c16;    --warn-soft: rgba(154,108,22,.13);--warn-line: rgba(154,108,22,.36);
  --high:#9e2b25;    --high-soft: rgba(158,43,37,.10); --high-line: rgba(158,43,37,.32);
  --info:#2d5286;    --info-soft: rgba(45,82,134,.10); --info-line: rgba(45,82,134,.28);

  /* ---- sky ---- */
  --sky-a:#fbe9c9;              /* horizon glow */
  --sky-b:#cfe0e8;              /* upper sky */
  --sun-core:#ffd98a;
  --sun-glow: rgba(255,186,84,.58);
  --moon-core:#f3ecdc;
  --moon-glow: rgba(226,222,206,.32);
  --silhouette: rgba(94,64,36,.15);
  --silhouette-2: rgba(94,64,36,.075);
  --star-a: 0;
  /* directional light wash — anchored where the sun sits */
  --wash: radial-gradient(52% 44% at 18% 14%, rgba(255,203,120,.34) 0%, rgba(255,203,120,0) 68%);

  --shadow-pop: 0 26px 62px -22px rgba(96,64,28,.34);
  --scrim: rgba(232,219,197,.88);
  --track: rgba(124,86,44,.15);
}

/* ============================================================
   LAMPLIGHT — temple interior after dark
   ============================================================ */
html[data-theme='lamplight']{
  color-scheme: dark;

  --bg-0:#120d08;
  --bg-1:#1d160e;
  --ink:#f2e6d2;
  --ink-2:#c0a988;
  --ink-3:#8b7557;
  --ink-inv:#150f08;

  --panel: rgba(255,228,182,.055);
  --panel-2: rgba(255,228,182,.032);
  --panel-3: rgba(255,228,182,.019);
  --panel-solid:#1f180f;
  --raise: rgba(255,228,182,.088);

  --line: rgba(228,193,136,.16);
  --line-2: rgba(228,193,136,.085);
  --sheen: rgba(255,226,176,.085);

  --accent:#e0a640;             /* ghee-lamp gold */
  --accent-ink:#1a1108;
  --accent-soft: rgba(224,166,64,.13);
  --accent-line: rgba(224,166,64,.40);

  --brass:#d9a63f;
  --indigo:#7ba0cc;
  --tulsi:#84b06c;
  --stone:#9b876b;

  --ok:#84b06c;      --ok-soft: rgba(132,176,108,.13); --ok-line: rgba(132,176,108,.34);
  --warn:#e0b050;    --warn-soft: rgba(224,176,80,.13);--warn-line: rgba(224,176,80,.34);
  --high:#e08a72;    --high-soft: rgba(224,138,114,.13);--high-line: rgba(224,138,114,.36);
  --info:#8fb4d8;    --info-soft: rgba(143,180,216,.11);--info-line: rgba(143,180,216,.30);

  /* ---- sky ---- */
  --sky-a:#2a1d10;
  --sky-b:#0a0a14;
  --sun-core:#ffcf7a;
  --sun-glow: rgba(255,150,60,.42);
  --moon-core:#f6f1e2;
  --moon-glow: rgba(228,226,208,.30);
  --silhouette: rgba(6,4,2,.80);
  --silhouette-2: rgba(6,4,2,.52);
  --star-a: 1;
  --wash: radial-gradient(52% 44% at 80% 12%, rgba(226,222,198,.13) 0%, rgba(226,222,198,0) 66%);

  --shadow-pop: 0 26px 62px -20px rgba(0,0,0,.78);
  --scrim: rgba(10,7,3,.84);
  --track: rgba(228,193,136,.10);
}
