/* ==========================================================================
   AiR Lab — Design System
   Construido a partir de los mockups aprobados (WEB AIRLAB V1)
   Verdana 400/700 · Courier New (métricas, labels, mono) · Georgia itálica (1 frase)
   ========================================================================== */

:root {
  /* Paleta exacta */
  --verde-air: #00C896;
  --negro-tech: #0A0A0A;
  --aire: #F0FAF6;
  --whiteboard: #F5F5F5;
  --profundo: #1A4A3A;
  --aqua-signal: #7FFFD4;

  /* Tipografía */
  --font-body: Verdana, Geneva, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  --font-italic: Georgia, 'Times New Roman', serif;

  /* Grid base 8px */
  --sp-1: 8px;   --sp-2: 16px;  --sp-3: 24px;  --sp-4: 32px;
  --sp-5: 48px;  --sp-6: 64px;  --sp-7: 96px;  --sp-8: 128px;

  /* Layout */
  --max-width: 1130px;
  --radius: 2px;
  --radius-btn: 10px;

  /* Superficies */
  --line: rgba(0, 200, 150, 0.22);
  --line-soft: rgba(240, 250, 246, 0.10);
  --txt-dim: rgba(240, 250, 246, 0.72);
  --txt-dimmer: rgba(240, 250, 246, 0.45);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.2s;
  --dur-base: 0.4s;
  --dur-slow: 0.8s;
}

/* ========================= Reset ========================= */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--negro-tech);
  color: var(--aire);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  animation: page-in 0.5s var(--ease-out) both;
}

@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

:focus-visible { outline: 2px solid var(--aqua-signal); outline-offset: 3px; }

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

/* ========================= Tipografía ========================= */

h1, .h1 {
  font-size: clamp(2.25rem, 4.2vw + 0.5rem, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-size: clamp(1.6rem, 2.6vw + 0.5rem, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h3, .h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Etiqueta mono verde — usada arriba de cada H2 */
.tag {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--verde-air);
  margin-bottom: var(--sp-2);
}

/* Guion que se extiende al entrar en viewport — ancla visual de sección */
.tag::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--verde-air);
  transform: scaleX(0);
  transform-origin: left;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .tag::before {
      animation: draw-across linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 25%;
    }
  }
}

@supports not (animation-timeline: view()) {
  .tag::before { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .tag::before { transform: scaleX(1); animation: none; }
}

/* Label mono pequeño dentro de cards (RETO / QUÉ CONSTRUIMOS / RESULTADO) */
.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde-air);
  margin-bottom: 2px;
}

.mono { font-family: var(--font-mono); }

/* Métrica — Courier New, verde, tracking abierto */
.metric {
  position: relative;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--verde-air);
  line-height: 1.1;
  padding-bottom: 6px;
}

/* Regla que se dibuja bajo la cifra mientras el contador corre */
.metric::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--verde-air), var(--aqua-signal));
  transform: scaleX(0);
  transform-origin: left;
}

/* .is-counting lo pone main.js justo antes de animar el número */
.metric.is-counting::after { animation: metric-rule 1.4s var(--ease-out) forwards; }
.metric.is-counting { animation: metric-glow 1.4s var(--ease-out); }

@keyframes metric-rule { to { transform: scaleX(1); } }

