/*
 * Landing de venta — hoja de estilos ESTÁTICA e independiente de la SPA.
 *
 * Parte de los MISMOS tokens HSL de la SPA (`src/styles/theme.css`, §11.1): navy de
 * marca, azul de acento y fuentes del sistema (la SPA usa la misma pila), para que el
 * paso landing → app no resulte brusco. Sin Tailwind, sin dependencias, sin fuentes
 * externas.
 *
 * LANDING_REDISENO 2026-10-15 — tema claro/oscuro:
 *   - `:root` = claro. Oscuro por `prefers-color-scheme` (CSS puro, también sin JS) salvo
 *     que el visitante haya elegido claro (`[data-theme="light"]`), y por
 *     `[data-theme="dark"]` (elección explícita; la fija un script del <head> antes del
 *     primer pintado con la clave `ui-theme` de la SPA).
 *   - Los dos temas están diseñados (no invertidos) y sus pares de texto se comprueban
 *     AA en `src/__tests__/landing-contrast.spec.ts`.
 *   - Animaciones solo con transform/opacity y SOLO con `prefers-reduced-motion:
 *     no-preference`; ninguna en bucle infinito.
 */

:root {
  color-scheme: light;
  --background: 0 0% 100%;
  --surface-alt: 214 50% 97%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --primary: 222 47% 24%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 40% 95%;
  --muted-foreground: 215 20% 37%;
  --border: 214 32% 88%;
  --ring: 221 83% 53%;
  --radius: 0.5rem;
  /* Acento de marca (deriva del ring de la SPA) y un segundo tono para profundidad. */
  --brand-accent: 221 83% 53%;
  --brand-accent-2: 189 86% 36%;
  --accent-text: 221 83% 45%;
  --brand-glyph: 222 47% 24%;
  --success: 142 71% 36%;
  --success-text: 142 72% 26%;
  /* El QR del mockup es oscuro sobre claro en ambos temas (así se escanea). */
  --qr-fg: 222 47% 11%;
  --qr-bg: 0 0% 100%;
  /* Tonos de icono (variedad de color dentro de la paleta). */
  --t1: 221 83% 45%;
  --t2: 192 85% 28%;
  --t3: 262 55% 50%;
  --t4: 162 72% 26%;
  --glow-1: 221 83% 60%;
  --glow-2: 189 86% 45%;
  --cta-from: 222 47% 24%;
  --cta-to: 221 83% 45%;
  --shadow: 222 47% 24%;
}

