/* ================= GESTIÓN DIGITAL — LANDING ================= */
:root {
    --dot: color-mix(in srgb, #00704a 16%, transparent);
    --background: hsl(142, 30%, 98%);
    --foreground: hsl(142, 20%, 8%);
    --card: hsl(142, 30%, 99%);
    --card-foreground: hsl(240, 10%, 3.9%);
    --card-gradient-end: hsl(142, 40%, 94%);
    --popover: hsl(0, 0%, 100%);
    --popover-foreground: hsl(240, 10%, 3.9%);
    --primary: #00a35f;
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-gradient-end: #00704a;
    --secondary: hsl(142, 20%, 93%);
    --secondary-foreground: hsl(142, 25%, 12%);
    --muted: hsl(142, 18%, 96%);
    --muted-foreground: hsl(142, 8%, 44%);
    --accent: hsl(142, 22%, 93%);
    --accent-foreground: hsl(142, 30%, 12%);
    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(0, 0%, 98%);
    --border: hsl(142, 18%, 87%);
    --input: hsl(142, 22%, 87%);
    --ring: hsl(130, 69%, 35%);
    --sidebar-background: hsl(142, 25%, 97%);
    --sidebar-foreground: hsl(142, 20%, 22%);
    --sidebar-primary: hsl(130, 69%, 35%);
    --sidebar-primary-foreground: hsl(0, 0%, 100%);
    --sidebar-accent: hsl(142, 22%, 92%);
    --sidebar-accent-foreground: hsl(142, 25%, 12%);
    --sidebar-border: hsl(142, 18%, 86%);
    --sidebar-ring: hsl(130, 69%, 35%);
    --chart-1: hsl(12, 76%, 61%);
    --chart-2: hsl(173, 58%, 39%);
    --chart-3: hsl(197, 37%, 24%);
    --chart-4: hsl(43, 74%, 66%);
    --chart-5: hsl(27, 87%, 67%);
    --radius: 0.5rem;

    --font-sans: "Geist", system-ui, sans-serif;
    --font-mono: "Space Mono", monospace;
    --font-d: "Space Grotesk", sans-serif;

    --glow: rgb(0 163 95 / 0.14);
    --grid-line: rgb(0 112 74 / 0.06);
    --shadow-lg: 0 30px 80px -30px rgb(0 60 30 / 0.28), 0 8px 24px -12px rgb(0 0 0 / 0.08);
    --shadow-sm: 0 4px 16px -6px rgb(0 0 0 / 0.08);
    --nav-bg: rgb(250 253 251 / 0.72);
    --ease: cubic-bezier(.22, 1, .36, 1);
    color-scheme: light;
}

html.dark {
    --background: #030A06;
    --foreground: hsl(0, 0%, 98%);
    --card: #0F1612;
    --card-foreground: hsl(0, 0%, 98%);
    --card-gradient-end: #071510;
    --popover: #0F1612;
    --popover-foreground: hsl(0, 0%, 98%);
    --primary: #00a35f;
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-gradient-end: #00704a;
    --secondary: hsl(240, 3.7%, 15.9%);
    --secondary-foreground: hsl(0, 0%, 98%);
    --muted: #111613;
    --muted-foreground: hsl(240, 5%, 64.9%);
    --accent: #02643b;
    --accent-foreground: hsl(0, 0%, 98%);
    --destructive: hsl(0, 62.8%, 30.6%);
    --destructive-foreground: hsl(0, 0%, 98%);
    --border: hsl(240, 3.7%, 15.9%);
    --input: #1C3023;
    --ring: var(--primary);
    --sidebar-background: hsl(240, 5.9%, 10%);
    --sidebar-foreground: hsl(240, 4.8%, 95.9%);
    --sidebar-primary: var(--primary);
    --sidebar-primary-foreground: hsl(0, 0%, 100%);
    --sidebar-accent: hsl(240, 3.7%, 15.9%);
    --sidebar-accent-foreground: hsl(0, 0%, 98%);
    --sidebar-border: hsl(240, 3.7%, 15.9%);
    --sidebar-ring: hsl(217.2, 91.2%, 59.8%);
    --chart-1: hsl(220, 70%, 50%);
    --chart-2: hsl(160, 60%, 45%);
    --chart-3: hsl(30, 80%, 55%);
    --chart-4: hsl(280, 65%, 60%);
    --chart-5: hsl(340, 75%, 55%);

    --glow: rgb(0 163 95 / 0.18);
    --grid-line: rgb(255 255 255 / 0.035);
    --shadow-lg: 0 30px 90px -30px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(0 163 95 / 0.08);
    --shadow-sm: 0 4px 16px -6px rgb(0 0 0 / 0.5);
    --nav-bg: rgb(3 10 6 / 0.7);
    color-scheme: dark;
}

/* ================= BASE ================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
    margin: 0;
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body, .nav, .btn, .frame, .plan, .qa, .form-input, .contact-form, .footer, .theme-btn, .chapter-time, .chapter-idx {
    transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--primary); color: var(--primary-foreground); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) {
    html { scroll-snap-type: y proximity; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 10px 16px; border-radius: var(--radius); background: var(--primary); color: var(--primary-foreground); font-weight: 600; transform: translateY(-160%); transition: transform .2s var(--ease); }
.skip-link:focus { transform: none; }

:root { --gutter: clamp(20px, 4vw, 40px); }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono { font-family: var(--font-mono); letter-spacing: 0; }

/* ================= TYPE ================= */
.h1, .h2, .h3 { font-family: var(--font-d); color: var(--foreground); font-weight: 700; text-wrap: balance; }
.h1 { font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 1.02; letter-spacing: -0.035em; }
.h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.06; letter-spacing: -0.03em; }
.h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.15; letter-spacing: -0.02em; }
.hl {
    background: linear-gradient(120deg, var(--primary), var(--primary-gradient-end));
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}
html.dark .hl { background-image: linear-gradient(120deg, #2fd38a, var(--primary)); }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--muted-foreground); line-height: 1.65; max-width: 60ch; text-wrap: pretty; }

.kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; letter-spacing: 0;
    color: var(--primary);
}

/* Ritmo único de los encabezados de sección: label → título → bajada → contenido */
:root { --space-kicker: 12px; --space-title: 16px; --space-head: clamp(36px, 4.5vw, 56px); }
.kicker { margin: 0 0 var(--space-kicker); }
.h2 { margin: 0 0 var(--space-title); }
.h2:last-child, .lead:last-child { margin-bottom: 0; }

.sec {
    position: relative; padding: clamp(88px, 10vw, 120px) 0;
    min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
    scroll-snap-align: center;
}
@media (max-width: 899px) {
    .sec { min-height: 0; padding: 88px 0 72px; scroll-snap-align: none; }
    .hero, .story-head { scroll-snap-align: none; }
    .story-head { min-height: 0; padding: 96px 0 40px; }
}
.sec-head { max-width: 720px; margin: 0 auto var(--space-head); text-align: center; display: flex; flex-direction: column; align-items: center; }
.sec-head .lead { margin-inline: auto; }

/* ================= BUTTONS ================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 24px;
    border-radius: calc(var(--radius) + 2px);
    font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
    border: 1px solid transparent;
    transition: transform .2s var(--ease), box-shadow .25s ease, background-color .35s ease, border-color .35s ease, color .35s ease, filter .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: var(--radius); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-gradient-end));
    color: var(--primary-foreground);
    box-shadow: 0 8px 24px -10px rgb(0 163 95 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.18);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 12px 30px -10px rgb(0 163 95 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.2); }
.btn-line { background: var(--card); color: var(--foreground); border-color: var(--border); }
.btn-line:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }

/* ================= NAV ================= */
.nav {
    position: fixed; inset: 0 0 auto 0; z-index: 50;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: transform .35s var(--ease), background-color .35s ease, border-color .35s ease;
}
.nav.is-hidden { transform: translateY(-100%); }
.nav.is-hidden:focus-within { transform: none; }
.nav.scrolled {
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
    border-bottom-color: var(--border);
}
.nav-in { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.logo-mark { width: 28px; height: 28px; border-radius: 7px; }
html.dark .logo-mark { filter: invert(1); }
.logo-word { font-family: var(--font-d); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }
.logo-word span { color: var(--primary); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    font-size: 14px; color: var(--muted-foreground); padding: 8px 12px; border-radius: var(--radius);
    transition: color .2s, background-color .2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--foreground); background: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-btn {
    width: 38px; height: 38px; display: grid; place-items: center;
    border-radius: var(--radius); border: 1px solid var(--border); background: var(--card);
    color: var(--foreground);
}
.theme-btn:hover { border-color: var(--primary); color: var(--primary); }
.theme-btn .i-sun { display: none; }
.theme-btn .i-moon { display: block; }
html.dark .theme-btn .i-sun { display: block; }
html.dark .theme-btn .i-moon { display: none; }
.nav-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; }
.nav-progress > i {
    display: block; height: 100%; width: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-gradient-end));
    transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 400px) {
    .logo-word { font-size: 16px; }
    .nav-actions .btn-sm { padding: 0 12px; font-size: 13px; }
    .nav-actions { gap: 6px; }
}

