/* =============================================================
   AutoGate Electric — styles.css
   Dirección: minimalismo aeroespacial. Negro, blanco, azules
   profundos y el azul del logo (#023FFD) como único acento.
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --black:    #000000;
  --bg:       #020306;
  --navy-950: #03060D;
  --navy-900: #060C19;
  --navy-800: #0A1428;
  --navy-700: #112042;
  --blue:     #023FFD;   /* azul del logo */
  --blue-2:   #3A6BFF;   /* azul legible sobre negro */
  --white:    #FFFFFF;
  --ink-2:    rgba(255,255,255,.74);
  --ink-3:    rgba(255,255,255,.5);
  --ink-4:    rgba(255,255,255,.28);
  --line:     rgba(255,255,255,.14);
  --line-2:   rgba(255,255,255,.26);
  --wa:       #25D366;

  --sans: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(1.25rem, 4.2vw, 4rem);
  --nav-h: 76px;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--black);
}
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-weight: 600; text-wrap: balance; line-height: 1; }
address { font-style: normal; }
::selection { background: var(--blue); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =============================================================
   3. Utilidades
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .7rem 1.1rem; background: var(--white); color: var(--black);
  font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.container { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.mono {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 400;
}

/* =============================================================
   4. Tipografía
   ============================================================= */
.kicker {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex; align-items: center; gap: .9rem;
  margin-bottom: 1.6rem;
}
.kicker::before {
  content: ""; width: 28px; height: 2px; background: var(--blue);
  flex: none;
}
.section-title {
  font-size: clamp(2.5rem, 6.4vw, 6rem);
  text-transform: uppercase;
  letter-spacing: -.005em;
  line-height: .94;
  font-weight: 600;
}

/* =============================================================
   5. Componentes
   ============================================================= */

/* --- Botones: contorno blanco que se rellena desde abajo --- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 54px;
  padding: 0 1.9rem;
  font-size: .82rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  border: 2px solid var(--white);
  overflow: hidden;
  isolation: isolate;
  transition: color .45s var(--ease-out), border-color .45s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--white);
  transform: translateY(101%);
  transition: transform .55s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--black); }
.btn-solid { background: var(--white); color: var(--black); }
.btn-solid::before { background: var(--blue); }
.btn-solid:hover, .btn-solid:focus-visible { color: var(--white); border-color: var(--blue); }
.btn-ghost { background: transparent; color: var(--white); }
.btn-wa {
  width: 100%;
  background: var(--white); color: var(--black); border-color: var(--white);
}
.btn-wa svg { width: 20px; height: 20px; flex: none; }
.btn-wa::before { background: var(--wa); }
.btn-wa:hover, .btn-wa:focus-visible { color: var(--black); border-color: var(--wa); }

.badge {
  display: inline-flex; align-items: center;
  padding: .38rem .7rem;
  background: var(--blue); color: var(--white);
  font-family: var(--mono); font-size: .66rem; letter-spacing: .18em;
  text-transform: uppercase;
}

/* --- Splash --- */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; align-content: center; gap: 2.2rem;
  background: var(--black);
  transition: opacity .7s var(--ease-out), visibility 0s linear .7s;
  /* red de seguridad: se oculta sola aunque falle el JS */
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes splashSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.splash-mark { width: 84px; height: 84px; }
.splash-mark .draw {
  stroke-dasharray: 120; stroke-dashoffset: 120;
  animation: draw 1.1s var(--ease-out) forwards;
}
.splash-mark .draw:nth-child(2) { animation-delay: .25s; }
.splash-mark .draw:nth-child(3) { animation-delay: .35s; }
.splash-cells rect { opacity: 0; animation: cell .4s var(--ease-out) forwards; }
.splash-cells rect:nth-child(1) { animation-delay: .55s; }
.splash-cells rect:nth-child(2) { animation-delay: .6s; }
.splash-cells rect:nth-child(3) { animation-delay: .65s; }
.splash-cells rect:nth-child(4) { animation-delay: .7s; }
.splash-cells rect:nth-child(5) { animation-delay: .75s; }
.splash-cells rect:nth-child(6) { animation-delay: .8s; }
.splash-cells rect:nth-child(7) { animation-delay: .85s; }
.splash-cells rect:nth-child(8) { animation-delay: .9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes cell { to { opacity: 1; } }
.splash-bar { width: 120px; height: 1px; background: var(--line); overflow: hidden; }
.splash-bar i { display: block; height: 100%; background: var(--white); transform-origin: left; animation: bar 1.1s var(--ease-soft) forwards; transform: scaleX(0); }
@keyframes bar { to { transform: scaleX(1); } }

/* --- Barra de progreso de lectura --- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); }

/* --- Navegación --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 2rem;
  padding-inline: var(--gutter);
  transition: transform .6s var(--ease-out), background-color .4s, backdrop-filter .4s;
}
.nav::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,0));
  transition: opacity .4s;
}
.nav.is-scrolled { background: rgba(0,0,0,.82); }
@supports (backdrop-filter: blur(10px)) {
  .nav.is-scrolled { background: rgba(0,0,0,.55); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
}
.nav.is-scrolled::after { opacity: 0; }
.nav.is-hidden { transform: translateY(-100%); }
.nav-logo { flex: none; display: block; }
.nav-logo img { width: 150px; height: auto; }
.nav-links { display: none; }
.nav-cta {
  margin-left: auto;
  font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  padding: .55rem 1rem; border: 1.5px solid var(--line-2);
  transition: border-color .3s, background-color .3s, color .3s;
}
.nav-cta:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.nav-burger {
  position: relative; width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
}
.nav-burger span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--white);
  transition: transform .45s var(--ease-out), top .45s var(--ease-out);
}
.nav-burger span:first-child { top: 17px; }
.nav-burger span:last-child { top: 25px; }
.nav-burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* --- Menú lateral --- */
.menu { position: fixed; inset: 0; z-index: 45; visibility: hidden; pointer-events: none; }
.menu.is-open { visibility: visible; pointer-events: auto; }
.menu-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
  opacity: 0; transition: opacity .5s var(--ease-out);
}
.menu.is-open .menu-backdrop { opacity: 1; }
.menu-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  background: var(--black);
  border-left: 1px solid var(--line);
  padding: calc(var(--nav-h) + 2rem) var(--gutter) 2.2rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  transform: translateX(100%);
  transition: transform .65s var(--ease-out);
  overflow-y: auto;
}
.menu.is-open .menu-panel { transform: none; }
.menu-links { display: grid; }
.menu-links a {
  display: flex; align-items: baseline; gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.15rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  transition: color .3s, padding-left .45s var(--ease-out);
}
.menu-links a span { font-family: var(--mono); font-size: .68rem; color: var(--blue-2); letter-spacing: .1em; }
.menu-links a:hover { padding-left: .5rem; color: var(--blue-2); }
.menu-links .menu-hl { color: var(--blue-2); }
.menu-foot p { color: var(--ink-3); font-size: .9rem; margin: .4rem 0 1.2rem; }
.menu-phone { font-size: 1.8rem; font-weight: 600; letter-spacing: .02em; }
.menu-mail { display: block; margin-top: .3rem; color: var(--ink-2); font-size: .95rem; word-break: break-all; }
.menu-mail:hover { color: var(--blue-2); }

/* --- Redes --- */
.social { display: flex; gap: .7rem; }
.social a {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 50%;
  transition: background-color .35s, border-color .35s, color .35s;
}
.social a:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.social svg { width: 19px; height: 19px; }

/* --- Botón flotante WhatsApp --- */
.wa-float {
  position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 70;
  display: flex; align-items: center; gap: .6rem;
  height: 60px; min-width: 60px; padding: 0 17px;
  border-radius: 30px;
  background: var(--wa); color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08) inset;
  transition: transform .4s var(--ease-out), box-shadow .4s;
}
.wa-float svg { width: 27px; height: 27px; flex: none; }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid var(--wa);
  animation: waPulse 2.8s var(--ease-out) infinite;
  pointer-events: none;
}
@keyframes waPulse {
  0% { opacity: .7; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.35); }
}
.wa-label {
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: max-width .55s var(--ease-out);
}
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(0,0,0,.55); }
.wa-float:hover .wa-label, .wa-float:focus-visible .wa-label { max-width: 220px; }

