/*
  AhorraYa+ · estilos (propuesta 2)
  Concepto: una banda petróleo con el titular, la foto y un hilo de fibra; debajo, secciones claras y tranquilas.
  La pieza protagonista es la consulta guiada, que escribe el mensaje de WhatsApp mientras respondes.
  La página tiene un único aspecto claro a propósito: los PNG del logo están pensados para fondo claro.
*/

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta de marca del brief */
  --petrol: #10485C;
  --deep: #092F3D;
  --turq: #00B69E;
  --turq-2: #00A58F;
  --lime: #9ACD32;
  --lime-soft: #B5E15C;
  --paper: #FFFEFA;
  /* Derivados de la paleta */
  --mist: #ECF5F2;
  --mist-2: #DDEEE9;
  --line: #D2E2DE;
  --control: #6E8E8A;
  --ink: #0C3746;
  --muted: #46636B;
  --on-dark: #FFFEFA;
  --on-dark-muted: #B9D3D2;
  --bubble: #D8F2EC;
  --error: #B3261E;
  --focus: var(--deep);

  /* Tipografía: display con carácter para titulares, texto muy legible para todo lo demás */
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-text: "Figtree", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  --step-4: clamp(2.6rem, 1.4rem + 5.2vw, 5.4rem);

  /* Forma y profundidad */
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --shadow: 0 1px 0 rgba(9, 47, 61, .05), 0 30px 60px -34px rgba(9, 47, 61, .55);
  --header-h: 68px;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--deep);
  text-wrap: balance;
}
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.wrap {
  width: 100%;
  max-width: 1248px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--deep); color: var(--on-dark);
  padding: 12px 18px; border-radius: 12px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px;
  border: 0; border-radius: 999px;
  font: 700 var(--step-0)/1.1 var(--font-text); letter-spacing: .005em;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease;
}
.btn .icon { width: 1.3em; height: 1.3em; }
.btn-primary {
  background: var(--turq); color: var(--deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 12px 26px -14px rgba(0, 165, 143, .95);
}
.btn-primary:hover { background: #12C3AA; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent; color: var(--on-dark);
  box-shadow: inset 0 0 0 1.5px rgba(255, 254, 250, .45);
}
.btn-ghost:hover { background: rgba(255, 254, 250, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 254, 250, .75); }
.btn-outline {
  background: transparent; color: var(--petrol);
  box-shadow: inset 0 0 0 1.5px var(--petrol);
}
.btn-outline:hover { background: var(--mist); }
.btn-dark {
  background: var(--deep); color: var(--on-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 28px -16px rgba(9, 47, 61, .9);
}
.btn-dark:hover { background: var(--petrol); }
.btn-text {
  background: none; border: 0; padding: 12px 4px; cursor: pointer;
  font-weight: 700; color: var(--petrol);
  text-decoration: underline; text-decoration-color: var(--turq);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.btn-text:hover { text-decoration-color: var(--petrol); }
.link-wa {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--petrol);
  text-decoration: underline; text-decoration-color: var(--turq);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.link-wa:hover { text-decoration-color: var(--petrol); }
.status { min-height: 1.5em; font-size: var(--step--1); font-weight: 600; color: var(--petrol); }

/* ---------- Franja de vista previa ---------- */
.preview-strip { background: var(--lime-soft); color: var(--deep); }
.preview-strip p { padding-block: 8px; text-align: center; font-size: .875rem; font-weight: 600; line-height: 1.4; }

/* ---------- Cabecera ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 60;
  height: env(safe-area-inset-top, 0px); background: var(--paper);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255, 254, 250, .94);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 12px 30px -26px rgba(9, 47, 61, .7); }
.header-inner { display: flex; align-items: center; gap: 10px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; margin-right: auto; border-radius: 10px; }
.brand img { height: 44px; width: auto; }
.nav { display: none; }
.header-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 46px; min-height: 46px; padding: 0 12px; border-radius: 999px;
  background: var(--turq); color: var(--deep); text-decoration: none; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38);
}
.header-wa:hover { background: #12C3AA; }
.header-wa .icon { width: 1.35em; height: 1.35em; }
.header-wa-label { display: none; }
.menu-btn {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--deep); cursor: pointer;
}
.menu-btn .icon { width: 1.4em; height: 1.4em; }
.menu-btn .icon-close, .menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 959.98px) {
  .nav.is-open {
    display: flex; flex-direction: column;
    position: absolute; left: 0; right: 0; top: 100%;
    padding: 8px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px));
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 40px -30px rgba(9, 47, 61, .55);
  }
  .nav.is-open a {
    display: flex; align-items: center; min-height: 54px;
    font: 700 1.25rem/1.2 var(--font-display); color: var(--deep); text-decoration: none;
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open a:last-child { border-bottom: 0; }
}
@media (max-width: 360px) {
  .brand img { height: 34px; }
}
@media (min-width: 960px) {
  :root { --header-h: 82px; }
  .brand img { height: 50px; }
  .nav { display: flex; align-items: center; gap: 4px; margin-right: 12px; }
  .nav a {
    padding: 10px 14px; border-radius: 999px;
    font-weight: 600; color: var(--ink); text-decoration: none;
  }
  .nav a:hover { background: var(--mist); }
  .header-wa { padding: 0 20px 0 16px; }
  .header-wa-label { display: inline; }
  .menu-btn { display: none; }
}

/* ---------- Portada ---------- */
@property --glow { syntax: "<color>"; inherits: true; initial-value: rgba(0, 182, 158, .16); }
.hero {
  position: relative; z-index: 1; isolation: isolate;
  background: var(--deep); color: var(--on-dark);
  --focus: var(--lime-soft);
  --glow: rgba(0, 182, 158, .16);
  transition: --glow 1.2s ease;
}
.hero[data-slide="energia"] { --glow: rgba(154, 205, 50, .2); }
.hero[data-slide="seguros"] { --glow: rgba(90, 190, 215, .2); }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 75% at 88% 18%, rgba(16, 72, 92, .95), rgba(16, 72, 92, 0) 70%),
    radial-gradient(45% 55% at 0% 100%, var(--glow), transparent 70%);
}
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.fiber { fill: none; stroke: var(--turq); stroke-width: 1.5; opacity: .24; vector-effect: non-scaling-stroke; }
.fiber-soft { opacity: .12; }
.fiber-lime { stroke: var(--lime); opacity: .34; }
.pulse { fill: var(--lime-soft); }

.hero-grid { display: grid; gap: 40px; padding-block: 40px 44px; }
.hero-copy { min-width: 0; container-type: inline-size; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600; color: var(--on-dark-muted);
}
.hero-kicker::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--lime); }
.hero-title {
  margin-top: 18px;
  font-size: var(--step-4); line-height: .98; letter-spacing: -0.03em;
  color: var(--on-dark);
}
/* Cada frase del lema ocupa siempre una sola línea: el tamaño se ajusta al ancho de la columna */
@supports (font-size: 1cqi) {
  .hero-title { font-size: min(5.4rem, 11.4cqi); }
}
.hero-title .line { display: block; position: relative; white-space: nowrap; }
.hero-title .mark {
  display: inline-block; margin-right: .16em;
  color: var(--lime); font-weight: 700;
}
.hero-lead {
  max-width: 36ch;
  font-size: clamp(1.0625rem, .95rem + .6vw, 1.25rem); line-height: 1.5; color: var(--on-dark-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-points {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  font-size: var(--step--1); color: var(--on-dark-muted);
}
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .icon { color: var(--lime); width: 1.15em; height: 1.15em; stroke-width: 2.4; }

/* ---------- Presentación rotativa ----------
   El lema es fijo; la última línea, el texto, los botones, la etiqueta, el ejemplo y el encuadre
   de la foto cambian con cada servicio. Todo se apila en la misma celda para que nada salte. */
.hero-rotator { display: grid; margin-top: .16em; padding-left: .76em; }
.rot {
  grid-area: 1 / 1;
  font-size: .56em; line-height: 1.12; letter-spacing: -.02em; white-space: nowrap;
  color: var(--turq);
  opacity: 0; transform: translateY(.5em);
  transition: opacity .45s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}
.rot.is-active { opacity: 1; transform: none; transition-delay: .1s; }
.rot.is-leaving { opacity: 0; transform: translateY(-.5em); transition-delay: 0s; }

.hero-carousel { margin-top: 28px; }
.hero-controls { display: flex; align-items: stretch; gap: 8px; }
.hero-tabs {
  order: 1; flex: 1; min-width: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  padding: 5px; border-radius: 18px;
  background: rgba(255, 254, 250, .06);
  box-shadow: inset 0 0 0 1px rgba(255, 254, 250, .12);
}
.hero-tab {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 10px 4px;
  border: 0; border-radius: 13px;
  background: transparent; color: var(--on-dark-muted);
  font: 700 .9375rem/1.15 var(--font-text); cursor: pointer;
  transition: background-color .3s ease, color .3s ease;
}
.hero-tab:hover { color: var(--on-dark); }
.hero-tab .icon { width: 1.3em; height: 1.3em; transition: color .3s ease; }
.hero-tab.is-active { background: rgba(255, 254, 250, .12); color: var(--on-dark); }
.hero-tab.is-active .icon { color: var(--lime-soft); }
.tab-short { display: none; }
.tab-bar {
  position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px;
  border-radius: 3px; overflow: hidden;
  background: rgba(255, 254, 250, .16);
  opacity: 0; transition: opacity .3s ease;
}
.hero-tab.is-active .tab-bar { opacity: 1; }
.tab-bar span {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--turq), var(--lime));
  transform-origin: left center;
}
.hero.is-playing .hero-tab.is-active .tab-bar span { animation: tab-fill var(--slide-time, 7s) linear both; }
.hero.is-held .hero-tab.is-active .tab-bar span { animation-play-state: paused; }
@keyframes tab-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-pause {
  order: 2; flex: none;
  display: grid; place-items: center; width: 50px;
  border: 0; border-radius: 16px; cursor: pointer;
  background: rgba(255, 254, 250, .06);
  box-shadow: inset 0 0 0 1px rgba(255, 254, 250, .12);
  color: var(--on-dark);
}
.hero-pause:hover { background: rgba(255, 254, 250, .12); }
.hero-pause .icon { width: 1.25em; height: 1.25em; stroke-width: 2.4; }
.hero-pause .icon-play { display: none; }
.hero:not(.is-playing) .hero-pause .icon-pause { display: none; }
.hero:not(.is-playing) .hero-pause .icon-play { display: block; }

