/* ==========================================================================
   AlTanto — landing v2 "scroll-world"
   Paleta heredada de la landing actual (Organic). Tipografía: Manrope.
   Sin gradientes de fondo; movimiento con cubic-bezier(0.32,0.72,0,1).
   ========================================================================== */

:root {
  --bg: #f5ead8;
  --bg-2: #fffdfa;
  --surface: #ebddc5;
  --ink: #201e1d;
  --ink-70: rgba(32, 30, 29, 0.7);
  --ink-55: rgba(32, 30, 29, 0.55);
  --ink-30: rgba(32, 30, 29, 0.3);
  --ink-12: rgba(32, 30, 29, 0.12);
  --accent: #c67139;
  --accent-100: #fff2eb;
  --accent-200: #ffe1d0;
  --accent-300: #ffc6a5;
  --accent-600: #b2622d;
  --accent-700: #8c491a;
  --accent-800: #643312;
  --green: #7a8a5e;
  --green-100: #f0fae1;
  --green-200: #e1eecc;
  --green-600: #728157;
  --green-800: #3d472b;
  --sky: #e9dfcc;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-sm: 0 1px 2px rgba(46, 43, 37, 0.14);
  --shadow-md: 0 3px 10px rgba(46, 43, 37, 0.16);
  --shadow-lg: 0 12px 32px rgba(46, 43, 37, 0.22);
  --sp-100: 12px; --sp-200: 16px; --sp-300: 24px; --sp-400: 32px;
  --sp-500: 40px; --sp-600: 48px; --sp-700: 64px; --sp-800: 80px; --sp-900: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-700); }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: rgba(198, 113, 57, 0.3); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 999px;
  text-decoration: none; transition: top 0.3s var(--ease);
}
.skip:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; min-height: 44px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.7s var(--ease), background-color 0.7s var(--ease), box-shadow 0.7s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); padding-inline: 20px; }
.btn-primary:hover { background: var(--accent-600); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { border-color: var(--ink-12); color: var(--ink); background: transparent; padding-inline: 18px; }
.btn-secondary:hover { background: rgba(32, 30, 29, 0.06); }
.btn-sm { font-size: 14px; min-height: 36px; }
.btn-white { background: #fff; color: var(--accent-800); padding-inline: 20px; }
.btn-white:hover { background: var(--accent-100); }

/* Demo sin descargar: la acción más destacada del hero */
.btn-demo {
  position: relative; color: #fff; padding-inline: 8px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-700) 100%);
  box-shadow: 0 6px 18px rgba(140, 73, 26, 0.32);
}
.btn-demo:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(140, 73, 26, 0.4); }
.btn-demo-icon {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; color: var(--accent-700); padding-left: 2px;
}
.btn-demo::after {
  content: ""; position: absolute; inset: -4px; border-radius: inherit;
  border: 2px solid var(--accent-300); opacity: 0; pointer-events: none;
  animation: demo-pulse 2.4s var(--ease) infinite;
}
@keyframes demo-pulse {
  0% { opacity: 0.9; transform: scale(0.96); }
  70%, 100% { opacity: 0; transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .btn-demo::after { animation: none; } }
/* Mismo estilo que la demo, sin el pulso para no competir con ella */
.btn-demo-calm::after { display: none; }
.actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; width: 100%; }
.menu-demo { color: var(--accent-700) !important; font-weight: 700; }

/* ---------- Barra de progreso ---------- */
.progress {
  position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 60;
  background: transparent; pointer-events: none;
}
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.1s linear; }

