:root {
  --ink: #0c111a;
  --surface: #141b29;
  --line: #2a3450;
  --paper: #f2f5f9;
  --muted: #8e9ab0;
  --lime: #a4d733;
  --lime-soft: #c3e75e;
  --blue: #2149b9;
  --blue-soft: #4a7de0;
  --cyan: #4ac2e5;
  --cyan-soft: #7adcf2;
  --stage-w: min(52dvh, 92vw);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: "Barlow", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100dvh;
}

/* ---------- Chrome fijo ---------- */
.brand {
  position: fixed;
  top: 18px; left: 26px;
  z-index: 40;
}
.brand img { display: block; height: auto; filter: drop-shadow(0 4px 14px rgba(0,0,0,.5)); }

/* Panel SEO estático (desktop) — lo que webstory no tiene */
.seo-panel {
  position: fixed;
  left: 26px;
  bottom: 32px;
  z-index: 40;
  width: 240px;
}
.seo-panel h1 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 21px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.seo-panel h1 b { color: var(--lime); font-weight: 700; }
.seo-panel p {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.seo-panel .who {
  margin-top: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

/* Riel derecho */
.rail {
  position: fixed;
  right: 26px;
  bottom: 32px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.rail a.icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20,27,41,.7);
  backdrop-filter: blur(6px);
  color: var(--paper);
  text-decoration: none;
  font-size: 17px;
  transition: border-color .15s ease;
}
.rail a.icon:hover, .rail a.icon:focus-visible { border-color: var(--lime); }
.rail a.quote {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--lime);
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: .03em;
  transition: background .15s ease, transform .15s ease;
}
.rail a.quote:hover, .rail a.quote:focus-visible { background: var(--lime-soft); transform: scale(1.05); }
:focus-visible { outline: 2px solid var(--lime-soft); outline-offset: 2px; }

/* ---------- Escenario / feed ---------- */
.feed {
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.chapter {
  height: 100dvh;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
}

.stage {
  position: relative;
  width: var(--stage-w);
  aspect-ratio: 9 / 16;
  max-height: 94dvh;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

.media, .scene { position: absolute; inset: 0; }
.scene { object-fit: cover; width: 100%; height: 100%; }

/* Escenas placeholder (gradientes por servicio) con Ken Burns */
.scene { animation: kenburns 16s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.12) translate(-1.5%, 1.5%); }
}

