/* ==========================================================================
   Daredevil: Born Again — Cinematic Storytelling
   Continuous film-reel · seamless scene blends · pin-based climax
   Order: variables → base → atmosphere → layout → components → scenes → a11y → responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables
   -------------------------------------------------------------------------- */
:root {
  --background: #050505;
  --dark-red: #3b0000;
  --daredevil-red: #9d0b0b;
  --blood-red: #d11a2a;
  --text-primary: #e8e4df;
  --text-secondary: #8b8682;
  --gold: #a88852;
  --white-soft: #f2efe9;
  --black: #000000;
  --void: #030303;

  --font-display: "Cinzel", "Times New Roman", "Georgia", serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 10rem;

  --content-max: 72rem;
  --content-narrow: 42rem;
  --header-pad: clamp(1.25rem, 4vw, 3rem);

  --ease-cinematic: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fade-h: clamp(6rem, 14vh, 12rem);

  --progress-h: 2px;
  --z-atmosphere: 1;
  --z-rain: 40;
  --z-grain: 9000;
  --z-progress: 9500;

  /* Atmosphere intensity driven by JS (0–1) */
  --mood-red: 0.12;
  --mood-gold: 0;
  --mood-cold: 0.04;
}

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

html {
  background: var(--background);
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

em {
  font-style: italic;
  color: var(--text-primary);
}

::selection {
  background: var(--daredevil-red);
  color: var(--white-soft);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--blood-red);
  color: var(--white-soft);
  text-decoration: none;
  font-weight: 500;
  border-radius: 2px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Progress
   -------------------------------------------------------------------------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--progress-h);
  width: 0%;
  background: linear-gradient(90deg, var(--dark-red), var(--blood-red), var(--gold));
  z-index: var(--z-progress);
  pointer-events: none;
  box-shadow: 0 0 12px rgba(209, 26, 42, 0.45);
}

/* --------------------------------------------------------------------------
   Continuous atmosphere — soft global washes (no hard scene blocks)
   -------------------------------------------------------------------------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: var(--z-atmosphere);
  pointer-events: none;
  mix-blend-mode: screen;
}

.atmosphere__wash {
  position: absolute;
  inset: -10%;
  transition: opacity 0.8s var(--ease-cinematic);
}

.atmosphere__wash--red {
  background: radial-gradient(ellipse 70% 55% at 50% 60%, rgba(157, 11, 11, 0.55), transparent 70%);
  opacity: var(--mood-red);
}

.atmosphere__wash--gold {
  background: radial-gradient(ellipse 55% 45% at 70% 40%, rgba(168, 136, 82, 0.35), transparent 65%);
  opacity: var(--mood-gold);
}

.atmosphere__wash--cold {
  background: radial-gradient(ellipse 60% 50% at 30% 30%, rgba(120, 140, 180, 0.2), transparent 65%);
  opacity: var(--mood-cold);
}

/* --------------------------------------------------------------------------
   Grain / rain / particles
   -------------------------------------------------------------------------- */
.film-grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.065;
  mix-blend-mode: overlay;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grain-shift 0.5s steps(2) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -1%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(0, 0); }
}

.rain-canvas,
.particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-rain);
}

.particle-canvas {
  z-index: calc(var(--z-rain) + 1);
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Film reel — continuous dark canvas (no solid chapter slabs)
   -------------------------------------------------------------------------- */
.film-reel {
  position: relative;
  z-index: 2;
  background: transparent;
}

.scene {
  position: relative;
  isolation: isolate;
}

/* Soft vignette blends between scenes — eliminates hard color edges */
.scene-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--fade-h);
  z-index: 5;
  pointer-events: none;
}

.scene-fade--top {
  top: 0;
  background: linear-gradient(
    180deg,
    var(--background) 0%,
    rgba(5, 5, 5, 0.7) 35%,
    transparent 100%
  );
}

.scene-fade--bottom {
  bottom: 0;
  background: linear-gradient(
    0deg,
    var(--background) 0%,
    rgba(5, 5, 5, 0.7) 35%,
    transparent 100%
  );
}