/* Oscuro: mismo bloque en las dos entradas (sistema sin elección / elección explícita). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: 222 47% 11%;
    --surface-alt: 223 45% 14%;
    --foreground: 210 40% 98%;
    --card: 222 43% 15%;
    --primary: 217 91% 62%;
    --primary-foreground: 222 47% 11%;
    --secondary: 217 33% 19%;
    --muted-foreground: 215 22% 72%;
    --border: 217 30% 25%;
    --ring: 217 91% 65%;
    --brand-accent: 217 91% 62%;
    --brand-accent-2: 188 80% 52%;
    --accent-text: 213 94% 74%;
    --brand-glyph: 217 91% 65%;
    --success: 142 64% 50%;
    --success-text: 142 64% 60%;
    --t1: 213 94% 72%;
    --t2: 188 80% 60%;
    --t3: 258 90% 78%;
    --t4: 158 64% 56%;
    --glow-1: 217 91% 55%;
    --glow-2: 188 80% 45%;
    --cta-from: 224 64% 30%;
    --cta-to: 221 83% 45%;
    --shadow: 222 60% 3%;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: 222 47% 11%;
  --surface-alt: 223 45% 14%;
  --foreground: 210 40% 98%;
  --card: 222 43% 15%;
  --primary: 217 91% 62%;
  --primary-foreground: 222 47% 11%;
  --secondary: 217 33% 19%;
  --muted-foreground: 215 22% 72%;
  --border: 217 30% 25%;
  --ring: 217 91% 65%;
  --brand-accent: 217 91% 62%;
  --brand-accent-2: 188 80% 52%;
  --accent-text: 213 94% 74%;
  --brand-glyph: 217 91% 65%;
  --success: 142 64% 50%;
  --success-text: 142 64% 60%;
  --t1: 213 94% 72%;
  --t2: 188 80% 60%;
  --t3: 258 90% 78%;
  --t4: 158 64% 56%;
  --glow-1: 217 91% 55%;
  --glow-2: 188 80% 45%;
  --cta-from: 224 64% 30%;
  --cta-to: 221 83% 45%;
  --shadow: 222 60% 3%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}
html {
  scroll-padding-top: 5rem;
}
body {
  /* Pila de fuentes del sistema (la misma familia que la SPA): cero bytes de fuentes. Se
     evita liderar con `system-ui` porque en Linux sin fuentes UI mapea a una serif. */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, 'Noto Sans', sans-serif;
  line-height: 1.65;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  max-width: 100%;
  display: block;
}
p {
  text-wrap: pretty;
}
:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}
.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.band {
  background: hsl(var(--surface-alt));
  border-block: 1px solid hsl(var(--border) / 0.7);
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: hsl(var(--foreground));
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.65rem);
  font-weight: 800;
  letter-spacing: -0.032em;
  line-height: 1.07;
}
h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.45rem);
  font-weight: 750;
  letter-spacing: -0.028em;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: hsl(var(--accent-text));
  margin-bottom: 0.7rem;
}
.lead {
  color: hsl(var(--muted-foreground));
  font-size: clamp(1.04rem, 2vw, 1.2rem);
  max-width: 46ch;
}
.section-head {
  max-width: 40rem;
  margin-bottom: 0.5rem;
}
.section-head .lead {
  margin-top: 0.7rem;
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section-head.center .lead {
  margin-inline: auto;
}
.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 {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
}
.skip:focus {
  top: 0.75rem;
}

/* — Botones — */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.96rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: translate 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease, filter 0.15s ease;
}
.btn:active {
  translate: 0 1px;
}
.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 1px 2px hsl(var(--shadow) / 0.25), inset 0 1px 0 hsl(0 0% 100% / 0.12);
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 22px -10px hsl(var(--brand-accent) / 0.7);
}
.btn-ghost {
  background: hsl(var(--card) / 0.6);
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}
.btn-ghost:hover {
  background: hsl(var(--secondary));
}
.btn-lg {
  min-height: 3.1rem;
  padding: 0.85rem 1.6rem;
  font-size: 1.02rem;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.6);
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.icon-btn:hover {
  background: hsl(var(--secondary));
}

/* — Header fijo con desenfoque; borde y sombra al hacer scroll — */
.scroll-sentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
}
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: hsl(var(--background) / 0.78);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
header.site.scrolled {
  border-bottom-color: hsl(var(--border));
  box-shadow: 0 6px 24px -18px hsl(var(--shadow) / 0.5);
}
header.site .bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
}
.brand svg {
  width: 1.8rem;
  height: 1.8rem;
}
nav.primary {
  display: flex;
  gap: 1.5rem;
}
a.navlink {
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
a.navlink:hover {
  color: hsl(var(--foreground));
}
.tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Selector de idioma: control segmentado de enlaces reales (ES | EN, orden fijo). */
.lang {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--secondary) / 0.7);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.lang-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: hsl(var(--card));
  box-shadow: 0 1px 3px hsl(var(--shadow) / 0.25), 0 0 0 1px hsl(var(--border));
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lang[data-active="en"] .lang-pill {
  transform: translateX(100%);
}
.lang.desk .lang-pill {
  view-transition-name: lang-pill;
}
.lang a {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border-radius: 999px;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease;
}
.lang a:hover,
.lang a[aria-current="page"] {
  color: hsl(var(--foreground));
}
/* El indicador sigue al puntero o al foco: anticipa el cambio antes de navegar. */
.lang[data-active="es"]:has(a[hreflang="en"]:hover) .lang-pill {
  transform: translateX(14%);
}
.lang[data-active="en"]:has(a[hreflang="es"]:hover) .lang-pill {
  transform: translateX(86%);
}

