/* ============================================================
   Automagym — hoja de estilos
   Dirección: industrial de gimnasio. Negro carbón, rojo-ember,
   Public Sans 900 en mayúsculas para titulares, JetBrains Mono
   para cifras y paneles de control.
   ============================================================ */

/* ---------- Fuentes (auto-alojadas, sin CDN → sin fuga de IPs, RGPD) ---------- */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/PublicSans-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/PublicSans-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../assets/fonts/JetBrainsMono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #0b0c0d;
  --surface: #151617;
  --surface-2: #1c1d1f;
  --surface-3: #232426;
  --line: #2b2d2f;
  --line-2: #38393c;
  --paper: #101112;
  --white: #ffffff;

  --fg: #d3d5d8;
  --fg-bright: #f4f5f6;
  --muted: #9a9ea3;
  --muted-2: #6f7378;

  --brand: #e0574c;
  --brand-dark: #b8382f;
  --brand-bright: #ef7266;
  --brand-soft: rgba(224, 87, 76, 0.14);

  --safety: #c7e63f;
  --mint: var(--safety); /* alias: compatibilidad con estilo inline en index.html */
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);

  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1120px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.55);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color 0.16s var(--ease); }
a:hover { color: var(--brand-bright); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

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

/* ---------- Utilidades ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.serif {
  font-family: var(--sans);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

.h2 { font-size: clamp(26px, 4.3vw, 37px); }

.lede {
  color: var(--muted);
  font-size: clamp(15.5px, 1.6vw, 17px);
  max-width: 62ch;
}

.section {
  padding-block: clamp(56px, 8.5vw, 104px);
  position: relative;
}
.section--tint { background: var(--surface); }
.section--paper {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 14px),
    var(--paper);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--brand);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 0 0 6px 0;
  font-size: 14px;
  font-weight: 700;
}
.skip-link:focus { left: 0; color: var(--white); }

.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;
}

/* Una <table> con table-layout:auto (por defecto) ignora el width:1px de
   .sr-only y crece al ancho de su contenido real, provocando scroll
   horizontal en toda la página aunque esté clipada visualmente. */
table.sr-only { table-layout: fixed; }
/* El <caption> hereda el white-space:nowrap de .sr-only, así que su ancho
   mínimo es el texto entero en una línea y arrastra a la tabla pese a
   table-layout:fixed, devolviendo el scroll horizontal a toda la página.
   Con word-break ese mínimo pasa a ser un carácter; el texto sigue en el
   DOM y disponible para los lectores de pantalla. */
table.sr-only > caption { white-space: normal; word-break: break-all; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 16px 28px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background 0.16s var(--ease), color 0.16s var(--ease),
    transform 0.16s var(--ease-snap), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Texto blanco sobre --brand da 3.73:1 (no llega al 4.5:1 de WCAG AA para
   texto de 15px). --brand-dark ya existe en la paleta y sí cumple (5.76:1);
   el tono de :hover es un valor propio, ni --brand ni --brand-bright pasan. */
.btn--primary {
  background: var(--brand-dark);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(224, 87, 76, 0.32);
}
.btn--primary:hover {
  background: #c94339;
  color: var(--white);
  box-shadow: 0 10px 26px rgba(224, 87, 76, 0.4);
}

.btn--bright { background: var(--fg-bright); color: var(--ink); }
.btn--bright:hover { background: var(--white); color: var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--surface-2); }

/* Verde de marca de WhatsApp. Texto oscuro y no blanco: sobre #25D366
   el blanco se queda en 2,4:1 de contraste y no pasa WCAG AA. */
.btn--wa { background: #25d366; color: #0b1a13; }
.btn--wa:hover { background: #1fbe5a; color: #071410; }
.btn--wa svg { flex: none; }

.btn--sm { padding: 11px 20px; font-size: 13.5px; }
.btn--block { width: 100%; }

/* ---------- Cabecera ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 13, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-bright);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.brand:hover { color: var(--fg-bright); }
.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--fg-bright);
  display: grid;
  place-items: center;
  flex: none;
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav__link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  position: relative;
  padding-block: 4px;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s var(--ease-snap);
}
.nav__link:hover { color: var(--fg-bright); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: '';
  display: block;
  width: 17px; height: 2px;
  background: var(--fg-bright);
  border-radius: 1px;
  transition: transform 0.24s var(--ease-snap), opacity 0.2s linear;
}
.nav__toggle span::before { transform: translateY(-5.5px); }
.nav__toggle span::after { transform: translateY(4px); }
.nav__toggle[aria-expanded='true'] span { background: transparent; }
.nav__toggle[aria-expanded='true'] span::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded='true'] span::after { transform: rotate(-45deg) translateY(0); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(52px, 8vw, 88px) clamp(56px, 8vw, 96px);
  background:
    radial-gradient(1100px 480px at 88% -8%, var(--brand-soft) 0%, transparent 62%),
    linear-gradient(180deg, var(--surface) 0%, var(--ink) 55%);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 18px);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 65%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 65%);
}
.hero > * { position: relative; z-index: 1; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 7px 15px 7px 11px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.hero__tag i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(224, 87, 76, 0.22);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(224, 87, 76, 0.22); }
  50% { box-shadow: 0 0 0 6px rgba(224, 87, 76, 0.06); }
}

.hero__title {
  font-family: var(--sans);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(33px, 5.8vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: var(--fg-bright);
}

.hero__lede {
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 18.5px);
  line-height: 1.62;
  max-width: 54ch;
  margin-bottom: 30px;
}

.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.hero__note { font-size: 13.5px; color: var(--muted-2); }

/* Bloque respuesta (GEO/AEO) */
.answer {
  margin-top: 38px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  max-width: 60ch;
}
.answer h2 { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--fg-bright); text-transform: uppercase; letter-spacing: 0.02em; }
.answer p { font-size: 14.6px; color: var(--muted); line-height: 1.62; }

/* Métricas */
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.metric {
  flex: 1 1 128px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: transform 0.2s var(--ease-snap), border-color 0.2s var(--ease);
}
.metric:hover { transform: translateY(-3px); border-color: var(--brand); }
.metric__n {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  color: var(--brand);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.metric__l {
  font-size: 11.6px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Simulación de chat ---------- */
.chat {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.chat::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(224, 87, 76, 0.4), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.chat__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.chat__name { color: var(--fg-bright); font-size: 14.5px; font-weight: 700; }
.chat__status {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--safety);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat__status::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--safety);
}

.chat__log { display: flex; flex-direction: column; gap: 11px; }

.bubble {
  max-width: 84%;
  padding: 11px 15px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 10px;
  opacity: 0;
  animation: bubbleIn 0.45s var(--ease-snap) forwards;
}
.bubble strong { font-weight: 700; }
.bubble--in {
  align-self: flex-start;
  background: var(--surface-3);
  color: var(--fg);
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}
.bubble--out {
  align-self: flex-end;
  background: var(--brand);
  color: var(--white);
  border-bottom-right-radius: 3px;
}
.bubble:nth-child(1) { animation-delay: 0.2s; }
.bubble:nth-child(2) { animation-delay: 0.6s; }
.bubble:nth-child(3) { animation-delay: 1s; }
.bubble:nth-child(4) { animation-delay: 1.4s; }

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.chat__foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  text-transform: uppercase;
}

/* ---------- Rejilla de dolores ---------- */
.pains {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}
.pain {
  background: var(--paper);
  padding: 28px 26px;
  transition: background 0.2s var(--ease);
  border-top: 2px solid transparent;
}
.pain:hover { background: var(--surface-2); border-top-color: var(--brand); }
.pain h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--fg-bright); }
.pain p { font-size: 14.4px; color: var(--muted); line-height: 1.6; }