@keyframes metric-glow {
  0%   { text-shadow: 0 0 0 rgba(0, 200, 150, 0); transform: scale(0.96); }
  35%  { text-shadow: 0 0 22px rgba(0, 200, 150, 0.65); transform: scale(1.02); }
  100% { text-shadow: 0 0 0 rgba(0, 200, 150, 0); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .metric::after { transform: scaleX(1); animation: none; }
  .metric.is-counting { animation: none; }
}

/* Georgia itálica — EXCLUSIVA de una sola frase en todo el sitio (Nosotros) */
.filosofico {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: clamp(1.35rem, 2.2vw + 0.5rem, 1.9rem);
  line-height: 1.35;
  color: var(--verde-air);
}

.text-verde { color: var(--verde-air); }
.text-dim { color: var(--txt-dim); }
.text-dimmer { color: var(--txt-dimmer); }
.text-sm { font-size: 0.85rem; }

/* ========================= Layout ========================= */

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

.section { padding-block: var(--sp-7); }

/* Bandas full-bleed verdes — degradado marcado Verde AiR → Profundo.
   Excepción de gradiente autorizada: Profundo es el color reservado para
   degradados, y Verde AiR es el único acento que entra en la mezcla. */
.band-profundo {
  position: relative;
  background:
    radial-gradient(115% 85% at 6% -5%, rgba(0, 200, 150, 0.55) 0%, rgba(0, 200, 150, 0.16) 34%, transparent 64%),
    radial-gradient(90% 70% at 100% 108%, rgba(127, 255, 212, 0.16) 0%, transparent 55%),
    linear-gradient(142deg, #24785A 0%, #1A4A3A 62%, #123328 100%);
  background-color: var(--profundo);
}

/* Cuadros verdes menores (newsletter, preview, cita) — mismo degradado */
.newsletter,
.preview,
.quote-band {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(0, 200, 150, 0.50) 0%, rgba(0, 200, 150, 0.14) 40%, transparent 70%),
    linear-gradient(140deg, #226B51 0%, #1A4A3A 60%, #143A2D 100%);
}

@media (max-width: 640px) {
  .section { padding-block: var(--sp-6); }
  .container { padding-inline: var(--sp-3); }
}

.grid { display: grid; gap: var(--sp-3); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 940px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ========================= Header ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

/* Logo — Símbolo Pulso: 3 barras horizontales descendentes + wordmark */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo__mark { width: 26px; height: auto; }

.logo__word {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--aire);
}

.logo__lab {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.35em;
  color: var(--txt-dimmer);
  display: block;
  margin-top: -4px;
}

.nav__links {
  display: flex;
  gap: var(--sp-4);
  font-size: 0.9rem;
}

.nav__links a {
  position: relative;
  color: var(--txt-dim);
  padding-bottom: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}

/* Subrayado que se dibuja de izquierda a derecha */
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--verde-air);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}

.nav__links a:hover { color: var(--verde-air); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--verde-air); }

/* Barra de progreso de lectura — indica cuánto falta de la página */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--verde-air), var(--aqua-signal));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 200;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .scroll-progress {
      animation: grow-progress auto linear;
      animation-timeline: scroll();
    }
    @keyframes grow-progress { to { transform: scaleX(1); } }
  }
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--aire);
  width: 28px;
  height: 28px;
  padding: 0;
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .site-header--open .nav__links {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--negro-tech);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-3) var(--sp-4);
  }
  .site-header__cta { display: none; }
}

/* ========================= Botones ========================= */

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: 14px var(--sp-4);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              filter var(--dur-fast) var(--ease-out);
}

/* Barrido de luz al hacer hover — refuerza que el botón es accionable */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.28) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.55s var(--ease-out);
}
.btn:hover::after { transform: translateX(120%); }

/* La flecha final del label avanza en hover */
.btn .arrow,
.link-verde .arrow {
  display: inline-block;
  transition: transform var(--dur-fast) var(--ease-out);
}
.btn:hover .arrow,
.link-verde:hover .arrow { transform: translateX(4px); }

/* Botón primario con volumen: degradado propio + luz interior arriba,
   sombra interior abajo y sombra proyectada que lo despega del fondo. */
