/* ============================================
   NEXA ENERGY — Smart Energy. Connected Future.
   Stack: Vanilla HTML/CSS/JS
   Style: Apple-minimal, editorial, precision
   Palette: Off-white + Charcoal + Gold accent
   ============================================ */

/* ---- CUSTOM FONTS ---- */
@font-face {
  font-family: 'Xspace';
  src: url('../assets/fonts/XspaceRegular.ttf') format('truetype'),
       url('../assets/fonts/Xspace.otf') format('opentype');
  font-weight: 400;
  font-display: block;
}

/* ---- TOKENS ---- */
:root {
  /* Declarar tema fijo light para que browsers tipo Samsung Internet,
     Chrome Android con "force dark mode" o Edge mobile NO apliquen
     auto-darkening genérico que rompe el menu (texto blanco sobre
     fondo blanco) y los form controls nativos. La paleta del sitio
     está hardcoded como light, no tenemos modo oscuro. */
  color-scheme: light;
  --bg:          #F4F6F8;
  --surface:     #FFFFFF;
  --charcoal:    #1A1A2E;
  --ink:         #2D2D3A;
  --muted:       #6B7280;
  --border:      rgba(0,0,0,0.07);
  --accent:      #00B86B;
  --accent-light:#A7F3D0;
  --accent-bg:   #ECFDF5;
  --accent-dark: #059652;
  --sky:         #60A5FA;
  --sky-light:   #BFDBFE;
  --sky-bg:      #EFF6FF;
  --slate:       #94A3B8;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --max-w:       1200px;
  --transition:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--charcoal);
}
h1 { font-size: clamp(3rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }

/* ---- UTILITIES ---- */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section-header {
  max-width: 640px;
  margin-bottom: 64px;
}
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-family: 'Geist Mono', monospace;
}
.section-title { color: var(--charcoal); }
.section-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 16px;
  max-width: 52ch;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent-dark);
  border: 1px solid var(--accent-light);
}
.accent-text { color: var(--accent); }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--charcoal);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-sm);
  transition: transform 0.15s var(--transition), background 0.2s;
}
.btn-primary:hover { background: #333; }
.btn-primary:active { transform: scale(0.97); }
.btn-primary.btn-full { width: 100%; justify-content: center; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color 0.2s, gap 0.2s;
}
.btn-ghost:hover { color: var(--charcoal); gap: 12px; }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 28px;
  background: #25D366;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: transform 0.15s var(--transition), background 0.2s;
}
.btn-whatsapp:hover { background: #1EB954; }
.btn-whatsapp:active { transform: scale(0.97); }

/* ---- REVEAL ANIMATION ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
  will-change: transform, opacity;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background 0.3s, backdrop-filter 0.3s, border-bottom 0.3s;
  /* Ojo: NO agregar transform / filter / perspective / backdrop-filter
     ni un will-change que los incluya aqui. Cualquiera de esos en el
     .nav crea un containing block y los hijos con position:fixed
     (.nav.open .nav-links y .nav-cta del menu mobile) quedan anclados
     al nav de 64px en vez del viewport, rompiendo el menu. */
}
.nav.scrolled {
  /* Fondo semi-opaco sin backdrop-filter: el blur() en un
     position:fixed crea containing block (ver comentario en .nav)
     y romperia el menu mobile cuando el user ya hizo scroll. */
  background: rgba(244, 246, 248, 0.96);
  border-bottom: 1px solid var(--border);
}
/* En paginas sin video hero (cotizador, nosotros, blog, etc.) el nav
   siempre tiene fondo opaco — no hay video debajo que justifique
   transparencia. Sin esto, en mobile algunos browsers renderizan el
   nav con fondo blanco/transparente sobre contenido oscuro y los
   links se hacen ilegibles antes de que el usuario scrolee. */
body:not(.has-video-hero) .nav {
  background: rgba(244, 246, 248, 0.96);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-img {
  /* Nuevo logo NEXA ENERGY stacked (aspect ~3.6:1). Altura 40px
     para que no ocupe mas del nav (64px) y deje respiracion. */
  height: 40px;
  width: auto;
  object-fit: contain;
}
/* Toggle de logo: por defecto se muestra el oscuro (logo-nexa.png)
   sobre fondos claros. La variante --light (logo-dark.png) solo se
   muestra cuando el body tiene .has-video-hero y el nav aun no
   esta scrolled (es decir, encima del video). */
.nav-logo-img--light { display: none; }
body.has-video-hero .nav:not(.scrolled) .nav-logo-img--dark { display: none; }
body.has-video-hero .nav:not(.scrolled) .nav-logo-img--light { display: block; }

/* Texto y CTA del nav cuando estamos sobre el video (no scrolled).
   Una vez el usuario scrollea, el .scrolled toma over y vuelve a los
   colores normales del tema claro. */

/* Scrim oscuro sutil arriba del nav cuando esta sobre el video hero.
   Sin esto, si el video tarda en cargar (mobile lento, autoplay
   bloqueado, modo ahorro), el logo blanco y la hamburguesa blanca
   quedan invisibles sobre el body bg claro. El gradient se desvanece
   hacia abajo para no competir visualmente con el video cuando si
   carga. */
body.has-video-hero .nav:not(.scrolled) {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 100%);
}
body.has-video-hero .nav:not(.scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.82);
}
body.has-video-hero .nav:not(.scrolled) .nav-links a:hover,
body.has-video-hero .nav:not(.scrolled) .nav-links a.active {
  color: #fff;
}
body.has-video-hero .nav:not(.scrolled) .nav-cta {
  background: rgba(255, 255, 255, 0.96);
  color: #0a0e12;
}
body.has-video-hero .nav:not(.scrolled) .nav-cta:hover {
  background: #fff;
}
body.has-video-hero .nav:not(.scrolled) .nav-toggle span {
  background: #fff;
}
.nav-links {
  display: flex;
  gap: 32px;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--charcoal); }
.nav-cta {
  padding: 8px 18px;
  background: var(--charcoal);
  color: #FFFFFF;
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { background: #333; }
.nav-cta:active { transform: scale(0.97); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--charcoal);
  transition: transform 0.3s, opacity 0.3s;
}

/* ---- Botones de acento (usados en varias secciones) ---- */
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-dark);
}
.btn-lg {
  padding: 18px 36px;
  font-size: 1rem;
}

/* ============================================================
   HERO VIVO — flota Nexa generando en tiempo real (Idea1)
   ============================================================ */
.hero-live {
  background: var(--bg);
  /* padding-top deja respirar bajo el nav fixed; padding-bottom da
     aire entre la franja de stats y el border inferior */
  padding: 112px 24px 36px;
  border-bottom: 1px solid var(--border);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Variante con video de fondo ──────────────────────────────
   El <video.hero-live-bg> queda absoluto detrás del contenido,
   y un overlay oscuro (::before) le da contraste a textos blancos.
   Cards y stats mantienen su look (la live-card blanca destaca
   bonito sobre el fondo oscuro, igual que en la competencia). */
.hero-live--video {
  position: relative;
  overflow: hidden;
  background: #0a0e12; /* fallback oscuro mientras carga el video */
  color: #fff;
}
.hero-live-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  /* Sutil oscurecimiento del video crudo para que no compita con el copy */
  filter: brightness(0.85) saturate(1.05);
}
.hero-live--video::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.55) 0%, rgba(8, 12, 18, 0.78) 60%, rgba(8, 12, 18, 0.94) 100%),
    radial-gradient(ellipse at 30% 30%, rgba(0, 184, 107, 0.10) 0%, transparent 60%);
  pointer-events: none;
}
.hero-live--video .hero-live-inner {
  position: relative;
  z-index: 2;
}
.hero-live--video .hero-live-h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}
.hero-live--video .hero-live-h1 em {
  color: #00D27A; /* verde más brillante para legibilidad sobre oscuro */
}
.hero-live--video .hero-live-lead {
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}
.hero-live--video .kicker {
  color: #00D27A !important;
}
.hero-live--video .hl-k {
  color: rgba(255, 255, 255, 0.6);
}
.hero-live--video .hl-v {
  color: #fff;
}
.hero-live--video .hl-wm-text {
  color: rgba(255, 255, 255, 0.85);
}
.hero-live--video .hl-wm-rule {
  background: rgba(255, 255, 255, 0.22);
}
.hero-live--video .hl-cell {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Accesibilidad: si el usuario prefiere menos movimiento, ocultamos
   el video y dejamos solo el fondo oscuro. */
@media (prefers-reduced-motion: reduce) {
  .hero-live-bg { display: none; }
}

/* Mobile: el overlay un poco más fuerte para que el texto se lea
   claro encima del video con menos resolución. */
@media (max-width: 768px) {
  .hero-live--video::before {
    background:
      linear-gradient(180deg, rgba(8, 12, 18, 0.72) 0%, rgba(8, 12, 18, 0.88) 60%, rgba(8, 12, 18, 0.96) 100%);
  }
}

/* Emoji de cielo (sol/luna) en el titulo de la live-card.
   JS lo cambia segun hora local via window._nexaSolar.isDay(). */
.live-card-sky {
  display: inline-block;
  margin-right: 6px;
  font-size: 1.05em;
  transform: translateY(1px);
}
.hero-live-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  /* flex:1 + flex-column hace que el inner ocupe todo el alto del
     hero. La grid (copy+card) se expande con flex:1 y centra su
     contenido; .hero-live-bottom queda pegado al fondo. */
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hero-live-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center; /* copy y card centrados verticalmente */
}