/* Tema: el botón solo existe con JS (sin JS manda prefers-color-scheme). */
.theme-toggle {
  display: none;
}
html.js .theme-toggle {
  display: inline-grid;
}
.theme-toggle .i-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .i-sun {
  display: block;
}
:root[data-theme="dark"] .theme-toggle .i-moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle .i-moon {
    display: none;
  }
}

/* Menú móvil: <details> nativo (funciona sin JS, teclado y lector de pantalla). */
details.menu {
  display: none;
}
details.menu > summary {
  list-style: none;
}
details.menu > summary::-webkit-details-marker {
  display: none;
}
details.menu .i-close,
details.menu[open] .i-open {
  display: none;
}
details.menu[open] .i-close {
  display: block;
}
.menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 1rem;
  right: 1rem;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 2);
  background: hsl(var(--card));
  box-shadow: 0 24px 50px -24px hsl(var(--shadow) / 0.55);
}
.menu-links {
  display: grid;
}
.menu-links a.navlink {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  color: hsl(var(--foreground));
}
.menu-links a.navlink:hover {
  background: hsl(var(--secondary));
}
.menu-panel .lang {
  justify-self: start;
}
.menu-actions {
  display: grid;
  gap: 0.6rem;
}
@media (max-width: 1099px) {
  nav.primary {
    display: none;
  }
  details.menu {
    display: block;
  }
}
@media (min-width: 760px) {
  .menu-panel .lang,
  .menu-actions {
    display: none;
  }
  .menu-panel {
    left: auto;
    width: 18rem;
  }
}
@media (max-width: 759px) {
  .desk {
    display: none !important;
  }
}