.btn--primary {
  background: linear-gradient(180deg, #1AE0AC 0%, var(--verde-air) 52%, #00A87D 100%);
  color: var(--negro-tech);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 0 rgba(0, 90, 68, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 2px 5px rgba(0, 200, 150, 0.28);
}

.btn--primary:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(0, 90, 68, 0.3),
    0 10px 26px rgba(0, 0, 0, 0.45),
    0 6px 22px rgba(0, 200, 150, 0.42);
}

/* Al presionar se hunde: el relieve se invierte */
.btn--primary:active {
  transform: translateY(1px);
  filter: brightness(0.96);
  box-shadow:
    inset 0 2px 5px rgba(0, 70, 53, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Botón secundario: mismo lenguaje de volumen, en versión oscura */
.btn--secondary {
  background: linear-gradient(180deg, rgba(240, 250, 246, 0.09) 0%, rgba(240, 250, 246, 0.03) 100%);
  border-color: rgba(240, 250, 246, 0.28);
  color: var(--aire);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.btn--secondary:hover {
  border-color: var(--verde-air);
  color: var(--verde-air);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 24px rgba(0, 0, 0, 0.42),
    0 4px 18px rgba(0, 200, 150, 0.22);
}

.btn--secondary:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.3);
}
.btn--secondary::after {
  background: linear-gradient(110deg, transparent 20%, rgba(0, 200, 150, 0.16) 50%, transparent 80%);
}

.btn--sm { padding: 10px var(--sp-3); font-size: 0.82rem; }
.btn--block { width: 100%; }

/* Link verde con flecha — subrayado que se dibuja en hover */
.link-verde {
  position: relative;
  display: inline-block;
  color: var(--verde-air);
  font-weight: 700;
  font-size: 0.88rem;
  padding-bottom: 2px;
}

.link-verde::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--verde-air);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.link-verde:hover::after { transform: scaleX(1); }

/* ========================= Cards ========================= */

/* Card estándar: fondo negro, borde verde fino, halo verde suave.
   Sobre bandas Profundo el halo genera la profundidad del mockup aprobado. */
.card {
  position: relative;
  overflow: hidden;
  background: var(--negro-tech);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: 0 0 32px rgba(0, 200, 150, 0.10);
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

/* Línea verde que recorre el borde superior en hover */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--verde-air), var(--aqua-signal), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.card:hover::before { transform: scaleX(1); }

.card:hover {
  border-color: rgba(0, 200, 150, 0.55);
  box-shadow: 0 0 44px rgba(0, 200, 150, 0.22);
  transform: translateY(-4px);
}

.card__title { margin-bottom: var(--sp-2); }
.card__body { color: var(--txt-dim); font-size: 0.9rem; }

/* Ícono de card — línea 1.5px, 24×24, verde */
.card__icon {
  width: 24px;
  height: 24px;
  margin-bottom: var(--sp-3);
  stroke: var(--verde-air);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ========================= Chips / Badges ========================= */

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--verde-air);
  color: var(--verde-air);
  background: transparent;
}

/* Chip DISPONIBLE — late suavemente para señalar que la herramienta está viva */
.chip--solid {
  background: var(--verde-air);
  color: var(--negro-tech);
  animation: chip-pulse 3s ease-in-out infinite;
}

@keyframes chip-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 200, 150, 0.45); }
  50%      { box-shadow: 0 0 0 7px rgba(0, 200, 150, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .chip--solid { animation: none; }
}

/* Filas de chips y cards responden al cursor */
.chip { transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.chip:hover { transform: translateY(-2px); }

/* Badge rectangular (POSICIONAMIENTO DE FRONTERA) */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: var(--verde-air);
  color: var(--negro-tech);
  margin-bottom: var(--sp-2);
}

/* ========================= Hero ========================= */

.hero { padding-block: var(--sp-7) var(--sp-8); }

.hero__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--sp-7);
  align-items: center;
}

.hero__visual {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding-right: var(--sp-6);
  border-right: 1px solid var(--line);
}

/* Barras que respiran (pulso en loop) — hero visual */
.pulse-bar {
  height: 56px;
  background: var(--verde-air);
  border-radius: 999px;
  transform-origin: left center;
}
.pulse-bar:nth-child(1) { width: 100%; animation: pulse-breathe 4s var(--ease-out) infinite; }
.pulse-bar:nth-child(2) { width: 72%;  animation: pulse-breathe 4s var(--ease-out) 0.35s infinite; }
.pulse-bar:nth-child(3) { width: 40%;  animation: pulse-breathe 4s var(--ease-out) 0.7s infinite; }