/* — copy column — */
.hero-live .kicker {
  font-family: 'Geist Mono', 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-weight: 500;
}
.hero-live .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.hero-live .pulse {
  animation: hl-pulse 1.4s ease-out infinite;
}
@keyframes hl-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 200, 83, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0); }
}
.hero-live-h1 {
  font-family: 'Xspace', 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  /* Bajamos el max para que "Connected Future." siempre quepa en una
     línea sola (junto al <br> en el HTML, garantiza exactamente 2 líneas). */
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap; /* impide wrap intermedio dentro de cada línea */
}
.hero-live-h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-live-lead {
  color: var(--muted, #667085);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 22px 0 28px;
}
.hero-live-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-live .cta-green {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.18s ease;
}
.hero-live .cta-green:hover { background: var(--accent-dark); }
.hero-live .btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.hero-live .btn-ghost:hover {
  border-color: var(--ink);
}

/* — live card (compacta para que escale bien en móvil) — */
.live-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px -16px rgba(16, 24, 40, 0.08);
  max-width: 540px;
  width: 100%;
  margin-left: auto;
}
.live-card-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.live-card-ttl {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted, #667085);
  text-transform: uppercase;
  font-weight: 500;
}
.live-card-mwp {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.live-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.metric {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.metric .metric-lbl {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #98A2B3;
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-weight: 500;
}
.metric .metric-val {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.metric .metric-u {
  font-size: 0.66rem;
  color: var(--muted, #667085);
  font-weight: 400;
  margin-left: 0;
}
.metric.metric-hi .metric-val { color: var(--accent); }

/* — curva de generación solar (dentro de .live-card) — */
.solar-curve {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.solar-curve-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.solar-curve-hd .sc-ttl { color: #98A2B3; font-weight: 500; }
.solar-curve-hd .sc-now { color: #FF8A3D; font-weight: 600; }
/* Estado nocturno en gris para diferenciarlo del naranja activo */
.solar-curve-hd .sc-now[data-state="night"]  { color: #98A2B3; }
.sc-svg {
  width: 100%;
  height: 60px;
  display: block;
  overflow: visible;
}
.solar-curve-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: #98A2B3;
  text-transform: uppercase;
}
.live-card-ft {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 6px;
  align-items: center;
  color: #98A2B3;
  font-size: 10px;
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
}

/* — bloque inferior (stats + wordmark) — pegado al fondo del hero — */
.hero-live-bottom {
  margin-top: 56px;
}

/* — stats row — */
.hero-live-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hl-cell {
  /* Centramos contenido — el divisor lateral queda equidistante a
     ambos lados del texto, no pegado a la izquierda */
  text-align: center;
  padding: 0 16px;
  border-right: 1px solid var(--border);
}
.hl-cell:last-child { border-right: none; }
.hl-k {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: #98A2B3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 500;
}
.hl-v {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  font-family: 'Xspace', 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

/* — wordmark "El sol sale · Tú ahorras" — */
.hero-live-wordmark {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  opacity: 1;
}
.hl-wm-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 140px;
}
.hl-wm-text {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--ink);
  text-transform: uppercase;
  font-weight: 700;
}

/* — entrada animada — */
.hero-live-copy > *,
.live-card,
.hero-live-bottom {
  opacity: 0;
  transform: translateY(14px);
  animation: hlEnter 0.85s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}
.hero-live-copy .kicker        { animation-delay: 0.05s; }
.hero-live-copy .hero-live-h1  { animation-delay: 0.15s; }
.hero-live-copy .hero-live-lead{ animation-delay: 0.25s; }
.hero-live-copy .hero-live-ctas{ animation-delay: 0.35s; }
.live-card                     { animation-delay: 0.30s; }
.hero-live-bottom              { animation-delay: 0.55s; }
@keyframes hlEnter {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-live-copy > *, .live-card, .hero-live-bottom {
    animation: none; opacity: 1; transform: none;
  }
  .pulse { animation: none; }
}

/* — responsive — */
@media (max-width: 960px) {
  /* Móvil: queremos que la primera vista incluya TODO el hero (kicker
     + h1 + lead + ctas + stats + wordmark "El sol sale · Tú ahorras").
     Forzamos min-height = altura del viewport. 100svh evita el problema
     de la barra inferior de Safari iOS. */
  .hero-live {
    min-height: 100vh; /* fallback */
    min-height: 100svh;
    padding: 88px 24px 24px;
  }
  .hero-live-grid { grid-template-columns: 1fr; gap: 36px; align-items: center; }
  .live-card { margin-left: 0; }
  .hero-live-bottom { margin-top: 24px; padding-top: 0; }
  /* Stats en una sola fila tambien en mobile — 4 celdas compactas */
  .hero-live-stats { grid-template-columns: repeat(4, 1fr); gap: 0; padding-top: 20px; }
  .hl-cell { padding: 0 6px; }
  .hl-k { font-size: 8.5px; letter-spacing: 0.06em; margin-bottom: 4px; line-height: 1.2; }
  .hl-v { font-size: 0.9rem; line-height: 1.1; }
}
@media (max-width: 600px) {
  .hero-live { padding: 72px 18px 40px; }
  .live-card-grid { gap: 20px 18px; }
  /* Pantallas chicas (≤600px): font aún mas chica para que "Connected
     Future" entre en una linea sola. nowrap garantiza 2 lineas estrictas
     (Smart Energy / Connected Future). */
  .hero-live-h1 { font-size: clamp(1rem, 4.5vw, 1.35rem); white-space: nowrap; line-height: 1.15; }
  .solar-curve-axis span:nth-child(2),
  .solar-curve-axis span:nth-child(4) { display: none; }
  .hl-wm-rule { max-width: 40px; }
  .hl-wm-text { font-size: 10px; letter-spacing: 0.24em; }
  .hl-cell { padding: 0 4px; }
  .hl-k { font-size: 7.5px; }
  .hl-v { font-size: 0.82rem; }
}

/* ---- PROBLEMA ---- */
.problema {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.problema-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.problema-text {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: -0.02em;
}
.problema-text strong {
  color: var(--charcoal);
}

/* ---- CTA FINAL ---- */
.cta-final {
  padding: 120px 0;
  background: var(--charcoal);
}
.cta-final-content {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.cta-final-content h2 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  color: #fff;
  margin-bottom: 16px;
}
.cta-final-content p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: 40px;
}
.cta-final-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-final .btn-whatsapp {
  width: auto;
}

/* ---- STATS STRIP ---- */
.stats-strip {
  padding: 64px 0;
  background: var(--charcoal);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.stat-item { text-align: center; }
.stat-big {
  display: block;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #FFFFFF;
  font-family: 'Geist Mono', monospace;
  line-height: 1;
}
.stat-accent {
  color: var(--accent);
}
.stat-item p {
  margin-top: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.02em;
}

/* ---- SERVICIOS ---- */
.servicios { padding: 120px 0; }
/* Tira con marquee infinito: track contiene 2x el set de cards y se desplaza
   de 0 a -50% en loop. Pause on hover para que el usuario pueda leer. */
.servicios-strip {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
}
.servicios-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: servicios-marquee 55s linear infinite;
}
.servicios-strip:hover .servicios-track,
.servicios-strip:focus-within .servicios-track {
  animation-play-state: paused;
}
@keyframes servicios-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 9px)); }
}
@media (prefers-reduced-motion: reduce) {
  .servicios-track { animation: none; }
}
.servicio-card {
  position: relative;
  flex: 0 0 280px;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--transition);
  display: flex;
  flex-direction: column;
}
.servicio-card:hover {
  border-color: rgba(0, 184, 107, 0.3);
  box-shadow: 0 8px 32px -8px rgba(0, 184, 107, 0.12);
  transform: translateY(-2px);
}
.servicio-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 10px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
}
.servicio-icon {
  margin-bottom: 18px;
  width: 44px;
  height: 44px;
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.servicio-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.servicio-card p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}
.servicio-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.servicio-cta { align-self: flex-start; }

/* ---- PROCESO ---- */
/* Layout horizontal compacto: 5 cards en fila + flechas. En tablet
   pasa a wrap (3+2) con flechas hacia abajo en el salto; en mobile
   scroll horizontal con snap. Ahorra mucho scroll vs el formato
   vertical anterior. */
.proceso {
  padding: 88px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.steps-flow {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
  margin-top: 8px;
}
.step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}
.step h3 {
  font-size: 0.98rem;
  line-height: 1.25;
  margin: 0;
}
.step p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--accent);
  align-self: center;
  opacity: 0.7;
}

/* Tablet: si no caben 5 cards, scroll horizontal con snap. Mucho más
   limpio que tratar de hacer wrap con flechas que cambian de dirección. */
@media (max-width: 960px) {
  .steps-flow {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 8px -20px 0;
    padding: 4px 20px 12px;
    gap: 8px;
  }
  .step {
    flex: 0 0 240px;
    scroll-snap-align: start;
  }
  .step-arrow svg { width: 18px; height: 12px; }
}
@media (max-width: 480px) {
  .step { flex: 0 0 78%; padding: 16px 14px; }
  .step h3 { font-size: 0.92rem; }
  .step p { font-size: 0.78rem; }
}

/* ---- SIMULADOR ---- */
.simulador {
  padding: 120px 0;
}
.simulador-header {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
/* Re-centrar hijos con max-width propio cuando el header está centrado */
.simulador-header .section-title,
.simulador-header .section-desc {
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}
.simulador-header .section-desc {
  max-width: 58ch;
}
.simulador-tope-banner {
  max-width: 880px;
  margin: 0 auto 20px;
  padding: 12px 20px;
  background: rgba(0, 184, 107, 0.08);
  border: 1px solid rgba(0, 184, 107, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--charcoal);
  line-height: 1.4;
}
.simulador-tope-banner svg {
  flex-shrink: 0;
  color: var(--accent);
}
.simulador-tope-banner strong {
  color: var(--accent);
  font-weight: 700;
}
.simulador-card {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.06);
}
.simulador-input-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.simulador-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}
.simulador-value-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.simulador-currency {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--muted);
}
.simulador-amount {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--charcoal);
  font-family: 'Geist Mono', monospace;
  line-height: 1;
}
.simulador-currency-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 4px;
}

/* Slider */
.simulador-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #E5E3DE;
  outline: none;
  border: none;
  padding: 0;
}
.simulador-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--charcoal);
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.simulador-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.simulador-slider:active::-webkit-slider-thumb {
  transform: scale(1.3);
  box-shadow: 0 4px 16px rgba(0, 184, 107, 0.35);
}
.simulador-slider:active::-moz-range-thumb {
  transform: scale(1.3);
}
.simulador-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--charcoal);
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.simulador-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: 'Geist Mono', monospace;
}

.simulador-options { margin-top: 8px; }
.simulador-option-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 10px;
}
.simulador-pills {
  display: flex;
  gap: 8px;
}
.pill {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s var(--ease-out);
}
.pill:hover { color: var(--charcoal); border-color: rgba(0,0,0,0.15); }
.pill:active { transform: scale(0.95); }
.pill.active {
  background: var(--charcoal);
  color: #FFFFFF;
  border-color: var(--charcoal);
}