/* ---------- Navegación isla flotante ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 50; width: max-content; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 14px; border-radius: 999px;
  background: rgba(255, 253, 250, 0.78);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--ink-12); box-shadow: var(--shadow-md);
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
}
.nav.is-hidden { transform: translate(-50%, -140%); opacity: 0; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; margin-right: 8px; }
.brand img { width: 30px; height: 30px; }
.brand .al { color: var(--accent-800); } .brand .tanto { color: var(--accent); }
.nav-scenes { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0 4px; }
.nav-scenes a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink-70); text-decoration: none; white-space: nowrap;
  transition: background-color 0.7s var(--ease), color 0.7s var(--ease);
}
.nav-scenes a i { width: 6px; height: 6px; border-radius: 999px; background: var(--ink-30); transition: background-color 0.7s var(--ease), transform 0.7s var(--ease); }
.nav-scenes a:hover { background: rgba(32, 30, 29, 0.06); color: var(--ink); }
.nav-scenes a[aria-current="true"] { color: var(--accent-800); background: var(--accent-100); }
.nav-scenes a[aria-current="true"] i { background: var(--accent); transform: scale(1.4); }
.nav-link {
  display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px;
  text-decoration: none; color: var(--ink-70, var(--ink)); font-size: 13px; font-weight: 600;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.nav-link:hover { background: rgba(32, 30, 29, 0.06); color: var(--ink); }
/* Hamburguesa: solo en pantallas donde el menú de escenas se oculta */
.nav-toggle {
  display: none; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent;
  cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-menu {
  position: fixed; top: 72px; left: 16px; right: 16px; z-index: 49;
  padding: 12px; border-radius: 24px; background: rgba(255, 253, 250, 0.98);
  border: 1px solid var(--ink-12); box-shadow: var(--shadow-md);
}
.nav-menu[hidden] { display: none; }
.nav-menu ul { list-style: none; margin: 0; padding: 0; }
.nav-menu li a {
  display: block; padding: 12px 14px; border-radius: 14px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: 16px;
}
.nav-menu li + li { margin-top: 4px; }
.nav-menu li:nth-child(odd) a { background: rgba(198, 113, 57, 0.07); }
.nav-menu li:nth-child(even) a { background: rgba(122, 138, 94, 0.09); }
.nav-menu li a:hover, .nav-menu li a:focus-visible { background: var(--accent-200); color: var(--accent-800); }
.nav-menu li a.menu-demo { background: var(--accent-100); box-shadow: inset 0 0 0 1px var(--accent-300); }
.nav-menu li a.menu-demo:hover, .nav-menu li a.menu-demo:focus-visible { background: var(--accent-200); }

/* ---------- Escenario pegado ---------- */
.track { position: relative; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: var(--bg);
}
/* salto directo desde el menú (escritorio): fundido del escenario */
.stage .viewport, .stage .panels { transition: opacity 0.26s var(--ease); }
.stage.is-jump .viewport, .stage.is-jump .panels { opacity: 0; }
.sky { position: absolute; inset: 0; pointer-events: none; }
.sky .sun {
  position: absolute; right: 10vw; top: 12vh; width: 180px; height: 180px; border-radius: 999px;
  background: var(--accent-200); opacity: 0.8; transform: translateY(calc(var(--p, 0) * -40px));
}
.sky .cloud { position: absolute; height: 30px; border-radius: 999px; background: #fff; opacity: 0.7; }
.sky .cloud::before { content: ""; position: absolute; left: 22%; top: -45%; width: 44%; height: 150%; border-radius: 999px; background: #fff; }
.cloud.c1 { left: 8vw; top: 18vh; width: 140px; animation: drift 46s linear infinite; }
.cloud.c2 { left: 48vw; top: 9vh; width: 90px; animation: drift 61s linear infinite reverse; }
.cloud.c3 { left: 72vw; top: 70vh; width: 120px; animation: drift 73s linear infinite; }
@keyframes drift { from { transform: translateX(-10vw); } to { transform: translateX(110vw); } }

.viewport { position: absolute; inset: 0; }
.world {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  transform-origin: 0 0; will-change: transform;
}
.scene {
  position: absolute; width: 900px; height: 620px; margin: -310px 0 0 -450px;
  display: block; --d: 0; contain: layout style;
}
/* escenas lejanas a la cámara: no se pintan (las marca el motor) */
.scene.is-far { visibility: hidden; }
.scene svg { position: relative; z-index: 2; }
.scene .halo {
  position: absolute; left: 220px; top: 100px; width: 460px; height: 460px; border-radius: 999px; background: var(--accent-200);
  transform: scale(calc(0.6 + clamp(0, var(--d), 1) * 0.5)); opacity: clamp(0, calc(var(--d) * 1.2), 0.9); z-index: 0;
}
.scene .shot {
  position: absolute; left: 322px; top: 72px; width: 256px; height: 556px; z-index: 1;
  border-radius: 30px; object-fit: cover; object-position: top center;
  transform: translateY(calc((1 - clamp(0, calc(var(--d) * 2), 1)) * 60px));
  opacity: clamp(0, calc(var(--d) * 3), 1);
}
.scene svg { width: 100%; height: 100%; overflow: visible; display: block; }
.ground {
  position: absolute; left: 50%; top: 50%; width: 1500px; height: 1500px;
  margin: -750px 0 0 -750px; border-radius: 50%; background: var(--sky); opacity: 0.55;
  transform: scale(0.9, 0.5); z-index: -1;
}

/* Carretera que une escenas (dibujada en el mundo) */
.road { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.road path { fill: none; stroke: var(--ink-12); stroke-width: 26; stroke-linecap: round; stroke-dasharray: 2 40; }
.road path.base { stroke: rgba(32, 30, 29, 0.08); stroke-dasharray: none; }

/* ---------- Paneles de texto por escena ---------- */
.panel {
  position: absolute; z-index: 5; max-width: 480px;
  left: clamp(16px, 7vw, 96px); top: 50%; transform: translateY(-50%);
  padding: 0; opacity: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.panel.right { left: auto; right: clamp(16px, 7vw, 96px); }
.panel.is-on { opacity: 1; pointer-events: auto; }
.panel .kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  padding: 6px 12px; border-radius: 999px; background: var(--accent-100); color: var(--accent-800);
  border: 1px solid var(--accent-300); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.panel .kicker.green { background: var(--green-100); color: var(--green-800); border-color: var(--green-200); }
.panel h2 { font-size: 36px; margin-bottom: 16px; max-width: 14ch; }
.panel .copy { font-size: 18px; color: var(--ink-70); max-width: 38ch; margin-bottom: 24px; }
.panel .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tag { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-2); border: 1px solid var(--ink-12); }
.tag.accent { background: var(--accent-100); color: var(--accent-800); border-color: transparent; }
.tag.green { background: var(--green-100); color: var(--green-800); border-color: transparent; }
.panel .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.panel .fine { margin-top: 16px; font-size: 14px; color: var(--ink-55); }
/* Etiqueta Capital Semilla: bloque rojo con estrella, franja azul y línea roja abajo (estilo gráfica Sercotec) */
.panel .award { display: inline-flex; align-items: stretch; margin-top: 16px; border-radius: 4px; overflow: hidden; color: #fff; line-height: 1.2; box-shadow: var(--shadow-sm); }
.panel .award .award-ico { display: grid; place-items: center; width: 34px; background: #d52b3a; }
.panel .award .award-main {
  display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 12px 7px;
  background: linear-gradient(90deg, #d52b3a, #e8607a) bottom / 100% 3px no-repeat, #0f69b4;
}
.panel .award strong { font-size: 13px; font-weight: 700; }
.panel .award small { font-size: 10.5px; font-weight: 500; opacity: 0.9; }

/* Hero (primer panel) */
.panel.hero h1 { font-size: 60px; line-height: 1; max-width: 12ch; margin-bottom: 20px; }
.panel.hero h1 em { display: block; font-style: normal; color: var(--accent); }
.panel.hero .copy { font-size: 20px; }
.play-badge img { height: 60px; width: auto; transition: transform 0.7s var(--ease); }
.play-badge:hover img { transform: translateY(-2px); }
.play-badge.nobadge img { display: none; }
.play-badge.nobadge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform 0.7s var(--ease);
}
.play-badge.nobadge::before { content: "▶"; font-size: 12px; color: var(--accent-300); }
.play-badge.nobadge::after { content: "Descargar en Google Play"; }
.play-badge.nobadge:hover { transform: translateY(-2px); }
.ios-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px 0 12px; border-radius: 9px;
  background: #8a8580; color: #fff; cursor: not-allowed; user-select: none; line-height: 1;
}
.ios-badge svg { width: 20px; height: 24px; flex: none; margin-top: -2px; }
.ios-badge-text { display: flex; flex-direction: column; gap: 2px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.ios-badge-text small { font-size: 11px; font-weight: 500; letter-spacing: 0; opacity: 0.92; }

/* Pista de swipe por escena (solo móvil, modo paso a paso) */
.swipe-cue { display: none; }
body.step-mode .swipe-cue {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ink-12);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-55);
  opacity: 0; transition: opacity 0.7s var(--ease);
}
body.step-mode .stage.is-settled .swipe-cue { opacity: 1; }
.swipe-cue em { font-style: normal; font-weight: 600; color: var(--ink-30); margin-left: 4px; }
.swipe-cue .chev { width: 9px; height: 9px; border-left: 2px solid var(--accent); border-top: 2px solid var(--accent); transform: rotate(45deg); animation: cue 1.6s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(4px) rotate(45deg); opacity: 0.4; } 50% { transform: translateY(-2px) rotate(45deg); opacity: 1; } 100% { transform: translateY(4px) rotate(45deg); opacity: 0.4; } }
body.step-mode .hint { display: none; }

/* Indicio de scroll */
.hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-55);
  transition: opacity 0.7s var(--ease);
}
.hint .mouse { width: 22px; height: 34px; border: 2px solid var(--ink-30); border-radius: 999px; position: relative; }
.hint .mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; margin-left: -2px; border-radius: 999px; background: var(--accent); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
.hint-text { transition: opacity 0.7s var(--ease); }
.hint.is-compact { gap: 0; }
.hint.is-compact .hint-text { opacity: 0; width: 0; overflow: hidden; white-space: nowrap; }

/* ---------- Animaciones internas por escena (driven by --d) ---------- */
/* Casa */
.s-home .win { fill: #f3d9b8; transition: fill 0.4s var(--ease); }
.s-home .win.on { fill: #ffd27a; opacity: clamp(0.35, calc(0.35 + var(--d) * 0.9), 1); }
.s-home .smoke { opacity: clamp(0, calc((var(--d) - 0.2) * 3), 0.8); transform: translateY(calc(var(--d) * -30px)); }
.s-home .person { transform-box: fill-box; transform-origin: bottom center; transform: translateY(calc((1 - var(--d)) * 30px)); opacity: clamp(0, calc((var(--d) - 0.15) * 4), 1); }
.s-home .person.p2 { transform: translateY(calc((1 - var(--d)) * 40px)); opacity: clamp(0, calc((var(--d) - 0.3) * 4), 1); }
.s-home .person.p3 { transform: translateY(calc((1 - var(--d)) * 50px)); opacity: clamp(0, calc((var(--d) - 0.45) * 4), 1); }
.s-home .heart { transform-box: fill-box; transform-origin: center; transform: scale(clamp(0, calc((var(--d) - 0.55) * 3), 1)); }

/* Pauta */
.s-plan .row { transform-box: fill-box; transform-origin: left center; opacity: clamp(0, calc((var(--d) - var(--t)) * 6), 1); transform: translateX(calc((1 - clamp(0, calc((var(--d) - var(--t)) * 6), 1)) * 24px)); }
.s-plan .hand { transform-box: fill-box; transform-origin: 50% 90%; transform: rotate(calc(var(--d) * 180deg)); }
.s-plan .hand.min { transform: rotate(calc(var(--d) * 720deg)); }
.s-plan .bell { transform-box: fill-box; transform-origin: top center; transform: rotate(calc(sin(var(--d) * 18) * 14deg)); }

/* Registro */
.s-tap .finger { transform-box: fill-box; transform-origin: center; transform: translate(calc((1 - clamp(0, calc(var(--d) * 3), 1)) * 120px), calc((1 - clamp(0, calc(var(--d) * 3), 1)) * 90px)); opacity: clamp(0, calc(1.6 - var(--d) * 2), 1); }
.s-tap .check-ring { stroke-dasharray: 220; stroke-dashoffset: calc(220px * (1 - clamp(0, calc((var(--d) - 0.3) * 2.5), 1))); }
.s-tap .check-mark { stroke-dasharray: 60; stroke-dashoffset: calc(60px * (1 - clamp(0, calc((var(--d) - 0.5) * 3), 1))); }
.s-tap .card-bg { fill: #fffdfa; transition: fill 0.5s var(--ease); }
.s-tap.done .card-bg { fill: #e1eecc; }
.s-tap .ripple { transform-box: fill-box; transform-origin: center; transform: scale(calc(0.2 + clamp(0, calc((var(--d) - 0.3) * 2), 1) * 2.4)); opacity: clamp(0, calc(1 - (var(--d) - 0.3) * 2), 0.5); }
.s-tap .packet { offset-path: path("M 560 300 C 700 200, 760 150, 860 70"); offset-distance: calc(clamp(0, calc((var(--d) - 0.6) * 2.5), 1) * 100%); opacity: clamp(0, calc((var(--d) - 0.6) * 6), 1); }

/* Familia */
.s-fam .pin { transform-box: fill-box; transform-origin: bottom center; transform: scale(clamp(0, calc((var(--d) - var(--t)) * 5), 1)); }
.s-fam .ring { transform-box: fill-box; transform-origin: center; transform: scale(calc(0.3 + clamp(0, calc((var(--d) - var(--t)) * 2), 1) * 2)); opacity: clamp(0, calc(0.6 - (var(--d) - var(--t)) * 1.2), 0.6); }
.s-fam .toast { transform-box: fill-box; transform-origin: center; opacity: clamp(0, calc((var(--d) - var(--t)) * 6), 1); transform: translateY(calc((1 - clamp(0, calc((var(--d) - var(--t)) * 6), 1)) * 18px)); }
.s-fam .link { stroke-dasharray: 600; stroke-dashoffset: calc(600px * (1 - clamp(0, calc((var(--d) - 0.1) * 1.6), 1))); }

/* Tendencias */
.s-trend .bar { transform-box: fill-box; transform-origin: bottom center; transform: scaleY(clamp(0.04, calc((var(--d) - var(--t)) * 4), 1)); }
.s-trend .line { stroke-dasharray: 700; stroke-dashoffset: calc(700px * (1 - clamp(0, calc((var(--d) - 0.15) * 1.4), 1))); }
.s-trend .dot { transform-box: fill-box; transform-origin: center; transform: scale(clamp(0, calc((var(--d) - var(--t)) * 6), 1)); }
.s-trend .pdf { transform-box: fill-box; transform-origin: center; opacity: clamp(0, calc((var(--d) - 0.65) * 4), 1); transform: translateY(calc((1 - clamp(0, calc((var(--d) - 0.65) * 4), 1)) * 30px)) rotate(-6deg); }

/* CTA */
.s-cta .phone-img { transform-box: fill-box; transform-origin: bottom center; transform: translateY(calc((1 - clamp(0, calc(var(--d) * 2), 1)) * 60px)); opacity: clamp(0, calc(var(--d) * 3), 1); }
.s-cta .halo { transform-box: fill-box; transform-origin: center; transform: scale(calc(0.6 + clamp(0, var(--d), 1) * 0.5)); opacity: clamp(0, calc(var(--d) * 1.2), 0.9); }
.s-cta .pill { transform-box: fill-box; transform-origin: center; opacity: clamp(0, calc((var(--d) - var(--t)) * 5), 1); transform: translateY(calc((1 - clamp(0, calc((var(--d) - var(--t)) * 5), 1)) * 16px)); }

/* Texto común en SVG */
.svg-txt { font-family: var(--font); font-weight: 600; fill: var(--ink); }
.svg-txt.muted { fill: var(--ink-55); font-weight: 500; }
.svg-txt.accent { fill: var(--accent-800); }

/* ---------- Secciones posteriores al mundo ---------- */
.after { position: relative; background: var(--bg); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--sp-300); }
.section { padding: var(--sp-900) 0; }
.eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-700); font-weight: 700; margin-bottom: 12px; }
.section h2 { font-size: 36px; margin-bottom: 16px; }
.section .lead { font-size: 18px; color: var(--ink-70); max-width: 56ch; margin-bottom: var(--sp-600); }

/* Tagline con revelado palabra a palabra */
.tagline { padding: var(--sp-900) 0 var(--sp-600); }
.tagline p { font-size: 48px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; max-width: 680px; margin: 0 auto; text-align: center; }
.tagline .w { color: var(--ink-30); transition: color 0.9s var(--ease); display: inline-block; }
.tagline .w.on { color: var(--ink); }
.tagline .w.on.acc { color: var(--accent); }

/* Cómo funciona */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-300); }
.step { background: var(--bg-2); border-radius: 24px; padding: var(--sp-400); border: 1px solid var(--ink-12); }
.step .n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; margin-bottom: 16px; }
.step.green .n { background: var(--green-600); }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--ink-70); font-size: 16px; }

