/* ============================================================
   sub.earth — DESIGN SYSTEM (BUNDLED)
   Pure black & white · cinematic rave · sleek + rounded.
   All CSS bundled for static hosting (Google Cloud Storage)
   ============================================================ */

/* --- FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Archivo+Expanded:wght@500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

/* --- COLORS --- */
:root {
  /* Ink (black surface ramp) */
  --ink-900: #000000;
  --ink-850: #050506;
  --ink-800: #0a0a0b;
  --ink-700: #101012;
  --ink-600: #161618;
  --ink-500: #1e1e21;
  --ink-400: #2a2a2e;

  /* Paper (white) */
  --paper: #ffffff;
  --paper-dim: #f4f4f5;

  /* Text (white @ alpha) */
  --text-primary: rgba(255, 255, 255, 1);
  --text-secondary: rgba(255, 255, 255, 0.66);
  --text-tertiary: rgba(255, 255, 255, 0.42);
  --text-faint: rgba(255, 255, 255, 0.26);
  --text-ghost: rgba(255, 255, 255, 0.14);
  --text-on-paper: #000000;

  /* Lines */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-bright: rgba(255, 255, 255, 0.28);

  /* Semantic surfaces */
  --bg: var(--ink-900);
  --surface-1: var(--ink-800);
  --surface-2: var(--ink-700);
  --surface-3: var(--ink-600);
  --surface-card: rgba(255, 255, 255, 0.025);
  --surface-glass: rgba(10, 10, 11, 0.55);
  --surface-invert: var(--paper);

  /* Interactive fills */
  --fill-hover: rgba(255, 255, 255, 0.06);
  --fill-active: rgba(255, 255, 255, 0.1);
  --fill-faint: rgba(255, 255, 255, 0.04);
}

/* --- TYPOGRAPHY --- */
:root {
  /* Families */
  --font-display: 'Archivo Expanded', 'Archivo', system-ui, sans-serif;
  --font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Weights */
  --w-regular: 400;
  --w-medium: 500;
  --w-semibold: 600;
  --w-bold: 700;
  --w-black: 800;

  /* Display scale (fluid) */
  --fs-mega: clamp(3.5rem, 11vw, 11rem);
  --fs-d1: clamp(2.75rem, 6vw, 5.5rem);
  --fs-d2: clamp(2rem, 4.5vw, 3.5rem);
  --fs-d3: clamp(1.6rem, 3vw, 2.25rem);

  /* Text scale */
  --fs-xl: 1.5rem;
  --fs-lg: 1.25rem;
  --fs-md: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-2xs: 0.6875rem;

  /* Line heights */
  --lh-tight: 1.02;
  --lh-snug: 1.12;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;

  /* Tracking */
  --tr-mega: -0.04em;
  --tr-tight: -0.02em;
  --tr-normal: 0em;
  --tr-wide: 0.04em;
  --tr-label: 0.22em;
  --tr-mono: 0.16em;
}

.t-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--w-regular);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.t-display {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  letter-spacing: var(--tr-tight);
  line-height: var(--lh-tight);
  text-transform: uppercase;
}

.t-body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
}

.t-mono {
  font-family: var(--font-mono);
  letter-spacing: var(--tr-mono);
}

/* --- SPACING & LAYOUT --- */
:root {
  /* Spacing scale (4px base) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;
  --space-40: 160px;

  /* Radii */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Section rhythm */
  --gutter: clamp(20px, 5vw, 80px);
  --section-y: clamp(80px, 12vw, 200px);
  --max-w: 1240px;
  --max-w-text: 60ch;

  /* Control sizing */
  --control-h-sm: 36px;
  --control-h: 48px;
  --control-h-lg: 60px;
}

/* --- EFFECTS --- */
:root {
  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Durations */
  --dur-fast: 140ms;
  --dur: 260ms;
  --dur-slow: 520ms;
  --dur-xslow: 900ms;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.7);
  --shadow-float: 0 40px 120px rgba(0, 0, 0, 0.85), 0 8px 32px rgba(0, 0, 0, 0.6);

  /* White glows */
  --glow-sm: 0 0 24px rgba(255, 255, 255, 0.18);
  --glow: 0 0 60px rgba(255, 255, 255, 0.22);
  --glow-lg: 0 0 140px rgba(255, 255, 255, 0.28);
  --glow-halo: 0 0 200px 40px rgba(255, 255, 255, 0.12);

  /* Hairline ring */
  --ring: inset 0 0 0 1px var(--line);
  --ring-strong: inset 0 0 0 1px var(--line-strong);

  /* Glass blur */
  --blur: blur(20px) saturate(120%);
  --blur-lg: blur(40px) saturate(120%);

  /* Spotlight */
  --spotlight: radial-gradient(75% 75% at 50% 0%,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.075) 16%,
    rgba(255, 255, 255, 0.052) 31%,
    rgba(255, 255, 255, 0.033) 45%,
    rgba(255, 255, 255, 0.018) 59%,
    rgba(255, 255, 255, 0.008) 73%,
    rgba(255, 255, 255, 0.002) 86%,
    rgba(255, 255, 255, 0) 100%);
  --spotlight-soft: radial-gradient(65% 65% at 50% 40%,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.045) 16%,
    rgba(255, 255, 255, 0.031) 31%,
    rgba(255, 255, 255, 0.020) 45%,
    rgba(255, 255, 255, 0.011) 59%,
    rgba(255, 255, 255, 0.005) 73%,
    rgba(255, 255, 255, 0.001) 86%,
    rgba(255, 255, 255, 0) 100%);

  /* Film grain */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.fx-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-size: 160px 160px;
  opacity: 0.06;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
}

.fx-spotlight {
  background-image: var(--spotlight);
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  font-weight: var(--w-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--paper);
  color: var(--ink-900);
}

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

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

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

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--ink-900);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-400);
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink-900);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-500);
}

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

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none !important;
  }
}