/* ================= HERO ================= */
.hero {
    position: relative; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 112px 0 96px; isolation: isolate; overflow: clip;
    scroll-snap-align: start;
}
/* Fondo: mismo lenguaje que el panel ilustrado del login de la app
   (textura de puntos 28px, íconos de rubro en marca de agua, dos círculos difusos que respiran) */
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 5%, transparent), transparent 70%);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; user-select: none; }
.hero-mark { position: absolute; color: var(--primary-gradient-end); opacity: .12; }
/* Fondo fijo de toda la página: textura de puntos + dos círculos difusos que respiran (lenguaje del login) */
.page-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
/* La textura se desplaza en diagonal, sin cortes (avanza exactamente una celda de 28px por ciclo) */
.page-bg::before {
    content: ""; position: absolute; inset: -28px 0 0 -28px;
    background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.2px);
    background-size: 28px 28px;
    animation: dots-drift 9s linear infinite; will-change: transform;
}
@keyframes dots-drift { to { transform: translate(28px, 28px); } }
html.dark { --dot: rgb(255 255 255 / .065); }
html.dark .hero-mark { color: #fff; opacity: .05; }
@media (prefers-reduced-motion: reduce) { .page-bg::before, .mock-glow { animation: none; } }
.hero-grid {
    display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; container-type: inline-size; }
/* "Gestioná tu comercio" mide ~9.6em: 10cqi lo hace entrar en una línea en el ancho de la columna */
.hero .h1 { font-size: clamp(2rem, 10cqi, 3.9rem); margin-bottom: 22px; }
.type-text { white-space: nowrap; }
.type-caret {
    display: inline-block; width: .07em; height: .82em; margin-left: .06em; vertical-align: -0.04em;
    background: var(--primary); border-radius: 2px;
    animation: caret 1.05s steps(1, end) infinite;
}
.type-text.is-typing + .type-caret { animation: none; opacity: 1; }
@keyframes caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-lead { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--muted-foreground); max-width: 48ch; margin-bottom: 32px; text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Mockup: entra girado y se asienta en una leve perspectiva */
.hero-visual { perspective: 1600px; min-width: 0; position: relative; }
.hero-visual .mock-glow { opacity: 0; transition: opacity 1.4s ease .6s; }
.hero-visual.in-view .mock-glow { opacity: .38; }
html.dark .hero-visual.in-view .mock-glow { opacity: .32; }
.hero-device {
    transform-origin: 60% 50%;
    transform: translate3d(60px, 30px, 0) rotateY(-24deg) rotateX(8deg) scale(.92);
    opacity: 0;
    transition: transform 1.3s var(--ease) .25s, opacity .9s ease .25s;
}
.hero-visual.in-view .hero-device { transform: rotateY(-9deg) rotateX(3deg); opacity: 1; }
.hero-visual.in-view .hero-device:hover { transform: rotateY(-3deg) rotateX(1deg); transition-duration: .6s; transition-delay: 0s; }
.hero-device .frame { box-shadow: var(--shadow-lg), 0 40px 90px -40px color-mix(in srgb, var(--primary) 45%, transparent); }

/* Interacción con el cursor (solo mouse; main.js agrega .is-live al terminar la entrada).
   La ventana gira hacia el cursor (--rx/--ry los calcula main.js con suavizado), un brillo recorre
   su superficie y el fondo reacciona con paralaje. */
.hero-visual.in-view .hero-device.is-live,
.hero-visual.in-view .hero-device.is-live:hover {
    transform: rotateY(var(--ry, -9deg)) rotateX(var(--rx, 3deg));
    transition: opacity .9s ease;
    will-change: transform;
}
.hero-device::after {
    content: ""; position: absolute; inset: 0; border-radius: 14px; pointer-events: none;
    background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 0%), rgb(255 255 255 / .22), transparent 65%);
    opacity: 0; transition: opacity .5s ease;
}
html.dark .hero-device::after {
    background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 0%), rgb(255 255 255 / .09), transparent 65%);
}
.hero.is-pointer .hero-device.is-live::after { opacity: 1; }
.hero-bg::after {
    content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
    background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 35%), color-mix(in srgb, var(--primary) 13%, transparent), transparent 70%);
}
.hero.is-pointer .hero-bg::after { opacity: 1; }
.hero-mark {
    translate: calc(var(--px, 0) * var(--d, 8) * -1px) calc(var(--py, 0) * var(--d, 8) * -1px);
    transition: translate .8s var(--ease);
}