/* Prueba / tarjetas por rol */
.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-300); }
.role { border-radius: 32px; padding: var(--sp-500); }
.role.admin { background: var(--accent-800); color: var(--accent-100); box-shadow: var(--shadow-lg); }
.role.care { background: var(--bg-2); border: 1px solid var(--ink-12); }
.role .tag { margin-bottom: 16px; }
.role.admin .tag { background: rgba(255, 255, 255, 0.16); color: var(--accent-100); border-color: transparent; }
.role h3 { font-size: 24px; margin-bottom: 8px; }
.role p { margin-bottom: 20px; font-size: 16px; opacity: 0.85; }
.role ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.role li { display: flex; gap: 10px; font-size: 16px; }
.role li svg { flex: none; margin-top: 3px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--sp-600); align-items: start; }
.faq-side { position: sticky; top: 96px; }
.faq-list { display: grid; gap: 12px; }
details { background: var(--surface); border-radius: 24px; padding: 20px 24px; }
details summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; font-weight: 700; font-size: 18px; line-height: 1.3; }
details summary::-webkit-details-marker { display: none; }
details summary svg { flex: none; transition: transform 0.7s var(--ease); }
details[open] summary svg { transform: rotate(180deg); }
details p { margin-top: 12px; color: var(--ink-70); font-size: 16px; }