/* — Hero: malla de luz suave hecha con gradientes (sin imágenes) — */
.hero-wrap {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 60% at 88% 8%, hsl(var(--glow-1) / 0.2), transparent 70%),
    radial-gradient(45% 50% at 4% 0%, hsl(var(--glow-2) / 0.16), transparent 70%),
    linear-gradient(180deg, hsl(var(--surface-alt)), hsl(var(--background)) 85%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(hsl(var(--foreground) / 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 75% 35%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 70% at 75% 35%, #000 10%, transparent 70%);
}
.hero {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 8vw, 6rem);
}
@media (min-width: 920px) {
  .hero {
    grid-template-columns: 1.08fr 0.92fr;
  }
}
.hero h1 .accent {
  color: hsl(var(--accent-text));
  background: linear-gradient(95deg, hsl(var(--accent-text)), hsl(var(--brand-accent-2)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (forced-colors: active) {
  .hero h1 .accent {
    -webkit-text-fill-color: currentColor;
    background: none;
  }
}
.hero .lead {
  margin-top: 1.1rem;
}
.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}
.hero .microtrust {
  margin-top: 1.2rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
  max-width: 34rem;
}
.hero .microtrust b {
  color: hsl(var(--foreground));
  font-weight: 600;
}

/* Ilustración de producto (SVG/CSS, no una captura real — ver informe E2) */
.hero-visual {
  position: relative;
  padding-bottom: 1.5rem;
}
.hero-mock {
  border-radius: calc(var(--radius) * 2.2);
  border: 1px solid hsl(var(--border));
  background: linear-gradient(160deg, hsl(var(--card)), hsl(var(--surface-alt)));
  box-shadow: 0 1px 0 hsl(0 0% 100% / 0.06) inset, 0 30px 60px -30px hsl(var(--shadow) / 0.45),
    0 0 0 6px hsl(var(--card) / 0.45);
  overflow: hidden;
}
.hero-mock .mock-bar {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}
.hero-mock .dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: hsl(var(--muted-foreground) / 0.35);
}
.hero-mock .mock-url {
  margin-left: 0.5rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: hsl(var(--secondary));
  font-size: 0.72rem;
  color: hsl(var(--muted-foreground));
  font-family: ui-monospace, monospace;
}
.hero-mock .mock-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  padding: clamp(1.1rem, 2.5vw, 1.7rem);
  align-items: center;
}
.hero-mock .qr-tile {
  padding: 8px;
  border-radius: calc(var(--radius) * 1.4);
  background: hsl(var(--qr-bg));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 10px 24px -14px hsl(var(--shadow) / 0.5);
}
.hero-mock .qr {
  width: clamp(88px, 22vw, 124px);
  height: clamp(88px, 22vw, 124px);
}
.hero-mock .stat {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}
.hero-mock .chip {
  justify-self: start;
  font-size: 0.72rem;
  font-weight: 700;
  color: hsl(var(--success-text));
  background: hsl(var(--success) / 0.14);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.hero-mock .bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: clamp(56px, 8vw, 84px);
}
.hero-mock .bars span {
  flex: 1;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, hsl(var(--brand-accent)), hsl(var(--brand-accent-2) / 0.8));
  transform-origin: bottom;
}
.hero-mock .metric {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}
.hero-mock .metric b {
  color: hsl(var(--foreground));
  font-size: 1.1rem;
  font-weight: 750;
}
.hero-mock .metric b.dest {
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.float-card {
  position: absolute;
  left: -0.5rem;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: calc(100% - 1rem);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  box-shadow: 0 16px 34px -18px hsl(var(--shadow) / 0.55);
  font-size: 0.8rem;
  font-weight: 600;
}
.float-card svg {
  color: hsl(var(--t1));
  flex: none;
}
@media (min-width: 920px) {
  .float-card {
    left: -1.75rem;
  }
}

/* — Franja de confianza — */
.trust {
  padding-block: 2.5rem;
  border-block: 1px solid hsl(var(--border) / 0.7);
}
.trust .row {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.trust .item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.trust .item strong {
  display: block;
  font-size: 0.97rem;
}
.trust .item span:not(.icon) {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
}

/* Teselas de icono con tono (variedad de color sin salir de la paleta). */
.icon {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: calc(var(--radius) * 1.3);
  display: grid;
  place-items: center;
  color: hsl(var(--t1));
  background: hsl(var(--t1) / 0.11);
  box-shadow: inset 0 0 0 1px hsl(var(--t1) / 0.16);
}
.icon[data-tone="2"] {
  color: hsl(var(--t2));
  background: hsl(var(--t2) / 0.11);
  box-shadow: inset 0 0 0 1px hsl(var(--t2) / 0.16);
}
.icon[data-tone="3"] {
  color: hsl(var(--t3));
  background: hsl(var(--t3) / 0.11);
  box-shadow: inset 0 0 0 1px hsl(var(--t3) / 0.16);
}
.icon[data-tone="4"] {
  color: hsl(var(--t4));
  background: hsl(var(--t4) / 0.11);
  box-shadow: inset 0 0 0 1px hsl(var(--t4) / 0.16);
}

/* — Cómo funciona — */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  margin-top: 2.75rem;
  counter-reset: none;
}
@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.step {
  position: relative;
  padding: 1.6rem;
  border-radius: calc(var(--radius) * 1.6);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}
.step .step-n {
  position: absolute;
  top: 1.2rem;
  right: 1.3rem;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: hsl(var(--foreground) / 0.08);
}
.step h3 {
  margin-top: 1rem;
  font-size: 1.12rem;
}
.step p {
  margin-top: 0.4rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
}

/* — Funciones (bento: la primera y la última ocupan dos columnas) — */
.features-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
  margin-top: 2.75rem;
}
@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .feature.wide {
    grid-column: span 2;
  }
}
.feature,
.usecase,
.plan {
  transition: translate 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.feature {
  position: relative;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.6);
  padding: 1.6rem;
}
.feature.wide {
  background:
    radial-gradient(70% 120% at 100% 0%, hsl(var(--glow-1) / 0.1), transparent 60%),
    hsl(var(--card));
}
.feature:hover,
.usecase:hover {
  translate: 0 -3px;
  border-color: hsl(var(--brand-accent) / 0.45);
  box-shadow: 0 18px 40px -26px hsl(var(--brand-accent) / 0.6);
}
.feature h3 {
  margin-top: 1rem;
  font-size: 1.12rem;
}
.feature p {
  margin-top: 0.45rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  max-width: 52ch;
}

