/* ============================================================
   Tachín — landing
   Paleta y escala tipográfica derivadas de la identidad del producto.
   Sin frameworks, sin build: un archivo, un CSS.
   ============================================================ */

/* Tipografías de la marca (kit en docs-local/marca/fuentes), servidas
   localmente: la página no depende de Google Fonts. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fuentes/plus-jakarta-sans/PlusJakartaSans-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fuentes/space-grotesk/SpaceGrotesk-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  /* Color */
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-2: #f4f4f0;
  --surface-3: #eeeeea;
  --ink: #1a1c1a;
  --ink-2: #3c4a3c;
  --ink-3: #5f5e5e;
  --line: #e2e3df;
  --line-2: #cbd3c8;
  --leaf: #00c853;
  --leaf-hover: #00b94d;
  --leaf-deep: #006e2a;
  --leaf-ink: #002108;
  --stage: #0f1b10;

  /* Tipo */
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "Space Grotesk", ui-monospace, "SF Mono", monospace;

  /* Layout */
  --wrap: 1280px;
  --gutter: 1.25rem;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;

  /* Elevación: una sola sombra, dos intensidades */
  --shadow-1: 0 1px 2px rgba(20, 24, 18, .04), 0 12px 28px -18px rgba(20, 24, 18, .28);
  --shadow-2: 0 2px 6px rgba(20, 24, 18, .06), 0 34px 60px -32px rgba(20, 24, 18, .45);
}

@media (min-width: 1024px) {
  :root { --gutter: 1.75rem; }
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Los anclajes no quedan tapados por el header sticky */
[id] { scroll-margin-top: 5.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--leaf-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: 840px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Tipografía ---------- */

.h1 {
  font-size: clamp(2.25rem, 5.6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 800;
}

.h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 700;
}

.lead {
  font-size: clamp(1.0625rem, 1.2vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink-2);
}

.accent { color: var(--leaf-deep); }

.eyebrow {
  font-family: var(--font-label);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--leaf-deep);
}

.icon { width: 1.25rem; height: 1.25rem; flex: none; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .95rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-label);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease,
              box-shadow .16s ease, transform .16s ease;
}

.btn-primary {
  background: var(--leaf);
  color: var(--leaf-ink);
  box-shadow: 0 10px 26px -14px rgba(0, 110, 42, .75);
}
.btn-primary:hover { background: var(--leaf-hover); }
.btn-primary:active { transform: translateY(1px); }

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

.btn-sm { padding: .6rem 1.1rem; font-size: .875rem; }
.btn-lg { padding: 1.1rem 2rem; font-size: 1.0625rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid rgba(226, 227, 223, .9);
  box-shadow: 0 10px 24px -24px rgba(20, 24, 18, .55);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: 64px; height: auto; }

.nav { display: none; align-items: center; gap: 2rem; }
.nav a {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .15s ease;
}
.nav a:hover { color: var(--leaf-deep); }

@media (min-width: 820px) {
  .nav { display: flex; }
  .brand img { width: 70px; }
  .header-inner { min-height: 4.75rem; }
}

/* ---------- Portada a pantalla completa ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4.25rem - 1px);
  min-height: calc(100svh - 4.25rem - 1px);
  overflow: hidden;
  background: var(--bg);
}

/* ===== Celular: texto arriba, la foto ocupa el resto ===== */

.hero-inner {
  order: 1;
  text-align: left;
  padding-block: clamp(1.5rem, 4vh, 2.25rem) clamp(1rem, 2.5vh, 1.5rem);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .7rem;
  margin-top: 1.5rem;
}

/* Una línea a la vez. Entra desde la derecha y sale hacia la izquierda. */
.rot {
  display: grid;
  margin-top: 1.1rem;
  min-height: 1.55rem;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink-2);
}
.rot li {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .5s ease, transform .55s cubic-bezier(.22, .61, .36, 1);
}
.rot li.is-active { opacity: 1; transform: none; }
.rot li.is-past { opacity: 0; transform: translateX(-20px); }

