/* ==========================================================================
   HDZ Ingeniería y Soluciones — Hoja de estilos principal
   Sistema: azul marino + verde de marca, secciones claras/oscuras alternadas,
   Sora (titulares) · IBM Plex Sans (texto) · IBM Plex Mono (rótulos técnicos)
   ========================================================================== */

/* ---------- Fuentes alojadas en el sitio (SIL Open Font License) ---------- */
@font-face { font-family: "Sora"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("../assets/fonts/sora-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../assets/fonts/ibm-plex-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/ibm-plex-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  /* Marca */
  --navy-950: #061328;
  --navy-900: #0A1F3F;
  --navy-800: #0B2A55;   /* azul del logo */
  --navy-700: #163D73;
  --navy-100: #E4EAF3;
  --green: #6DB321;      /* verde del logo */
  --green-lit: #8BD63A;
  --green-700: #3E7A0C;  /* verde para texto sobre claro (AA) */

  /* Superficies claras */
  --white: #FFFFFF;
  --paper: #F4F5F1;
  --paper-2: #ECEEE8;
  --line: #D8DCE0;
  --ink: #0C1A2B;
  --ink-2: #3A4859;
  --ink-3: #56636F;

  /* Superficies oscuras */
  --on-dark: #EEF2F7;
  --on-dark-2: #AEBBCC;
  --line-dark: rgba(255, 255, 255, .13);

  /* Estados y componentes */
  --whatsapp: #0F7A40;
  --whatsapp-hover: #0B6534;
  --whatsapp-tint: #E3F6EA;
  --error: #B3261E;
  --error-ink: #A51F16;
  --error-tint: #FDF1F0;
  --success-tint: #EEF7E4;
  --input-border: #C3C9D0;
  --input-border-hover: #8E98A3;
  --input-bg: #FCFCFB;
  --error-text: #7A1712;
  --success-ink: #24460A;
  --map-land: #DCE3EC;
  --map-hover: #C8D2DF;
  --highlight: #F2C200;

  /* Tipografía */
  --f-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  /* Espaciado (8pt) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(72px, 10vw, 136px);
  --maxw: 1280px;

  /* Forma */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(6, 19, 40, .06), 0 2px 8px rgba(6, 19, 40, .05);
  --shadow-2: 0 2px 4px rgba(6, 19, 40, .06), 0 16px 40px -12px rgba(6, 19, 40, .22);

  /* Movimiento */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
  --t-slow: 900ms;

  /* Capas */
  --z-header: 100; --z-drawer: 200; --z-float: 90; --z-dialog: 300;

  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; line-height: 1.08; letter-spacing: -.022em; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--green-lit); color: var(--navy-950); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 1000; background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section--white { background: var(--white); }
.section--paper { background: var(--paper); }
.section--dark { background: var(--navy-900); color: var(--on-dark); }
.section--deep { background: var(--navy-950); color: var(--on-dark); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

/* Retícula técnica sutil para secciones oscuras */
.grid-bg { position: relative; isolation: isolate; }
.grid-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
}

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--green-700);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section--dark .eyebrow, .section--deep .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--green-lit); }

.display { font-size: clamp(2.5rem, 5.6vw, 4.75rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 600; }
.h2 { font-size: clamp(2rem, 3.8vw, 3.25rem); letter-spacing: -.03em; }
.h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); letter-spacing: -.015em; line-height: 1.2; }
.lead { font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.section--dark .lead, .section--deep .lead, .hero .lead, .page-hero .lead { color: var(--on-dark-2); }
.muted { color: var(--ink-3); }
.section--dark .muted, .section--deep .muted { color: var(--on-dark-2); }
.mono { font-family: var(--f-mono); letter-spacing: .06em; }
.accent { color: var(--green-700); }
.section--dark .accent, .section--deep .accent, .hero .accent, .page-hero .accent { color: var(--green-lit); }

.section-head { display: grid; gap: var(--s-4); max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--split { max-width: none; grid-template-columns: 1fr; align-items: end; gap: var(--s-5); }
@media (min-width: 960px) { .section-head--split { grid-template-columns: 1.1fr .9fr; gap: var(--s-8); } }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--navy-800); --btn-fg: #fff; --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-fg); border: 1.5px solid var(--btn-bd);
  font-family: var(--f-body); font-weight: 600; font-size: 1rem; line-height: 1; letter-spacing: .005em;
  text-decoration: none; white-space: nowrap; cursor: pointer; touch-action: manipulation;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease, transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .icon { transition: transform var(--t-med) var(--ease-out); }
.btn:hover .icon--nudge { transform: translateX(4px); }
.btn--primary { --btn-bg: var(--green); --btn-fg: var(--navy-950); }
.btn--primary:hover { --btn-bg: var(--green-lit); }
.btn--navy:hover { --btn-bg: var(--navy-700); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: rgba(12, 26, 43, .25); }
.btn--ghost:hover { --btn-bd: var(--ink); }
.btn--ghost-light { --btn-bg: rgba(255,255,255,.04); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn--ghost-light:hover { --btn-bd: #fff; --btn-bg: rgba(255,255,255,.1); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: .9375rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--navy-800); }
.link-arrow .icon { transition: transform var(--t-med) var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(4px); }
.section--dark .link-arrow, .section--deep .link-arrow { color: var(--green-lit); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med) ease, box-shadow var(--t-med) ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -16px rgba(6, 19, 40, .35); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); height: var(--header-h); }

/* Logo oficial: se recorta el margen blanco del archivo sin alterar el logotipo */
.brand { display: block; width: 118px; aspect-ratio: 1334 / 720; overflow: hidden; flex: none; border-radius: 4px; }
.brand img { width: 115.14%; max-width: none; margin-left: -8.85%; margin-top: -10.87%; }
@media (min-width: 1100px) { .brand { width: 132px; } }

.nav { display: none; }
@media (min-width: 1100px) { .nav { display: flex; align-items: center; gap: 2px; } }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  font-weight: 500; font-size: .9688rem; text-decoration: none; color: var(--ink-2);
  background: none; border: 0; transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.nav__link:hover { color: var(--ink); background: var(--paper); }
.nav__link[aria-current="page"], .nav__link.is-current { color: var(--navy-800); }
.mega__link[aria-current="page"] { background: var(--paper); }
.mega__link[aria-current="page"] .mega__icon { background: var(--navy-800); color: var(--green-lit); }
.nav__link[aria-current="page"]::after, .nav__link.is-current::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: var(--green); border-radius: 4px; }
.nav__link .icon { width: 16px; height: 16px; transition: transform var(--t-med) var(--ease-out); }
.nav__item { position: relative; }
.nav__item.is-open .nav__link .icon { transform: rotate(180deg); }