.scene-fade--into-void {
  background: linear-gradient(
    0deg,
    var(--void) 0%,
    rgba(3, 3, 3, 0.85) 40%,
    transparent 100%
  );
  height: clamp(8rem, 20vh, 16rem);
}

/* --------------------------------------------------------------------------
   Section layout
   -------------------------------------------------------------------------- */
.section {
  min-height: 100vh;
  padding: var(--space-3xl) var(--header-pad);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Transparent base — atmosphere + local gradients paint the mood */
  background: transparent;
}

.section__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content-narrow);
  margin: 0 auto;
}

.section__inner--wide {
  max-width: var(--content-max);
}

.section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.section__bg-image {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.section__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 5, 0.55) 0%,
    rgba(5, 5, 5, 0.35) 45%,
    rgba(5, 5, 5, 0.75) 100%
  );
}

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 2.5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.section__title--gold {
  color: var(--gold);
}

.section__lead {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.section__lead.accent {
  color: var(--blood-red);
}

.section__lead.accent-gold {
  color: var(--gold);
}

.section__body {
  color: var(--text-secondary);
  max-width: 38rem;
  margin-top: var(--space-lg);
}

/* Chapter label */
.chapter-label {
  position: absolute;
  top: var(--header-pad);
  left: var(--header-pad);
  z-index: 6;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(12px);
}

.chapter-label.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s var(--ease-cinematic), transform 0.8s var(--ease-cinematic);
}

.chapter-label__num {
  color: var(--blood-red);
  font-size: 0.75rem;
  font-weight: 700;
}

.chapter-label__name {
  font-size: 0.7rem;
  font-weight: 400;
}

.chapter-label--light .chapter-label__num {
  color: var(--gold);
}

/* Reveal defaults */
.reveal {
  opacity: 1;
  transform: none;
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
}

.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s var(--ease-cinematic), transform 0.9s var(--ease-cinematic);
}

.mask-reveal {
  position: relative;
  overflow: hidden;
}

.js-ready .mask-reveal {
  clip-path: inset(0 100% 0 0);
}

.js-ready .mask-reveal.is-revealed {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.2s var(--ease-cinematic);
}

/* Traits */
.trait-list {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.trait {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-left: 1px solid rgba(157, 11, 11, 0.35);
  padding-left: 1rem;
}

.trait__label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blood-red);
}

.trait-list--gold .trait {
  border-left-color: rgba(168, 136, 82, 0.4);
}

.trait-list--gold .trait__label {
  color: var(--gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background 0.35s var(--ease-cinematic), color 0.35s, border-color 0.35s, transform 0.25s;
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--daredevil-red);
  color: var(--white-soft);
  border-color: var(--daredevil-red);
}

.btn--primary:hover {
  background: var(--blood-red);
  border-color: var(--blood-red);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(232, 228, 223, 0.3);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ==========================================================================
   SCENES
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--void);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-image {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(160deg, rgba(59, 0, 0, 0.55) 0%, transparent 55%),
    linear-gradient(0deg, rgba(5, 5, 5, 0.92) 0%, transparent 42%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.25) 0%, transparent 35%, rgba(5, 5, 5, 0.7) 100%),
    url("assets/images/hero-hells-kitchen.webp"),
    radial-gradient(ellipse 90% 70% at 50% 80%, #2a0808 0%, #050505 65%);
}