@media (max-width: 960px) {
    /* Mobile: solo texto y botones, centrados en la pantalla (el mockup queda para escritorio) */
    .hero { min-height: 100svh; padding: 84px 0 64px; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .hero .h1 { font-size: clamp(2.3rem, 10.5vw, 3.2rem); line-height: 1.05; }
    .hero-lead { font-size: 1.02rem; margin-bottom: 28px; }
    .hero-ctas { width: 100%; display: grid; grid-template-columns: 1fr; gap: 10px; }
    .hero-ctas .btn { height: 50px; font-size: 16px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-device { transform: none; opacity: 1; transition: none; }
    .type-caret { animation: none; display: none; }
}
.scroll-cue {
    position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground);
}
.scroll-cue span {
    width: 1px; height: 34px; background: linear-gradient(var(--primary), transparent);
    transform-origin: top; animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 700px) { .scroll-cue { display: none; } .hero { padding-top: 104px; } }

/* ================= FRAME ================= */
.frame {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--background);
    box-shadow: var(--shadow-lg);
    text-align: left;
}
.frame-bar {
    display: flex; align-items: center; gap: 12px;
    height: 38px; padding: 0 14px;
    background: linear-gradient(180deg, var(--card), var(--muted));
    border-bottom: 1px solid var(--border);
}
.dots { display: flex; gap: 6px; flex: none; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: block; }
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.frame-url {
    flex: 1; min-width: 0; max-width: 420px; margin: 0 auto;
    height: 24px; display: flex; align-items: center; justify-content: center;
    padding: 0 12px; border-radius: 6px;
    background: var(--background); border: 1px solid var(--border);
    font-size: 11px; color: var(--muted-foreground);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frame-body { position: relative; aspect-ratio: 16 / 11; overflow: hidden; container-type: inline-size; background: var(--background); }
.frame-lg .frame-body { aspect-ratio: 16 / 10; }
/* Zoom: la app se maqueta a (z × ancho) y se escala a 1/z; es el contenedor de los @container de los mocks */
.frame-zoom {
    width: calc(var(--z, 1) * 100%); height: calc(var(--z, 1) * 100%);
    transform: scale(calc(1 / var(--z, 1))); transform-origin: 0 0;
    container-type: inline-size;
}
.frame-zoom > .app { height: 100%; }
.frame-layer { position: absolute; inset: 0; overflow: hidden; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.frame-layer:first-child { position: static; height: 100%; }
.frame-stack .frame-layer:not(:first-child) { opacity: 0; transform: translateY(8px); }
.frame-stack .frame-layer.is-on { opacity: 1; transform: none; }
@media (max-width: 600px) {
    .frame { border-radius: 10px; }
    .frame-bar { height: 30px; padding: 0 10px; }
    .dots i { width: 8px; height: 8px; }
    .frame-url { height: 20px; font-size: 10px; }
    .frame-body, .frame-lg .frame-body { aspect-ratio: 4 / 3.4; }
}

/* ================= STORY (ventana única) ================= */
.story { position: relative; }
.story-head {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    max-width: 820px; min-height: 100svh; padding: 88px 0 48px;
    scroll-snap-align: center;
}
/* Los momentos del día, uno debajo del otro (mismo ancho para que queden alineados) */
.story-index { list-style: none; display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: max-content; max-width: 100%; margin-top: var(--space-head); }
.story-index a {
    display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--card); font-size: 13.5px; color: var(--foreground);
    transition: border-color .25s ease, background-color .25s ease;
}
.story-index a:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.story-index .mono { font-size: 11.5px; color: var(--primary); }

/* Un viewport de scroll por paso; el pin queda fijo mientras se recorre */
.story-scroller { position: relative; height: calc(var(--steps, 1) * 100vh); }
.story-marker {
    position: absolute; left: 0; right: 0; height: 100vh;
    top: calc(var(--i, 0) * 100vh);
    scroll-snap-align: start; scroll-margin-top: 0;
    pointer-events: none;
}
.story-pin {
    position: sticky; top: 0; height: 100vh;
    display: flex; align-items: center;
    padding-top: 68px; /* alto del nav: centra en el área visible */
    overflow: hidden;
}
.story-grid {
    display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(32px, 5vw, 72px); align-items: center; width: min(1200px, 100% - 2 * var(--gutter));
}
.story-texts { display: grid; align-items: center; }
.story-text {
    grid-area: 1 / 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
    opacity: 0; transform: translateY(28px); pointer-events: none;
    transition: opacity .45s ease, transform .7s var(--ease);
}
.story-text.is-before { transform: translateY(-28px); }
.story-text.is-active { opacity: 1; transform: none; pointer-events: auto; transition: opacity .6s ease .1s, transform .8s var(--ease) .05s; }
.step-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground); }
.step-title { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
.step-lead { color: var(--muted-foreground); font-size: 16.5px; line-height: 1.65; max-width: 46ch; }
.story-stage { min-width: 0; display: flex; flex-direction: column; gap: 16px; position: relative; }

/* Halo verde solo detrás de los mockups: forma irregular (varias manchas), discreto, deriva lento
   y se apaga entre un mockup y otro */
.mock-glow {
    position: absolute; inset: 10% 6% 16%; z-index: -1; pointer-events: none;
    background:
        radial-gradient(38% 46% at 28% 38%, color-mix(in srgb, var(--primary) 55%, transparent), transparent 72%),
        radial-gradient(30% 40% at 74% 66%, color-mix(in srgb, var(--primary) 45%, transparent), transparent 72%),
        radial-gradient(24% 30% at 58% 18%, color-mix(in srgb, var(--primary-gradient-end) 40%, transparent), transparent 72%);
    filter: blur(36px); opacity: .38;
    transition: opacity .55s ease, transform .7s var(--ease);
    animation: glow-breathe 11s ease-in-out infinite;
}
html.dark .mock-glow { opacity: .32; }
.is-switching .mock-glow { opacity: .06; transform: scale(.92); transition-duration: .3s, .4s; }
@keyframes glow-breathe { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: 1.05; rotate: 7deg; } }
.frame-story { width: 100%; }
.frame-story .frame-body { aspect-ratio: 16 / 11; max-height: calc(100vh - 68px - 110px); width: 100%; }
.story-layer {
    position: absolute; inset: 0; overflow: hidden;
    opacity: 0; transform: translateY(14px) scale(.985);
    transition: opacity .45s ease, transform .6s var(--ease);
}
.story-layer.is-active { opacity: 1; transform: none; transition: opacity .6s ease .12s, transform .8s var(--ease) .08s; }
.story-layer > .app { height: 100%; }
.story-progress { display: flex; gap: 6px; justify-content: center; }
.story-tick { width: 18px; height: 3px; border-radius: 3px; background: var(--border); transition: width .5s var(--ease), background-color .4s ease; }
.story-tick.is-active { width: 36px; background: var(--primary); }