.simulador-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

.simulador-results {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.result-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.result-highlight {
  padding: 20px;
  background: var(--accent-bg);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 184, 107, 0.15);
}
.result-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.result-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--charcoal);
  font-family: 'Geist Mono', monospace;
  transition: filter 200ms ease, opacity 200ms ease;
}
.result-value.updating,
.mapa-result-value.updating {
  filter: blur(4px);
  opacity: 0.55;
}
.mapa-result-value {
  transition: filter 200ms ease, opacity 200ms ease;
}
.result-highlight .result-value {
  color: var(--accent-dark);
}
.result-sub {
  font-size: 0.78rem;
  color: var(--muted);
}
.result-price .result-value {
  color: var(--accent-dark);
  font-size: 1.6rem;
}
.result-small .result-value {
  font-size: 1.2rem;
}
.result-factura {
  background: rgba(0, 184, 107, 0.06);
  border: 1px dashed rgba(0, 184, 107, 0.25);
}
.simulador-brand-text {
  display: block;
  margin-top: 4px;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.45;
}
.result-inline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.result-inline .result-value {
  font-size: 1.4rem;
}
.result-row-roi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.simulador-frases {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  text-align: center;
}
.simulador-frase {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.simulador-frase strong {
  color: var(--accent-dark);
  font-weight: 700;
}
.simulador-cta {
  margin-top: 8px;
}

/* ---- Aviso de estimación ----
   Vive en la columna del input y se empuja al fondo
   con margin-top: auto para llenar el espacio vacío */
.simulador-aviso {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: auto;
  padding: 14px 16px;
  background: rgba(26, 26, 46, 0.035);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
}
.simulador-aviso svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent-dark);
}
.simulador-aviso p {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.simulador-aviso strong {
  color: var(--charcoal);
  font-weight: 600;
}
.simulador-aviso a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(5, 150, 82, 0.35);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}
.simulador-aviso a:hover {
  text-decoration-color: var(--accent-dark);
}

/* ---- FINANCIACION ---- */
.financiacion {
  padding: 120px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.financiacion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.fin-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.fin-card:hover {
  border-color: rgba(0, 184, 107, 0.3);
  box-shadow: 0 8px 24px -8px rgba(0, 184, 107, 0.1);
}
.fin-badge {
  position: absolute;
  top: -10px;
  left: 20px;
  padding: 4px 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
}
.fin-card h3 {
  margin-bottom: 20px;
}
.fin-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fin-features li {
  font-size: 0.88rem;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
}
.fin-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-light);
}
.fin-disclaimer {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

/* ---- MAPA / MIDE TU TECHO ---- */
.mapa-section {
  padding: 120px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.mapa-card {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mapa-search {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 4;
}
.mapa-search-wrap {
  flex: 1;
  position: relative;
}
.mapa-search input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--ink);
}
.mapa-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 184, 107, 0.12);
}
.mapa-search .btn-primary {
  white-space: nowrap;
}

/* Dropdown de sugerencias del geocoder */
.mapa-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
}
.mapa-suggestions[hidden] { display: none; }
.mapa-suggestions li {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.mapa-suggestions li:hover,
.mapa-suggestions li[aria-selected="true"] {
  background: var(--accent-bg);
}
.mapa-suggestion-main {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
}
.mapa-suggestion-sub {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 2px;
}
.mapa-suggestions-empty {
  padding: 14px 12px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Hint debajo del buscador: indica que se puede clickear/arrastrar el
   marcador. Necesario porque el geocoder de Mapbox a veces no encuentra
   direcciones colombianas con precisión a nivel de inmueble. */
/* Hint debajo del buscador: una sola linea, fina y discreta. */
.mapa-search-hint {
  margin: 0;
  padding: 6px 10px;
  background: rgba(0, 184, 107, 0.05);
  border: 1px solid rgba(0, 184, 107, 0.14);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--muted);
  text-align: center;
}
.mapa-search-hint strong {
  font-weight: 600;
  color: var(--charcoal);
}
.mapa-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
#map {
  width: 100%;
  height: 500px;
}
.mapa-toolbar {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 5;
  max-width: calc(100% - 24px);
}
/* Modos de dibujo: arriba del mapa (centrados). */
.mapa-toolbar-top {
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  justify-content: center;
}
/* Borrar: abajo del mapa, centrado. Pequeño para no obstruir. */
.mapa-toolbar-bottom {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  justify-content: center;
}
.mapa-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--charcoal);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.2s, border-color 0.2s, transform 0.15s var(--ease-out);
  cursor: pointer;
}
.mapa-tool-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
}
.mapa-tool-btn:active { transform: scale(0.97); }
.mapa-tool-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  /* Active state mucho más visible en mobile: ring exterior + pulse.
     Antes era solo cambio de color y la gente no se daba cuenta de
     que el modo dibujo estaba activo (rage clicks reportados en
     Clarity). El ring se ve bien en cualquier fondo del satélite. */
  box-shadow: 0 0 0 3px rgba(0, 184, 107, 0.35), 0 4px 12px rgba(0, 184, 107, 0.4);
  transform: scale(1.04);
  animation: mapa-tool-pulse 1.6s ease-in-out infinite;
}
@keyframes mapa-tool-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0, 184, 107, 0.35), 0 4px 12px rgba(0, 184, 107, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(0, 184, 107, 0.18), 0 4px 12px rgba(0, 184, 107, 0.4); }
}
.mapa-tool-secondary {
  color: var(--muted);
}

/* Banner instructivo dentro del mapa cuando el modo dibujo está activo.
   Aparece arriba-centro del mapa con un fondo verde para que no se
   pierda contra el satélite. La clase .nexa-drawing la pone main.js
   sobre .mapa-container al activar draw_freehand o draw_polygon.
   Tira FINA y compacta — no roba espacio al area de dibujo. */
.mapa-draw-hint {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--accent);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  line-height: 1.25;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(0, 184, 107, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 24px);
}
.mapa-container.nexa-drawing .mapa-draw-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.mapa-container.nexa-drawing .mapboxgl-canvas-container {
  cursor: crosshair;
}
/* Borrar mientras se dibuja: rojo pulsante para que el usuario lo
   identifique como salida de emergencia (cancelar el dibujo). Sin
   esto el boton Borrar se confunde con el resto y la gente no sabe
   que ahi puede deshacer el polígono mid-construction. */
.mapa-container.nexa-drawing #clearBtn {
  background: #EF4444;
  color: #fff;
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28), 0 4px 12px rgba(239, 68, 68, 0.32);
  animation: clearBtn-pulse 1.6s ease-in-out infinite;
}
.mapa-container.nexa-drawing #clearBtn:hover {
  background: #DC2626;
  border-color: #DC2626;
}
@keyframes clearBtn-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28), 0 4px 12px rgba(239, 68, 68, 0.32); }
  50%      { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.14), 0 4px 12px rgba(239, 68, 68, 0.32); }
}
/* Captura todos los touch events del mapa cuando el modo dibujo está
   activo. Sin esto, el browser interpreta el drag del dedo como
   scroll vertical (pan-y default) ANTES de que Mapbox capte el touch
   y la pagina se mueve en vez del polígono. */
.mapa-container.nexa-drawing #map,
.mapa-container.nexa-drawing .mapboxgl-canvas-container,
.mapa-container.nexa-drawing .mapboxgl-canvas {
  touch-action: none;
  -ms-touch-action: none;
}
/* Mientras dibuja, bloqueamos el scroll de la pagina entera. Asi el
   usuario puede mover el dedo libre sin que la vista se mueva, ni que
   iOS haga rubber-band scroll arriba/abajo. La toolbar y los botones
   siguen tappables porque están dentro del flujo normal del DOM. */
body.nexa-drawing-active {
  overflow: hidden;
  touch-action: none;
  -ms-touch-action: none;
  overscroll-behavior: none;
}
@media (max-width: 768px) {
  .mapa-draw-hint {
    top: 6px;
    font-size: 0.68rem;
    padding: 4px 10px;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
  }
}

/* Aviso para usuarios en FB/IG in-app browser. WebGL/Mapbox es flaky
   ahí. Mostramos amarillo suave (no rojo) — no es un error técnico
   confirmado, solo una advertencia preventiva. */
.mapa-fb-warning {
  background: #fff8e1;
  border: 1px solid #f6d97f;
  color: #5a4500;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 12px;
}
.mapa-fb-warning strong { color: #3d2f00; }

/* Fallback cuando Mapbox falla al inicializar (WebGL bloqueado, etc.).
   Reemplaza el contenido de #map con un mensaje claro + CTA a WhatsApp
   para no perder al lead. */
.mapa-init-error {
  height: 100%;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-md);
}
.mapa-init-error strong { color: var(--charcoal); font-size: 1.05rem; }
.mapa-init-error a {
  color: var(--accent-dark);
  text-decoration: underline;
  font-weight: 600;
}
.mapa-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.mapa-result-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
.mapa-result-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.mapa-result-value {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--charcoal);
  font-family: 'Geist Mono', monospace;
}
.mapa-result-price .mapa-result-value {
  color: var(--accent-dark);
}
.mapa-cta {
  text-align: center;
  padding: 24px;
  background: var(--accent-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-light);
}
.mapa-cta p {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 16px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .mapa-search { flex-direction: column; }
  /* Mobile: mapa MUCHO mas alto. Usamos vh (universal, todos los
     browsers lo soportan) en lugar de dvh. 78vh en una pantalla de
     720px = ~560px reales; en pantalla de 850px = ~660px. Garantia
     minima de 560px en cualquier dispositivo. Antes era 350-500px y
     se sentia chico para trazar un techo. */
  #map {
    height: 78vh;
    min-height: 560px;
    max-height: 820px;
  }
  .mapa-results { grid-template-columns: 1fr 1fr; }
  /* Toolbar TOP en mobile: arriba centrado, botones flexibles para
     que entren los dos lado a lado sin desbordar. */
  .mapa-toolbar-top {
    top: 10px;
    gap: 6px;
    flex-wrap: nowrap;
  }
  /* Toolbar BOTTOM: abajo centrado. */
  .mapa-toolbar-bottom {
    bottom: 10px;
  }
  .mapa-tool-btn { padding: 7px 10px; font-size: 0.72rem; gap: 4px; }
  .mapa-tool-btn svg { width: 14px; height: 14px; }
  /* En mobile, el banner instructivo se baja para no chocar con la
     toolbar de modos que ahora vive arriba. */
  .mapa-container.nexa-drawing .mapa-draw-hint {
    top: 56px;
  }
}

