/* Ventaza — landing. Mismos tokens que la app (apps/app/src/estilos.css): fondo gris neutro, tarjetas blancas
   sin borde, interacción en negro (blanco en oscuro), titulares en dos tonos. */

:root {
  color-scheme: light dark;
  --bg: #f2f2f4;
  --surface: #ffffff;
  --surface-2: #f2f2f4;
  --surface-3: #e4e5e8;
  --surface-3-press: #d9dadf;
  --ink: #1d1d1f;
  --ink-strong: #030303;
  --muted: #6e6e73;
  --gris: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #030303;
  --accent-press: #2c2c2e;
  --accent-ink: #f7f8f9;
  --good: #1f7a3a;
  --dot: rgba(0, 0, 0, 0.11);
  --chrome: rgba(242, 242, 244, 0.72);
  --shadow-1: 0 30px 60px -30px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.04);
  --sombra-tel: rgba(0, 0, 0, 0.22);
  --shadow-btn: 0 14px 30px -10px rgba(3, 3, 3, 0.45);
  --bezel: #1d1d1f;
  --bezel-ring: 0 0 0 1.5px #3a3a3c inset;
  --barra: #f2f2f4;
  --barra-hoja: #a3a3a4;
  --barra-ink: #030303;
  --oscura-bg: #000000;
  --oscura-card: #1c1c1e;
  --s1: #3d8a68;
  --s2: #6a5bc4;
  --s3: #3a7bc8;
  --s4: #c2643a;
  --s5: #c25a84;
  --radius: 28px;
  --radius-s: 14px;
  --gutter: 20px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --surface-3: #2c2c2e;
    --surface-3-press: #3a3a3c;
    --ink: #f5f5f7;
    --ink-strong: #ffffff;
    --muted: #98989d;
    --gris: #86868b;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #f5f5f7;
    --accent-press: #d1d1d6;
    --accent-ink: #030303;
    --good: #32d74b;
    --dot: rgba(255, 255, 255, 0.1);
    --chrome: rgba(10, 10, 12, 0.72);
    --shadow-1: none;
    --sombra-tel: rgba(0, 0, 0, 0.6);
    --shadow-btn: 0 14px 30px -12px rgba(255, 255, 255, 0.2);
    --bezel: #2c2c2e;
    --bezel-ring: 0 0 0 1.5px #48484a inset;
    --barra: #000000;
    --barra-hoja: #000000;
    --barra-ink: #ffffff;
    --oscura-bg: #0c0c0d;
    --oscura-card: #1c1c1e;
    --logo-ring: 0 0 0 1px rgba(255, 255, 255, 0.18);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
strong { font-weight: 600; color: var(--ink); }