/* Teléfono: versión mobile de las pantallas (solo en pantallas angostas) */
.phone.phone-story { display: none; }
.phone {
    position: relative; width: min(100%, 400px); height: min(60svh, 640px); margin-inline: auto;
    padding: 7px; border-radius: 36px; background: #0b0f0d;
    box-shadow: 0 0 0 1px rgb(255 255 255 / .06), var(--shadow-lg);
    display: flex; flex-direction: column;
}
.phone-status {
    position: relative; flex: none; height: 26px; padding: 0 18px;
    display: flex; align-items: center; justify-content: space-between;
    border-radius: 29px 29px 0 0; background: var(--background); color: var(--foreground);
    font-family: var(--font-sans); font-size: 11px; font-weight: 600;
}
.phone-notch { position: absolute; left: 50%; top: 6px; width: 70px; height: 18px; translate: -50% 0; border-radius: 999px; background: #0b0f0d; }
.phone-icons { display: flex; align-items: center; gap: 3px; }
.phone-icons i { display: block; width: 3px; height: 8px; border-radius: 1px; background: currentColor; opacity: .8; }
.phone-icons i:first-child { height: 6px; }
.phone-icons i.bat { width: 18px; height: 9px; border-radius: 2.5px; margin-left: 3px; opacity: 1; background: linear-gradient(90deg, currentColor 70%, color-mix(in srgb, currentColor 30%, transparent) 70%); }
.phone-screen {
    position: relative; flex: 1; overflow: hidden; border-radius: 0 0 29px 29px;
    background: var(--background); container-type: inline-size;
}
.phone-screen .story-layer > .app { height: 100%; }

@media (max-width: 899px) {
    .frame-story { display: none; }
    .phone.phone-story { display: flex; }
    .story-pin { height: 100svh; padding: 44px 0 16px; align-items: center; }
    .story-grid { grid-template-columns: 1fr; gap: 20px; }
    .story-stage { order: -1; }
    .frame-story .frame-body { aspect-ratio: 4 / 3; max-height: 42vh; }
    .story-text .points { display: none; }
    .step-title { font-size: 1.45rem; }
    .step-lead { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .story-text, .story-text.is-active, .story-layer, .story-layer.is-active, .story-tick { transition: none; transform: none; }
}

.chapter-time, .chapter-idx {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em;
    padding: 4px 10px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--card); color: var(--muted-foreground);
}
.chapter-time { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); background: color-mix(in srgb, var(--primary) 7%, var(--card)); }
.points { display: flex; flex-direction: column; gap: 16px; width: 100%; list-style: none; }
.point { position: relative; padding-left: 18px; }
.point::before {
    content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px;
    background: linear-gradient(var(--primary), color-mix(in srgb, var(--primary) 15%, transparent));
}
.point strong { display: block; font-weight: 600; color: var(--foreground); margin-bottom: 2px; }
.point span { display: block; color: var(--muted-foreground); font-size: 15px; line-height: 1.55; }
.points-compact { gap: 12px; }
.points-compact .point span { font-size: 14px; }