/* ============================================================
   COTIZADOR-PRO — shell unificado mapa+simulador (PR #2)
   --------------------------------------------------------------
   Wrapper visual que envuelve los nodos #mapa y #simulador en
   un solo card con split izq/der. NO toca selectores existentes
   (.mapa-section, .simulador, .mapa-card, .simulador-card) —
   cotizador.html standalone sigue usando esos. Aquí solo
   override los hijos cuando viven dentro de .cotizador-pro.
   ============================================================ */
.cotizador-pro {
  padding: 56px 0 72px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.cotizador-pro-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 24px;
}
.cotizador-pro-header .section-title,
.cotizador-pro-header .section-desc {
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}
.cotizador-pro-header .section-desc {
  max-width: 60ch;
}
.cotizador-pro .simulador-tope-banner {
  max-width: 1180px;
  margin: 0 auto 16px;
}
.cotizador-pro-card {
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.18);
  display: grid;
  /* El mapa toma 2/3 del card, el simulador 1/3 — el techo es lo que
     vende. El card respeta el max-width 1200 del .section-inner padre
     (no expandimos: el usuario quiere ancho normal, solo más mapa). */
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  align-items: stretch;
}

/* — columnas — */
.cot-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* relative para que el overlay del gate (lock) se siga
     posicionando contra la columna y no se desborde */
  position: relative;
}
.cot-col-hd {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.cot-col-num {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.cot-col-ttl {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--charcoal);
}

/* — col mapa: TODOS los hijos forzados al 100% de la columna.
     El !important es defensivo: el .mapa-card original tiene
     max-width: 960px + margin: 0 auto que lo encogía dentro de
     la columna; aquí garantizamos que se expanda al ancho total. */
.cotizador-pro #mapa,
.cotizador-pro .mapa-card,
.cotizador-pro .mapa-search,
.cotizador-pro .mapa-container,
.cotizador-pro .mapa-results {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}
.cotizador-pro .mapa-card {
  gap: 14px;
}
.cotizador-pro .mapa-container {
  /* min-width:0 evita que un canvas con dimensión cacheada force
     el container a expandirse fuera del grid track */
  min-width: 0;
}
.cotizador-pro #map {
  /* Altura ajustada para que TODO el cotizador (header + card)
     entre en un viewport de escritorio sin scroll. */
  width: 100% !important;
  height: min(52vh, 460px);
  min-height: 360px;
}
.cotizador-pro .mapa-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px;
}
.cotizador-pro .mapa-result-value {
  font-size: 1.05rem;
}
.cotizador-pro .mapa-result-label {
  font-size: 0.65rem;
}

/* — col simulador: el simulador-card original es un split
     interno (input | divider | results). Dentro del unificado lo
     colapsamos a una sola columna apilada (input arriba, results
     abajo) y le quitamos el chrome de card propio (ya estamos
     dentro de un card mayor). — */
.cotizador-pro .simulador-card {
  max-width: 100%;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.cotizador-pro .simulador-input-section {
  gap: 10px;
}
.cotizador-pro .simulador-options {
  gap: 12px;
}
.cotizador-pro .simulador-divider {
  width: 100%;
  height: 1px;
  align-self: auto;
}
.cotizador-pro .simulador-amount {
  font-size: 1.85rem;
}
.cotizador-pro .simulador-results {
  gap: 10px;
}

/* — PITCH CARD: bloque oscuro único que concentra TODO lo que vende.
     Kicker verde + ahorro mensual gigante + filas inline (sistema,
     factura, inversión, ROI) + CTA verde integrado. Es el "cierre de
     venta" visual — por eso oscuro, por eso solo uno. — */
.cotizador-pro .sim-pitch {
  background: var(--charcoal);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.cotizador-pro .sim-pitch-kicker {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.cotizador-pro .sim-pitch-hero {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}
.cotizador-pro .sim-pitch-currency {
  font-family: 'Geist Mono', monospace;
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}
.cotizador-pro .sim-pitch-amount {
  font-family: 'Geist Mono', monospace;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.cotizador-pro .sim-pitch-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cotizador-pro .sim-pitch-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cotizador-pro .sim-pitch-row:last-child {
  border-bottom: none;
}
.cotizador-pro .sim-pitch-row-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}
.cotizador-pro .sim-pitch-row-value {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Geist Mono', monospace;
  color: #fff;
  text-align: right;
}
.cotizador-pro .sim-pitch-row-sep {
  color: rgba(255, 255, 255, 0.35);
}
.cotizador-pro .sim-pitch-cta {
  margin-top: 4px;
}
.cotizador-pro .sim-pitch-cta.btn-accent {
  /* el CTA verde ya es accent, pero adentro del card oscuro le damos
     un poco más de presencia sin cambiar el color de marca */
  box-shadow: 0 8px 24px -8px rgba(0, 184, 107, 0.55);
}

/* — <details> colapsable para info técnica — */
.cotizador-pro .sim-details {
  margin-top: 2px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.cotizador-pro .sim-details > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  padding: 4px 0;
  user-select: none;
}
.cotizador-pro .sim-details > summary::-webkit-details-marker { display: none; }
.cotizador-pro .sim-details > summary:hover { color: var(--charcoal); }
.cotizador-pro .sim-details-chev {
  transition: transform 0.2s ease;
}
.cotizador-pro .sim-details[open] .sim-details-chev {
  transform: rotate(180deg);
}
.cotizador-pro .sim-details-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
}
.cotizador-pro .sim-details-body .result-item .result-value,
.cotizador-pro .sim-details-body .result-inline .result-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
}
.cotizador-pro .sim-details-body .result-inline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
/* Aviso "Estos valores son estimaciones..." vive ahora dentro del
   <details> técnico — variante compacta para no romper jerarquía */
.cotizador-pro .sim-details-body .simulador-aviso {
  margin-top: 4px;
  padding: 10px 12px;
  font-size: 0.74rem;
  line-height: 1.45;
}
.cotizador-pro .sim-details-body .simulador-aviso p {
  font-size: 0.74rem;
  line-height: 1.45;
  margin: 0;
}

/* — frases motivacionales debajo del card — */
.cotizador-pro .simulador-frases {
  max-width: 1180px;
  margin: 32px auto 0;
}

/* — Nuevo flujo: mapa abierto desde el inicio, simulador bloqueado.
     Cuando el cotizador-pro está locked, ocultamos los resultados
     numéricos del mapa, el banner-tope y las frases de impacto.
     Solo dejamos el dibujo visible para crear urgencia. — */
.cotizador-pro[data-locked="1"] #mapaResults,
.cotizador-pro[data-locked="1"] #topeBanner,
.cotizador-pro[data-locked="1"] .simulador-frases {
  display: none !important;
}

/* — responsive: bajo de 1024px stack vertical (mapa arriba, simulador abajo) — */
@media (max-width: 1024px) {
  .cotizador-pro-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  /* Mapa más bajo en tablet — el viewport es más alto que en escritorio
     pero más angosto, no necesitamos tanta altura */
  .cotizador-pro #map {
    height: 420px;
    min-height: 360px;
  }
}

/* — tablet vertical / phone landscape — */
@media (max-width: 768px) {
  .cotizador-pro {
    padding: 48px 0 64px;
  }
  .cotizador-pro-header {
    margin-bottom: 20px;
  }
  .cotizador-pro-card {
    padding: 16px;
    gap: 24px;
    border-radius: var(--radius-md);
  }
  .cot-col-hd {
    padding-bottom: 10px;
  }
  .cot-col-ttl {
    font-size: 0.95rem;
  }
  .cot-col-num {
    font-size: 0.78rem;
  }
  /* MAPA EN MOBILE: alto de verdad, no 340px. Esto es lo que el
     usuario veia chico antes — habia un override de .cotizador-pro #map
     a 340px que ganaba por specificity sobre el rule generico de #map.
     78vh = ~660px en iPhone 14 / Galaxy típico. Con min de 540px
     garantizamos que aun en pantallas chicas se ve digno. */
  .cotizador-pro #map {
    height: 78vh;
    min-height: 540px;
    max-height: 800px;
  }
  /* mapa-results: en móvil 2x2 cabe mejor que 4 cols comprimidas */
  .cotizador-pro .mapa-results {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
    gap: 8px;
  }
  .cotizador-pro .mapa-result-value {
    font-size: 1rem;
  }
  /* Pitch card en móvil: paddings y hero un poco menores */
  .cotizador-pro .sim-pitch {
    padding: 14px 14px 12px;
    gap: 10px;
  }
  .cotizador-pro .sim-pitch-amount {
    font-size: 1.7rem;
  }
  /* Pills del simulador (estrato/tipo) — wrap en pantallas estrechas */
  .cotizador-pro .simulador-pills {
    flex-wrap: wrap;
  }
}

/* — phone vertical (≤480px): apretar todavía más — */
@media (max-width: 480px) {
  .cotizador-pro {
    padding: 40px 0 56px;
  }
  .cotizador-pro-card {
    padding: 14px;
    gap: 20px;
  }
  /* Phones chicos (iPhone SE, viejo Android): mantener proporcion
     pero aceptar un piso mas chico para no romper layout. 75vh en un
     iPhone SE (568px) = 426px. Con min de 460px aseguramos espacio
     digno para dibujar incluso en lo mas chico. */
  .cotizador-pro #map {
    height: 75vh;
    min-height: 460px;
  }
  .cotizador-pro .mapa-results {
    padding: 10px;
    gap: 6px;
  }
  .cotizador-pro .mapa-result-value {
    font-size: 0.92rem;
  }
  .cotizador-pro .mapa-result-label {
    font-size: 0.6rem;
  }
  .cotizador-pro .sim-pitch {
    padding: 12px;
  }
  .cotizador-pro .sim-pitch-amount {
    font-size: 1.5rem;
  }
  .cotizador-pro .sim-pitch-currency {
    font-size: 1rem;
  }
  .cotizador-pro .sim-pitch-row-label,
  .cotizador-pro .sim-pitch-row-value {
    font-size: 0.72rem;
  }
  /* Header del cotizador: title y desc más legibles en pantallita */
  .cotizador-pro-header .section-title {
    font-size: 1.6rem;
  }
  .cotizador-pro-header .section-desc {
    font-size: 0.88rem;
  }
}

