/* ============================================================
   LAYOUT — Page Layout, Section Structure, Overlays
   ============================================================ */

/* ── Main ─────────────────────────────────────────────────── */
main {
  display: flex;
  flex-direction: column;
  gap: 96px;
  /* No padding-top: hero section handles its own top offset via padding-top: 120px */
  padding: 0 24px 120px;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ── Section ──────────────────────────────────────────────── */
section {
  scroll-margin-top: var(--anchor-offset);
  position: relative;
}

/* ── Section Label ────────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  opacity: 0.6;
  margin-bottom: 8px;
}

/* ── Section Header (legacy) ──────────────────────────────── */
.section__header {
  max-width: 680px;
  margin-bottom: 48px;
}

.section__header h2 {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.section__header p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}

/* ── Section Title & Description (HTML BEM) ───────────────── */
.section__title {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.section__description {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 48px;
}

/* ── Nav layout (replaces .header__inner which is absent in HTML) */
.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* ── Noise Overlay ────────────────────────────────────────── */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: 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.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.03;
}

/* ── Dot Grid ─────────────────────────────────────────────── */
.dot-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  /* Scroll-driven hue shift: JS sets --hue-shift on :root via scroll-effects.js */
  filter: hue-rotate(var(--hue-shift, 0deg));
}