/* ---------- Tabla comparativa ---------- */
.compare-wrap { overflow-x: auto; margin-top: 36px; -webkit-overflow-scrolling: touch; }
.compare {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare th, .compare td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14.4px;
}
.compare thead th {
  font-family: var(--mono);
  font-size: 10.6px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-3);
  font-weight: 600;
}
.compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody th { font-weight: 700; color: var(--fg-bright); }
.compare td:nth-child(2) { color: var(--muted); }
.compare td:nth-child(3) { color: var(--brand-bright); font-weight: 700; background: var(--brand-soft); }

/* Módulos futuros: se ven, pero se distinguen de lo que ya funciona. */
.compare__sep th {
  background: var(--surface-3);
  font-family: var(--mono);
  font-size: 10.2px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding-top: 16px;
  padding-bottom: 12px;
}
.compare__futuro th[scope='row'],
.compare__futuro td { opacity: 0.78; }
.compare__futuro td:nth-child(3) { background: var(--surface-3); color: var(--fg); }

/* La facturación ya existe: se destaca y no lleva la etiqueta "En camino". */
.compare__futuro .compare__destacada th[scope='row'],
.compare__futuro .compare__destacada td { opacity: 1; }
.compare__futuro .compare__destacada td:nth-child(3) {
  background: var(--brand-soft);
  color: var(--brand-bright);
  font-weight: 700;
}
.compare__destacada th[scope='row'] { box-shadow: inset 3px 0 0 var(--brand); }

