:root {
  --wildfall-intro-mint: #a8fff0;
  --wildfall-intro-ink: #03080a;
}

body.wildfallIntroActive {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.wildfallIntroPreload {
  position: fixed;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  pointer-events: none;
}

.wildfallIntro {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  min-block-size: 100svh;
  min-block-size: 100dvh;
  overflow: hidden;
  background: #020608;
  color: #f3fffc;
  opacity: 1;
  isolation: isolate;
  transition: opacity 180ms ease;
  -webkit-user-select: none;
  user-select: none;
}

.wildfallIntro.is-exiting {
  opacity: 0;
  pointer-events: none;
}

.wildfallIntroStage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 70%, rgba(38, 176, 159, 0.17), transparent 33%),
    linear-gradient(#051116, #020608 72%);
}

.wildfallIntro video,
.wildfallIntroStill {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
}

.wildfallIntro video {
  z-index: 1;
  object-fit: cover;
  object-position: 50% 50%;
  background: #020608;
}

.wildfallIntro video.is-hidden {
  visibility: hidden;
}

.wildfallIntroStill {
  z-index: 0;
  background-image: var(--intro-still), linear-gradient(#07161a, #020608);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.012);
  filter: saturate(0.75) brightness(0.67) contrast(1.12);
  transition: opacity 480ms ease;
}

.wildfallIntro--reduced .wildfallIntroStill,
.wildfallIntro--fallback .wildfallIntroStill {
  z-index: 2;
}

.wildfallIntroStill.is-active {
  opacity: 1;
}

.wildfallIntroStill[data-shot="vera"] {
  filter: saturate(0.86) brightness(0.78) contrast(1.05);
}

.wildfallIntroStill[data-shot="crown"] {
  filter: saturate(0.76) brightness(0.64) contrast(1.2) hue-rotate(315deg);
}

.wildfallIntroStill[data-shot="wildfall"] {
  filter: saturate(0.48) brightness(0.48) contrast(1.36);
}

.wildfallIntroStill[data-shot="fleet"] {
  filter: grayscale(0.82) saturate(0.42) brightness(0.25) contrast(1.3);
}

.wildfallIntroStill[data-shot="signal"] {
  filter: saturate(0.48) brightness(0.28) contrast(1.28);
}

.wildfallIntroStill[data-shot="wake"] {
  filter: saturate(0.92) brightness(0.72) contrast(1.18);
}

.wildfallIntroShade {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(1, 5, 7, 0.58), transparent 22%, transparent 67%, rgba(1, 5, 7, 0.76)),
    radial-gradient(ellipse at center, transparent 48%, rgba(0, 3, 5, 0.48) 100%);
}

.wildfallIntroSkip,
.wildfallIntroSound {
  position: absolute;
  z-index: 7;
  min-block-size: 44px;
  border: 1px solid rgba(168, 255, 240, 0.32);
  border-radius: 999px;
  background: rgba(4, 14, 18, 0.76);
  color: rgba(238, 255, 251, 0.9);
  font: 600 0.72rem/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.14em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.wildfallIntroSkip {
  inset-block-start: max(16px, calc(env(safe-area-inset-top) + 8px));
  inset-inline-end: max(16px, calc(env(safe-area-inset-right) + 12px));
  padding: 0 18px;
}

.wildfallIntroSound {
  inset-block-end: max(88px, calc(env(safe-area-inset-bottom) + 74px));
  inset-inline-start: 50%;
  translate: -50% 0;
  padding: 0 20px;
  color: var(--wildfall-intro-mint);
}

.wildfallIntroSkip:focus-visible,
.wildfallIntroSound:focus-visible {
  outline: 2px solid var(--wildfall-intro-mint);
  outline-offset: 3px;
}

.wildfallIntroCaption {
  position: absolute;
  z-index: 6;
  overflow: hidden;
  inline-size: 1px;
  block-size: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: pre-line;
}

.wildfallIntro--reduced .wildfallIntroCaption,
.wildfallIntro--fallback .wildfallIntroCaption {
  inset-inline: max(28px, calc(env(safe-area-inset-left) + 22px)) max(28px, calc(env(safe-area-inset-right) + 22px));
  inset-block-end: max(120px, calc(env(safe-area-inset-bottom) + 108px));
  overflow: visible;
  inline-size: auto;
  block-size: auto;
  clip: auto;
  clip-path: none;
  color: #f5fffd;
  font: 700 clamp(1.18rem, 5.2vw, 1.76rem)/1.18 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.09em;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.98), 0 0 3px rgba(0, 0, 0, 0.9);
}

.wildfallIntro--reduced .wildfallIntroCaption[data-placement="upper"],
.wildfallIntro--fallback .wildfallIntroCaption[data-placement="upper"] {
  inset-block-start: max(116px, calc(env(safe-area-inset-top) + 104px));
  inset-block-end: auto;
}

.wildfallIntroLive {
  position: absolute;
  overflow: hidden;
  inline-size: 1px;
  block-size: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wildfallIntroProgress {
  position: absolute;
  z-index: 7;
  inset-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
  inset-block-end: max(18px, calc(env(safe-area-inset-bottom) + 8px));
  block-size: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(206, 255, 247, 0.16);
}

.wildfallIntroProgress i {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #6eead6, #effffb);
}

.wildfallIntroHandoff {
  position: absolute;
  z-index: 8;
  inset-inline: 24px;
  inset-block-start: 30%;
  color: var(--wildfall-intro-mint);
  font: 750 clamp(1rem, 4.8vw, 1.5rem)/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.18em;
  text-align: center;
  text-shadow: 0 0 18px rgba(93, 255, 224, 0.44), 0 2px 10px #000;
  opacity: 0;
  transition: opacity 180ms ease;
}

.wildfallIntro.is-handoff .wildfallIntroHandoff {
  opacity: 1;
}

.wildfallIntro.is-handoff .wildfallIntroSkip,
.wildfallIntro.is-handoff .wildfallIntroProgress,
.wildfallIntro.is-handoff .wildfallIntroSound {
  opacity: 0;
  pointer-events: none;
}

.wildfallIntroArchiveEntry {
  border-color: color-mix(in srgb, #75f5dc 36%, transparent) !important;
}

@media (min-aspect-ratio: 3 / 4) {
  .wildfallIntro video {
    object-fit: contain;
  }

  .wildfallIntroStage {
    inset-inline: max(0px, calc((100vw - 56.25vh) / 2));
  }
}

@media (prefers-reduced-motion: reduce) {
  .wildfallIntro,
  .wildfallIntroStill,
  .wildfallIntroHandoff {
    transition-duration: 1ms !important;
  }
}
