/* ============================================================
   QUARTZ SPACE — Design Tokens + Base
   Тёмная тихая роскошь. Deep Navy / Graphite / Mirror Black / Gold
   ============================================================ */

:root {
  /* Type scale (fluid) */
  --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, 1rem + 6vw, 7rem);

  /* Spacing (4px base) */
  --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;

  /* Brand palette (raw) */
  --navy: #0A1F44;
  --graphite: #1E1E1E;
  --mirror-black: #0D0E10;
  --gold: #D4AF37;
  --gold-soft: #E3C667;
  --silver-mist: #C7CED8;
  --ash-white: #F5F5F2;
  --white: #FFFFFF;

  /* Fonts */
  --font-display: 'Montserrat', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-accent: 'Cormorant Garamond', 'Georgia', serif;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 680px;
  --content-default: 1040px;
  --content-wide: 1320px;

  /* Layered easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== DARK THEME (default / main) ===== */
:root,
[data-theme='dark'] {
  --color-bg: #0D0E10;            /* Mirror Black */
  --color-surface: #121420;       /* navy-tinted graphite */
  --color-surface-2: #16192a;     /* deeper navy surface */
  --color-surface-offset: #0A1428;
  --color-border: #2a3550;
  --color-divider: #1c2236;

  --color-text: #F5F5F2;          /* Ash White */
  --color-text-muted: #C7CED8;    /* Silver Mist */
  --color-text-faint: #8a93a6;
  --color-text-inverse: #0D0E10;

  --color-accent: #D4AF37;        /* Gold */
  --color-accent-hover: #E3C667;
  --color-accent-soft: rgba(212, 175, 55, 0.14);

  --color-navy: #0A1F44;
  --hero-overlay: linear-gradient(180deg, rgba(10,20,40,0.45) 0%, rgba(13,14,16,0.70) 60%, rgba(13,14,16,0.96) 100%);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.45);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);

  --header-bg: rgba(13, 14, 16, 0.82);
  --header-border: rgba(212, 175, 55, 0.18);
}

/* ===== LIGHT THEME ===== */
[data-theme='light'] {
  --color-bg: #F5F5F2;            /* Ash White */
  --color-surface: #ffffff;
  --color-surface-2: #efefe9;
  --color-surface-offset: #e9eaf0;
  --color-border: #d6d9e0;
  --color-divider: #e4e5ea;

  --color-text: #14182a;
  --color-text-muted: #45506b;
  --color-text-faint: #7a8295;
  --color-text-inverse: #F5F5F2;

  --color-accent: #a8861f;        /* deeper gold for AA on light */
  --color-accent-hover: #8a6f18;
  --color-accent-soft: rgba(168, 134, 31, 0.12);

  --color-navy: #0A1F44;
  --hero-overlay: linear-gradient(180deg, rgba(10,31,68,0.30) 0%, rgba(10,31,68,0.55) 60%, rgba(13,14,16,0.85) 100%);

  --shadow-sm: 0 1px 3px rgba(10,31,68,0.08);
  --shadow-md: 0 8px 28px rgba(10,31,68,0.10);
  --shadow-lg: 0 24px 60px rgba(10,31,68,0.14);

  --header-bg: rgba(245, 245, 242, 0.88);
  --header-border: rgba(10, 31, 68, 0.12);
}

/* ===== Reset / base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  min-height: 100dvh;
  line-height: 1.65;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  text-wrap: balance;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
}
p, li, figcaption { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--color-accent-soft); color: var(--color-text); }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }

a, button, [role='button'], input, textarea, select {
  transition: color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

@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;
  }
  .reveal { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