/* ============================================================
   FLEET MAP — mapa de la flota Nexa (entre hero y problema)
   ============================================================ */
.fleet-map-section {
  padding: 88px 0 96px;
  background: var(--bg);
}
/* Variante página dedicada — necesita más aire arriba para no chocar
   con la navbar fija (64px) y abajo para que el footer respire. */
.fleet-map-section-page { padding: 128px 0 96px; }
.fleet-page-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
}
@media (max-width: 768px) {
  .fleet-map-section-page { padding: 96px 0 72px; }
  .fleet-page-cta { gap: 10px; margin-top: 24px; }
}
.fleet-map-section .section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
}
.fleet-map-section .section-desc {
  margin-top: 8px;
  text-wrap: balance;
}

.fleet-map-card {
  background: var(--charcoal);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #fff;
}

/* Toolbar superior: stats izquierda, filtros derecha */
.fleet-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 6px;
}
.fleet-stats {
  display: flex;
  gap: 22px;
}
.fleet-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}
.fleet-stat-val {
  font-family: 'Geist Mono', monospace;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.fleet-stat-lbl {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* Filtros pill */
.fleet-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.fleet-pill {
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.fleet-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.fleet-pill.active {
  background: #fff;
  color: var(--charcoal);
  border-color: #fff;
}
.fleet-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #888;
  vertical-align: middle;
}
.fleet-dot-residencial { background: #00B86B; }
.fleet-dot-comercial   { background: #3FA9F5; }
.fleet-dot-industrial  { background: #FF8A3D; }

/* Mapa */
.fleet-map-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0e0e1a;
}
.fleet-map {
  width: 100%;
  height: min(58vh, 520px);
  min-height: 380px;
}
.fleet-map-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.04em;
  background: #0e0e1a;
  z-index: 2;
}
.fleet-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: fleet-spin 0.8s linear infinite;
}
@keyframes fleet-spin {
  to { transform: rotate(360deg); }
}
.fleet-map-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 14, 26, 0.94);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
}

/* Strip de destacados bajo el mapa — case studies con foto.
   Desktop: grid de 4 cols. Mobile: scroll horizontal con snap. */
.fleet-featured {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 4px 0;
}
.fleet-featured-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}
.fleet-featured-title {
  font-family: 'Geist Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F4C542;
}
.fleet-featured-hint {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
}
/* Marquee infinito — el track contiene 2x el set de cards y se desplaza
   de 0 a -50% en loop. Pause on hover para que el usuario pueda leer. */
.fleet-featured-strip {
  position: relative;
  overflow: hidden;
  /* fade lateral para que las cards no aparezcan/desaparezcan de golpe */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.fleet-featured-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: fleet-marquee 38s linear infinite;
}
.fleet-featured-strip:hover .fleet-featured-track,
.fleet-featured-strip:focus-within .fleet-featured-track {
  animation-play-state: paused;
}
@keyframes fleet-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .fleet-featured-track { animation: none; }
}
.fleet-fcard {
  appearance: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  color: #fff;
  text-align: left;
  display: flex;
  flex-direction: column;
  flex: 0 0 220px;
  width: 220px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.fleet-fcard:hover {
  transform: translateY(-2px);
  background: rgba(244, 197, 66, 0.06);
  border-color: rgba(244, 197, 66, 0.35);
}
.fleet-fcard-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: #0e0e1a;
}
.fleet-fcard-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.fleet-fcard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fleet-fcard-tag {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 197, 66, 0.9);
  background: rgba(244, 197, 66, 0.12);
  padding: 2px 6px;
  border-radius: 999px;
}
.fleet-fcard-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-top: 2px;
}
.fleet-fcard-meta {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'Geist Mono', monospace;
}

/* Nota legal/leyenda inferior */
.fleet-note {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin: 0;
  padding: 4px 6px 2px;
  line-height: 1.5;
}
.fleet-note .fleet-dot {
  margin: 0 2px 0 6px;
}

/* Popup Mapbox custom — versión compacta (pins anónimos) */
.fleet-popup-wrap .mapboxgl-popup-content {
  background: var(--charcoal);
  color: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.6);
  font-family: inherit;
}
.fleet-popup-wrap .mapboxgl-popup-tip {
  border-top-color: var(--charcoal);
  border-bottom-color: var(--charcoal);
}

/* Popup grande — case study (pins destacados) */
.fleet-popup-wrap-featured .mapboxgl-popup-content {
  padding: 0;
  overflow: hidden;
  max-width: 320px;
  border: 1px solid rgba(244, 197, 66, 0.3);
}
.fleet-popup-wrap-featured .mapboxgl-popup-close-button {
  color: #fff;
  right: 6px;
  top: 2px;
  font-size: 20px;
}
.fleet-popup-featured { display: flex; flex-direction: column; }
.fleet-popup-photo {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: #0e0e1a;
}
.fleet-popup-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fleet-popup-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fleet-popup-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 197, 66, 0.9);
  background: rgba(244, 197, 66, 0.12);
  padding: 3px 7px;
  border-radius: 999px;
}
.fleet-popup-name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 2px 0 0;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fleet-popup-logo {
  height: 16px;
  width: auto;
  opacity: 0.9;
}
.fleet-popup-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
  margin: 0;
}
.fleet-popup-wrap-featured .fleet-popup-meta {
  margin-top: 4px;
}
.fleet-popup-type {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.fleet-popup-residencial { background: rgba(0, 184, 107, 0.18); color: #4ee3a3; }
.fleet-popup-comercial   { background: rgba(63, 169, 245, 0.18); color: #7cc5ff; }
.fleet-popup-industrial  { background: rgba(255, 138, 61, 0.18); color: #ffb27a; }
.fleet-popup-city {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.fleet-popup-meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  font-family: 'Geist Mono', monospace;
  margin-top: 2px;
}

/* Cooperative gestures Mapbox: ocultar el "Use ctrl + scroll" feo */
.fleet-map-wrap .mapboxgl-canvas-container.mapboxgl-interactive {
  cursor: grab;
}

/* Responsive */
@media (max-width: 1024px) {
  .fleet-map-section { padding: 64px 0 80px; }
  .fleet-map-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .fleet-stats { justify-content: space-between; gap: 12px; }
  .fleet-filters { justify-content: center; }
}
@media (max-width: 768px) {
  .fleet-map-section { padding: 48px 0 60px; }
  .fleet-map-card {
    padding: 14px;
    border-radius: var(--radius-md);
  }
  .fleet-stat-val { font-size: 1.05rem; }
  .fleet-stat-lbl { font-size: 0.6rem; }
  .fleet-stats { gap: 10px; }
  .fleet-pill { font-size: 0.72rem; padding: 6px 10px; }
  .fleet-map { height: 380px; min-height: 0; }
  .fleet-note { font-size: 0.66rem; }
  /* Marquee: cards un poco más chicas en mobile */
  .fleet-fcard { flex: 0 0 180px; width: 180px; }
  .fleet-featured-track { animation-duration: 30s; }
}
@media (max-width: 480px) {
  .fleet-map-card { padding: 12px; gap: 10px; }
  .fleet-map { height: 320px; }
  .fleet-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
  }
  .fleet-stat { align-items: center; }
}

/* ---- WHY NEXA ---- */
.why-nexa {
  padding: 120px 0;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--transition);
}
.why-card:hover {
  border-color: rgba(0, 184, 107, 0.3);
  box-shadow: 0 8px 24px -8px rgba(0, 184, 107, 0.1);
  transform: translateY(-2px);
}
.why-icon {
  margin-bottom: 20px;
  width: 48px;
  height: 48px;
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.why-card h3 { margin-bottom: 10px; }
.why-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================================
   NOSOTROS PAGE
   ============================================ */
.nosotros-page { background: var(--bg); }

/* Hero */
.nosotros-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px 64px;
  text-align: center;
}
.nosotros-eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}
.nosotros-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--charcoal);
  margin: 0 0 24px;
  font-weight: 800;
}
.nosotros-hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto 48px;
}
.nosotros-hero-sub strong {
  color: var(--ink);
  font-weight: 600;
}
.nosotros-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: 780px;
  margin: 0 auto;
}
.nhs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.nhs-num {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum';
}
.nhs-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: -0.005em;
}

/* Misión / Visión */
.nosotros-mv {
  padding: 80px 0;
}
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}
.mv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px 36px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.mv-card:hover {
  border-color: rgba(0, 184, 107, 0.3);
  box-shadow: 0 8px 24px -8px rgba(0, 184, 107, 0.1);
}
.mv-label {
  display: inline-block;
  font-family: 'Geist Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
  font-weight: 600;
}
.mv-card p {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
}

/* Valores */
.nosotros-valores {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.valores-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.valor-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  transition: border-color 0.3s, transform 0.3s var(--transition), box-shadow 0.3s;
}
.valor-item:hover {
  border-color: rgba(0, 184, 107, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(0, 184, 107, 0.1);
}
.valor-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.valor-item h3 {
  font-size: 0.98rem;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.valor-item p {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* Timeline */
.nosotros-timeline {
  padding: 120px 0;
}
.timeline {
  max-width: 780px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 72px;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 60px 24px 1fr;
  gap: 20px;
  align-items: start;
  padding: 0 0 40px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-year {
  font-family: 'Geist Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  padding-top: 4px;
  letter-spacing: 0.02em;
}
.timeline-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  margin-top: 6px;
  justify-self: center;
  position: relative;
  z-index: 1;
  transition: border-color 0.3s, transform 0.3s;
}
.timeline-dot-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 184, 107, 0.15);
}
.timeline-item:hover .timeline-dot:not(.timeline-dot-active) {
  border-color: var(--accent);
  transform: scale(1.1);
}
.timeline-content h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
  letter-spacing: -0.015em;
}
.timeline-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.timeline-content p:not(.timeline-meta) {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* Garantías full */
.nosotros-garantias-full {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.garantias-full-list {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}
.garantia-full-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 36px 32px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  align-items: start;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  scroll-margin-top: 120px;
}
.garantia-full-item:hover {
  border-color: rgba(0, 184, 107, 0.3);
  box-shadow: 0 8px 24px -8px rgba(0, 184, 107, 0.1);
  transform: translateY(-2px);
}
.gf-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gf-body h3 {
  font-size: 1.28rem;
  margin: 4px 0 14px;
  letter-spacing: -0.02em;
}
.gf-body p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 14px;
}
.gf-body p strong {
  color: var(--charcoal);
  font-weight: 600;
}
.gf-features {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
  display: grid;
  gap: 8px;
}
.gf-features li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}
.gf-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}
.gf-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.25s var(--transition);
}
.gf-link:hover {
  transform: translateX(3px);
}

