/* ============================================================================
   JIGNASA CLUB — Design Tokens
   Re-themed to match design-system/DESIGN-SYSTEM.md (extracted from the
   HTML/ prototypes): a warm, hand-crafted, editorial system — off-white
   paper ground, serif display+body pairing, teal-to-green brand gradient,
   organic radii. Dark mode is authored independently, not an auto-invert.

   This file keeps the SAME custom-property names that base.css, site.css,
   components.css and admin.css already consume (--bg, --text, --accent-strong,
   --radius-sm, --fs-h1, etc.) — only the values changed. That's deliberate:
   it re-themes the whole app through one file instead of touching every
   selector that references a token.
   ============================================================================ */

:root {
  /* ---- Brand hues (canonical names, from the design system) ---- */
  --teal: #0E8B9C;
  --teal-deep: #085863;
  --teal-soft: #DCEEEF;
  --green: #5EA83B;
  --green-deep: #3D7226;
  --green-soft: #E5F0D9;
  --navy: #16345C;
  --navy-soft: #E4E9F0;

  /* ---- Warm paper neutrals ---- */
  --paper: #FAF5E8;
  --paper-raised: #FFFDF7;
  --paper-2: #F2EAD6;
  --paper-3: #EBE0C8;   /* one tier deeper than paper-2 — used where the old system had --surface-2 */
  --line: #E3D9BE;
  --ink: #23201A;
  --ink-muted: #5B5748;
  --ink-faint: #948C74;

  /* ---- Danger / attention accents (not present in the prototypes — added
     to serve real states the design system doesn't cover, matched to the
     same warm-paper temperature as the rest of the palette) ---- */
  --accent-danger-500: #C2452F;   /* warm brick red, not a cold system red */
  --accent-danger-700: #8A2F1D;   /* readable text-on-light-bg tone */
  --accent-danger-100: #F7DCD3;
  --accent-amber-500: #C98A2E;    /* "few seats left" attention state */
  --accent-amber-700: #8C5A1E;
  --accent-amber-100: #F5E8CE;

  /* ============================ Semantic bridge ============================ */
  --bg: var(--paper);
  --bg-raised: var(--paper-raised);
  --surface: var(--paper-2);
  --surface-2: var(--paper-3);
  --border: var(--line);
  --text: var(--ink);
  --text-muted: var(--ink-muted);
  --text-faint: var(--ink-faint);

  --accent: var(--teal);
  --accent-strong: var(--teal-deep);
  --accent-soft: var(--teal-soft);
  --on-accent: #FFFFFF;

  /* Kept for the handful of selectors that reference a specific brand hue
     directly (gradients, accent-variant icon cards, ::selection) */
  --accent-teal-300: var(--teal-soft);
  --accent-teal-500: var(--teal);
  --accent-teal-700: var(--teal-deep);
  --accent-green-500: var(--green);
  --accent-green-100: var(--green-soft);
  --accent-navy-500: var(--navy);
  --accent-navy-100: var(--navy-soft);

  /* ---- Status colours (badges) — reuse brand hues wherever the meaning
     lines up, so only one new hue (amber) had to be invented ---- */
  --status-open-bg: var(--green-soft);   --status-open-fg: var(--green-deep);
  --status-soon-bg: var(--teal-soft);    --status-soon-fg: var(--teal-deep);
  --status-few-bg: var(--accent-amber-100); --status-few-fg: var(--accent-amber-700);
  --status-full-bg: var(--paper-2);      --status-full-fg: var(--ink-faint);
  --status-closed-bg: var(--paper-2);    --status-closed-fg: var(--ink-faint);
  --status-done-bg: var(--navy-soft);    --status-done-fg: var(--navy);

  /* ---- Elevation ---- */
  --shadow-sm: 0 1px 3px rgba(40, 30, 10, .08);
  --shadow-md: 0 10px 30px -10px rgba(40, 30, 10, .18);
  --shadow-lg: 0 24px 60px -18px rgba(40, 30, 10, .26);
  --shadow-accent: 0 10px 28px -8px rgba(14, 139, 156, .4);

  /* ---- Radius ---- */
  --radius-sm: 14px;   /* bridge value — the prototypes have no "sm" tier */
  --radius-md: 20px;
  --radius-lg: 34px;
  --radius-full: 999px;

  /* ---- Type families ---- */
  --font-display: 'Playfair Display', 'Hind Vadodara', serif;
  --font-body: 'Lora', 'Hind Vadodara', serif;
  --font-gu: 'Hind Vadodara', 'Lora', serif;

  /* ---- Type scale (fluid, matched to the prototypes' clamp() values) ---- */
  --fs-hero: clamp(2.6rem, 5.2vw + 1rem, 4.6rem);
  --fs-h1: clamp(2.2rem, 4vw + 1rem, 3.8rem);
  /* The prototype has no generic h2 font-size rule at all — most h2's it
     doesn't explicitly style just render at native browser default size
     (~1.5em against the 1.09rem body). Only a handful of narrative section
     headers (not-tuition, philosophy, journey title) get an explicit large
     clamp() in the markup itself — that's applied inline per-heading, not
     here. Keep this default modest so unstyled h2's match the prototype. */
  --fs-h2: 1.65rem;
  --fs-h3: 1.5rem;
  --fs-lead: 1.2rem;
  --fs-body: 1.09rem;
  --fs-xs: 0.78rem;

  /* ---- Spacing ---- */
  --space-section: clamp(3.5rem, 7vw, 6.5rem);
  --space-section-sm: clamp(2.5rem, 5vw, 4.5rem);
  --container-max: 1180px;
  --container-pad: clamp(1.25rem, 4vw, 2.75rem);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;
  --dur-slow: 620ms;
}

