/* =============================================================
   Bestari · portada.css — solo la portada de marketing (/)
   Movimiento: GSAP + ScrollTrigger (app.js) y cintas en CSS.
   Estado final = CSS por defecto; la animación es mejora.
   ============================================================= */

.portada { --guilloche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%231F3B5C' stroke-width='.7'%3E%3Cellipse cx='210' cy='210' rx='200' ry='70'/%3E%3Cellipse cx='210' cy='210' rx='196' ry='79' transform='rotate(15 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='192' ry='88' transform='rotate(30 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='188' ry='97' transform='rotate(45 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='184' ry='106' transform='rotate(60 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='180' ry='115' transform='rotate(75 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='176' ry='124' transform='rotate(90 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='172' ry='133' transform='rotate(105 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='168' ry='142' transform='rotate(120 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='164' ry='151' transform='rotate(135 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='160' ry='160' transform='rotate(150 210 210)'/%3E%3C/g%3E%3C/svg%3E");
  --guilloche-oro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%23D4B062' stroke-width='.7'%3E%3Cellipse cx='210' cy='210' rx='200' ry='70'/%3E%3Cellipse cx='210' cy='210' rx='196' ry='79' transform='rotate(15 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='192' ry='88' transform='rotate(30 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='188' ry='97' transform='rotate(45 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='184' ry='106' transform='rotate(60 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='180' ry='115' transform='rotate(75 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='176' ry='124' transform='rotate(90 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='172' ry='133' transform='rotate(105 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='168' ry='142' transform='rotate(120 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='164' ry='151' transform='rotate(135 210 210)'/%3E%3Cellipse cx='210' cy='210' rx='160' ry='160' transform='rotate(150 210 210)'/%3E%3C/g%3E%3C/svg%3E");
}

/* Revelados por scroll: ya visibles, solo se desplazan 24px */
.revela-on [data-revela] { transition: transform var(--dur-l) var(--ease-out); }
.revela-on [data-revela]:not(.is-in) { transform: translateY(var(--dist-m)); }

/* 1. HERO ---------------------------------------------------------- */
.hero { position: relative; padding: 22px 0 36px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--guilloche) center / 420px; opacity: .35; pointer-events: none; -webkit-mask-image: radial-gradient(120% 70% at 80% 85%, #000 25%, transparent 75%); mask-image: radial-gradient(120% 70% at 80% 85%, #000 25%, transparent 75%); }
.hero__grid { position: relative; display: grid; gap: 28px; align-items: center; }
.hero__h1 { font-size: clamp(40px, 11.2vw, 80px); line-height: .98; letter-spacing: -0.025em; margin-top: 8px; }
.hero__sub { margin-top: 14px; font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); max-width: 46ch; }
.hero__acciones { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.hero__cta { font-size: 18px; padding-inline: 26px; }
.hero__link { font-weight: 700; font-size: 16px; min-height: 44px; display: inline-flex; align-items: center; }
.hero__chips { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 460px; }
.hero__chips .chip { background: rgba(255,255,255,.85); }
@media (min-width: 960px) {
  .hero { padding: 56px 0 72px; }
  .hero__grid { grid-template-columns: 1.08fr .92fr; gap: 40px; }
}

/* Pasaporte 3D */
.pp-escena { --w: clamp(150px, 38vw, 236px); --h: calc(var(--w) * 1.42); perspective: 1700px; display: flex; justify-content: center; padding: 8px 0; }
.pp-libro { position: relative; width: calc(var(--w) * 2); height: var(--h); transform: translateX(-25%); transform-style: preserve-3d; }
.pp-pagina, .pp-tapa { position: absolute; top: 0; right: 0; width: var(--w); height: var(--h); }
.pp-pagina { background: #FBFCF9; border: 1px solid var(--line); border-radius: 4px 14px 14px 4px; box-shadow: 0 18px 40px -22px rgba(21,38,59,.45); padding: calc(var(--w) * .08); display: flex; flex-direction: column; }
.pp-pagina::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--guilloche) center / 260px; opacity: .22; pointer-events: none; }
.pp-pagina__t { position: relative; font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.pp-pagina__pie { position: relative; margin-top: auto; font-weight: 700; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); text-align: right; }
.pp-sellos { position: relative; flex: 1; display: grid; grid-template-columns: 1fr 1fr; place-items: center; gap: 4px; }
.pp-sellos .sello { --tam: calc(var(--w) * .4); border-width: 2px; transform: rotate(var(--r, -10deg)); }
.pp-sellos .sello::before { inset: 3px; border-width: 1px; }
.pp-sellos .sello .sello__tema { font-size: calc(var(--w) * .046); margin: 2px 4px; letter-spacing: -0.02em; }
.pp-sellos .sello .sello__hab, .pp-sellos .sello .sello__pie { font-size: calc(var(--w) * .032); letter-spacing: .04em; }
.pp-tapa { transform-origin: left center; transform-style: preserve-3d; z-index: 2; }
.pp-cara { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4px 14px 14px 4px; }
.pp-cara--frente { background: var(--cover); color: var(--foil); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--w) * .07); text-align: center; box-shadow: 0 24px 50px -24px rgba(21,38,59,.7), inset 6px 0 0 rgba(0,0,0,.18); }
.pp-cara--frente::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--guilloche-oro) center / 240px; opacity: .12; pointer-events: none; }
.pp-filete { position: absolute; inset: calc(var(--w) * .055); border: 1.5px solid var(--foil); border-radius: 2px 8px 8px 2px; opacity: .85; }
.pp-marca { font-family: var(--display); font-weight: 800; font-size: calc(var(--w) * .15); letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
.pp-escudo { width: calc(var(--w) * .34); height: auto; }
.pp-sub { font-weight: 600; font-size: calc(var(--w) * .062); letter-spacing: .14em; text-transform: uppercase; line-height: 1.35; }
.pp-cara--dentro { transform: rotateY(180deg); background: #E7EDE6; border-radius: 14px 4px 4px 14px; padding: calc(var(--w) * .1); display: flex; flex-direction: column; gap: 4px; box-shadow: inset -6px 0 0 rgba(0,0,0,.05); }
.pp-cara--dentro::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--guilloche) center / 240px; opacity: .3; }
.pp-dentro__t { position: relative; font-weight: 700; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; }
.pp-dentro__n { position: relative; font-family: var(--display); font-weight: 600; font-size: calc(var(--w) * .062); line-height: 1.25; color: var(--ink); }
.pp-libro.pp--abierto { transform: none; }
.pp-libro.pp--abierto .pp-tapa { transform: rotateY(-180deg); }

/* 2 y 6. BARRAS DE INFORMACIÓN (cintas) ---------------------------- */
.cinta { position: relative; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.cinta__vista { flex: 1; min-width: 0; overflow: hidden; }
.cinta__pista { display: flex; width: max-content; animation: cinta 40s linear infinite; will-change: transform; }
.cinta__grupo { display: flex; flex: none; align-items: center; gap: 18px; padding: 0 18px 0 0; margin: 0; list-style: none; white-space: nowrap; }
.cinta__grupo li { display: flex; align-items: center; }
.cinta:hover .cinta__pista, .cinta:focus-within .cinta__pista, .cinta--pausada .cinta__pista { animation-play-state: paused; }
@keyframes cinta { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.cinta__pausa { flex: none; margin-right: var(--gutter); min-height: 44px; min-width: 44px; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.cinta--info { background: var(--action); color: #fff; padding: 10px 0 10px 0; }
.cinta--info .cinta__grupo { font-weight: 600; font-size: 17px; }
.cinta--info .cinta__sep { color: var(--foil); }
.cinta--info .cinta__pausa { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.cinta--temas { padding: 22px 0; border-block: 1px solid var(--line); background: var(--surface); }
.cinta--temas .cinta__pista { animation-duration: 60s; animation-direction: reverse; }
.cinta--temas .cinta__grupo { gap: 22px; padding-right: 22px; }
.cinta--temas a { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; line-height: 1.1; }
.cinta--temas a:hover, .cinta--temas a:focus-visible { color: var(--action); text-decoration: underline; text-decoration-thickness: 3px; }
.cinta--temas .cinta__sep { color: var(--stamp); width: 26px; height: 26px; }
.cinta--temas .cinta__pausa { background: var(--paper); color: var(--action); border: 1px solid var(--line-strong); }

/* Secciones oscuras ------------------------------------------------- */
.oscura { position: relative; background: var(--cover); color: var(--paper); overflow: hidden; }
.oscura::before { content: ""; position: absolute; inset: 0; background: var(--guilloche-oro) center / 460px; opacity: .12; pointer-events: none; }
.oscura > * { position: relative; }
.oscura .seccion__titulo { color: var(--paper); }

/* 3. EL PROBLEMA ---------------------------------------------------- */
.problema { padding: 56px 0; }
.problema__grid { display: grid; gap: 26px; }
.problema__h { font-size: clamp(30px, 6.4vw, 54px); line-height: 1.05; max-width: 20ch; }
.problema__pasos { display: grid; gap: 14px; }
.problema__pasos p { display: flex; gap: 14px; align-items: flex-start; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.4; max-width: 42ch; }
.problema__n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 1.5px solid currentColor; font-size: 16px; }
.problema__si { color: var(--foil); }
@media (min-width: 960px) { .problema { padding: 96px 0; } .problema__grid { grid-template-columns: 1.1fr .9fr; align-items: end; gap: 48px; } }

/* 4. CÓMO FUNCIONA -------------------------------------------------- */
.viaje { padding: 48px 0; }
.viaje__grid { display: grid; gap: 20px; }
.viaje__lista { display: none; list-style: none; padding: 0; counter-reset: v; margin-top: 8px; }
.viaje__lista li { counter-increment: v; display: flex; gap: 12px; align-items: center; padding: 10px 0; font-weight: 600; font-size: 18px; color: var(--ink-soft); border-bottom: 1px solid var(--line); transition: color var(--dur-m); }
.viaje__lista li::before { content: counter(v, decimal-leading-zero); font-family: var(--display); font-weight: 800; font-size: 15px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); flex: none; transition: background-color var(--dur-m), color var(--dur-m), border-color var(--dur-m); }
.viaje__lista li.actual { color: var(--ink); }
.viaje__lista li.actual::before { background: var(--action); border-color: var(--action); color: #fff; }
.viaje__libro { display: grid; gap: 14px; }
.viaje__pag { position: relative; background: #FBFCF9; border: 1px solid var(--line); border-radius: 6px 18px 18px 6px; padding: 22px 22px 22px 28px; box-shadow: var(--sombra); overflow: hidden; }
.viaje__pag::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--cover); }
.viaje__pag::after { content: ""; position: absolute; inset: 0; background: var(--guilloche) center / 300px; opacity: .14; pointer-events: none; }
.viaje__pag > * { position: relative; }
.viaje__num { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; color: var(--action); }
.viaje__pag h3 { font-size: 24px; margin-top: 8px; }
.viaje__pag p { margin-top: 8px; color: var(--ink-2); font-size: 17px; max-width: 46ch; }
.viaje__pag a { display: inline-flex; min-height: 44px; align-items: center; margin-top: 6px; font-weight: 700; }
.viaje__sello { margin-top: 10px; }
.viaje__pronto { font-size: 14px !important; font-weight: 600; color: var(--stamp-text) !important; }
@media (min-width: 960px) {
  .viaje { padding: 80px 0; }
  .viaje__grid { grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
  .viaje__lista { display: block; }
  .viaje__pag { padding: 36px 40px 36px 46px; }
  .viaje__pag h3 { font-size: 32px; }
}
/* Modo fijado (solo escritorio, lo activa app.js con ScrollTrigger) */
.viaje--pin { min-height: 100vh; display: flex; align-items: center; }
.viaje--pin .viaje__grid { width: 100%; }
.viaje--pin .viaje__libro { position: relative; height: 440px; perspective: 1800px; }
.viaje--pin .viaje__pag { position: absolute; inset: 0; transform-origin: left center; will-change: transform, opacity; }

/* 5. Catálogo en la portada ---------------------------------------- */
.portada .catalogo { padding-top: 8px; }

/* 7. DEMO ------------------------------------------------------------ */
.demo { background: var(--surface); border: 2px solid var(--action); border-radius: var(--r-l); padding: 24px 20px; display: grid; gap: 12px; max-width: 720px; box-shadow: var(--sombra); }
.demo__frase { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 6vw, 44px); line-height: 1.1; color: var(--ink); }
.demo__acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.demo__voz { border-style: dashed; font-size: 16px; }
.demo__form { display: grid; gap: 8px; }
.demo__fila { display: flex; gap: 8px; flex-wrap: wrap; }
.demo__fila .campo { flex: 1 1 220px; }
.demo > .btn--primario { justify-self: start; }

/* 8. VISTA PREVIA DEL PDF -------------------------------------------- */
.pdf-sec { padding: 56px 0; }
.pdf-grid { display: grid; gap: 32px; align-items: center; }
.pdf-txt { font-size: 18px; max-width: 42ch; margin-bottom: 18px; }
.pdf-cta { background: var(--foil); color: var(--cover); }
.pdf-cta:hover { background: #E2C27A; color: var(--cover); }
.pdf-nota { margin-top: 14px; font-size: 14px; color: #C9D3DD; max-width: 46ch; }
.pdf-vista { display: flex; gap: 14px; justify-content: center; }
.pdf-hoja { --w: clamp(130px, 36vw, 200px); width: var(--w); height: calc(var(--w) * 1.42); border-radius: 4px 12px 12px 4px; position: relative; padding: 14px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.pdf-hoja--tapa { background: #1C3150; color: var(--foil); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; border: 1px solid rgba(212,176,98,.35); }
.pdf-hoja--tapa .pp-filete { inset: 8px; }
.pdf-hoja--tapa .pp-marca { font-size: calc(var(--w) * .15); }
.pdf-hoja--tapa .pp-sub { font-size: calc(var(--w) * .06); }
.pdf-hoja--sellos { background: #FBFCF9; color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.pdf-rejilla { flex: 1; display: grid; grid-template-columns: 1fr 1fr; place-items: center; }
.mini-sello { width: calc(var(--w) * .3); height: calc(var(--w) * .3); border-radius: 50%; border: 2.5px solid var(--stamp); transform: rotate(var(--r, -10deg)); position: relative; }
.mini-sello::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1px dashed var(--stamp); }
.mini-sello--vacio { border: 2px dashed var(--line-strong); }
.mini-sello--vacio::after { display: none; }
.pdf-ejemplo { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-family: var(--display); font-weight: 800; font-size: calc(var(--w) * .16); letter-spacing: .1em; text-transform: uppercase; color: rgba(168,52,30,.55); border: 2px solid rgba(168,52,30,.45); padding: 2px 10px; border-radius: 6px; }
@media (min-width: 960px) { .pdf-sec { padding: 88px 0; } .pdf-grid { grid-template-columns: 1fr 1fr; } }

/* 10. CIERRE ---------------------------------------------------------- */
.cierre { padding: 64px 0; }
.cierre__in { display: grid; gap: 22px; justify-items: start; }
.cierre__h { font-size: clamp(34px, 8vw, 68px); line-height: 1.02; max-width: 16ch; color: var(--paper); }
.portada .footer { margin-top: 0; border-top: 1px solid rgba(212,176,98,.25); }

/* Reduced motion: cintas quietas y deslizables con el dedo, sin desplazamientos */
@media (prefers-reduced-motion: reduce) {
  .cinta__pista { animation: none !important; }
  .cinta__vista { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .cinta__grupo[aria-hidden="true"] { display: none; }
  .cinta__pausa { display: none; }
  .revela-on [data-revela]:not(.is-in) { transform: none; }
}
