/* ==========================================================================
   planpresencia.es — Estilos de la landing
   Depende de design-system.css (tokens y componentes).
   Enfoque mobile-first: los estilos base cubren desde 320px de ancho y se
   amplían progresivamente con media queries min-width.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS DE DISEÑO
   -------------------------------------------------------------------------- */
:root {
  /* ---- Color de marca (Kit Digital) ---- */
  --brand-red:        #E02826;
  --brand-red-dark:   #B91C1A;
  --brand-orange:     #F08C1B;
  --brand-amber:      #FBBB21;

  /* Degradados de marca */
  --grad-brand:       linear-gradient(120deg, #E02826 0%, #F08C1B 55%, #FBBB21 100%);
  --grad-brand-soft:  linear-gradient(120deg, rgba(224,40,38,.10), rgba(240,140,27,.10), rgba(251,187,33,.12));
  --grad-cta:         linear-gradient(120deg, #E02826, #F08C1B);

  /* ---- Neutros (gris cálido, base #575756 del logo) ---- */
  --ink-950: #171514;
  --ink-900: #221F1E;
  --ink-800: #33302E;
  --ink-700: #575756;
  --ink-500: #7C7A77;
  --ink-400: #A3A09C;
  --ink-300: #C9C6C1;
  --ink-200: #E4E1DC;
  --ink-100: #F0EDE8;
  --ink-50:  #FAF8F5;
  --white:   #FFFFFF;

  /* ---- Semánticos ---- */
  --color-bg:          var(--white);
  --color-bg-soft:     var(--ink-50);
  --color-surface:     var(--white);
  --color-text:        var(--ink-900);
  --color-text-soft:   var(--ink-700);
  --color-text-muted:  var(--ink-500);
  --color-border:      var(--ink-200);
  --color-success:      #1E9E58;
  --color-success-dark: #157A43;
  --color-danger:      var(--brand-red);

  /* ---- Tipografía ---- */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  clamp(1.35rem, 1.1rem + 1.2vw, 1.75rem);
  --text-3xl:  clamp(1.7rem, 1.3rem + 2vw, 2.4rem);
  --text-4xl:  clamp(2.1rem, 1.5rem + 3vw, 3.4rem);

  /* ---- Espaciado ---- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  4.5rem;
  --space-9:  6.5rem;

  /* ---- Radios ---- */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-xl:   32px;
  --radius-full: 999px;

  /* ---- Sombras ---- */
  --shadow-sm: 0 1px 2px rgba(23, 21, 20, .06);
  --shadow-md: 0 6px 20px -6px rgba(23, 21, 20, .12);
  --shadow-lg: 0 20px 45px -18px rgba(23, 21, 20, .22);
  --shadow-brand: 0 12px 30px -10px rgba(224, 40, 38, .35);

  /* ---- Movimiento ---- */
  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast:   180ms;
  --dur-med:    350ms;
  --dur-slow:   650ms;

  /* ---- Layout ---- */
  --container: 1180px;
}

/* --------------------------------------------------------------------------
   2. RESET Y BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand-orange);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--brand-orange);
  color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   3. UTILIDADES
   -------------------------------------------------------------------------- */
/* Mobile-first: márgenes compactos desde 320px, más aire en pantallas grandes */
.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

@media (min-width: 640px) {
  .container { width: min(100% - 2.5rem, var(--container)); }
}

.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* Iconos Lucide */
.icon      { width: 20px; height: 20px; flex-shrink: 0; }
.icon-sm   { width: 16px; height: 16px; flex-shrink: 0; }
.icon-lg   { width: 28px; height: 28px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   4. COMPONENTES
   -------------------------------------------------------------------------- */

/* ---- Botones ---- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem clamp(0.95rem, 0.3rem + 3.25vw, 1.6rem);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  /* Escala fluida con el viewport, sin salto de línea */
  font-size: clamp(0.72rem, 0.52rem + 1vw, 1rem);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--grad-cta);
  color: var(--white);
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -12px rgba(224, 40, 38, .45);
}

/* Destello que recorre el botón primario */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform var(--dur-slow) var(--ease-out);
}

.btn-primary:hover::after { transform: translateX(120%); }

.btn-secondary {
  background: var(--white);
  color: var(--ink-900);
  border: 1.5px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--ink-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-soft);
  padding-inline: 1rem;
}

.btn-ghost:hover { color: var(--color-text); }

/* Botón perfilado para fondos oscuros */
.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, .28);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .5);
  transform: translateY(-2px);
}

.btn-lg { padding: 1.05rem clamp(1.1rem, 0.3rem + 4vw, 2.1rem); font-size: clamp(0.8rem, 0.56rem + 1.2vw, 1.125rem); }
.btn-sm { padding: 0.55rem clamp(0.8rem, 0.4rem + 2vw, 1.1rem); font-size: clamp(0.7rem, 0.58rem + 0.6vw, 0.875rem); }

/* ---- Chips / Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  /* Escala fluida con el viewport, sin salto de línea */
  font-size: clamp(0.64rem, 0.44rem + 1vw, 0.875rem);
  white-space: nowrap;
  font-weight: 600;
}

.badge-brand {
  background: var(--grad-brand-soft);
  color: var(--brand-red);
  border: 1px solid rgba(224, 40, 38, .18);
}

.badge-dark {
  background: var(--ink-900);
  color: var(--white);
}

/* ---- Tarjetas ---- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out),
              border-color var(--dur-med) var(--ease-out);
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ink-300);
}

/* Tarjeta con borde degradado de marca */
.card-gradient {
  position: relative;
  background: var(--white);
  border: none;
  border-radius: var(--radius-lg);
}