/* --- Visor de fotos --- */
.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: min(92vw, 1400px); max-height: 90vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox img { max-width: min(92vw, 1400px); max-height: 86vh; width: auto; height: auto; object-fit: contain; }
.lightbox-close {
  position: absolute; top: -52px; right: 0;
  width: 44px; height: 44px; font-size: 1.1rem;
  border: 1px solid var(--line-2); border-radius: 50%; color: var(--white);
  display: grid; place-items: center;
}
.lightbox-close:hover { background: var(--white); color: var(--black); }

/* =============================================================
   6. Secciones
   ============================================================= */

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: clip;
  background: var(--black);
}
.hero-media { position: absolute; inset: 0; }
.hero-media picture { display: block; width: 100%; height: 100%; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 80% 50%;
  transform: scale(1.14);
  filter: saturate(.96) contrast(1.04) brightness(.94);
}
@media (min-width: 641px) { .hero-media img { object-position: 60% 50%; } }
.is-loaded .hero-media img { transform: scale(1.02); transition: transform 2.8s var(--ease-out); }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 34%, rgba(0,0,0,.12) 62%, rgba(0,0,0,.45) 100%),
    linear-gradient(90deg, rgba(2,6,20,.55) 0%, rgba(2,6,20,0) 60%);
}
.hero-inner {
  position: relative; z-index: 2;
  padding: calc(var(--nav-h) + 3rem) var(--gutter) 5.4rem;
  max-width: 1100px;
}
.hero-title {
  font-size: clamp(3.1rem, 10.5vw, 9.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.012em;
  line-height: .9;
  margin-bottom: 1.6rem;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .line > span { display: block; }
.js .hero-title .line > span { transform: translateY(105%); }
.js .hero-kicker, .js .hero-services, .js .hero-sub, .js .hero-actions, .js .hero-foot { opacity: 0; transform: translateY(18px); }
.is-loaded .hero-title .line > span { transform: none; transition: transform 1.2s var(--ease-out); }
.is-loaded .hero-title .line:nth-child(2) > span { transition-delay: .1s; }
.is-loaded .hero-kicker, .is-loaded .hero-services, .is-loaded .hero-sub, .is-loaded .hero-actions, .is-loaded .hero-foot {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.is-loaded .hero-services { transition-delay: .24s; }
.is-loaded .hero-sub { transition-delay: .36s; }
.is-loaded .hero-actions { transition-delay: .46s; }
.is-loaded .hero-foot { transition-delay: .7s; }
.hero-sub { font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--ink-2); max-width: 36rem; margin-bottom: 1.8rem; font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Franja de servicios de la portada: qué hacemos, a primera vista */
.hero-services {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 860px;
  margin-bottom: 1.4rem;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line);
}
.hs-item {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: .55rem;
  padding: .95rem .6rem .95rem 0;
  transition: background-color .4s var(--ease-out);
}
.hs-item + .hs-item { padding-left: .8rem; border-left: 1px solid var(--line); }
.hs-item::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform .55s var(--ease-out);
}
.hs-item:hover::before, .hs-item:focus-visible::before { transform: scaleX(1); }
.hs-icon { width: 30px; height: 30px; flex: none; color: var(--white); }
.hs-text { display: grid; gap: .15rem; min-width: 0; }
.hs-text strong {
  font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2;
}
.hs-text small { display: none; color: var(--ink-3); font-size: .86rem; line-height: 1.3; }
.hs-arrow { display: none; margin-left: auto; color: var(--ink-3); transition: transform .45s var(--ease-out), color .3s; }
.hs-item:hover .hs-arrow { transform: translateX(5px); color: var(--white); }
.hs-item:hover .hs-icon { color: var(--blue-2); }
.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.2rem calc(var(--gutter) + 76px) 1.2rem var(--gutter); /* deja sitio al botón de WhatsApp */
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  white-space: nowrap;
}
.hero-scroll {
  display: none;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  align-items: center; gap: .7rem;
}
.hero-scroll i { width: 1px; height: 26px; background: var(--line-2); position: relative; overflow: hidden; }
.hero-scroll i::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%;
  background: var(--white); animation: scrollLine 2.2s var(--ease-soft) infinite;
}
@keyframes scrollLine { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }

