/* American Energy · Landing generadores */

:root {
  --red: #d3121a;
  --red-dark: #a90d14;
  --blue: #1d3f97;
  --navy: #0b1733;
  --navy-2: #13224a;
  --ink: #161a22;
  --text: #3b4250;
  --muted: #6b7280;
  --line: #dde1e8;
  --steel: #eef1f5;
  --white: #fff;
  --wa: #1ea952;
  --radius: 4px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
/* Evita que algo fuera de pantalla ensanche la página en móvil (clip no rompe el header sticky) */
body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.02;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .2px;
}
h2 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; }
h3 { font-size: 1.5rem; font-weight: 700; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 860px; }

.kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before { content: ""; width: 26px; height: 3px; background: var(--red); }
.kicker--dark { color: var(--red); }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 16px 28px; font-size: 1.25rem; }
.btn--block { width: 100%; }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 3px 0 var(--red-dark); }
.btn--red:hover { background: var(--red-dark); }
.btn--wa { background: var(--wa); color: #fff; box-shadow: 0 3px 0 #15843f; }
.btn--wa:hover { background: #18913f; }
.btn--line { border-color: var(--line); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); }
.btn--line svg { fill: var(--red); }
.btn--line-wa svg { fill: var(--wa); width: 22px; height: 22px; }
.btn--line-wa:hover { border-color: var(--wa); }
.btn--white svg { fill: var(--wa); }
.btn--white { background: #fff; color: var(--red); }
.btn--white:hover { background: var(--steel); }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: #000; }

/* Topbar + header */
.topbar { background: var(--navy); color: #c9d1e4; font-size: .88rem; }
.topbar__in { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { text-decoration: none; color: #fff; }
.topbar strong { color: #fff; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header__in { display: flex; align-items: center; gap: 28px; height: 76px; }
.header__logo img { width: 210px; height: auto; }
.header__nav { display: flex; gap: 26px; margin-left: auto; }
.header__nav a {
  text-decoration: none; font-weight: 600; font-size: .98rem; color: var(--ink);
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.header__nav a:hover { border-color: var(--red); }
.header__cta { display: flex; gap: 10px; }

/* Hero */
.hero {
  position: relative;
  background: var(--navy) url("../img/hero-noche.jpg") center right / cover no-repeat;
  color: #dfe5f2;
  padding: 64px 0 72px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,15,35,.94) 0%, rgba(8,15,35,.82) 45%, rgba(8,15,35,.45) 100%);
}
.hero__in {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 800;
  margin-bottom: 20px;
}
.hero h1 span {
  color: #fff;
  background: linear-gradient(var(--red), var(--red)) left bottom / 100% .18em no-repeat;
}
.hero__lead { font-size: 1.15rem; max-width: 560px; margin: 0 0 22px; }
.hero__lead strong { color: #fff; }
.hero__list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 10px; }
.hero__list li { position: relative; padding-left: 32px; color: #fff; font-weight: 500; }
.hero__list li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 20px; height: 20px; background: var(--red);
  clip-path: polygon(0 52%, 14% 38%, 38% 62%, 86% 12%, 100% 26%, 38% 90%);
}
.hero__btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* Formulario */
.form-card {
  background: #fff;
  border-radius: var(--radius);
  border-top: 6px solid var(--red);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  color: var(--text);
  scroll-margin-top: 90px;
}
.form-card__head { padding: 24px 26px 4px; }
.form-card__head h2 { font-size: 2rem; }
.form-card__head p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.form { padding: 14px 26px 24px; display: grid; gap: 12px; }
.field { display: grid; gap: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: 11px 12px;
  border: 1.5px solid #cdd3dd;
  border-radius: var(--radius);
  background: #fbfcfd;
  transition: border-color .15s, background .15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px rgba(29,63,151,.15);
}
.field.is-invalid input, .field.is-invalid select { border-color: var(--red); background: #fff6f6; }
.form .btn { margin-top: 4px; }
.form__legal { margin: 0; font-size: .78rem; color: var(--muted); text-align: center; }
.form-alert {
  margin: 12px 26px 0; padding: 10px 12px;
  background: #fff1f1; border-left: 4px solid var(--red);
  font-size: .9rem; color: var(--ink);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Specs */
.specs { background: var(--red); color: #fff; }
.specs__in { display: grid; grid-template-columns: repeat(4, 1fr); }
.spec { padding: 22px 20px; border-left: 1px solid rgba(255,255,255,.25); display: flex; align-items: baseline; gap: 12px; }
.spec:first-child { border-left: 0; padding-left: 0; }
.spec strong { font-family: var(--display); font-size: 2.6rem; font-weight: 800; line-height: 1; }
.spec span { font-size: .95rem; line-height: 1.2; font-weight: 500; }

/* Secciones */
.section { padding: 88px 0; }
.section--steel { background: var(--steel); }
.section--navy { background: var(--navy); color: #c9d1e4; }
.section--navy h2 { color: #fff; }
.section__head { max-width: 680px; margin-bottom: 44px; }
.section__head p:not(.kicker) { margin: 14px 0 0; font-size: 1.08rem; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.link-arrow { color: var(--blue); font-weight: 700; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* Cards de equipos */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  background: #fff;
}
.card--featured { border: 2px solid var(--blue); }
.card__img { aspect-ratio: 4 / 3; background: var(--steel); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__img--light { background: #fff; border-bottom: 1px solid var(--line); }
.card__img--light img { object-fit: contain; padding: 14px; }
.card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card__tag { margin: 0 0 6px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; color: var(--red); }
.card__kw { margin: 6px 0 14px; font-weight: 600; color: var(--blue); }
.card ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 7px; font-size: .97rem; }
.card li { padding-left: 18px; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 3px; background: var(--red); }
.card__price { margin: auto 0 14px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .95rem; }
.card__price strong { font-family: var(--display); font-size: 1.6rem; color: var(--ink); }

/* Tabla de modelos */
.models { margin-top: 48px; border: 1px solid var(--line); border-radius: var(--radius); }
.models__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; padding: 18px 22px; background: var(--steel); border-bottom: 1px solid var(--line); }
.models__head span { font-size: .9rem; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { padding: 13px 22px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-family: var(--display); text-transform: uppercase; letter-spacing: 1px; font-size: .95rem; color: var(--muted); font-weight: 700; }
td:first-child { font-weight: 700; color: var(--ink); }
td:nth-child(n+3) { font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #fafbfc; }
.models__note { margin: 0; padding: 16px 22px; font-weight: 600; }
.models__note a { color: var(--red); }

/* Contraste noche */
.contrast { display: grid; grid-template-columns: 1fr 1fr; background: var(--navy); color: #c9d1e4; }
.contrast__img img { width: 100%; height: 100%; max-height: 640px; object-fit: cover; object-position: center 40%; min-height: 420px; }

/* Comparador antes / después */
.compare { position: relative; user-select: none; overflow: hidden; contain: paint; }
.compare img { display: block; object-position: 72% center; }
.compare .compare__antes { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px;
  background: #fff; transform: translateX(-50%); pointer-events: none;
  box-shadow: 0 0 12px rgba(0,0,0,.4);
}
.compare__handle::after {
  content: "\2039\00a0\203A"; position: absolute; top: 50%; left: 50%;
  width: 46px; height: 46px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--red); color: #fff; font: 700 1.5rem/1 var(--display);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.compare__tag {
  position: absolute; top: 16px; z-index: 1; pointer-events: none;
  padding: 6px 12px; border-radius: 999px;
  font: 700 .82rem var(--display); letter-spacing: 1px; text-transform: uppercase; color: #fff;
}
.compare__tag--antes   { left: 16px; background: rgba(11,23,51,.8); }
.compare__tag--despues { right: 16px; background: var(--red); }
.compare__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; touch-action: pan-y;
}
.compare:has(.compare__range:focus-visible) .compare__handle { background: #ffd34d; }
.contrast__copy { padding: 72px 56px; align-self: center; max-width: 620px; }
.contrast__copy h2 { color: #fff; margin-bottom: 18px; }
.contrast__copy p:not(.kicker) { margin: 0 0 28px; font-size: 1.08rem; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 3px solid var(--ink); }
.steps li { padding: 26px 24px 8px 0; border-right: 1px solid #cfd5df; }
.steps li + li { padding-left: 24px; }
.steps li:last-child { border-right: 0; }
.steps__n { font-family: var(--display); font-weight: 800; font-size: 3.2rem; color: var(--red); line-height: 1; display: block; margin-bottom: 12px; }
.steps h3 { margin-bottom: 8px; }
.steps p { margin: 0; font-size: .98rem; }

/* Galería */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery figure { margin: 0; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); background: var(--steel); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.04); }

/* Reels de Instagram */
.gallery.reels { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.reels figure img { width: 100%; height: 100%; object-fit: cover; }
.reels figure { aspect-ratio: 9 / 16; position: relative; background: var(--navy); border-radius: 8px; }
/* El embed de Instagram pone el video 9:16 dentro de un cuadro 4:5 con franjas negras.
   Se agranda el iframe y se recorta para mostrar solo el video. */
.reels iframe {
  position: absolute;
  top: -56px;          /* oculta la cabecera del embed */
  left: -22%;          /* oculta la franja negra izquierda */
  width: 144%;         /* 16/9 ÷ 1.25, con margen para no dejar bordes */
  height: 1400px;
  border: 0;
}
.reels figure.is-video { cursor: pointer; }
.reels video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel__sound {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 0; border-radius: 999px;
  background: rgba(11,23,51,.82); color: #fff;
  font: 600 .9rem var(--body); white-space: nowrap; cursor: pointer;
  pointer-events: none;
}
.reel__sound svg { width: 18px; height: 18px; fill: currentColor; }
.reels figure.is-sound .reel__sound { display: none; }
.reels figure.is-paused::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(11,23,51,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 30px no-repeat;
}
.reels__cta { margin-top: 32px; text-align: center; }

/* Reseñas */
.reviews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.reviews blockquote {
  margin: 0; padding: 22px;
  background: var(--navy-2);
  border-left: 3px solid var(--red);
  display: flex; flex-direction: column;
}
.stars { color: #f5b301; letter-spacing: 2px; margin-bottom: 10px; }
.reviews p { margin: 0 0 16px; color: #fff; font-size: 1.02rem; }
.reviews cite { margin-top: auto; font-style: normal; font-size: .88rem; color: #9aa6c2; }

.certs {
  margin-top: 52px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; flex-wrap: wrap; gap: 28px;
}
.certs span { font-family: var(--display); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; color: #fff; margin-right: auto; }
.certs img { height: 52px; width: auto; background: #fff; padding: 6px 10px; border-radius: var(--radius); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 20px 40px 20px 0; position: relative;
  font-weight: 700; font-size: 1.08rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-size: 1.8rem; color: var(--red); line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 22px; max-width: 720px; }

/* CTA final */
.cta-band { background: var(--red); color: #fff; padding: 52px 0; }
.cta-band__in { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; }
.cta-band p { margin: 6px 0 0; font-size: 1.1rem; }
.cta-band__btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.footer { background: #fff; color: var(--muted); padding: 40px 0 36px; font-size: .92rem; border-top: 1px solid var(--line); }
.footer__in { display: grid; grid-template-columns: auto 1fr; gap: 18px 40px; align-items: center; }
.footer__logo { padding: 8px 0; width: 200px; height: auto; }
.footer__contact { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: flex-end; }
.footer__contact a { color: var(--ink); text-decoration: none; font-weight: 600; }
.footer__contact a:hover { color: var(--red); }
.footer__legal { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); }
.footer__legal a { color: var(--muted); }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.wa-float:hover { background: #18913f; }

/* Barra móvil */
.mobile-bar { display: none; }

/* Página de gracias / legal */
.simple { min-height: 70vh; padding: 80px 0; }
.simple h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 16px; }
.simple .lead { font-size: 1.15rem; max-width: 620px; }
.simple__btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.legal h2 { font-size: 1.6rem; margin: 32px 0 10px; }

/* Responsive */
@media (max-width: 1080px) {
  .header__nav { display: none; }
  .header__cta { margin-left: auto; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .hero { padding: 40px 0 48px; background-position: 70% center; }
  .hero::before { background: rgba(8,15,35,.8); }
  .hero__in { grid-template-columns: 1fr; gap: 36px; }
  .specs__in { grid-template-columns: repeat(2, 1fr); }
  .spec { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.25); }
  .spec:nth-child(-n+2) { border-top: 0; }
  .cards { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .contrast { grid-template-columns: 1fr; }
  .contrast__img img { min-height: 260px; max-height: 340px; }
  .contrast__copy { padding: 48px 20px; }
  .steps { grid-template-columns: 1fr 1fr; border-top: 0; }
  .steps li, .steps li + li { padding: 22px 18px 22px 0; border-right: 0; border-top: 3px solid var(--ink); }
  .steps li:nth-child(even) { padding-left: 18px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  /* Reels en carrusel horizontal */
  .gallery.reels {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -20px; padding: 0 20px 8px; scrollbar-width: none;
  }
  .gallery.reels::-webkit-scrollbar { display: none; }
  .reels figure { flex: 0 0 62%; max-width: 300px; scroll-snap-align: center; }
  .section { padding: 64px 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 64px; }
  .wrap { padding: 0 16px; }
  .topbar span { display: none; }
  .topbar__in { justify-content: center; }
  .header__in { height: 64px; }
  .header__logo img { width: 170px; }
  .header__cta .btn--line { display: none; }
  .header__cta .btn { padding: 10px 14px; font-size: 1rem; }
  .hero__btns .btn { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  .form-card__head, .form { padding-left: 18px; padding-right: 18px; }
  .spec { flex-direction: column; gap: 4px; padding: 16px 0; }
  .spec strong { font-size: 2.1rem; }
  .steps { grid-template-columns: 1fr; }
  .steps li:nth-child(even) { padding-left: 0; }
  .section__head--row { flex-direction: column; align-items: flex-start; }
  .reviews { grid-template-columns: 1fr; }
  .gallery.reels { margin: 0 -16px; padding: 0 16px 8px; }
  .reels figure { flex-basis: 70%; }
  .certs span { width: 100%; }
  .cta-band__btns, .cta-band__btns .btn { width: 100%; }
  .footer__in { grid-template-columns: 1fr; }
  .footer__contact { justify-content: flex-start; flex-direction: column; }
  th, td { padding: 12px 14px; }

  .wa-float { display: none; }
  .mobile-bar {
    transform: translateZ(0); /* capa propia: no parpadea ni se mueve con animaciones de la página */
    display: grid; grid-template-columns: 1.3fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -4px 14px rgba(0,0,0,.08);
  }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 60px; text-decoration: none;
    font-family: var(--display); font-weight: 700; font-size: 1.1rem; text-transform: uppercase;
    color: var(--ink);
  }
  .mobile-bar svg { width: 20px; height: 20px; fill: var(--red); }
  .mobile-bar__wa { background: var(--wa); color: #fff !important; }
  .mobile-bar__wa svg { fill: #fff; width: 22px; height: 22px; }
  .mobile-bar__red { background: var(--red); color: #fff !important; }
}

/* ==========================================================
   Animaciones
   Regla: nada que tape o retrase el formulario o los botones.
   El contenido solo se oculta si JS agregó .reveal (sin JS se ve todo).
   ========================================================== */

/* Hero: la luz "se enciende" (solo el fondo; el texto se ve desde el inicio) */
.hero__in { z-index: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: #050a18;
  animation: luz-enciende 1.4s ease-out .15s both;
}
@keyframes luz-enciende {
  0%   { opacity: .85; }
  18%  { opacity: .35; }
  26%  { opacity: .75; }
  40%  { opacity: .15; }
  48%  { opacity: .45; }
  100% { opacity: 0; }
}

/* Entrada escalonada del texto del hero */
.hero__copy > * { animation: sube .6s cubic-bezier(.2,.7,.2,1) both; }
.hero__copy > .kicker     { animation-delay: .05s; }
.hero__copy > h1          { animation-name: sube-sin-fade; animation-delay: 0s; }
.hero__copy > .hero__lead { animation-delay: .15s; }
.hero__copy > .hero__list { animation-delay: .22s; }
.hero__copy > .hero__btns { animation-delay: .3s; }
.hero h1 span { animation: subraya .7s cubic-bezier(.6,0,.2,1) .45s both; }
.form-card { animation: sube .6s cubic-bezier(.2,.7,.2,1) .1s both; }

@keyframes sube {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes sube-sin-fade {
  from { transform: translateY(14px); }
  to   { transform: none; }
}
@keyframes subraya {
  from { background-size: 0 .18em; }
  to   { background-size: 100% .18em; }
}

/* Brillo que cruza los botones principales cada pocos segundos */
.btn--shine, .mobile-bar__red { position: relative; overflow: hidden; isolation: isolate; }
.btn--shine::after, .mobile-bar__red::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  animation: brillo 4.5s ease-in-out 1.6s infinite;
}
@keyframes brillo {
  0%, 70% { left: -60%; }
  100%    { left: 130%; }
}
.btn--red, .btn--wa { transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s; }
.btn--red:hover, .btn--wa:hover { transform: translateY(-2px); }
.btn--red:hover { box-shadow: 0 5px 0 var(--red-dark), 0 10px 22px rgba(211,18,26,.3); }
.btn--wa:hover  { box-shadow: 0 5px 0 #15843f, 0 10px 22px rgba(30,169,82,.3); }

/* WhatsApp flotante: pulso suave */
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--wa);
  animation: pulso 2.4s ease-out 2s infinite;
}
@keyframes pulso {
  from { transform: scale(1);   opacity: .8; }
  to   { transform: scale(1.7); opacity: 0; }
}
.wa-float { transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); }

/* Header con sombra al hacer scroll */
.header { transition: box-shadow .2s; }
.header.is-scrolled { box-shadow: 0 6px 20px rgba(11,23,51,.08); }

/* Cards: se elevan al pasar el mouse */
.card { transition: transform .25s, box-shadow .25s, border-color .25s; }
.card__img img { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) {
  .card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(11,23,51,.12); }
  .card:hover .card__img img { transform: scale(1.05); }
  .reviews blockquote { transition: transform .25s, background .25s; }
  .reviews blockquote:hover { transform: translateY(-4px); background: #1a2a52; }
}

/* Aparición al hacer scroll (JS agrega .reveal y luego .is-in) */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }


/* Pasos: la línea superior se dibuja y los números aparecen en cascada */
.steps { position: relative; }
.steps.reveal { opacity: 1; transform: none; border-top-color: transparent; }
.steps.reveal::before {
  content: ""; position: absolute; left: 0; top: -3px; height: 3px; width: 100%;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform 1s cubic-bezier(.6,0,.2,1);
}
.steps.reveal.is-in::before { transform: scaleX(1); }
.steps.reveal li { opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .5s; }
.steps.reveal.is-in li { opacity: 1; transform: none; }
.steps.reveal.is-in li:nth-child(2) { transition-delay: .15s; }
.steps.reveal.is-in li:nth-child(3) { transition-delay: .3s; }
.steps.reveal.is-in li:nth-child(4) { transition-delay: .45s; }

/* Estrellas de reseñas: se encienden una por una */
.stars span { display: inline-block; }
.reveal.is-in .stars span { animation: estrella .4s cubic-bezier(.3,1.6,.5,1) both; }
.reveal.is-in .stars span:nth-child(2) { animation-delay: .07s; }
.reveal.is-in .stars span:nth-child(3) { animation-delay: .14s; }
.reveal.is-in .stars span:nth-child(4) { animation-delay: .21s; }
.reveal.is-in .stars span:nth-child(5) { animation-delay: .28s; }
@keyframes estrella {
  from { opacity: 0; transform: scale(.3) rotate(-30deg); }
  to   { opacity: 1; transform: none; }
}

/* FAQ: la respuesta se desliza al abrir */
.faq details[open] p { animation: sube .35s ease-out both; }
.faq summary::after { transition: transform .2s; }
.faq summary:hover { color: var(--red); }

/* Movimiento reducido: respetamos la preferencia del sistema */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

@media (max-width: 920px) {
  /* En móvil cada paso ya tiene su propia línea superior */
  .steps.reveal::before { display: none; }
}

/* ==========================================================
   Tormenta en el hero: relámpagos + lluvia
   Capa decorativa entre la foto y el texto; no recibe clics.
   ========================================================== */
.hero { overflow: hidden; }
.hero__fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* Lluvia: mosaico de gotas inclinadas que se desplaza con transform (GPU) */
.lluvia {
  position: absolute; left: -20%; top: -60%; width: 140%; height: 220%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' stroke='%23cfdcff' stroke-linecap='round'%3E%3Cpath d='M20 4 l-6 24' stroke-width='1.2'/%3E%3Cpath d='M70 40 l-5 20' stroke-width='1'/%3E%3Cpath d='M104 10 l-6 24' stroke-width='1.2'/%3E%3Cpath d='M44 74 l-5 20' stroke-width='1'/%3E%3Cpath d='M92 86 l-6 24' stroke-width='1.2'/%3E%3Cpath d='M8 64 l-4 16' stroke-width='.8'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  will-change: transform;
}
.lluvia--cerca { opacity: .32; animation: llueve 2.8s linear infinite; }
.lluvia--lejos { opacity: .18; background-size: 80px 80px; animation: llueve-lejos 4.4s linear infinite; }
@keyframes llueve      { from { transform: translate(0, 0); } to { transform: translate(-120px, 480px); } }
@keyframes llueve-lejos { from { transform: translate(0, 0); } to { transform: translate(-80px, 320px); } }

/* Destello del relámpago: ilumina el cielo y un poco toda la escena */
.relampago {
  position: absolute; inset: 0; opacity: 0;
  background:
    radial-gradient(ellipse 75% 60% at 55% 0%, rgba(205,220,255,.9), rgba(205,220,255,0) 70%),
    rgba(190,205,255,.16);
  mix-blend-mode: screen;
  animation: destello 9s linear .8s infinite;
}
@keyframes destello {
  0%, 19%   { opacity: 0; }
  20%       { opacity: .95; }
  21%       { opacity: .15; }
  22.5%     { opacity: .8; }
  25%       { opacity: 0; }
  70%       { opacity: 0; }
  71%       { opacity: .55; }
  73%, 100% { opacity: 0; }
}

/* Rayo: aparece solo durante el primer destello de cada ciclo */
.rayo {
  position: absolute; top: 0; left: 53%; width: 64px; height: 52%;
  fill: none; stroke: #f2f6ff; stroke-width: 3; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(190,210,255,.95)) drop-shadow(0 0 18px rgba(150,180,255,.7));
  opacity: 0;
  animation: rayo 9s linear .8s infinite;
}
.rayo path { vector-effect: non-scaling-stroke; }
.rayo path + path { stroke-width: 1.6; }
@keyframes rayo {
  0%, 19.5% { opacity: 0; }
  20%       { opacity: 1; }
  21%       { opacity: .2; }
  22.5%     { opacity: .9; }
  24.5%, 100% { opacity: 0; }
}

@media (max-width: 920px) {
  .rayo { left: auto; right: 3%; height: 24%; width: 40px; }
  .lluvia--cerca { opacity: .24; }
  .lluvia--lejos { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__fx { display: none; }
}
