/* ==========================================================================
   Base: reset, typography, layout primitives, accessibility helpers
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-900);
  color: var(--cream-100);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

:where(ul[class], ol[class]) {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

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

:focus-visible {
  outline: 3px solid var(--volt-400);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--volt-400);
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: var(--pop-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Section scaffolding ---------- */

.section {
  position: relative;
  padding-block: clamp(4.5rem, 10vw, 8.5rem);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--volt-400);
}

.eyebrow::before {
  content: "";
  width: 0.9em;
  height: 1em;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 52%, 50% 100%, 0 52%);
}

.h2 {
  font-size: clamp(2.6rem, 6.2vw, 5.4rem);
  font-style: italic;
}

.h2 .accent {
  color: var(--volt-400);
}

.lead {
  margin-top: 1.25rem;
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.5;
  color: rgba(255, 244, 224, 0.86);
  max-width: 60ch;
}

/* Wave edge between sections: a stretch of cape cloth */
.edge {
  position: absolute;
  left: 0;
  width: 100%;
  height: clamp(36px, 5vw, 72px);
  pointer-events: none;
  z-index: 2;
}

.edge--top {
  top: 1px;
  transform: translateY(-100%);
}

.edge path {
  fill: currentColor;
}

/* ---------- Scroll reveals ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