.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; width: min(720px, 90vw);
  translate: -50% 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2); padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 200ms ease, transform 260ms var(--ease-out), visibility 0s linear 260ms;
}
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: none; transition: opacity 200ms ease, transform 260ms var(--ease-out), visibility 0s; }
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.mega__link { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 14px; border-radius: var(--r-md); text-decoration: none; transition: background-color var(--t-fast) ease; }
.mega__link:hover, .mega__link:focus-visible { background: var(--paper); }
.mega__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--navy-100); color: var(--navy-800); }
.mega__icon .icon { width: 20px; height: 20px; }
.mega__title { display: block; font-weight: 600; color: var(--ink); line-height: 1.3; }
.mega__desc { display: block; font-size: .875rem; color: var(--ink-3); line-height: 1.45; margin-top: 2px; }
.mega__all { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 4px; padding: 14px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-3); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn--primary { display: none; }
@media (min-width: 640px) { .header-actions .btn--primary { display: inline-flex; } }
.icon-btn {
  width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: var(--r-sm);
  background: transparent; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none;
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease, color var(--t-fast) ease;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn .icon { width: 22px; height: 22px; }
.icon-btn--wa { color: var(--whatsapp); }
.menu-toggle { display: inline-grid; }
@media (min-width: 1200px) { .menu-toggle { display: none; } }

/* Barra superior de contacto (estructura tipo Ziklo) */
.topbar { display: none; background: var(--navy-950); color: var(--on-dark-2); font-size: .84rem; }
@media (min-width: 768px) { .topbar { display: block; } }
.topbar .container, .site-header .container { max-width: 1480px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 40px; }
.topbar__info { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; }
.topbar__info a, .topbar__info span { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; text-decoration: none; transition: color var(--t-fast) ease; }
.topbar__info a:hover { color: #fff; }
@media (max-width: 1023px) { .topbar__info > :nth-child(4) { display: none; } }
.topbar .icon { width: 15px; height: 15px; color: var(--green-lit); }
.socials--mini { gap: 6px; }
.socials--mini a { width: 30px; height: 30px; border-radius: 4px; }
.socials--mini .icon { width: 14px; height: 14px; color: #fff; }

/* Pestañas del menú principal: cada servicio es una pestaña visible */
.tabs { display: none; }
@media (min-width: 1200px) { .tabs { display: flex; align-self: stretch; align-items: stretch; flex: 1; justify-content: center; } }
.tab {
  position: relative; display: flex; align-items: center; padding: 0 clamp(7px, .6vw, 13px);
  font-size: .93rem; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.tab + .tab::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 18px; margin-top: -9px; background: var(--line); }
.tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 4px 3px 0 0; background: var(--green); transform: scaleX(0); transition: transform var(--t-med) var(--ease-out); }
.tab:hover { color: var(--ink); background: var(--paper); }
.tab:hover::after { transform: scaleX(.45); }
.tab[aria-current="page"] { color: var(--navy-800); font-weight: 600; background: var(--paper); }
.tab[aria-current="page"]::after { transform: scaleX(1); }
.tab:focus-visible { outline-offset: -3px; }

/* Bloques de acción pegados al borde derecho */
.site-header .header-actions { align-self: stretch; display: flex; align-items: center; gap: 10px; }
@media (min-width: 1200px) { .site-header__bar { padding-right: 0; } .site-header .header-actions { gap: 0; } }
.header-cta {
  display: none; align-self: stretch; align-items: center; gap: 12px; padding: 0 20px;
  background: var(--green); color: var(--navy-950); text-decoration: none;
  font-size: .72rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; line-height: 1.3;
  transition: background-color var(--t-fast) ease;
}
.header-cta:hover { background: var(--green-lit); }
.header-cta .icon { width: 18px; height: 18px; transition: transform var(--t-med) var(--ease-out); }
.header-cta:hover .icon { transform: translateX(3px); }
.header-cta--wa { background: var(--navy-800); color: #fff; }
.header-cta--wa:hover { background: var(--navy-700); }
.header-cta--wa .icon { width: 22px; height: 22px; color: var(--green-lit); }
.header-cta--wa:hover .icon { transform: none; }
@media (min-width: 640px) { .header-cta { display: inline-flex; } }
@media (max-width: 1199px) { .header-cta { align-self: center; height: 48px; border-radius: var(--r-sm); } }
@media (max-width: 1399px) { .header-cta--wa { display: none; } }

/* Menú móvil */
.drawer {
  position: fixed; inset: 0; z-index: var(--z-drawer); background: var(--navy-950); color: var(--on-dark);
  display: flex; flex-direction: column; padding: 0 var(--gutter) 32px; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity 240ms ease, visibility 0s linear 240ms;
}
.drawer.is-open { opacity: 1; visibility: visible; transition: opacity 240ms ease, visibility 0s; }
.drawer__top { display: flex; justify-content: space-between; align-items: center; height: var(--header-h); }
.drawer__top .mono { font-size: .78rem; color: var(--on-dark-2); letter-spacing: .14em; }
.drawer .icon-btn { border-color: var(--line-dark); color: #fff; }
.drawer__nav { display: grid; margin-top: 8px; }
.drawer__nav a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--line-dark); text-decoration: none; font-family: var(--f-display); font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em;
  opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease-out), transform 500ms var(--ease-out);
}
.drawer__nav a small { font-family: var(--f-mono); font-size: .75rem; color: var(--on-dark-2); letter-spacing: .1em; }
.drawer__nav a.is-sub { font-size: 1.125rem; padding: 12px 0 12px 16px; color: var(--on-dark-2); }
.drawer.is-open .drawer__nav a { opacity: 1; transform: none; }
.drawer__cta { display: grid; gap: 12px; margin-top: 32px; }

/* ---------- Hero de inicio ---------- */
.hero { position: relative; color: #fff; background: var(--navy-950); overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: -8% 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; transform-origin: 60% 50%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(6,19,40,.94) 0%, rgba(6,19,40,.82) 38%, rgba(6,19,40,.35) 72%, rgba(6,19,40,.2) 100%),
    linear-gradient(0deg, rgba(6,19,40,.9) 0%, rgba(6,19,40,0) 40%);
}
@media (max-width: 767px) {
  .hero::after { background: linear-gradient(180deg, rgba(6,19,40,.6) 0%, rgba(6,19,40,.88) 55%, rgba(6,19,40,.97) 100%); }
}
.hero__inner { min-height: min(88svh, 860px); display: grid; align-content: end; gap: clamp(40px, 6vw, 72px); padding-block: clamp(96px, 14vh, 160px) 40px; }
.hero__copy { display: grid; gap: 24px; max-width: 1080px; }
.hero .display { font-size: clamp(2.4rem, 5.4vw, 4.6rem); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__title .line > span { display: inline-block; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.hero__spec { display: grid; grid-template-columns: 1fr; border-top: 1px solid rgba(255,255,255,.18); }
@media (min-width: 768px) { .hero__spec { grid-template-columns: repeat(3, 1fr); } }
.hero__spec-item { display: flex; gap: 14px; align-items: flex-start; padding: 20px 20px 4px 0; }
.hero__spec-item + .hero__spec-item { border-top: 1px solid rgba(255,255,255,.12); }
@media (min-width: 768px) { .hero__spec-item + .hero__spec-item { border-top: 0; border-left: 1px solid rgba(255,255,255,.12); padding-left: 24px; } }
.hero__spec-item .icon { color: var(--green-lit); width: 22px; height: 22px; margin-top: 2px; }
.hero__spec-item strong { display: block; font-weight: 600; font-size: 1rem; }
.hero__spec-item span { display: block; font-size: .9rem; color: var(--on-dark-2); line-height: 1.45; }
@media (max-width: 767px) {
  .hero__spec-item { padding: 14px 0 2px; align-items: center; }
  .hero__spec-item span { display: none; }
  .hero__inner { padding-top: 72px; gap: 32px; }
}

/* Línea de energía: pulso que recorre la base del hero */
.energy-line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.energy-line::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 22%; left: -22%;
  background: linear-gradient(90deg, transparent, var(--green-lit), transparent);
  animation: energy 4.8s var(--ease-in-out) infinite;
}
@keyframes energy { to { left: 100%; } }

/* ---------- Hero de páginas internas ---------- */
.page-hero { position: relative; background: var(--navy-950); color: #fff; overflow: hidden; isolation: isolate; }
.page-hero__media { position: absolute; inset: 0; z-index: -2; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6,19,40,.95) 0%, rgba(6,19,40,.8) 45%, rgba(6,19,40,.35) 100%); }
@media (max-width: 767px) { .page-hero::after { background: linear-gradient(180deg, rgba(6,19,40,.7), rgba(6,19,40,.95)); } }
.page-hero--plain::after { display: none; }
.page-hero__media img.is-illus { object-position: 100% 50%; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Ilustración técnica en bloque partido */
.socials--light a { color: var(--ink); border-color: var(--line); background: var(--white); }
.socials--light a:hover { border-color: var(--navy-800); background: var(--white); }
.illus { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--navy-900); aspect-ratio: 4 / 3; }
.illus img { width: 100%; height: 100%; object-fit: contain; }

/* Lista de aplicaciones */
.apps { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 28px; }
.apps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.apps .ico { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--navy-100); color: var(--navy-800); }
.apps .icon { width: 20px; height: 20px; }