/* — Planes — */
.plans {
  position: relative;
  display: grid;
  gap: 1.35rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  margin-top: 2.75rem;
  align-items: stretch;
}
.plans::before {
  content: '';
  position: absolute;
  inset: -12% 10%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, hsl(var(--glow-1) / 0.16), transparent 70%);
  pointer-events: none;
}
#plans {
  position: relative;
  isolation: isolate;
}
.plan {
  position: relative;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.8);
  padding: 1.9rem;
  display: flex;
  flex-direction: column;
}
.plan.featured {
  border-color: transparent;
  background:
    linear-gradient(hsl(var(--card)), hsl(var(--card))) padding-box,
    linear-gradient(150deg, hsl(var(--brand-accent)), hsl(var(--brand-accent-2))) border-box;
  border-width: 1.5px;
  box-shadow: 0 30px 60px -32px hsl(var(--brand-accent) / 0.65);
}
@media (min-width: 920px) {
  .plan.featured {
    translate: 0 -0.6rem;
  }
}
.plan:not(.featured):hover {
  border-color: hsl(var(--brand-accent) / 0.4);
}
.plan .plan-name {
  font-weight: 700;
  font-size: 1.12rem;
  display: flex;
  align-items: center;
}
.plan .price {
  font-size: 2.1rem;
  font-weight: 800;
  margin-block: 0.6rem 0.15rem;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.plan .price small {
  font-size: 0.9rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}
.plan .price-note {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  min-height: 1.2em;
}
/* LANDING_REDISENO 2026-10-15 — aviso de precio final, discreto pero legible (AA). */
.plan .price-tax {
  display: inline-block;
  margin-bottom: 0.3rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 1.35rem 0;
  display: grid;
  gap: 0.65rem;
  flex: 1;
}
.plan li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.94rem;
}
.plan li svg {
  color: hsl(var(--success-text));
  flex: none;
  margin-top: 0.15rem;
}
.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(0 0% 100%);
  background: linear-gradient(120deg, hsl(var(--cta-from)), hsl(var(--cta-to)));
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  margin-left: 0.55rem;
}
.plans-note {
  margin-top: 1.1rem;
  font-size: 0.84rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

/* — PRECIOS_ANUAL_USD 2026-10-15: selector Mensual/Anual (sin parpadeo) —
   El <head> marca html.js (hay JS) y html.period-annual (elección previa) ANTES del
   primer pintado: estas reglas deciden qué precio se ve y el estado visual del
   selector solo a partir de esas clases. Sin JS: selector oculto y precio mensual. */
.period-toggle {
  display: none;
  margin: 1.6rem auto 0;
  padding: 0.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--card));
  gap: 0.25rem;
  width: max-content;
  max-width: 100%;
  box-shadow: 0 6px 18px -14px hsl(var(--shadow) / 0.5);
}
html.js .period-toggle { display: inline-flex; }
.period-toggle label {
  position: relative;
  cursor: pointer;
}
.period-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.period-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  transition: background-color 0.2s ease, color 0.2s ease;
}
.period-toggle input:focus-visible + span {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}
html:not(.period-annual) .period-toggle [data-p="monthly"] span,
html.period-annual .period-toggle [data-p="annual"] span {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.period-toggle .save,
.plan .save {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: hsl(var(--success) / 0.14);
  color: hsl(var(--success-text));
}
html.period-annual .period-toggle [data-p="annual"] .save {
  background: hsl(var(--primary-foreground) / 0.2);
  color: inherit;
}
.plan .price-period[data-period="annual"], html.period-annual .plan .price-period[data-period="monthly"] { display: none; }
html.period-annual .plan .price-period[data-period="annual"] {
  display: block;
}
.plan .price small {
  display: block;
  margin-top: 0.15rem;
  line-height: 1.35;
  white-space: nowrap;
}
/* Las viñetas no se estiran cuando una tarjeta vecina es más alta. */
.plan ul {
  align-content: start;
}

/* — Casos de uso — */
.usecases {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2.75rem;
}
.usecase {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.6);
  padding: 1.6rem;
  background: hsl(var(--card));
}
.usecase h3 {
  margin-top: 1rem;
  font-size: 1.06rem;
}
.usecase p {
  margin-top: 0.4rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.93rem;
}