/* Botón de cierre del hero */
.hero-next-wrap {
  order: 2;
  padding-block: .8rem .9rem;
  text-align: left;
}

.hero-next {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--font-label);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  transition: color .18s ease;
}
.hero-next:hover { color: var(--leaf-deep); }
.hero-next .icon { width: 1rem; height: 1rem; animation: nudge 2.8s ease-in-out infinite; }

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(2px); }
}

/* En el celular el bloque de texto se aprieta para que la foto tenga aire */
@media (max-width: 899px) {
  .hero-inner { padding-block: 1.15rem 1rem; }
  .hero .h1 { font-size: clamp(1.95rem, 7.6vw, 2.4rem); }
  .hero-actions { margin-top: 1.15rem; gap: .55rem; }
  .hero-actions .btn { padding: .8rem 1.4rem; }
  .rot { margin-top: .9rem; font-size: 1.625rem; }
  .hero-bg { min-height: 200px; }
}

@media (min-width: 820px) {
  .hero {
    min-height: calc(100vh - 4.75rem - 1px);
    min-height: calc(100svh - 4.75rem - 1px);
  }
}

/* Notebooks de 768 px de alto: el texto se aprieta para no tapar el equipo */
@media (min-width: 900px) and (max-height: 800px) {
  .hero .h1 { font-size: clamp(2.1rem, 3.8vw, 2.7rem); }
  .hero-actions { margin-top: 1rem; }
  .hero-actions .btn { padding: .8rem 1.4rem; }
  .rot { margin-top: .75rem; font-size: 1.5rem; }
}

/* Pantallas bajas: se aprieta el texto y la foto se conforma con menos */
@media (max-width: 899px) and (max-height: 760px) {
  .hero .h1 { font-size: clamp(1.75rem, 7vw, 2.05rem); }
  .hero-actions { margin-top: 1rem; }
  .hero-actions .btn { padding: .72rem 1.2rem; }
  .rot { margin-top: .7rem; font-size: 1.5rem; }
  .hero-inner { padding-block: .9rem .7rem; }
  .hero-bg { min-height: 130px; }
}

/* ===== La foto ===== */

.hero-bg {
  position: relative;
  order: 2;
  flex: 1;
  min-height: 42vh;
  overflow: hidden;
}

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 32% 50%;
}

/* Velo inferior: sostiene la tarjeta del contador */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  background: linear-gradient(to top, rgba(6, 14, 8, .74), rgba(6, 14, 8, .22) 55%, transparent);
  pointer-events: none;
}

/* ===== Contador flotante (es el botón del demo) ===== */

.hero-live {
  position: absolute;
  left: clamp(.85rem, 2vw, 1.75rem);
  bottom: clamp(.85rem, 2vw, 1.75rem);
  z-index: 2;
  display: grid;
  justify-items: start;
  gap: .1rem;
  min-width: 9.5rem;
  padding: .7rem .95rem .75rem;
  border-radius: 14px;
  border: 1px solid rgba(120, 240, 150, .22);
  background: rgba(9, 21, 11, .85);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .9);
  color: #eef4ec;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.hero-live:hover { background: rgba(9, 21, 11, .93); }
.hero-live:active { transform: scale(.985); }

.hero-live-head {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-label);
  font-size: .5625rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(163, 226, 175, .78);
}