/* Nota destacada */
.note { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 20px 22px; border-radius: var(--r-md); background: var(--navy-100); color: var(--navy-900); font-size: .96rem; }
.note .icon { width: 24px; height: 24px; color: var(--navy-800); }
.page-hero__inner { display: grid; gap: 22px; padding-block: clamp(64px, 9vw, 120px) clamp(56px, 8vw, 104px); max-width: 860px; }
.page-hero .display { font-size: clamp(2.25rem, 4.6vw, 4rem); }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb [aria-current] { color: var(--green-lit); }

/* ---------- Clientes ---------- */
.clients { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (min-width: 640px) { .clients { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .clients { grid-template-columns: repeat(7, 1fr); } }
.clients li { list-style: none; display: grid; place-items: center; aspect-ratio: 3 / 2; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.clients img { max-height: 76px; width: auto; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: .72; mix-blend-mode: multiply; transition: filter var(--t-med) ease, opacity var(--t-med) ease, transform var(--t-med) var(--ease-out); }
.clients li:hover img { filter: none; opacity: 1; transform: scale(1.04); }
.clients-strip { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; margin-bottom: 28px; }

/* ---------- Explorador de servicios (inicio) ---------- */
.svc { display: grid; gap: var(--s-7); }
@media (min-width: 1024px) { .svc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; } }
.svc__list { list-style: none; border-top: 1px solid var(--line); counter-reset: svc; }
.svc__row { border-bottom: 1px solid var(--line); }
.svc__link {
  display: grid; grid-template-columns: 1fr 28px; gap: 16px; align-items: center;
  padding: 26px 8px 26px 0; text-decoration: none; position: relative;
}
.svc__link::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 600ms var(--ease-out); }
.svc__row.is-active .svc__link::before, .svc__link:hover::before, .svc__link:focus-visible::before { transform: scaleX(1); }
.svc__num { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .1em; color: var(--ink-3); }
.svc__title { font-family: var(--f-display); font-size: clamp(1.35rem, 2.3vw, 2rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.15; color: var(--ink); transition: color var(--t-fast) ease, transform var(--t-med) var(--ease-out); }
.svc__desc { display: block; font-family: var(--f-body); font-size: .95rem; letter-spacing: 0; font-weight: 400; color: var(--ink-3); margin-top: 6px; line-height: 1.5; }
.svc__arrow { color: var(--ink-3); transition: transform var(--t-med) var(--ease-out), color var(--t-fast) ease; }
.svc__row.is-active .svc__title, .svc__link:hover .svc__title { color: var(--navy-800); }
.svc__row.is-active .svc__arrow, .svc__link:hover .svc__arrow { color: var(--green-700); transform: translateX(4px); }
.svc__thumb { display: block; margin-top: 16px; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 10; background: var(--navy-900); }
.svc__thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) { .svc__thumb { display: none; } }

.svc__stage { display: none; }
@media (min-width: 1024px) {
  .svc__stage { display: block; position: sticky; top: calc(var(--header-h) + 32px); aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: var(--navy-900); box-shadow: var(--shadow-2); }
  .svc__stage figure { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 600ms ease; }
  .svc__stage figure.is-active { opacity: 1; }
  .svc__stage img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1600ms var(--ease-out); }
  .svc__stage figure.is-active img { transform: scale(1); }
  .svc__stage img.is-illus { object-fit: contain; }
  .svc__stage figcaption { position: absolute; left: 20px; bottom: 20px; right: 20px; display: flex; justify-content: space-between; gap: 12px; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
  .svc__stage figcaption span { background: rgba(6,19,40,.72); backdrop-filter: blur(8px); padding: 8px 12px; border-radius: 4px; }
}

/* ---------- Cifras ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--navy-900); padding: clamp(24px, 3vw, 40px); display: grid; gap: 10px; align-content: start; }
.stat__value { font-family: var(--f-display); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 500; letter-spacing: -.04em; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.stat__value .unit { font-size: .45em; letter-spacing: -.01em; color: var(--green-lit); margin-left: 4px; }
.stat__label { color: var(--on-dark-2); font-size: .95rem; }
.stat--pending .stat__value { color: rgba(255,255,255,.35); }

/* ---------- Bloques partidos texto + imagen ---------- */
.split { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: clamp(48px, 6vw, 96px); } .split--rev > :first-child { order: 2; } }
.split__media { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--navy-900); }
.split__media--wide { aspect-ratio: 4 / 3; }
.split__media img { position: absolute; left: 0; top: -7.5%; width: 100%; height: 115%; object-fit: cover; }
.split__tag { position: absolute; left: 16px; bottom: 16px; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; background: rgba(6,19,40,.78); backdrop-filter: blur(8px); color: #fff; padding: 8px 12px; border-radius: 4px; }

.pillars { display: grid; gap: 0; margin-top: var(--s-6); border-top: 1px solid var(--line); }
.pillar { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.pillar__icon { width: 48px; height: 48px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--navy-800); color: var(--green-lit); }
.pillar__icon .icon { width: 22px; height: 22px; }
.pillar h3 { font-size: 1.125rem; letter-spacing: -.01em; margin-bottom: 4px; }
.pillar p { color: var(--ink-3); font-size: .98rem; }

/* ---------- Proceso ---------- */
.process { position: relative; display: grid; gap: 0; list-style: none; counter-reset: step; }
@media (min-width: 1024px) { .process { grid-template-columns: repeat(5, 1fr); gap: 24px; } }
.process__track { display: none; }
@media (min-width: 1024px) {
  .process__track { display: block; position: absolute; left: 0; right: 0; top: 27px; height: 2px; background: var(--line-dark); }
  .process__track span { position: absolute; inset: 0; background: linear-gradient(90deg, var(--green), var(--green-lit)); transform: scaleX(var(--p, 1)); transform-origin: left; }
}
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding-bottom: 36px; }
.step::before { content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px; background: var(--line-dark); }
.step:last-child::before { display: none; }
@media (min-width: 1024px) { .step { grid-template-columns: 1fr; gap: 20px; padding-bottom: 0; } .step::before { display: none; } }
.step__dot { position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-900); border: 2px solid var(--green); color: var(--green-lit); font-family: var(--f-mono); font-weight: 500; font-size: .9rem; }
.section--deep .step__dot { background: var(--navy-950); }
.step h3 { font-size: 1.15rem; letter-spacing: -.01em; margin-bottom: 8px; color: #fff; }
.step p { color: var(--on-dark-2); font-size: .96rem; }

/* ---------- Proyectos ---------- */
.projects { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .projects--feature { grid-template-columns: 1.3fr 1fr 1fr; grid-auto-rows: 300px; } .projects--feature .project:first-child { grid-row: span 2; } }
@media (min-width: 1100px) { .projects--grid { grid-template-columns: repeat(3, 1fr); } }
.project {
  position: relative; display: block; overflow: hidden; border-radius: var(--r-lg); background: var(--navy-900);
  min-height: 300px; color: #fff; text-decoration: none; isolation: isolate; border: 0; padding: 0; width: 100%; text-align: left; cursor: pointer;
}
.projects--grid .project { aspect-ratio: 4 / 3.3; min-height: 0; }
.project img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1200ms var(--ease-out); }
.project::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6,19,40,0) 35%, rgba(6,19,40,.92) 100%); transition: opacity var(--t-med) ease; }
.project:hover img, .project:focus-visible img { transform: scale(1.05); }
.project__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; display: grid; gap: 8px; }
.project__tag { justify-self: start; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: 4px; background: var(--green); color: var(--navy-950); font-weight: 500; }
.project__title { font-family: var(--f-display); font-size: 1.25rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.2; }
.project__meta { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--on-dark-2); }
.project__meta .icon { width: 15px; height: 15px; }
.project__open { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); opacity: 0; transform: scale(.85); transition: opacity var(--t-med) ease, transform var(--t-med) var(--ease-out); }
.project:hover .project__open, .project:focus-visible .project__open { opacity: 1; transform: none; }
@media (hover: none) { .project__open { opacity: 1; transform: none; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink-2); font-weight: 500; font-size: .95rem; transition: all var(--t-fast) ease; }
.filter:hover { border-color: var(--ink-2); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.project.is-hidden { display: none; }
.projects-count { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 16px; }

/* Visor de fotos */
.lightbox { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(4, 12, 26, .96); color: #fff; }
.lightbox::backdrop { background: rgba(4, 12, 26, .8); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: lb-in 260ms var(--ease-out); }
@keyframes lb-in { from { opacity: 0; } }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); }
.lightbox__count { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .12em; color: var(--on-dark-2); }
.lightbox__stage { position: relative; display: flex; align-items: center; justify-content: center; height: 100%; min-height: 0; overflow: hidden; padding: 0 var(--gutter); }
.lightbox__stage img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--r-md); }
.lightbox__caption { padding: 16px var(--gutter) 24px; text-align: center; color: var(--on-dark-2); }
.lightbox__caption strong { display: block; color: #fff; font-family: var(--f-display); font-weight: 500; font-size: 1.1rem; }
.lightbox__nav { position: absolute; top: 50%; translate: 0 -50%; }
.lightbox__nav--prev { left: var(--gutter); }
.lightbox__nav--next { right: var(--gutter); }
.lightbox .icon-btn { border-color: var(--line-dark); color: #fff; background: rgba(6,19,40,.6); }
.lightbox .icon-btn:hover { border-color: #fff; }

/* ---------- Normas y equipos ---------- */
.norms { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 760px) { .norms { grid-template-columns: repeat(3, 1fr); } }
.norm { background: var(--white); padding: 28px; display: grid; gap: 10px; align-content: start; }
.norm__code { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .12em; color: var(--green-700); font-weight: 500; }
.norm h3 { font-size: 1.15rem; letter-spacing: -.01em; }
.norm p { color: var(--ink-3); font-size: .96rem; }

.brands { display: flex; flex-wrap: wrap; gap: 12px; }
.brand-chip { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); font-weight: 600; letter-spacing: .01em; }
.brand-chip small { font-family: var(--f-mono); font-weight: 500; font-size: .7rem; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; }

/* ---------- Tarjetas de alcance (servicios) ---------- */
.scope { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 640px) { .scope { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .scope { grid-template-columns: repeat(3, 1fr); } }
.scope__item { position: relative; background: var(--white); padding: clamp(24px, 2.6vw, 36px); display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; row-gap: 10px; align-content: start; transition: background-color var(--t-med) ease; }
.scope__item:hover { background: var(--paper); }
.scope__icon { grid-column: 1; align-self: center; display: grid; place-items: center; color: var(--green-700); }
.scope__icon .icon { width: 24px; height: 24px; }
.scope__item h3 { grid-column: 2; align-self: center; font-size: 1.125rem; letter-spacing: -.01em; }
.scope__item p { grid-column: 1 / -1; color: var(--ink-3); font-size: .97rem; }

.checklist { list-style: none; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.checklist .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--green-700); stroke-width: 2.25; }
.section--dark .checklist .icon, .section--deep .checklist .icon { color: var(--green-lit); }

/* Ficha técnica */
.spec-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); overflow: hidden; }
.spec-card__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: var(--navy-900); color: #fff; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.spec-card__head span:last-child { color: var(--green-lit); }
.spec-card dl { margin: 0; }
.spec-card dl > div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.spec-card dl > div:last-child { border-bottom: 0; }
.spec-card dt { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.spec-card dd { margin: 0; font-weight: 500; }

/* ---------- Galería de servicio ---------- */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; } .gallery .g-tall { grid-row: span 2; } .gallery .g-wide { grid-column: span 2; } }
@media (max-width: 899px) { .gallery figure:last-child:nth-child(odd) { grid-column: span 2; } }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--navy-900); min-height: 200px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform 1200ms var(--ease-out); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; font-size: .82rem; color: #fff; background: rgba(6,19,40,.72); backdrop-filter: blur(6px); padding: 6px 10px; border-radius: 4px; justify-self: start; width: fit-content; max-width: calc(100% - 24px); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; cursor: pointer; font-family: var(--f-display); font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 500; letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 22px; height: 22px; color: var(--green-700); transition: transform var(--t-med) var(--ease-out); flex: none; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq__a { padding: 0 48px 26px 0; color: var(--ink-2); max-width: 75ch; }
.faq__a p + p { margin-top: 12px; }
.faq details[open] .faq__a { animation: faq-in 380ms var(--ease-out); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Servicios relacionados ---------- */
.related { display: grid; gap: 16px; }
@media (min-width: 760px) { .related { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .related { grid-template-columns: repeat(4, 1fr); } }
.related a { display: grid; gap: 14px; padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--line-dark); text-decoration: none; transition: border-color var(--t-med) ease, background-color var(--t-med) ease, transform var(--t-med) var(--ease-out); }
.related a:hover { border-color: var(--green); background: rgba(255,255,255,.03); transform: translateY(-3px); }
.related .icon { width: 26px; height: 26px; color: var(--green-lit); }
.related strong { font-family: var(--f-display); font-weight: 500; font-size: 1.1rem; letter-spacing: -.015em; }
.related span { color: var(--on-dark-2); font-size: .92rem; }

/* ---------- Banda de llamado a la acción ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--navy-800); color: #fff; padding: clamp(40px, 6vw, 80px); isolation: isolate; display: grid; gap: 32px; }
@media (min-width: 960px) { .cta-band { grid-template-columns: 1.4fr 1fr; align-items: end; } }
.cta-band::before { content: ""; position: absolute; right: -8%; top: -40%; width: 60%; aspect-ratio: 1; border-radius: 50%; z-index: -1; background: radial-gradient(circle, rgba(109,179,33,.35), rgba(109,179,33,0) 65%); }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(90deg, transparent, #000 70%); }
.cta-band .lead { color: var(--on-dark-2); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 960px) { .cta-band__actions { justify-content: flex-end; } }

/* ---------- Cobertura ---------- */
.coverage { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 960px) { .coverage { grid-template-columns: 1fr 1fr; } }
.coverage__map { position: relative; margin: 0; width: 100%; max-width: 560px; justify-self: center; }
.map-wrap { position: relative; aspect-ratio: 600 / 820; }
.map-wrap > svg { width: 100%; height: 100%; overflow: visible; }

/* Mapa de Colombia */
.col-map .dep { fill: var(--map-land); stroke: var(--white); stroke-width: .9; stroke-linejoin: round; transition: fill 600ms var(--ease-out), opacity 400ms ease; }
.col-map .dep:hover { fill: var(--map-hover); }
.col-map .dep.is-active { cursor: pointer; }
.map-ready .col-map .dep.is-active { fill: var(--navy-800); transition-delay: calc(var(--i, 0) * 110ms); }
.map-ready .col-map .dep.is-active:hover, .map-ready .col-map .dep.is-active:focus-visible, .map-ready .col-map .dep.is-hover { fill: var(--green); transition-delay: 0ms; }
.col-map .dep:focus { outline: none; }
.col-map .dep:focus-visible { stroke: var(--navy-950); stroke-width: 2; }
.col-map.has-hover .dep:not(.is-hover):not(:hover) { opacity: .55; }
.col-map .inset .dep { stroke: var(--map-hover); stroke-width: 5; }
.col-map .inset__box { fill: var(--white); stroke: var(--line); }
.col-map .inset__label { font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; fill: var(--ink-3); }
.col-map .marker { pointer-events: none; opacity: 0; transition: opacity 500ms ease; transition-delay: calc(var(--i, 0) * 110ms + 300ms); }
.map-ready .col-map .marker { opacity: 1; }
.col-map .marker__dot { fill: var(--green-lit); stroke: var(--navy-950); stroke-width: 1.5; }
.col-map .marker__ring { fill: var(--green); opacity: .35; transform-box: fill-box; transform-origin: center; animation: pulse 2.8s var(--ease-out) infinite; animation-delay: calc(var(--i, 0) * 240ms); }

.map-tip { position: absolute; z-index: 2; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); background: var(--navy-950); color: #fff; padding: 8px 12px; border-radius: var(--r-sm); font-size: .86rem; line-height: 1.35; white-space: nowrap; box-shadow: var(--shadow-2); }
.map-tip strong { display: block; font-weight: 600; }
.map-tip span { color: var(--green-lit); font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.map-tip span.off { color: var(--on-dark-2); }

.map-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-top: 16px; font-size: .88rem; color: var(--ink-2); }
.map-legend span { display: inline-flex; align-items: center; gap: 8px; }
.map-legend small { flex-basis: 100%; font-size: .8rem; color: var(--ink-3); }
.sw { width: 14px; height: 14px; border-radius: 4px; background: var(--map-land); display: inline-block; }
.sw--on { background: var(--navy-800); }

.deps-list { margin-top: 28px; }
.deps-list__title { font-weight: 600; margin-bottom: 12px; }
.deps-list__title span { font-family: var(--f-display); font-size: 1.4rem; color: var(--navy-800); margin-right: 4px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink-2); font-size: .92rem; font-weight: 500; transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease, color var(--t-fast) ease; }
.chip:hover, .chip.is-hover, .chip[aria-pressed="true"] { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.deps-list__more { margin-top: 12px; font-size: .9rem; color: var(--ink-3); }
.pulse { transform-origin: center; transform-box: fill-box; animation: pulse 2.8s var(--ease-out) infinite; }
@keyframes pulse { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }

/* ---------- Formulario ---------- */
.contact { display: grid; gap: var(--s-7); }
@media (min-width: 1024px) { .contact { grid-template-columns: .85fr 1.15fr; gap: var(--s-8); align-items: start; } }
.contact__aside { display: grid; gap: 24px; }
@media (min-width: 1024px) { .contact__aside { position: sticky; top: calc(var(--header-h) + 32px); } }
.channel { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: center; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--white); text-decoration: none; transition: border-color var(--t-med) ease, transform var(--t-med) var(--ease-out), box-shadow var(--t-med) ease; }
.channel:hover { border-color: var(--navy-800); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.channel__icon { width: 52px; height: 52px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--navy-100); color: var(--navy-800); }
.channel__icon--wa { background: var(--whatsapp-tint); color: var(--whatsapp); }
.channel__icon .icon { width: 24px; height: 24px; }
.channel small { display: block; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.channel strong { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow-1); }
.form { display: grid; gap: 22px; }
.form__row { display: grid; gap: 22px; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-weight: 600; font-size: .95rem; }
.field .req { color: var(--error); margin-left: 2px; }
.field .hint { font-size: .86rem; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: var(--r-sm);
  border: 1.5px solid var(--input-border); background: var(--input-bg); font-size: 1rem; line-height: 1.4;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, background-color var(--t-fast) ease;
}
.textarea { min-height: 140px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A4859' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--input-border-hover); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy-800); background: #fff; box-shadow: 0 0 0 4px rgba(11,42,85,.12); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--error); }
.field__error { display: none; align-items: center; gap: 6px; color: var(--error-ink); font-size: .88rem; font-weight: 500; }
.field.has-error .field__error { display: flex; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: .92rem; color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy-800); }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form__note { font-size: .86rem; color: var(--ink-3); }
.error-summary { border: 1.5px solid var(--error); background: var(--error-tint); border-radius: var(--r-md); padding: 16px 20px; color: var(--error-text); }
.error-summary h2 { font-family: var(--f-body); font-size: 1rem; letter-spacing: 0; margin-bottom: 6px; }
.error-summary ul { padding-left: 18px; }
.error-summary a { color: inherit; font-weight: 600; }
.form-status { border-radius: var(--r-md); padding: 20px 24px; display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.form-status .icon { width: 26px; height: 26px; }
.form-status--ok { background: var(--success-tint); border: 1.5px solid var(--green); color: var(--success-ink); }
.form-status--err { background: var(--error-tint); border: 1.5px solid var(--error); color: var(--error-text); }
.form-status strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.form-status .btn { margin-top: 12px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(6,19,40,.25); border-top-color: var(--navy-950); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--navy-950); color: var(--on-dark-2); padding-top: clamp(64px, 8vw, 104px); }
.footer-grid { display: grid; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--line-dark); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer-brand { display: grid; gap: 20px; align-content: start; max-width: 380px; }
.footer-brand .plate { background: #fff; border-radius: var(--r-md); padding: 14px 18px; justify-self: start; }
.footer-brand .brand { width: 150px; }
.footer-col h2 { font-family: var(--f-mono); font-size: .75rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer-col ul { list-style: none; display: grid; gap: 4px; }
.footer-col a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; transition: color var(--t-fast) ease; }
.footer-col a:hover { color: #fff; }
.footer-col .icon { width: 18px; height: 18px; color: var(--green-lit); }
.socials { display: flex; gap: 10px; }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line-dark); color: #fff; transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease; }
.socials a:hover { border-color: var(--green); background: rgba(109,179,33,.12); }
.socials .icon { width: 18px; height: 18px; }
.socials:empty, .socials[hidden] { display: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 24px 32px; font-size: .86rem; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
.footer-sign { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--whatsapp); color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 12px 32px -10px rgba(6, 19, 40, .45);
  transition: transform var(--t-med) var(--ease-out), background-color var(--t-fast) ease, opacity var(--t-med) ease;
}
.wa-float:hover { background: var(--whatsapp-hover); transform: translateY(-2px); }
.wa-float .icon { width: 26px; height: 26px; }
.wa-float__label { display: none; }
@media (min-width: 768px) { .wa-float__label { display: inline; } }
@media (max-width: 767px) { .wa-float { width: 56px; padding: 0; justify-content: center; } }

/* ---------- Texto legal ---------- */
.prose { max-width: 75ch; color: var(--ink-2); }
.prose h2 { font-size: 1.4rem; color: var(--ink); margin: 40px 0 12px; }
.prose p, .prose ul { margin-bottom: 14px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose h3 { font-size: 1.1rem; color: var(--ink); margin: 24px 0 8px; letter-spacing: -.01em; }
.prose h2 { scroll-margin-top: calc(var(--header-h) + 24px); }
.prose a { color: var(--navy-800); font-weight: 500; }
.pendiente { background: var(--highlight); color: var(--ink); padding: 1px 6px; border-radius: 4px; font-weight: 600; }

/* Documento legal con índice lateral */
.legal { display: grid; gap: 40px; }
@media (min-width: 1024px) { .legal { grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; } }
.legal__toc { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 24px; background: var(--paper); }
@media (min-width: 1024px) { .legal__toc { position: sticky; top: calc(var(--header-h) + 24px); } }
.legal__toc .mono { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.legal__toc ol { padding-left: 20px; display: grid; gap: 2px; font-size: .92rem; }
.legal__toc a { display: inline-block; padding: 4px 0; text-decoration: none; color: var(--ink-2); }
.legal__toc a:hover { color: var(--navy-800); text-decoration: underline; }
.aviso { margin-top: 48px; padding: clamp(24px, 3vw, 36px); border-radius: var(--r-lg); background: var(--navy-900); color: var(--on-dark); scroll-margin-top: calc(var(--header-h) + 24px); }
.aviso .mono { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green-lit); margin-bottom: 12px; }
.aviso p + p { margin-top: 12px; }
.aviso a { color: var(--green-lit); }

/* ---------- Animaciones de entrada ---------- */
/* Solo se ocultan si JS confirmó que puede revelarlas (clase .anim en <html>) */
.anim [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: var(--d, 0ms); }
.anim [data-reveal="fade"] { transform: none; }
.anim [data-reveal="left"] { transform: translateX(-28px); }
/* Cortina: una placa azul se retira hacia arriba y descubre la foto
   (se usa un pseudoelemento porque IntersectionObserver ignora elementos recortados con clip-path) */
.anim [data-reveal="mask"] { opacity: 1; transform: none; }
.anim [data-reveal="mask"]::after { content: ""; position: absolute; inset: 0; z-index: 2; background: var(--navy-900); transform-origin: 50% 0; transition: transform 1200ms var(--ease-in-out); transition-delay: var(--d, 0ms); }
.anim [data-reveal="mask"].is-in::after { transform: scaleY(0); }
.anim [data-reveal].is-in { opacity: 1; transform: none; }

.anim .hero__title .line > span { transform: translateY(105%); transition: transform 1100ms var(--ease-out); transition-delay: var(--d, 0ms); }
.anim .hero.is-ready .hero__title .line > span { transform: none; }
.anim .hero__fade { opacity: 0; transform: translateY(16px); transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: var(--d, 0ms); }
.anim .hero.is-ready .hero__fade { opacity: 1; transform: none; }
.anim .hero__media img { transform: scale(1.12); transition: transform 2600ms var(--ease-out); }
.anim .hero.is-ready .hero__media img { transform: scale(1.02); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-property: color, background-color, border-color, opacity, fill, stroke !important; transition-duration: 150ms !important; transition-delay: 0ms !important; }
  .btn:hover, .btn:active, .channel:hover, .related a:hover, .wa-float:hover { transform: none; }
  .energy-line::after, .pulse { display: none; }
}

/* ---------- Guías técnicas ---------- */
.guides { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .guides { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .guides { grid-template-columns: repeat(3, 1fr); } }
.guide-card { display: grid; grid-template-rows: auto 1fr; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; transition: border-color var(--t-med) ease, transform var(--t-med) var(--ease-out), box-shadow var(--t-med) ease; }
.guide-card:hover { border-color: var(--navy-800); transform: translateY(-3px); box-shadow: var(--shadow-1); }
.guide-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-900); }
.guide-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1200ms var(--ease-out); }
.guide-card__media--illus img { object-fit: contain; }
.guide-card:hover .guide-card__media img { transform: scale(1.04); }
.guide-card__body { display: grid; gap: 10px; align-content: start; padding: 22px 24px 24px; }
.guide-card__tag { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-700); }
.guide-card__title { font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; color: var(--ink); }
.guide-card:hover .guide-card__title { color: var(--navy-800); }
.guide-card__excerpt { color: var(--ink-3); font-size: .95rem; line-height: 1.55; }
.guide-card__meta { font-size: .85rem; color: var(--ink-3); }