.card-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--grad-brand);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---- Icono en caja ---- */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--grad-brand-soft);
  color: var(--brand-red);
  flex-shrink: 0;
}

.icon-box .icon { width: 24px; height: 24px; }

.icon-box-dark {
  background: var(--ink-900);
  color: var(--brand-amber);
}

/* ---- Cabeceras de sección (mobile-first) ---- */
.section { padding-block: var(--space-8); }

.section-soft { background: var(--color-bg-soft); }

.section-head {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .section { padding-block: var(--space-9); }
  .section-head { margin-bottom: var(--space-8); }
  .card { padding: var(--space-6); }
}

.section-head .badge { margin-bottom: var(--space-4); }

.section-head h2 { font-size: var(--text-3xl); margin-bottom: var(--space-4); }

.section-head p { color: var(--color-text-soft); font-size: var(--text-lg); }

/* ---- Formularios ---- */
/* Área de toque holgada: mínimo 56px de alto en cualquier tamaño */
.checkbox-tile {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  min-height: 56px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--white);
  transition: border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}

.checkbox-tile:hover {
  border-color: var(--brand-orange);
  transform: translateX(2px);
}

.checkbox-tile input { position: absolute; opacity: 0; pointer-events: none; }

/* Casilla con relleno propio para que destaque sobre el fondo plano */
.checkbox-tile .check {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--ink-300);
  background: var(--ink-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
  transition: all var(--dur-fast) var(--ease-spring);
}

.checkbox-tile:hover .check { border-color: var(--brand-orange); }

.checkbox-tile .check .icon-sm { width: 15px; height: 15px; opacity: 0; transform: scale(.4); transition: all var(--dur-fast) var(--ease-spring); }

.checkbox-tile:has(input:checked) {
  border-color: var(--brand-orange);
  background: linear-gradient(120deg, rgba(224,40,38,.07), rgba(251,187,33,.10));
  box-shadow: 0 4px 14px -8px rgba(224, 40, 38, .5);
}

.checkbox-tile:has(input:focus-visible) {
  outline: 3px solid var(--brand-orange);
  outline-offset: 2px;
}

.checkbox-tile:has(input:checked) .check {
  background: var(--grad-cta);
  border-width: 0;
}

.checkbox-tile:has(input:checked) .check .icon-sm { opacity: 1; transform: scale(1); }

/* ---- Acordeón ---- */
.accordion-item {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.accordion-item.open {
  border-color: var(--brand-orange);
  box-shadow: var(--shadow-md);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
}

@media (min-width: 768px) {
  .accordion-trigger { gap: var(--space-4); padding: var(--space-5); font-size: var(--text-lg); }
}

.accordion-trigger .icon {
  color: var(--brand-orange);
  transition: transform var(--dur-med) var(--ease-spring);
}

.accordion-item.open .accordion-trigger .icon { transform: rotate(45deg); }

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-med) var(--ease-out);
}

.accordion-item.open .accordion-panel { grid-template-rows: 1fr; }

.accordion-panel > div { overflow: hidden; }

.accordion-panel p {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--color-text-soft);
}

@media (min-width: 768px) {
  .accordion-panel p { padding: 0 var(--space-5) var(--space-5); }
}

/* ---- Tablas ---- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--white);
}

.table th, .table td {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.table thead th {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  background: var(--color-bg-soft);
}

.table tbody tr:last-child td { border-bottom: none; }

/* --------------------------------------------------------------------------
   5. ANIMACIONES BASE
   -------------------------------------------------------------------------- */
/* translate3d: composición en GPU para movimiento con subpíxeles */
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -14px, 0); }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .75; transform: scale(.96); }
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes gradient-pan {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes ping {
  0%   { transform: scale(1); opacity: .8; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes bar-grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* Revelado al hacer scroll (activado por JS con .in-view) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}


/* --------------------------------------------------------------------------
   1. Cabecera de navegación (sticky)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med), box-shadow var(--dur-med);
}

.site-header.scrolled {
  border-color: var(--color-border);
  box-shadow: 0 8px 24px -18px rgba(23, 21, 20, .25);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: 0.85rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-display);
  font-weight: 800;
  /* Escala fluida con el viewport, sin salto de línea */
  font-size: clamp(0.9rem, 0.72rem + 0.9vw, 1.125rem);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Monograma "p" formado por ondas de señal, con el degradado de marca */
.logo-mark {
  height: 34px;
  width: auto;
  flex-shrink: 0;
}

.logo span em { font-style: normal; color: var(--brand-orange); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}

/* Los enlaces de texto solo aparecen a partir de tablet */
.nav-links li.nav-link-item { display: none; }

.nav-links a:not(.btn) {
  text-decoration: none;
  font-weight: 500;
  color: var(--color-text-soft);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  transition: color var(--dur-fast), background-color var(--dur-fast);
}

.nav-links a:not(.btn):hover {
  color: var(--color-text);
  background: var(--ink-100);
}

/* Teléfono de contacto en la cabecera */
.nav-links a.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--brand-red);
  white-space: nowrap;
}

.nav-links a.nav-phone:hover {
  color: var(--brand-red-dark);
  background: var(--grad-brand-soft);
}

@media (min-width: 640px) {
  .nav { gap: var(--space-4); }
  .nav-links li.nav-link-item { display: block; }
}

/* --------------------------------------------------------------------------
   2. Hero con calculadora
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: var(--space-7) var(--space-8);
  overflow: clip;
}

/* Fondo: manchas degradadas animadas, estilo cálido de marca */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}