/* "A petición" no es lo mismo que "En camino": no está pendiente de que lo
   construyamos, está disponible en cuanto lo pidas. Se distingue en color. */
.tag-req {
  display: inline-block;
  margin-left: 7px;
  font-family: var(--mono);
  font-size: 9.2px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-bright);
  background: transparent;
  border: 1px solid var(--brand);
  border-radius: 3px;
  padding: 2px 8px;
  vertical-align: 1px;
  white-space: nowrap;
}

.tag-link {
  display: inline-block;
  margin-left: 7px;
  font-family: var(--mono);
  font-size: 9.2px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--brand);
  border-radius: 3px;
  padding: 3px 9px;
  vertical-align: 1px;
  white-space: nowrap;
  transition: background 0.16s var(--ease);
}
.tag-link::after { content: ' ↓'; }
.tag-link:hover { background: var(--brand-dark); color: var(--white); }

.tag-soon {
  display: inline-block;
  margin-left: 7px;
  font-family: var(--mono);
  font-size: 9.2px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 2px 8px;
  vertical-align: 1px;
  white-space: nowrap;
}

/* ---------- Servicios ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.service {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s var(--ease-snap), border-color 0.22s var(--ease);
}
.service::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-snap);
}
.service:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
}
.service:hover::before { transform: scaleX(1); }
.service__n {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: 13px;
}
.service h3 { font-size: 17px; font-weight: 700; margin-bottom: 9px; color: var(--fg-bright); }
.service p { font-size: 14.4px; color: var(--muted); line-height: 1.6; }
.service__ex {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
  font-size: 13px !important;
  font-family: var(--mono);
  color: var(--muted-2) !important;
  line-height: 1.55 !important;
  font-style: normal;
}

.services__foot {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}
.services__foot p { color: var(--muted); font-size: 15px; }
.link-mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand);
}
.link-mono span { transition: transform 0.2s var(--ease-snap); }
.link-mono:hover span { transform: translateX(4px); }

/* ---------- Proceso ---------- */
.process__grid { display: grid; grid-template-columns: 1fr; }
.steps { margin-top: 30px; }
.step {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__day {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--brand);
  border-radius: 3px;
  padding: 3px 7px;
  height: fit-content;
  text-align: center;
}
.step h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 5px; color: var(--fg-bright); }
.step p { font-size: 14.3px; color: var(--muted); line-height: 1.55; }

.report__label {
  font-family: var(--mono);
  font-size: 10.4px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.report__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.6px;
}
.report__row:last-child { border-bottom: 0; }
.report__row span:first-child { color: var(--muted); }
.report__row span:last-child { font-family: var(--mono); font-weight: 600; color: var(--fg-bright); }

/* ---------- Calculadora ---------- */
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
  margin-top: 40px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3.5vw, 40px);
  box-shadow: var(--shadow);
}

.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }

.field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-bright);
  margin-bottom: 9px;
}
.field__val {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--brand);
  font-weight: 600;
}
.field__hint { font-size: 12.4px; color: var(--muted-2); margin-top: 7px; line-height: 1.45; }

/* Pista/thumb como un panel de control: barra oscura hundida, thumb ember. */
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--ink);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  outline-offset: 6px;
  cursor: pointer;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 3px;
  background: var(--brand);
  border: 2px solid var(--fg-bright);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: grab;
  transition: transform 0.16s var(--ease-snap), background 0.16s var(--ease);
  margin-top: -1px;
}
input[type='range']::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.12); background: var(--brand-bright); }
input[type='range']::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 3px;
  background: var(--brand);
  border: 2px solid var(--fg-bright);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: grab;
}
input[type='range']::-moz-range-track {
  height: 6px; border-radius: 3px; background: var(--ink); border: 1px solid var(--line-2);
}