/* --- INTRO --- */
.intro {
  background: var(--black);
  padding-block: clamp(6rem, 14vw, 12rem) clamp(5rem, 10vw, 9rem);
}
.intro-title {
  font-size: clamp(1.7rem, 3.6vw, 3.3rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -.005em;
  max-width: 24ch;
  max-width: 1100px;
  color: var(--ink-2);
}
.intro-title em { font-style: normal; color: var(--white); }
.stats {
  display: grid; grid-template-columns: 1fr; gap: 0;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
}
.stat {
  display: flex; flex-direction: column-reverse; gap: .6rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}
.stat dt { color: var(--ink-3); }
.stat dd {
  font-size: clamp(3.6rem, 8vw, 7rem); font-weight: 600; line-height: .9;
  font-variant-numeric: tabular-nums;
}
.stat dd small { font-size: .5em; color: var(--blue-2); margin-left: .05em; }

/* --- SERVICIOS (pantalla completa) --- */
.service {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: clip;
  background: var(--navy-950);
}
.service-media { position: absolute; inset: 0; }
.service-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  filter: saturate(.88) contrast(1.06) brightness(.82);
}
.service-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.7) 38%, rgba(0,0,0,.2) 70%, rgba(0,0,0,.5) 100%);
}
.service-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 760px;
  padding: calc(var(--nav-h) + 4rem) var(--gutter) clamp(4rem, 9vh, 6.5rem);
}
.service-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.3rem; color: var(--ink-2); }
.service-title {
  font-size: clamp(2.7rem, 7.4vw, 6.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: .9;
  margin-bottom: 1.5rem;
}
.service-text { color: var(--ink-2); font-size: clamp(1rem, 1.25vw, 1.15rem); max-width: 34rem; margin-bottom: 2rem; }
.specs {
  display: grid; grid-template-columns: 1fr; gap: 0;
  margin-bottom: 2.4rem;
  border-top: 1px solid var(--line);
}
.specs li { display: grid; gap: .15rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.specs strong { font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.specs span { color: var(--ink-3); font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.4rem; }
.tags li {
  padding: .5rem .85rem; border: 1px solid var(--line-2);
  font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}

/* Servicio principal: más presencia */
.service--main .service-title { font-size: clamp(3rem, 9.4vw, 8.6rem); }
.service--main .service-inner { max-width: 980px; }

/* Herrería: composición dividida (foto vertical) */
.service--split { flex-direction: column; align-items: stretch; background: var(--black); }
.split-media { position: relative; height: 62svh; min-height: 380px; overflow: hidden; }
.split-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; filter: contrast(1.06) brightness(.92); }
.split-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--black) 0%, rgba(0,0,0,0) 45%);
}
.service--split .service-inner { padding-top: 0; }

