/* ==========================================================================
   DESIGN MEDIAN STUDIO — Design tokens
   Brand palette, typography, spacing, motion and semantic theme tokens.
   ========================================================================== */

:root {
  /* ---- Brand constants (never change between themes) ---- */
  --brand-ink: #080808;
  --brand-paper: #ffffff;
  --brand-orange: #ff5b1f;
  --brand-orange-soft: #ff7a47;
  --brand-orange-deep: #d8420c;
  --orange-rgb: 255, 91, 31;

  /* ---- Typefaces ---- */
  --font-display: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  /* ---- Type scale (fluid) ---- */
  --fs-xs: clamp(0.69rem, 0.66rem + 0.15vw, 0.78rem);
  --fs-sm: clamp(0.8rem, 0.76rem + 0.2vw, 0.9rem);
  --fs-base: clamp(0.94rem, 0.9rem + 0.22vw, 1.05rem);
  --fs-md: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  --fs-lg: clamp(1.3rem, 1.18rem + 0.6vw, 1.75rem);
  --fs-xl: clamp(1.75rem, 1.5rem + 1.2vw, 2.6rem);
  --fs-2xl: clamp(2.2rem, 1.75rem + 2.2vw, 3.8rem);
  --fs-3xl: clamp(2.9rem, 2rem + 4.2vw, 6rem);
  --fs-hero: clamp(3.1rem, 1.6rem + 7.2vw, 9.5rem);

  /* ---- Spacing scale ---- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.75rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  /* ---- Layout ---- */
  --container: 1440px;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 24px;
  --header-h: 84px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 180ms;
  --t-base: 350ms;
  --t-slow: 700ms;
}

/* ==========================================================================
   THEME TOKENS — Dark (default)
   ========================================================================== */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #080808;
  --bg-soft: #0e0e10;
  --bg-elev: #141416;
  --bg-elev-2: #1b1b1e;
  --surface-glass: rgba(20, 20, 22, 0.72);
  --surface-glass-strong: rgba(10, 10, 11, 0.92);

  --text: #f5f5f4;
  --text-soft: #c9c9c7;
  --text-muted: #8b8b8c;
  --text-faint: #9a9a9b;

  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --grid-line: rgba(255, 255, 255, 0.045);

  --header-bg: rgba(8, 8, 8, 0.6);
  --header-scrolled: rgba(8, 8, 8, 0.92);

  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
  --glow: 0 0 60px rgba(var(--orange-rgb), 0.18);
  --glow-strong: 0 0 90px rgba(var(--orange-rgb), 0.32);

  --btn-primary-text: #0a0a0a;
  --overlay: rgba(4, 4, 5, 0.86);
  --noise-opacity: 0.035;
}

/* ==========================================================================
   THEME TOKENS — Light
   ========================================================================== */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f7f7f5;
  --bg-soft: #efefec;
  --bg-elev: #ffffff;
  --bg-elev-2: #f0f0ee;
  --surface-glass: rgba(255, 255, 255, 0.76);
  --surface-glass-strong: rgba(250, 250, 248, 0.94);

  --text: #0d0d0d;
  --text-soft: #333333;
  --text-muted: #666665;
  --text-faint: #6b6b69;

  --line: rgba(8, 8, 8, 0.12);
  --line-strong: rgba(8, 8, 8, 0.22);
  --grid-line: rgba(8, 8, 8, 0.05);

  --header-bg: rgba(247, 247, 245, 0.65);
  --header-scrolled: rgba(247, 247, 245, 0.94);

  --shadow-sm: 0 4px 20px rgba(8, 8, 8, 0.06);
  --shadow-lg: 0 30px 80px rgba(8, 8, 8, 0.12);
  --glow: 0 0 60px rgba(var(--orange-rgb), 0.12);
  --glow-strong: 0 0 90px rgba(var(--orange-rgb), 0.22);

  --btn-primary-text: #ffffff;
  --overlay: rgba(247, 247, 245, 0.9);
  --noise-opacity: 0.02;
}
