/* style.css — design tokens + component styles */

/* ---------- Type Scale ---------- */
:root {
  --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);

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

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ---------- Fonts ---------- */
  --font-display: 'Switzer', 'Helvetica Neue', sans-serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;
}

/* ---------- Color — monochrome / brass accent ---------- */
:root,
[data-theme='light'] {
  --color-bg: #f1eee7;
  --color-surface: #f8f6f1;
  --color-text: #1c1a17;
  --color-text-muted: #6f6a61;
  --color-text-faint: #a8a196;
  --color-border: #d9d3c7;

  --color-primary: #a3764a;
  --color-primary-hover: #8a5f38;

  --scene-bg: #f1eee7;
  --scene-fill: 0.55;
  --scene-key: 2.4;
  --scene-base: #b7b1a6;
}

[data-theme='dark'] {
  --color-bg: #0b0b0a;
  --color-surface: #131211;
  --color-text: #eae6dd;
  --color-text-muted: #8d887e;
  --color-text-faint: #4d4a44;
  --color-border: #26241f;

  --color-primary: #d1a06a;
  --color-primary-hover: #e0b483;

  --scene-bg: #0b0b0a;
  --scene-fill: 0.85;
  --scene-key: 2.9;
  --scene-base: #9d9890;
}

/* ---------- Layout ---------- */

html,
body {
  background: var(--color-bg);
  overscroll-behavior-y: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
  touch-action: pan-y;
}

.scroll-track {
  position: relative;
  height: 500vh;
  z-index: 0;
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: color-mix(in oklab, var(--color-bg) 70%, transparent);
  backdrop-filter: blur(6px);
}

.theme-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