.hero-slides { display: grid; margin-top: 24px; }
.hero-slide {
  grid-area: 1 / 1; min-width: 0;
  visibility: hidden; opacity: 0; transform: translateY(10px);
  transition: opacity .35s ease, transform .45s ease, visibility 0s linear .45s;
}
.hero-slide.is-active {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .5s ease .15s, transform .6s cubic-bezier(.2, .7, .2, 1) .15s, visibility 0s;
}

.hero-figure { position: relative; margin: 0; min-width: 0; }
.hero-frame {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-lg);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.hero-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(9, 47, 61, .3), rgba(9, 47, 61, 0) 24%, rgba(9, 47, 61, 0) 72%, rgba(9, 47, 61, .28));
}
.hero-photo {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 26%;
  transform-origin: 50% 35%;
  transition: transform 1.6s cubic-bezier(.25, .6, .2, 1), transform-origin 1.6s cubic-bezier(.25, .6, .2, 1);
}
/* Cada servicio encuadra una parte de la misma foto: el router y el móvil, la luz de la ventana, la pareja */
.hero[data-slide="energia"] .hero-photo { transform: scale(1.38); transform-origin: 10% 20%; }
.hero[data-slide="seguros"] .hero-photo { transform: scale(1.24); transform-origin: 52% 28%; }