@keyframes pulse-breathe {
  0%, 100% { transform: scaleX(1);    opacity: 0.9; }
  50%      { transform: scaleX(1.05); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-bar { animation: none !important; }
}

/* "RESPIRA." — expansión tipográfica en loop */
.hero__respira {
  display: block;
  color: var(--verde-air);
  font-size: clamp(3rem, 7vw, 5.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
  animation: kinetic-breathe 5s var(--ease-out) infinite;
}

@keyframes kinetic-breathe {
  0%, 100% { letter-spacing: -0.02em; }
  50%      { letter-spacing: 0.015em; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__respira { animation: none; }
}

.hero__sub {
  color: var(--txt-dim);
  margin-top: var(--sp-3);
  max-width: 52ch;
}

.hero__ctas {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-4);
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .hero__visual {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: var(--sp-5);
    max-width: 320px;
  }
  .hero { padding-block: var(--sp-5) var(--sp-6); }
}

/* ========================= Checks ========================= */

.checks { margin-block: var(--sp-3); display: grid; gap: 10px; }

.checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--txt-dim);
}

.checks svg {
  width: 15px; height: 15px;
  stroke: var(--verde-air);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* ========================= Diagrama de flujo (AI Automations) ========================= */

.flow { display: grid; gap: 0; margin-top: var(--sp-3); }

.flow__node {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--verde-air);
  opacity: 0;
}

.flow__connector {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin-inline: var(--sp-3);
  transform: scaleY(0);
  transform-origin: top;
}

/* Se dispara al entrar en viewport (IntersectionObserver -> .is-active) */
.flow.is-active .flow__node { animation: flow-node-in 0.45s var(--ease-out) forwards; }
.flow.is-active .flow__node:nth-of-type(1) { animation-delay: 0s; }
.flow.is-active .flow__node:nth-of-type(2) { animation-delay: 0.45s; }
.flow.is-active .flow__node:nth-of-type(3) { animation-delay: 0.9s; }

.flow.is-active .flow__connector { animation: flow-line-in 0.3s linear forwards; }
.flow.is-active .flow__connector:nth-of-type(1) { animation-delay: 0.3s; }
.flow.is-active .flow__connector:nth-of-type(2) { animation-delay: 0.75s; }

@keyframes flow-node-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes flow-line-in { to { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  .flow__node { opacity: 1; animation: none !important; }
  .flow__connector { transform: scaleY(1); animation: none !important; }
}

/* ========================= Timeline IACTIVA ========================= */

.iactiva { position: relative; margin-top: var(--sp-5); }

.iactiva__step {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--sp-3);
  padding-bottom: var(--sp-5);
}

/* Línea vertical entre pasos — se dibuja al hacer scroll */
.iactiva__step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 1px;
  background: var(--verde-air);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.7s var(--ease-out);
}

.iactiva__step.is-visible:not(:last-child)::before { transform: scaleY(1); }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .iactiva__step:not(:last-child)::before {
      transition: none;
      animation: draw-down linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 45%;
    }
    @keyframes draw-down { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  }
}

@media (prefers-reduced-motion: reduce) {
  .iactiva__step:not(:last-child)::before { transform: scaleY(1); animation: none; }
}

.iactiva__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--verde-air);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--verde-air);
  background: var(--negro-tech);
  position: relative;
  z-index: 1;
  transition: background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}

/* El paso se ilumina al pasar el cursor por su fila */
.iactiva__step:hover .iactiva__num {
  background: var(--verde-air);
  color: var(--negro-tech);
  box-shadow: 0 0 20px rgba(0, 200, 150, 0.5);
}

.iactiva__title { margin-bottom: 2px; }
.iactiva__desc { color: var(--txt-dim); font-size: 0.9rem; }

/* ========================= Diferenciadores (Por qué AiR Lab) ========================= */

.diffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); margin-top: var(--sp-5); }

.diffs > li {
  position: relative;
  border-top: 1px solid rgba(0, 200, 150, 0.3);
  padding-top: var(--sp-2);
  font-weight: 700;
  font-size: 0.92rem;
}

/* La regla superior se dibuja al entrar en viewport */
.diffs > li::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--verde-air);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-out);
}

.diffs > li.is-visible::before { transform: scaleX(1); }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .diffs > li::before {
      transition: none;
      animation: draw-across linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 32%;
    }
    @keyframes draw-across { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}

