:root {
  --accent: #d6001c;
  --accent-hover: #b00018;
  --header-fg: #f8f8f8;
  --header-muted: rgba(248, 248, 248, 0.72);
  --header-bg: rgba(12, 12, 14, 0.55);
  --header-border: rgba(214, 0, 28, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--header-fg);
  background: #0a0a0b;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
  transition: opacity 0.65s ease;
}

body.solid-active .bg {
  opacity: 0;
  pointer-events: none;
}

.bg__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
}

.bg__fade {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.55s ease-out;
}

.bg__fade.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .bg__fade {
    transition: none;
  }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
}

.logo {
  font-family: "Bebas Neue", "Source Sans 3", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: 0.06em;
  color: var(--header-fg);
  text-decoration: none;
  line-height: 1;
}

.logo:hover {
  color: #fff;
}

.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(214, 0, 28, 0.35);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.portal-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 24px rgba(214, 0, 28, 0.45);
}

.portal-btn:active {
  transform: scale(0.98);
}

.scroll-track {
  position: relative;
  z-index: 1;
}

.scroll-stage {
  position: relative;
  z-index: 1;
  /* Total scroll for all frames; linear mapping divides this evenly across 147 steps. */
  min-height: 280vh;
  padding: 7rem 1.5rem 4rem;
  pointer-events: none;
}

/**
 * Short buffer after the sequence (last frame stays fixed here).
 * Keep small — large values feel like endless scrolling (e.g. 200vh ≈ ~20 wheel ticks).
 */
.frame-hold {
  min-height: max(1.5rem, 12vh);
  pointer-events: none;
}

.solid-next {
  position: relative;
  z-index: 2;
  min-height: min(100vh, 720px);
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  background: #12121a;
  color: var(--header-fg);
  border-top: 1px solid var(--header-border);
}

.solid-next__inner {
  max-width: 36rem;
  margin: 0 auto;
}

.solid-next__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.solid-next__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
}

.solid-next__text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--header-muted);
}

@media (prefers-reduced-motion: reduce) {
  .bg {
    transition: none;
  }
}

.hero-copy {
  max-width: 32rem;
  pointer-events: auto;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
}

.lede {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--header-muted);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

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

  .portal-btn {
    transition: none;
  }
}
