/* ===== Variables ===== */
:root {
  --azul: #1d4ed8;
  --azul-osc: #1e3a8a;
  --azul-claro: #eff6ff;
  --tinta: #0f172a;
  --texto: #334155;
  --gris: #64748b;
  --borde: #e2e8f0;
  --fondo: #ffffff;
  --fondo-alt: #f8fafc;
  --verde: #15803d;
  --rojo: #b91c1c;
  --radio: 14px;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--sans); color: var(--texto); background: var(--fondo); line-height: 1.65; font-size: 17px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); color: var(--tinta); line-height: 1.2; }
h4 { color: var(--tinta); margin: 0 0 6px; }
a { color: var(--azul); }
code { font-family: var(--mono); font-size: .88em; background: var(--azul-claro); color: var(--azul-osc); padding: 1px 6px; border-radius: 5px; }

/* ===== Menú ===== */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--borde); }
.topbar-inner { max-width: 1200px; margin: auto; padding: 0 20px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--tinta); text-decoration: none; }
.brand span { color: var(--azul); }
.menu { display: flex; gap: 4px; align-items: center; }
.menu a { text-decoration: none; color: var(--texto); font-weight: 500; font-size: .93rem; padding: 8px 12px; border-radius: 8px; transition: background .2s, color .2s; }
.menu a:hover, .menu a.active { background: var(--azul-claro); color: var(--azul); }
.menu a.menu-cta { background: var(--azul); color: #fff; }
.menu a.menu-cta:hover { background: var(--azul-osc); color: #fff; }
.menu-toggle { display: none; background: var(--azul); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font: 600 .9rem var(--sans); cursor: pointer; }

/* ===== Slider principal (Demo 1) ===== */
.hero { background: var(--tinta); }
.slider { position: relative; overflow: hidden; height: min(82vh, 640px); min-height: 440px; }
.slides { display: flex; height: 100%; transition: transform .8s cubic-bezier(.65,0,.35,1); }
.slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s ease-out; }
.slide.is-active img { transform: scale(1); }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,.82) 0%, rgba(15,23,42,.45) 50%, rgba(15,23,42,.1) 100%); }
.slide-content { position: relative; z-index: 2; max-width: 1200px; height: 100%; margin: auto; padding: 0 72px; display: flex; flex-direction: column; justify-content: center; color: #fff; }
.slide-content > * { max-width: 560px; opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.slide.is-active .slide-content > * { opacity: 1; transform: none; }
.slide.is-active .slide-content > *:nth-child(2) { transition-delay: .15s; }
.slide.is-active .slide-content > *:nth-child(3) { transition-delay: .3s; }
.slide.is-active .slide-content > *:nth-child(4) { transition-delay: .45s; }
.slide-content h1, .slide-content h2 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.3rem); margin: 0 0 14px; }
.slide-content p { font-size: 1.08rem; color: #e2e8f0; margin: 0 0 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem !important; font-weight: 600; color: #93c5fd !important; margin-bottom: 10px !important; }
.eyebrow.dark { color: var(--azul) !important; margin: 0 0 4px !important; }
.btn { align-self: flex-start; background: var(--azul); color: #fff; text-decoration: none; padding: 13px 24px; border-radius: 10px; font-weight: 600; transition: background .2s, transform .2s; }
.btn:hover { background: #2563eb; transform: translateY(-2px); }
.arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(15,23,42,.35); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; transition: background .2s; }
.arrow:hover { background: var(--azul); }
.arrow.prev { left: 16px; } .arrow.next { right: 16px; }
.dots { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 5; }
.dots button { width: 12px; height: 12px; border-radius: 6px; border: 0; background: rgba(255,255,255,.5); cursor: pointer; transition: width .3s, background .3s; padding: 0; }
.dots button[aria-selected="true"] { width: 32px; background: #fff; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.15); z-index: 5; }
.progress span { display: block; height: 100%; width: 0; background: #60a5fa; }

/* ===== Secciones ===== */
.section { padding: 88px 20px; }
.section.alt { background: var(--fondo-alt); border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.container { max-width: 1140px; margin: auto; }
.container.narrow { max-width: 820px; }
.narrow-p { max-width: 760px; }
.kicker { color: var(--azul); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin: 0 0 6px; }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: 0 0 18px; }
.section h3 { font-size: 1.35rem; margin: 36px 0 12px; }
.lead { font-size: 1.15rem; color: var(--tinta); }
.muted { color: var(--gris); font-size: .93rem; }
.note { color: var(--gris); font-size: .9rem; margin-top: 14px; }

/* Anatomía */
.anatomy { margin-top: 32px; padding: 28px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo-alt); }
.anatomy h3 { margin-top: 0; }
.anatomy-list li { margin-bottom: 8px; }
.anatomy-diagram { position: relative; margin-top: 24px; padding: 34px 0 10px; overflow: hidden; }
.ad-viewport { position: absolute; top: 6px; left: 0; width: calc(100% / 3); height: 104px; border: 3px solid var(--azul); border-radius: 10px; z-index: 2; pointer-events: none; }
.ad-viewport span { position: absolute; top: -26px; left: 0; font-size: .78rem; font-weight: 600; color: var(--azul); white-space: nowrap; }
.ad-track { display: flex; gap: 0; animation: adMove 8s infinite ease-in-out; }
.ad-slide { flex: 0 0 calc(100% / 3); height: 70px; margin-top: 4px; display: grid; place-items: center; background: #dbeafe; color: var(--azul-osc); font-weight: 600; border-right: 2px dashed #93c5fd; }
.ad-caption { font-size: .9rem; color: var(--gris); margin: 14px 0 0; }
@keyframes adMove { 0%,25% { transform: translateX(0); } 35%,60% { transform: translateX(-33.333%); } 70%,100% { transform: translateX(0); } }

/* Tarjetas de tipos */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-top: 30px; }
.card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 22px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: #93c5fd; box-shadow: 0 10px 30px -12px rgba(29,78,216,.25); transform: translateY(-3px); }
.card h3 { margin: 10px 0 8px; font-size: 1.18rem; }
.card p { margin: 0 0 10px; font-size: .96rem; }
.card .why { color: var(--gris); font-size: .9rem; border-top: 1px solid var(--borde); padding-top: 10px; margin: 0; }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--azul); background: var(--azul-claro); padding: 3px 9px; border-radius: 20px; }

/* Demo 2: carrusel */
.demo-block { margin-top: 56px; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 26px; }
.demo-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.demo-head h3 { margin: 0; }
.carousel-controls { display: flex; gap: 8px; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--borde); background: #fff; color: var(--azul); font-size: 1.6rem; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.round-btn:hover { background: var(--azul); color: #fff; border-color: var(--azul); }
.carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 10px; scrollbar-width: thin; }
.carousel:focus { outline: 2px solid var(--azul); outline-offset: 4px; }
.product { flex: 0 0 calc((100% - 48px) / 4); scroll-snap-align: start; border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; background: var(--fondo-alt); }
.product img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .4s; }
.product:hover img { transform: scale(1.05); }
.product h4 { margin: 12px 14px 2px; font-size: 1rem; }
.product p { margin: 0 14px 14px; font-size: .85rem; color: var(--gris); }

