/* ════════════════════════════════════════════════════════════
   base.css — Reset, Typography & Shared Utilities
   ════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: 0.015em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ── Typography Roles ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.05; /* Tighter for display typeset */
  letter-spacing: var(--tracking-display);
  font-variation-settings: "opsz" 100;
}

p {
  font-family: var(--font-display);
  font-size: var(--step-0);
  line-height: 1.7;
  max-width: 75ch; /* Optimal line length for reading */
  color: var(--text-soft);
  font-variation-settings: "opsz" 16;
}

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

.mono {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* ── Layout ── */
section {
  padding: var(--space-3xl) var(--space-l);
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: var(--space-l);
}

/* ── Components ── */
.label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--accent);
  margin-bottom: var(--space-s);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: 500;
}

.heading {
  font-size: var(--step-5);
  margin-bottom: var(--space-l);
  font-variation-settings: "opsz" 100;
}

.heading em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent-dark);
  font-weight: 400;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-s) var(--space-l);
  border-radius: 100px;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--ease-out), filter var(--ease-out), box-shadow var(--ease-out);
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-deep);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── 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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.25;
}
