/* Art direction: Christ-centered YouTube ministry → intimate, cinematic, spiritually grounded
   Palette: Warm dark (charcoal-brown), accent: amber/orange ember — fire, warmth, Holy Spirit
   Typography: Cormorant Garamond (display, elegant editorial) + Inter (body, clean readable)
   Density: spacious/editorial — generous breathing room, contemplative pace
   PREMIUM UPGRADE: Inspired by huly.io — cinematic depth, glassmorphism, volumetric glow */

/* ========================================================================
   DESIGN TOKENS
   ======================================================================== */

:root {
  /* Type Scale (fluid with clamp) — UPGRADED: larger hero/display sizes */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* 4px Spacing System */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Font families */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ========================================================================
   DARK MODE (DEFAULT)
   ======================================================================== */

:root, [data-theme="dark"] {
  --color-bg:             #0f0d0b;
  --color-surface:        #181614;
  --color-surface-2:      #211f1b;
  --color-surface-offset: #1a1816;
  --color-surface-dynamic: #282520;
  --color-divider:        #2e2b26;
  --color-border:         #3a3630;

  --color-text:           #E8E4DC;
  --color-text-muted:     #A09A8E;
  --color-text-faint:     #635E55;
  --color-text-inverse:   #0f0d0b;

  --color-primary:        #E8920D;
  --color-primary-hover:  #F5A623;
  --color-primary-active: #D4651E;
  --color-primary-highlight: #342a17;

  --color-secondary:      #D4651E;
  --color-tertiary:       #F5B731;

  --color-error:          #c94444;
  --color-success:        #5a9a3a;
  --color-warning:        #D4651E;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.5);
  --shadow-xl: 0 24px 60px oklch(0 0 0 / 0.6);

  /* Ember glow for hover effects */
  --glow-ember: 0 0 20px oklch(0.65 0.18 65 / 0.15), 0 0 40px oklch(0.65 0.18 65 / 0.05);
  --glow-ember-strong: 0 0 30px oklch(0.65 0.18 65 / 0.25), 0 0 60px oklch(0.65 0.18 65 / 0.1), 0 0 100px oklch(0.65 0.18 65 / 0.05);

  /* Glassmorphism */
  --glass-bg: oklch(from var(--color-surface) l c h / 0.55);
  --glass-border: oklch(1 0 0 / 0.06);
  --glass-blur: 20px;
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0f0d0b;
    --color-surface:        #181614;
    --color-surface-2:      #211f1b;
    --color-surface-offset: #1a1816;
    --color-surface-dynamic: #282520;
    --color-divider:        #2e2b26;
    --color-border:         #3a3630;
    --color-text:           #E8E4DC;
    --color-text-muted:     #A09A8E;
    --color-text-faint:     #635E55;
    --color-text-inverse:   #0f0d0b;
    --color-primary:        #E8920D;
    --color-primary-hover:  #F5A623;
    --color-primary-active: #D4651E;
    --color-primary-highlight: #342a17;
    --color-secondary:      #D4651E;
    --color-tertiary:       #F5B731;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.5);
    --shadow-xl: 0 24px 60px oklch(0 0 0 / 0.6);
    --glow-ember: 0 0 20px oklch(0.65 0.18 65 / 0.15), 0 0 40px oklch(0.65 0.18 65 / 0.05);
    --glow-ember-strong: 0 0 30px oklch(0.65 0.18 65 / 0.25), 0 0 60px oklch(0.65 0.18 65 / 0.1), 0 0 100px oklch(0.65 0.18 65 / 0.05);
    --glass-bg: oklch(from var(--color-surface) l c h / 0.55);
    --glass-border: oklch(1 0 0 / 0.06);
    --glass-blur: 20px;
  }
}

/* ========================================================================
   LIGHT MODE
   ======================================================================== */

[data-theme="light"] {
  --color-bg:             #F8F5F0;
  --color-surface:        #FFFFFF;
  --color-surface-2:      #F0EDE6;
  --color-surface-offset: #EBE7DF;
  --color-surface-dynamic: #E3DFD6;
  --color-divider:        #D5D0C8;
  --color-border:         #C8C2B8;

  --color-text:           #1E1C18;
  --color-text-muted:     #6B665C;
  --color-text-faint:     #9E998F;
  --color-text-inverse:   #F8F5F0;

  --color-primary:        #C47A08;
  --color-primary-hover:  #A86600;
  --color-primary-active: #8E5500;
  --color-primary-highlight: #F5EDD8;

  --color-secondary:      #B8550F;
  --color-tertiary:       #D49C0A;

  --color-error:          #b33030;
  --color-success:        #3d7a1a;
  --color-warning:        #B8550F;

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 16px oklch(0.2 0.01 80 / 0.1);
  --shadow-lg: 0 12px 40px oklch(0.2 0.01 80 / 0.14);
  --shadow-xl: 0 24px 60px oklch(0.2 0.01 80 / 0.18);

  --glow-ember: 0 0 20px oklch(0.65 0.18 65 / 0.1), 0 0 40px oklch(0.65 0.18 65 / 0.03);
  --glow-ember-strong: 0 0 30px oklch(0.65 0.18 65 / 0.15), 0 0 60px oklch(0.65 0.18 65 / 0.06);

  --glass-bg: oklch(from var(--color-surface) l c h / 0.7);
  --glass-border: oklch(0 0 0 / 0.06);
  --glass-blur: 20px;
}
