/* Club 9:20 · Drop #001 — new look.
   1) Typography: Poppins for everything, display face (PP Neue World Condensed) for titles/highlights.
      PP Neue World Condensed Regular lives in fonts/ (@font-face below); Instrument Serif is only the fallback.
   2) Header restyled from Figma (uppercase 14px, bordered "Comprar Box"); black over the white hero, white over the dark page.
   3) Hero: white, chrome 9:20 + glass boxes (hero3d.js). Everything below the hero stays black.
   Loaded after the page's own <style>, so these rules win on equal specificity. */

:root {
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "PP Neue World Condensed", "PP Neue World", "Instrument Serif", Georgia, serif;
  --nav-h: 88px;
}
@media (max-width: 760px) { :root { --nav-h: 64px; } }

@font-face { font-family: "PP Neue World Condensed"; src: url("fonts/PPNeueWorld-CondensedRegular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ── Typography ───────────────────────────────────────────────────────────── */
body, .clock .unit .label { font-family: var(--sans); }
.credit { font-family: var(--display); font-style: normal; font-weight: 400; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.nav { height: var(--nav-h); padding: env(safe-area-inset-top, 0px) max(clamp(16px, 2vw, 30px), env(safe-area-inset-right, 0px)) 0 max(clamp(16px, 2vw, 30px), env(safe-area-inset-left, 0px)); }
.nav .mark { display: block; width: 52px; height: 24px; font-size: 0; color: var(--paper); transition: color .3s ease; }
.nav .mark svg { display: block; width: 100%; height: 100%; }
.nav .end { gap: clamp(16px, 2.3vw, 39px); }
.nav a.account { font-size: 14px; line-height: 16px; text-transform: uppercase; color: var(--paper); transition: color .3s ease; }
.nav a.account:hover { color: var(--paper); opacity: .7; }
.nav a.buy {
  padding: 15px 20px; background: transparent; color: var(--paper); border: 1px solid var(--paper); border-radius: 0;
  font-size: 14px; line-height: 16px; text-transform: uppercase; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .3s;
}
.nav a.buy:hover { opacity: 1; background: var(--paper); color: var(--ink); }
/* Over the white hero */
.nav.on-light .mark, .nav.on-light a.account { color: #000; }
.nav.on-light a.buy { color: #000; border-color: #000; }
.nav.on-light a.buy:hover { background: #000; color: #fff; }
.nav.solid { border-color: transparent; }
@media (max-width: 760px) { .nav a.account { display: none; } }

/* ── Hero (white) ─────────────────────────────────────────────────────────── */
.hero3d { position: relative; height: 320vh; background: #fff; color: #000; font-family: var(--sans); }
.h3-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #fff; }
#gl3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1s ease; }
.hero3d.ready #gl3d { opacity: 1; }
.h3-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: #000; }
.h3-fallback svg { width: min(56vw, 568px); height: auto; }
.hero3d.nogl .h3-fallback { display: flex; }

.h3-foot {
  position: absolute; inset: auto 0 0 0; z-index: 3; pointer-events: none;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding-top: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  padding-left: max(clamp(16px, 2vw, 30px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(16px, 2vw, 30px), env(safe-area-inset-right, 0px));
}
.h3-l, .h3-r { display: flex; flex-direction: column; gap: 15px; pointer-events: auto; min-width: 0; }
.h3-l { width: 350px; max-width: 100%; }
.h3-r { width: 418px; max-width: 100%; gap: 10px; }
.h3-info { display: flex; align-items: stretch; border: 1px solid #000; background: transparent; }
.h3-emblem { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 30px; border-right: 1px solid #000; }
.h3-oval { width: 64px; display: block; color: #000; }
.h3-oval svg { width: 100%; height: auto; display: block; }
.h3-small { font-size: 12px; line-height: 16px; text-transform: uppercase; }
.h3-emblem .h3-small { line-height: normal; white-space: nowrap; }
.h3-claim { display: flex; align-items: center; padding: 20px 30px; font-size: 12px; line-height: 16px; text-transform: uppercase; }
.h3-card { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 30px 40px; background: #000; color: #fff; }
.h3-card-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.h3-eyebrow { font-weight: 500; font-size: 12px; line-height: normal; text-transform: uppercase; }
/* 28px fits the stand-in face; with PP Neue World Condensed use the Figma size (36px) and drop the stroke */
.h3-title { font-family: var(--display); font-size: 28px; line-height: 1; white-space: nowrap; font-weight: 400; -webkit-text-stroke: 0.45px currentColor; }
.h3-img { display: block; width: 50px; height: 123px; object-fit: cover; flex: none; }
.h3-ft { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.2; color: var(--magenta, #B01D5C); }
.h3-ft a { color: inherit; text-decoration: none; }
.h3-ft a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Indicador de scroll: la estrella de los dos puntos del 9:20 baja por una línea fina. Sin palabra. */
.h3-cue { position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); color: #000; pointer-events: none;
  transition: opacity .5s ease; }
.h3-cue-track { position: relative; display: block; width: 1px; height: 56px; background: rgba(0,0,0,.18); }
.h3-cue-star { position: absolute; left: 50%; top: 0; width: 13px; height: auto; transform: translate(-50%, -50%); color: #000;
  animation: h3-cue 2.2s cubic-bezier(.45,0,.25,1) infinite; }
@keyframes h3-cue { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.hero3d.scrolled .h3-cue { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .h3-cue-star { animation: none; top: 50%; } }
/* Cuenta regresiva del hero: los dígitos que cambian caen igual que en el reloj grande del final. */
.h3-cd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.h3-cd [data-hu] { display: inline-flex; }
.h3-cd .dg { display: inline-block; overflow: hidden; height: 16px; }
.h3-cd .dg span { display: block; }
.h3-cd .dg.roll span { animation: roll .5s cubic-bezier(0.16, 1, 0.3, 1); }

@media (max-width: 760px) {
  .h3-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .h3-r { order: -1; width: 100%; }
  .h3-l { width: 100%; gap: 8px; }
  .h3-card { padding: 20px 24px; gap: 16px; }
  .h3-img { width: 40px; height: 98px; }
  .h3-emblem { padding: 12px 20px; gap: 6px; }
  .h3-claim { padding: 12px 18px; }
  .h3-info { align-self: flex-start; }
  .h3-ft { font-size: 15px; }
  .h3-cue { position: static; transform: none; order: -2; align-self: center; }
  .h3-cue-track { height: 32px; }
}

/* ── Opening film: the hero now plays the role of the old opening card ───── */
.stage .r-title { display: none; }

/* Snap: the hero is taller than the screen, so inside it the scroll stays free until it ends */
.hero3d { scroll-snap-align: start; scroll-snap-stop: normal; }

@media (prefers-reduced-motion: reduce) { #gl3d { transition: none; } }

/* ── Cómo funciona: una pantalla negra entre la portada y el reveal ────────── */
.intro { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--ink);
  padding: var(--nav-h) 0 clamp(48px, 8vh, 96px); scroll-snap-align: start; scroll-snap-stop: always; }
.intro-t { font-size: clamp(56px, 10vw, 136px); line-height: .95; }
.intro-b { max-width: 44em; margin: clamp(28px, 5vh, 48px) auto 0; font-size: clamp(14px, 1.4vw, 17px); line-height: 1.6; color: var(--paper-muted); }
.intro-b .nw { white-space: nowrap; }
@media (max-width: 760px) { .intro-b br { display: none; } }
.intro-b a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.intro .btn { margin-top: clamp(28px, 5vh, 44px); }

/* Sin spoiler: el recuadro del drop aparece recién después de ver el reveal (clase drop-new en <html>) */
html.drop-new .h3-card { display: none; }
.h3-card { animation: h3-card-in .8s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes h3-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── El host: video vertical de Tirman Kid, entero (lleva subtítulos), sobre negro ── */
.host figure.host-film { min-height: 72svh; }
.host figure.host-film video {
  position: absolute; inset: var(--nav-h) 0 0 0; width: 100%; height: calc(100% - var(--nav-h)); object-fit: contain; background: #000; cursor: pointer;
  clip-path: inset(0 100% 0 0); transition: clip-path 1.6s var(--ease-out);
}
.host figure.host-film.in video { clip-path: inset(0 0 0 0); }
.host .sound {
  position: absolute; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid rgba(255,255,255,.7); border-radius: 0;
  background: rgba(0,0,0,.55); color: #fff; font: 500 12px/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background-color .2s ease;
}
.host .sound[hidden] { display: none; }
.host .sound:hover { background: rgba(0,0,0,.75); }
.host .sound:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }
.host .sound-ic { width: 14px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M0 4h3l4-4v12L3 8H0z'/%3E%3Cpath d='M9 3l4 6M13 3l-4 6' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M0 4h3l4-4v12L3 8H0z'/%3E%3Cpath d='M9 3l4 6M13 3l-4 6' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat; }
.host .sound.on .sound-ic {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M0 4h3l4-4v12L3 8H0z'/%3E%3Cpath d='M9 3.5a4 4 0 0 1 0 5M11 1.5a7 7 0 0 1 0 9' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M0 4h3l4-4v12L3 8H0z'/%3E%3Cpath d='M9 3.5a4 4 0 0 1 0 5M11 1.5a7 7 0 0 1 0 9' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E"); }
@media (min-width: 900px) { .host figure.host-film { min-height: 100svh; } }
@media (prefers-reduced-motion: reduce) { .host figure.host-film video { clip-path: none; } }
.object[hidden] { display: none; }

/* Logo cuadrado de TE: ocupa menos que el wordmark */
.h3-eyebrow { display: flex; align-items: center; gap: 12px; }
.h3-te { width: auto; height: 14px; flex: none; }
.object .maker { width: clamp(64px, 6vw, 84px); }
.story .s-maker { width: clamp(52px, 5vw, 68px); }
/* Cuenta regresiva: "para conocer al ganador" y la fecha, en dos líneas */
.count .when { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.count .when > [hidden] { display: none; }

/* El primer objeto en mobile: entra en una sola pantalla (si no, el scroll con snap se rompe).
   Texto a la izquierda, el mixer (angosto y alto) a la derecha, el párrafo abajo. */
@media (max-width: 899px) {
  .object { min-height: 100svh; height: 100svh; padding: calc(var(--nav-h) + 12px) 0 max(20px, env(safe-area-inset-bottom, 0px)); overflow: hidden; }
  .object .grid { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; row-gap: 0; align-items: center;
    grid-template-areas: "text film" "body body"; }
  .object .grid > div:first-child { grid-area: text; }
  .object .side { display: contents; }
  .object .maker { width: 56px; margin-top: clamp(12px, 2.5svh, 24px); }
  .object .objname { font-size: 22px; margin-top: 10px; }
  .object h2 { font-size: clamp(34px, 5.2svh, 48px); margin-top: clamp(14px, 3svh, 28px); }
  .object .film360 { grid-area: film; width: auto; height: min(40svh, 340px); max-width: none; max-height: none; margin: 0; }
  .object .body { grid-area: body; margin-top: clamp(20px, 4svh, 40px); font-size: 14px; line-height: 1.55; max-width: none; }
}

/* Fin del reveal: la placa se funde a negro antes de que "El primer objeto" tome su lugar */
.reveal .stage { transition: opacity .6s ease; }
.reveal.done .stage { opacity: 0; }
.reveal[hidden] { display: none; }

/* El host en mobile: el video a pantalla completa y en una sola página, con "El host" arriba a la
   izquierda y "Tirman Kid" abajo a la derecha, sobre el video. */
@media (max-width: 899px) {
  .host { display: block; position: relative; height: 100svh; min-height: 100svh; overflow: hidden; background: #000; color: var(--paper); }
  .host figure.host-film { position: absolute; inset: 0; min-height: 0; }
  .host figure.host-film video { object-fit: cover; }
  .host figure.host-film::after { content: ""; position: absolute; inset: var(--nav-h) 0 0 0; z-index: 1; pointer-events: none;
    background: linear-gradient(rgba(0,0,0,.55), transparent 22%, transparent 48%, rgba(0,0,0,.78)); }
  .host .text { position: absolute; z-index: 2; inset: calc(var(--nav-h) + 16px) var(--gutter) max(20px, env(safe-area-inset-bottom, 0px));
    padding: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; pointer-events: none; }
  .host .num { align-self: flex-start; margin-bottom: auto; color: rgba(245, 244, 240, .8); }
  .host h2 { font-size: clamp(44px, 13vw, 60px); margin-top: 0; }
  .host .role { margin-top: 6px; font-size: 20px; }
  .host .handle { margin-top: 10px; align-self: flex-end; pointer-events: auto; color: var(--paper); border-color: rgba(245, 244, 240, .4); }
  .host .handle:focus-visible { outline-color: var(--paper); }
  .host .sound { left: var(--gutter); transform: none; bottom: max(20px, env(safe-area-inset-bottom, 0px)); padding: 10px 12px; gap: 8px; font-size: 11px; }
  .host .text { text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }
  /* Pegados al borde inferior no llegan a "entrar" en pantalla: aparecen junto con el nombre. */
  .host h2.in ~ .role, .host h2.in ~ .handle { opacity: 1; transform: none; }
}

/* El host en mobile, más despejado: "Tirman Kid" en una línea en el lugar de "Producer & musician"
   (que se oculta), el @ debajo, y el botón de sonido solo con el ícono. */
@media (max-width: 899px) {
  .host .role { display: none; }
  .host h2 { font-size: 30px; line-height: 1.1; }
  .host h2.lines > span { display: inline-block; }
  .host h2.lines > span:first-child { margin-right: .25em; }
  .host .handle { margin-top: 8px; }
  .host .sound { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .host .sound-ic { width: 18px; height: 16px; }
  .host .sound-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}

/* Celular: la portada es una sola pantalla (la animación corre sola, ver hero3d.js) y un
   deslizamiento pagina a la sección siguiente, como el resto de la página. */
html.hero-auto .hero3d { height: 100vh; height: 100svh; scroll-snap-stop: always; }

/* Celular, después de ver el reveal: el recuadro del drop reemplaza al recuadro blanco del Club
   (que ya cumplió en la primera visita) y queda en su lugar, debajo de la cuenta regresiva. */
@media (max-width: 760px) {
  html:not(.drop-new) .h3-info { display: none; }
  html:not(.drop-new) .h3-card { order: 2; margin-top: 6px; }
}