.hero__bg-image::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28%;
  background: linear-gradient(90deg,
    transparent 0%,
    #0a0a0a 2%, #0a0a0a 4%, transparent 4.5%,
    #080808 8%, #080808 11%, transparent 11.5%,
    #0c0c0c 15%, #0c0c0c 18%, transparent 18.5%,
    #070707 22%, #070707 28%, transparent 28.5%,
    #0a0a0a 32%, #0a0a0a 35%, transparent 35.5%,
    #090909 40%, #090909 48%, transparent 48.5%,
    #0b0b0b 52%, #0b0b0b 55%, transparent 55.5%,
    #080808 60%, #080808 68%, transparent 68.5%,
    #0a0a0a 72%, #0a0a0a 78%, transparent 78.5%,
    #090909 82%, #090909 90%, transparent 90.5%,
    #0c0c0c 94%, #0c0c0c 98%, transparent 100%
  );
  opacity: 0.85;
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%, transparent 0%, rgba(5, 5, 5, 0.55) 70%, rgba(5, 5, 5, 0.9) 100%),
    linear-gradient(180deg, rgba(59, 0, 0, 0.25) 0%, transparent 40%, rgba(5, 5, 5, 0.85) 100%);
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  box-shadow: inset 0 0 120px 40px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-lg);
  will-change: transform, opacity, filter;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fade-up 1.2s var(--ease-cinematic) 0.3s forwards;
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.hero__line {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
}

.hero__line--daredevil {
  font-size: clamp(2.75rem, 1.5rem + 7vw, 7rem);
  color: var(--text-primary);
  text-shadow: 0 0 40px rgba(209, 26, 42, 0.35);
  animation: fade-up 1.4s var(--ease-cinematic) 0.7s forwards;
}

.hero__line--born {
  font-size: clamp(1.5rem, 0.9rem + 3vw, 3rem);
  color: var(--blood-red);
  letter-spacing: 0.35em;
  animation: fade-up 1.4s var(--ease-cinematic) 1.4s forwards;
}

.hero__tagline {
  margin-top: var(--space-lg);
  font-weight: 300;
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.15rem);
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  opacity: 0;
  animation: fade-up 1.2s var(--ease-cinematic) 2.1s forwards;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fade-up 1s var(--ease-cinematic) 2.8s forwards;
}

.scroll-hint__text {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.scroll-hint__line {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, var(--blood-red), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ---------- Prologue ---------- */
.prologue__bg-image {
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.35), rgba(5, 5, 5, 0.88)),
    url("assets/images/city-street.webp"),
    linear-gradient(135deg, #0d0d0d 0%, #1a0808 50%, #0a0a0a 100%);
  background-size: cover;
  background-position: center 45%;
  background-repeat: no-repeat;
}

.prologue__overlay {
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.88) 0%, rgba(5, 5, 5, 0.45) 55%, rgba(5, 5, 5, 0.75) 100%),
    linear-gradient(180deg, transparent 0%, rgba(59, 0, 0, 0.2) 100%);
}

.prologue__lines {
  margin: var(--space-xl) 0;
}

.prologue__line {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1rem + 1.5vw, 2.25rem);
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.prologue__line:nth-child(2) {
  color: var(--text-secondary);
  padding-left: 1.5rem;
}

.prologue__line:nth-child(3) {
  color: var(--blood-red);
  padding-left: 3rem;
}

.siren-glow {
  position: absolute;
  top: 20%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  max-width: 480px;
  max-height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 26, 42, 0.18) 0%, transparent 70%);
  filter: blur(40px);
  animation: siren-breathe 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.siren-glow::before {
  content: "";
  position: absolute;
  top: 30%;
  left: -60%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40, 80, 180, 0.12) 0%, transparent 70%);
  animation: siren-breathe 4s ease-in-out infinite 2s;
}

@keyframes siren-breathe {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ---------- Matt — soft day→night wash, no solid slab ---------- */
.matt__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 14, 0.55) 0%,
    rgba(5, 5, 5, 0.25) 40%,
    rgba(18, 5, 5, 0.45) 100%
  );
}

.matt__bg-day {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(220, 220, 230, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 30% 20%, rgba(200, 200, 220, 0.08), transparent);
  opacity: 1;
}

.matt__bg-night {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 70% 80%, rgba(157, 11, 11, 0.35), transparent),
    linear-gradient(180deg, transparent 30%, rgba(59, 0, 0, 0.45) 100%);
  opacity: 0;
}

.matt__identity {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-xl);
}

.matt__portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 320px;
  margin: 0 auto;
}

