/* ==========================================================================
   Delvilla Bali — Design Tokens (Two-Tier: Primitives + Semantic Roles)
   ========================================================================== */
:root {
  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Fluid Type Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.35rem);
  --text-xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  --text-2xl: clamp(1.85rem, 1.45rem + 1.6vw, 2.75rem);
  --text-3xl: clamp(2.5rem, 1.85rem + 2.8vw, 4.25rem);
  --text-hero: clamp(2.85rem, 2.1rem + 3.4vw, 5.25rem);

  /* 8px Baseline Spacing Scale */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-12: 6rem;    /* 96px */
  --space-16: 8rem;    /* 128px */

  /* Radii & Motion */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 180ms;
  --duration-base: 320ms;
  --duration-slow: 600ms;

  /* Container */
  --container-max: 1320px;
  --prose-max: 65ch;

  /* Sunlit Sanctuary Theme (Default Light — Travertine & Honey Teak) */
  --bg-canvas: #FAF7F2;
  --bg-surface: #F2ECE1;
  --bg-elevated: #FFFFFF;
  --bg-glass: rgba(250, 247, 242, 0.88);
  --bg-hero-scrim: linear-gradient(
    to bottom,
    rgba(22, 20, 17, 0.42) 0%,
    rgba(22, 20, 17, 0.25) 45%,
    rgba(22, 20, 17, 0.72) 100%
  );

  --text-primary: #1C1915;
  --text-secondary: #574F44;
  --text-muted: #6E6558;
  --text-on-dark: #FAF7F2;

  --brand-primary: #8A652B;
  --brand-primary-hover: #70501E;
  --brand-accent: #B68F52;
  --brand-sage: #4E5836;
  --accent-pool: #1A6B6A;
  --accent-pool-hover: #135352;

  --border-subtle: rgba(28, 25, 21, 0.11);
  --border-strong: rgba(28, 25, 21, 0.24);
  --focus-ring: #1A6B6A;

  --status-success: #2A6B4A;
  --status-error: #A63329;

  --shadow-sm: 0 2px 8px rgba(28, 25, 21, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 25, 21, 0.09);
  --shadow-lg: 0 22px 54px rgba(28, 25, 21, 0.14);
}

[data-theme="twilight"] {
  /* Twilight Glow Theme (Dark — Volcanic Basalt & Warm Amber) */
  --bg-canvas: #131615;
  --bg-surface: #1B201E;
  --bg-elevated: #242A27;
  --bg-glass: rgba(19, 22, 21, 0.88);
  --bg-hero-scrim: linear-gradient(
    to bottom,
    rgba(13, 16, 15, 0.56) 0%,
    rgba(13, 16, 15, 0.30) 45%,
    rgba(13, 16, 15, 0.84) 100%
  );

  --text-primary: #F3EFE6;
  --text-secondary: #C4BCAD;
  --text-muted: #9C9486;
  --text-on-dark: #F3EFE6;

  --brand-primary: #CFA766;
  --brand-primary-hover: #DFBE84;
  --brand-accent: #DFBE84;
  --brand-sage: #92A46D;
  --accent-pool: #3CA6A2;
  --accent-pool-hover: #4EC0BC;

  --border-subtle: rgba(243, 239, 230, 0.12);
  --border-strong: rgba(243, 239, 230, 0.26);
  --focus-ring: #DFBE84;

  --status-success: #52B788;
  --status-error: #E07A70;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.52);
}

@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;
  }
}
