/* =====================================================================
   Design Tokens — oberlechner.org
   CSS Custom Properties. Cascade into every Shadow DOM automatically.
   Theme: "Pixel Spectrum" — deep space dark with an aurora accent that
   nods to PIXELSort's photo/video spectrum heritage.
   ===================================================================== */

:root {
  color-scheme: dark;

  /* ---- Brand spectrum — refined, professional (indigo → azure → teal) */
  --spectrum-1: #5b63d3;   /* indigo  */
  --spectrum-2: #4f7cef;   /* azure   */
  --spectrum-3: #2a9fd6;   /* steel blue */
  --spectrum-4: #25b3b0;   /* teal    */
  --spectrum: linear-gradient(
      100deg,
      var(--spectrum-1) 0%,
      var(--spectrum-2) 38%,
      var(--spectrum-3) 70%,
      var(--spectrum-4) 100%);

  /* ---- Accent ------------------------------------------------------- */
  --accent: #7d92e8;
  --accent-strong: #4f6fe0;
  --accent-contrast: #080a10;
  --accent-glow: rgba(79, 111, 224, 0.34);

  /* ---- Surfaces ----------------------------------------------------- */
  --bg: #080a11;
  --bg-2: #0c0f18;
  --surface: rgba(20, 25, 40, 0.55);
  --surface-solid: #11151f;
  --surface-raised: rgba(28, 34, 52, 0.72);
  --border: rgba(130, 150, 195, 0.13);
  --border-strong: rgba(140, 160, 205, 0.26);
  --glass-blur: 18px;

  /* ---- Text --------------------------------------------------------- */
  --text: #e8ecf6;
  --text-muted: #9aa3bd;
  --text-dim: #687090;

  /* ---- Typography --------------------------------------------------- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo,
    Consolas, monospace;
  --fs-hero: clamp(2.6rem, 6vw, 5rem);
  --fs-h1: clamp(2rem, 4vw, 3rem);
  --fs-h2: clamp(1.5rem, 3vw, 2.1rem);
  --fs-h3: 1.2rem;
  --fs-body: 1.02rem;
  --fs-small: 0.86rem;
  --lh: 1.65;

  /* ---- Space / shape ------------------------------------------------ */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --maxw: 1120px;

  /* ---- Effects ------------------------------------------------------ */
  --shadow-soft: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px var(--border),
                 0 20px 60px -20px var(--accent-glow);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.5s;
}

/* ---- Global reset / page chrome ------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Living aurora background — purely decorative, GPU-cheap */
body::before {
  content: "";
  position: fixed;
  inset: -30vmax;
  z-index: -2;
  background:
    radial-gradient(42vmax 42vmax at 16% 10%, rgba(79, 111, 224, 0.18), transparent 60%),
    radial-gradient(38vmax 38vmax at 86% 16%, rgba(42, 159, 214, 0.13), transparent 60%),
    radial-gradient(46vmax 46vmax at 72% 94%, rgba(37, 179, 176, 0.10), transparent 62%);
  filter: blur(20px);
  animation: drift 26s var(--ease) infinite alternate;
}

/* Fine pixel-grid texture, evokes the "PIXEL" brand */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  pointer-events: none;
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2vmax, 3vmax, 0) scale(1.08); }
}

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

/* Focus ring for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