.hero-bg::before {
  width: 640px;
  height: 640px;
  top: -280px;
  right: -160px;
  background: radial-gradient(circle, rgba(251, 187, 33, .55), rgba(240, 140, 27, .25) 55%, transparent 75%);
  animation: float 9s ease-in-out infinite;
}

.hero-bg::after {
  width: 480px;
  height: 480px;
  bottom: -240px;
  left: -180px;
  background: radial-gradient(circle, rgba(224, 40, 38, .28), transparent 70%);
  animation: float 11s ease-in-out infinite reverse;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}

/* En móvil la prueba social se coloca por delante de los CTA */
.hero-copy {
  display: flex;
  flex-direction: column;
}

.hero-copy .badge { order: 1; }
.hero-copy h1 { order: 2; }
.hero-copy .hero-sub { order: 3; }
.hero-copy .hero-price { order: 4; margin-bottom: var(--space-5); }
.hero-copy .social-proof { order: 5; margin-bottom: var(--space-6); }
.hero-copy .hero-ctas { order: 6; margin-bottom: 0; }

.hero-copy .badge {
  align-self: flex-start;
  margin-bottom: var(--space-5);
  /* Texto largo: en pantallas muy estrechas puede partir en dos líneas */
  white-space: normal;
  text-align: left;
}

.hero h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-5);
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--color-text-soft);
  max-width: 34rem;
  margin-bottom: var(--space-6);
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.social-proof {
  display: flex;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  flex-wrap: wrap;
}

.proof-avatars { display: flex; }

.proof-avatars img,
.proof-avatars .proof-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
  margin-left: -12px;
  object-fit: cover;
}

.proof-avatars > :first-child { margin-left: 0; }

.proof-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-900);
  color: var(--brand-amber);
}

.proof-icon .icon-sm { width: 16px; height: 16px; }

.social-proof p {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  max-width: 20rem;
}

.social-proof strong { color: var(--color-text); font-family: var(--font-display); }

@media (min-width: 640px) {
  .hero { padding-block: var(--space-8) var(--space-9); }
  .hero-ctas { flex-direction: row; flex-wrap: wrap; align-items: center; margin-bottom: var(--space-7); }
  .proof-avatars img,
  .proof-avatars .proof-icon { width: 44px; height: 44px; }
  .proof-icon .icon-sm { width: 18px; height: 18px; }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--space-7);
  }
  /* En escritorio vuelve el orden del marcado */
  .hero-copy .badge,
  .hero-copy h1,
  .hero-copy .hero-sub,
  .hero-copy .social-proof,
  .hero-copy .hero-ctas,
  .hero-copy .hero-price { order: 0; }
  .hero-copy .social-proof { margin-bottom: 0; }
  .hero-copy .hero-price { margin-bottom: var(--space-6); }
  .hero-copy .hero-ctas { margin-bottom: var(--space-7); }
}

/* Hueco de la calculadora en móvil: solo se muestra cuando el JS la mueve aquí */
.calc-slot { display: none; }

.calc-slot:has(.calculator) {
  display: block;
  padding-block: var(--space-7);
}

.calc-slot .calc-flip {
  width: min(100% - 2rem, 560px);
  margin-inline: auto;
}

/* Con la calculadora en su propia sección cabe más lista sin scroll interno */
.calc-slot .calc-modules { max-height: 420px; }

/* ---- Calculadora ---- */
.calculator {
  position: relative;
  padding: var(--space-4);
  box-shadow: var(--shadow-lg);
}

/* Énfasis al llegar desde un CTA: dos pulsos de anillo naranja que se
   expanden y se desvanecen hacia fuera */
@keyframes calc-emphasis {
  0% {
    box-shadow: 0 0 0 0 rgba(240, 140, 27, .5), 0 0 0 0 rgba(240, 140, 27, 0), var(--shadow-lg);
  }
  39.9% {
    box-shadow: 0 0 0 26px rgba(240, 140, 27, 0), 0 0 0 0 rgba(240, 140, 27, 0), var(--shadow-lg);
  }
  40% {
    box-shadow: 0 0 0 26px rgba(240, 140, 27, 0), 0 0 0 0 rgba(240, 140, 27, .4), var(--shadow-lg);
  }
  100% {
    box-shadow: 0 0 0 26px rgba(240, 140, 27, 0), 0 0 0 30px rgba(240, 140, 27, 0), var(--shadow-lg);
  }
}

/* Escala sutil que acompaña a los pulsos */
@keyframes calc-emphasis-scale {
  0%   { transform: scale(1); }
  14%  { transform: scale(1.004); }
  40%  { transform: scale(1); }
  52%  { transform: scale(1.003); }
  100% { transform: scale(1); }
}

.calculator.emphasize {
  animation:
    calc-emphasis 1.4s cubic-bezier(.22, .35, .35, 1),
    calc-emphasis-scale 1.4s cubic-bezier(.22, .35, .35, 1);
}

.calc-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.calc-head h2 { font-size: var(--text-xl); }

.calc-head p { font-size: var(--text-xs); color: var(--color-text-muted); }

/* Tarifa base: informativa y discreta */
.calc-base {
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  color: var(--color-text-soft);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.calc-base-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-1);
}

.calc-base-top h3 {
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
}

.calc-base-top .icon-sm { color: var(--brand-orange); }

.calc-base-price {
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-text);
}

.calc-base-price small { font-weight: 500; color: var(--color-text-muted); }

.calc-base-price small s { color: var(--ink-400); margin-right: 2px; }

.calc-base > p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Lista de módulos */
.calc-modules-wrap {
  position: relative;
  margin-bottom: var(--space-4);
}

/* Degradado inferior: indica que la lista tiene más contenido por scroll.
   Se desvanece (vía JS) al llegar al final. */