.hero-live-count {
  display: block;
  font-family: var(--font-label);
  font-size: clamp(1.8rem, 4.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: #43e86b;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(67, 232, 107, .35);
}

.hero-live-count.is-bump { animation: bump .3s ease-out; }

.hero-live-sub {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: rgba(233, 240, 232, .74);
}

.hero-live-cta {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .5rem;
  padding: .22rem .55rem .22rem .45rem;
  border-radius: 999px;
  background: rgba(0, 200, 83, .16);
  color: #7df0a0;
  font-family: var(--font-label);
  font-size: .5625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero-live-cta::before { content: "+"; font-size: .8125rem; line-height: 1; }

.plus-pop {
  position: absolute;
  top: -.55rem;
  right: .8rem;
  font-family: var(--font-label);
  font-size: .875rem;
  font-weight: 700;
  color: #43e86b;
  opacity: 0;
  pointer-events: none;
}

.hero-live.is-hit .plus-pop { animation: pop .75s cubic-bezier(.2, .7, .3, 1); }

@keyframes pop {
  0%   { opacity: 0; transform: translateY(6px) scale(.9); }
  25%  { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-18px) scale(1); }
}

@keyframes bump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.09); }
  100% { transform: scale(1); }
}

/* ===== Escritorio: la foto es el fondo y el texto va encima ===== */

@media (min-width: 900px) {
  .hero-bg {
    position: absolute;
    inset: 0;
    order: 0;
    min-height: 0;
  }
  .hero-bg img { object-position: 52% 58%; }

  .hero-bg::after {
    inset: 0;
    height: auto;
    background:
      linear-gradient(100deg, rgba(6, 14, 8, .93) 0%, rgba(6, 14, 8, .82) 26%, rgba(6, 14, 8, .52) 48%, rgba(6, 14, 8, .16) 70%, rgba(6, 14, 8, .02) 86%, transparent 100%),
      linear-gradient(to bottom, rgba(6, 14, 8, .55) 0%, transparent 42%);
  }

  /* La foto es full-bleed, así que el texto se ancla al borde del viewport
     y no al contenedor de 1280: queda más a la izquierda. */
  /* Título arriba, beneficios en el medio y el WhatsApp abajo a la izquierda. */
  .hero-inner {
    order: 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: 1680px;
    padding-inline: clamp(1.25rem, 4vw, 4rem);
    padding-block: clamp(2.25rem, 5.5vh, 3.75rem) clamp(1.25rem, 4vh, 2.25rem);
    text-align: left;
  }

  .hero-actions { flex-direction: row; justify-content: flex-start; margin-top: 0; }
  .rot { margin-block: auto; justify-items: start; }

  .hero .h1 { color: #fff; font-size: clamp(2.5rem, 4.6vw, 3.2rem); }
  .hero .h1 .accent { color: #52f07a; }
  .hero .rot { color: rgba(255, 255, 255, .8); }

  /* La acción para probar, a la derecha: el centro queda libre */
  .hero-live {
    left: auto;
    right: clamp(1.5rem, 4vw, 3.5rem);
    bottom: clamp(1.5rem, 7vh, 3.5rem);
  }

  .hero-next-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(.9rem, 2.5vh, 1.5rem);
    z-index: 2;
    padding-block: 0;
    text-align: center;
  }
  .hero-next {
    padding: .45rem .85rem;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 999px;
    background: rgba(9, 21, 11, .45);
    color: rgba(255, 255, 255, .92);
  }
  .hero-next:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(9, 21, 11, .72);
  }
}

/* En notebooks bajas el equipo se corre hacia abajo: así el texto no lo tapa */
@media (min-width: 900px) and (max-height: 800px) {
  .hero-bg img { object-position: 52% 40%; }
}

/* --- Piezas compartidas --- */

.led {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 3px rgba(0, 200, 83, .18);
  flex: none;
  animation: led 3.6s ease-in-out infinite;
}

@keyframes led {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(0, 200, 83, .18); }
  50%      { opacity: .45; box-shadow: 0 0 0 5px rgba(0, 200, 83, .07); }
}