/* Tarjetas con foto por tipo de servicio (solar y automatización) */
.cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 72%);
  gap: .8rem;
  margin: 0 calc(var(--gutter) * -1) 2.4rem;
  padding: .2rem var(--gutter) .6rem;
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.cards::-webkit-scrollbar { display: none; }
.card {
  scroll-snap-align: start;
  display: grid; align-content: start; gap: .2rem;
  padding: .45rem .45rem .95rem;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.72);
  transition: border-color .4s;
}
@supports (backdrop-filter: blur(10px)) {
  .card { background: rgba(0,0,0,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
.card-img { overflow: hidden; margin-bottom: .7rem; aspect-ratio: 3 / 2; background: var(--navy-900); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.card strong { padding-inline: .4rem; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.card span { padding-inline: .4rem; color: var(--ink-3); font-size: .92rem; line-height: 1.45; }
.card:hover { border-color: var(--line-2); }
.card:hover .card-img img { transform: scale(1.06); }

/* Automatización: maqueta de app */
.service--auto { flex-direction: column; justify-content: flex-end; align-items: stretch; }
.phone-wrap {
  position: relative; z-index: 2;
  display: none;
}
.phone {
  width: 250px; aspect-ratio: 9 / 18.5;
  border-radius: 38px;
  padding: 10px;
  background: linear-gradient(145deg, #2a2f3a, #0b0d12 40%, #1a1d24);
  box-shadow: 0 40px 90px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08) inset, 0 0 80px rgba(2,63,253,.25);
}
.phone-screen {
  height: 100%; border-radius: 30px; overflow: hidden;
  background: linear-gradient(180deg, #070D1E, #02040A);
  padding: 22px 18px 18px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.app-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.app-dot { width: 7px; height: 7px; border-radius: 50%; background: #2BE07A; box-shadow: 0 0 10px #2BE07A; }
.app-label { margin-top: 26px; font-size: .78rem; color: var(--ink-3); letter-spacing: .06em; }
.app-status { font-size: 1.35rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; min-height: 2.1rem; }
.app-gate {
  position: relative; margin-top: 18px;
  width: 150px; height: 110px;
  border: 2px solid rgba(255,255,255,.75); border-bottom: 0;
  overflow: hidden;
}
.app-door {
  position: absolute; inset: 8px 8px 0;
  display: grid; gap: 5px; align-content: start;
  transition: transform 2.4s var(--ease-soft);
}
.app-door i { display: block; height: 14px; background: rgba(255,255,255,.88); }
.phone.is-open .app-door { transform: translateY(-104%); }
.app-btn {
  margin-top: auto;
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--blue); color: var(--white);
  font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  box-shadow: 0 0 0 10px rgba(2,63,253,.16), 0 0 40px rgba(2,63,253,.55);
  transition: transform .3s var(--ease-out), background-color .3s;
}
.app-btn:active { transform: scale(.94); }
.phone.is-open .app-btn { background: #fff; color: var(--black); box-shadow: 0 0 0 10px rgba(255,255,255,.1), 0 0 40px rgba(255,255,255,.3); }
.app-meta { margin-top: 14px; font-family: var(--mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); }

.service-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* --- CALCULADORA DE AHORRO SOLAR (todo encerrado en #ag-solar) --- */
#ag-solar {
  position: relative;
  padding-block: clamp(5rem, 11vw, 9rem);
  background:
    radial-gradient(60% 60% at 100% 0%, rgba(2,63,253,.22), rgba(2,63,253,0) 70%),
    linear-gradient(180deg, var(--black) 0%, var(--navy-950) 100%);
  border-top: 1px solid var(--line);
  scroll-margin-top: 0;
}
#ag-solar .ags-wrap {
  width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter);
  display: grid; gap: 2.6rem;
}
#ag-solar .ags-kicker {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-2); display: flex; align-items: center; gap: .9rem; margin-bottom: 1.4rem;
}
#ag-solar .ags-kicker::before { content: ""; width: 28px; height: 2px; background: var(--blue); flex: none; }
#ag-solar .ags-title {
  font-size: clamp(2.4rem, 5.4vw, 5rem); font-weight: 600; line-height: .95;
  text-transform: uppercase; letter-spacing: -.005em;
}
#ag-solar .ags-lead { margin-top: 1.4rem; color: var(--ink-2); font-size: 1.1rem; max-width: 30rem; }
#ag-solar .ags-points { margin-top: 1.8rem; display: grid; gap: .55rem; }
#ag-solar .ags-points li {
  display: flex; align-items: center; gap: .7rem; color: var(--ink-2); font-size: .98rem;
}
#ag-solar .ags-points li::before {
  content: ""; width: 8px; height: 8px; background: var(--blue); flex: none;
}

#ag-solar .ags-card {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.6);
  padding: clamp(1.2rem, 3.4vw, 2.4rem);
  min-width: 0;
}
#ag-solar .ags-card::before {
  content: ""; position: absolute; top: -1px; left: -1px; width: 56px; height: 56px;
  border-top: 2px solid var(--blue); border-left: 2px solid var(--blue); pointer-events: none;
}
#ag-solar .ags-steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem;
  margin-bottom: 1.8rem;
}
#ag-solar .ags-steps li {
  padding-top: .7rem; border-top: 2px solid var(--line);
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4);
  display: flex; flex-direction: column; gap: .15rem;
  transition: color .4s, border-color .4s;
}
#ag-solar .ags-steps li span { font-family: var(--mono); font-size: .64rem; }
#ag-solar .ags-steps li.is-active { border-color: var(--blue); color: var(--white); }
#ag-solar .ags-steps li.is-done { border-color: var(--blue-2); color: var(--ink-2); }

#ag-solar [hidden] { display: none !important; }
#ag-solar .ags-step { display: none; }
#ag-solar .ags-step.is-active { display: grid; gap: .55rem; animation: agsIn .5s var(--ease-out); }
@keyframes agsIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

#ag-solar .ags-label {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); margin-top: .6rem;
}
#ag-solar .ags-period { border: 0; padding: 0; margin: 0 0 .6rem; display: flex; flex-wrap: wrap; gap: .5rem; }
#ag-solar .ags-period legend { width: 100%; margin-bottom: .6rem; padding: 0; }
#ag-solar .ags-period label { position: relative; flex: 1 1 0; min-width: 0; }
#ag-solar .ags-period input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
#ag-solar .ags-period span {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  border: 1px solid var(--line-2); font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2); transition: background-color .3s, color .3s, border-color .3s;
}
#ag-solar .ags-period input:checked + span { background: var(--white); color: var(--black); border-color: var(--white); }
#ag-solar .ags-period input:focus-visible + span { outline: 2px solid var(--blue-2); outline-offset: 3px; }

