/* ============================================================
   MUCHACHAVA — v2 · Ilustración que se dibuja (scroll-draw)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,700;0,800;0,900;1,500&display=swap');

:root {
  --indigo:  #311091;
  --rabia:   #883CFF;
  --chispa:  #FFC230;
  --tinta:   #190A3D;
  --lila:    #E4DAFF;
  --papel:   #F7F4FF;
  --blanco:  #FFFFFF;

  --h-rosa:  #EC4899;
  --h-naranja:#F97316;
  --h-amaril:#F59E0B;
  --h-verde: #0E8C62;
  --h-azul:  #2563EB;
  --h-purpu: #6B2D8B;
}

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

html { scroll-behavior: auto; }
body {
  background: var(--blanco);
  color: var(--tinta);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Tipografía ---------- */
.kicker {
  font-size: clamp(12px, 1.05vw, 15px);
  font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--rabia);
}
.title {
  font-weight: 900; line-height: 0.95; letter-spacing: -0.025em;
  font-size: clamp(34px, 4.6vw, 72px); color: var(--indigo);
  text-wrap: balance;
}
.title em { font-style: italic; color: var(--rabia); }
.body {
  font-size: clamp(16px, 1.25vw, 21px); line-height: 1.55; font-weight: 500;
  color: var(--tinta); max-width: 34ch; text-wrap: pretty;
}
.body strong { color: var(--rabia); font-weight: 800; }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 56px);
  transition: opacity .4s ease, background .3s ease, box-shadow .3s ease;
}
.topbar.solid { background: rgba(255,255,255,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(25,10,61,.07); }
.topbar img { height: 24px; display: block; }
.topbar nav { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); }
.topbar nav a { font-size: 14px; font-weight: 700; color: var(--indigo); text-decoration: none; letter-spacing: .01em; transition: color .2s ease; }
.topbar nav a:hover { color: var(--rabia); }
.topbar nav .btn-mini { background: var(--indigo); color: #fff; padding: 9px 17px; border-radius: 999px; font-weight: 800; }
.topbar nav .btn-mini:hover { background: var(--rabia); color: #fff; }
.topbar .hint {
  font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--indigo); display: flex; align-items: center; gap: 9px;
}
.topbar .hint .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--chispa); animation: pulse 1.7s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ transform: scale(1); opacity:1 } 50%{ transform: scale(1.7); opacity:.35 } }

/* ---------- Hero ---------- */
.hero {
  height: 100vh; display: grid; place-items: center; text-align: center;
  padding: 0 24px; position: relative;
  background:
    radial-gradient(60% 50% at 50% 42%, var(--papel) 0%, rgba(247,244,255,0) 70%);
}
.hero__word { width: min(74vw, 620px); height: auto; }
.hero__tag {
  margin-top: 24px; font-size: clamp(15px, 1.5vw, 20px); font-weight: 700; color: var(--indigo);
}
.hero__tag b { color: var(--rabia); }
.hero__scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: var(--indigo); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll svg { width: 18px; height: 26px; animation: bob 1.9s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(7px) } }

/* ---------- Sección de dibujo ---------- */
.draw { position: relative; height: 300vh; }
.pin {
  width: 100%; height: 100vh; overflow: hidden; position: relative;
  background:
    radial-gradient(46% 64% at 50% 48%, var(--papel) 0%, rgba(247,244,255,0) 74%),
    var(--blanco);
}
.stage { position: absolute; top: 0; left: 0; right: 0; height: 100%; overflow: hidden; }
.stage::after { content: none; }

/* La ilustración: GRANDE — se viaja por ella (cada zona ≈ una pantalla). JS fija tamaño y paneo. */
.art {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, 0);
  will-change: transform;
}
.layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  clip-path: inset(0 0 100% 0);               /* se revela top→bottom */
  will-change: clip-path;
}