.matt__portrait-img {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, transparent 45%, rgba(5, 5, 5, 0.92) 100%),
    url("assets/images/matt-murdock.webp"),
    linear-gradient(160deg, #1a1a20 0%, #2a1010 40%, #0a0a0a 100%);
  background-size: cover;
  background-position: center 12%;
  background-repeat: no-repeat;
  filter: grayscale(0.25) contrast(1.08) saturate(0.9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.matt__portrait-frame {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(232, 228, 223, 0.12);
  box-shadow: inset 0 0 60px rgba(157, 11, 11, 0.15);
  pointer-events: none;
}

.matt__portrait-frame::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(0deg, rgba(157, 11, 11, 0.35), transparent);
  mix-blend-mode: multiply;
}

.senses {
  position: relative;
  height: 100px;
  margin: var(--space-xl) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blood-red);
}

.senses__wave {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(209, 26, 42, 0.5);
  border-radius: 50%;
  animation: sense-pulse 3s ease-out infinite;
}

.senses__wave--2 { animation-delay: 1s; }
.senses__wave--3 { animation-delay: 2s; }

@keyframes sense-pulse {
  0% { transform: scale(0.4); opacity: 0.8; }
  100% { transform: scale(3.5); opacity: 0; }
}

.senses__heartbeat {
  width: min(100%, 400px);
  height: 60px;
  color: var(--blood-red);
  opacity: 0.7;
}

.senses__line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: heartbeat-draw 3s ease-in-out infinite;
}

@keyframes heartbeat-draw {
  0% { stroke-dashoffset: 600; opacity: 0.3; }
  40% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -200; opacity: 0.2; }
}

/* ---------- Fisk ---------- */
.fisk {
  min-height: 110vh;
}

.fisk__bg {
  background: linear-gradient(
    180deg,
    rgba(5, 5, 5, 0.2) 0%,
    rgba(14, 14, 16, 0.55) 45%,
    rgba(5, 5, 5, 0.35) 100%
  );
}

.fisk__silhouette {
  position: absolute;
  bottom: 0;
  left: 50%;
  /* Centering via GSAP xPercent when animated; CSS fallback below */
  transform: translate3d(-50%, 0, 0);
  width: min(90vw, 700px);
  height: 85%;
  background:
    url("assets/images/wilson-fisk.webp"),
    linear-gradient(180deg, transparent 0%, #1a1a1c 20%, #222226 60%, #0a0a0a 100%);
  background-size: cover;
  background-position: center 18%;
  background-repeat: no-repeat;
  opacity: 0.32;
  filter: contrast(1.15) brightness(0.45) grayscale(0.35);
  mask-image: linear-gradient(180deg, transparent 0%, black 22%, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 22%, black 78%, transparent 100%);
  box-shadow: 0 0 120px 40px rgba(0, 0, 0, 0.8);
  will-change: transform, opacity;
}

.fisk__silhouette::before {
  content: "";
  position: absolute;
  inset: 10% 20% 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(168, 136, 82, 0.12), transparent 60%);
}

.fisk__overlay {
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.88) 0%, rgba(5, 5, 5, 0.4) 50%, rgba(5, 5, 5, 0.8) 100%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.45) 0%, transparent 30%, rgba(5, 5, 5, 0.8) 100%);
}

.fisk__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.fisk__figure {
  aspect-ratio: 4 / 5;
  max-width: 300px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid rgba(168, 136, 82, 0.28);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(168, 136, 82, 0.08);
}

.fisk__figure-img {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, transparent 38%, rgba(5, 5, 5, 0.95) 100%),
    url("assets/images/wilson-fisk.webp"),
    linear-gradient(180deg, #2a2a2e 0%, #1a1a1c 50%, #0a0a0a 100%);
  background-size: cover;
  background-position: center 10%;
  background-repeat: no-repeat;
  filter: grayscale(0.4) contrast(1.12) saturate(0.85);
}

