/* ═══════════════════════════════════════════════════════════════
   ELVISON DESIGN TOKENS  v1.0
   Two themes: Architectural Dark (default) + Liquid Glass Light
   Source of truth — all pages import this file.
═══════════════════════════════════════════════════════════════ */

:root {
  /* Fonts */
  --font:         'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Type scale */
  --text-display-2xl: clamp(40px, 5vw, 80px);
  --text-display-xl:  clamp(36px, 4.5vw, 64px);
  --text-display-lg:  clamp(28px, 3.5vw, 44px);
  --text-display-md:  clamp(24px, 3vw, 36px);
  --text-h1:   30px;
  --text-h2:   24px;
  --text-h3:   20px;
  --text-h4:   16px;
  --text-body-lg: 18px;
  --text-body:    15px;
  --text-body-sm: 14px;
  --text-caption: 12px;
  --text-label:   11px;

  /* Spacing 4px base */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;
  --sp-32: 128px;

  /* Radius */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* Grid */
  --grid-max: 1280px;
  --grid-narrow: 960px;
  --grid-wide: 1440px;
  --gutter: 32px;

  /* Motion */
  --dur-fast: 120ms;
  --dur:      200ms;
  --dur-slow: 350ms;
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Semantic status (theme-agnostic) */
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-danger:  #EF4444;
  --color-info:    #3B82F6;
}

/* ── ARCHITECTURAL DARK (default) ─────────────────────────── */
:root,
[data-theme="dark"] {
  --bg:          #08090B;
  --bg-elevated: #0E1114;
  --surface:     rgba(255,255,255,0.04);
  --surface2:    rgba(255,255,255,0.07);
  --surface3:    rgba(255,255,255,0.10);
  --border:      rgba(255,255,255,0.08);
  --border2:     rgba(255,255,255,0.14);
  --border-acc:  rgba(26,158,143,0.32);

  --accent:      #1A9E8F;
  --accent-mid:  #0D7A6E;
  --accent-dark: #095C53;
  --accent-sub:  rgba(26,158,143,0.12);
  --accent-glow: rgba(26,158,143,0.30);

  --text:    #F0F2F4;
  --text2:   #8A9099;
  --muted:   #535A63;

  --blur:    blur(24px) saturate(160%);
  --blur-h:  blur(40px) saturate(200%);
  --blur-l:  blur(12px) saturate(140%);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow:    0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.7);
  --shadow-glow: 0 0 24px rgba(26,158,143,0.25);

  --logo-filter: none;
  --bldg-color:  rgba(26,158,143,0.06);
  --bldg-stroke: rgba(255,255,255,0.04);

  --bg-canvas:
    radial-gradient(ellipse 70% 50% at 80% 5%, rgba(26,158,143,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 50% 70% at 5% 90%, rgba(26,158,143,0.10) 0%, transparent 50%),
    linear-gradient(170deg, #0A0C0E 0%, #08090B 50%, #060A09 100%);
}

/* ── LIQUID GLASS LIGHT ───────────────────────────────────── */
[data-theme="light"] {
  --bg:          #FFFFFF;
  --bg-elevated: #F8F9FB;
  --surface:     rgba(255,255,255,0.70);
  --surface2:    rgba(255,255,255,0.88);
  --surface3:    rgba(255,255,255,0.97);
  --border:      rgba(0,0,0,0.10);
  --border2:     rgba(0,0,0,0.18);
  --border-acc:  rgba(13,122,110,0.32);

  --accent:      #0D7A6E;
  --accent-mid:  #095C53;
  --accent-dark: #054039;
  --accent-sub:  rgba(13,122,110,0.10);
  --accent-glow: rgba(13,122,110,0.18);

  --text:    #1A1C1E;
  --text2:   #5A6070;
  --muted:   #9AA0AA;

  --blur:    blur(24px) saturate(180%);
  --blur-h:  blur(40px) saturate(220%);
  --blur-l:  blur(12px) saturate(160%);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow:    0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
  --shadow-glow: 0 0 24px rgba(13,122,110,0.16);

  --logo-filter: invert(1);
  --bldg-color:  rgba(13,122,110,0.08);
  --bldg-stroke: rgba(0,0,0,0.06);

  --bg-canvas:
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(13,122,110,0.12) 0%, transparent 50%),
    radial-gradient(ellipse 40% 50% at 5% 95%, rgba(13,122,110,0.06) 0%, transparent 50%),
    linear-gradient(180deg, #FAFCFB 0%, #FFFFFF 100%);
}

/* Respect OS preference if user hasn't picked */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    /* Only apply when no explicit theme set — handled by theme.js fallback */
  }
}

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