/* Artículo */
.article-hero { max-width: 900px; }
.article-hero__title { font-size: clamp(2rem, 4vw, 3.25rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .92rem; color: var(--on-dark-2); }
.article-meta span { display: inline-flex; align-items: center; gap: 8px; }
.article-meta .icon { width: 16px; height: 16px; color: var(--green-lit); }
.article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.article > * { min-width: 0; }
@media (min-width: 1024px) { .article { grid-template-columns: minmax(0, 72ch) 300px; gap: 64px; align-items: start; justify-content: space-between; } }
.article__body { max-width: 72ch; font-size: 1.0625rem; }
.article__body > p:first-of-type { font-size: 1.15rem; color: var(--ink); }
.article__body h2 { font-size: clamp(1.35rem, 2vw, 1.65rem); margin-top: 44px; }
.article__body table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: .95rem; }
.article__body th, .article__body td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.article__body th { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); background: var(--paper); font-weight: 500; }
.article__body .note { margin: 8px 0 24px; }
.article__body ol { padding-left: 22px; }
.article__figure { margin: 0 0 32px; border-radius: var(--r-lg); overflow: hidden; background: var(--navy-900); aspect-ratio: 16 / 9; }
.article__figure img { width: 100%; height: 100%; object-fit: cover; }
.article__figure--illus img { object-fit: contain; }
@media (max-width: 640px) { .article__body table { display: block; overflow-x: auto; } }
.article__aside { display: grid; gap: 16px; }
@media (min-width: 1024px) { .article__aside { position: sticky; top: calc(var(--header-h) + 24px); } }
.aside-card { display: grid; gap: 14px; justify-items: start; padding: 24px; border-radius: var(--r-lg); background: var(--navy-900); color: var(--on-dark); }
.aside-card .mono { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green-lit); }
.aside-card__title { font-family: var(--f-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -.015em; color: #fff; }
.aside-card p:not(.mono):not(.aside-card__title) { color: var(--on-dark-2); font-size: .95rem; }
.faq-guides { margin-top: 16px; font-size: .95rem; color: var(--ink-3); }
.faq-guides a { color: var(--navy-800); font-weight: 500; }
.aside-card .link-arrow { color: var(--green-lit); }

/* Botones flotantes: inicio, volver arriba y WhatsApp, apilados */
.fabs { position: fixed; right: 20px; bottom: 20px; z-index: var(--z-float); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.fabs > * { pointer-events: auto; }
.fab { width: 48px; height: 48px; margin-right: 4px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--navy-800); box-shadow: var(--shadow-1); text-decoration: none; transition: opacity var(--t-med) ease, transform var(--t-med) var(--ease-out), background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease; }
.fab:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.fab .icon { width: 22px; height: 22px; }
.to-top { opacity: 0; transform: translateY(8px); }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top .icon { transform: rotate(180deg); }
@media (max-width: 767px) { .fab { width: 44px; height: 44px; margin-right: 6px; } }
body.drawer-open .fabs { opacity: 0; pointer-events: none; }
body.drawer-open .fabs > * { pointer-events: none; }

/* Rejillas de alcance con número impar de tarjetas: la última ocupa el ancho completo */
@media (min-width: 640px) and (max-width: 1023px) { .scope__item:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .scope__item:last-child:nth-child(3n+1) { grid-column: 1 / -1; } .scope__item:nth-last-child(2):nth-child(3n+1) ~ .scope__item:last-child { grid-column: span 2; } }

/* Áreas táctiles cómodas en pantallas táctiles */
@media (pointer: coarse) {
  .link-arrow { min-height: 44px; }
  .legal__toc a { display: flex; align-items: center; min-height: 44px; padding: 0; }
}
