:root {
  --blue: #4342ff;
  --lime: #b2f227;
  --forest: #145f48;
  --orange: #fd6728;
  --pink: #edb0f5;
  --cyan: #00d0ff;
  --cream: #f3efe6;
  --ink: #111111;
  --page-bg: var(--blue);
  --fg: var(--lime);
  --nav: #b2f227;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: clip;
}

html {
  scroll-behavior: auto;
}

body {
  font-family: Outfit, system-ui, sans-serif;
  background: var(--page-bg);
  color: var(--fg);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  transition: background 0.15s linear;
}

main {
  overflow-x: clip;
  max-width: 100%;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--lime);
  color: var(--forest);
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 40;
  background: transparent;
}

.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: currentColor;
  color: var(--nav);
  transform-origin: left center;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  color: var(--nav);
  mix-blend-mode: normal;
  pointer-events: none;
}

.nav a,
.nav-toggle,
.nav-close {
  pointer-events: auto;
}

.nav-toggle,
.nav-close {
  display: none;
}

.nav-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  width: 44px;
  height: 44px;
  margin: -8px -6px -8px 0;
  padding: 0;
  cursor: pointer;
}

.nav-toggle:focus-visible,
.nav-close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

body.nav-open {
  overflow: hidden;
}

.nav-toggle-box {
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
  margin: 0 auto;
}

.nav-toggle-box span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.35s var(--ease), opacity 0.25s linear, top 0.35s var(--ease);
}

.nav-toggle-box span:nth-child(1) {
  top: 0;
}

.nav-toggle-box span:nth-child(2) {
  top: 6px;
}

.nav-toggle-box span:nth-child(3) {
  top: 12px;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-brand img {
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.nav-brand img.nav-logo-full {
  display: block;
  height: 28px;
  width: auto;
}

.nav-brand img.nav-logo-icon {
  display: none;
  height: 28px;
  width: auto;
}

.nav nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav nav a {
  opacity: 0.72;
  transition: opacity 0.3s;
}

.nav nav a:hover,
.nav nav a.is-current {
  opacity: 1;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--blue);
  color: var(--lime);
}

.hero-center {
  position: relative;
  z-index: 1;
  width: min(920px, 88vw);
}

.hero-logo {
  width: 100%;
  height: auto;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
}

.scroll-cue i {
  width: 1px;
  height: 42px;
  background: currentColor;
  transform-origin: top;
  animation: cue 1.8s ease-in-out infinite;
}

.stage {
  position: relative;
  height: calc(var(--scenes) * 130vh);
}

.stage-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.stage-bg {
  position: absolute;
  inset: 0;
  background: var(--blue);
  transition: background-color 0.7s var(--ease);
}

.stage-patterns {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.stage-patterns img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease);
}

.stage-slides {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100% - 120px));
  max-width: 100%;
  min-width: 0;
  min-height: 58vh;
}

.stage-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  overflow-x: clip;
  max-width: 100%;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.stage-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.stage-slide,
.stage-slide h2,
.stage-slide .lead,
.stage-slide .eyebrow,
.stage-index {
  color: #fff;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.stage-slide h2,
.card-copy h2,
.finale-kicker {
  font-family: Syne, sans-serif;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  -webkit-hyphens: none;
  text-wrap: balance;
}

.stage-slide h2 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(2rem, 6.2vw, 6.4rem);
}

.lead {
  max-width: 34ch;
  margin: 28px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 400;
  line-height: 1.45;
  opacity: 0.92;
}

.stage-index {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.stage-bar {
  width: 1px;
  height: 88px;
  background: color-mix(in srgb, currentColor 28%, transparent);
  position: relative;
  overflow: hidden;
}

.stage-bar i {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: currentColor;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s linear;
}

.stack {
  position: relative;
}

.card {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  color: #fff;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  will-change: transform;
}

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 16, 0.05) 20%,
    rgba(10, 10, 16, 0.62) 100%
  );
}

.card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 48px 56px;
  max-width: 780px;
}

.card-copy h2 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(2.4rem, 6.2vw, 5.1rem);
}