.calc-modules-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 10px;
  bottom: 0;
  height: 80px;
  /* Curva de desvanecimiento progresiva */
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, .85) 0%,
    rgba(255, 255, 255, .6) 35%,
    rgba(255, 255, 255, .3) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--dur-med) var(--ease-out);
}

.calc-modules-wrap.scrolled-end::after { opacity: 0; }

/* Degradado superior: aparece cuando hay contenido por encima */
.calc-modules-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  right: 10px;
  top: 0;
  height: 80px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, .85) 0%,
    rgba(255, 255, 255, .6) 35%,
    rgba(255, 255, 255, .3) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease-out);
  z-index: 1;
}

.calc-modules-wrap.scrolled-top::before { opacity: 1; }

.calc-modules {
  display: grid;
  gap: var(--space-3);
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-300) transparent;
}

.calc-modules::-webkit-scrollbar { width: 6px; }
.calc-modules::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 3px; }

.module-info { flex: 1; min-width: 0; }

/* Columna fija para el precio: siempre arriba a la derecha, con el título
   ajustándose en su propia columna en lugar de empujarlo a la línea de abajo */
.module-name {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px var(--space-2);
  font-weight: 600;
  font-size: var(--text-sm);
}

.module-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--brand-orange);
  text-align: right;
  white-space: nowrap;
}

/* Coletilla "+ inversión": baja de línea sin ensanchar la columna */
.module-price em {
  display: block;
  font-style: normal;
  font-size: var(--text-xs);
  font-weight: 600;
}

/* Tarifa suelta del módulo: tachada y en menor tamaño sobre el precio con plan */
.module-price s {
  display: block;
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--ink-400);
  line-height: 1.2;
}

.module-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.45;
  margin-top: 2px;
}

/* Desglose de inversión, destacado en cabecera de la calculadora */
.calc-summary {
  border-bottom: 1.5px dashed var(--color-border);
  padding-bottom: var(--space-4);
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.calc-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

.calc-line strong { font-family: var(--font-display); color: var(--color-text); }

/* Precio habitual tachado y cuota de alta gratuita */
.calc-line s {
  color: var(--ink-400);
  text-decoration-thickness: 2px;
}

.calc-gratis { color: var(--color-success) !important; }

.calc-total {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  background: var(--grad-brand-soft);
  border: 1px solid rgba(240, 140, 27, .3);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

/* Brillo que recorre el total en horizontal */
.calc-total::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .65) 50%, transparent 65%);
  animation: shimmer 3.5s var(--ease-out) infinite;
  pointer-events: none;
}

.calc-total-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
}


.calc-total-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  text-align: right;
}

.calc-total-value.bump { animation: pulse-soft .35s var(--ease-spring); }

/* La coletilla "/mes + IVA" va en su propia línea, bajo el número */
.calc-total-value small {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0;
  margin-top: 2px;
}

.calculator .btn { width: 100%; }

.calc-note {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
}

@media (min-width: 640px) {
  .calculator { padding: var(--space-5); }
  .calc-total-value { font-size: 2.9rem; }
}

@media (min-width: 960px) {
  .calc-flip {
    position: sticky;
    top: 96px;
  }
}

/* ---- Volteo calculadora ↔ formulario de contacto ---- */
[hidden] { display: none !important; }

.calc-flip { perspective: 1600px; }

.calc-flip-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease-out); /* la altura la anima el JS */
}

.calc-flip.flipped .calc-flip-inner { transform: rotateY(180deg); }

.calc-face {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* La cara frontal necesita su propia transformación 3D para que el
   navegador oculte su reverso de forma fiable durante el giro */
.calc-face:not(.calc-face-back) { transform: rotateY(0deg); }

.calc-face-back {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
}

/* Tras el giro (clase puesta por JS al terminar la animación) la cara de
   contacto pasa al flujo y dicta la altura de la tarjeta; la calculadora
   sale del flujo. El JS anima la altura entre ambos estados. */
.calc-flip.showing-back .calc-face:not(.calc-face-back) {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  visibility: hidden; /* la calculadora sobresale por debajo del formulario: se oculta */
}

.calc-flip.showing-back .calc-face-back { position: relative; }

/* Giro y contracción simultáneos: lo que sobresale de la tarjeta se recorta */
.calc-flip.folding { overflow: hidden; }

.calc-flip.folding .calc-face:not(.calc-face-back) {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

/* Con el usuario mirando el pie, las dos caras van ancladas al borde
   inferior: la tarjeta se contrae hacia abajo y lo que sobra queda arriba */
.calc-flip.anchor-bottom.folding .calc-face {
  top: auto;
  bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .calc-flip-inner { transition: none; }
}

/* ---- Formulario de contacto (cara trasera) ---- */
.calc-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  align-self: flex-start;
  margin-bottom: var(--space-3);
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--dur-fast) var(--ease-out);
}

.calc-back-link:hover { color: var(--brand-red); }

.contact-resumen {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--grad-brand-soft);
  font-size: var(--text-sm);
  font-weight: 500;
}

.contact-fields {
  display: grid;
  gap: var(--space-3);
}

.field { display: grid; gap: 6px; }

.field label {
  font-size: var(--text-sm);
  font-weight: 600;
}

.field label small {
  font-weight: 400;
  color: var(--color-text-muted);
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.field input:focus-visible {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(240, 140, 27, .18);
}

.field input.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(224, 40, 38, .12);
}

/* La nota RGPD ocupa dos líneas: icono anclado a la primera línea y texto
   alineado a la izquierda (la .calc-note base centra una sola línea) */
.contact-fields .calc-note {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  gap: var(--space-2);
}