@media (prefers-reduced-motion: reduce) {
  .diffs > li::before { transform: scaleX(1); animation: none; }
}

@media (max-width: 780px) { .diffs { grid-template-columns: 1fr; } }

/* Lista de compromisos con reglas horizontales (Nosotros) */
.rules-list { margin-top: var(--sp-5); max-width: 720px; }
.rules-list > li {
  border-top: 1px solid var(--line);
  padding-block: var(--sp-3);
  font-weight: 700;
  font-size: 0.95rem;
}
.rules-list > li:last-child { border-bottom: 1px solid var(--line); }

/* ========================= Formularios ========================= */

.form { display: grid; gap: 10px; }

.form input,
.form textarea {
  width: 100%;
  padding: 14px var(--sp-2);
  background: rgba(240, 250, 246, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  color: var(--aire);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.form input::placeholder,
.form textarea::placeholder { color: var(--txt-dimmer); }

.form input:focus, .form textarea:focus {
  border-color: var(--verde-air);
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(0, 200, 150, 0.16);
}

/* Validación solo después de interacción del usuario */
.form input:user-invalid, .form textarea:user-invalid { border-color: #ff6b6b; }

.form__error { display: none; font-size: 0.78rem; color: #ff8a8a; }
.form input:user-invalid ~ .form__error,
.form textarea:user-invalid ~ .form__error { display: block; }

.form__consent {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--txt-dim);
  margin-block: var(--sp-1);
}

.form__consent input { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--verde-air); }

.form__feedback {
  border: 1px solid var(--verde-air);
  border-radius: var(--radius);
  padding: var(--sp-3);
  color: var(--verde-air);
  font-size: 0.9rem;
}

/* ========================= Bloques auxiliares ========================= */

/* Nota / aclaración dentro de landings de herramientas */
.note {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: var(--sp-3);
  font-size: 0.82rem;
  color: var(--txt-dim);
}

/* Preview conceptual (mock de UI dentro de landings) */
.preview {
  background: var(--profundo);
  border-radius: var(--radius);
  padding: var(--sp-4);
  min-height: 190px;
}

.preview--empty {
  background: transparent;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  min-height: 340px;
}

.preview__step {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aqua-signal);
  margin-bottom: 6px;
}

.preview__swatches { display: flex; gap: 10px; margin-block: var(--sp-3); }
.preview__swatch { width: 38px; height: 38px; border-radius: var(--radius); }

.preview__progress { height: 3px; background: rgba(240, 250, 246, 0.15); border-radius: 999px; overflow: hidden; }
.preview__progress > span { display: block; height: 100%; width: 50%; background: var(--verde-air); border-radius: 999px; }

/* El flujo dentro de una card oscura necesita más peso de borde */
.flow__node { background: rgba(10, 10, 10, 0.35); }

/* "Lo que te llevas" — lista numerada de entregables en landings de herramientas */
.deliverables { display: grid; gap: 2px; margin-top: var(--sp-3); }

.deliverables li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--sp-2);
  align-items: baseline;
  padding-block: 11px;
  border-top: 1px solid var(--line-soft);
}

.deliverables li:last-child { border-bottom: 1px solid var(--line-soft); }

.deliverables__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--verde-air);
}

.deliverables__name { font-weight: 700; font-size: 0.92rem; }
.deliverables__desc { color: var(--txt-dim); font-size: 0.85rem; }

/* Fila de beneficios cortos con regla verde superior */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-4); }

.benefits > li {
  border-top: 1px solid var(--verde-air);
  padding-top: var(--sp-2);
  font-size: 0.85rem;
  color: var(--txt-dim);
}

.benefits strong { display: block; color: var(--aire); font-size: 0.92rem; margin-bottom: 2px; }

@media (max-width: 780px) { .benefits { grid-template-columns: 1fr; } }

/* Puerta secundaria — CTA post-resultado en herramientas */
.puerta {
  border-top: 1px solid var(--line);
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
}

/* Separador */
.divider { border: 0; border-top: 1px solid var(--line); margin-block: var(--sp-5); }

