/* ───────────────────────────────────────
   FILE: css/base.css
   PURPOSE: Reset, body, film-grain overlay, ::selection, common .section-label,
            reveal-on-scroll animations, fixed background + glass scaffold, smooth scroll.
   PART OF: Sentinel website stylesheet (split from css/styles.css)
   LAST UPDATED: 2026-06-05
   ─────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* film-grain scanline overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.035) 2px 4px),
    radial-gradient(ellipse at top, rgba(212,148,12,0.04), transparent 60%);
  pointer-events: none;
  z-index: 1000;
  mix-blend-mode: normal;
}

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

/* common labels */
.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--accent);
  text-transform: uppercase;
}

/* reveal on scroll — keyframe-based (transitions are unreliable when
   the host iframe has prefers-reduced-motion). Elements start translated
   and lift on .in via a real CSS animation. */
.reveal { transform: translateY(18px); }
.reveal.in { animation: revealUp .8s var(--ease-out) forwards; }
.reveal-stagger > * { transform: translateY(14px); }
.reveal-stagger.in > * { animation: revealUp .7s var(--ease-out) forwards; }
@keyframes revealUp { to { transform: none; } }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.10s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.20s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.30s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 0.40s; }

/* section-label — a thin amber line draws in beneath labels */
.section-label {
  position: relative;
}
.section-label::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--accent);
  margin-top: 12px;
  transform-origin: left center;
  transform: scaleX(0);
  animation: labelDraw 1s .15s var(--ease-out) forwards;
  width: 60px;
}
@keyframes labelDraw { to { transform: scaleX(1); } }

/* ─── FIXED BACKGROUND + SMOOTH SCROLL (Part 3) ─────────── */
.bg-fixed {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-rings {
  position: absolute;
  width: min(100vw, 100vh);
  height: min(100vw, 100vh);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.12;
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#2c2c28 1px, transparent 1px),
    linear-gradient(90deg, #2c2c28 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.22;
}
html, body {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
}