/* ---------- Conflict ---------- */
.conflict {
  /* Soft dual wash instead of hard left/right slabs */
  background: linear-gradient(
    90deg,
    rgba(18, 5, 5, 0.35) 0%,
    rgba(5, 5, 5, 0.1) 50%,
    rgba(12, 10, 6, 0.3) 100%
  );
}

.duel {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  align-items: stretch;
}

.duel__side {
  padding: var(--space-lg);
  border: 1px solid rgba(232, 228, 223, 0.08);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.duel__side--matt {
  background: linear-gradient(135deg, rgba(157, 11, 11, 0.12), transparent 70%);
  border-color: rgba(157, 11, 11, 0.25);
}

.duel__side--fisk {
  background: linear-gradient(225deg, rgba(168, 136, 82, 0.1), transparent 70%);
  border-color: rgba(168, 136, 82, 0.25);
}

.duel__portrait {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  border: 1px solid rgba(232, 228, 223, 0.1);
  overflow: hidden;
  position: relative;
}

.duel__side--matt .duel__portrait {
  border-color: rgba(157, 11, 11, 0.35);
  box-shadow: 0 16px 40px rgba(59, 0, 0, 0.35);
}

.duel__side--fisk .duel__portrait {
  border-color: rgba(168, 136, 82, 0.35);
  box-shadow: 0 16px 40px rgba(20, 16, 8, 0.4);
}

.duel__portrait-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 12%;
  background-repeat: no-repeat;
  filter: grayscale(0.3) contrast(1.08);
  transition: transform 0.8s var(--ease-cinematic), filter 0.8s var(--ease-cinematic);
}

.duel__portrait-img--matt {
  background-image:
    linear-gradient(180deg, transparent 50%, rgba(5, 5, 5, 0.88) 100%),
    url("assets/images/conflict-matt.webp");
}

.duel__portrait-img--fisk {
  background-image:
    linear-gradient(180deg, transparent 50%, rgba(5, 5, 5, 0.88) 100%),
    url("assets/images/conflict-fisk.webp");
}

.duel__side:hover .duel__portrait-img {
  transform: scale(1.04);
  filter: grayscale(0.1) contrast(1.1);
}

.duel__name {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0;
  color: var(--text-primary);
  text-align: center;
}

.duel__side--matt .duel__name { color: var(--blood-red); }
.duel__side--fisk .duel__name { color: var(--gold); }

.duel__traits {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.duel__traits li {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.5rem);
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(232, 228, 223, 0.06);
}

.duel__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md) 0;
  position: relative;
}

.duel__slash {
  position: absolute;
  width: 1px;
  height: 80%;
  background: linear-gradient(180deg, transparent, var(--blood-red), var(--gold), transparent);
  opacity: 0.5;
}

.duel__manifesto {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  line-height: 1.6;
  letter-spacing: 0.06em;
}

.duel__manifesto .accent {
  color: var(--blood-red);
  display: block;
  margin-top: 0.5rem;
}

/* Still gallery — episode frames under collision */
.still-gallery {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(232, 228, 223, 0.06);
}

.still-gallery__label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.still-gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.still-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(232, 228, 223, 0.08);
  background: rgba(5, 5, 5, 0.4);
  margin: 0;
}

.still-card__img {
  aspect-ratio: 16 / 9;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(0.25) contrast(1.08) brightness(0.88);
  transition: transform 1s var(--ease-cinematic), filter 0.8s var(--ease-cinematic);
}

.still-card__img--1 {
  background-image:
    linear-gradient(180deg, transparent 55%, rgba(5, 5, 5, 0.85) 100%),
    url("assets/images/season1-still-1.webp");
}

.still-card__img--2 {
  background-image:
    linear-gradient(180deg, transparent 55%, rgba(5, 5, 5, 0.85) 100%),
    url("assets/images/season1-still-2.webp");
}

.still-card__img--3 {
  background-image:
    linear-gradient(180deg, transparent 55%, rgba(5, 5, 5, 0.85) 100%),
    url("assets/images/season1-still-3.webp");
}

.still-card:hover .still-card__img {
  transform: scale(1.05);
  filter: grayscale(0.05) contrast(1.1) brightness(0.95);
}

