/* ════════════════════════════════════════════════════════
   RESET.CSS — Base reset and global element styles
   ════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

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

ul, ol {
  list-style: none;
}

input, textarea {
  font-family: inherit;
}

/* ── Base headings ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.08;
  letter-spacing: -.028em;
}

h1 { font-weight: 800; letter-spacing: -.038em; }
h2 { font-weight: 700; letter-spacing: -.030em; }
h3 { font-weight: 700; letter-spacing: -.022em; }
h4 { font-weight: 600; letter-spacing: -.018em; }

p {
  line-height: 1.78;
  color: var(--text-muted);
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

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

/* ── Ambient background glow (responds to accent color via JS) ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 15% -5%, hsla(232,85%,66%,.07) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 105%, hsla(268,70%,62%,.05) 0%, transparent 50%);
  transition: background var(--t-slow);
}