.contact-fields .calc-note .icon-sm {
  flex-shrink: 0;
  margin-top: 3px;
}

/* Confirmación de envío inline, centrada en la tarjeta */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.form-success {
  margin: var(--space-5) auto;
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  text-align: center;
  animation: fade-up 0.6s var(--ease-out);
}

.form-success .icon {
  width: 3rem;
  height: 3rem;
  color: var(--color-success);
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
}

.form-success p {
  max-width: 34ch;
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

/* --------------------------------------------------------------------------
   2b. Precio destacado del hero y garantía de activación exprés
   -------------------------------------------------------------------------- */
.hero-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin-bottom: var(--space-6);
}

.hero-price strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-price span {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

/* Banda de activación exprés: fondo cálido propio */
.express {
  padding-block: var(--space-7);
  background: linear-gradient(160deg, #FFF9F0, #FFF3E8);
  border-block: 1px solid rgba(240, 140, 27, .15);
}

.express .section-head { margin-bottom: var(--space-6); }

.express-steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 420px;
  margin-inline: auto;
}

/* Cada paso es una tarjeta con número, icono y momento de entrega */
.express-step {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-5) var(--space-5);
  background: var(--white);
  border: 1px solid rgba(240, 140, 27, .22);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px -20px rgba(224, 40, 38, .45);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}

.express-step:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px -22px rgba(224, 40, 38, .55);
}

/* Número del paso, montado sobre el borde superior */
.express-num {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-cta);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-brand);
}

.express-step .icon-box {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-1);
}

.express-step .icon-box .icon { width: 26px; height: 26px; }

.express-when {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--ink-900);
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .02em;
}

/* El último paso remata con el degradado de marca */
.express-step-last .express-when { background: var(--grad-cta); }

.express-step strong {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
}

.express-step p { font-size: var(--text-sm); color: var(--color-text-soft); }

.express-arrow {
  display: none;
  align-items: center;
  color: var(--brand-orange);
}

@media (min-width: 900px) {
  .express-steps {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    max-width: none;
    gap: var(--space-4);
  }
  .express-step { flex: 1; max-width: 340px; }
  .express-arrow { display: flex; }
}

/* --------------------------------------------------------------------------
   3. Sección de dolor (Vs)
   -------------------------------------------------------------------------- */
.vs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  position: relative;
}

.vs-card { padding: var(--space-5); }

.vs-card-bad { background: var(--white); }

.vs-card-good {
  background: linear-gradient(160deg, #FFF9F0, #FFF4EC);
}

.vs-card h3 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  margin-bottom: var(--space-5);
}

.vs-card-bad h3 .icon-box { background: var(--ink-100); color: var(--ink-500); }

.vs-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.vs-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.vs-list .icon {
  margin-top: 3px;
}

.vs-card-bad .vs-list .icon { color: var(--ink-400); }

.vs-card-good .vs-list .icon { color: var(--color-success); }

.vs-list strong { font-family: var(--font-display); font-weight: 600; }

.vs-list p { color: var(--color-text-soft); font-size: var(--text-sm); margin-top: 2px; }

/* Medallón "VS" central (solo en dos columnas) */
.vs-medal {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-brand);
  z-index: 2;
}

.vs-medal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand-orange);
  animation: ping 2.4s var(--ease-out) infinite;
  z-index: -1;
}

@media (min-width: 820px) {
  .vs-grid { grid-template-columns: 1fr 1fr; }
  .vs-card { padding: var(--space-6); }
  .vs-medal { display: flex; }
}

/* --------------------------------------------------------------------------
   4. Demostración visual (mockups)
   -------------------------------------------------------------------------- */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}

/* Grid de una sola celda: escritorio y teléfono se superponen en flujo y
   el contenedor reserva la altura del más alto */
.demo-visual {
  position: relative;
  display: grid;
  padding-block: var(--space-4) var(--space-6);
}

.demo-visual > * { grid-area: 1 / 1; }

/* Panel de escritorio de fondo */
.mock-desktop {
  justify-self: start;
  align-self: center;
  width: min(88%, 460px);
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(-2deg);
}

.mock-desktop-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--color-border);
}

.mock-desktop-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink-200);
}

.mock-desktop-bar i:first-child { background: var(--brand-red); }
.mock-desktop-bar i:nth-child(2) { background: var(--brand-amber); }

.mock-desktop-body { padding: var(--space-4); display: grid; gap: var(--space-3); }

.mock-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }

.mock-stat {
  background: var(--ink-50);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
}

.mock-stat b {
  font-family: var(--font-display);
  font-size: var(--text-base);
  display: block;
}

.mock-stat span { font-size: 0.58rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; }

.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 90px;
  padding: var(--space-3);
  background: var(--ink-50);
  border-radius: var(--radius-sm);
}

.mock-chart i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--grad-brand);
  transform-origin: bottom;
  animation: bar-grow 1s var(--ease-out) both;
}

.mock-chart i:nth-child(1) { height: 40%; animation-delay: .10s; }
.mock-chart i:nth-child(2) { height: 62%; animation-delay: .18s; }
.mock-chart i:nth-child(3) { height: 48%; animation-delay: .26s; }
.mock-chart i:nth-child(4) { height: 78%; animation-delay: .34s; }
.mock-chart i:nth-child(5) { height: 58%; animation-delay: .42s; }
.mock-chart i:nth-child(6) { height: 92%; animation-delay: .50s; }
.mock-chart i:nth-child(7) { height: 70%; animation-delay: .58s; }