.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico--grande { width: 28px; height: 28px; stroke-width: 1.6; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.saltar {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 12px 16px; border-radius: 12px; text-decoration: none; font-weight: 600;
}
.saltar:focus { top: 12px; }

.contenedor { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.contenedor--angosto { max-width: calc(760px + 2 * var(--gutter)); }

/* Tipografía */
.rotulo {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.titular {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-strong);
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
  max-width: 20ch;
}
.titular--hero { font-size: clamp(48px, 7.6vw, 96px); line-height: 0.98; letter-spacing: -0.048em; max-width: 11ch; }
.titular--centro { text-align: center; margin-left: auto; margin-right: auto; }
.gris { color: var(--gris); }
.titular .gris { display: inline; }

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px;
  border-radius: var(--radius-s);
  font: 600 17px/1 var(--font); letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
  border: 0; cursor: pointer;
  transition: transform 160ms var(--spring), background-color 160ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.boton:active { transform: scale(0.97); transition-duration: 80ms; }
.boton--primario { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-btn); }
.boton--primario:hover { background: var(--accent-press); }
.boton--secundario { background: var(--surface-3); color: var(--ink-strong); }
.boton--secundario:hover { background: var(--surface-3-press); }
.boton--chico { min-height: 44px; padding: 0 18px; font-size: 15px; gap: 8px; border-radius: 12px; }
.boton--chico .ico { width: 18px; height: 18px; }
.boton--ancho { width: 100%; }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.acciones--centro { justify-content: center; }
@media (max-width: 479px) {
  .hero .acciones { align-self: stretch; flex-wrap: nowrap; gap: 10px; }
  .hero .acciones .boton { flex: 1 1 auto; padding: 0 14px; font-size: 16px; gap: 8px; }
  .hero .acciones .boton--primario { flex-grow: 1.3; }
  .hero__grid { gap: 44px; }
  .hero { padding-top: 28px; }
}
@media (max-width: 379px) { .hero .acciones .ico { display: none; } }

/* Cabecera */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.cabecera::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line);
  opacity: var(--borde-cabecera, 0); transition: opacity 200ms ease;
}
.cabecera__fila { display: flex; align-items: center; gap: 24px; height: 60px; }
.marca { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink-strong); min-height: 44px; }
.logo { display: block; height: 28px; width: auto; aspect-ratio: 478.5 / 108; fill: currentColor; color: var(--ink-strong); }
.logo--pie { height: 24px; margin: 0 auto 10px; }
.cabecera__nav { display: none; gap: 28px; margin-left: auto; }
.cabecera__nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; padding: 10px 0; transition: color 150ms ease; }
.cabecera__nav a:hover { color: var(--ink-strong); }
.cabecera__cta { display: none; }
@media (min-width: 860px) {
  .cabecera__nav { display: flex; }
  .cabecera__cta { display: inline-flex; }
}
@media (prefers-reduced-transparency: reduce) {
  .cabecera { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Hero */
.hero { position: relative; padding: 40px 0 88px; overflow-x: clip; }
.hero__fondo { position: absolute; inset: 0; pointer-events: none; }
.hero__fondo::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 72% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 72% 45%, #000 20%, transparent 75%);
}
.hero__fondo::after {
  content: ""; position: absolute; left: -20%; right: -20%; top: 4%; height: 160%;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--s1), var(--s2), var(--s3), var(--s4), var(--s5));
  -webkit-mask-image: radial-gradient(closest-side, transparent 88%, #000 91%, #000 94%, transparent 97%);
  mask-image: radial-gradient(closest-side, transparent 88%, #000 91%, #000 94%, transparent 97%);
  filter: blur(28px);
  opacity: 0.22;
  display: none;
}
@media (min-width: 960px) { .hero__fondo::after { display: block; } }
.hero__grid { position: relative; display: grid; gap: 56px; align-items: center; }
.hero__texto { display: grid; gap: 22px; justify-items: start; }
.hero__texto .rotulo { margin-bottom: -4px; }
.hero__sub { font-size: clamp(19px, 2vw, 22px); line-height: 1.42; color: var(--muted); max-width: 30ch; letter-spacing: -0.01em; }
.hero__sub strong { color: var(--ink-strong); }
.hero .acciones { margin-top: 8px; }
.hero__nota { font-size: 14px; color: var(--muted); }
.hero__equipos { position: relative; display: flex; justify-content: center; }
.hero__equipos .telefono--frente { --w: min(300px, 76vw); position: relative; z-index: 1; }
.hero__equipos .telefono--atras { display: none; }
@media (min-width: 960px) {
  .hero { padding: 72px 0 120px; }
  .hero__grid { grid-template-columns: 1.08fr 0.92fr; gap: 40px; }
  .hero__equipos { min-height: 700px; align-items: center; }
  .hero__equipos .telefono--frente { --w: 320px; transform: translateX(-56px); }
  .hero__equipos .telefono--atras {
    display: block; --w: 280px; position: absolute; left: 50%; top: 50%;
    transform: translate(10px, -44%); opacity: 0.96;
  }
}

/* Teléfono hecho en CSS */
.telefono {
  --w: 280px;
  width: var(--w);
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.16);
  background: var(--bezel);
  box-shadow: var(--bezel-ring), 0 24px 40px -24px rgba(0, 0, 0, 0.45);
  flex: none;
  position: relative;
  isolation: isolate;
}
/* Sombra amplia con degradado (más limpia que un box-shadow de radio grande) */
.telefono::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 4%; right: 4%; bottom: -7%; height: 40%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--sombra-tel), transparent);
}
.pantalla {
  border-radius: calc(var(--w) * 0.13);
  overflow: hidden;
  background: var(--barra);
  container-type: inline-size;
  isolation: isolate;
}
.pantalla img { width: 100%; height: auto; display: block; }
.estado {
  position: relative;
  aspect-ratio: 390 / 46;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 7.5cqw 0 9.5cqw;
  background: var(--barra);
  color: var(--barra-ink);
}
.estado--hoja { background: var(--barra-hoja); }
.hora { font: 600 4.1cqw/1 var(--font); letter-spacing: -0.01em; }
.isla { position: absolute; left: 50%; top: 18%; width: 30%; height: 66%; transform: translateX(-50%); background: #000; border-radius: 99px; }
.senales { width: 17.5cqw; height: auto; aspect-ratio: 68 / 12; fill: currentColor; }

/* Secciones */
.seccion { padding: 88px 0; }
.seccion--compacta { padding: 40px 0 64px; }
@media (min-width: 960px) { .seccion { padding: 128px 0; } .seccion--compacta { padding: 56px 0 96px; } }
.seccion .titular { margin-bottom: 44px; }
@media (min-width: 960px) { .seccion .titular { margin-bottom: 64px; } }

.tarjeta { background: var(--surface); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow-1); }
.tarjeta h3 { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.022em; color: var(--ink-strong); }
.tarjeta p { color: var(--muted); font-size: 17px; line-height: 1.5; }