.hero-badges { position: absolute; top: 14px; left: 14px; display: grid; }
.hero-badge {
  grid-area: 1 / 1; justify-self: start;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: rgba(255, 254, 250, .95); color: var(--deep);
  font-weight: 700; font-size: .9375rem; white-space: nowrap;
  box-shadow: 0 12px 26px -14px rgba(9, 47, 61, .8);
  opacity: 0; transform: translateY(-8px);
  transition: opacity .35s ease, transform .45s ease;
}
.hero-badge.is-active { opacity: 1; transform: none; transition-delay: .3s; }
.badge-icon {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--deep); color: var(--lime-soft);
}
.badge-icon .icon { width: 18px; height: 18px; }

.hero-bubbles { position: absolute; left: 14px; right: 14px; bottom: -22px; display: grid; margin: 0; }
.example-bubble {
  grid-area: 1 / 1; align-self: end; justify-self: start;
  max-width: 330px;
  display: grid; gap: 4px;
  padding: 14px 16px 15px;
  background: var(--paper); color: var(--ink);
  border-radius: 20px 20px 20px 6px;
  box-shadow: 0 18px 36px -18px rgba(9, 47, 61, .7);
  opacity: 0; transform: translateY(12px);
  transition: opacity .35s ease, transform .45s ease;
}
.example-bubble.is-active { opacity: 1; transform: none; transition-delay: .4s; }
.example-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8125rem; font-weight: 700; color: var(--muted);
}
.example-label .icon { color: var(--turq-2); width: 1.15em; height: 1.15em; }
.example-text { font-size: .98rem; line-height: 1.45; font-weight: 500; }

