@property --slice {
  syntax: '<number>';
  inherits: false;
  initial-value: 1;
}

:root {
  --hero-key: url('/images/hero/00-eyes-tight-v1.jpg');
  --hero-still: url('/images/hero/00-eyes-v1.jpg');
  --hero-backdrop: url('/images/hero/00-eyes-tight-v1.jpg');
}

.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-backdrop) center / cover no-repeat;
  opacity: 0.6;
}

.splash__portrait {
  position: absolute;
  inset: -12%;
  z-index: -1;
  background: var(--bg) var(--hero-key) center / cover no-repeat;
  filter: blur(42px) brightness(0.32) saturate(1.2);
  animation: key-glow 6s ease-out 0.2s both;
  pointer-events: none;
}

@keyframes key-glow {
  from { filter: blur(60px) brightness(0.1) saturate(1); transform: scale(1.08); }
  to { filter: blur(42px) brightness(0.32) saturate(1.2); transform: scale(1); }
}

.hero {
  position: relative;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg) var(--hero-still) center / cover no-repeat;
}

.hero--run {
  background-image: none;
}

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

.hero--run .hero__stage {
  background: var(--bg);
}

.shot {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  background: var(--bg);
}

.shot.is-on {
  opacity: 1;
}

.shot.is-failed {
  visibility: hidden;
}

.shot__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
}

.shot__media--contain {
  object-fit: contain;
}

.shot__media--pan {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  max-width: none;
  height: 100%;
  object-fit: fill;
}

.shot__media--focus {
  animation: focus-in 2.2s cubic-bezier(0.25, 0.6, 0.2, 1) both;
  animation-play-state: paused;
}

.shot.is-shown .shot__media--focus {
  animation-play-state: running;
}

@keyframes focus-in {
  from { filter: blur(16px); opacity: 0.35; }
  to { filter: blur(0); opacity: 1; }
}

.shot--dissolve {
  animation: dissolve-in var(--enter-ms, 700ms) ease-in-out both;
}

@keyframes dissolve-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.shot--slices {
  --slice: 0;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0, #000 calc(var(--slice) * 16.6667%), transparent calc(var(--slice) * 16.6667%), transparent 16.6667%);
  mask-image: repeating-linear-gradient(90deg, #000 0, #000 calc(var(--slice) * 16.6667%), transparent calc(var(--slice) * 16.6667%), transparent 16.6667%);
  animation: slices-in 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes slices-in {
  from { --slice: 0; }
  to { --slice: 1; }
}

.hero__lift {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--bg-raise);
  mix-blend-mode: lighten;
}

.hero__fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(125% 95% at 50% 42%, transparent 52%, color-mix(in srgb, var(--bg) 75%, transparent) 100%),
    linear-gradient(to top, color-mix(in srgb, var(--bg) 90%, transparent) 0%, color-mix(in srgb, var(--bg) 35%, transparent) 30%, transparent 55%);
}