/* Listas y consejos */
.checks { padding-left: 0; list-style: none; }
.checks li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 10px; height: 6px; border-left: 2px solid var(--azul); border-bottom: 2px solid var(--azul); transform: rotate(-45deg); }
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tip { border-left: 4px solid var(--azul); background: var(--fondo-alt); padding: 16px 18px; border-radius: 0 10px 10px 0; }
.tip p { margin: 0; font-size: .95rem; }
.callout { margin-top: 32px; background: var(--azul-claro); border: 1px solid #bfdbfe; border-radius: var(--radio); padding: 22px 24px; }
.callout p { margin: 0 0 8px; }
.callout p:last-child { margin-bottom: 0; }
.callout .checks { margin: 8px 0 0; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0; }
.mini { background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 18px; }
.mini p { margin: 0; font-size: .94rem; }

/* Debate */
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.side { border-radius: var(--radio); padding: 20px 22px; border: 1px solid var(--borde); }
.side h3 { margin: 0 0 8px; }
.side ul { margin: 0; padding-left: 20px; }
.side li { margin-bottom: 8px; font-size: .96rem; }
.side.pro { border-top: 4px solid var(--verde); }
.side.contra { border-top: 4px solid var(--rojo); }

/* Tutorial */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radio); overflow: hidden; background: #000; margin: 26px 0 10px; box-shadow: 0 20px 40px -20px rgba(15,23,42,.4); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.steps { list-style: none; padding: 0; counter-reset: paso; margin-top: 36px; }
.steps > li { counter-increment: paso; position: relative; padding-left: 58px; margin-bottom: 34px; }
.steps > li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--azul); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps h3 { margin: 6px 0 8px; font-size: 1.2rem; }
.code { position: relative; margin: 12px 0; }
.code pre { margin: 0; background: #0f172a; color: #e2e8f0; padding: 18px 20px; border-radius: 12px; overflow-x: auto; font-size: .85rem; line-height: 1.6; }
.code code { background: none; color: inherit; padding: 0; font-size: inherit; }
.copy { position: absolute; top: 10px; right: 10px; background: var(--azul); color: #fff; border: 0; border-radius: 6px; padding: 5px 10px; font: 600 .75rem var(--sans); cursor: pointer; }
.copy:hover { background: #2563eb; }

/* Slider solo CSS (tutorial) */
.slider-css { width: 100%; max-width: 900px; margin: 16px auto 0; overflow: hidden; border-radius: 12px; }
.slider-css ul { display: flex; width: 300%; margin: 0; padding: 0; animation: deslizar 15s infinite alternate ease-in-out; }
.slider-css li { list-style: none; width: calc(100% / 3); }
.slider-css img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
@keyframes deslizar {
  0%, 28% { transform: translateX(0); }
  36%, 64% { transform: translateX(-33.333%); }
  72%, 100% { transform: translateX(-66.666%); }
}

/* Fuentes y pie */
.sources { padding-left: 20px; }
.sources li { margin-bottom: 8px; }
.footer { text-align: center; padding: 30px 20px; background: var(--tinta); color: #94a3b8; font-size: .9rem; }
.footer p { margin: 0; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .product { flex-basis: calc((100% - 16px) / 2); }
}
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .menu { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 10px 16px 16px; border-bottom: 1px solid var(--borde); box-shadow: 0 12px 24px -12px rgba(15,23,42,.2); }
  .menu.open { display: flex; }
  .menu a { padding: 12px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .section { padding: 64px 16px; }
  .slide-content { padding: 0 24px 72px; justify-content: flex-end; }
  .slide::after { background: linear-gradient(0deg, rgba(15,23,42,.9) 0%, rgba(15,23,42,.35) 70%, rgba(15,23,42,.15) 100%); }
  .arrow { display: none; }
  .tips, .three, .versus { grid-template-columns: 1fr; }
  .product { flex-basis: 78%; }
  .steps > li { padding-left: 0; padding-top: 50px; }
  .demo-block { padding: 18px; }
}


/* =========================================================
   Vistas previas animadas de cada tipo de slider
   ========================================================= */
.pv { margin: -6px -6px 16px; border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 6px 18px -10px rgba(15,23,42,.35); }
.pv-bar { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; background: #f1f5f9; border-bottom: 1px solid var(--borde); }
.pv-bar i { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.pv-bar i:nth-child(1) { background: #f87171; } .pv-bar i:nth-child(2) { background: #fbbf24; } .pv-bar i:nth-child(3) { background: #34d399; }
.pv-bar span { flex: 1; height: 9px; margin-left: 10px; border-radius: 5px; background: #fff; border: 1px solid var(--borde); }
.pv-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
.pv-screen img { display: block; }
.pv b, .pv em, .pv s, .pv u, .pv small { display: block; text-decoration: none; font-style: normal; }

/* Piezas comunes */
.pv .ln { height: 5px; border-radius: 3px; background: #cbd5e1; margin: 0 0 5px; width: 90%; }
.pv .ln.short { width: 60%; }
.pv .t1 { height: 9px; width: 70%; border-radius: 4px; background: #fff; margin-bottom: 6px; }
.pv .t2 { height: 9px; width: 45%; border-radius: 4px; background: #fff; margin-bottom: 9px; }
.pv em { width: 42px; height: 13px; border-radius: 4px; background: var(--azul); }
.pv-nav { position: absolute; top: 0; left: 0; right: 0; height: 18px; display: flex; align-items: center; gap: 6px; padding: 0 10px; z-index: 3; }
.pv-nav b { width: 28px; height: 6px; border-radius: 3px; background: #fff; margin-right: auto; }
.pv-nav span { width: 16px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.75); }
.pv-nav.solid { background: #fff; border-bottom: 1px solid var(--borde); }
.pv-nav.solid b { background: var(--tinta); } .pv-nav.solid span { background: #cbd5e1; }
.pv-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 3; }
.pv-dots s { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.55); }
.pv-dots s:first-child { width: 14px; background: #fff; }
.pv-dots.dark s { background: #cbd5e1; } .pv-dots.dark s:first-child { background: var(--azul); }
.pv-arrows { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; z-index: 3; }
.pv-arrows u { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 1px solid var(--borde); }
.pv-arrows.mid { top: 50%; left: 6px; right: 6px; transform: translateY(-50%); justify-content: space-between; }
.pv-arrows.light u { background: rgba(255,255,255,.35); border-color: rgba(255,255,255,.6); }
.pv-light { position: absolute; inset: 0; background: var(--fondo-alt); padding: 12px 10px; }
.pv-light.center { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.pv-label { margin: 0 0 10px; font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); }
.pv-label.small { margin: 10px 0 0; font-size: .55rem; font-weight: 500; letter-spacing: .02em; text-transform: none; }

/* 1. Cabecera: fundido entre imágenes */
.pv-hero, .pv-full { position: absolute; inset: 0; background: var(--tinta); }
.pv-hero img, .pv-full img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: pvFade3 9s infinite; }
.pv-hero img:nth-of-type(2) { animation-delay: 3s; } .pv-hero img:nth-of-type(3) { animation-delay: 6s; }
.pv-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,.75), rgba(15,23,42,.1)); z-index: 1; }
.pv-copy { position: absolute; left: 12px; top: 50%; transform: translateY(-40%); width: 55%; z-index: 2; }
.pv-copy.centered { left: 50%; width: 60%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; }
.pv-copy.centered .t1, .pv-copy.centered .t2 { margin-left: auto; margin-right: auto; }
@keyframes pvFade3 { 0% { opacity: 0; } 6%, 33% { opacity: 1; } 40%, 100% { opacity: 0; } }

/* 2 y 4. Carruseles: pista que avanza de a una tarjeta */
.pv-track { display: flex; gap: 0; height: 100%; }
.pv-track.prod { margin-top: 18px; height: calc(100% - 18px); animation: pvStep4 10s infinite cubic-bezier(.65,0,.35,1); }
.pv-card { flex: 0 0 calc(100% / 3); padding: 0 4px; }
.pv-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.pv-meta { padding: 6px 2px 0; }
.pv-head { height: 14px; margin-bottom: 8px; } .pv-head b { width: 40%; height: 7px; border-radius: 4px; background: var(--tinta); }
.pv-track.posts { height: calc(100% - 22px); animation: pvStep4b 10s infinite cubic-bezier(.65,0,.35,1); }
.pv-card.post { flex-basis: 50%; }
.pv-card.post img { aspect-ratio: 16 / 9; }
.pv-card.post .date { width: 30%; height: 4px; border-radius: 2px; background: #93c5fd; margin-bottom: 6px; }
@keyframes pvStep4 { 0%,18% { transform: translateX(0); } 25%,43% { transform: translateX(-33.333%); } 50%,68% { transform: translateX(-66.666%); } 75%,93% { transform: translateX(-100%); } 100% { transform: translateX(-133.333%); } }
@keyframes pvStep4b { 0%,18% { transform: translateX(0); } 25%,43% { transform: translateX(-50%); } 50%,68% { transform: translateX(-100%); } 75%,93% { transform: translateX(-150%); } 100% { transform: translateX(-200%); } }

/* 3. Vitrina: un producto con pulso suave */
.pv-show { position: absolute; inset: 0; background: linear-gradient(135deg, #fdf6ec, #eef2ff); }
.pv-show img { position: absolute; right: 8%; top: 50%; width: 46%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; opacity: 0; transform: translateY(-50%); animation: pvFade3 9s infinite, pvPulse 1.5s infinite ease-in-out; box-shadow: 0 10px 25px -10px rgba(15,23,42,.5); }
.pv-show img:nth-of-type(2) { animation-delay: 3s, 0s; } .pv-show img:nth-of-type(3) { animation-delay: 6s, 0s; }
.pv-side { position: absolute; left: 10%; top: 50%; transform: translateY(-50%); width: 36%; }
.pv-side .t1 { background: var(--tinta); } .pv-side em { margin-top: 6px; }
@keyframes pvPulse { 0%,100% { transform: translateY(-50%) scale(1); } 50% { transform: translateY(-50%) scale(1.05); } }

/* 5. Logos: desplazamiento infinito */
.pv-marquee { width: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.pv-marquee div { display: flex; width: max-content; animation: pvMarquee 12s linear infinite; }
.pv-marquee span { padding: 0 14px; font-size: .95rem; color: #94a3b8; white-space: nowrap; }
.lg0 { font-family: var(--serif); font-weight: 700; letter-spacing: .15em; }
.lg1 { font-family: var(--serif); font-style: italic; font-size: 1.05rem !important; }
.lg2 { font-family: var(--mono); font-weight: 700; }
.lg3 { font-weight: 800; letter-spacing: .05em; }
.lg4 { font-family: var(--serif); }
.lg5 { font-weight: 300; letter-spacing: .2em; }
@keyframes pvMarquee { to { transform: translateX(-50%); } }

/* 6. Testimonios: tarjetas que se alternan */
.pv-quotes { position: relative; width: 70%; height: 72%; }
.pv-q { position: absolute; inset: 0; background: #fff; border: 1px solid var(--borde); border-radius: 8px; padding: 12px 14px; opacity: 0; animation: pvFade2 8s infinite; box-shadow: 0 6px 16px -10px rgba(15,23,42,.4); }
.pv-q:nth-child(2) { animation-delay: 4s; }
.pv-q::before { content: "\201C"; position: absolute; top: -2px; right: 10px; font-family: var(--serif); font-size: 2.4rem; color: #bfdbfe; line-height: 1; }
.pv-q .av { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font: 700 .55rem var(--sans); font-style: normal; margin-bottom: 8px; }
.av.a1 { background: linear-gradient(135deg, #1d4ed8, #60a5fa); } .av.a2 { background: linear-gradient(135deg, #15803d, #4ade80); }
.pv-q small { width: 35%; height: 5px; border-radius: 3px; background: var(--tinta); margin-top: 8px; }
@keyframes pvFade2 { 0% { opacity: 0; transform: translateX(10px); } 8%, 45% { opacity: 1; transform: none; } 52%, 100% { opacity: 0; transform: translateX(-10px); } }

/* 7. Pantalla completa: acercamiento lento (Ken Burns) */
.pv-full img { animation: pvFade2b 10s infinite, pvZoom 10s infinite linear; }
.pv-full img:nth-of-type(2) { animation-delay: 5s, 5s; }
.pv-full::after { content: ""; position: absolute; inset: 0; background: rgba(15,23,42,.35); z-index: 1; }
.pv-scroll::after { content: ""; position: absolute; left: 50%; top: 3px; width: 2px; height: 4px; margin-left: -1px; border-radius: 1px; background: #fff; animation: pvWheel 1.4s infinite; }
@keyframes pvWheel { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(5px); } }
.pv-scroll { position: absolute; bottom: 8px; left: 50%; width: 10px; height: 16px; margin-left: -5px; border: 2px solid rgba(255,255,255,.8); border-radius: 6px; z-index: 3; }
@keyframes pvFade2b { 0% { opacity: 0; } 6%, 50% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes pvZoom { from { transform: scale(1); } to { transform: scale(1.15); } }

/* 8. Vertical: la pista sube */
.pv-vert { position: absolute; inset: 0; background: linear-gradient(135deg, #fdf6ec, #eef2ff); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 100%; }
.pv-vert > div:first-child { grid-row: 1; overflow: visible; }
.pv-vtrack { grid-column: 2; display: flex; flex-direction: column; animation: pvStepV 9s infinite cubic-bezier(.65,0,.35,1); }
.pv-vtrack { height: 100%; }
.pv-vtrack img { width: 100%; height: 100%; flex: 0 0 100%; object-fit: cover; }
.pv-vtext { grid-column: 1; grid-row: 1; align-self: center; padding: 0 14px; }
.pv-vtext .t1 { background: var(--tinta); width: 80%; } .pv-vtext em { margin-top: 4px; }
.pv-vdots { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
.pv-vdots s { width: 5px; height: 5px; border-radius: 3px; background: #cbd5e1; }
.pv-vdots s:first-child { height: 12px; background: var(--azul); }
@keyframes pvStepV { 0%,25% { transform: translateY(0); } 33%,58% { transform: translateY(-100%); } 66%,91% { transform: translateY(-200%); } 100% { transform: translateY(-300%); } }

/* 9. Landing page: la página completa se recorre sola */
.pv-landing { position: absolute; inset: 0; background: #fff; }
.pv-page { animation: pvScroll 12s infinite ease-in-out; padding-top: 18px; }
.pg-hero { position: relative; height: 92px; }
.pg-hero img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.65); }
.pg-hero .t1 { position: absolute; left: 12px; top: 34px; width: 45%; }
.pg-hero em { position: absolute; left: 12px; top: 52px; }
.pg-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; }
.pg-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; }
.pg-band { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; padding: 0 10px 10px; }
.pg-band img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 5px; }
.pg-foot { height: 26px; background: var(--tinta); }
@keyframes pvScroll { 0%,15% { transform: translateY(0); } 35%,50% { transform: translateY(-34%); } 70%,85% { transform: translateY(-62%); } 100% { transform: translateY(0); } }

/* Comparación de anchos */
.compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0 8px; }
.compare figure { margin: 0; }
.compare .pv { margin: 0 0 10px; }
.compare figure.on .pv { border-color: var(--azul); box-shadow: 0 0 0 3px #bfdbfe; }
.compare figcaption { font-size: .88rem; color: var(--gris); }
.compare figcaption strong { display: block; color: var(--tinta); font-size: .95rem; }
.cmp { background: #fff; }
.cmp-nav { height: 14px; margin: 0 14%; border-bottom: 1px solid var(--borde); position: relative; }
.cmp-nav::before { content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 5px; border-radius: 3px; background: var(--tinta); }
.cmp-slider { position: relative; overflow: hidden; }
.cmp-slider img { width: 100%; height: 100%; object-fit: cover; animation: pvZoom 6s infinite alternate ease-in-out; }
.cmp-slider .t1 { position: absolute; left: 14%; top: 42%; width: 40%; }
.cmp-slider.boxed { height: 48%; margin: 8px 14%; border-radius: 4px; }
.cmp-slider.wide { height: 52%; margin-top: 6px; }
.cmp-slider.screen { position: absolute; inset: 0; }
.cmp-slider.screen .t1 { left: 50%; transform: translateX(-50%); }
.cmp-body { margin: 10px 14% 0; }
@media (max-width: 680px) { .compare { grid-template-columns: 1fr; } }


/* =========================================================
   Página "Tipos y medidas"
   ========================================================= */
.page-head { padding-bottom: 40px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0 0 16px; text-wrap: balance; }
.units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 26px 0 10px; }
.unit { background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 16px; }
.unit .u-big { display: block; font-family: var(--serif); font-weight: 700; font-size: 2rem; color: var(--azul); line-height: 1; margin-bottom: 8px; }
.unit p { margin: 0; font-size: .9rem; }
.unit.off { background: #fef2f2; border-color: #fecaca; }
.unit.off .u-big { color: var(--rojo); text-decoration: line-through; text-decoration-thickness: 3px; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
.mtable { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; }
.mtable th, .mtable td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--borde); }
.mtable tbody th { width: 34%; color: var(--tinta); font-weight: 600; background: var(--fondo-alt); }
.mtable.wide thead th { background: var(--tinta); color: #fff; font-weight: 600; font-size: .85rem; }
.mtable.wide { min-width: 560px; border: 1px solid var(--borde); border-radius: 10px; }
.mtable.summary td:first-child a { font-weight: 600; text-decoration: none; }
.mtable.summary tr:nth-child(even) td { background: var(--fondo-alt); }

/* Dispositivos a escala */
.scale { display: flex; align-items: flex-end; gap: 2.2%; margin: 30px 0 24px; }
.scale figure { margin: 0; flex: 0 0 calc(var(--w) / 106.4 * 93%); min-width: 0; }
.scale figcaption { font-size: .82rem; color: var(--gris); margin-top: 8px; line-height: 1.4; }
.scale figcaption strong { display: block; color: var(--tinta); }
.scale figcaption b { color: var(--azul); }
.dev { background: #1e293b; border-radius: 8px; padding: 5px; }
.dev-screen { position: relative; overflow: hidden; border-radius: 3px; background: var(--tinta); }
.dev.monitor .dev-screen, .dev.laptop .dev-screen { aspect-ratio: 16 / 9; }
.dev.tablet .dev-screen { aspect-ratio: 820 / 1180; }
.dev.mobile { border-radius: 10px; padding: 3px; }
.dev.mobile .dev-screen { aspect-ratio: 390 / 844; border-radius: 7px; }
.dev.laptop { border-radius: 6px 6px 2px 2px; box-shadow: 0 6px 0 -1px #94a3b8; }
.pv-hero.mini .pv-copy { width: 60%; }
.dev.mobile .pv-hero.mini img, .dev.tablet .pv-hero.mini img { object-position: center; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 26px; }
.chip { border: 1px solid var(--borde); background: #fff; color: var(--texto); font: 600 .88rem var(--sans); padding: 8px 16px; border-radius: 30px; cursor: pointer; }
.chip.on { background: var(--azul); color: #fff; border-color: var(--azul); }
.chip:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

/* Fichas */
.specs { display: grid; gap: 22px; }
.spec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 26px; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 24px; scroll-margin-top: 80px; }
.spec[hidden] { display: none; }
.spec-visual { position: sticky; top: 90px; align-self: start; }
.spec-visual .pv { margin: 0; }
.spec-body { min-width: 0; }
.spec-num { margin: 0 0 6px; font-size: .8rem; color: var(--gris); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.spec h3 { margin: 0 0 8px; font-size: 1.4rem; }
.spec-body > p { margin: 0 0 10px; }
.tag.app { background: #dcfce7; color: var(--verde); }
.feat { margin: 0 0 12px; padding-left: 18px; font-size: .94rem; }
.feat li { margin-bottom: 3px; }
.warn { margin: 12px 0 0; font-size: .9rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 12px; color: #713f12; }

/* Vistas previas de app: teléfono */
.pv-app .pv-screen { display: flex; align-items: center; justify-content: center; }
.phone { position: relative; flex: none; height: calc(100% - 16px); width: auto; aspect-ratio: 9 / 19; background: #0f172a; border-radius: 16px; padding: 4px; box-shadow: 0 10px 24px -12px rgba(15,23,42,.6); }
.phone-notch { position: absolute; top: 6px; left: 50%; width: 30%; height: 6px; margin-left: -15%; background: #0f172a; border-radius: 4px; z-index: 5; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 12px; overflow: hidden; background: #fff; }
.pv .t1.dk { background: var(--tinta); }
.pv-dots.static { position: static; transform: none; justify-content: center; }
.pv-dots.mini { margin: 4px 0; }
/* onboarding */
.onb { position: absolute; inset: 0; display: flex; flex-direction: column; }
.onb-track { flex: 1; display: flex; animation: pvStep3 9s infinite cubic-bezier(.65,0,.35,1); }
.onb-s { flex: 0 0 100%; padding: 22px 10px 0; display: flex; flex-direction: column; align-items: center; }
.onb-s img { width: 78%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin-bottom: 12px; }
.onb-s .ln { margin-left: auto; margin-right: auto; }
.onb-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px; }
.onb-foot .skip { width: 18px; height: 4px; border-radius: 2px; background: #cbd5e1; }
.onb-foot em { width: 24px; height: 10px; }
@keyframes pvStep3 { 0%,28% { transform: translateX(0); } 33%,61% { transform: translateX(-100%); } 66%,94% { transform: translateX(-200%); } 100% { transform: translateX(0); } }
/* banner app */
.app-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 6px; }
.app-top b { width: 30px; height: 5px; border-radius: 3px; background: var(--tinta); }
.app-top span { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.app-banner { overflow: hidden; padding: 0 0 0 7%; }
.ab-track { display: flex; gap: 4px; animation: pvStepB 9s infinite cubic-bezier(.65,0,.35,1); }
.ab-track img { flex: 0 0 82%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 6px; }
@keyframes pvStepB { 0%,28% { transform: translateX(0); } 33%,61% { transform: translateX(calc(-82% - 4px)); } 66%,94% { transform: translateX(calc(-164% - 8px)); } 100% { transform: translateX(calc(-246% - 12px)); } }
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 6px 8px; }
.app-grid i { aspect-ratio: 1; border-radius: 6px; background: #e2e8f0; }
/* historias */
.story { position: absolute; inset: 0; background: #000; }
.story img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: pvFade3 9s infinite; }
.story img:nth-of-type(2) { animation-delay: 3s; } .story img:nth-of-type(3) { animation-delay: 6s; }
.story-bars { position: absolute; top: 14px; left: 6px; right: 6px; display: flex; gap: 3px; z-index: 3; }
.story-bars i { flex: 1; height: 2px; background: rgba(255,255,255,.4); border-radius: 1px; overflow: hidden; }
.story-bars b { display: block; height: 100%; width: 0; background: #fff; animation: pvBar 9s infinite linear; }
.story-bars i:nth-child(2) b { animation-name: pvBar2; } .story-bars i:nth-child(3) b { animation-name: pvBar3; }
@keyframes pvBar { 0% { width: 0; } 33.3%, 100% { width: 100%; } }
@keyframes pvBar2 { 0%, 33.3% { width: 0; } 66.6%, 100% { width: 100%; } }
@keyframes pvBar3 { 0%, 66.6% { width: 0; } 100% { width: 100%; } }
.story-user { position: absolute; top: 22px; left: 8px; display: flex; align-items: center; gap: 4px; z-index: 3; }
.story-user span { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, #f59e0b, #db2777); border: 1px solid #fff; }
.story-user b { width: 26px; height: 4px; border-radius: 2px; background: #fff; }
/* pager */
.app-top.light { padding-top: 14px; }
.pager { position: relative; overflow: hidden; }
.pager-track { display: flex; animation: pvStep3 9s infinite cubic-bezier(.65,0,.35,1); }
.pager-track img { flex: 0 0 100%; aspect-ratio: 1; object-fit: cover; }
.pager-count { position: absolute; right: 5px; bottom: 5px; font: 600 .5rem var(--sans); color: #fff; background: rgba(15,23,42,.6); padding: 1px 5px; border-radius: 8px; }
.pager-info { padding: 8px; }
.pager-info em { margin-top: 6px; width: 100%; height: 12px; }
/* range */
.range-demo { padding: 26px 10px; font: 600 .5rem var(--sans); color: var(--gris); }
.range-demo p { margin: 0 0 6px; }
.rg { position: relative; height: 4px; background: #e2e8f0; border-radius: 2px; margin: 0 4px 22px; }
.rg-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--azul); border-radius: 2px; animation: pvRange 4s infinite ease-in-out alternate; }
.rg-thumb { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 2px solid var(--azul); box-shadow: 0 0 0 6px rgba(29,78,216,.12); animation: pvRangeT 4s infinite ease-in-out alternate; }
.rg.two .rg-fill, .rg.two .rg-thumb { animation-delay: -2s; }
.rg-note { margin-top: 10px !important; font-weight: 500; line-height: 1.3; }
@keyframes pvRange { from { width: 20%; } to { width: 80%; } }
@keyframes pvRangeT { from { left: 20%; } to { left: 80%; } }
/* galería con miniaturas */
.pv-thumbmain { position: relative; height: 66%; border-radius: 6px; overflow: hidden; background: #fff; }
.pv-thumbmain img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: pvFade3 9s infinite; }
.pv-thumbmain img:nth-of-type(2) { animation-delay: 3s; } .pv-thumbmain img:nth-of-type(3) { animation-delay: 6s; }
.pv-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.pv-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; opacity: .55; border: 2px solid transparent; animation: pvThumb 9s infinite; }
.pv-thumbs img:nth-child(2) { animation-delay: 3s; } .pv-thumbs img:nth-child(3) { animation-delay: 6s; } .pv-thumbs img:nth-child(4) { animation: none; }
@keyframes pvThumb { 0%, 33% { opacity: 1; border-color: var(--azul); } 34%, 100% { opacity: .55; border-color: transparent; } }
/* antes / después */
.pv-ba { position: absolute; inset: 0; }
.pv-ba > img, .pv-ba-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-ba > img { filter: grayscale(1) brightness(.75) contrast(.9); }
.pv-ba-top { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); animation: pvClip 5s infinite ease-in-out alternate; }
.pv-ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; animation: pvHandle 5s infinite ease-in-out alternate; }
.pv-ba-handle i { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.ba-l, .ba-r { position: absolute; top: 8px; font: 600 .55rem var(--sans); color: #fff; background: rgba(15,23,42,.55); padding: 2px 6px; border-radius: 4px; }
.ba-l { left: 8px; } .ba-r { right: 8px; }
@keyframes pvClip { from { clip-path: inset(0 0 0 25%); } to { clip-path: inset(0 0 0 75%); } }
@keyframes pvHandle { from { left: 25%; } to { left: 75%; } }
/* coverflow 3D */
.pv-cover { position: absolute; inset: 0; background: linear-gradient(180deg, #0f172a, #1e3a8a); perspective: 400px; display: flex; align-items: center; justify-content: center; }
.pv-cover img { position: absolute; width: 30%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; box-shadow: 0 12px 20px -8px rgba(0,0,0,.6); animation: pvCover 10s infinite ease-in-out; }
.pv-cover img:nth-child(1) { animation-delay: 0s; } .pv-cover img:nth-child(2) { animation-delay: -2s; } .pv-cover img:nth-child(3) { animation-delay: -4s; } .pv-cover img:nth-child(4) { animation-delay: -6s; } .pv-cover img:nth-child(5) { animation-delay: -8s; }
@keyframes pvCover {
  0%, 12%  { transform: translateX(0) scale(1) rotateY(0); z-index: 3; opacity: 1; }
  20%, 32% { transform: translateX(-70%) scale(.8) rotateY(45deg); z-index: 2; opacity: .85; }
  40%, 52% { transform: translateX(-120%) scale(.6) rotateY(55deg); z-index: 1; opacity: 0; }
  60%, 72% { transform: translateX(120%) scale(.6) rotateY(-55deg); z-index: 1; opacity: 0; }
  80%, 92% { transform: translateX(70%) scale(.8) rotateY(-45deg); z-index: 2; opacity: .85; }
  100%     { transform: translateX(0) scale(1) rotateY(0); z-index: 3; opacity: 1; }
}
/* video de fondo */
.pv-full.video img { opacity: 1; animation: pvPan 8s infinite alternate ease-in-out; }
@keyframes pvPan { from { transform: scale(1.15) translateX(-4%); } to { transform: scale(1.15) translateX(4%); } }
.pv-rec { position: absolute; top: 8px; right: 8px; z-index: 3; font: 600 .5rem var(--sans); letter-spacing: .08em; color: #fff; background: rgba(185,28,28,.85); padding: 2px 6px; border-radius: 3px; }
.cmp { position: absolute; inset: 0; background: #fff; }

@media (max-width: 860px) {
  .units { grid-template-columns: 1fr 1fr; }
  .spec { grid-template-columns: 1fr; }
  .spec-visual { position: static; max-width: 460px; }
}
@media (max-width: 680px) {
  .scale { flex-wrap: wrap; gap: 14px; }
  .scale figure { flex: 0 0 calc(50% - 7px); }
  .scale figure:last-child { flex-basis: 22%; }
  .spec { padding: 16px; }
}

/* Accesibilidad: sin animaciones si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .pv-hero img:first-of-type, .pv-full img:first-of-type, .pv-show img:first-of-type, .pv-q:first-child { opacity: 1; }
}