@media (max-width: 520px) {
  .tab-long { display: none; }
  .tab-short { display: inline; }
  .hero-tab { flex-direction: column; gap: 3px; min-height: 58px; padding: 6px 4px 10px; font-size: .8125rem; }
  .hero-pause { width: 46px; }
}
@media (max-width: 479.98px) {
  .hero-actions .btn { flex: 1 1 100%; }
}
@media (min-width: 640px) {
  .hero-photo { aspect-ratio: 16 / 10; }
}
@media (min-width: 1000px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center; gap: 56px;
    padding-block: 64px 56px;
  }
  .hero-photo { aspect-ratio: 4 / 5; }
  .hero-figure { margin-bottom: -112px; }
  .hero-badges { top: 18px; left: 18px; }
  .hero-bubbles { left: -44px; right: auto; bottom: 44px; width: 300px; }
}
@media (min-width: 1400px) {
  .hero-title .mark { position: absolute; left: -.72em; margin-right: 0; }
  .hero-rotator { padding-left: 0; }
  @supports (font-size: 1cqi) {
    .hero-title { font-size: min(5.4rem, 12.6cqi); }
  }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(72px, 9vw, 120px); }
.section-head { display: grid; gap: 14px; max-width: 46rem; justify-items: start; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { font-size: clamp(1.0625rem, .95rem + .6vw, 1.25rem); line-height: 1.5; color: var(--muted); max-width: 52ch; }
.services { padding-top: clamp(80px, 9vw, 150px); }

/* ---------- Servicios ---------- */
.services-grid { display: grid; gap: 18px; margin-top: 44px; }
.service {
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-lg);
  min-width: 0;
}
.service h3 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); }
.service-desc { color: var(--muted); max-width: 46ch; }
.service { background: var(--paper); border: 1.5px solid var(--line); }
.service--main { box-shadow: var(--shadow); }
.service-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.service-icon {
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 16px;
  background: var(--mist); color: var(--petrol);
}
.service-icon .icon { width: 28px; height: 28px; }
.service-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: auto; padding-top: 8px; }
.btn-sm { min-height: 46px; padding: 0 20px; font-size: 1rem; }

.pack-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.pack-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--r-sm);
  background: var(--mist); color: var(--ink); text-decoration: none;
  transition: background-color .15s ease;
}
.pack-row:hover { background: var(--mist-2); }
.pack-icons { display: flex; justify-content: center; gap: 2px; width: 52px; color: var(--petrol); }
.pack-icons .icon { width: 24px; height: 24px; }
.pack-text { display: grid; gap: 1px; min-width: 0; }
.pack-text strong { font: 700 1.125rem/1.25 var(--font-display); color: var(--deep); }
.pack-text span { font-size: var(--step--1); line-height: 1.4; color: var(--muted); }
.pack-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--petrol); }
.pack-go-label { display: none; }