/* — FAQ (<details>/<summary>, accesible sin JS) — */
.narrow {
  max-width: 820px;
}
.faq {
  margin-top: 2.5rem;
  border-top: 1px solid hsl(var(--border));
}
.faq-item {
  border-bottom: 1px solid hsl(var(--border));
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding-block: 0.9rem;
  font-weight: 650;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary:hover {
  color: hsl(var(--accent-text));
}
.faq-item .chev {
  flex: none;
  color: hsl(var(--muted-foreground));
  transition: transform 0.25s ease;
}
.faq-item[open] .chev {
  transform: rotate(180deg);
}
.faq-a {
  padding-bottom: 1.1rem;
  color: hsl(var(--muted-foreground));
  max-width: 68ch;
}

/* — CTA final — */
.cta-wrap {
  padding-top: 0;
}
.cta-final {
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, hsl(var(--cta-from)), hsl(var(--cta-to)));
  color: hsl(0 0% 100%);
  border-radius: calc(var(--radius) * 2.6);
  padding: clamp(2.6rem, 6vw, 4.2rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  overflow: hidden;
}
/* Luz y retícula decorativas (CSS, sin imágenes). */
.cta-final::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 70% at 85% 0%, hsl(189 86% 60% / 0.35), transparent 70%),
    radial-gradient(35% 60% at 0% 100%, hsl(262 80% 70% / 0.25), transparent 70%);
}
.cta-final::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(hsl(0 0% 100% / 0.07) 1px, transparent 1px),
    linear-gradient(90deg, hsl(0 0% 100% / 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 75%);
}
.cta-final h2 {
  color: hsl(0 0% 100%);
}
.cta-final .lead {
  color: hsl(0 0% 100% / 0.92);
  margin-inline: auto;
  margin-top: 0.7rem;
}
.cta-final .btn {
  background: hsl(0 0% 100%);
  color: hsl(222 47% 20%);
  margin-top: 1.8rem;
  border: none;
  box-shadow: 0 12px 30px -14px hsl(222 60% 5% / 0.6);
}
.cta-final .btn:hover {
  translate: 0 -2px;
}
.cta-final .btn:focus-visible {
  outline-color: hsl(0 0% 100%);
}

/* — Footer — */
footer.site {
  border-top: 1px solid hsl(var(--border));
  padding-block: 2.75rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  background: hsl(var(--surface-alt));
}
footer.site .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
footer.site .foot-brand {
  max-width: 22rem;
}
footer.site .foot-brand .brand {
  font-size: 1rem;
  color: hsl(var(--foreground));
}
footer.site .foot-brand p {
  margin-top: 0.6rem;
}
footer.site a:hover {
  color: hsl(var(--foreground));
}
footer.site .foot-links {
  display: flex;
  gap: 0.25rem 1.3rem;
  flex-wrap: wrap;
}
footer.site .foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
footer.site .foot-bottom {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid hsl(var(--border));
  font-size: 0.82rem;
}

