:root {
  --ink: #090811;
  --cream: #fff3e5;
  --pink: #ff4fa3;
  --orange: #ff7447;
  --violet: #753ad7;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}
html::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
body {
  margin: 0;
  overflow-x: hidden;
  -ms-overflow-style: none;
  color: var(--cream);
  background: var(--ink);
  font-family: Inter, sans-serif;
}
a {
  color: inherit;
}

.nav {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px 4vw;
  mix-blend-mode: difference;
}
.brand,
footer strong {
  justify-self: start;
  color: white;
  text-decoration: none;
  font:
    1.15rem "Archivo Black",
    sans-serif;
  letter-spacing: -0.08em;
}
.brand span,
footer strong span {
  color: var(--pink);
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 4vw;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
footer p {
  margin: 0;
  color: white;
  opacity: 0.9;
}
.nav-status {
  margin: 0;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-cta {
  justify-self: end;
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.poster {
  height: 300vh;
  background: #170f27;
}
.poster-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(
    140% 110% at 70% 18%,
    #ffd494 0 16%,
    #ff8452 30%,
    #b83273 58%,
    #4a1840 80%,
    #100622 100%
  );
}
.sky {
  display: none;
}
.poster-copy {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 48%;
  width: 100%;
  text-align: center;
  transform: translate(-50%, -50%);
}
.poster-copy p {
  margin: 0 0 18px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}
.poster-copy h1 {
  margin: 0;
  font:
    clamp(6rem, 16vw, 15rem)/0.72 "Archivo Black",
    sans-serif;
  letter-spacing: -0.09em;
  text-shadow: 0.06em 0.06em 0 #572090;
}
.poster-copy h1 span {
  color: #ffd29a;
}
.poster-copy small {
  display: block;
  margin-top: 28px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.poster-team {
  position: absolute;
  z-index: 4;
  inset: 0;
  opacity: 0;
  transform: scale(1.3);
  will-change: transform, opacity;
}
.portrait {
  position: absolute;
  bottom: -2%;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  filter: drop-shadow(0 30px 60px #0006) drop-shadow(0 0 35px #0007)
    saturate(0.92) contrast(1.05);
  will-change: transform;
}
.portrait-freymer {
  z-index: 2;
  left: -3%;
  width: 40%;
  height: 80%;
  background-image: url("assets/freymer.webp");
}
.portrait-edilberto {
  z-index: 4;
  left: 34%;
  width: 32%;
  height: 75%;
  background-image: url("assets/edilberto.webp");
}
.portrait-luis {
  z-index: 3;
  right: -1%;
  width: 38%;
  height: 82%;
  background-image: url("assets/luis.webp");
}
.poster-shade {
  position: absolute;
  z-index: 7;
  inset: 0;
  background: transparent;
  opacity: 0;
}
.poster-intro {
  position: absolute;
  z-index: 8;
  left: 8vw;
  top: 50%;
  transform: translateY(-40%);
  visibility: hidden;
}
.poster-intro p,
.kicker,
.contact > p {
  margin: 0 0 18px;
  color: #ffca90;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.poster-intro h2,
.manifesto h2,
.chapter h2,
.contact h2 {
  margin: 0;
  font:
    clamp(4rem, 10vw, 10rem)/0.82 "Archivo Black",
    sans-serif;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}
.poster-intro em {
  color: var(--pink);
  font-style: normal;
}
.scroll-cue {
  position: absolute;
  z-index: 10;
  right: 4vw;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-cue i {
  font-style: normal;
  font-size: 1.1rem;
}

.manifesto {
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: 12vw 8vw;
  color: var(--ink);
  background: var(--cream);
}
.manifesto h2 {
  max-width: 1200px;
  font-size: clamp(3.8rem, 9vw, 9rem);
}
.manifesto h2 span {
  color: var(--pink);
}
.manifesto > p:last-child {
  max-width: 610px;
  margin: 55px 0 0 auto;
  color: #595360;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.65;
}
.kicker {
  color: var(--pink);
}

.chapter {
  height: 220vh;
  background: var(--ink);
}
.chapter-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  isolation: isolate;
  overflow: hidden;
}
.chapter-photo {
  position: absolute;
  z-index: -3;
  inset: 0;
  background-image: var(--photo);
  background-repeat: no-repeat;
  background-position: 72% bottom;
  background-size: auto 96%;
  filter: saturate(0.9) contrast(1.08) drop-shadow(0 25px 40px #0005);
  transform: scale(1.05);
}
.chapter-freymer .chapter-photo {
  background-position: 82% bottom;
}
.chapter-edilberto .chapter-photo {
  background-position: 72% bottom;
  background-size: auto 108%;
}
.chapter-luis .chapter-photo {
  background-position: 82% bottom;
}
.chapter-overlay {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, #080711ed 0 34%, #08071155 65%, #08071118),
    linear-gradient(0deg, #080711dc, transparent 55%);
}
.chapter:nth-child(even) .chapter-overlay {
  background:
    linear-gradient(270deg, #080711ed 0 34%, #08071155 65%, #08071118),
    linear-gradient(0deg, #080711dc, transparent 55%);
}
.chapter-content {
  position: absolute;
  left: 8vw;
  bottom: 11vh;
  max-width: 880px;
}
.chapter:nth-child(even) .chapter-content {
  right: 8vw;
  left: auto;
  text-align: right;
}
.chapter-role {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.chapter h2 {
  font-size: clamp(4rem, 10vw, 10rem);
  text-shadow: 0.04em 0.04em 0
    color-mix(in srgb, var(--accent), transparent 45%);
}
.chapter-description {
  max-width: 570px;
  margin: 30px 0;
  color: #eee5df;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  line-height: 1.65;
}
.chapter:nth-child(even) .chapter-description {
  margin-left: auto;
}
.chapter-content a,
.contact > a {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 18px 24px;
  border: 1px solid currentColor;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-transform: uppercase;
  transition: 0.25s;
  width: max-content;
}
.contact > a {
  box-shadow: -6px 6px 0 rgba(255, 79, 163, 0.55);
}
.chapter-content a:hover,
.contact > a:hover {
  color: var(--ink);
  background: var(--cream);
  box-shadow: -7px 7px 0 var(--accent, var(--pink));
  transform: translate(4px, -4px);
}
.chapter-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.chapter:nth-child(even) .chapter-links {
  justify-content: flex-end;
}
.chapter-index {
  position: absolute;
  right: 5vw;
  top: 13vh;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  font:
    clamp(6rem, 16vw, 16rem)/1 "Archivo Black",
    sans-serif;
  opacity: 0.8;
}
.chapter:nth-child(even) .chapter-index {
  right: auto;
  left: 5vw;
}

.contact-wrap {
  height: 180vh;
  background: #ff7848;
}
.contact {
  min-height: 100svh;
  position: sticky;
  top: 0;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10vw 8vw;
  overflow: hidden;
  background: linear-gradient(140deg, #5729a9, #d62f8d 58%, #ff7848);
}
.contact-ring {
  position: absolute;
  z-index: -1;
  right: -12vw;
  top: 50%;
  transform: translateY(-50%);
  width: min(70vw, 900px);
  aspect-ratio: 1;
  border: clamp(50px, 8vw, 120px) solid #ffc99922;
  border-radius: 50%;
  box-shadow: 0 0 0 clamp(35px, 5vw, 80px) #ff4fa31f;
}

/* Mismo patron que el resto de secciones: wrapper mas alto que la pantalla con
   un hijo sticky. Sin ese margen la seccion mide justo una pantalla y solo
   queda encuadrada en un punto exacto de scroll; en cualquier otro asoma la
   seccion vecina. Los 80svh de sobra son la ventana en la que queda anclada
   y en la que GSAP aleja el anillo (sin eso el sticky se siente congelado).
   overflow-x: clip (y no hidden) recorta los 240vw de .ring-floor sin crear un
   scrollport, que es lo que anularia el sticky del hijo. */
.stack-wrap {
  position: relative;
  background: #060309;
  color: var(--cream);
  height: 180svh;
  overflow-x: clip;
}
.stack {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 7vh 8vw 5vh;
  isolation: isolate;
}
.stack-head p:first-of-type {
  margin: 0 0 12px;
  color: #ffca90;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.stack-head h2 {
  margin: 0;
  font:
    clamp(2.4rem, 4.8vw, 4.6rem)/0.82 "Archivo Black",
    sans-serif;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}
.stack-head h2 span {
  color: var(--pink);
}
/* .ring-stage esta fuera de flujo, asi que las filas del grid solo las ocupan
   la cabecera y este pie. Lo fijamos a la fila 3 para que quede abajo. */
.stack-footer {
  grid-row: 3;
  /* .ring-stage esta posicionado, asi que pintaria por encima del pie: este
     z-index evita que un icono bajo de la orbita tape el rotulo. */
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  justify-items: center;
}
.stack-legend {
  margin: 0;
  color: #ffca90;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
}
/* El rotulo grande de abajo se oculta: el nombre vive pegado al icono del
   frente, asi el zoom del scroll no se lo lleva. */
.ring-label {
  display: none;
}
.tool-name {
  position: absolute;
  left: 50%;
  top: calc(100% + 48px);
  z-index: 1;
  width: max-content;
  max-width: 280px;
  margin: 0;
  padding: 0;
  border: 0;
  transform: translateX(-50%);
  color: var(--cream);
  font:
    800 28px/1 Inter,
    sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.tool.is-front .tool-name {
  opacity: 1;
  color: inherit;
}

.ring-stage {
  position: absolute;
  inset: 0;
  perspective: 1500px;
  perspective-origin: 50% 54%;
  transform-origin: 50% 54%;
  overflow: visible;
  will-change: transform;
}
.ring-floor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(160%, 240vw);
  max-width: 2800px;
  aspect-ratio: 11 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 122, 71, 0.45),
    rgba(255, 122, 71, 0) 65%
  );
  filter: blur(10px);
}

.ring {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}

/* Zona sensible sobre la orbita: aqui la rueda del raton gira el carrusel en
   vez de desplazar la pagina. Los margenes dejan un pasillo libre alrededor
   para poder seguir scrolleando la seccion con normalidad. */
.ring-hit {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 54%;
  width: min(1160px, 86%);
  height: min(520px, 55%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .ring-hit {
    pointer-events: auto;
    cursor: ns-resize;
  }
}

/* El tamaño de layout es el maximo al que llega a verse el icono: el JS solo lo
   reduce (MAX_SCALE < 1). Rasterizar grande y encoger mantiene el SVG nitido;
   al reves el navegador estira la textura y se ve borroso. */
.tool {
  position: absolute;
  left: 0;
  top: 0;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}
.tool svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 20px 48px #000a)
    drop-shadow(0 0 12px rgba(255, 210, 154, 0.15));
  transition:
    filter 0.25s ease,
    fill 0.25s ease;
}

@media (max-width: 760px) {
  .ring,
  .ring-hit {
    top: 52%;
  }
  .tool {
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
  }
  .tool-name {
    top: calc(100% + 22px);
    font-size: 14px;
    letter-spacing: 0.08em;
    max-width: 80vw;
  }
  .tool svg {
    filter: drop-shadow(0 10px 20px #000a);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .poster-team {
    opacity: 1;
    transform: none;
  }
  .poster {
    height: 100svh;
  }
  .chapter {
    height: 100svh;
  }
  .contact-wrap {
    height: 100svh;
  }
  .stack-wrap {
    height: 100svh;
  }
  .contact {
    position: relative;
  }
  .poster-intro {
    display: none;
  }
  .has-gsap .manifesto > *,
  .has-gsap .chapter-content > *:not(a),
  .has-gsap .chapter-index,
  .has-gsap .contact > p,
  .has-gsap .contact h2 {
    visibility: visible;
  }
}