/* ================= DEPÓSITO ================= */
.dep-in { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.dep-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.dep-card {
    display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px;
    border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px);
    background: linear-gradient(145deg, var(--card), var(--card-gradient-end));
    transition: transform .35s var(--ease), border-color .3s ease;
}
.dep-card:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.dep-icon {
    flex: none; width: 42px; height: 42px; border-radius: var(--radius); display: grid; place-items: center;
    color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
}
.dep-title { font-family: var(--font-d); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.dep-text { color: var(--muted-foreground); font-size: 15px; line-height: 1.55; }
@media (max-width: 860px) { .dep-in { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 600px) {
    /* Cards del depósito: ícono chico al lado del título, el texto ocupa todo el ancho */
    .dep-card { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: center; padding: 18px; }
    .dep-card > div { display: contents; }
    .dep-icon { width: 36px; height: 36px; }
    .dep-title { margin: 0; font-size: 1.02rem; }
    .dep-text { grid-column: 1 / -1; margin-top: 10px; font-size: 14.5px; }
}

/* ================= STORY RAIL ================= */
.rail {
    position: fixed; right: 20px; top: 50%; z-index: 40;
    transform: translate(12px, -50%); opacity: 0; pointer-events: none;
    display: none; flex-direction: column; align-items: flex-end; gap: 10px;
    transition: opacity .4s ease, transform .4s var(--ease);
}
@media (min-width: 1101px) { .rail { display: flex; } }
.rail.is-visible { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.rail-item { display: flex; align-items: center; gap: 10px; padding: 3px 0; flex-direction: row-reverse; }
.rail-dot {
    width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: var(--border); border: 1px solid var(--border);
    transition: transform .3s var(--ease), background-color .3s, box-shadow .3s;
}
.rail-label {
    font-size: 11px; color: var(--muted-foreground); white-space: nowrap;
    padding: 3px 8px; border-radius: 6px; background: var(--card); border: 1px solid var(--border);
    opacity: 0; transform: translateX(6px); pointer-events: none;
    transition: opacity .25s, transform .25s var(--ease);
}
.rail-item:hover .rail-label, .rail-item:focus-visible .rail-label { opacity: 1; transform: none; }
.rail-item:hover .rail-dot { background: var(--muted-foreground); }
.rail-item.is-active .rail-dot { background: var(--primary); border-color: var(--primary); transform: scale(1.4); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.rail-item.is-active .rail-label { color: var(--foreground); }

/* ================= FACILITIES ================= */
.fac-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.fac-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.fac-item { padding: 20px 0; border-top: 1px solid var(--border); }
.fac-title { font-family: var(--font-d); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.fac-text { color: var(--muted-foreground); font-size: 15px; line-height: 1.55; }
@media (max-width: 860px) { .fac-in { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .fac-list { grid-template-columns: 1fr; } }

/* ================= PLANS ================= */
.plan-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; align-items: stretch; padding-top: 14px; }
.plan {
    position: relative; display: flex; flex-direction: column; gap: 14px;
    padding: 28px 24px; border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(160deg, var(--card), var(--card-gradient-end));
}
.plan { cursor: pointer; transition: transform .35s var(--ease), border-color .45s ease, box-shadow .6s ease, background-color .35s ease; }
.plan:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.plan.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 28px 70px -22px color-mix(in srgb, var(--primary) 55%, transparent);
}
/* Tinte verde de la card elegida: se desvanece en la anterior y aparece en la nueva */
.plan::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%);
    opacity: 0; transition: opacity .6s ease;
}
.plan.is-selected::before { opacity: 1; }
.plan > * { position: relative; }
.plan > .plan-flag { position: absolute; }
.plan-flag {
    position: absolute; top: -11px; left: 24px;
    font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-gradient-end)); color: var(--primary-foreground);
}
.plan-name { font-family: var(--font-d); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.plan-price { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.plan-price .cur { font-size: 1rem; color: var(--muted-foreground); font-weight: 600; }
.plan-price .amt { font-family: var(--font-d); font-size: clamp(2rem, 3vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.plan-price .per { font-size: 13px; color: var(--muted-foreground); }
.plan-desc { color: var(--muted-foreground); font-size: 14.5px; line-height: 1.5; }
.plan-list { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); flex: 1; margin-bottom: 8px; }
.plan-list li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.45; }
.plan-list li::before {
    content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 14%, transparent);
}
.plan-list li::after {
    content: ""; position: absolute; left: 6px; top: 5px; width: 5px; height: 9px;
    border: solid var(--primary); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
@media (min-width: 1181px) {
    .plan { padding: 26px 20px; }
    .plan-price .amt { font-size: 2.1rem; }
    .plan-desc { min-height: 4.6em; }
}
@media (min-width: 1025px) and (max-width: 1180px) {
    /* Los 5 planes siguen en una fila: cards más compactas */
    .plan-grid { gap: 12px; }
    .plan { padding: 24px 16px; gap: 12px; }
    .plan-flag { left: 16px; }
    .plan-name { font-size: 1.15rem; }
    .plan-price { flex-wrap: nowrap; }
    .plan-price .amt { font-size: 1.6rem; }
    .plan-price .per { font-size: 12px; }
    .plan-desc { font-size: 13.5px; min-height: 4.6em; }
    .plan-list li { font-size: 13.5px; }
    .plan-cta { padding: 0 12px; }
}
@media (max-width: 1024px) {
    /* Las cards bajan a otra fila: 3 por fila, 2 en tablet chica y 1 en el teléfono.
       La última fila incompleta queda centrada. */
    .plan-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 16px; padding-top: 14px; }
    .plan { flex: 0 1 calc((100% - 2 * 16px) / 3); min-width: 0; }
    .plan-desc { min-height: 0; }
}
@media (max-width: 760px) {
    .plan { flex-basis: calc((100% - 16px) / 2); }
}
@media (max-width: 640px) {
    /* Teléfono: carrusel que se desliza con el dedo, cada card engancha al centro y asoma la siguiente */
    .plan-grid {
        flex-wrap: nowrap; justify-content: flex-start; gap: 14px;
        overflow-x: auto; overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
        margin-inline: calc(-1 * var(--gutter)); padding: 14px var(--gutter) 18px;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .plan-grid::-webkit-scrollbar { display: none; }
    .plan { flex: 0 0 min(300px, 82vw); scroll-snap-align: center; }
    .plan:hover { transform: none; }
    /* en el carrusel las cards no esperan a entrar en pantalla: la siguiente siempre asoma */
    .js .plan.reveal { opacity: 1; transform: none; }
}

/* ================= FAQ ================= */
.faq-in { max-width: 820px; display: flex; flex-direction: column; gap: var(--space-head); }
.faq-in > div:first-child { text-align: center; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.qa {
    border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px);
    background: var(--card); overflow: hidden;
}
.qa[open] { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); background: linear-gradient(160deg, var(--card), var(--card-gradient-end)); }
.qa summary {
    list-style: none; cursor: pointer; position: relative;
    padding: 18px 56px 18px 22px; font-weight: 600; font-size: 16px; line-height: 1.4;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before, .qa summary::after {
    content: ""; position: absolute; right: 22px; top: 50%; width: 14px; height: 2px; margin-top: -1px;
    background: var(--primary); border-radius: 2px; transition: transform .3s var(--ease);
}
.qa summary::after { transform: rotate(90deg); }
.qa[open] summary::after { transform: rotate(0); }
.qa summary:hover { color: var(--primary); }
.qa p { padding: 0 22px 20px; color: var(--muted-foreground); font-size: 15px; line-height: 1.65; }

/* ================= CONTACT ================= */
.contact-in { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-copy { display: flex; flex-direction: column; align-items: flex-start; }
.contact-copy .lead { margin-bottom: var(--space-head); }
.contact-points { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.contact-points li { position: relative; padding-left: 26px; }
.contact-points li::before {
    content: ""; position: absolute; left: 4px; top: .55em; width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}
.link-app {
    display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--primary);
    border-bottom: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); padding-bottom: 2px;
}
.link-app:hover { border-bottom-color: var(--primary); }
.contact-form {
    display: flex; flex-direction: column; gap: 16px;
    padding: clamp(22px, 3vw, 34px); border-radius: 20px;
    border: 1px solid var(--border);
    background: linear-gradient(160deg, var(--card), var(--card-gradient-end));
    box-shadow: var(--shadow-sm);
}
.form-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--foreground); }
.form-input {
    width: 100%; min-height: 46px; padding: 11px 14px;
    font: inherit; font-size: 15px; color: var(--foreground);
    background: var(--background); border: 1px solid var(--input); border-radius: var(--radius);
    outline: none; appearance: none;
}
select.form-input {
    padding-right: 38px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%), linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
    background-size: 5px 5px; background-repeat: no-repeat;
}
textarea.form-input { min-height: 120px; resize: vertical; }
.form-input::placeholder { color: var(--muted-foreground); opacity: .8; }
.form-input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-status { font-size: 14px; min-height: 1.4em; color: var(--muted-foreground); }
.form-status:empty { display: none; }
.form-status.is-ok { color: var(--primary); }
.form-status.is-err { color: var(--destructive); }
html.dark .form-status.is-err { color: hsl(0, 84%, 66%); }
@media (max-width: 900px) { .contact-in { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ================= FOOTER ================= */
.footer { border-top: 1px solid var(--border); padding: 48px 0 32px; background: linear-gradient(180deg, transparent, var(--muted)); }
.footer-in { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: start; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-tag { color: var(--muted-foreground); font-size: 14px; max-width: 40ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { font-size: 14px; color: var(--muted-foreground); transition: color .2s; }
.footer-links a:hover { color: var(--primary); }
.footer-legal { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted-foreground); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
@media (max-width: 700px) { .footer-in { grid-template-columns: 1fr; } }

/* ================= REVEAL ================= */
.js .reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity .9s ease, transform 1s var(--ease);
}
.js .reveal-frame {
    opacity: 0; transform: translateY(24px) scale(.96); filter: blur(4px);
    transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
}
.js .reveal.in, .js .reveal-frame.in { opacity: 1; transform: none; filter: none; }
[data-delay="1"] { transition-delay: 80ms !important; }
[data-delay="2"] { transition-delay: 160ms !important; }
[data-delay="3"] { transition-delay: 240ms !important; }
[data-delay="4"] { transition-delay: 320ms !important; }
[data-delay="5"] { transition-delay: 400ms !important; }
[data-delay="6"] { transition-delay: 480ms !important; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
    .js .reveal, .js .reveal-frame { opacity: 1; transform: none; filter: none; }
    .scroll-cue span { animation: none; }
}

/* ================= NAV MOBILE ================= */
.nav-mobile { display: none; position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile-panel {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 200px;
    display: flex; flex-direction: column; padding: 8px;
    background: var(--popover); color: var(--popover-foreground);
    border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow-lg);
}
.nav-mobile-panel a { padding: 10px 12px; border-radius: var(--radius); font-size: 15px; }
.nav-mobile-panel a:hover, .nav-mobile-panel a:focus-visible { background: var(--accent); color: var(--accent-foreground); }
@media (max-width: 859px) { .nav-mobile { display: block; } }