/* Placeholder de imagen (blog, equipo) */
.img-ph {
  background: rgba(240, 250, 246, 0.045);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: var(--txt-dimmer);
  font-size: 0.75rem;
  text-align: center;
  padding: var(--sp-2);
}

/* Cuerpo de artículo del blog */
.prose { font-size: 1rem; line-height: 1.8; color: rgba(240, 250, 246, 0.88); }
.prose > * + * { margin-top: var(--sp-3); }

.prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: var(--sp-5);
  color: var(--aire);
}

.prose ul { display: grid; gap: 10px; padding-left: var(--sp-3); }
.prose ul li { list-style: none; position: relative; }
.prose ul li::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--sp-3));
  top: 0.65em;
  width: 10px;
  height: 1px;
  background: var(--verde-air);
}

.prose blockquote {
  margin: var(--sp-5) 0;
  padding-left: var(--sp-3);
  border-left: 2px solid var(--verde-air);
  color: var(--aire);
  font-weight: 700;
}

.prose a { color: var(--verde-air); text-decoration: underline; text-underline-offset: 3px; }

/* Cards del índice de blog */
.img-ph + .label { margin-top: var(--sp-3); }

/* Filtros de blog */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-block: var(--sp-4); }

.filter-chip {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--verde-air);
  background: transparent;
  color: var(--verde-air);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.filter-chip[aria-pressed="true"] { background: var(--verde-air); color: var(--negro-tech); }

/* Banda newsletter */
.newsletter {
  background: var(--profundo);
  border-radius: var(--radius);
  padding: var(--sp-5);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-4);
  align-items: center;
}

.newsletter__form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter__form input { flex: 1; min-width: 190px; background: var(--negro-tech); }

/* La casilla de consentimiento ocupa su propio renglón, debajo del campo
   y el botón, para no romper la fila compacta del newsletter. */
.newsletter__form .form__consent {
  flex-basis: 100%;
  margin-block: 0;
  color: rgba(240, 250, 246, 0.86); /* más contraste sobre la banda Profundo */
}

@media (max-width: 780px) {
  .newsletter { grid-template-columns: 1fr; }
  .newsletter__form { flex-direction: column; }
}

/* Cita destacada sobre banda Profundo */
.quote-band { background: var(--profundo); padding-block: var(--sp-6); }
.quote-band__text { font-size: clamp(1.1rem, 1.6vw + 0.5rem, 1.5rem); }
.quote-band__author {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde-air);
  margin-top: var(--sp-2);
}

/* Split genérico (Contacto, landings de herramientas) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-7);
  align-items: start;
}

@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: var(--sp-5); } }

/* Datos de contacto */
.contact-line {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.contact-line svg {
  width: 20px; height: 20px;
  stroke: var(--verde-air);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.contact-line__phone {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--verde-air);
}

/* ========================= Scroll reveal ========================= */

.reveal { opacity: 0; transform: translateY(20px); }

.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 28%;
    }
    .reveal.is-visible { transition: none; }
    @keyframes reveal-in {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible { opacity: 1; transform: none; animation: none; }
}

/* ========================= Footer ========================= */

.site-footer { border-top: 1px solid var(--line); padding-block: var(--sp-6) var(--sp-4); }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--sp-5);
}

.site-footer__tagline { color: var(--txt-dim); font-size: 0.88rem; margin-top: var(--sp-2); max-width: 34ch; }

.site-footer__claim {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--profundo);
  margin-top: var(--sp-3);
}

.site-footer__col { display: grid; gap: 10px; align-content: start; font-size: 0.88rem; }
.site-footer__col a { color: var(--txt-dim); transition: color var(--dur-fast) var(--ease-out); }
.site-footer__col a:hover { color: var(--verde-air); }

.site-footer__bottom {
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-soft);
  font-size: 0.75rem;
  color: var(--txt-dimmer);
}

@media (max-width: 780px) { .site-footer__grid { grid-template-columns: 1fr; gap: var(--sp-4); } }

/* ========================= Performance ========================= */

.defer-render { content-visibility: auto; contain-intrinsic-size: 700px; }

/* ========================= Utilidades ========================= */

.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mb-3 { margin-bottom: var(--sp-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