@media (min-width: 560px) {
  .pack-go-label { display: inline; }
}
@media (min-width: 720px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service--main { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .service--main {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 56px; row-gap: 14px; align-items: start;
  }
  .service--main > .service-top { grid-column: 1; grid-row: 1; }
  .service--main > h3 { grid-column: 1; grid-row: 2; font-size: 2.4rem; }
  .service--main > .service-desc { grid-column: 1; grid-row: 3; }
  .service--main > .pack-list { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
}

/* ---------- Cómo funciona ---------- */
.how { background: var(--mist); }
.steps { position: relative; list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 30px; }
.steps::before {
  content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px;
  background: linear-gradient(var(--turq), var(--lime));
}
.step { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 18px; row-gap: 6px; }
.step-num {
  grid-row: 1 / span 2;
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--paper); color: var(--deep);
  font: 800 1.5rem/1 var(--font-display);
  box-shadow: inset 0 0 0 2px var(--turq);
}
.step h3 { align-self: end; font-size: var(--step-2); }
.step p { color: var(--muted); max-width: 34ch; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .steps::before {
    left: 28px; right: calc((100% - 64px) / 3 - 28px);
    top: 27px; bottom: auto; width: auto; height: 2px;
    background: linear-gradient(90deg, var(--turq), var(--lime));
  }
  .step { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .step-num { grid-row: auto; margin-bottom: 10px; }
  .step h3 { align-self: start; }
}

/* ---------- Consulta guiada ---------- */
.consult-card {
  display: grid; margin-top: 44px; scroll-margin-top: calc(var(--header-h) + 12px);
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--shadow);
}
.consult-main { display: grid; gap: 26px; align-content: start; padding: clamp(22px, 4vw, 44px); min-width: 0; }

.progress { display: grid; gap: 12px; }
.progress-label { font-weight: 700; color: var(--petrol); font-size: var(--step--1); }
.progress-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.progress-steps li { display: grid; gap: 8px; font-size: .8125rem; line-height: 1.3; color: var(--muted); }
.progress-steps li::before { content: ""; height: 5px; border-radius: 5px; background: var(--line); transition: background-color .25s ease; }
.progress-steps li.is-done::before, .progress-steps li.is-current::before { background: var(--turq); }
.progress-steps li.is-current { color: var(--deep); font-weight: 700; }

.q-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-title {
  padding: 0; margin: 0 0 18px;
  font: 800 clamp(1.55rem, 1.25rem + 1.2vw, 2.1rem)/1.1 var(--font-display);
  letter-spacing: -0.015em; color: var(--deep);
}
/* Los títulos reciben el foco por código para guiar a los lectores de pantalla; no son controles */
.q-title:focus { outline: none; }

.options { display: grid; gap: 10px; }
.option { position: relative; display: block; cursor: pointer; }
.option input, .chip input, .check input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.option-card {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) 24px; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 16px;
  border: 1.5px solid var(--line); background: var(--paper);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.option:hover .option-card { border-color: var(--control); }
.option-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  background: var(--mist); color: var(--petrol);
  transition: background-color .15s ease, color .15s ease;
}
.option-icon .icon { width: 24px; height: 24px; }
.option-text { display: grid; gap: 2px; min-width: 0; }
.option-text strong { font: 700 1.125rem/1.25 var(--font-display); color: var(--deep); }
.option-text small { font-size: var(--step--1); line-height: 1.4; color: var(--muted); }
.option-mark { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--control); transition: box-shadow .15s ease; }
.option input:checked + .option-card { border-color: var(--petrol); background: var(--mist); box-shadow: 0 0 0 1px var(--petrol); }
.option input:checked + .option-card .option-icon { background: var(--petrol); color: var(--paper); }
.option input:checked + .option-card .option-mark { box-shadow: inset 0 0 0 7px var(--petrol); }
.option input:focus-visible + .option-card { outline: 3px solid var(--focus); outline-offset: 3px; }

.sub-q { border: 0; margin: 24px 0 0; padding: 0; min-width: 0; }
.sub-title { padding: 0; margin: 0 0 10px; font-weight: 700; color: var(--deep); }
.opt { font-weight: 500; font-size: .875rem; color: var(--muted); margin-left: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; min-width: 52px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--control); background: var(--paper);
  font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover span { background: var(--mist); }
.chip input:checked + span { background: var(--petrol); border-color: var(--petrol); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }

.check {
  position: relative; display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding: 14px 16px; border-radius: 16px;
  background: var(--mist); cursor: pointer; font-weight: 600; color: var(--deep);
}
.check-box {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--paper); box-shadow: inset 0 0 0 2px var(--control); color: var(--paper);
}
.check-box .icon { width: 18px; height: 18px; stroke-width: 3; opacity: 0; }
.check input:checked + .check-box { background: var(--petrol); box-shadow: none; }
.check input:checked + .check-box .icon { opacity: 1; }
.check input:focus-visible + .check-box { outline: 3px solid var(--focus); outline-offset: 3px; }