/* Smartphone flotante en primer plano */
.mock-phone {
  justify-self: end;
  align-self: center;
  width: clamp(150px, 52%, 210px);
  /* Proporción fija de smartphone: la altura siempre acompaña al ancho */
  aspect-ratio: 9 / 18;
  display: flex;
  flex-direction: column;
  background: var(--ink-950);
  border-radius: 34px;
  padding: 8px;
  box-shadow: var(--shadow-lg), 0 30px 60px -20px rgba(224, 40, 38, .25);
  animation: float-phone 6s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
  z-index: 2;
}

/* Flotación con balanceo sutil; la rotación mínima evita el pixel snapping
   de Firefox en capas compuestas */
@keyframes float-phone {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.2deg); }
  50%      { transform: translate3d(0, -14px, 0) rotate(0.2deg); }
}

.mock-phone-screen {
  position: relative;
  background: var(--white);
  border-radius: 26px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* El notch flota sobre la foto */
.mock-phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 74px;
  height: 18px;
  background: var(--ink-950);
  border-radius: 0 0 12px 12px;
}

/* La foto es el tramo flexible: absorbe la altura sobrante del marco */
.mock-phone-img { flex: 1; min-height: 60px; height: auto; object-fit: cover; width: 100%; }

.mock-phone-notch { flex-shrink: 0; }

.mock-phone-body { padding: 12px; display: grid; gap: 8px; flex-shrink: 0; }

.mock-phone-body h4 { font-size: 0.8rem; }

.mock-phone-body p { font-size: 0.62rem; color: var(--color-text-muted); line-height: 1.4; }

.mock-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-display);
  border-radius: var(--radius-full);
  padding: 8px;
}

.mock-pill .icon-sm { width: 13px; height: 13px; }

.mock-pill-call { background: var(--grad-cta); color: var(--white); box-shadow: var(--shadow-brand); }

.mock-pill-book { background: var(--ink-100); color: var(--ink-800); }

@media (min-width: 640px) {
  .demo-visual { padding-block: var(--space-6); }
  .mock-desktop { width: min(94%, 460px); }
  .mock-phone { padding: 10px; margin-right: max(4%, 8px); }
  .mock-stat { padding: var(--space-3); }
  .mock-stat b { font-size: var(--text-lg); }
  .mock-stat span { font-size: 0.65rem; }
}

@media (min-width: 900px) {
  .demo-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-8);
    row-gap: var(--space-7);
  }
  /* En escritorio: mockups y beneficios en la primera fila, métricas debajo */
  .demo-visual { grid-column: 1; grid-row: 1; }
  .demo-benefits { grid-column: 2; grid-row: 1; }
  .metrics-block { grid-column: 1 / -1; grid-row: 2; }
}

/* Viñetas de beneficios */
.demo-benefits { display: grid; gap: var(--space-4); }