.grilla-4, .grilla-3 { display: grid; gap: 16px; }
@media (min-width: 640px) { .grilla-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grilla-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 860px) { .grilla-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* Lo que tienes que saber */
.datos { display: grid; gap: 22px; max-width: 960px; margin: 0 auto; }
.datos li { color: var(--muted); font-size: 16px; line-height: 1.45; }
.datos strong { color: var(--ink-strong); }
@media (min-width: 640px) { .datos { grid-template-columns: repeat(2, 1fr); gap: 28px 40px; } }
@media (min-width: 1040px) { .datos { grid-template-columns: repeat(4, 1fr); } }
.seccion--compacta .titular { margin-bottom: 40px; }

/* Dolores */
.dolor { display: grid; gap: 10px; align-content: start; }
.dolor__ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-strong); margin-bottom: 10px;
}
.dolor__ico .ico { width: 24px; height: 24px; }
.remate {
  margin-top: 48px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; color: var(--ink-strong);
}

/* Destacados (carrusel con capturas reales) */
.destacados { padding-bottom: 72px; }
.destacados__cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.destacados__cabeza .titular { margin-bottom: 40px; }
.flechas { display: none; gap: 10px; margin-bottom: 48px; }
@media (min-width: 860px) { .flechas { display: flex; } }
.flecha {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface-3); color: var(--ink-strong); display: grid; place-items: center;
  transition: background-color 150ms ease, opacity 150ms ease, transform 160ms var(--spring);
}
.flecha:hover { background: var(--surface-3-press); }
.flecha:active { transform: scale(0.94); }
.flecha:disabled { opacity: 0.35; cursor: default; }
.carrusel {
  --pad: max(var(--gutter), calc((100vw - var(--max)) / 2));
  display: flex; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 8px var(--pad) 48px;
  scroll-padding-inline: var(--pad);
  scrollbar-width: none;
}
.carrusel::-webkit-scrollbar { display: none; }
.carrusel:focus-visible { outline-offset: -3px; border-radius: 0; }
.destacado {
  flex: 0 0 min(84vw, 372px);
  scroll-snap-align: start;
  height: 560px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  padding: 30px 28px 0;
  display: flex; flex-direction: column; align-items: center;
}
.destacado__texto {
  align-self: stretch;
  font-family: var(--font-display);
  font-size: 21px; line-height: 1.28; font-weight: 600; letter-spacing: -0.02em;
  color: var(--muted);
  min-height: 108px;
}
.destacado__texto strong { color: var(--ink-strong); font-weight: 700; }
.destacado .telefono { --w: 262px; margin-top: 22px; }
@media (min-width: 960px) {
  .carrusel { gap: 20px; }
  .destacado { height: 620px; padding: 36px 34px 0; }
  .destacado .telefono { --w: 282px; }
}

