/* ==========================================================================
   COFFEE RAYON — Industrial Loft Design Tokens (Dark Loft & Light Concrete)
   ========================================================================== */

:root,
[data-theme="dark"] {
  color-scheme: dark;

  /* 60% Backgrounds & Concrete Surfaces */
  --color-bg: #121211;
  --color-bg-alt: #181816;
  --color-surface: #1E1D1B;
  --color-surface-elevated: #262522;
  --color-header-bg: rgb(18 18 17 / 0.88);
  --color-overlay: rgb(10 10 9 / 0.88);

  /* 30% Steel Grid & Chalk Typography (WCAG AAA / AA+) */
  --color-border: #302E2A;
  --color-border-strong: #4A463E;
  --color-text: #F5F2EB;
  --color-text-muted: #B6AFA4;
  --color-text-subtle: #8F897E;

  /* 10% Brand Warm Sand / Timber Accent + Ceramic Olive */
  --color-accent: #F0D59E;
  --color-accent-hover: #F7E4BD;
  --color-accent-ink: #141412;
  --color-accent-soft: rgb(240 213 158 / 0.12);
  --color-olive: #9EB384;
  --color-olive-soft: rgb(158 179 132 / 0.14);
  --color-status-open: #6EE7B7;
  --color-status-closed: #FCA5A5;

  /* Shadows & Map Treatment */
  --shadow-card: 0 18px 42px -18px rgb(0 0 0 / 0.65);
  --shadow-soft: 0 6px 20px -8px rgb(0 0 0 / 0.45);
  --map-filter: grayscale(0.88) invert(0.92) contrast(0.92) brightness(0.95);
  --noise-opacity: 0.035;
}

[data-theme="light"] {
  color-scheme: light;

  /* 60% Warm Architectural Concrete & Plaster Surfaces */
  --color-bg: #F1EDE6;
  --color-bg-alt: #E7E2D8;
  --color-surface: #FAF8F3;
  --color-surface-elevated: #FFFFFF;
  --color-header-bg: rgb(241 237 230 / 0.9);
  --color-overlay: rgb(23 22 20 / 0.84);

  /* 30% Forged Black Steel & Graphite Ink (WCAG AAA / AA+) */
  --color-border: #D2CBC0;
  --color-border-strong: #ACA396;
  --color-text: #171614;
  --color-text-muted: #4E4941;
  --color-text-subtle: #6D675D;

  /* 10% Forged Steel CTA + Roasted Oak & Olive Accents */
  --color-accent: #171614;
  --color-accent-hover: #2E2C28;
  --color-accent-ink: #F7E8C8;
  --color-accent-soft: rgb(154 94 31 / 0.12);
  --color-olive: #4A5D36;
  --color-olive-soft: rgb(74 93 54 / 0.12);
  --color-status-open: #15803D;
  --color-status-closed: #B91C1C;

  /* Warm Highlight Specific to Light Theme */
  --color-brand-warm: #8F5519;

  /* Shadows & Map Treatment */
  --shadow-card: 0 18px 40px -22px rgb(23 22 20 / 0.22);
  --shadow-soft: 0 6px 18px -10px rgb(23 22 20 / 0.14);
  --map-filter: grayscale(0.35) contrast(1.02) saturate(0.85);
  --noise-opacity: 0.025;
}

:root {
  --color-brand-warm: #F0D59E;

  /* Typography — Satoshi (Latin) + Onest (Cyrillic/UA match) */
  --font-display: 'Satoshi', 'Onest', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Satoshi', 'Onest', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: clamp(1.5rem, 2.2vw + 1rem, 2rem);
  --text-3xl: clamp(1.85rem, 3vw + 0.9rem, 2.85rem);
  --text-hero: clamp(2.35rem, 4.4vw + 0.9rem, 4rem);

  /* Layout & Spacing */
  --container-max: 1240px;
  --container-pad: clamp(1rem, 3vw, 2rem);
  --section-py: clamp(4rem, 7.5vw, 6.5rem);
  --header-height: 76px;

  /* Architectural Radii (crisp industrial bevels) */
  --radius-xs: 0.25rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 180ms;
  --duration-base: 300ms;
}

[data-theme="light"] {
  --color-brand-warm: #8F5519;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

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