/* ---- Dark mode: authored independently (charcoal-brown, not pure black) ---- */
html[data-theme="dark"] {
  --paper: #1B1710; --paper-raised: #241F16; --paper-2: #2A2418; --paper-3: #332C1E; --line: #3C3423;
  --ink: #F3ECDC; --ink-muted: #C9BFA6; --ink-faint: #8D8367;

  --accent-danger-500: #FF8C7F; --accent-danger-700: #FF8C7F; --accent-danger-100: #3A211B;
  --accent-amber-500: #E8B368;  --accent-amber-700: #E8B368;  --accent-amber-100: #3A2C14;

  --bg: var(--paper); --bg-raised: var(--paper-raised); --surface: var(--paper-2); --surface-2: var(--paper-3); --border: var(--line);
  --text: var(--ink); --text-muted: var(--ink-muted); --text-faint: var(--ink-faint);

  --accent: #4FC3D4; --accent-strong: #7DD8E4; --accent-soft: #23383B; --on-accent: #0B2226;
  --teal-soft: #1E3336; --green-soft: #24331B; --navy-soft: #202B3D;

  --accent-teal-300: var(--teal-soft);
  --accent-teal-500: #4FC3D4;
  --accent-teal-700: #7DD8E4;
  --accent-green-500: #83C95F;
  --accent-green-100: var(--green-soft);
  --accent-navy-500: #7E9DC4;
  --accent-navy-100: var(--navy-soft);

  --status-open-bg: var(--green-soft);   --status-open-fg: #9BDD7C;
  --status-soon-bg: var(--teal-soft);    --status-soon-fg: #8FDAE0;
  --status-few-bg: var(--accent-amber-100); --status-few-fg: #FFC968;
  --status-full-bg: var(--paper-2);      --status-full-fg: var(--ink-faint);
  --status-closed-bg: var(--paper-2);    --status-closed-fg: var(--ink-faint);
  --status-done-bg: var(--navy-soft);    --status-done-fg: #A9C2E6;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35);
  --shadow-md: 0 12px 30px -10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 28px 60px -18px rgba(0, 0, 0, .6);
  --shadow-accent: 0 12px 32px -8px rgba(79, 195, 212, .3);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
