/* ═══════════════════════════════════════════════════════════════
   tokens.css — ஸ்ரீ கற்பக வினாயகர் ஜோதிடம்
   Design Token System · "சன்னதி" (The Sanctum)
   ─────────────────────────────────────────────────────────────
   Single source of truth for all brand values.
   Every color, font, and spacing unit used across the site
   MUST reference a variable defined here — never a hardcoded
   hex or magic number.
   ═══════════════════════════════════════════════════════════════ */

:root {

  /* ── Brand Colors ───────────────────────────────────────────
     Derived from client's own reference photos:
     • Maroon panchangam book cover with gold naga/peacock tooling
     • Bronze Vinayagar idol lit by rows of brass oil lamps
     ──────────────────────────────────────────────────────────── */

  /* Primary */
  --color-sanctum-maroon: #4A1015;
  --color-temple-brass: #C9982E;

  /* Deep contrast */
  --color-night-indigo: #1A1230;

  /* Warm accent (Rich Traditional Kumkumam) */
  --color-kumkumam: #8B2213;

  /* Neutrals */
  --color-aged-ivory: #F2E8D5;
  --color-deep-charcoal: #2B1414;


  /* ── Derived Shades ─────────────────────────────────────── */

  --color-maroon-deep: #3A0C10;
  --color-maroon-light: #5E1A22;
  --color-maroon-soft: #6B2530;

  --color-brass-pale: #D9B04E;
  --color-brass-light: #E2C36A;
  --color-brass-dark: #A07B22;
  --color-brass-glow: rgba(201, 152, 46, 0.15);
  --color-brass-glow-strong: rgba(201, 152, 46, 0.3);

  --color-ivory-warm: #EDE0CC;
  --color-ivory-cool: #F7F0E3;

  --color-kumkumam-hover: #9D2817;
  --color-kumkumam-active: #66180E;

  --color-indigo-light: #251A40;
  --color-indigo-glow: rgba(26, 18, 48, 0.7);


  /* ── Semantic Aliases ───────────────────────────────────── */

  --color-bg-primary: var(--color-aged-ivory);
  --color-bg-dark: var(--color-sanctum-maroon);
  --color-bg-deep: var(--color-night-indigo);
  --color-bg-card: var(--color-ivory-cool);

  --color-text-primary: var(--color-deep-charcoal);
  --color-text-secondary: #5C3A3A;
  --color-text-on-dark: var(--color-aged-ivory);
  --color-text-accent: var(--color-temple-brass);
  --color-text-muted: #8A6A5C;

  --color-cta: var(--color-kumkumam);
  --color-cta-hover: var(--color-kumkumam-hover);
  --color-cta-active: var(--color-kumkumam-active);
  --color-cta-text: var(--color-aged-ivory);

  --color-border-brass: var(--color-temple-brass);
  --color-border-light: rgba(201, 152, 46, 0.25);


  /* ── Typography ─────────────────────────────────────────── */

  --font-display: 'Baloo Thambi 2', cursive;
  --font-body: 'Hind Madurai', sans-serif;
  --font-label: 'Cormorant Garamond', serif;

  /* Type scale — mobile-first base (16px root) */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 2rem;        /* 32px */
  --text-4xl: 2.5rem;      /* 40px */
  --text-5xl: 3rem;        /* 48px */

  /* Font weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Line heights — Tamil script needs more vertical space than Latin */
  --leading-tight: 1.3;
  --leading-snug: 1.5;
  --leading-normal: 1.7;
  --leading-relaxed: 1.9;
  --leading-loose: 2.1;

  /* Letter spacing */
  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;


  /* ── Spacing (4px-based scale) ──────────────────────────── */

  --space-1: 0.25rem;     /* 4px  */
  --space-2: 0.5rem;      /* 8px  */
  --space-3: 0.75rem;     /* 12px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-8: 2rem;        /* 32px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */
  --space-24: 6rem;       /* 96px */


  /* ── Layout ─────────────────────────────────────────────── */

  --max-width: 1120px;
  --content-padding: var(--space-5);
  --header-height: 60px;
  --bottom-bar-height: 64px;


  /* ── Border Radius ──────────────────────────────────────── */
  /* Brief: "gently rounded (6-8px) — not pill-shaped" */

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;


  /* ── Shadows (warm maroon-tinted, not cold grey) ────────── */

  --shadow-sm: 0 1px 3px rgba(43, 20, 20, 0.08);
  --shadow-md: 0 4px 12px rgba(43, 20, 20, 0.1);
  --shadow-lg: 0 8px 24px rgba(43, 20, 20, 0.14);
  --shadow-xl: 0 16px 48px rgba(43, 20, 20, 0.18);
  --shadow-brass-glow: 0 0 24px rgba(201, 152, 46, 0.2);
  --shadow-inner: inset 0 1px 3px rgba(43, 20, 20, 0.06);


  /* ── Transitions & Easing ───────────────────────────────── */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --transition-fast: 150ms var(--ease-out);
  --transition-normal: 300ms var(--ease-out);
  --transition-slow: 500ms var(--ease-out);
  --transition-slower: 800ms var(--ease-in-out);


  /* ── Z-Index Scale ──────────────────────────────────────── */

  --z-base: 1;
  --z-dropdown: 50;
  --z-sticky: 100;
  --z-bottom-bar: 150;
  --z-nav-overlay: 200;
  --z-modal: 300;


  /* ── Navagraha Ring Animation ────────────────────────────── */

  --navagraha-duration: 45s;   /* 45s per full cosmic rotation */
  --navagraha-ring-size: 320px;
  --navagraha-ring-stroke: 1.5px;
}


/* ── Responsive Adjustments ─────────────────────────────────
   Scale type and spacing up for larger viewports.
   Mobile values above are the base — we only ADD, never reset.
   ──────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  :root {
    --content-padding: var(--space-6);
    --navagraha-ring-size: 380px;
  }
}

@media (min-width: 768px) {
  :root {
    --text-3xl: 2.25rem;    /* 36px */
    --text-4xl: 3rem;       /* 48px */
    --text-5xl: 3.75rem;    /* 60px */
    --content-padding: var(--space-8);
    --header-height: 72px;
    --navagraha-ring-size: 440px;
  }
}

@media (min-width: 1024px) {
  :root {
    --text-3xl: 2.5rem;     /* 40px */
    --text-4xl: 3.5rem;     /* 56px */
    --text-5xl: 4.5rem;     /* 72px */
    --content-padding: var(--space-12);
    --navagraha-ring-size: 500px;
  }
}