.scene.hook {
  background:
    radial-gradient(120% 90% at 75% 15%, rgba(74,194,229,.5), transparent 58%),
    radial-gradient(80% 60% at 20% 85%, rgba(164,215,51,.24), transparent 62%),
    linear-gradient(160deg, #1a2438 0%, #101625 60%, #0a0f1a 100%);
}
.scene.problem {
  background:
    repeating-linear-gradient(115deg, transparent 0 26px, rgba(142,154,176,.07) 26px 27px),
    linear-gradient(200deg, #171e2e 0%, #0c101c 100%);
}
.scene.vinyl {
  background:
    linear-gradient(115deg, transparent 44%, rgba(164,215,51,.68) 44.2%, rgba(164,215,51,.24) 58%, transparent 72%),
    linear-gradient(180deg, #19233a 0%, #0d1322 100%);
}
.scene.wallpaper {
  background:
    repeating-linear-gradient(0deg, rgba(74,194,229,.2) 0 2px, transparent 2px 46px),
    repeating-linear-gradient(90deg, rgba(74,194,229,.2) 0 2px, transparent 2px 46px),
    linear-gradient(170deg, #182137 0%, #0d1220 100%);
}
.scene.signage {
  background:
    radial-gradient(70% 34% at 50% 38%, rgba(195,231,94,.5), transparent 68%),
    linear-gradient(180deg, #141b2c 0%, #0a0e18 100%);
}
.scene.proof {
  background:
    linear-gradient(90deg, #1e2942 0 49.8%, rgba(164,215,51,.9) 49.8% 50.2%, #0e1424 50.2% 100%);
}
.scene.cta {
  background:
    radial-gradient(110% 70% at 50% 100%, rgba(164,215,51,.45), transparent 62%),
    radial-gradient(90% 50% at 50% 0%, rgba(74,194,229,.42), transparent 58%),
    linear-gradient(180deg, #121828 0%, #0a0e18 100%);
}

/* Marca de placeholder — inconfundible, se borra al meter video real */
.ph-tag {
  position: absolute;
  top: 98px; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .14em;
  color: rgba(242,245,249,.45);
  border: 1px dashed rgba(142,154,176,.4);
  border-radius: 6px;
  padding: 4px 9px;
  white-space: nowrap;
}

/* Progreso: tiras de vinilo */
.strips {
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  z-index: 10;
  display: flex;
  gap: 5px;
}
.strips span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(242,245,249,.18);
  overflow: hidden;
  position: relative;
}
.strips span::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s cubic-bezier(.25,.9,.3,1);
}
.strips span.done::after { transform: scaleX(1); transition-duration: .3s; }
.strips span.now::after  { transform: scaleX(1); }

/* Titular con barrido squeegee */
.headline {
  position: absolute;
  left: 24px; right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: clamp(38px, 9.5vh, 64px);
  line-height: .98;
  text-transform: uppercase;
  letter-spacing: .01em;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.headline .wipe {
  display: inline-block;
  position: relative;
  clip-path: inset(0 100% 0 0);
}
.headline .wipe::after {
  content: "";
  position: absolute;
  top: -4%; bottom: -4%;
  right: -3px;
  width: 3px;
  background: var(--lime-soft);
  opacity: 0;
}
.chapter.on .headline .wipe {
  animation: squeegee .9s cubic-bezier(.3,.8,.25,1) forwards;
}
.chapter.on .headline .wipe::after { animation: blade .9s cubic-bezier(.3,.8,.25,1) forwards; }
.chapter.on .headline .wipe:nth-of-type(2) { animation-delay: .35s; }
.chapter.on .headline .wipe:nth-of-type(2)::after { animation-delay: .35s; }
@keyframes squeegee { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes blade { 0% { opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.headline .accent { color: var(--lime-soft); }

/* Subtítulo estilo caption de reel */
.caption {
  position: absolute;
  left: 18px; right: 70px;
  bottom: 20px;
  z-index: 6;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  text-shadow: 0 1px 12px rgba(0,0,0,.7);
}
.caption .ch {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--cyan-soft);
  margin-bottom: 5px;
}

/* CTA final dentro del stage */
.cta-block {
  position: absolute;
  left: 24px; right: 24px;
  bottom: 112px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cta-block a.big {
  display: block;
  text-align: center;
  background: var(--lime);
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 15px 20px;
  border-radius: 12px;
  transition: background .15s ease;
}
.cta-block a.big:hover, .cta-block a.big:focus-visible { background: var(--lime-soft); }
.cta-block .alt {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.cta-block .alt a { color: var(--lime-soft); }

/* Hint de scroll (solo capítulo 1) */
.scroll-hint {
  position: absolute;
  bottom: 62px; left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,7px); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .seo-panel { display: none; }
  .brand { top: 16px; left: 16px; font-size: 19px; }
  .rail { right: 14px; bottom: 22px; }
  :root { --stage-w: 100vw; }
  .stage { aspect-ratio: auto; height: 100dvh; max-height: none; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .scene { animation: none; }
  .chapter .headline .wipe { clip-path: inset(0 0 0 0); animation: none; }
  .scroll-hint { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- v2: sonido ---------- */
.mute-btn {
  position: fixed;
  top: 22px; right: 26px;
  z-index: 45;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20,27,41,.7);
  backdrop-filter: blur(6px);
  color: var(--paper);
  font-size: 17px;
  cursor: pointer;
  transition: border-color .15s ease;
}
.mute-btn:hover, .mute-btn:focus-visible { border-color: var(--lime); }
.mute-btn .on-icon  { display: none; }
body.sound-on .mute-btn .on-icon  { display: block; }
body.sound-on .mute-btn .off-icon { display: none; }

/* ---------- v2: subtítulos hablados (word-by-word) ---------- */
.subs {
  position: absolute;
  left: 24px; right: 24px;
  bottom: 92px;
  z-index: 7;
  text-align: center;
  font-family: "Barlow", sans-serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.35;
  text-shadow: 0 2px 14px rgba(0,0,0,.85);
  min-height: 52px;
}
.subs .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
  margin-right: .28em;
}
.subs .w.show { opacity: 1; transform: none; }
.subs .w.hot { color: var(--lime-soft); }

/* ---------- v2: menú ---------- */
.menu-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20,27,41,.7);
  backdrop-filter: blur(6px);
  color: var(--paper);
  font-size: 18px;
  cursor: pointer;
  transition: border-color .15s ease;
}
.menu-btn:hover, .menu-btn:focus-visible { border-color: var(--lime); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(12,17,26,.94);
  backdrop-filter: blur(12px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav-overlay.open { display: flex; }
.nav-overlay a.feed-link {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 6vh, 48px);
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--paper);
  text-decoration: none;
  padding: 6px 18px;
  transition: color .15s ease;
}
.nav-overlay a.feed-link:hover,
.nav-overlay a.feed-link:focus-visible,
.nav-overlay a.feed-link.active { color: var(--lime); }
.nav-overlay a.feed-link small {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .14em;
  color: var(--muted);
  text-align: center;
}
.nav-overlay .nav-quote {
  margin-top: 22px;
  background: var(--lime);
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 13px 34px;
  border-radius: 12px;
}
.nav-overlay .nav-quote:hover { background: var(--lime-soft); }
.nav-overlay .close-nav {
  position: absolute;
  top: 22px; right: 26px;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--paper);
  font-size: 20px;
  cursor: pointer;
}

/* ---------- v2: formulario de quote (feed contact) ---------- */
.quote-form {
  position: absolute;
  left: 24px; right: 24px;
  top: 30%;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quote-form input, .quote-form select, .quote-form textarea {
  background: rgba(20,27,41,.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--paper);
  font-family: "Barlow", sans-serif;
  font-size: 15px;
  padding: 12px 14px;
  width: 100%;
}
.quote-form textarea { resize: none; height: 84px; }
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus {
  outline: none; border-color: var(--lime);
}
.quote-form button {
  background: var(--lime);
  border: none;
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
}
.quote-form button:hover { background: var(--lime-soft); }

@media (prefers-reduced-motion: reduce) {
  .subs .w { opacity: 1; transform: none; transition: none; }
}

/* subs no se montan sobre el CTA ni el formulario */
.stage:has(.cta-block) .subs { bottom: 224px; }
.stage:has(.quote-form) .subs { display: none; }


/* iconos de herramienta (cutter / squeegee) en la etiqueta de capítulo */
.tool-ico {
  display: inline-block;
  vertical-align: -3px;
  margin-right: 7px;
  color: var(--cyan-soft);
}


/* insignia de herramienta — visible, arriba-izquierda del escenario */
.tool-badge {
  position: absolute;
  top: 34px; left: 16px;
  z-index: 9;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: rgba(20,27,41,.75);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--cyan-soft);
  backdrop-filter: blur(6px);
}
.tool-badge svg { display: block; }