.field { display: grid; gap: 8px; }
.field + .field { margin-top: 22px; }
.field label { font-weight: 700; color: var(--deep); }
.input {
  width: 100%; min-height: 54px; padding: 12px 16px;
  border-radius: var(--r-sm); border: 1.5px solid var(--control);
  background: var(--paper); color: var(--ink); font-size: 1.125rem;
}
.input::placeholder { color: #7D9894; opacity: 1; }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--petrol); }
.input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.input-cp { max-width: 11rem; font-size: 1.5rem; font-weight: 600; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
textarea.input { min-height: 88px; resize: vertical; line-height: 1.45; }
.hint { font-size: var(--step--1); line-height: 1.45; color: var(--muted); }
.error { font-size: var(--step--1); line-height: 1.45; font-weight: 700; color: var(--error); }

.q-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
#q-next { margin-left: auto; }
#q-next .icon { width: 1.1em; height: 1.1em; stroke-width: 2.4; }
@media (max-width: 479.98px) {
  #q-next { flex: 1 1 auto; }
}

.result { display: grid; gap: 16px; justify-items: start; }
.result h3 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); }
.result h3:focus { outline: none; }
.result-lead { color: var(--muted); }
.summary {
  justify-self: stretch;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px;
  margin: 0; padding: 16px 18px; border-radius: 16px; background: var(--mist);
}
.summary dt { color: var(--muted); font-size: var(--step--1); }
.summary dd { margin: 0; font-weight: 700; color: var(--deep); overflow-wrap: anywhere; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 479.98px) {
  .result-actions { justify-self: stretch; }
  .result-actions .btn { flex: 1 1 100%; }
}

.consult-preview {
  display: flex; flex-direction: column; gap: 20px;
  padding: clamp(22px, 4vw, 40px);
  background: var(--deep); color: var(--on-dark);
  --focus: var(--lime-soft);
}
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 254, 250, .14); }
.chat-avatar { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--paper); overflow: hidden; }
.chat-avatar img { width: 40px; height: 40px; }
.chat-to { font: 700 1.125rem/1.2 var(--font-display); }
.chat-via { font-size: .875rem; color: var(--on-dark-muted); }
.chat-body { flex: 1; display: grid; gap: 10px; align-content: start; justify-items: end; }
.chat-label { justify-self: start; font-size: .875rem; color: var(--on-dark-muted); }
.chat-bubble {
  max-width: 36ch;
  padding: 16px 18px;
  border-radius: 20px 6px 20px 20px;
  background: var(--bubble); color: var(--deep);
  font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere;
  box-shadow: 0 16px 30px -20px rgba(0, 0, 0, .7);
}
.chat-bubble.is-updated { animation: bubble-pulse .45s ease; }
.chat-bubble.is-ready { box-shadow: 0 0 0 2px var(--lime-soft), 0 16px 30px -20px rgba(0, 0, 0, .7); }
@keyframes bubble-pulse {
  0% { background: #F1FCF9; }
  100% { background: var(--bubble); }
}
.slot {
  display: inline-block; padding: 0 7px; border-radius: 7px;
  border: 1.5px dashed var(--petrol); color: var(--petrol);
  font-weight: 700; line-height: 1.35;
}
.chat-ready { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--lime-soft); font-size: var(--step--1); }
.chat-ready .icon { stroke-width: 2.6; }
.chat-foot { padding-top: 18px; border-top: 1px solid rgba(255, 254, 250, .14); font-size: .875rem; color: var(--on-dark-muted); }