/* Responsive: Nosotros */
@media (max-width: 1024px) {
  .valores-grid { grid-template-columns: repeat(3, 1fr); }
  .nosotros-hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 768px) {
  .nosotros-hero { padding: 60px 20px 40px; }
  .nosotros-hero h1 { font-size: 2rem; }
  .nosotros-mv { padding: 60px 0; }
  .mv-grid { grid-template-columns: 1fr; }
  .mv-card { padding: 32px 28px; }
  .mv-card p { font-size: 1rem; }
  .nosotros-valores { padding: 60px 0; }
  .valores-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .valor-item { padding: 22px 18px; }
  .nosotros-timeline { padding: 60px 0; }
  .timeline::before { left: 54px; }
  .timeline-item { grid-template-columns: 44px 20px 1fr; gap: 14px; padding-bottom: 32px; }
  .timeline-year { font-size: 0.72rem; }
  .timeline-content h3 { font-size: 1rem; }
  .timeline-meta { font-size: 0.68rem; }
  .timeline-content p:not(.timeline-meta) { font-size: 0.88rem; }
  .nosotros-garantias-full { padding: 60px 0; }
  .garantia-full-item { grid-template-columns: 1fr; padding: 28px 24px; gap: 18px; }
  .gf-icon { width: 48px; height: 48px; }
  .gf-body h3 { font-size: 1.15rem; }
}

/* ---- GARANTÍAS / CREDENCIALES ---- */
.garantias {
  padding: 120px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.garantias-header {
  text-align: center;
  margin-bottom: 64px;
}
.garantias-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 8px;
}
.garantias-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.garantia-item {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  text-align: left;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--transition);
}
.garantia-item:hover {
  border-color: rgba(0, 184, 107, 0.3);
  box-shadow: 0 8px 24px -8px rgba(0, 184, 107, 0.1);
  transform: translateY(-2px);
}
.garantia-item:hover .garantia-more {
  color: var(--accent);
  transform: translateX(3px);
}
.garantia-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.005em;
  transition: color 0.25s var(--transition), transform 0.25s var(--transition);
}
.garantia-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.garantia-item h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.garantia-item p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---- ESCENARIOS DE APLICACIÓN ---- */
.escenarios {
  padding: 120px 0;
  background: var(--bg);
}
.escenarios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.escenario-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, box-shadow 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.escenario-card:hover {
  border-color: rgba(0, 184, 107, 0.28);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.14);
  transform: translateY(-3px);
}

/* ---- Visual container — Luxpower-style neutral backdrop ---- */
.escenario-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 40%, #FFFFFF 0%, #F2F4F7 58%, #E4E8EE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Ground shadow — the subtle drop beneath the "floating" product */
.escenario-visual::after {
  content: '';
  position: absolute;
  bottom: 16%;
  left: 50%;
  width: 55%;
  height: 14px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.14), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}
.escenario-visual img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.escenario-card:hover .escenario-visual img {
  transform: scale(1.05);
}

/* When an image is present, hide the placeholder + ground shadow + backdrop
   (the image brings its own background — usually a contextual scene) */
.escenario-visual:has(img) {
  background: #0A0A0A;
}
.escenario-visual:has(img)::after {
  display: none;
}
.escenario-visual:has(img) .escenario-placeholder {
  display: none;
}

/* Subtle bottom gradient overlay on image cards for depth */
.escenario-visual:has(img)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    to bottom,
    transparent 55%,
    rgba(0, 0, 0, 0.18) 100%
  );
  pointer-events: none;
}

/* Placeholder — elegant "render pendiente" state */
.escenario-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(26, 26, 46, 0.18);
  transition: transform 0.6s var(--ease-out), color 0.4s ease;
}
.escenario-card:hover .escenario-placeholder {
  color: rgba(0, 184, 107, 0.4);
  transform: scale(1.03);
}
.escenario-placeholder-icon {
  width: 56px;
  height: 56px;
  color: inherit;
}
.escenario-placeholder-text {
  font-family: 'Geist Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(26, 26, 46, 0.32);
}

/* ---- Content ---- */
.escenario-content {
  padding: 24px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.escenario-num {
  font-family: 'Geist Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.escenario-card h3 {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  margin-top: 2px;
  line-height: 1.25;
}
.escenario-tagline {
  font-family: 'Geist Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin: 0;
}
.escenario-content > p:not(.escenario-tagline) {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 8px;
  flex: 1;
}
.escenario-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.escenario-tags .tag {
  font-size: 0.62rem;
  padding: 3px 8px;
}

@media (max-width: 1100px) {
  .escenarios-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .escenario-card h3 { font-size: 1.2rem; }
  .escenario-content { padding: 28px 26px 30px; }
}
@media (max-width: 640px) {
  .escenarios { padding: 80px 0; }
  .escenarios-grid { grid-template-columns: 1fr; }
  .escenario-visual { aspect-ratio: 16 / 10; }
}

/* ---- PROYECTOS ---- */
.proyectos { padding: 120px 0; background: var(--surface); border-top: 1px solid var(--border); }
/* Carousel wrapper */
.proyectos-carousel-wrapper {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
}
.proyectos-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0 16px;
}
.proyectos-carousel::-webkit-scrollbar { display: none; }
.proyectos-carousel .proyecto-card {
  flex: 0 0 calc(33.333% - 16px);
  scroll-snap-align: start;
}
.proyectos-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: background 0.2s, transform 0.2s;
}
.proyectos-arrow:hover {
  background: var(--charcoal);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}
.proyectos-arrow-left { left: -22px; }
.proyectos-arrow-right { right: -22px; }
.proyecto-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: transform 0.3s var(--transition), box-shadow 0.3s;
}
.proyecto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
}
.proyecto-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.proyecto-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--transition);
  filter: saturate(0.7) contrast(1.05);
}
.proyecto-card:hover .proyecto-img img { transform: scale(1.04); }
.proyecto-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(10,10,10,0.3));
}
.proyecto-info { padding: 24px; }
.proyecto-logo {
  height: 22px;
  width: auto;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  opacity: 0.7;
}
.proyecto-tags { display: flex; gap: 8px; margin-bottom: 12px; }
.proyecto-datos {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.proyecto-info h3 { margin-bottom: 8px; font-size: 1.1rem; }
.proyecto-info p { font-size: 0.875rem; color: var(--muted); margin-bottom: 12px; }
.proyecto-quote {
  font-size: 0.85rem;
  color: var(--ink);
  font-style: italic;
  line-height: 1.6;
  padding-left: 16px;
  border-left: 2px solid var(--accent-light);
  margin: 0;
}

/* ---- BLOG ---- */
.blog { padding: 120px 0; }
.blog-carousel-wrapper {
  position: relative;
  overflow: hidden;
}
.blog-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.blog-grid::-webkit-scrollbar { display: none; }
.blog-grid .blog-card {
  flex: 0 0 calc(33.333% - 16px);
  scroll-snap-align: start;
  min-width: 280px;
}
.blog-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.blog-arrow:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,184,107,0.25);
}
.blog-arrow:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.blog-arrow-left { left: -4px; }
.blog-arrow-right { right: -4px; }
.blog-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.blog-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.blog-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}
.blog-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.3s var(--transition), box-shadow 0.3s;
  cursor: pointer;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(0,0,0,0.08);
}
.blog-img {
  aspect-ratio: 3/2;
  overflow: hidden;
}
.blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--transition);
}
.blog-card:hover .blog-img img { transform: scale(1.04); }
.blog-content { padding: 24px; }
.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.blog-date {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'Geist Mono', monospace;
}
.blog-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent-dark);
}
.blog-content h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}
.blog-content p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.blog-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s;
}
.blog-card:hover .blog-link { gap: 10px; }

/* ---- LABELS (simulador) ---- */
label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}

/* ---- FOOTER ---- */
.footer {
  background: var(--charcoal);
  padding: 72px 0 32px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  /* Layout: brand (con canales debajo) | servicios | empresa.
     Usamos display:contents en .footer-links abajo para que las cols
     entren directo al grid del padre y poder posicionarlas. */
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
/* Aplana la jerarquía: las 3 footer-cols se vuelven hijas directas
   del grid de footer-inner. Así "Canales de atención" puede ir debajo
   del brand sin necesidad de mover HTML. */
.footer-links { display: contents; }
.footer-brand { grid-column: 1; grid-row: 1; }
.footer-links > .footer-col:nth-child(1) { grid-column: 2; grid-row: 1 / span 2; }
.footer-links > .footer-col:nth-child(2) { grid-column: 3; grid-row: 1 / span 2; }
.footer-links > .footer-col:nth-child(3) { grid-column: 1; grid-row: 2; margin-top: -16px; }
.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.footer-slogan {
  font-family: 'Xspace', 'Inter', sans-serif;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}
.footer-brand p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.15s var(--ease-out);
}
.social-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.social-btn:active { transform: scale(0.96); }
.social-btn svg { flex-shrink: 0; }
.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
  font-family: 'Geist Mono', monospace;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col li {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-col a:hover { color: #FFFFFF; }
.footer-legal {
  max-width: var(--max-w);
  margin: 40px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.38);
}
.footer-legal-links a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.25s var(--transition);
}
.footer-legal-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}
.footer-legal-links span {
  color: rgba(255, 255, 255, 0.18);
}
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { font-size: 0.78rem; color: rgba(255,255,255,0.25); }
.footer-badges {
  display: flex;
  gap: 8px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.25);
}

