/* ============================================
   BASE.CSS — Reset, Variables, Typography
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Mono:wght@300;400;500&display=swap');

:root {
  /* Colors */
  --base: #050505;
  --base-1: #0a0a0a;
  --base-2: #111111;
  --base-3: #1a1a1a;
  --base-4: #242424;
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.07);
  --border-active: rgba(0,240,255,0.3);

  --cyan: #00f0ff;
  --blue: #0055ff;
  --cyan-dim: rgba(0,240,255,0.15);
  --blue-dim: rgba(0,85,255,0.15);
  --cyan-glow: rgba(0,240,255,0.08);

  --text-primary: #f0f0f0;
  --text-secondary: rgba(240,240,240,0.55);
  --text-muted: rgba(240,240,240,0.3);
  --text-accent: #00f0ff;

  /* Typography */
  --font-head: 'Space Grotesk', sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Spacing */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 3rem;
  --s6: 4rem;
  --s7: 6rem;
  --s8: 8rem;

  /* Radius */
  --r1: 4px;
  --r2: 8px;
  --r3: 12px;
  --r4: 16px;
  --r5: 24px;

  /* Transitions */
  --t1: 0.15s ease;
  --t2: 0.3s ease;
  --t3: 0.5s ease;
  --t4: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  background-color: var(--base);
  color: var(--text-primary);
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.8rem, 7vw, 6rem); font-weight: 700; letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); letter-spacing: -0.02em; }
h4 { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
h5 { font-size: 1rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 500; }

p {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t1);
}

a:hover { color: var(--cyan); }

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

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-head);
}

::selection {
  background: var(--cyan-dim);
  color: var(--cyan);
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--base); }
::-webkit-scrollbar-thumb { background: var(--base-4); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* Utility */
.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;
}

.mono { font-family: var(--font-mono); }
.accent { color: var(--cyan); }
.accent-blue { color: var(--blue); }
.dim { color: var(--text-muted); }

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}