#ag-solar .ags-money {
  display: flex; align-items: baseline; gap: .5rem;
  border-bottom: 1px solid var(--line-2); padding-bottom: .3rem;
  transition: border-color .3s;
}
#ag-solar .ags-money:focus-within { border-bottom-color: var(--blue-2); }
#ag-solar .ags-money > span:first-child { font-size: clamp(2rem, 7vw, 3rem); font-weight: 600; color: var(--ink-3); }
#ag-solar .ags-money input {
  flex: 1; min-width: 0; width: 100%;
  font: inherit; font-size: clamp(2.2rem, 8vw, 3.4rem); font-weight: 600; letter-spacing: .01em;
  color: var(--white); background: transparent; border: 0; padding: 0; outline: none;
  font-variant-numeric: tabular-nums;
}
#ag-solar .ags-money input::placeholder { color: var(--ink-4); }
#ag-solar .ags-mxn { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; color: var(--ink-3); }

#ag-solar .ags-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin-top: .8rem; }
#ag-solar .ags-chips button {
  min-height: 46px; border: 1px solid var(--line-2); color: var(--ink-2);
  font-size: .86rem; font-weight: 500; transition: border-color .3s, color .3s, background-color .3s;
}
#ag-solar .ags-chips button:hover { border-color: var(--white); color: var(--white); }

#ag-solar .ags-input {
  width: 100%; font: inherit; font-size: 1.1rem; color: var(--white);
  background: transparent; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  padding: .75rem 0; min-height: 48px; transition: border-color .3s;
}
#ag-solar .ags-input::placeholder { color: var(--ink-4); }
#ag-solar .ags-input:focus { outline: none; border-bottom-color: var(--blue-2); }

#ag-solar .ags-error { min-height: 1.2em; font-size: .88rem; color: #ff8a8a; }
#ag-solar .ags-error:empty { min-height: 0; }

#ag-solar .ags-btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: center; gap: .7rem;
  width: 100%; min-height: 56px; margin-top: 1rem; padding: 0 1.4rem;
  background: var(--white); color: var(--black); border: 2px solid var(--white);
  font-size: .84rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  transition: color .45s var(--ease-out), border-color .45s var(--ease-out);
}
#ag-solar .ags-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--blue);
  transform: translateY(101%); transition: transform .55s var(--ease-out);
}
#ag-solar .ags-btn:hover::before, #ag-solar .ags-btn:focus-visible::before { transform: none; }
#ag-solar .ags-btn:hover, #ag-solar .ags-btn:focus-visible { color: var(--white); border-color: var(--blue); }
#ag-solar .ags-btn svg { width: 20px; height: 20px; flex: none; }
#ag-solar .ags-btn--wa::before { background: var(--wa); }
#ag-solar .ags-btn--wa:hover, #ag-solar .ags-btn--wa:focus-visible { color: var(--black); border-color: var(--wa); }

#ag-solar .ags-link {
  justify-self: center; min-height: 44px; padding: .4rem .8rem;
  color: var(--ink-3); font-size: .9rem; text-decoration: underline; text-underline-offset: 4px;
}
#ag-solar .ags-link:hover { color: var(--white); }

#ag-solar .ags-teaser {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-bottom: .6rem;
}
#ag-solar .ags-teaser div { border: 1px solid var(--line); padding: .9rem; display: grid; gap: .25rem; }
#ag-solar .ags-teaser span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
#ag-solar .ags-teaser strong { font-size: 1.6rem; font-weight: 600; filter: blur(6px); user-select: none; }
#ag-solar .ags-note { color: var(--ink-2); font-size: 1rem; line-height: 1.5; }

#ag-solar .ags-hello { font-size: 1.15rem; color: var(--ink-2); margin-bottom: .4rem; }
#ag-solar .ags-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
#ag-solar .ags-results > div {
  border: 1px solid var(--line); padding: .9rem; display: grid; gap: .2rem; align-content: start; min-width: 0;
}
#ag-solar .ags-results span { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
#ag-solar .ags-results strong { font-size: 1.55rem; font-weight: 600; line-height: 1.1; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
#ag-solar .ags-results small { color: var(--ink-3); font-size: .82rem; }
#ag-solar .ags-results .ags-big {
  grid-column: 1 / -1; padding: 1.2rem;
  border-color: rgba(58,107,255,.6);
  background: radial-gradient(90% 120% at 0% 0%, rgba(2,63,253,.35), rgba(2,63,253,0) 70%);
}
#ag-solar .ags-results .ags-big strong { font-size: clamp(2.4rem, 9vw, 3.6rem); }
#ag-solar .ags-disclaimer { margin-top: .6rem; font-size: .84rem; color: var(--ink-3); line-height: 1.5; }

@media (min-width: 960px) {
  #ag-solar .ags-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 5rem; align-items: center; }
}