/* Narrativa: una sección por zona, fija en pantalla, se intercambia */
.beats { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.beat {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: min(33vw, 392px);
  display: flex; flex-direction: column; gap: clamp(13px, 1.5vw, 20px);
  opacity: 0; translate: 0 18px;
  transition: opacity .6s ease, translate .6s ease;
}
.beat.active { opacity: 1; translate: 0 0; }
.beat[data-beat="0"] { left: clamp(24px, 6vw, 96px); }
.beat[data-beat="1"] { right: clamp(24px, 6vw, 96px); text-align: right; align-items: flex-end; }
.beat[data-beat="2"] { left: clamp(24px, 6vw, 96px); }
.beat .num {
  font-weight: 900; font-size: clamp(40px, 5vw, 78px); line-height: 1;
  color: var(--rabia); opacity: .4; letter-spacing: -0.02em;
}
/* halo para legibilidad sobre las líneas */
.beat .kicker, .beat .title, .beat .body, .beat .num {
  text-shadow: 0 0 16px #fff, 0 0 28px #fff, 0 0 10px #fff;
}
.beat .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.beat[data-beat="1"] .chips { justify-content: flex-end; }
.beat .chip {
  font-size: clamp(12px, 1vw, 15px); font-weight: 700; color: var(--indigo);
  background: rgba(247,244,255,.92); border: 1.5px solid var(--lila);
  padding: 7px 13px; border-radius: 999px;
}

/* Riel de progreso con colores de bandera */
.progress {
  position: fixed; right: clamp(14px, 2.2vw, 28px); top: 50%; transform: translateY(-50%);
  width: 4px; height: 38vh; max-height: 320px; min-height: 180px;
  background: rgba(25,10,61,.08); border-radius: 99px; z-index: 60;
  opacity: 0; transition: opacity .4s ease;
}
.progress.show { opacity: 1; }
.progress__fill {
  width: 100%; height: 0%; border-radius: 99px;
  background: linear-gradient(180deg, var(--h-purpu), var(--h-azul), var(--h-verde), var(--h-amaril), var(--h-rosa), var(--h-naranja));
}

/* ---------- Footer ---------- */
.draw-end { height: clamp(80px, 16vh, 200px); background: var(--blanco); }
.footer {
  position: relative; background: var(--indigo); color: var(--blanco);
  padding: clamp(72px,12vh,140px) clamp(24px,6vw,120px) 46px; overflow: hidden;
}
.footer__inner { position: relative; z-index: 2; display: grid; gap: clamp(38px,6vw,72px); }
.footer h2 { font-weight: 900; line-height: 0.97; letter-spacing: -0.02em; font-size: clamp(36px, 6.4vw, 88px); }
.footer h2 em { font-style: normal; color: var(--chispa); }
.footer .cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 800;
  font-size: clamp(15px,1.3vw,18px); padding: 15px 26px; border-radius: 999px;
  text-decoration: none; transition: transform .2s ease, background .2s ease;
}
.btn--solid { background: var(--chispa); color: var(--tinta); }
.btn--ghost { background: transparent; color: var(--blanco); border: 2px solid rgba(255,255,255,.32); }
.btn:hover { transform: translateY(-3px); }
.btn--solid:hover { background: #ffce5a; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 30px; border-top: 1px solid rgba(255,255,255,.18); padding-top: 38px; }
.footer__grid h4 { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--chispa); margin-bottom: 13px; }
.footer__grid a, .footer__grid p { color: rgba(255,255,255,.82); text-decoration: none; font-size: 16px; line-height: 1.85; display: block; }
.footer__grid a:hover { color: #fff; }
.footer__base { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; color: rgba(255,255,255,.5); font-size: 13px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.footer__base img { height: 21px; opacity: .9; }
.footer__bolt { position: absolute; right: -3%; bottom: -12%; width: min(44vw, 520px); opacity: .12; z-index: 1; transform: rotate(-6deg); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .draw { height: 240vh; }
  .stage::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38px;
    background: linear-gradient(0deg, #fff 8%, rgba(255,255,255,0));
    pointer-events: none;
  }
  .beat {
    top: auto; bottom: 3.5vh; left: 14px; right: 14px; transform: none;
    width: auto; padding: 16px 20px 18px; text-align: center; align-items: center;
    translate: 0 22px;
    background: rgba(255,255,255,.9);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-radius: 20px;
    box-shadow: 0 10px 34px rgba(25,10,61,.13);
  }
  .beat[data-beat="1"] { text-align: center; align-items: center; }
  .beat[data-beat="1"] .chips { justify-content: center; }
  .beat.active { translate: 0 0; }
  .beat .num { display: none; }
  .beat .kicker, .beat .title, .beat .body, .beat .num { text-shadow: none; }
  .body { max-width: 36ch; }
  .progress { display: none; }
}

/* Móvil apaisado: pantalla muy baja → texto compacto */
@media (max-height: 480px) and (orientation: landscape) {
  .beat { bottom: 2vh; padding: 10px 16px; gap: 7px; }
  .beat .title { font-size: clamp(20px, 5.5vw, 30px); }
  .beat .body, .beat .chips { display: none; }
  .beat .kicker { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .layer { clip-path: inset(0 0 0% 0) !important; }
  .beat { opacity: 1; position: static; translate: 0 0; margin-bottom: 40px; }
}

/* =====================================================================
   CONTENIDO — secciones del sitio
   ===================================================================== */
.section { position: relative; padding: clamp(80px,13vh,168px) clamp(24px,6vw,120px); }
.section--ink   { background: var(--indigo); color: #fff; }
.section--papel { background: var(--papel); }
.wrap { max-width: 1120px; margin: 0 auto; }

.section__head { max-width: 1120px; margin: 0 auto clamp(40px,5vw,68px); }
.section__head .kicker { margin-bottom: 16px; }
.section__head h2 {
  font-weight: 900; line-height: .98; letter-spacing: -.022em;
  font-size: clamp(32px,5.2vw,66px); color: var(--indigo); text-wrap: balance;
}
.section__head h2 em { font-style: italic; color: var(--rabia); }
.section__head .body { margin-top: 18px; max-width: 46ch; }
.section--ink .section__head h2 { color: #fff; }
.section--ink .section__head h2 em { color: var(--chispa); }
.section--ink .kicker { color: var(--chispa); }

/* Regla de 6 hilos */
.thread-rule { display: flex; gap: 7px; margin-bottom: 30px; }
.thread-rule span { height: 6px; width: 46px; border-radius: 99px; }

/* Manifiesto */
.manifesto { max-width: 1020px; margin: 0 auto; }
.manifesto .kicker { color: var(--chispa); margin-bottom: 18px; }
.manifesto p.statement {
  font-weight: 800; line-height: 1.12; letter-spacing: -.018em;
  font-size: clamp(27px,4.3vw,58px); color: #fff; text-wrap: balance;
}
.manifesto p.statement em { color: var(--chispa); font-style: normal; }
.manifesto .note {
  font-size: clamp(16px,1.45vw,21px); font-weight: 600; color: rgba(255,255,255,.72);
  margin-top: 38px; max-width: 62ch; line-height: 1.55;
}

/* Tarjetas */
.cards { display: grid; gap: clamp(18px,2.2vw,32px); }
.cards--3 { grid-template-columns: repeat(auto-fit,minmax(258px,1fr)); }
.cards--4 { grid-template-columns: repeat(auto-fit,minmax(214px,1fr)); }
.card { padding-top: clamp(18px,2vw,26px); border-top: 3px solid var(--c,var(--rabia)); }
.card .idx { font-weight: 900; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--c,var(--rabia)); }
.card h3 { font-weight: 850; font-size: clamp(20px,1.9vw,26px); color: var(--indigo); margin: 13px 0 10px; line-height: 1.1; letter-spacing: -.01em; }
.card p { font-size: clamp(15px,1.15vw,17.5px); line-height: 1.5; color: var(--tinta); font-weight: 500; text-wrap: pretty; }

.cta-inline { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(34px,4vw,56px); }

@media (max-width: 720px) {
  .topbar nav a:not(.btn-mini) { display: none; }
  .section { padding: clamp(58px,9vh,110px) 24px; }
}