.calc__out {
  background: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 26px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.calc__out::before {
  /* barra de "carga/intensidad" tipo medidor de gimnasio, en el borde superior */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--brand) 0 18px, var(--brand-dark) 18px 20px);
}
.calc__out::after {
  content: '';
  position: absolute;
  width: 260px; height: 260px;
  right: -110px; top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 87, 76, 0.16), transparent 70%);
  pointer-events: none;
}
.calc__out .report__label { display: block; margin-bottom: 6px; color: var(--muted); }
.calc__big {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(36px, 5.6vw, 50px);
  line-height: 1;
  color: var(--brand);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.calc__sub { font-size: 13px; color: var(--muted); margin-top: 8px; }
.calc__rows { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

.calc__disclaimer {
  font-size: 11.4px;
  color: var(--muted-2);
  margin-top: 16px;
  line-height: 1.5;
}
.calc__disclaimer strong { color: var(--muted); }

.calc__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- Campo numérico junto al deslizador ---------- */
.field__val {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.field__num {
  width: 5.5ch;
  padding: 3px 6px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  text-align: right;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
  /* Sin flechas: ocupan sitio y en móvil estorban más que ayudan. */
  -moz-appearance: textfield;
  appearance: textfield;
}
.field__num::-webkit-outer-spin-button,
.field__num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__num:hover { border-color: var(--line-2); background: var(--ink); }
.field__num:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(224, 87, 76, 0.18);
}
.field__unit {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}

/* ---------- Facturación ---------- */
.fact {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
  margin-top: 40px;
}
.fact__copy { min-width: 0; }
.fact__copy h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--fg-bright); text-transform: uppercase; letter-spacing: 0.01em; }
.fact__nota {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.55;
  font-style: italic;
}

.fact__panel {
  margin: 0;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.6vw, 28px);
  box-shadow: var(--shadow-lg);
}
.fact__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

/* Pestañas del panel. Sin JS se muestran las dos vistas seguidas; con JS
   solo la activa. Por eso el ocultado cuelga de .js y no del marcado. */