@media (min-width: 960px) {
  .consult-card { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}

/* ---------- Preguntas frecuentes ---------- */
.faq-grid { display: grid; gap: 36px; }
.faq-head .link-wa { margin-top: 6px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 22px 2px; cursor: pointer; list-style: none;
  font: 700 clamp(1.125rem, 1rem + .4vw, 1.3rem)/1.3 var(--font-display); color: var(--deep);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover .faq-icon { background: var(--mist-2); }
.faq-icon { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--mist); transition: background-color .2s ease, transform .25s ease; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 14px; height: 2px; margin: -1px 0 0 -7px; border-radius: 2px; background: var(--petrol);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon { transform: rotate(45deg); background: var(--petrol); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: var(--paper); }
.faq-body { padding: 0 2px 24px; }
.faq-body p { color: var(--muted); max-width: 60ch; }
@media (min-width: 960px) {
  .faq-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 72px; align-items: start; }
  .faq-head { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* ---------- Contacto ---------- */
.contact { background: var(--turq); color: var(--deep); --focus: var(--deep); }
.contact-inner { display: grid; gap: 28px; align-items: center; padding-block: clamp(60px, 7vw, 100px); }
.contact h2 { font-size: clamp(2.6rem, 1.6rem + 3.8vw, 4.5rem); }
.contact-copy p { margin-top: 14px; max-width: 34ch; font-size: var(--step-1); line-height: 1.5; font-weight: 500; }
.contact-actions { display: grid; gap: 14px; justify-items: start; }
.contact .status { color: var(--deep); }
.phone-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.phone { font: 800 1.375rem/1.2 var(--font-display); letter-spacing: .01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn-mini {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--deep); background: transparent; color: var(--deep);
  font-weight: 700; font-size: .9375rem; cursor: pointer;
}
.btn-mini:hover { background: rgba(9, 47, 61, .08); }
@media (max-width: 479.98px) {
  .contact-actions { justify-items: stretch; }
}
@media (min-width: 900px) {
  .contact-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .contact-actions { justify-self: end; }
}

/* ---------- Pie ---------- */
.site-footer { padding-block: 56px 28px; background: var(--paper); }
.footer-grid { display: grid; gap: 32px; }
.footer-brand .brand { margin-right: 0; }
.footer-brand img { height: 52px; width: auto; }
.footer-brand p { margin-top: 10px; color: var(--muted); }
.footer-title { margin-bottom: 12px; font: 700 1rem/1.3 var(--font-text); letter-spacing: 0; color: var(--deep); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a, .footer-col button {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ink); text-decoration: none; font: inherit;
}
.footer-col a:hover, .footer-col button:hover { text-decoration: underline; text-decoration-color: var(--turq); text-underline-offset: 4px; }
.footer-note { margin-top: 28px; max-width: 75ch; font-size: .875rem; line-height: 1.55; color: var(--muted); }
.footer-owner { color: var(--muted); font-size: var(--step--1); line-height: 1.6; }
.footer-owner a { color: var(--petrol); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: .875rem; color: var(--muted);
}
.legal-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.legal-links a { color: var(--muted); }
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; z-index: 40;
  right: calc(env(safe-area-inset-right, 0px) + 16px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 58px; height: 58px; border-radius: 999px;
  background: var(--turq); color: var(--deep); text-decoration: none; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 16px 30px -12px rgba(9, 47, 61, .6);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.wa-float .icon { width: 1.6em; height: 1.6em; }
.wa-float-label { display: none; }
.wa-float:hover { background: #12C3AA; }
.wa-float.is-hidden { opacity: 0; visibility: hidden; transform: translateY(14px); pointer-events: none; }
@media (min-width: 720px) {
  .wa-float { width: auto; padding: 0 22px 0 18px; }
  .wa-float-label { display: inline; }
}

/* ---------- Ventana de privacidad ---------- */
.dialog {
  width: min(36rem, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: var(--r-lg);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(9, 47, 61, .7);
}
.dialog::backdrop { background: rgba(9, 47, 61, .58); }
.dialog-inner { position: relative; display: grid; gap: 14px; padding: 30px 26px 28px; }
.dialog h2 { padding-right: 52px; font-size: 1.75rem; }
.dialog p { color: var(--muted); }
.dialog a { color: var(--petrol); font-weight: 700; text-decoration-color: var(--turq); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.dialog-close {
  position: absolute; top: 16px; right: 16px;
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--mist); color: var(--deep); cursor: pointer;
}
.dialog-close:hover { background: var(--mist-2); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .pulse { display: none; }
  /* La barra de progreso marca el tiempo de cada diapositiva si la persona activa la reproducción */
  .hero.is-playing .hero-tab.is-active .tab-bar span { animation-duration: var(--slide-time, 7s) !important; }
  .hero-photo { transform: none !important; }
}
