/**
 * Zuri Society — Design Tokens
 * Source of truth. Do not edit per-repo copies directly.
 * Source: github.com/Breshy-dev/zurisociety-design-system
 * Version: 1.0.0 — Module 0
 */

/* ─────────────────────────────────────────────
   THEME: DARK (default)
───────────────────────────────────────────── */
:root,
:root[data-theme="dark"] {
  /* Backgrounds */
  --bg-base:   #0A0A0A;
  --bg-raised: #141414;
  --bg-card:   #1A1A1A;

  /* Text */
  --text-primary:   #F5F0EB;
  --text-secondary: #B8B0A4;
  --text-muted:     #6B6459;

  /* Gold */
  --gold-primary: #C9A96E;
  --gold-light:   #E8D5A8;
  --gold-dark:    #A07D42;

  /* Borders */
  --border-subtle: rgba(201, 169, 110, 0.12);
  --border-strong: rgba(201, 169, 110, 0.28);

  /* Glass internals */
  --glass-rgb: 20, 20, 20;
  --shadow-card:  0 8px 32px rgba(0, 0, 0, 0.40);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* Page gradient */
  --page-bg: radial-gradient(ellipse at top, #1a1410 0%, #0A0A0A 60%);

  /* Status */
  --signal-alert: #E0594A;
  --signal-green: #5BBE8A;
}

/* ─────────────────────────────────────────────
   THEME: LIGHT
───────────────────────────────────────────── */
:root[data-theme="light"] {
  /* Backgrounds */
  --bg-base:   #F5F0EB;
  --bg-raised: #EDE6DC;
  --bg-card:   #FFFFFF;

  /* Text */
  --text-primary:   #1A1A1A;
  --text-secondary: #4A4038;
  --text-muted:     #8A8075;

  /* Gold */
  --gold-primary: #B8935A;
  --gold-light:   #D4B77D;
  --gold-dark:    #8A6E3E;

  /* Borders */
  --border-subtle: rgba(139, 110, 62, 0.12);
  --border-strong: rgba(139, 110, 62, 0.28);

  /* Glass internals */
  --glass-rgb: 255, 255, 255;
  --shadow-card:  0 8px 32px rgba(139, 110, 62, 0.08);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.60);

  /* Page gradient */
  --page-bg: radial-gradient(ellipse at top, #FDF8F0 0%, #F5F0EB 60%);

  /* Status */
  --signal-alert: #C74332;
  --signal-green: #3D9A6A;
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY SCALE
   Fonts: Cormorant Garamond (display/editorial) + Outfit (UI/body)
   Import in HTML: fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Outfit:wght@200;300;400;500;600;700
───────────────────────────────────────────── */
:root {
  --font-display: 'Cormorant Garamond', serif;
  --font-ui:      'Outfit', sans-serif;

  --text-display: 64px;   --lh-display: 72px;
  --text-h1:      48px;   --lh-h1:      56px;
  --text-h2:      32px;   --lh-h2:      40px;
  --text-h3:      24px;   --lh-h3:      32px;
  --text-body-lg: 18px;   --lh-body-lg: 28px;
  --text-body:    16px;   --lh-body:    24px;
  --text-small:   14px;   --lh-small:   20px;
  --text-label:   11px;   --lh-label:   16px;

  /* Motion */
  --ease-spring:  cubic-bezier(0.22, 1, 0.36, 1);
  --duration-base: 300ms;
  --duration-page: 400ms;

  /* Radii */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  24px;
  --radius-pill: 999px;
}

/* ─────────────────────────────────────────────
   RESET
───────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--duration-page) ease, color var(--duration-base) ease;
}

/* ─────────────────────────────────────────────
   GLASS UTILITY CLASSES
───────────────────────────────────────────── */

/* Content surfaces — 60% (text-heavy cards) */
.glass {
  background: rgba(var(--glass-rgb), 0.60);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card), var(--shadow-inset);
}

/* Hero surfaces — 50% (over imagery, feature banners) */
.glass-hero {
  background: rgba(var(--glass-rgb), 0.50);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card), var(--shadow-inset);
}

/* Nav bars and floating UI — 70% */
.glass-nav {
  background: rgba(var(--glass-rgb), 0.70);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-subtle);
}

/* Modal overlays and dropdowns — 75% */
.glass-modal {
  background: rgba(var(--glass-rgb), 0.75);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid var(--border-strong);
}

/* Reading / editorial — 85%, reduced blur */
.glass-reading {
  background: rgba(var(--glass-rgb), 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Accessibility: prefers-reduced-transparency */
@media (prefers-reduced-transparency: reduce) {
  .glass,
  .glass-hero,
  .glass-nav,
  .glass-modal,
  .glass-reading {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(var(--glass-rgb), 0.95);
  }
}

/* Fallback: browsers without backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
  .glass        { background: rgba(var(--glass-rgb), 0.88); }
  .glass-hero   { background: rgba(var(--glass-rgb), 0.85); }
  .glass-nav    { background: rgba(var(--glass-rgb), 0.90); }
  .glass-modal  { background: rgba(var(--glass-rgb), 0.92); }
  .glass-reading{ background: rgba(var(--glass-rgb), 0.96); }
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY UTILITIES
───────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-display);
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
}
.serif { font-family: var(--font-display); }

.label-xs {
  font-family: var(--font-ui);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-primary);
}

/* ─────────────────────────────────────────────
   BUTTON UTILITIES
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-spring);
  border: none;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold-primary);
  color: var(--bg-base);
  font-size: 13px;
  padding: 13px 28px;
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  padding: 12px 28px;
  opacity: 0.75;
}
.btn-ghost:hover {
  opacity: 1;
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.btn-sm {
  font-size: 11px;
  padding: 8px 18px;
  letter-spacing: 1px;
}

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

/* ─────────────────────────────────────────────
   THEME SWITCHER UTILITY (JS)
   Usage: import { initTheme, toggleTheme } from './theme.js'
   Or inline the script below in <head>
───────────────────────────────────────────── */

/* The JS lives in theme.js — see design-system repo */