.fact__tabs { display: inline-flex; gap: 2px; }
.fact__tab {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 4px 2px 8px;
  margin-right: 16px;
  cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.fact__tab:last-child { margin-right: 0; }
.fact__tab:hover { color: var(--fg-bright); }
.fact__tab.is-on { color: var(--fg-bright); border-bottom-color: var(--brand); }

.js .fact__vista { display: none; }
.js .fact__vista.is-active { display: block; }
.fact__vista + .fact__vista { margin-top: 26px; }

.fact__vistaIntro {
  font-size: 13.4px;
  color: var(--muted);
  line-height: 1.5;
  margin: 18px 0 4px;
}

/* Filtros en una sola fila sobre el gráfico. */
.fact__filtros { display: inline-flex; gap: 4px; }
.fact__filtro {
  font-family: var(--mono);
  font-size: 10.6px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 6px 11px;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.fact__filtro:hover { background: var(--line); color: var(--fg-bright); }
.fact__filtro.is-on {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}

.fact__kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 6px;
}
.fact__kpi { min-width: 0; }
.fact__kpiLabel {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.fact__kpiVal {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.1;
  letter-spacing: 0.005em;
  color: var(--fg-bright);
  font-variant-numeric: tabular-nums;
}
.fact__kpiPct { display: block; font-size: 11.2px; color: var(--muted); margin-top: 4px; }

/* Gráfico: una sola serie, un solo tono. Sin leyenda: el título la nombra. */
.fact__chartWrap { position: relative; margin-top: 20px; }
.fact__chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 132px;
  padding-top: 10px;
  /* Canalón para la etiqueta de la media, que si no pisa la barra más alta. */
  padding-left: 44px;
  border-bottom: 1px solid var(--line);
}
.fact__bar {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.fact__bar i {
  display: block;
  width: 100%;
  /* Marca fina: con 3 meses, sin tope, cada barra sería un muro. */
  max-width: 46px;
  height: var(--h, 50%);
  background: var(--brand);
  /* Extremo recto: sensación de placa/marcador, no de burbuja. */
  border-radius: 2px 2px 0 0;
  transition: background 0.16s var(--ease), height 0.4s var(--ease-snap);
}
.fact__bar:hover i,
.fact__bar:focus-visible i { background: var(--brand-bright); }
.fact__bar span {
  font-family: var(--mono);
  font-size: 9.6px;
  color: var(--muted);
  text-align: center;
  padding-top: 7px;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
}

/* Línea de referencia: la media del periodo. Discreta, punteada y
   rotulada, para que cada barra se lea contra algo y no en el vacío. */
.fact__media {
  position: absolute;
  left: 0; right: 0;
  border-top: 1px dashed var(--line-2);
  pointer-events: none;
  z-index: 1;
  transition: bottom 0.4s var(--ease-snap);
}
.fact__media span {
  position: absolute;
  left: 0;
  top: -7px;
  font-family: var(--mono);
  font-size: 8.8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  padding: 0 4px;
}

/* Ranking de rentabilidad: barras horizontales, una sola serie. */
.rank { margin-top: 18px; display: flex; flex-direction: column; gap: 13px; }
.rank__row {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr auto;
  align-items: center;
  gap: 12px;
}
.rank__name {
  font-size: 13.2px;
  font-weight: 700;
  color: var(--fg-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank__barWrap { min-width: 0; }
.rank__bar {
  display: block;
  height: 11px;
  width: var(--w, 50%);
  background: var(--brand);
  border-radius: 0 2px 2px 0;
  transition: width 0.45s var(--ease-snap), background 0.16s var(--ease);
}
.rank__row:hover .rank__bar { background: var(--brand-bright); }
.rank__val {
  font-family: var(--mono);
  font-size: 12.4px;
  font-weight: 600;
  color: var(--fg-bright);
  white-space: nowrap;
  text-align: right;
}
.rank__meta {
  grid-column: 2 / -1;
  font-size: 11.2px;
  color: var(--muted);
  margin-top: -6px;
}
.rank__meta b { color: var(--brand); font-weight: 700; }

.fact__insight {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--brand-soft);
  border-left: 2px solid var(--brand);
  border-radius: 0 6px 6px 0;
  font-size: 12.6px;
  line-height: 1.55;
  color: var(--fg);
}
.fact__insight b { color: var(--fg-bright); font-weight: 700; }

.fact__tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -6px);
  background: var(--fg-bright);
  color: var(--ink);
  border-radius: 5px;
  padding: 7px 11px;
  font-size: 12.2px;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transition: opacity 0.14s var(--ease);
}
.fact__tip.is-on { opacity: 1; }
.fact__tip b { font-weight: 700; display: block; }

.fact__fuentes {
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.2px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.fact__ilustrativo { margin-top: 8px; font-size: 11.2px; color: var(--muted-2); }

@media (max-width: 960px) {
  .fact { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .fact__kpis { grid-template-columns: 1fr 1fr; }
  .fact__kpi:first-child { grid-column: 1 / -1; }
}

/* ---------- Precio ---------- */
.precio {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  margin-top: 40px;
}
.precio__card {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--shadow);
}
.precio__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.precio__label { font-size: 15px; font-weight: 700; color: var(--fg-bright); }
.precio__hint { font-size: 12.6px; color: var(--muted-2); margin-top: 3px; line-height: 1.4; }
.precio__cifra {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--brand);
  white-space: nowrap;
}
.precio__cifra span { font-family: var(--sans); font-size: 13px; font-weight: 600; }

.precio__sub {
  font-family: var(--mono);
  font-size: 10.6px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 10px;
}
.precio__sub:first-of-type { margin-top: 4px; }
.precio__aparte {
  font-size: 12.6px;
  color: var(--muted-2);
  line-height: 1.55;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.precio__aparte strong { color: var(--fg-bright); font-weight: 700; }

.precio__lista { margin-top: 4px; }
.precio__lista li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  font-size: 14.2px;
  color: var(--muted);
  line-height: 1.5;
}
.precio__lista li::before {
  content: '';
  position: absolute;
  left: 3px; top: 6px;
  width: 11px; height: 6px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}

/* Sin esto, el min-width de la tabla comparativa impide que la columna
   encoja y se come el ancho de la tarjeta de precio. */
.precio__nota { min-width: 0; }
/* Sus celdas son más cortas que las de la comparativa grande, así que no
   necesita los 620px y así no se corta dentro de la columna. */
.precio__nota .compare { min-width: 460px; }
.precio__nota p { color: var(--muted); font-size: 15px; line-height: 1.65; }

/* Infraestructura: lo que justifica el pago único. */
.precio__infra {
  margin-top: 24px;
  background: var(--ink);
  border: 1px solid var(--line-2);
  color: var(--fg);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.precio__infra h4 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  margin-bottom: 10px;
  color: var(--fg-bright);
}
.precio__infra p { color: var(--muted); font-size: 14.4px; line-height: 1.62; }
.precio__infra p strong { color: var(--brand); font-weight: 700; }
.precio__infra-nota {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13.2px !important;
  color: var(--muted-2) !important;
}

/* ---------- Precio: los dos planes ---------- */
/* Con dos tarjetas apiladas la columna pasa a ser más alta que el viewport:
   el sticky de .precio__card dejaba el final del segundo plan fuera de
   alcance al hacer scroll, así que aquí la columna acompaña a la página. */
.precio__planes { display: grid; gap: 20px; }

.precio__badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.2px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.precio__badge--full { background: var(--brand-dark); color: var(--white); }
.precio__badge--lite {
  background: var(--surface-3);
  color: var(--muted);
  border: 1px solid var(--line-2);
}
.precio__plan {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--fg-bright);
  margin-bottom: 6px;
}
.precio__para {
  font-size: 13.8px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 20px;
}