.still-card__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: linear-gradient(0deg, rgba(5, 5, 5, 0.92), transparent);
  pointer-events: none;
}

/* ---------- The Fall ---------- */
.fall {
  color: #c8c4c0;
}

.fall__bg {
  background:
    radial-gradient(ellipse 50% 40% at 50% 60%, rgba(59, 0, 0, 0.2), transparent 70%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.15), rgba(8, 6, 6, 0.4));
}

.fall__shards {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.2;
  pointer-events: none;
}

.fall__shards span {
  position: absolute;
  background: linear-gradient(135deg, rgba(232, 228, 223, 0.15), transparent);
  border: 1px solid rgba(232, 228, 223, 0.08);
}

.fall__shards span:nth-child(1) {
  width: 30%; height: 40%; top: 10%; left: 5%;
  transform: rotate(-12deg) skewX(-8deg);
}
.fall__shards span:nth-child(2) {
  width: 20%; height: 35%; top: 30%; right: 10%;
  transform: rotate(18deg) skewY(6deg);
}
.fall__shards span:nth-child(3) {
  width: 25%; height: 25%; bottom: 20%; left: 20%;
  transform: rotate(8deg);
}
.fall__shards span:nth-child(4) {
  width: 15%; height: 40%; top: 15%; left: 45%;
  transform: rotate(-25deg);
}
.fall__shards span:nth-child(5) {
  width: 28%; height: 20%; bottom: 15%; right: 15%;
  transform: rotate(5deg) skewX(10deg);
}

.fall .section__title {
  color: #d0ccc8;
  font-weight: 400;
}

.fall__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.fall__quote {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  border-left: 2px solid rgba(157, 11, 11, 0.5);
  padding-left: 1.25rem;
}

.fall__quote:nth-child(2) {
  margin-left: 1.5rem;
  border-left-color: rgba(209, 26, 42, 0.35);
}

.fall__quote:nth-child(3) {
  margin-left: 3rem;
  border-left-color: rgba(168, 136, 82, 0.3);
}

.fall__mask {
  max-width: 220px;
  aspect-ratio: 1;
  margin: var(--space-xl) auto;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(157, 11, 11, 0.35);
  box-shadow:
    0 0 40px rgba(157, 11, 11, 0.25),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.fall__mask-img {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 45%, transparent 30%, rgba(5, 5, 5, 0.55) 100%),
    url("assets/images/daredevil-mask.webp"),
    radial-gradient(circle at 50% 40%, #3b0000 0%, #1a0000 40%, #050505 70%);
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  filter: grayscale(0.45) contrast(1.18) saturate(0.95);
  opacity: 0.9;
}

/* ---------- Born Again — GSAP-pinned panel inside tall runway ---------- */
.rebirth {
  position: relative;
  /* Tall runway = scrub distance while panel is pinned */
  height: 320vh;
  background: var(--void);
  padding: 0;
  margin: 0;
  /* Bridge from fall into pure black */
  box-shadow:
    inset 0 80px 80px -40px var(--void),
    inset 0 -80px 80px -40px var(--void);
}

.rebirth__panel {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--void);
  /* When GSAP pins, this stays full-viewport */
}

.rebirth__bg {
  position: absolute;
  inset: 0;
  background: var(--void);
}

.rebirth__void {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, #0a0000 0%, var(--void) 70%);
}

.rebirth__glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(
    ellipse 50% 40% at 50% 55%,
    rgba(157, 11, 11, 0) 0%,
    transparent 70%
  );
  will-change: opacity, transform;
  pointer-events: none;
}

.rebirth__rings {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(55vw, 360px);
  height: min(55vw, 360px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.rebirth__rings span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(209, 26, 42, 0.25);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.4);
}

.rebirth__rings span:nth-child(2) {
  inset: -12%;
  border-color: rgba(157, 11, 11, 0.18);
}

.rebirth__rings span:nth-child(3) {
  inset: -28%;
  border-color: rgba(168, 136, 82, 0.12);
}

