/* ==========================================================================
   THE HELICAL NATURE OF REALITY — QLT Architectural Base Tokens & Reset
   Warm Alabaster Light Mode (#f6f3ee) & Botanical Carbon Dark Mode (#0c0e0c)
   ========================================================================== */

@font-face {
  font-family: "Reckless Condensed";
  src: url("../assets/fonts/RecklessCondensed-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Familjen Grotesk";
  src: url("../assets/fonts/FamiljenGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="light"] {
  --bg: #f6f3ee;
  --bg-subtle: #eeeae2;
  --surface: #fbf9f5;
  --surface-2: #f1ede5;
  --surface-glass: rgba(251, 249, 245, 0.86);
  --stage-bg: #eeebe3;

  --ink: #161816;
  --ink-2: #3f433f;
  --ink-3: #646862;
  --ink-inv: #f6f3ee;

  --border: rgba(22, 24, 22, 0.11);
  --border-strong: rgba(22, 24, 22, 0.22);

  /* QLT Chromatic Accents (WCAG AA/AAA calibrated for Light Alabaster) */
  --violet: #7c449a;
  --violet-soft: rgba(124, 68, 154, 0.11);
  --blue: #2e6d8f;
  --blue-soft: rgba(46, 109, 143, 0.11);
  --gold: #8c6b14;
  --gold-bright: #c9a43d;
  --gold-soft: rgba(140, 107, 20, 0.12);
  --crimson: #a83242;

  --shadow-sm: 0 1px 3px rgba(18, 20, 18, 0.05), 0 1px 2px rgba(18, 20, 18, 0.04);
  --shadow-md: 0 8px 24px rgba(18, 20, 18, 0.07), 0 2px 6px rgba(18, 20, 18, 0.04);
  --shadow-lg: 0 20px 54px rgba(18, 20, 18, 0.14), 0 4px 14px rgba(18, 20, 18, 0.06);

  --hud-bg: rgba(249, 247, 242, 0.84);
  --hud-border: rgba(22, 24, 22, 0.14);
  --hud-ink: #161816;
  --hud-muted: #555954;

  --font-serif: "Reckless Condensed", Georgia, "Times New Roman", serif;
  --font-sans: "Familjen Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --header-h: 62px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0c0e0c;
  --bg-subtle: #121512;
  --surface: #151916;
  --surface-2: #1c211d;
  --surface-glass: rgba(18, 21, 18, 0.86);
  --stage-bg: #090c0a;

  --ink: #f1efe9;
  --ink-2: #c5c9c2;
  --ink-3: #8c928a;
  --ink-inv: #0c0e0c;

  --border: rgba(241, 239, 233, 0.11);
  --border-strong: rgba(241, 239, 233, 0.22);

  /* QLT Luminous Accents calibrated for Botanical Carbon Dark */
  --violet: #b982d6;
  --violet-soft: rgba(185, 130, 214, 0.16);
  --blue: #8fbcd6;
  --blue-soft: rgba(143, 188, 214, 0.15);
  --gold: #e4d57c;
  --gold-bright: #f2e28c;
  --gold-soft: rgba(228, 213, 124, 0.15);
  --crimson: #e06b7b;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.65);

  --hud-bg: rgba(13, 16, 14, 0.78);
  --hud-border: rgba(241, 239, 233, 0.16);
  --hud-ink: #f1efe9;
  --hud-muted: #9fa69e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: clip;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

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

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.serif {
  font-family: var(--font-serif);
}

/* Scrollbar polish */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}