/* --- GALERÍA --- */
.gallery {
  position: relative;
  background: var(--black);
  padding-block: clamp(5rem, 11vw, 9rem) clamp(4rem, 8vw, 7rem);
  overflow: clip;
}
.gallery-head { position: relative; margin-bottom: clamp(2.2rem, 4vw, 3.5rem); }
.gallery-hint { position: absolute; right: var(--gutter); bottom: .4rem; color: var(--ink-3); }
.gallery-viewport {
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.gallery-viewport::-webkit-scrollbar { display: none; }
.gallery-track {
  display: flex; gap: clamp(.8rem, 1.6vw, 1.5rem);
  width: max-content;
  padding-right: var(--gutter);
}
.g-card { flex: none; width: min(82vw, 560px); scroll-snap-align: start; }
.g-card--tall { width: min(64vw, 380px); }
.g-open {
  display: block; width: 100%; height: clamp(300px, 58vh, 560px);
  overflow: hidden; position: relative;
  background: var(--navy-900);
  cursor: zoom-in;
}
.g-open img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.85) brightness(.9);
  transition: transform 1.1s var(--ease-out), filter .8s var(--ease-out);
}
.g-open::after {
  content: "+"; position: absolute; right: 14px; top: 12px;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.5); border-radius: 50%;
  font-size: 1.2rem; font-weight: 300;
  opacity: 0; transform: scale(.8);
  transition: opacity .4s, transform .4s var(--ease-out);
}
.g-open:hover img, .g-open:focus-visible img { transform: scale(1.05); filter: saturate(1.05) brightness(1); }
.g-open:hover::after, .g-open:focus-visible::after { opacity: 1; transform: none; }
.g-cap {
  display: flex; gap: .9rem; align-items: baseline;
  padding-top: 1rem;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.g-cap .mono { color: var(--blue-2); }
.g-card--cta { width: min(70vw, 400px); }
.g-card--cta a {
  height: clamp(300px, 58vh, 560px);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.8rem;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(90% 70% at 100% 100%, rgba(2,63,253,.45), rgba(2,63,253,0) 70%),
    var(--navy-950);
  transition: border-color .4s, background-color .4s;
}
.g-card--cta strong { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: .95; text-transform: uppercase; font-weight: 600; }
.g-card--cta .mono { color: var(--blue-2); }
.g-arrow { font-size: 2rem; transition: transform .5s var(--ease-out); }
.g-card--cta a:hover { border-color: var(--white); }
.g-card--cta a:hover .g-arrow { transform: translateX(10px); }

/* --- POR QUÉ ELEGIRNOS --- */
.why {
  position: relative; overflow: clip;
  padding-block: clamp(6rem, 13vw, 11rem);
  background:
    radial-gradient(70% 50% at 0% 100%, rgba(2,63,253,.18), rgba(2,63,253,0) 70%),
    var(--navy-950);
}
.why-inner { position: relative; z-index: 2; }
.why-head { display: grid; gap: 2.6rem; align-items: end; }
.why-head > * { min-width: 0; }
.why-lead { margin-top: 1.6rem; color: var(--ink-2); font-size: 1.12rem; max-width: 30rem; }
.why-photo { position: relative; }
.why-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: saturate(.95) contrast(1.04); }
.why-photo figcaption {
  position: absolute; left: 0; bottom: 0;
  padding: .55rem .8rem; background: rgba(0,0,0,.72); color: var(--ink-2);
}
.why-photo::before {
  content: ""; position: absolute; top: -10px; left: -10px; width: 64px; height: 64px;
  border-top: 2px solid var(--blue); border-left: 2px solid var(--blue);
}
.pillars {
  display: grid; grid-template-columns: 1fr; gap: 0;
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}
.pillar {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; column-gap: 1.2rem; row-gap: .5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.pillar .mono { grid-column: 1 / -1; color: var(--blue-2); }
.pillar svg { width: 34px; height: 34px; color: var(--white); grid-row: span 2; }
.pillar h3 { font-size: 1.45rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; align-self: center; }
.pillar p { color: var(--ink-2); font-size: 1rem; grid-column: 2; }

/* --- TESTIMONIOS --- */
.testimonials {
  background: var(--black);
  padding-block: clamp(6rem, 12vw, 10rem);
}
.testi { display: grid; gap: 3rem; }
.testi-item blockquote {
  font-size: clamp(1.6rem, 3.6vw, 3.2rem);
  line-height: 1.14;
  font-weight: 400;
  letter-spacing: -.005em;
  max-width: 26ch;
  max-width: 1100px;
}
.testi-item figcaption {
  margin-top: 1.8rem;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.2rem;
}
.testi-item figcaption strong { font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.testi-item figcaption .mono { color: var(--ink-3); }
/* modo carrusel (solo con JS) */
.testi.is-slider { grid-template-areas: "stack"; gap: 0; }
.testi.is-slider .testi-item {
  grid-area: stack;
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), visibility 0s linear .9s;
}
.testi.is-slider .testi-item.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .9s var(--ease-out) .15s, transform .9s var(--ease-out) .15s, visibility 0s;
}
.testi-nav { display: flex; gap: .6rem; margin-top: 3rem; }
.testi-nav[hidden] { display: none; }
.testi-nav button {
  position: relative; width: 52px; height: 24px;
}
.testi-nav button::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--line-2);
}
.testi-nav button::after {
  content: ""; position: absolute; left: 0; top: 50%; height: 2px; width: 100%;
  background: var(--white); transform: scaleX(0); transform-origin: left;
}
.testi-nav button.is-active::after { animation: testiBar 7s linear forwards; }
.testi[data-paused] ~ .testi-nav button.is-active::after,
.testi-nav.is-paused button.is-active::after { animation-play-state: paused; }
@keyframes testiBar { to { transform: scaleX(1); } }

/* --- UBICACIÓN / COBERTURA --- */
.coverage {
  background: linear-gradient(180deg, var(--black) 0%, var(--navy-950) 100%);
  padding-block: clamp(6rem, 12vw, 10rem);
  border-top: 1px solid var(--line);
}
.coverage-grid { display: grid; gap: 3.5rem; }
.address {
  margin-top: 2.2rem;
  font-size: 1.1rem; line-height: 1.55; color: var(--ink-2);
  display: grid; gap: .6rem;
}
.address .mono { color: var(--blue-2); }
.zones { margin-top: 2.4rem; border-top: 1px solid var(--line); }
.zones li {
  display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; row-gap: .1rem;
  align-items: center;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.zones strong { font-size: 1.05rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.zones .mono { grid-column: 2; color: var(--ink-3); font-size: .66rem; }
.zone-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--white); grid-row: span 2; }
.zone-dot.is-hq { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 5px rgba(2,63,253,.25); }
.coverage-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.4rem; }