/* ---- WHATSAPP FLOAT ---- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 90;
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
  .garantias-grid { grid-template-columns: 1fr 1fr; }
  .proyectos-carousel .proyecto-card { flex: 0 0 calc(50% - 12px); }
  .proyectos-arrow-left { left: 4px; }
  .proyectos-arrow-right { right: 4px; }
  .blog-grid .blog-card { flex: 0 0 calc(50% - 12px); }
  .financiacion-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1; grid-row: 1; }
  .footer-links > .footer-col:nth-child(1) { grid-column: 2; grid-row: 1; }
  .footer-links > .footer-col:nth-child(2) { grid-column: 2; grid-row: 2; }
  .footer-links > .footer-col:nth-child(3) { grid-column: 1; grid-row: 2; margin-top: 0; }
  .simulador-card { grid-template-columns: 1fr; gap: 32px; }
  .simulador-divider { width: 100%; height: 1px; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.6rem; }
  h2 { font-size: 2rem; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Hero móvil: oculta el live-card (data en tiempo real ocupa mucho
     espacio en pantalla pequeña). El lead nuevo es corto y vendedor —
     queremos que se lea junto al H1, no oculto. */
  .live-card { display: none; }
  .hero-live-grid { gap: 14px; }
  /* H1 más pequeño en móvil + white-space:nowrap para garantizar que
     "Smart Energy" y "Connected Future" cada uno quede en una sola
     línea (el <br> en el HTML separa las dos lineas, pero sin nowrap
     "Connected Future" se rompia en 2 → 3 lineas total). */
  .hero-live-h1 { font-size: clamp(1.15rem, 4.5vw, 1.5rem); white-space: nowrap; line-height: 1.15; }
  .hero-live-lead {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 24px 0 22px;
    max-width: 100%;
  }

  /* Servicios mobile: tarjetas mínimas — ícono + título + descripción corta.
     Sin tags ni CTA para sentirse limpio en pantalla chica */
  .servicio-card { flex: 0 0 220px; width: 220px; padding: 20px 18px; }
  .servicio-card .servicio-tags { display: none; }
  .servicio-card .servicio-cta { display: none; }
  .servicio-card p { margin-bottom: 0; }
  .servicio-icon { width: 38px; height: 38px; margin-bottom: 14px; }
  .servicio-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
  .servicios-track { animation-duration: 42s; gap: 12px; animation-name: servicios-marquee-mobile; }
  @keyframes servicios-marquee-mobile {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-50% - 6px)); }
  }
  .why-grid { grid-template-columns: 1fr; }
  .garantias-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .garantia-item { padding: 24px 20px; }
  .garantias-header { margin-bottom: 48px; }
  .proyectos-carousel .proyecto-card { flex: 0 0 85%; }
  .proyectos-arrow { width: 36px; height: 36px; }
  .proyectos-arrow-left { left: 4px; }
  .proyectos-arrow-right { right: 4px; }
  .blog-grid .blog-card { flex: 0 0 calc(100% - 16px); }
  .blog-arrow { width: 36px; height: 36px; }
  .financiacion-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand { grid-column: 1; grid-row: 1; }
  .footer-links > .footer-col:nth-child(1) { grid-column: 1; grid-row: 2; }
  .footer-links > .footer-col:nth-child(2) { grid-column: 1; grid-row: 3; }
  .footer-links > .footer-col:nth-child(3) { grid-column: 1; grid-row: 4; margin-top: 0; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer-legal { margin-top: 28px; padding: 20px 20px 0; }
  .footer-legal-links { justify-content: center; text-align: center; font-size: 0.72rem; gap: 8px; }
  .cta-final-buttons { flex-direction: column; }
  .servicios, .proyectos, .why-nexa, .blog, .financiacion, .simulador, .cta-final, .problema, .garantias { padding: 80px 0; }
  .proceso { padding: 56px 0; }
  .result-row-roi { grid-template-columns: 1fr; gap: 12px; }

  /* --- Mobile: condensar contenido --- */
  /* Ocultar sección escenarios (muy larga) */
  .escenarios { display: none; }

  /* Ocultar sección problema (refuerzo, no esencial) */
  .problema { display: none; }

  /* (Antiguo: ocultar pasos 6+. Ya no aplica — la sección proceso
     usa scroll horizontal en mobile y muestra los 5 pasos en swipe.) */

  /* Por qué NEXA: ocultar descripciones */
  .why-card p { display: none; }

  /* Servicios: texto más corto */
  .servicio-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* Secciones descripción más corta */
  .section-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* Simulador frases extras */
  .simulador-frases { display: none; }

  /* Blog: solo mostrar 2 cards */
  .blog-card:nth-child(n+3) { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-big { font-size: 2.4rem; }
  .simulador-amount { font-size: 2rem; }
  .simulador-pills { flex-wrap: wrap; }
}

/* ---- MOBILE NAV OPEN ----
   Panel cubre todo el viewport (inset:0) y empuja los items debajo
   del nav (padding-top: 84px). El nav bar queda solido encima para
   que no se vea el contenido detras en la franja superior. Sin
   backdrop-filter: en mobile la combinacion fixed + blur(20px)
   causa lag perceptible en Safari iOS. */
.nav.open {
  background: #F4F6F8;
  border-bottom: 1px solid var(--border);
}
.nav.open .nav-links {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  background: #F4F6F8;
  padding: 84px 24px 120px;
  gap: 20px;
  z-index: 99;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav.open .nav-links a {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--charcoal);
}
.nav.open .nav-cta {
  display: block;
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  text-align: center;
  padding: 14px;
  font-size: 0.95rem;
  z-index: 100;
}
.nav.open .nav-toggle span:first-child { transform: translateY(6.5px) rotate(45deg); }
.nav.open .nav-toggle span:last-child  { transform: translateY(-6.5px) rotate(-45deg); }

/* Override critico: cuando el menu mobile esta abierto en una pagina
   con video hero (index), las reglas
   body.has-video-hero .nav:not(.scrolled) .nav-links a { color: white }
   ganaban por specificity y dejaban el texto del menu BLANCO sobre el
   fondo CLARO #F4F6F8 que pone .nav.open — totalmente ilegible. Lo
   mismo con la X de la hamburguesa (.nav-toggle span). Aca forzamos
   colores oscuros con la misma specificity + nav.open en el medio. */
body.has-video-hero .nav.open:not(.scrolled) .nav-links a,
body.has-video-hero .nav.open:not(.scrolled) .nav-links a:hover,
body.has-video-hero .nav.open:not(.scrolled) .nav-links a.active {
  color: var(--charcoal);
}
body.has-video-hero .nav.open:not(.scrolled) .nav-toggle span {
  background: var(--charcoal);
}

/* ---- SCROLL PROGRESS BAR ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  z-index: 101;
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
  pointer-events: none;
}

/* ---- CONTENT VISIBILITY — skip rendering off-screen sections ---- */
.servicios, .escenarios, .proceso, .simulador, .financiacion,
.why-nexa, .garantias, .proyectos, .blog, .cta-final, .footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

/* ---- MOBILE SCROLL PERFORMANCE ---- */
@media (max-width: 768px) {
  /* OJO: aqui NO podemos aplicar backdrop-filter al .nav.scrolled.
     Crea un containing block en el nav y rompe el menu mobile
     (ver comentario en .nav). Usamos solo background opaco. */
  .nav.scrolled {
    background: rgba(244, 246, 248, 0.97);
  }
  /* Promote hero image to own layer */
  .hero-bg img {
    transform: translateZ(0);
  }
  /* Simplify card transitions on mobile — no box-shadow transitions */
  .servicio-card,
  .why-card,
  .proyecto-card,
  .blog-card,
  .fin-card,
  .escenario-card {
    transition: none;
  }
  .proyecto-img img,
  .blog-img img,
  .escenario-visual img {
    transition: none;
  }
}

/* ---- TOUCH DEVICE OVERRIDES ----
   Gate transform-based hovers on touch so they don't stick after tap */
@media (hover: none) {
  .servicio-card:hover,
  .why-card:hover,
  .proyecto-card:hover,
  .blog-card:hover,
  .fin-card:hover,
  .whatsapp-float:hover,
  .stat-item:hover,
  .escenario-card:hover {
    transform: none;
  }
  .proyecto-card:hover .proyecto-img img,
  .blog-card:hover .blog-img img,
  .escenario-card:hover .escenario-visual img,
  .escenario-card:hover .escenario-placeholder {
    transform: none;
  }
  .simulador-slider::-webkit-slider-thumb:hover {
    transform: none;
  }
}

/* ---- STAT ITEM LIFT (desktop only) ---- */
/* Preserve opacity transition inherited from .reveal */
.stat-item {
  transition: transform 0.4s var(--ease-out), opacity 0.7s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .stat-item:hover { transform: translateY(-3px); }
}

/* ---- REDUCE MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .welcome-line-1, .welcome-line-2,
  .hero-headline, .hero-sub, .hero-content .btn-primary {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .scroll-progress { display: none; }
}

/* ============================================
   GATE — Cotizador bloqueado hasta verificar correo
============================================ */

/* Locked state applied to #mapa and #simulador when gate not completed */
.nexa-locked {
  position: relative;
}
.nexa-locked .mapa-card,
.nexa-locked .simulador-card,
.nexa-locked .simulador-frases,
.nexa-locked .simulador-tope-banner {
  filter: blur(10px) saturate(0.7);
  pointer-events: none;
  user-select: none;
  transition: filter 0.4s ease;
}
.nexa-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 24px;
  pointer-events: none;
}
.nexa-lock-overlay-inner {
  pointer-events: auto;
  background: rgba(10, 14, 18, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 184, 107, 0.25);
  border-radius: 18px;
  padding: 28px 32px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.nexa-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0, 184, 107, 0.14);
  border: 1px solid rgba(0, 184, 107, 0.35);
  color: #00B86B;
  margin-bottom: 16px;
}
.nexa-lock-overlay h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
}
.nexa-lock-overlay p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(230, 237, 243, 0.7);
  margin: 0 0 18px 0;
}
.nexa-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #00B86B;
  color: #05080B;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.nexa-lock-btn:hover {
  background: #00D27A;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 184, 107, 0.35);
}

/* Overlay con 2 estados: hint (sin polígono) y cta (ya dibujó). Solo
   uno se muestra a la vez según data-state del overlay. */
.nexa-lock-overlay[data-state="hint"] .nexa-lock-content--cta,
.nexa-lock-overlay[data-state="cta"]  .nexa-lock-content--hint,
.nexa-lock-overlay[data-state="hint"] .nexa-lock-icon-cta,
.nexa-lock-overlay[data-state="cta"]  .nexa-lock-icon-hint {
  display: none;
}
.nexa-lock-icon svg { display: block; }
/* Estado CTA: el icono se vuelve verde sólido y el card un poco más
   prominente para llamar la atención justo cuando el usuario terminó
   de dibujar. */