.rebirth__silhouette {
  position: absolute;
  left: 50%;
  top: 50%;
  /* Use xPercent/yPercent friendly base — GSAP will control transform */
  width: min(72vw, 440px);
  aspect-ratio: 3 / 4;
  margin: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(5, 5, 5, 0.15) 55%, rgba(5, 5, 5, 0.75) 100%),
    url("assets/images/daredevil-silhouette.webp"),
    radial-gradient(ellipse at 50% 40%, #9d0b0b 0%, #3b0000 28%, transparent 62%),
    linear-gradient(180deg, transparent 10%, #1a0000 50%, transparent 90%);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 15%;
  opacity: 0;
  filter: drop-shadow(0 0 40px rgba(209, 26, 42, 0.45)) contrast(1.08) brightness(0.85);
  mask-image: linear-gradient(180deg, black 0%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 70%, transparent 100%);
  will-change: opacity, transform, filter;
  /* Initial placement without fighting GSAP scale */
  transform: translate(-50%, -48%) scale(0.78);
  transform-origin: center center;
}

.rebirth__embers {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(209, 26, 42, 0.7), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(232, 228, 223, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, rgba(209, 26, 42, 0.55), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(168, 136, 82, 0.45), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(232, 228, 223, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 55% 20%, rgba(209, 26, 42, 0.5), transparent),
    radial-gradient(1px 1px at 45% 55%, rgba(209, 26, 42, 0.4), transparent);
  animation: ember-drift 14s linear infinite;
  pointer-events: none;
}

@keyframes ember-drift {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-48px) scale(1.02); }
}

.rebirth__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-lg);
  max-width: 48rem;
  width: 100%;
}

.rebirth__line {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.65rem);
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(24px);
  will-change: opacity, transform;
}

.rebirth__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.5rem + 5vw, 6rem);
  letter-spacing: 0.2em;
  color: var(--blood-red);
  text-shadow:
    0 0 40px rgba(209, 26, 42, 0.5),
    0 0 80px rgba(157, 11, 11, 0.3);
  margin-top: var(--space-xl);
  opacity: 0;
  transform: scale(0.88);
  will-change: opacity, transform;
}

.rebirth__hold {
  margin-top: var(--space-lg);
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0;
}

/* No-JS / reduced-motion: show climax content statically */
.no-motion .rebirth,
.js-fallback .rebirth {
  height: auto;
  min-height: 100vh;
}

.no-motion .rebirth__panel,
.js-fallback .rebirth__panel {
  height: auto;
  min-height: 100vh;
  padding: var(--space-3xl) var(--header-pad);
}

.no-motion .rebirth__line,
.no-motion .rebirth__title,
.no-motion .rebirth__glow,
.no-motion .rebirth__silhouette,
.no-motion .rebirth__embers,
.js-fallback .rebirth__line,
.js-fallback .rebirth__title,
.js-fallback .rebirth__glow,
.js-fallback .rebirth__silhouette,
.js-fallback .rebirth__embers {
  opacity: 1 !important;
  transform: none !important;
}

.no-motion .rebirth__silhouette,
.js-fallback .rebirth__silhouette {
  transform: translate(-50%, -48%) !important;
  opacity: 0.85 !important;
}

.no-motion .rebirth__hold,
.js-fallback .rebirth__hold {
  display: none;
}