.map {
  position: relative;
  border: 1px solid var(--line);
  background: radial-gradient(100% 80% at 60% 50%, rgba(10,20,40,.9), rgba(0,0,0,.95));
  padding: clamp(.8rem, 2vw, 1.6rem);
}
.map svg { width: 100%; height: auto; max-height: 78vh; margin-inline: auto; }
.map figcaption { position: absolute; left: 1.2rem; bottom: 1rem; color: var(--ink-3); }
.river { fill: none; stroke: rgba(120,160,255,.55); stroke-width: 2.2; stroke-dasharray: 2 7; stroke-linecap: round; }
.map-country { font-family: var(--mono); font-size: 12px; letter-spacing: .3em; fill: rgba(255,255,255,.28); }
.map-zone { font-family: var(--mono); font-size: 11px; letter-spacing: .3em; fill: rgba(58,107,255,.85); }
.routes path {
  fill: none; stroke: var(--blue-2); stroke-width: 1.3; stroke-opacity: .7;
  stroke-dasharray: 600; stroke-dashoffset: 0;
}
.js .map:not(.is-revealed) .routes path { stroke-dashoffset: 600; }
.js .map.is-revealed .routes path { transition: stroke-dashoffset 2.2s var(--ease-out); }
.js .map.is-revealed .routes path:nth-child(2) { transition-delay: .15s; }
.js .map.is-revealed .routes path:nth-child(3) { transition-delay: .25s; }
.js .map.is-revealed .routes path:nth-child(4) { transition-delay: .35s; }
.js .map.is-revealed .routes path:nth-child(5) { transition-delay: .45s; }
.js .map.is-revealed .routes path:nth-child(6) { transition-delay: .55s; }
.city circle { fill: var(--navy-950); stroke: var(--white); stroke-width: 1.6; }
.city text { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; fill: var(--white); }
.city--sm text { font-size: 12px; font-weight: 500; fill: rgba(255,255,255,.75); }
.city--hq circle { fill: var(--blue); stroke: var(--white); stroke-width: 2; }
.city--hq text { font-size: 17px; }
.city--hq .hq-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .3em; fill: var(--blue-2); font-weight: 400; }
.hq-pulse { fill: none !important; stroke: var(--blue-2) !important; transform-origin: 344px 447px; animation: hqPulse 2.6s var(--ease-out) infinite; }
@keyframes hqPulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.4); opacity: 0; } }

/* --- CONTACTO --- */
.contact {
  position: relative;
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(2,63,253,.22), rgba(2,63,253,0) 70%),
    var(--navy-950);
  padding-block: clamp(6rem, 12vw, 10rem);
  border-top: 1px solid var(--line);
}
.contact-grid { display: grid; gap: 3.5rem; }
.contact-lead { color: var(--ink-2); font-size: 1.15rem; margin-top: 1.6rem; max-width: 30rem; }
.contact-phone {
  display: inline-block; margin-top: 2.2rem;
  font-size: clamp(2.6rem, 6.6vw, 5.6rem); font-weight: 600; letter-spacing: .01em; line-height: 1;
  background: linear-gradient(90deg, var(--white), var(--white)) 0 100% / 0 2px no-repeat;
  padding-bottom: .4rem;
  transition: background-size .6s var(--ease-out), color .3s;
}
.contact-phone:hover { background-size: 100% 2px; }
.contact-note { margin-top: 1rem; color: var(--ink-3); }
.contact-mail {
  display: inline-flex; align-items: center; gap: .7rem; margin-top: 1.6rem;
  padding: .75rem 1.1rem; border: 1px solid var(--line-2);
  font-size: 1rem; color: var(--ink-2); max-width: 100%;
  transition: border-color .3s, color .3s, background-color .3s;
}
.contact-mail svg { width: 20px; height: 20px; flex: none; }
.contact-mail span { overflow-wrap: anywhere; }
.contact-mail:hover { border-color: var(--white); color: var(--white); }

.form {
  display: grid; gap: 1.4rem;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  border: 1px solid var(--line);
  background: rgba(0,0,0,.45);
  align-self: start;
}
.field { display: grid; gap: .5rem; }
.field-row { display: grid; gap: 1.4rem; }
.field label { font-family: var(--mono); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 1.05rem; color: var(--white);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  padding: .7rem 0;
  transition: border-color .3s;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 1.8rem; }
.field select option { background: var(--navy-900); color: var(--white); }
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--blue-2); }
.field-error { display: none; font-size: .85rem; color: #ff8a8a; }
.field.has-error .field-error { display: block; }
.field.has-error input, .field.has-error select { border-bottom-color: #ff8a8a; }

/* --- PIE DE PÁGINA --- */
.footer {
  background: var(--black);
  border-top: 1px solid var(--line);
  padding-block: clamp(4rem, 8vw, 6.5rem) 2rem;
}
.footer-top { display: grid; gap: 1.2rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.footer-logo img { width: min(340px, 78vw); }
.footer-tag { color: var(--ink-3); }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 2.4rem; padding-block: 3rem; }
.footer-cols h3 { color: var(--blue-2); margin-bottom: 1rem; font-weight: 400; }
.footer-cols li, .footer-cols address { color: var(--ink-2); font-size: .98rem; line-height: 1.75; }
.footer-cols a { transition: color .3s; }
.footer-cols a:hover { color: var(--blue-2); }
.footer-phone { font-size: 1.5rem; font-weight: 600; color: var(--white); letter-spacing: .02em; }
.footer-handle { margin-top: .9rem; color: var(--ink-3); font-size: .9rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding-top: 1.6rem; border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--ink-3);
  padding-right: 80px; /* espacio para el botón flotante */
}
.footer-bottom a:hover { color: var(--white); }

/* =============================================================
   7. Efectos (revelado al hacer scroll)
   ============================================================= */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }
.js .map[data-reveal] { transform: none; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 2.2rem 1.5rem 2.2rem 0; border-bottom: 0; }
  .stat + .stat { padding-left: 1.5rem; border-left: 1px solid var(--line); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  .hero-scroll { display: inline-flex; }
  .hero-inner { padding-bottom: 7.5rem; }
  .hs-item { flex-direction: row; align-items: center; gap: .9rem; padding: 1.15rem 1.1rem 1.15rem 0; }
  .hs-item + .hs-item { padding-left: 1.1rem; }
  .hs-icon { width: 36px; height: 36px; }
  .hs-text strong { font-size: .84rem; letter-spacing: .14em; }
  .hs-text small { display: block; }
  .hs-arrow { display: block; }
  .cards {
    grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 2.4rem; padding: 0; overflow: visible;
  }
  .specs { grid-template-columns: repeat(3, 1fr); border-top: 0; }
  .specs li { border-bottom: 0; border-top: 1px solid var(--line-2); padding: 1rem 1.2rem 0 0; }
  .pillars { grid-template-columns: 1fr 1fr; border-top: 0; }
  .pillar { padding: 2.2rem 2rem 2.2rem 0; border-bottom: 0; border-top: 1px solid var(--line); }
  .pillar:nth-child(2n) { padding-left: 2rem; border-left: 1px solid var(--line); }
}

@media (min-width: 960px) {
  :root { --nav-h: 88px; }
  .nav-logo img { width: 178px; }

  .hero-inner { padding-bottom: 8.5rem; }

  .service { align-items: center; }
  .service-shade {
    background:
      linear-gradient(90deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.8) 36%, rgba(0,0,0,.38) 64%, rgba(0,0,0,.28) 100%),
      linear-gradient(0deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 34%),
      linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 22%);
  }
  .service-inner { padding-top: calc(var(--nav-h) + 3rem); padding-bottom: 4rem; }

  .service--split { flex-direction: row; align-items: stretch; }
  .service--split .split-media { order: 2; width: 50%; height: auto; min-height: 100svh; }
  .service--split .split-media::after { background: linear-gradient(90deg, var(--black) 0%, rgba(0,0,0,0) 30%); }
  .service--split .service-inner { order: 1; width: 50%; max-width: none; display: flex; flex-direction: column; justify-content: center; padding-right: 3rem; padding-top: calc(var(--nav-h) + 3rem); }

  .service--auto { flex-direction: row; align-items: center; justify-content: space-between; }
  .phone-wrap { display: block; padding-right: clamp(2rem, 8vw, 9rem); flex: none; }

  .gallery {
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    padding-block: calc(var(--nav-h) + .5rem) 2.5rem;
  }
  .gallery .section-title { font-size: clamp(2.6rem, 5.2vw, 5.4rem); }
  .br-m { display: none; }
  .gallery-hint { display: none; }
  .gallery-viewport { overflow: visible; scroll-snap-type: none; }
  .g-card { width: min(46vw, 680px); }
  .g-card--tall { width: min(28vw, 400px); }
  .g-card--cta { width: min(28vw, 400px); }
  .g-open, .g-card--cta a { height: min(50vh, 560px); }

  .why-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 5rem; align-items: center; }
  .coverage-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 5rem; }
  .coverage .section-title, .contact .section-title { font-size: clamp(2.6rem, 4.4vw, 5rem); }
  .contact-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 5rem; }

  .footer-top { grid-template-columns: auto 1fr; align-items: end; }
  .footer-tag { justify-self: end; }
  .footer-cols { grid-template-columns: 1.3fr 1.2fr 1fr .8fr; }
}

@media (min-width: 1280px) {
  .nav-links {
    display: flex; gap: clamp(1.2rem, 1.6vw, 2rem); margin-left: auto;
    font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    white-space: nowrap;
  }
  .nav-links a { position: relative; padding: .4rem 0; color: var(--ink-2); transition: color .3s; }
  .nav-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue);
    transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
  }
  .nav-links a:hover { color: var(--white); }
  .nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
  .nav-links .nav-hl { color: var(--white); padding-left: .9rem; }
  .nav-links .nav-hl::before {
    content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px;
    background: var(--blue-2); box-shadow: 0 0 10px var(--blue-2);
  }
  .nav-cta { margin-left: .6rem; }

  .pillars { grid-template-columns: repeat(4, 1fr); }
  .pillar, .pillar:nth-child(2n) { padding: 2.4rem 1.8rem 2.4rem 0; border-left: 0; }
  .pillar + .pillar { padding-left: 1.8rem; border-left: 1px solid var(--line); }
  .pillar { grid-template-columns: 1fr; }
  .pillar svg { grid-row: auto; margin: .6rem 0 .4rem; }
  .pillar p { grid-column: 1; }
}

@media (min-width: 1600px) {
  .nav-links { font-size: .74rem; letter-spacing: .15em; }
}

/* Sin JS la galería se desplaza a mano en todos los tamaños */
html:not(.js) .gallery-viewport { overflow-x: auto; }

/* =============================================================
   9. Movimiento reducido (solo efectos intrusivos)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wa-float::before { animation: none; opacity: 0; }
  .hero-scroll i::after { animation: none; }
  .hq-pulse { animation: none; opacity: 0; }
}