.benefit {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.benefit:hover {
  background: var(--color-bg-soft);
  transform: translateX(6px);
}

.benefit h3 { font-size: var(--text-lg); margin-bottom: var(--space-1); }

.benefit p { color: var(--color-text-soft); font-size: var(--text-sm); }

@media (min-width: 640px) {
  .demo-benefits { gap: var(--space-5); }
  .benefit { padding: var(--space-4); }
}

/* Métricas que controlamos */
.metrics-block {
  padding: var(--space-5);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.metrics-block h3 {
  font-size: var(--text-lg);
  text-align: center;
  margin-bottom: var(--space-4);
}

.metrics-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.metrics-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
}

.metrics-list .icon-sm { color: var(--brand-orange); }

@media (min-width: 560px) {
  .metrics-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .metrics-block { padding: var(--space-6); }
  .metrics-list { grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
}

/* --------------------------------------------------------------------------
   5. Comparativa directa (mobile-first)
   En móvil cada variable es una tarjeta independiente: título arriba y los
   tres proveedores alineados en dos columnas (nombre | valor), con la fila
   de planpresencia.es como pastilla destacada. Desde 720px: tabla clásica.
   -------------------------------------------------------------------------- */

/* En móvil el contenedor pierde el marco: cada fila es su propia tarjeta */
.table-wrap {
  overflow: visible;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.table,
.table tbody,
.table tr,
.table td {
  display: block;
}

.table {
  min-width: 0;
  background: none;
  max-width: 560px;
  margin-inline: auto;
}

.table thead { display: none; }

.table tr {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.table tr + tr { margin-top: var(--space-3); }

.table td {
  border: none;
  padding: 0;
  color: var(--color-text-soft);
  font-size: var(--text-sm);
}

.compare-feature { font-weight: 600; font-family: var(--font-display); }

/* Título de la tarjeta: la variable comparada */
.table td.compare-feature {
  font-size: var(--text-base);
  color: var(--color-text);
  padding: 0 0 var(--space-3);
  border-bottom: 1px dashed var(--color-border);
}

/* Filas proveedor | valor: franjas a sangre completa en dos columnas */
.table td[data-label] {
  display: grid;
  grid-template-columns: minmax(96px, 38%) 1fr;
  gap: var(--space-3);
  align-items: center;
  margin-inline: calc(var(--space-4) * -1);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
}

/* Segunda franja: tono levemente más oscuro y línea separadora */
.table td[data-label] + td[data-label] {
  background: #FCFBF9;
  border-top: 1px solid var(--ink-100);
}

.table td[data-label]::before {
  content: attr(data-label);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.compare-col-us {
  background: linear-gradient(160deg, rgba(224,40,38,.06), rgba(251,187,33,.08)) !important;
}

/* La fila de planpresencia.es cierra la tarjeta como banner a sangre completa */
.table td.compare-col-us {
  color: var(--ink-900);
  font-weight: 600;
  margin: 0 calc(var(--space-4) * -1) calc(var(--space-4) * -1);
  padding: var(--space-3) var(--space-4);
  border-radius: 0 0 calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px);
}

.table td.compare-col-us::before { color: var(--brand-red); }

.cell-flag {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cell-flag.is-bad .icon-sm { color: var(--ink-400); }

.cell-flag.is-good .icon-sm { color: var(--color-success); }

/* --- Tabla clásica (vista escritorio) --- */
@media (min-width: 720px) {
  .table-wrap {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }

  .table { display: table; min-width: 640px; max-width: none; background: var(--white); }
  .table thead { display: table-header-group; }
  .table tbody { display: table-row-group; }

  .table tr {
    display: table-row;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .table tr + tr { margin-top: 0; }

  .table td {
    display: table-cell;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
  }

  .table th { vertical-align: middle; }

  .table tbody tr:last-child td { border-bottom: none; }

  .table td[data-label] {
    display: table-cell;
    margin: 0;
    padding: var(--space-4) var(--space-5);
    background: none;
  }

  .table td[data-label] + td[data-label] { background: none; border-top: none; }

  .table td[data-label]::before { content: none; }

  .table td.compare-feature {
    font-size: var(--text-sm);
    padding: var(--space-4) var(--space-5);
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .table td.compare-col-us {
    border-radius: 0;
    margin: 0;
    padding: var(--space-4) var(--space-5);
  }

  .compare-col-us { border-left: 1px solid rgba(240, 140, 27, .25); }

  .table thead .compare-col-us { color: var(--brand-red); }

  .table thead .compare-col-us span {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
  }

  .table thead .compare-col-us .icon-sm { color: var(--brand-orange); }
}

/* --------------------------------------------------------------------------
   5b. Testimonios y contadores
   -------------------------------------------------------------------------- */
.counter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
  text-align: center;
}

.counter strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-3xl);
  letter-spacing: -0.03em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.counter span {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

@media (min-width: 640px) {
  .counter-row { grid-template-columns: repeat(3, 1fr); }
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 900px) {
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}

.testimonial {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.testimonial-quote {
  flex: 1;
  color: var(--color-text-soft);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-author img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-author strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
}

.testimonial-author span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Resultado obtenido: en verde, para leerse como beneficio y no como marca */
.testimonial-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  align-self: flex-start;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(30, 158, 88, .12);
  color: var(--color-success-dark);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
}

.testimonial-chip .icon-sm { color: var(--color-success); }

/* --------------------------------------------------------------------------
   6. Planes y precios
   -------------------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: stretch;
  max-width: 460px;
  margin-inline: auto;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: relative;
}

.plan-popular {
  box-shadow: var(--shadow-lg);
  /* Aire extra para que la banderola no toque la tarjeta anterior al apilarse */
  margin-top: var(--space-3);
}

/* La banderola nunca debe exceder el ancho de la tarjeta: tamaño y relleno
   fluidos, con recorte por elipsis como último recurso */
.plan-flag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - var(--space-4));
  background: var(--grad-cta);
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 0.5rem + 0.6vw, 0.75rem);
  font-weight: 700;
  padding: 0.3rem clamp(0.6rem, 3vw, 1rem);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.plan-flag .icon-sm { width: 14px; height: 14px; }

.plan-head { display: flex; align-items: center; gap: var(--space-3); }

.plan-head h3 { font-size: var(--text-xl); }

/* Precio en cabecera de tarjeta, notorio y en color de marca (estilo competidor) */
.plan-pricing {
  padding-bottom: var(--space-4);
  border-bottom: 1px dashed var(--color-border);
}

.plan-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan-price small {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0;
}

/* Precio habitual: menor y tachado, bajo el promocional */
.plan-after {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.plan-after s {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ink-400);
  text-decoration-thickness: 2px;
}

.plan-tagline {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

.plan-quote {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  font-style: italic;
  border-left: 3px solid var(--brand-orange);
  padding-left: var(--space-3);
}

.plan-features {
  list-style: none;
  padding: 0;
  display: grid;
  align-content: start;
  gap: var(--space-3);
  flex: 1;
}

.plan-features li {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

.plan-features .icon-sm { color: var(--brand-orange); margin-top: 3px; }

.pricing-legal {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 760px;
  margin: var(--space-7) auto 0;
  text-align: left;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.pricing-legal .icon-sm {
  flex-shrink: 0;
  color: var(--brand-orange);
}

@media (min-width: 640px) {
  .plan-price { font-size: 3rem; }
}

@media (min-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
    margin-inline: 0;
  }
  /* El destacado va el primero: se escala desde su borde izquierdo para que
     no se salga de la rejilla */
  .plan-popular { transform: scale(1.04); transform-origin: left center; margin-top: 0; }
  .plan-popular.card-hover:hover { transform: scale(1.04) translateY(-6px); }
}

/* --------------------------------------------------------------------------
   7. Servicios extra
   -------------------------------------------------------------------------- */
/* Servicios extra: tarjetas verticales */
.extras-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.extra-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.extra-card h3 { font-size: var(--text-lg); }

.extra-card p { color: var(--color-text-soft); font-size: var(--text-sm); flex: 1; }

.extra-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--brand-red);
}

.extra-price small { font-size: var(--text-xs); font-weight: 500; color: var(--color-text-muted); }

/* Tarifa suelta (sin plan) tachada, junto al precio con plan */
.extra-price-old {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--ink-400);
  margin-right: var(--space-1);
}

@media (min-width: 560px) {
  .extras-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
}

@media (min-width: 900px) {
  .extras-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Acompañamiento: tarjetas horizontales compactas (icono | contenido) */
.support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.support-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-4);
  row-gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
}

.support-card .icon-box {
  grid-row: 1 / span 2;
  align-self: center;
  width: 40px;
  height: 40px;
}

.support-card .icon-box .icon { width: 20px; height: 20px; }

.support-card h3 {
  font-size: var(--text-base);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.support-card p { color: var(--color-text-soft); font-size: var(--text-sm); }

@media (min-width: 820px) {
  .support-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4) var(--space-5); }
}