.hero__fx::after {
  content: '';
  position: absolute;
  inset: -20%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.08;
  mix-blend-mode: overlay;
  animation: grain 0.8s steps(5) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

.hero__flash {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(75% 60% at 50% 40%, var(--ink) 0%, color-mix(in srgb, var(--accent) 80%, transparent) 55%, color-mix(in srgb, var(--accent) 30%, transparent) 100%);
  mix-blend-mode: screen;
}

.hero__flash.is-on {
  animation: flash 700ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

@keyframes flash {
  0% { opacity: 0; }
  10% { opacity: 0.95; }
  100% { opacity: 0; }
}

.hero__claim {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: calc(17svh + env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, calc(var(--colw) * 0.09), 2.75rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-shadow: 0 2px 28px color-mix(in srgb, var(--bg) 80%, transparent);
}

.hero__claim::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  margin: 16px auto 0;
  background: var(--accent);
  opacity: 0.85;
}

.hero__claim[hidden] {
  display: none;
}

.hero__claim.is-in {
  animation: word-in 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes word-in {
  from { opacity: 0; filter: blur(10px); letter-spacing: 0.14em; }
  to { opacity: 1; filter: blur(0); letter-spacing: 0.01em; }
}

.hero__title {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: calc(15svh + env(safe-area-inset-bottom));
  padding: 0 24px;
  text-align: center;
  transition: opacity 1200ms ease 300ms;
}

.hero__title h1 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--track-display);
  margin-right: calc(var(--track-display) * -1);
  font-size: clamp(1.3rem, calc(var(--colw) * 0.06), 1.9rem);
  line-height: 1.2;
}

.hero__by {
  margin-top: 12px;
  margin-right: -0.34em;
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero--run .hero__title {
  opacity: 0;
}

.hero--run.hero--done .hero__title {
  opacity: 1;
}

.hero--bare .hero__title,
.hero--run.hero--bare.hero--done .hero__title {
  opacity: 0;
}

.hero__claims {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: calc(5svh + env(safe-area-inset-bottom));
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.hero__claims[hidden] {
  display: none;
}

.hero--static .hero__claims {
  display: flex;
}

.hero--static .hero__cue {
  display: none;
}

.hero__cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(4svh + env(safe-area-inset-bottom));
  width: 22px;
  height: 36px;
  margin-left: -11px;
  border: 1px solid color-mix(in srgb, var(--ink) 60%, transparent);
  border-radius: 12px;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--bg) 50%, transparent);
  overflow: hidden;
  pointer-events: none;
  transition: opacity 900ms ease 900ms;
}

.hero__cue::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--bg) 80%, transparent);
  animation: cue-dot 2s ease-in-out infinite;
}

@keyframes cue-dot {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 16px); opacity: 0; }
}

.hero--run .hero__cue {
  opacity: 0;
}

.hero--run.hero--done .hero__cue,
.hero--run.hero--live .hero__cue {
  opacity: 1;
}

.hero__mute,
.hero__again,
.hero__skip {
  position: absolute;
  z-index: 4;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-border);
  cursor: pointer;
}

.hero__mute,
.hero__again {
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
}

.hero__mute {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
}

.hero__mute svg {
  width: 20px;
  height: 20px;
  overflow: visible;
}

.hero__mute-body {
  fill: currentColor;
}

.hero__mute-waves,
.hero__mute-cross {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.hero__mute-cross {
  display: none;
}

.hero__mute.is-muted {
  color: var(--accent);
  border-color: var(--accent);
}

.hero__mute.is-muted .hero__mute-waves {
  display: none;
}

.hero__mute.is-muted .hero__mute-cross {
  display: inline;
}

.hero__again,
.hero__skip {
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.65rem;
  line-height: 1;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  border-radius: 999px;
}

.hero__again {
  gap: 10px;
  padding: 11px 18px 11px 15px;
}

.hero__again::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 7px solid var(--accent);
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
}

.hero__skip {
  right: 16px;
  bottom: calc(4svh + env(safe-area-inset-bottom));
  gap: 8px;
  padding: 10px 14px 10px 16px;
  color: var(--ink-1);
  background: color-mix(in srgb, var(--bg) 35%, transparent);
}

.hero__skip::after {
  content: '';
  width: 5px;
  height: 5px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.hero__mute[hidden],
.hero__again[hidden],
.hero__skip[hidden] {
  display: none;
}

.hero ~ .placeholder {
  min-height: 50svh;
}

@media (prefers-reduced-motion: reduce) {
  .splash__portrait,
  .hero__fx::after,
  .hero__cue::before,
  .hero__claim.is-in,
  .shot--dissolve,
  .shot__media--focus,
  .hero__flash.is-on {
    animation: none;
  }
  .shot--slices {
    animation: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero__title,
  .hero__cue {
    transition: none;
  }
}