.nexa-lock-overlay[data-state="cta"] .nexa-lock-overlay-inner {
  border-color: rgba(0, 184, 107, 0.55);
  box-shadow: 0 30px 80px rgba(0, 184, 107, 0.18), 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: nexaLockPulse 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.nexa-lock-overlay[data-state="cta"] .nexa-lock-icon {
  background: rgba(0, 184, 107, 0.28);
  border-color: rgba(0, 184, 107, 0.6);
}
@keyframes nexaLockPulse {
  0%   { transform: scale(0.96); opacity: 0.6; }
  60%  { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Modal */
.gate-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}
.gate-modal.open {
  display: flex;
}
.gate-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 9, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: gateFadeIn 0.28s ease;
}
@keyframes gateFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gateSlideIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.gate-dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, #0D1318 0%, #080C10 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 40px 38px 34px 38px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  animation: gateSlideIn 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto 0;
}
.gate-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(230, 237, 243, 0.7);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease;
}
.gate-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.gate-header {
  margin-bottom: 24px;
}
.gate-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #00B86B;
  margin: 0 0 10px 0;
}
.gate-title {
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px 0;
}
.gate-subtitle {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(230, 237, 243, 0.65);
  margin: 0;
}
.gate-subtitle strong {
  color: #fff;
  font-weight: 600;
}
.gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gate-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(230, 237, 243, 0.75);
  letter-spacing: 0.02em;
}
.gate-optional {
  color: rgba(230, 237, 243, 0.4);
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 4px;
}
.gate-field input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #fff;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.gate-field input::placeholder {
  color: rgba(230, 237, 243, 0.3);
}
.gate-field input:focus {
  border-color: rgba(0, 184, 107, 0.55);
  background: rgba(0, 184, 107, 0.05);
  box-shadow: 0 0 0 4px rgba(0, 184, 107, 0.1);
}
.gate-field input:invalid:not(:placeholder-shown) {
  border-color: rgba(239, 68, 68, 0.5);
}
.gate-hint {
  font-size: 11px;
  color: rgba(230, 237, 243, 0.4);
  line-height: 1.4;
}
.gate-code-input {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5em;
  padding: 18px 14px;
}
.gate-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #fca5a5;
  line-height: 1.45;
}
.gate-submit {
  position: relative;
  background: #00B86B;
  color: #05080B;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 22px;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}
.gate-submit:hover:not(:disabled) {
  background: #00D27A;
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 184, 107, 0.35);
}
.gate-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}
.gate-submit.loading .gate-submit-text {
  opacity: 0;
}
.gate-spinner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(5, 8, 11, 0.3);
  border-top-color: #05080B;
  animation: gateSpin 0.8s linear infinite;
  opacity: 0;
}
.gate-submit.loading .gate-spinner {
  opacity: 1;
}
@keyframes gateSpin {
  to { transform: rotate(360deg); }
}
.gate-legal {
  font-size: 11px;
  line-height: 1.5;
  color: rgba(230, 237, 243, 0.4);
  text-align: center;
  margin: 4px 0 0 0;
}
.gate-link {
  background: none;
  border: none;
  color: rgba(230, 237, 243, 0.6);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 8px;
  align-self: center;
  transition: color 0.18s ease;
}
.gate-link:hover {
  color: #fff;
}
.gate-success {
  text-align: center;
  padding: 8px 0;
}
.gate-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.gate-success .gate-title {
  margin-bottom: 10px;
}
.gate-success .gate-subtitle {
  margin-bottom: 26px;
}

/* Mobile adjustments */
@media (max-width: 560px) {
  .gate-modal {
    padding: 0;
    align-items: stretch;
  }
  .gate-dialog {
    border-radius: 18px 18px 0 0;
    padding: 34px 24px 28px 24px;
    max-width: 100%;
    margin: auto 0 0 0;
    min-height: min(94dvh, 100%);
  }
  .gate-row {
    grid-template-columns: 1fr;
  }
  .gate-title {
    font-size: 1.35rem;
  }
  .nexa-lock-overlay-inner {
    padding: 22px 24px;
  }
  .nexa-lock-overlay h3 {
    font-size: 1.05rem;
  }
}

/* ============================================
   BLOG ARTICLE PAGE
   ============================================ */
.blog-article-page { background: var(--bg); }

/* Breadcrumb */
.blog-breadcrumb {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 24px 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.blog-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.blog-breadcrumb a:hover { text-decoration: underline; }
.blog-breadcrumb span { margin: 0 6px; opacity: 0.5; }

/* Article hero */
.blog-hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 24px 0;
}
.blog-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.blog-hero-date {
  font-family: 'Geist Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
}
.blog-hero-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 100px;
}
.blog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.18;
  color: var(--charcoal);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.blog-hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 32px;
}
.blog-hero-img {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 48px;
}
.blog-hero-img img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Article body */
.blog-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.blog-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 48px 0 16px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.blog-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 36px 0 12px;
  line-height: 1.35;
}
.blog-body p {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 20px;
}
.blog-body ul, .blog-body ol {
  margin: 0 0 24px;
  padding-left: 24px;
}
.blog-body li {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 8px;
}
.blog-body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-body a:hover { color: var(--accent); }
.blog-body strong { color: var(--charcoal); font-weight: 600; }

/* Callout / key stat */
.blog-callout {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;
}
.blog-callout p {
  color: var(--charcoal);
  margin: 0;
  font-weight: 500;
}
.blog-callout p strong {
  color: var(--accent-dark);
}

/* In-article figure */
.blog-figure {
  margin: 36px 0;
}
.blog-figure img {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
}
.blog-figure figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
  line-height: 1.5;
}

/* Data table */
.blog-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.blog-table th {
  background: var(--charcoal);
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.blog-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}
.blog-table tr:last-child td { border-bottom: none; }
.blog-table tr:nth-child(even) td { background: rgba(0,0,0,0.015); }

/* Sources */
.blog-sources {
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.blog-sources h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 16px;
}
.blog-sources ol {
  padding-left: 20px;
  margin: 0;
}
.blog-sources li {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 8px;
}
.blog-sources a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

/* CTA banner inside article */
.blog-cta {
  background: var(--charcoal);
  border-radius: var(--radius-md);
  padding: 40px 36px;
  text-align: center;
  margin: 56px 0;
}
.blog-cta h3 {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 10px;
}
.blog-cta p {
  color: rgba(255,255,255,0.65);
  font-size: 0.95rem;
  margin: 0 0 24px;
}
.blog-cta a {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 13px 32px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.blog-cta a:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* Related articles */
.blog-related {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 96px;
}
.blog-related h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 28px;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ---- COTIZADOR PAGE ---- */
.cotizador-hero {
  background: var(--bg);
  /* Padding-top alto para que la seccion "Como funciona" tenga aire
     respecto al cotizador-pro de arriba — antes era 0 y se veia
     pegado, sin separacion visual. */
  padding: 80px 24px 60px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
@media (max-width: 768px) {
  .cotizador-hero {
    padding: 56px 20px 48px;
    margin-top: 16px;
  }
}
.cotizador-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}
.cotizador-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.35s var(--transition), box-shadow 0.35s var(--transition);
}
.cotizador-step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.cotizador-step-card .step-num {
  font-family: 'Geist Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.cotizador-step-card .step-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 6px;
}
.cotizador-step-card .step-content p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 768px) {
  .cotizador-steps {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 32px;
  }
  .cotizador-step-card {
    flex-direction: row;
    align-items: flex-start;
    padding: 24px 20px;
  }
  .cotizador-step-card .step-num {
    font-size: 1.5rem;
    min-width: 40px;
  }
}

/* Mobile blog article */
@media (max-width: 640px) {
  .blog-hero h1 { font-size: 1.6rem; }
  .blog-hero-subtitle { font-size: 1rem; }
  .blog-body h2 { font-size: 1.25rem; }
  .blog-body h3 { font-size: 1.05rem; }
  .blog-cta { padding: 28px 20px; }
  .blog-cta h3 { font-size: 1.1rem; }
  .blog-related-grid { grid-template-columns: 1fr; }
  .blog-table { font-size: 0.82rem; }
  .blog-table th, .blog-table td { padding: 10px 12px; }
}

/* FAQ */
.faq {
  padding: 100px 0;
  background: var(--bg);
}
/* Variante collapsible: la seccion entera vive en un <details> shell.
   Por defecto solo se ve un boton; al click despliega los 6 items.
   Padding reducido para que cerrada ocupe muy poco scroll. */
.faq-collapsed { padding: 56px 0; }
.faq-shell {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-shell[open] {
  border-color: var(--accent-light);
  box-shadow: 0 6px 28px rgba(0, 184, 107, 0.08);
}
.faq-shell-summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "eyebrow icon"
    "title   icon";
  align-items: center;
  row-gap: 4px;
  column-gap: 16px;
}
.faq-shell-summary::-webkit-details-marker { display: none; }
.faq-shell-eyebrow {
  grid-area: eyebrow;
  font-family: 'Geist Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.faq-shell-title {
  grid-area: title;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
}
.faq-shell-icon {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq-shell[open] .faq-shell-icon { transform: rotate(45deg); }
.faq-shell .faq-list { margin-top: 0; padding: 0 18px 22px; }
.faq-list {
  max-width: 820px;
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item[open] {
  border-color: var(--accent-light);
  box-shadow: 0 4px 20px rgba(0, 184, 107, 0.08);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--charcoal);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-answer {
  padding: 0 24px 22px;
  color: #4a5568;
  line-height: 1.65;
  font-size: 0.98rem;
}
.faq-answer a { color: var(--accent); text-decoration: underline; }
.faq-answer strong { color: var(--charcoal); }

@media (max-width: 680px) {
  .faq { padding: 72px 0; }
  .faq-collapsed { padding: 44px 0; }
  .faq-shell-summary { padding: 18px 18px; column-gap: 10px; }
  .faq-shell-title { font-size: 0.95rem; }
  .faq-shell-icon { width: 32px; height: 32px; font-size: 1.25rem; }
  .faq-shell .faq-list { padding: 0 12px 18px; }
  .faq-item summary { padding: 18px 20px; font-size: 0.96rem; }
  .faq-answer { padding: 0 20px 20px; font-size: 0.94rem; }
}