.card-copy p:last-child {
  margin: 16px 0 0;
  max-width: 42ch;
  font-size: 1.1rem;
  line-height: 1.45;
  opacity: 0.92;
}

.card-plan {
  color: var(--ink);
}

.card-plan .card-copy {
  background: linear-gradient(180deg, transparent, rgba(243, 239, 230, 0.88) 38%);
  max-width: none;
  padding-top: 120px;
}

.stack-single .card {
  position: relative;
}

.finale {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  background: var(--blue);
  color: var(--lime);
}

.finale-logo {
  width: min(720px, 86vw);
  margin-bottom: 48px;
}

.finale-kicker {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.finale-place {
  margin: 14px 0 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 13px;
}

.finale-note {
  margin: 28px 0 0;
  color: #fff;
  opacity: 0.78;
  line-height: 1.5;
  font-size: 15px;
}

@keyframes cue {
  0%,
  100% {
    transform: scaleY(0.35);
    opacity: 0.35;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@media (max-width: 800px) {
  .nav {
    padding: 14px 16px;
  }

  .nav-brand,
  .nav-toggle {
    position: relative;
    z-index: 2;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-close {
    display: inline-flex;
    appearance: none;
    border: 0;
    background: transparent;
    margin-top: 28px;
    padding: 0;
    color: var(--lime);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0.8;
  }

  .nav-close:hover,
  .nav-close:focus-visible {
    opacity: 1;
  }

  .nav nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: max(96px, calc(env(safe-area-inset-top) + 72px)) 28px
      max(48px, env(safe-area-inset-bottom));
    background: var(--blue);
    color: #ffffff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(18px, 0, 0);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease),
      visibility 0.4s;
  }

  .nav nav::before {
    content: "Menú";
    margin-bottom: 18px;
    color: var(--lime);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
  }

  .nav nav a {
    font-family: Syne, sans-serif;
    font-size: clamp(2.1rem, 11vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    text-transform: none;
    color: #ffffff;
    opacity: 1;
  }

  .nav nav a:hover,
  .nav nav a.is-current,
  .nav nav a:focus-visible {
    color: var(--lime);
    opacity: 1;
  }

  .nav.is-open {
    color: var(--lime);
  }

  .nav.is-open nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav.is-open .nav-toggle-box span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
  }

  .nav.is-open .nav-toggle-box span:nth-child(2) {
    opacity: 0;
  }

  .nav.is-open .nav-toggle-box span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
  }

  .nav-brand img.nav-logo-full {
    display: none;
  }

  .nav-brand img.nav-logo-icon {
    display: block;
  }

  .hero-center {
    width: min(880px, 82vw);
  }

  .stage-patterns {
    inset: 0;
  }

  .stage-patterns img {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: scale(1.12);
  }

  .stage-slides {
    position: absolute;
    inset: 96px 20px 36px;
    width: auto;
    min-height: 0;
    height: auto;
  }

  .stage-index {
    display: none;
  }

  .stage-slide h2,
  .card-copy h2 {
    letter-spacing: -0.03em;
    line-height: 0.98;
  }

  .stage-slide h2 {
    font-size: clamp(1.45rem, 6.2vw, 2.1rem);
  }

  .lead {
    max-width: 36ch;
    margin-top: 18px;
    font-size: 0.98rem;
  }

  .card-copy {
    padding: 24px 18px 32px;
    max-width: 100%;
  }

  .card-copy h2 {
    font-size: clamp(1.5rem, 6.4vw, 2.15rem);
  }

  .card-copy p:last-child {
    font-size: 0.95rem;
  }

  .finale {
    padding: 64px 20px;
  }

  .finale-logo {
    width: min(720px, 82vw);
    margin-bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage {
    height: auto;
  }

  .stage-pin {
    position: relative;
    height: auto;
    min-height: 100svh;
  }

  .stage-slide {
    position: relative;
    opacity: 1;
    transform: none;
    padding: 18vh 0;
  }

  .stage-patterns,
  .scroll-cue i {
    animation: none;
  }

  .card {
    position: relative;
  }

  .nav nav,
  .nav-toggle-box span {
    transition: none;
  }
}