/* — Páginas legales: lectura cómoda (≈68 caracteres) con índice — */
.legal-wrap {
  background:
    radial-gradient(50% 260px at 80% 0%, hsl(var(--glow-1) / 0.1), transparent 70%);
}
.legal-grid {
  display: grid;
  gap: 2rem;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
@media (min-width: 960px) {
  .legal-grid {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 4rem;
  }
  .legal-aside {
    order: 0;
  }
  .toc {
    position: sticky;
    top: 5.75rem;
  }
}
.toc {
  padding: 1.1rem 1.2rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.6);
  background: hsl(var(--card));
  font-size: 0.88rem;
}
.toc-title {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--accent-text));
  margin-bottom: 0.4rem;
}
.toc ul {
  list-style: none;
  padding: 0;
  display: grid;
}
.toc a {
  display: block;
  padding-block: 0.4rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.35;
}
.toc a:hover {
  color: hsl(var(--foreground));
}
.legal {
  max-width: 68ch;
  font-size: 1.04rem;
  line-height: 1.75;
}
.legal h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  margin-bottom: 0.4rem;
}
.legal .updated {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
  margin-bottom: 1.6rem;
}
.legal .intro {
  font-size: 1.12rem;
  color: hsl(var(--foreground));
}
.legal section {
  padding: 0;
}
.legal h2 {
  font-size: 1.3rem;
  margin-top: 2.4rem;
  margin-bottom: 0.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid hsl(var(--border));
}
.legal p,
.legal li {
  color: hsl(var(--foreground));
  margin-bottom: 0.8rem;
}
.legal ul {
  padding-left: 1.25rem;
}
/* Enlaces dentro de los legales (p. ej. el correo de contacto): el reset global
   deja los <a> sin color ni subrayado, así que aquí los hacemos reconocibles. */
.legal p a:not(.btn),
.legal li a {
  color: hsl(var(--accent-text));
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal .back {
  margin-top: 2.5rem;
}

/* QA FREE 2026-10-05 · B6 — CTA según la pista de sesión de la SPA (ver render.mjs). */
html:not(.has-session) [data-auth="user"],
html.has-session [data-auth="guest"] {
  display: none !important;
}

/* — Movimiento: SOLO si el visitante no pide reducirlo. transform/opacity únicamente;
     nada en bucle infinito. — */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  /* Transición entre páginas de la landing (Chrome/Edge): fundido + la píldora del
     idioma se desplaza de ES a EN. Los navegadores sin soporte navegan sin efecto. */
  @view-transition {
    navigation: auto;
  }
  ::view-transition-group(lang-pill) {
    animation-duration: 0.3s;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }
  @keyframes grow {
    from {
      transform: scaleY(0.15);
    }
  }
  @keyframes fade {
    from {
      opacity: 0;
    }
  }
  @keyframes spin-in {
    from {
      opacity: 0;
      transform: rotate(-60deg) scale(0.7);
    }
  }
  .hero-copy > * {
    animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero-copy > :nth-child(2) {
    animation-delay: 0.05s;
  }
  .hero-copy > :nth-child(3) {
    animation-delay: 0.1s;
  }
  .hero-copy > :nth-child(n + 4) {
    animation-delay: 0.16s;
  }
  .hero-mock {
    animation: rise 0.7s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero-mock .bars span {
    animation: grow 0.7s calc(0.35s + var(--i) * 0.06s) cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .float-card {
    animation: rise 0.6s 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .theme-toggle svg {
    animation: spin-in 0.35s ease;
  }
  details.menu[open] .menu-panel,
  .faq-item[open] .faq-a {
    animation: fade 0.2s ease;
  }
  .period-anim .plan .price-period {
    animation: rise 0.35s ease;
  }
  /* Revelado al hacer scroll: solo con html.rv (lo pone el script cuando hay
     IntersectionObserver). Sin JS, todo es visible desde el principio. */
  .rv .reveal {
    transition: opacity 0.6s ease calc(var(--i, 0) * 0.07s),
      transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i, 0) * 0.07s),
      translate 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
  }
  .rv .reveal:not(.in) {
    opacity: 0;
    transform: translateY(18px);
  }
}