/* CTA final */
.cta-card { position: relative; overflow: hidden; background: var(--accent); color: #fff; border-radius: 40px; padding: var(--sp-800) var(--sp-600); box-shadow: var(--shadow-lg); }
.cta-card .orb { position: absolute; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.cta-card h2 { font-size: 48px; max-width: 16ch; margin-bottom: 16px; }
.cta-card p { max-width: 44ch; font-size: 18px; opacity: 0.9; margin-bottom: var(--sp-400); }
.cta-card .actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; position: relative; }

/* Footer */
footer { padding: var(--sp-700) 0 var(--sp-500); }
footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--sp-500); align-items: start; }
footer .brand { margin-bottom: 12px; }
footer .about { font-size: 14px; color: var(--ink-55); max-width: 46ch; }
footer nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; font-size: 14px; }
footer nav a { text-decoration: none; color: var(--ink-70); font-weight: 600; }
footer nav a:hover { color: var(--accent-700); }

/* Revelado al entrar en pantalla */
.reveal { opacity: 0; transform: translateY(40px); filter: blur(6px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Modo estático (reduced motion / sin JS) ---------- */
.only-static { display: none !important; }
.static .only-static { display: initial !important; }
.static .only-animated { display: none !important; }
.static .progress, .static .swipe-cue { display: none; }
.static .track { height: auto !important; }
.static .stage { position: relative; height: auto; overflow: visible; padding: 96px 0 40px; }
.static .viewport, .static .sky, .static .hint { display: none; }
.static .panels { display: grid; gap: 48px; max-width: 720px; margin: 0 auto; padding: 0 24px; }
.static .panel { position: static; transform: none; opacity: 1; pointer-events: auto; max-width: none; }

/* ---------- Responsive ---------- */
/* Escritorio: el inicio usa más ancho (titular en dos líneas, botones en una fila) y baja un poco para no quedar bajo el menú */
@media (min-width: 1001px) {
  .panel.hero { max-width: min(680px, 56vw); top: calc(50% + 28px); }
  .panel.hero h1 { max-width: 18ch; }
  .panel.hero .copy { max-width: 46ch; }
}
/* Escritorio con poca altura (notebooks, ventana no maximizada) */
@media (min-width: 1001px) and (max-height: 820px) {
  .panel.hero .kicker { margin-bottom: 12px; }
  .panel.hero h1 { font-size: 54px; margin-bottom: 16px; }
  .panel.hero .copy { font-size: 18px; margin-bottom: 16px; }
  .panel.hero .fine { display: none; }
}
@media (max-width: 1000px) {
  .nav-scenes, .nav-link { display: none; }
  .nav-toggle { display: flex; }
  .steps, .roles, .faq-grid { grid-template-columns: 1fr; }
  .faq-side { position: static; }
  footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* En móvil, sin desenfoques ni filtros: son la causa típica de parpadeo al hacer scroll */
  .nav { top: 10px; padding: 6px 6px 6px 10px; backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 253, 250, 0.96); }
  .sky .cloud { animation: none; }
  .reveal { filter: none; }
  /* Sin capa GPU fija en móvil: el navegador vuelve a dibujar el mundo a la escala
     real en cada cuadro, en vez de reescalar una textura (eso era el parpadeo). */
  .world { will-change: auto; }
  .ground { display: none; }
  .nav .nav-cta { display: none; }
  .brand { font-size: 16px; }
  .panel, .panel.right {
    left: 16px; right: 16px; top: auto; bottom: 20px; transform: none; max-width: none;
    padding: 20px; border-radius: 24px; background: rgba(255, 253, 250, 0.92);
    border: 1px solid var(--ink-12); box-shadow: var(--shadow-md);
    background: rgba(255, 253, 250, 0.82);
    padding: 16px;
  }
  .panel.hero .fine { display: none; }
  .panel.hero .kicker { margin-bottom: 10px; }
  .panel h2 { font-size: 24px; margin-bottom: 8px; }
  /* "Cuidar en familia," en una línea y "sin perder el hilo" en la de abajo */
  .panel.hero h1 { font-size: min(36px, 8.6vw); max-width: none; white-space: nowrap; margin-bottom: 12px; }
  .panel .copy, .panel.hero .copy { font-size: 16px; margin-bottom: 12px; }
  .panel .tags { display: none; }
  .panel .fine { margin-top: 8px; font-size: 12px; }
  .panel .award { margin-top: 10px; }
  .panel .award .award-ico { width: 30px; }
  .panel .award strong { font-size: 12px; }
  .panel .award small { font-size: 10px; }
  .panel .award svg { width: 14px; height: 14px; }
  .play-badge img { height: 48px; }
  .ios-badge { height: 37px; padding: 0 13px 0 10px; border-radius: 7px; gap: 6px; }
  .ios-badge svg { width: 16px; height: 19px; }
  .ios-badge-text { font-size: 15px; gap: 1px; }
  .ios-badge-text small { font-size: 9px; }
  .hint { bottom: auto; top: 76px; }
  .sky .sun { width: 110px; height: 110px; right: 6vw; top: 9vh; }
  .section { padding: var(--sp-700) 0; }
  .section h2, .cta-card h2 { font-size: 30px; }
  .tagline p { font-size: 30px; }
  .cta-card { padding: var(--sp-600) var(--sp-300); border-radius: 28px; }
  .role { padding: var(--sp-300); border-radius: 24px; }
}

/* ---------- Inicio: botones y etiqueta en una grilla de dos columnas ---------- */
.panel.hero .actions { display: grid; grid-template-columns: 1fr 1fr; width: max-content; max-width: 100%; align-items: center; gap: 12px; }
.panel.hero .store-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.panel.hero .ios-badge { min-width: 157px; }
.panel.hero .actions-row { display: contents; }
.panel.hero .award { grid-column: 1; margin-top: 4px; }
.panel.hero .award .award-main { flex: 1; }
/* Brillo sutil que cruza la etiqueta cada pocos segundos, y la estrella late */
.panel .award { position: relative; }
.panel .award::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%; background-position: 130% 0; animation: award-shine 5s var(--ease) 1.2s infinite;
}
.panel .award .award-ico svg { animation: award-star 5s var(--ease) 1.2s infinite; }
@keyframes award-shine { 0% { background-position: 130% 0; } 30%, 100% { background-position: -30% 0; } }
@keyframes award-star { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.22) rotate(-8deg); } 24% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .panel .award::after, .panel .award .award-ico svg { animation: none; } }

@media (max-width: 720px) {
  /* Descargas más grandes (mitad y mitad) y pruebas más chicas, todo al mismo ancho */
  .panel.hero .actions { width: auto; gap: 8px; }
  .panel.hero .store-row { display: contents; }
  .panel.hero .ios-badge { min-width: 0; }
  .panel.hero .play-badge { display: block; }
  .panel.hero .play-badge img { width: 100%; height: auto; display: block; }
  .panel.hero .ios-badge { height: auto; aspect-ratio: 157 / 46; justify-content: center; padding: 0 8px; }
  .panel.hero .ios-badge svg { width: 18px; height: 22px; }
  .panel.hero .ios-badge-text { font-size: 17px; }
  .panel.hero .ios-badge-text small { font-size: 10px; }
  .panel.hero .btn-demo { grid-column: 1 / -1; min-height: 38px; padding-block: 4px; font-size: 14px; }
  .panel.hero .btn-demo-icon { width: 24px; height: 24px; }
  .panel.hero .award { grid-column: 1 / -1; margin-top: 0; }
  .panel.hero .award .award-main { align-items: center; text-align: center; }
}