/* --------------------------------------------------------------------------
   8. FAQ
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 760px;
  margin-inline: auto;
  display: grid;
  gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   8b. La digitalización en los medios
   -------------------------------------------------------------------------- */
.press-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .press-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .press-grid { grid-template-columns: repeat(3, 1fr); }
}

.press-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.press-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Logos de medios en gris: imágenes desaturadas o wordmarks tipográficos */
.press-card img {
  height: 22px;
  width: auto;
  align-self: flex-start;
  filter: grayscale(1) opacity(.55);
}

.press-name {
  font-size: var(--text-lg);
  color: var(--ink-500);
  letter-spacing: .02em;
}

.press-name-serif { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }

.press-name-bold { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; }

.press-name-italic { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 600; }

.press-card p {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

/* --------------------------------------------------------------------------
   9. Cierre / CTA final
   -------------------------------------------------------------------------- */
.final-cta {
  position: relative;
  background: #0D0C0B;
  color: var(--white);
  overflow: clip;
}

/* Resplandor del bloque de cierre: nace en el borde superior y se funde
   hacia abajo. Tamaño fijo en px, independiente del viewport. */
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 1300px 780px at 50% 0%,
    rgba(235, 100, 20, .42),
    rgba(224, 40, 38, .18) 45%,
    transparent 72%
  );
  pointer-events: none;
}

.final-cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
}

/* Retrato sobre fondo negro: la máscara funde sus bordes con la sección */
.final-cta-photo {
  display: flex;
  justify-content: center;
}

/* Retrato recortado (PNG con transparencia); el degradado funde el corte inferior */
.final-cta-photo img {
  display: block;
  width: min(100%, 320px);
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}

.final-cta h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

/* Micro-mensaje que elimina las últimas dudas antes del CTA */
.final-note {
  color: var(--ink-300);
  font-size: var(--text-base);
  max-width: 34rem;
  margin: 0 auto var(--space-6);
}

@media (min-width: 900px) {
  .final-cta-inner {
    grid-template-columns: 1fr 1.15fr;
    gap: var(--space-7);
    text-align: left;
  }
  /* El retrato se apoya en la base de la sección: el margen negativo anula el
     padding inferior para que la figura termine justo en la línea divisoria */
  .final-cta-photo { align-self: end; }

  .final-cta-photo img {
    width: 100%;
    max-width: 560px;
    margin-bottom: calc(var(--space-9) * -1);
    -webkit-mask-image: none;
    mask-image: none;
  }
  .final-note { margin-inline: 0; }
  .final-cta-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }
}

/* Acciones del cierre: CTA principal + teléfono, con el horario debajo */
/* En móvil ambos botones ocupan el mismo ancho; desde 900px van en línea */
.final-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.final-hours {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-400);
}

.final-hours .icon-sm { color: var(--brand-amber); }

/* Sellos de pago: franja inferior del footer, bajo la línea divisoria */
.trust-seals {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-5);
}

.seal-row {
  display: flex;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

/* Chips claros con logotipos de pago; alturas fijas para igualar tamaños */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding-inline: 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .92);
  transition: background-color var(--dur-fast), transform var(--dur-fast);
}

.seal:hover { background: var(--white); transform: translateY(-2px); }

.seal img { height: 13px; width: auto; max-width: 68px; object-fit: contain; }

/* SVG en lienzo 780x500 con márgenes internos: más altura de imagen para
   igualar su tamaño óptico con los wordmarks */
.seal img.seal-card-canvas { height: 27px; }

.trust-seals > p {
  font-size: var(--text-xs);
  color: var(--ink-400);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-2);
  max-width: 34rem;
}

.trust-seals > p .icon-sm { color: var(--brand-amber); margin-top: 2px; }

@media (min-width: 640px) {
  .seal { padding-inline: 0.85rem; }
  .seal-row { gap: var(--space-3); }
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
/* Ritmo uniforme: mismo espacio entre cada línea divisoria y su contenido */
.site-footer {
  background: #0D0C0B;
  color: var(--ink-400);
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: var(--text-sm);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-5);
  text-align: center;
}

/* Banda a ancho completo: su línea superior llega a los bordes del viewport */
.footer-seals {
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.site-footer .logo { color: var(--white); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4) var(--space-5);
  list-style: none;
  padding: 0;
}

.footer-links a { text-decoration: none; transition: color var(--dur-fast); }

.footer-links a:hover { color: var(--white); }

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   11. Contacto flotante: botón de llamada (móvil) + WhatsApp
   -------------------------------------------------------------------------- */
.contact-float {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}

/* En móvil el botón de llamada ocupa el ancho restante de la línea
   y muestra el número directamente */
.contact-float-call {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--grad-cta);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-brand);
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast);
}

.contact-float-call:active { transform: scale(.97); }

.whatsapp-float {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #25D366;
  color: var(--white);
  text-decoration: none;
  padding: 0.95rem;
  border-radius: var(--radius-full);
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .55);
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast);
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 40px -10px rgba(37, 211, 102, .65);
}

.whatsapp-float svg { width: 22px; height: 22px; }

@media (min-width: 640px) {
  .contact-float {
    left: auto;
    right: 20px;
    bottom: 20px;
  }

  .contact-float-call { display: none; }
}
