/* ═══════════════════════════════════════════════
   VERRATON KRIEGER — BASE & RESET
   css/base.css
   ═══════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--size-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol { list-style: none; }

::selection {
  background: var(--gold);
  color: var(--ink);
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-modal);   /* Always on top, pointer-events none */
  opacity: 0.35;
  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.04'/%3E%3C/svg%3E");
}

/* ── SCROLL BEHAVIOUR ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── FOCUS STYLES (accessibility) ── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ── SKIP LINK (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--gold);
  color: var(--ink);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  z-index: calc(var(--z-modal) + 1);
  transition: top 0.2s;
}
.skip-link:focus { top: var(--space-4); }

/* ── UTILITY CLASSES ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--section-pad-x);
}

/* ── SECTION DEFAULTS ── */
section {
  padding: var(--section-pad-y) var(--section-pad-x);
  position: relative;
}

.section-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  font-style: italic;
  letter-spacing: var(--tracking-wide);
  color: var(--gold);
  margin-bottom: var(--space-3);
  text-transform: lowercase;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  color: var(--parchment);
  margin-bottom: var(--space-6);
}
.section-title em {
  font-style: italic;
  color: var(--gold);
}

.section-body {
  font-size: var(--size-base);
  line-height: var(--leading-loose);
  color: var(--muted);
  max-width: var(--reading-width);
}

.gold-rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: var(--space-8) 0;
}

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--transition-slower), transform var(--transition-slower);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.35s; }
.reveal-delay-4 { transition-delay: 0.5s; }

/* ── KEYFRAMES ── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