/* Plan de entrada: mismo esqueleto, menos peso visual, para que sea la
   puerta de entrada y no un competidor del plan completo. */
.precio__card--lite {
  background: var(--surface);
  box-shadow: none;
  padding: clamp(22px, 2.6vw, 30px);
}
.precio__card--lite .precio__cifra { font-size: 27px; }

/* Lo que el plan de entrada NO hace: misma lista, aspa en vez de check. */
.precio__lista--no li { color: var(--muted-2); }
.precio__lista--no li::before,
.precio__lista--no li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 11px;
  height: 2px;
  border: 0;
  background: var(--muted-2);
}
.precio__lista--no li::before { transform: rotate(45deg); }
.precio__lista--no li::after { transform: rotate(-45deg); }

/* La rampa de subida al plan completo: sin ella el plan barato es un techo
   y no una puerta. */
.precio__rampa {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  border: 1px solid var(--line-2);
  font-size: 13.4px;
  line-height: 1.55;
  color: var(--fg);
}
.precio__rampa strong { color: var(--brand-bright); font-weight: 700; }

/* Comparativa de tres escalones: la columna destacada pasa a ser la 4.ª. */
.compare--planes td:nth-child(3) {
  color: var(--fg);
  font-weight: 600;
  background: var(--surface-3);
}
.compare--planes td:nth-child(4) {
  color: var(--brand-bright);
  font-weight: 700;
  background: var(--brand-soft);
}
.compare--planes tfoot th,
.compare--planes tfoot td {
  font-family: var(--mono);
  font-size: 12.8px;
  border-bottom: 0;
  border-top: 1px solid var(--line-2);
}

/* Los dos planes, lado a lado; la comparativa de tres escalones ocupa el
   ancho completo debajo, porque en una columna estrecha se cortaba. */
