/* Hero card with brochure backdrop */
.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line-strong);
  background: #07061a url("/addicto-eti.png") no-repeat;
  background-position: 50% 8%;
  background-size: 130% auto;
  aspect-ratio: 4 / 5;
  max-height: 64vh;
  box-shadow: var(--shadow-card-glow);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 35%, transparent 30%, rgba(7, 6, 26, 0.55) 75%, rgba(7, 6, 26, 0.95) 100%),
    radial-gradient(80% 40% at 50% 15%, rgba(255, 0, 153, 0.20), transparent 60%);
  pointer-events: none;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7, 6, 26, 0.92) 100%);
  pointer-events: none;
}
.hero-card__video,
.hero-card__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
@media (prefers-reduced-motion: reduce) {
  .hero-card__video { display: none; }
}
.hero-card .copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--space-5);
  text-align: center;
  z-index: 1;
}
.hero-card .copy .headline {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: clamp(2.25rem, 9vw, 3.5rem);
  line-height: 0.9;
  background: var(--grad-cream);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 28px rgba(255, 0, 153, 0.40);
}
.hero-card .copy .sub {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: var(--fs-xs);
  color: var(--color-cyan);
}
.hero-card .copy .dates {
  display: inline-block;
  margin-top: var(--space-3);
  padding: 5px 12px;
  border: 1px solid var(--color-cyan);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-cyan);
  background: rgba(7, 6, 26, 0.55);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.35);
}

/* Score panel */
.score-panel {
  position: relative;
  text-align: center;
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(255,0,153,0.20), transparent 60%),
    radial-gradient(140% 120% at 0% 100%, rgba(0,229,255,0.18), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.score-panel .greeting { margin-bottom: var(--space-2); }
.score-panel .score { display: block; }
.score-panel .label {
  margin-top: var(--space-3);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-text-soft);
}

/* Stat row */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.stat {
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  text-align: left;
}
.stat .stat-label {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-soft);
  margin-bottom: var(--space-2);
}
.stat .stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.stat .stat-value.accent-magenta { color: var(--color-magenta-soft); }
.stat .stat-value.accent-cyan    { color: var(--color-cyan); }

/* CTA stack */
.cta-stack {
  display: grid;
  gap: var(--space-3);
}

/* How it works steps */
.how-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.how-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}
.how-list .step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-neon);
  color: var(--color-ink-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
}
.how-list .step-body strong {
  display: block;
  font-size: var(--fs-3);
  margin-bottom: 2px;
}
.how-list .step-body span {
  color: var(--color-text-soft);
  font-size: var(--fs-small);
}

/* Reveal-on-scroll sections — opacity + slight upward shift until
   .is-visible is added by reveal_on_scroll_controller.js. */
.reveal-on-scroll-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.reveal-on-scroll-section.is-visible {
  opacity: 1;
  transform: none;
}

/* Reduced-motion master switch — neutralizes every animation/transform
   on the one-page landing. Each subsystem's local @media query already
   handles its own piece (hero video swap, ladder video hide, scroll
   reveal); this consolidated rule is the safety net. */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll-section,
  .reveal-on-scroll-section.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .ladder-rank,
  .ladder-rank--current {
    transition: none !important;
    transform: none !important;
  }
  .ladder-rank video { display: none !important; }
}

/* Level ladder — PNG↔MP4 swap with active/locked treatments. */
.ladder {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
@media (min-width: 600px) {
  .ladder {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-2);
  }
  .ladder-rank { scroll-snap-align: center; flex: 0 0 200px; }
}
.ladder-rank {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.ladder-rank__media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-ink-900);
}
.ladder-rank__png,
.ladder-rank__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ladder-rank__video { opacity: 0; transition: opacity 150ms ease; }
.ladder-rank:hover .ladder-rank__video,
.ladder-rank--current .ladder-rank__video { opacity: 1; }
.ladder-rank__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ladder-rank__name { font-family: var(--font-display); font-size: var(--fs-3); }
.ladder-rank__threshold { color: var(--color-text-soft); font-size: var(--fs-small); }
.ladder-rank__lock {
  color: var(--color-amber-2, #f0b35a);
  font-size: var(--fs-xs);
  margin-top: 4px;
}
.ladder-rank--current {
  transform: scale(1.05);
  box-shadow: 0 0 24px rgba(255, 0, 153, 0.45);
  border-color: var(--color-magenta);
}
.ladder-rank--locked .ladder-rank__png,
.ladder-rank--locked .ladder-rank__video {
  filter: grayscale(1) brightness(0.6);
}
@media (prefers-reduced-motion: reduce) {
  .ladder-rank__video { display: none; }
  .ladder-rank--current { transform: none; }
}

/* One-page shell background — layered PNG (full opacity) +
   GIF (low-opacity overlay for subtle motion). Applied to a wrapper
   class so the existing body radial-gradient stays intact for non-
   landing pages. */
.one-page-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  /* PNG is the instant-paint poster; GIF on ::before plays on top once
     it finishes downloading. */
  background-image: url("/assets/levels/background-d8c554fa.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: hidden;
}
.one-page-shell::before {
  content: "";
  position: fixed;
  inset: -5%;                       /* extra room for the slow zoom */
  z-index: -1;
  pointer-events: none;
  background-image: url("/assets/levels/background-932321f8.gif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.85;
  animation: shellKenBurns 24s ease-in-out infinite alternate;
  will-change: transform;
}
.one-page-shell::after {
  /* Subtle dark vignette so the foreground content stays legible
     against whatever frame of the GIF is showing. */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 50%,
      transparent 40%,
      rgba(7, 6, 26, 0.55) 80%,
      rgba(7, 6, 26, 0.85) 100%);
}
@keyframes shellKenBurns {
  0%   { transform: scale(1.00) translate3d(0, 0, 0); }
  100% { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .one-page-shell::before {
    animation: none;
    opacity: 0.4;            /* still present, just static + dimmer */
  }
}