/* Funciones */
.funciones { display: grid; gap: 28px 32px; }
.funciones li { display: grid; gap: 12px; align-content: start; }
.funciones .ico { width: 26px; height: 26px; stroke-width: 1.6; color: var(--ink-strong); }
.funciones p { color: var(--muted); font-size: 16px; line-height: 1.45; }
.funciones strong { color: var(--ink-strong); }
@media (min-width: 560px) { .funciones { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .funciones { grid-template-columns: repeat(4, 1fr); gap: 48px 40px; } }

/* Bloque oscuro */
.oscura { background: var(--oscura-bg); color: #f5f5f7; }
.oscura .titular { color: #ffffff; }
.oscura .gris { color: #86868b; }
.tarjeta--oscura { background: var(--oscura-card); box-shadow: none; display: grid; gap: 12px; align-content: start; min-height: 240px; }
.tarjeta--oscura .ico { color: #ffffff; margin-bottom: 18px; }
.tarjeta--oscura h3 { color: #ffffff; }
.tarjeta--oscura p { color: #a1a1a6; }
.oscura :focus-visible { outline-color: #fff; }

/* Pasos */
.pasos { counter-reset: none; }
.paso { display: grid; gap: 10px; align-content: start; }
.paso__num {
  font-family: var(--font-display); font-weight: 700; font-size: 64px; line-height: 1; letter-spacing: -0.05em;
  color: var(--gris); margin-bottom: 18px;
}

/* Qué incluye */
.incluye { display: grid; gap: 16px; }
@media (min-width: 860px) { .incluye { grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; } }
.incluye__app { display: grid; gap: 10px; align-content: start; }
.incluye__icono { border-radius: 14px; box-shadow: var(--logo-ring, 0 10px 22px -10px rgba(0, 0, 0, 0.5)); margin: 18px 0 14px; }
.incluye__app h3 { font-size: 26px; margin-bottom: 8px; }
.lista-check { display: grid; gap: 12px; }
.lista-check li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-size: 16px; line-height: 1.4; }
.lista-check .ico { width: 20px; height: 20px; stroke-width: 2.2; color: var(--ink-strong); margin-top: 1px; }
.bono { display: grid; gap: 10px; align-content: start; }
.bono__ico { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-strong); margin: 18px 0 12px; }
.bono { position: relative; }
.bono .pastilla { position: absolute; top: 30px; right: 28px; }
.pastilla {
  justify-self: start; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 99px; background: var(--surface-2); color: var(--ink-strong);
}

/* Precio */
.precio { max-width: 520px; margin: 0 auto; padding: 44px 32px 36px; text-align: center; display: grid; justify-items: center; gap: 6px; }
@media (min-width: 640px) { .precio { padding: 56px 56px 44px; } }
.precio .titular, .precio__monto {
  font-family: var(--font-display); font-weight: 700; color: var(--ink-strong);
  font-size: clamp(64px, 12vw, 88px); line-height: 1; letter-spacing: -0.05em; margin: 10px 0 4px; max-width: none;
}
.precio__moneda { font-size: 0.5em; letter-spacing: -0.02em; vertical-align: 0.6em; color: var(--ink-strong); }
.precio__sub { color: var(--muted); font-size: 18px; }
.precio__lista { margin: 28px 0 32px; text-align: left; justify-self: stretch; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.precio__nota { color: var(--muted); font-size: 14px; margin-top: 14px; }

/* Preguntas */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 72px; padding: 18px 0;
  font-size: 19px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink-strong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { width: 22px; height: 22px; color: var(--muted); transition: transform 300ms var(--spring); }
.faq details[open] summary .ico { transform: rotate(45deg); }
.faq summary:focus-visible { outline-offset: 2px; }
.faq details p { color: var(--muted); padding: 0 40px 26px 0; font-size: 17px; line-height: 1.55; }

/* CTA final */
.final { padding-top: 40px; }
.final__caja { display: grid; justify-items: center; text-align: center; gap: 28px; }
.final__caja .titular { margin-bottom: 4px; max-width: 16ch; }
.final__icono { border-radius: 18px; box-shadow: var(--logo-ring, 0 16px 32px -14px rgba(0, 0, 0, 0.55)); }
.final__nota { color: var(--muted); font-size: 14px; margin-top: -8px; }

/* Pie */
.pie { padding: 48px 0 0; overflow: hidden; text-align: center; }
.pie__enlaces { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 28px; }
.pie__enlaces a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--surface-3); color: var(--ink-strong); text-decoration: none; font-size: 15px; font-weight: 600;
  transition: background-color 150ms ease;
}
.pie__enlaces a:hover { background: var(--surface-3-press); }
.pie__texto { font-size: 14px; color: var(--muted); }
.pie__texto--suave { margin-top: 6px; font-size: 13px; }
.pie__marca {
  margin: 28px 0 0;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.06em; line-height: 0.8;
  font-size: clamp(96px, 23vw, 330px);
  background: linear-gradient(180deg, var(--surface-3) 10%, transparent 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none;
  padding-bottom: 0.05em;
  white-space: nowrap;
}

/* Botón flotante (móvil) */
.flotante {
  position: fixed; z-index: 60;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 18px;
  border-radius: 20px;
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -16px rgba(0, 0, 0, 0.35);
}
.flotante__texto { display: grid; line-height: 1.2; min-width: 0; }
.flotante__texto strong { font-size: 15px; font-weight: 700; color: var(--ink-strong); }
.flotante__texto span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.flotante .boton { box-shadow: none; }
@media (max-width: 859px) { body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
@media (min-width: 860px) { .flotante { display: none; } }
@media (prefers-reduced-transparency: reduce) {
  .flotante { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 359px) { .flotante__texto span { display: none; } }

/* Aparición al hacer scroll (solo con JS y sin movimiento reducido) */
@media (prefers-reduced-motion: no-preference) {
  .js .aparece { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--spring), transform 900ms var(--spring); }
  .js .aparece.visible { opacity: 1; transform: none; }
}

@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  :root { --gris: #5c5c61; --muted: #4a4a4f; }
  .tarjeta { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
}

#precio { padding-top: 0; }


/* ---------------------------------------------------------------- Pop-up de compra (checkout.js) */
html.con-dialogo { overflow: hidden; }
.checkout {
  --hoja-pad: 22px;
  margin: auto 0 0; padding: 0; border: 0;
  width: 100%; max-width: 100%; max-height: calc(100dvh - 16px);
  background: transparent; color: var(--ink);
  overflow: visible;
}
.checkout::backdrop {
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 220ms ease;
}
.checkout.abierto::backdrop { opacity: 1; }
.checkout__hoja {
  position: relative;
  max-height: calc(100dvh - 16px);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 6px var(--hoja-pad) 0;
  box-shadow: 0 -20px 60px -30px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  transition: transform 340ms var(--spring);
}
.checkout.abierto .checkout__hoja { transform: none; }
@media (min-width: 640px) {
  .checkout { margin: auto; width: min(480px, calc(100% - 32px)); }
  .checkout__hoja {
    --hoja-pad: 32px;
    border-radius: var(--radius);
    padding-top: 14px; padding-bottom: 0;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.5);
    transform: translateY(14px) scale(0.98); opacity: 0;
    transition: transform 300ms var(--spring), opacity 200ms ease;
  }
  .checkout.abierto .checkout__hoja { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .checkout__hoja, .checkout::backdrop { transition: none; }
}
.checkout__barra { display: flex; justify-content: center; align-items: center; min-height: 30px; position: relative; }
.checkout__agarre { width: 38px; height: 5px; border-radius: 99px; background: var(--surface-3); }
@media (min-width: 640px) { .checkout__agarre { visibility: hidden; } }
.checkout__cerrar {
  position: absolute; right: -6px; top: 4px;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--surface-2); color: var(--ink-strong);
  transition: background-color 150ms ease, transform 160ms var(--spring);
}
.checkout__cerrar:hover { background: var(--surface-3); }
.checkout__cerrar:active { transform: scale(0.94); }
.checkout__cerrar .ico { width: 18px; height: 18px; stroke-width: 2.2; }
.checkout__titular {
  font-family: var(--font-display); font-weight: 700; color: var(--ink-strong);
  font-size: clamp(26px, 7vw, 32px); line-height: 1.05; letter-spacing: -0.035em;
  margin: 4px 48px 16px 0; text-wrap: balance;
}
.checkout__resumen { background: var(--surface-2); border-radius: 20px; padding: 14px 16px 16px; margin-bottom: 18px; }
.checkout__producto { display: flex; align-items: center; gap: 12px; }
.checkout__producto img { border-radius: 11px; flex: none; box-shadow: var(--logo-ring, 0 6px 14px -8px rgba(0, 0, 0, 0.5)); }
.checkout__producto div { display: grid; line-height: 1.25; min-width: 0; }
.checkout__producto strong { font-size: 17px; color: var(--ink-strong); }
.checkout__producto span { font-size: 14px; color: var(--muted); }
.checkout__precio { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.03em; color: var(--ink-strong); white-space: nowrap; }
.checkout__incluye { margin-top: 12px; gap: 6px; }
.checkout__incluye li { font-size: 15px; line-height: 1.35; color: var(--ink); }
.checkout__incluye .ico { width: 18px; height: 18px; }

.campos { display: grid; gap: 12px; }
.campo { display: grid; gap: 6px; }
.campo label { font-size: 15px; font-weight: 600; color: var(--ink-strong); }
.campo input {
  width: 100%; min-height: 52px; padding: 0 16px;
  font: 400 17px/1.2 var(--font); color: var(--ink-strong);
  background: var(--surface-2); border: 1.5px solid transparent; border-radius: var(--radius-s);
  outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.campo input::placeholder { color: var(--gris); }
.campo input:focus { border-color: var(--ink-strong); background: var(--surface); }
.campo input[aria-invalid="true"] { border-color: var(--error); background: var(--surface); }
.campo__tel { display: flex; align-items: stretch; background: var(--surface-2); border-radius: var(--radius-s); }
.campo__tel:focus-within { background: var(--surface); }
.campo__prefijo { display: grid; place-items: center; padding: 0 2px 0 16px; font-size: 17px; font-weight: 600; color: var(--muted); }
.campo__tel input { padding-left: 8px; background: transparent; letter-spacing: 0.02em; }
.campo__tel:has(input:focus) { box-shadow: inset 0 0 0 1.5px var(--ink-strong); }
.campo__tel:has(input[aria-invalid="true"]) { box-shadow: inset 0 0 0 1.5px var(--error); background: var(--surface); }
.campo__tel input:focus, .campo__tel input[aria-invalid="true"] { border-color: transparent; background: transparent; }
.campo__ayuda { font-size: 13px; color: var(--muted); }
.campo__error, .checkout__error { font-size: 14px; font-weight: 500; color: var(--error); }
.checkout__error { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--error-bg); }
/* Botones fijos al pie de la hoja: siempre a la vista aunque el formulario tenga que desplazarse. */
.checkout__pie {
  position: sticky; bottom: 0; z-index: 1;
  margin: 6px calc(-1 * var(--hoja-pad)) 0;
  padding: 14px var(--hoja-pad) calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
}
.checkout__pie::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 18px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--surface));
}
@media (min-width: 640px) { .checkout__pie { padding-bottom: 22px; } }
.checkout__botones { display: grid; gap: 10px; }
.boton--doble { white-space: normal; text-align: center; line-height: 1.15; }
.boton__txt { display: inline; }
@media (max-width: 639px) {
  .boton--doble { flex-direction: row; padding: 8px 18px; min-height: 58px; }
  .boton--doble .boton__sep { display: none; }
  .boton--doble .boton__extra { display: block; font-size: 14px; font-weight: 500; opacity: 0.78; margin-top: 3px; }
  .boton--doble .boton__extra::first-letter { text-transform: uppercase; }
}
.boton:disabled { cursor: default; opacity: 0.6; transform: none; }
.boton.cargando { opacity: 1; }
.boton.cargando .ico { animation: girar 0.9s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.checkout__nota { margin-top: 10px; font-size: 12.5px; line-height: 1.4; color: var(--muted); text-align: center; text-wrap: balance; }
.checkout__nota .ico { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.checkout__nota--legal { margin-top: 4px; font-size: 12px; }
.checkout__nota--legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

:root { --error: #c4261d; --error-bg: rgba(196, 38, 29, 0.08); --bueno-bg: rgba(31, 122, 58, 0.1); }
@media (prefers-color-scheme: dark) { :root { --error: #ff6961; --error-bg: rgba(255, 105, 97, 0.12); --bueno-bg: rgba(50, 215, 75, 0.14); } }

/* ---------------------------------------------------------------- Página de pedido (/pedido) */
.pedido { min-height: calc(100dvh - 60px); padding: 28px 0 64px; }
@media (min-width: 640px) { .pedido { padding-top: 56px; } }
.pedido__caja { max-width: 560px; margin: 0 auto; }
.pedido__tarjeta { padding: 32px 26px; }
@media (min-width: 640px) { .pedido__tarjeta { padding: 44px 44px 40px; } }
.pedido__estado { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 22px; background: var(--surface-2); color: var(--ink-strong); }
.pedido__estado .ico { width: 30px; height: 30px; stroke-width: 2.2; }
.pedido__estado--ok { background: var(--bueno-bg); color: var(--good); }
.pedido__estado--error { background: var(--error-bg); color: var(--error); }
.pedido__estado--espera .ico { animation: girar 1.1s linear infinite; }
@media (prefers-reduced-motion: reduce) { .pedido__estado--espera .ico, .boton.cargando .ico { animation: none; } }
.pedido .titular { font-size: clamp(32px, 8vw, 44px); margin-bottom: 12px; max-width: 16ch; }
.pedido__sub { color: var(--muted); font-size: 17px; line-height: 1.5; }
.pedido__acciones { display: grid; gap: 10px; margin-top: 26px; }
.pedido__resumen { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.pedido__resumen b { color: var(--ink-strong); font-weight: 600; }
.pedido h2 { font-size: 19px; letter-spacing: -0.02em; color: var(--ink-strong); margin: 30px 0 12px; }
.pedido__pasos { display: grid; gap: 10px; counter-reset: paso; }
.pedido__pasos li { display: flex; gap: 12px; font-size: 16px; line-height: 1.45; color: var(--ink); }
.pedido__pasos li::before {
  counter-increment: paso; content: counter(paso);
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); font-size: 14px; font-weight: 700; color: var(--ink-strong);
}
.pedido__bonos { display: grid; gap: 8px; }
.pedido__bono {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border-radius: 16px;
  background: var(--surface-2); color: var(--ink-strong); text-decoration: none; font-weight: 600; font-size: 15px;
  transition: background-color 150ms ease;
}
.pedido__bono:hover { background: var(--surface-3); }
.pedido__bono .ico { width: 20px; height: 20px; }
.pedido__bono span { flex: 1; }
.pedido__bono small { color: var(--muted); font-weight: 500; }
.pedido__codigo { margin-top: 10px; }
.pedido__codigo summary { cursor: pointer; color: var(--muted); font-size: 15px; min-height: 44px; display: flex; align-items: center; }
.pedido__codigo textarea {
  width: 100%; min-height: 88px; margin-top: 4px; padding: 12px; resize: none;
  font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; word-break: break-all;
  color: var(--ink); background: var(--surface-2); border: 0; border-radius: 12px;
}
.pedido__simulado { margin-top: 26px; padding: 16px; border-radius: 16px; border: 1.5px dashed var(--line); display: grid; gap: 10px; }
.pedido__simulado p { font-size: 14px; color: var(--muted); }

/* Página legal (/privacidad) */
.legal { max-width: 720px; padding-top: 32px; padding-bottom: 64px; }
.legal__logo { display: inline-block; color: var(--ink, currentColor); }
.legal__logo .logo { height: 28px; width: auto; }
.legal h1 { margin: 28px 0 4px; font-size: clamp(28px, 6vw, 40px); line-height: 1.1; letter-spacing: -0.02em; }
.legal__fecha { color: var(--muted); font-size: 14px; }
.legal h2 { margin: 28px 0 8px; font-size: 19px; line-height: 1.25; }
.legal p, .legal li { font-size: 16px; line-height: 1.6; }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; list-style: disc; }
.legal li::marker { color: var(--muted); }
.legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal__volver { margin-top: 36px; }