.precio { grid-template-columns: 1fr; }
.precio__planes { grid-template-columns: 1fr 1fr; align-items: start; }
.precio__planes .precio__card:not(.precio__card--lite) { border-color: var(--brand); }
@media (max-width: 820px) {
  .precio__planes { grid-template-columns: 1fr; }
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: clamp(14px, 3vw, 26px);
  bottom: clamp(14px, 3vw, 26px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 100px;
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 8px 26px rgba(224, 87, 76, 0.4);
  /* Oculto hasta que el JS decide mostrarlo. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.94);
  transition: opacity 0.28s var(--ease-snap), transform 0.28s var(--ease-snap),
    visibility 0.28s, background 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.wa-float.is-visible { opacity: 1; visibility: visible; transform: none; }
.wa-float:hover {
  background: var(--brand-bright);
  color: var(--white);
  box-shadow: 0 12px 32px rgba(224, 87, 76, 0.5);
}
.wa-float svg { flex: none; }
.wa-float__txt {
  font-size: 15px;
  font-weight: 700;
  padding-right: 6px;
  max-width: 8em;
  overflow: hidden;
  white-space: nowrap;
}

/* En pantallas estrechas, solo el icono: el texto robaría demasiado ancho. */
@media (max-width: 620px) {
  .wa-float { padding: 13px; }
  .wa-float__txt {
    max-width: 0;
    padding-right: 0;
    opacity: 0;
  }
}

/* ---------- Testimonios ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.quote {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: transform 0.22s var(--ease-snap), border-color 0.22s var(--ease);
}
.quote:hover { transform: translateY(-3px); border-color: var(--brand); }
.quote__tag {
  font-family: var(--mono);
  font-size: 10.2px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--brand);
}
.quote blockquote { margin: 0; font-size: 14.8px; line-height: 1.6; color: var(--fg); }
.quote figcaption { font-size: 12.6px; color: var(--muted-2); margin-top: auto; }

.disclaimer-note {
  margin-top: 22px;
  font-size: 12.6px;
  color: var(--muted-2);
  font-style: italic;
  line-height: 1.5;
}

/* Aviso destacado: va ANTES del contenido que matiza, no después.
   Un descargo que se lee al final ya no cumple su función. */
.notice {
  margin-top: 18px;
  max-width: 68ch;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--safety);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 15px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.notice strong { color: var(--fg-bright); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq { margin-top: 38px; max-width: 820px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq details[open] summary { color: var(--brand); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 44px 18px 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--fg-bright);
  position: relative;
  transition: color 0.18s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  position: absolute;
  right: 8px; top: 50%;
  width: 11px; height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.24s var(--ease-snap);
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq summary:hover { color: var(--brand); }
.faq__body {
  padding: 0 44px 20px 0;
  font-size: 14.8px;
  color: var(--muted);
  line-height: 1.65;
  animation: faqIn 0.28s var(--ease-snap);
}
@keyframes faqIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Formulario ---------- */
.contact {
  background:
    radial-gradient(900px 420px at 92% 0%, rgba(224, 87, 76, 0.1) 0%, transparent 60%),
    var(--surface);
  color: var(--fg);
  border-top: 1px solid var(--line);
}
.contact__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.contact__title {
  font-family: var(--sans);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  color: var(--fg-bright);
}
.contact__lede { color: var(--muted); font-size: 16px; line-height: 1.62; }
.contact__list { margin-top: 26px; display: flex; flex-direction: column; gap: 13px; }
.contact__item {
  display: flex;
  gap: 11px;
  font-size: 14.4px;
  color: var(--fg);
  line-height: 1.5;
}
.contact__item::before {
  content: '✓';
  color: var(--brand);
  font-weight: 700;
  flex: none;
}
.contact__direct {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.contact__direct a {
  color: var(--fg-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.contact__direct a:hover { color: var(--brand); }
.contact__wa { font-weight: 700; }
.contact__wa svg { color: #25d366; flex: none; }
.contact__wa:hover svg { color: #4ae288; }

.form {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3.4vw, 38px);
  box-shadow: var(--shadow-lg);
  color: var(--fg);
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form .field { margin-bottom: 18px; }

label { font-size: 13.6px; font-weight: 700; display: block; margin-bottom: 7px; color: var(--fg-bright); }
label .req { color: var(--brand); }
label .opt { font-weight: 400; color: var(--muted-2); font-size: 12.4px; text-transform: none; }

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='number'],
select,
textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--fg-bright);
  background: var(--ink);
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%239a9ea3' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
textarea { resize: vertical; min-height: 108px; line-height: 1.55; }

input:hover, select:hover, textarea:hover { border-color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(224, 87, 76, 0.18);
}
::placeholder { color: var(--muted-2); opacity: 1; }

/* Trampa antispam — invisible para humanos, tentadora para bots */
.hp {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

.check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  align-items: start;
  font-size: 13.2px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: 8px;
  cursor: pointer;
}
.check input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  margin: 0;
  border: 1.6px solid var(--muted-2);
  border-radius: 4px;
  background: var(--ink);
  cursor: pointer;
  position: relative;
  flex: none;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.check input[type='checkbox']:checked {
  background: var(--brand);
  border-color: var(--brand);
}
.check input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg);
}

.form__submit { margin-top: 22px; }
.form__legal { font-size: 11.6px; color: var(--muted-2); margin-top: 14px; line-height: 1.5; }

/* Enlaces dentro de texto corrido: necesitan algo más que el color para
   distinguirse (WCAG 1.4.1), a diferencia de los enlaces de navegación. */
.check a, .form__legal a, .faq__body a { text-decoration: underline; }

.error {
  display: none;
  font-size: 13px;
  color: var(--danger);
  margin-top: 6px;
}
.field.is-invalid .error { display: block; }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--danger); }

.alert {
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14.2px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.alert--ok { background: rgba(199, 230, 63, 0.12); color: var(--safety); border: 1px solid rgba(199, 230, 63, 0.4); }
.alert--err { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.4); }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pie ---------- */
.footer {
  background: var(--paper);
  color: var(--muted);
  padding-block: 52px 34px;
  border-top: 1px solid var(--line);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}
.footer .brand { color: var(--fg-bright); }
.footer .brand__mark { background: var(--surface-2); }
.footer p { font-size: 13.6px; line-height: 1.6; margin-top: 13px; max-width: 40ch; }
.footer h3 {
  font-family: var(--mono);
  font-size: 10.6px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-bright);
  margin-bottom: 14px;
}
.footer li { margin-bottom: 9px; }
.footer li a { color: var(--muted); font-size: 13.8px; }
.footer li a:hover { color: var(--brand); }
.footer__bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  align-items: center;
  font-size: 12.4px;
}
.footer__social { display: flex; gap: 14px; align-items: center; }
.footer__social a { color: var(--muted); display: flex; }
.footer__social a:hover { color: var(--brand); }

/* ---------- Páginas legales ---------- */
.legal { max-width: 780px; padding-block: clamp(40px, 6vw, 72px); }
.legal__back {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  color: var(--brand);
}
.legal h1 {
  font-family: var(--sans);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(28px, 4.8vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  color: var(--fg-bright);
}
.legal__meta {
  font-size: 13px;
  color: var(--muted-2);
  padding-bottom: 26px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.legal h2 {
  font-family: var(--sans);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(20px, 2.8vw, 25px);
  letter-spacing: -0.005em;
  margin: 40px 0 12px;
  color: var(--fg-bright);
}
.legal h3 { font-size: 16px; font-weight: 700; margin: 24px 0 8px; color: var(--fg-bright); }
.legal p, .legal li { color: var(--fg); font-size: 15px; line-height: 1.72; }
.legal p { margin-bottom: 14px; }
.legal ul { list-style: none; margin: 0 0 16px; padding: 0; }
.legal ul li { position: relative; padding-left: 20px; margin-bottom: 9px; }
.legal ul li::before {
  content: '';
  position: absolute;
  left: 3px; top: 11px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand);
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 14.2px;
}
.legal table th, .legal table td {
  text-align: left;
  padding: 11px 14px;
  border: 1px solid var(--line);
  vertical-align: top;
}
.legal table th { background: var(--surface-3); font-weight: 700; color: var(--fg-bright); }
.legal__note {
  background: var(--surface-2);
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 22px 0;
  font-size: 14.2px;
  color: var(--fg);
  line-height: 1.6;
}
.legal__todo {
  background: rgba(199, 230, 63, 0.08);
  border: 1px dashed var(--safety);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 22px 0;
  font-size: 14px;
  color: var(--safety);
  line-height: 1.6;
}
.legal__todo strong { color: var(--fg-bright); }

/* ---------- Reveal al hacer scroll ---------- */
/* Solo se ocultan si hay JS que pueda volver a mostrarlos.
   Sin JS (o si main.js falla), el contenido se ve siempre. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease-snap), transform 0.45s var(--ease-snap);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid,
  .calc,
  .precio,
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* Con 5 enlaces más el botón, el menú va justo entre 760 y 1080 px:
   apretamos separación y cuerpo antes de saltar al menú hamburguesa. */
@media (max-width: 1080px) and (min-width: 961px) {
  .nav { gap: 18px; }
  .nav__link { font-size: 13.2px; }
  .header .btn--sm { padding: 10px 15px; font-size: 13px; }
}

/* Con 5 enlaces más el botón, por debajo de ~960 px el menú se parte
   en dos filas: saltamos al menú hamburguesa antes de que ocurra. */
@media (max-width: 960px) {
  html { scroll-padding-top: 76px; }

  .nav {
    position: fixed;
    inset: 64px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px var(--pad) 20px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s var(--ease-snap), transform 0.22s var(--ease-snap), visibility 0.22s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__link {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    color: var(--fg-bright);
  }
  .nav__link::after { display: none; }
  .nav .btn { margin-top: 16px; }
  .nav__toggle { display: grid; }

  .form__row { grid-template-columns: 1fr; gap: 0; }
  .step { grid-template-columns: 1fr; gap: 6px; }
  .step__day { width: fit-content; }
  .metrics { gap: 10px; }
  .metric { flex-basis: calc(50% - 5px); }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .btn { width: 100%; }
  .hero__cta .btn { width: auto; }
}

@media (max-width: 420px) {
  .hero__cta .btn { width: 100%; }
  .bubble { max-width: 92%; }
}

/* ---------- Impresión y accesibilidad ---------- */
@media print {
  .header, .nav, .contact, .footer, .btn, .wa-float { display: none !important; }
  body { background: #fff; color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .bubble { opacity: 1; }
}

/* ---------- Banner de consentimiento (píxel de Meta) ---------- */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 32px);
  background: var(--surface-2);
  border-top: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
}
.consent-banner__texto {
  flex: 1 1 420px;
  font-size: 14.5px;
  color: var(--fg);
}
.consent-banner__texto a { color: var(--brand-bright); text-decoration: underline; }
.consent-banner__acciones {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
@media (max-width: 560px) {
  .consent-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .consent-banner__acciones { justify-content: center; }
}
