:root {
  --ink: #0b0b0c;
  --paper: #eaeaea;
  --accent: #ff7a1a;
  --soft: #f6f3ee;
  --font: 'Raleway', system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden
}

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

/* ---------- Intro ---------- */
.intro {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  position: relative
}

.intro img.logo {
  width: min(160px, 40vw);
  margin-bottom: 2rem
}

.intro .kicker {
  font-weight: 300;
  letter-spacing: .35em;
  text-transform: uppercase;
  font-size: .8rem;
  margin-bottom: 1rem
}

.intro h1 {
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: .95;
  letter-spacing: -.02em
}

.intro h1 span {
  display: block;
  font-style: normal;
  font-weight: 300;
  letter-spacing: .02em
}

.intro p {
  max-width: 34rem;
  margin-top: 1.6rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #333
}

.cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .75rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem
}

.cue i {
  width: 1px;
  height: 48px;
  background: var(--ink);
  transform-origin: top;
  animation: cue 1.8s ease-in-out infinite
}

@keyframes cue {
  0% {
    transform: scaleY(0)
  }

  50% {
    transform: scaleY(1)
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom
  }
}

/* ---------- Chapters ---------- */
.chapter {
  position: relative;
  height: var(--len, 450vh)
}

.sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: #111
}

.sticky video,
.sticky svg.world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover
}

.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .6) 100%);
  pointer-events: none
}

.ch-label {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  left: clamp(1rem, 3vw, 2.5rem);
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: .8rem;
  z-index: 3
}

.ch-label b {
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1
}

.ch-label span {
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  font-size: .72rem;
  opacity: .9
}

.caps {
  position: absolute;
  left: clamp(1rem, 4vw, 3rem);
  right: clamp(1rem, 4vw, 3rem);
  bottom: clamp(2.5rem, 8vh, 5rem);
  z-index: 3;
  color: #fff;
  pointer-events: none
}

.caps p {
  position: absolute;
  bottom: 0;
  left: 0;
  max-width: 38rem;
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  opacity: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
  will-change: opacity, transform
}

.caps p.big {
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1;
  max-width: none
}

.caps p.small {
  font-weight: 50;
  font-style: italic;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1;
  text-align: right;
  max-width: none
}

.blackout {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  z-index: 4;
  pointer-events: none
}

.statement {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  pointer-events: none
}

.statement p {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  text-align: center;
  color: #fff;
  opacity: 0;
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-shadow: none;
  will-change: opacity, transform
}

/* Autor de la cita: 33% del tamaño de la frase, sin negrita */
.statement p span {
  display: block;
  margin-top: 1.2em;
  font-size: .33em;
  font-weight: 300;
  letter-spacing: .05em
}

.bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, .15);
  z-index: 6
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent)
}

.new-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: .65rem;
  letter-spacing: .2em;
  padding: .3rem .6rem;
  border-radius: 99px;
  text-transform: uppercase
}

/* Transitions between chapters */
.bridge {
  min-height: 33svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.2rem
}

.bridge.tall {
  min-height: 70svh;
  padding: 4rem 1.2rem
}

.bridge p {
  font-size: clamp(1.3rem, 3.2vw, 2.3rem);
  font-weight: 300;
  max-width: 42rem;
  line-height: 1.35
}

.bridge p strong {
  font-weight: 900;
  font-style: italic
}

/* ---------- Final ---------- */
.final {
  background: var(--ink);
  color: #fff;
  padding: clamp(4rem, 12vh, 8rem) 1.2rem;
  text-align: center
}

.final h2 {
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: .95
}

.final .lead {
  max-width: 40rem;
  margin: 1.6rem auto 3rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #cfcfcf
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto 3rem;
  text-align: left
}

.card {
  border: 1px solid #2c2c2e;
  border-radius: 18px;
  padding: 1.6rem;
  background: #141416
}

.card small {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .2em;
  font-size: .7rem
}

.card h3 {
  font-weight: 800;
  font-size: 1.25rem;
  margin: .6rem 0 .5rem
}

.card p {
  color: #b9b9b9;
  line-height: 1.55;
  font-size: .95rem
}

.ctas {
  display: flex;
  gap: .8rem;
  justify-content: center;
  flex-wrap: wrap
}

.btn {
  display: inline-block;
  padding: .95rem 1.8rem;
  border-radius: 99px;
  font-weight: 800;
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .03em
}

.btn.primary {
  background: #fff;
  color: var(--ink)
}

.btn.ghost {
  border: 1px solid #555;
  color: #fff
}

footer a {
  color: #999;
  text-decoration: none
}

footer a:hover,
footer a:focus-visible {
  color: var(--accent)
}

footer {
  background: var(--ink);
  color: #777;
  text-align: center;
  padding: 0 0 2rem;
  font-size: .75rem;
  letter-spacing: .3em
}

/* ---------- Precargador ---------- */
/* Solo con JS activo: sin JS nadie quitaría el precargador */
.js body.loading {
  overflow: hidden
}

.preloader {
  display: none
}

.js .preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity .8s ease, visibility .8s
}

.preloader.done {
  opacity: 0;
  visibility: hidden
}

.preloader h2 {
  font-weight: 900;
  font-style: italic;
  font-size: clamp(3rem, 12vw, 9rem);
  line-height: 1;
  letter-spacing: -.02em
}

.preloader h2 i {
  font-style: inherit;
  animation: blink 1.4s infinite both
}

.preloader h2 i:nth-child(2) {
  animation-delay: .2s
}

.preloader h2 i:nth-child(3) {
  animation-delay: .4s
}

@keyframes blink {

  0%,
  80%,
  100% {
    opacity: .15
  }

  40% {
    opacity: 1
  }
}

/* Aviso dentro de un capítulo cuyo video aún no termina de bajar */
.ch-loading {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  pointer-events: none;
  transition: opacity .6s ease, visibility .6s
}

.video-ch.ready .ch-loading {
  opacity: 0;
  visibility: hidden
}

.ch-loading h2 {
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -.02em
}

.ch-loading h2 i {
  font-style: inherit;
  animation: blink 1.4s infinite both
}

.ch-loading h2 i:nth-child(2) {
  animation-delay: .2s
}

.ch-loading h2 i:nth-child(3) {
  animation-delay: .4s
}

.preloader .pct,
.ch-loading .pct {
  font-weight: 300;
  letter-spacing: .35em;
  font-size: .8rem;
  opacity: .7
}

/* ---------- Nav dots ---------- */
.dots {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50
}

.dots a {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(128, 128, 128, .45);
  display: block;
  transition: transform .3s, background .3s;
  border: 1px solid rgba(255, 255, 255, .6)
}

.dots a.on {
  background: var(--accent);
  transform: scale(1.4)
}

@media (max-width:600px) {
  .dots {
    right: 8px
  }

  .caps p {
    max-width: 100%
  }
}

/* Celular en vertical: se aleja el video para ver más de la escena, centrado */
@media (max-width:768px) and (orientation:portrait) {
  .sticky video {
    top: 50%;
    bottom: auto;
    height: 60%;
    transform: translateY(-50%)
  }
}