.chip {
  display: inline-block;
  font-family: var(--font-label);
  font-size: .625rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .22rem .55rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-3);
  white-space: nowrap;
}
.chip-on { background: #d7f5dd; color: var(--leaf-deep); }

/* ---------- Pasos ---------- */

.steps { padding-block: clamp(2rem, 5vw, 3.5rem); }

.step {
  position: relative;
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  align-items: center;
}
.step + .step { margin-top: clamp(1rem, 2vw, 1.5rem); }

.step-media {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
}
.step-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag {
  position: absolute;
  top: .75rem;
  right: .75rem;
  padding: .25rem .6rem;
  border-radius: var(--r-sm);
  background: rgba(250, 249, 245, .93);
  color: var(--ink);
  font-family: var(--font-label);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.step-body .h2 { margin-top: .5rem; }
.step-body .lead { margin-top: .85rem; }

.checks {
  display: grid;
  gap: .55rem;
  margin-top: 1.25rem;
  font-size: .9375rem;
}
.checks li {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  color: var(--ink);
}
.icon.check {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .15rem;
  color: var(--leaf-deep);
}

/* En pantallas grandes la foto queda anclada y el texto la atraviesa al
   scrollear. La foto va más angosta que el texto: pesa menos y no se estira.
   El lado se alterna en cada paso. */
@media (min-width: 900px) {
  .step {
    --shot-h: clamp(16.5rem, 46vh, 24rem);
    --shot-h: clamp(16.5rem, 46svh, 24rem);
    --shot-half: clamp(8.25rem, 23vh, 12rem);
    --shot-half: clamp(8.25rem, 23svh, 12rem);
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    grid-template-rows: 1fr;
    gap: 0 clamp(2rem, 4vw, 3.5rem);
    align-items: start;
    min-height: max(40rem, 100vh);
    min-height: max(40rem, 100svh);
    padding: clamp(2.5rem, 8vh, 5rem) 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .step + .step {
    margin-top: 0;
    border-top: 1px solid var(--line);
  }

  /* La foto se ancla al centro mientras el texto corre al lado. */
  .step-media {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    position: sticky;
    top: max(5.5rem, calc(50vh - var(--shot-half)));
    top: max(5.5rem, calc(50svh - var(--shot-half)));
    height: var(--shot-h);
    aspect-ratio: auto;
    border-radius: var(--r-md);
    box-shadow: none;
  }

  /* El panel del paso 03 hace de visual: mismo anclaje. */
  .panel {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    justify-self: start;
    width: 100%;
    max-width: 34rem;
    position: sticky;
    top: max(5.5rem, calc(50vh - 9rem));
    top: max(5.5rem, calc(50svh - 9rem));
  }

  /* El texto se centra en la sección y sube con el scroll. */
  .step-body {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    padding-block: clamp(2rem, 6vh, 4rem);
  }

  /* Pasos invertidos: el visual pasa a la derecha, siempre con la columna
     angosta, y el texto queda a la izquierda con la ancha. */
  .step-reverse { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
  .step-reverse .step-media,
  .step-reverse .panel { grid-column: 2; }
  .step-reverse .step-body { grid-column: 1; }
}

/* ---------- Panel mock ---------- */

.panel {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: clamp(.9rem, 2vw, 1.25rem);
  box-shadow: inset 0 0 0 1px rgba(20, 24, 18, .04);
  font-size: .875rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .85rem;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-label);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.panel-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  margin-bottom: .85rem;
}
.metric {
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: .7rem .8rem;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.metric-label {
  font-family: var(--font-label);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.metric-value {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.panel-table {
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: .35rem;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .5rem .55rem;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: .8125rem;
}
.row-head {
  font-family: var(--font-label);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-block: .2rem .35rem;
}
.row + .row { margin-top: .15rem; }
.panel-table .row:nth-child(2) { background: var(--surface-2); }
.panel-table .row:nth-child(2) .who b { color: var(--leaf-deep); }

.who { display: flex; align-items: baseline; gap: .45rem; min-width: 0; }
.who b { font-family: var(--font-label); font-size: .75rem; }
.tally { display: flex; align-items: center; gap: .45rem; }
.tally b { font-size: .9375rem; font-variant-numeric: tabular-nums; }

/* ---------- FAQ ---------- */

.faq { padding-block: clamp(3rem, 7vw, 5rem); }
.faq-title { text-align: center; margin-bottom: 2rem; }

.qa {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0 clamp(1rem, 2vw, 1.35rem);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.qa + .qa { margin-top: .6rem; }

@media (hover: hover) {
  .qa:hover {
    border-color: #a9d8b6;
    box-shadow: 0 0 0 3px rgba(0, 200, 83, .07);
  }
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.05rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--leaf-deep); }

.qa-icon {
  color: var(--leaf-deep);
  transition: transform .25s cubic-bezier(.34, 1.4, .64, 1);
}
.qa[open] .qa-icon,
.qa.is-open .qa-icon { transform: rotate(45deg); }

.qa-body {
  overflow: hidden;
  padding-right: clamp(0rem, 4vw, 3rem);
  color: var(--ink-2);
  font-size: .9375rem;
  line-height: 1.65;
}
/* El aire va adentro del párrafo para que la tarjeta cierre a cero, sin salto. */
.qa-body > p { padding-bottom: 1.15rem; }

/* ---------- CTA ---------- */

.contact { padding-block: clamp(2rem, 5vw, 3rem) clamp(3.5rem, 8vw, 5.5rem); }

.cta {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta .h2 { max-width: 26ch; }
.cta .lead { max-width: 42ch; margin-top: 1rem; }
.cta .btn { margin-top: 2rem; }

.fineprint {
  margin-top: 1.1rem;
  font-size: .8125rem;
  color: var(--ink-3);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .8125rem;
  color: var(--ink-2);
}
.footer-brand img { width: 96px; height: auto; }

.footer-meta { font-size: .8125rem; color: var(--ink-3); }

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

/* ============================================================
   Movimiento
   Tres gestos, cada uno con un trabajo: la entrada del hero,
   el revelado al scrollear y una luz que recorre el borde de
   las tarjetas grandes. Nada más.
   ============================================================ */

@property --edge-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 320deg;
}

/* --- Entrada del hero: un solo gesto orquestado --- */
.hero-inner > * {
  animation: rise .72s cubic-bezier(.22, .61, .36, 1) both;
}
.hero-inner > *:nth-child(1) { animation-delay: .04s; }
.hero-inner > *:nth-child(2) { animation-delay: .12s; }
.hero-inner > *:nth-child(3) { animation-delay: .20s; }
.hero-inner > *:nth-child(4) { animation-delay: .28s; }
.hero-inner > *:nth-child(5) { animation-delay: .34s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* --- Revelado al scrollear (solo si hay JS: si no, todo visible) --- */
.js [data-reveal] { opacity: 0; }

.js [data-reveal].is-visible {
  animation: reveal .55s cubic-bezier(.22, .61, .36, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* --- Luz que recorre el borde de las tarjetas --- */
.step::after,
.cta::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--edge-angle),
    transparent 0 52%,
    rgba(0, 200, 83, .22) 70%,
    rgba(70, 240, 118, 1) 84%,
    rgba(0, 200, 83, .22) 95%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
}

.step.is-visible::after,
.cta.is-visible::after {
  opacity: .8;
  animation: edge 2.2s cubic-bezier(.4, 0, .2, 1) 1;
}

/* En pantallas grandes la luz queda viva, girando despacio.
   En el celular corre una sola vez: ahí el repintado constante no compensa. */
@media (min-width: 900px) {
  /* Los pasos dejan de ser tarjetas: la luz del borde queda solo para el CTA. */
  .step::after { content: none; }

  .cta.is-visible::after {
    animation: edge 9s linear infinite;
    animation-delay: calc(var(--i, 0) * -3s);
  }
}

@media (hover: hover) and (min-width: 900px) {
  .cta:hover::after {
    opacity: 1;
    animation-duration: 3.5s;
  }
}

@keyframes edge {
  to { --edge-angle: 680deg; }
}

/* ---------- Accesibilidad / movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero-inner > * { animation: none; }
  .js [data-reveal],
  .js [data-reveal].is-visible { opacity: 1; animation: none; }
}