/* ---------- Finale ---------- */
.finale {
  min-height: 100vh;
  padding-bottom: var(--space-2xl);
  background: linear-gradient(180deg, var(--void) 0%, #050508 40%, var(--background) 100%);
}

.finale__skyline {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.3) 0%, rgba(5, 5, 5, 0.55) 50%, #050505 100%),
    linear-gradient(0deg, rgba(59, 0, 0, 0.2) 0%, transparent 40%),
    url("assets/images/final-skyline.webp"),
    linear-gradient(180deg, #0a0a12 0%, #120808 40%, #050505 100%);
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
}

.finale__skyline::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(90deg,
    #080808 0%, #080808 3%, transparent 3.2%,
    #0a0a0a 6%, #0a0a0a 9%, transparent 9.2%,
    #070707 12%, #070707 18%, transparent 18.2%,
    #090909 22%, #090909 26%, transparent 26.2%,
    #0b0b0b 30%, #0b0b0b 38%, transparent 38.2%,
    #080808 42%, #080808 45%, transparent 45.2%,
    #0a0a0a 50%, #0a0a0a 58%, transparent 58.2%,
    #070707 62%, #070707 70%, transparent 70.2%,
    #090909 74%, #090909 80%, transparent 80.2%,
    #0c0c0c 84%, #0c0c0c 92%, transparent 92.2%,
    #080808 96%, #080808 100%
  );
  opacity: 0.9;
}

.finale__overlay {
  background:
    radial-gradient(ellipse 60% 40% at 50% 30%, rgba(157, 11, 11, 0.15), transparent 60%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.85) 100%);
}

.finale__inner {
  text-align: center;
  max-width: 36rem;
}

.finale__line {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1rem + 1.2vw, 2rem);
  line-height: 1.5;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
}

.finale__line.accent {
  color: var(--blood-red);
  margin-bottom: var(--space-xl);
}

.finale__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: var(--space-xl) 0 var(--space-2xl);
}

.credits {
  border-top: 1px solid rgba(232, 228, 223, 0.08);
  padding-top: var(--space-lg);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.credits__title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.credits__disclaimer {
  margin-top: var(--space-md);
  font-size: 0.75rem;
  opacity: 0.75;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.credits__disclaimer a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 136, 82, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.credits__disclaimer a:hover {
  color: var(--white-soft);
  border-bottom-color: var(--gold);
}

.credits__meta {
  margin-top: var(--space-md);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .film-grain { animation: none; opacity: 0.04; }

  .scroll-hint__line,
  .siren-glow,
  .siren-glow::before,
  .senses__wave,
  .senses__line,
  .rebirth__embers,
  .hero__eyebrow,
  .hero__line,
  .hero__tagline,
  .scroll-hint {
    animation: none !important;
  }

  .hero__eyebrow,
  .hero__line,
  .hero__tagline,
  .scroll-hint {
    opacity: 1;
    transform: none;
  }

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

  .js-ready .mask-reveal {
    clip-path: none;
  }

  .duel__side:hover .duel__portrait-img,
  .still-card:hover .still-card__img {
    transform: none;
  }

  .chapter-label {
    opacity: 1;
    transform: none;
  }

  .rain-canvas,
  .particle-canvas {
    display: none;
  }

  .atmosphere__wash {
    transition: none;
  }
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 768px) {
  .matt__identity {
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: var(--space-2xl);
  }

  .matt__portrait { margin: 0; }

  .fisk__layout {
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-2xl);
  }

  .fisk__figure { margin: 0 0 0 auto; }

  .duel {
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-lg);
    align-items: stretch;
  }

  .duel__slash {
    width: 1px;
    height: 120px;
  }

  .duel__center {
    min-width: 12rem;
    align-self: center;
  }

  .duel__portrait {
    max-width: 240px;
  }

  .still-gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  .fall__grid { max-width: 36rem; }
}

@media (min-width: 1024px) {
  .section {
    padding: var(--space-3xl) var(--space-xl);
  }

  .prologue__line:nth-child(2) { padding-left: 3rem; }
  .prologue__line:nth-child(3) { padding-left: 6rem; }

  .still-gallery {
    margin-top: var(--space-3xl);
  }

  .matt__portrait {
    max-width: 340px;
  }

  .fisk__figure {
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .trait {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .finale__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn { width: 100%; }

  .rebirth {
    height: 280vh;
  }
}

@media print {
  .film-grain,
  .rain-canvas,
  .particle-canvas,
  .progress-bar,
  .scroll-hint,
  .atmosphere {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .section,
  .rebirth {
    min-height: auto;
    height: auto;
    page-break-inside: avoid;
  }
}
