/* ==========================================================================
   A.T. Solutions S.A.S. — Hoja de estilos principal
   Mobile-first · CSS moderno sin dependencias · Tokens en :root
   ========================================================================== */

/* ---------- 1. Tokens de diseño ---------- */
:root {
  /* Marca (extraída del logo) */
  --brand: #008ca8;
  --brand-bright: #22c3e0;
  --brand-soft: rgba(34, 195, 224, 0.12);
  --brand-glow: rgba(34, 195, 224, 0.35);

  /* Superficies oscuras */
  --bg: #060b16;
  --bg-alt: #091224;
  --surface: #0e1a2e;
  --surface-2: #13223b;
  --line: rgba(148, 180, 220, 0.14);
  --line-strong: rgba(148, 180, 220, 0.26);

  /* Texto */
  --text: #e8eef7;
  --text-muted: #9fb0c6;

  /* Sección Experiencia (oscura en este tema; clara en el tema claro) */
  --paper: var(--bg-alt);
  --paper-card: var(--surface);
  --paper-line: var(--line-strong);
  --ink: var(--text);
  --ink-muted: var(--text-muted);
  --brand-ink: var(--brand-bright);

  /* Tipografía */
  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lead: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  --fs-h3: clamp(1.1rem, 1.02rem + 0.35vw, 1.3rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 3.6vw, 4.25rem);

  /* Espaciado y forma */
  --gutter: 16px;
  --container: 1200px;
  --section-y: clamp(4rem, 3rem + 5vw, 7.5rem);
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 72px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Semánticos (tema oscuro por defecto) */
  color-scheme: dark;
  --accent: #22c3e0;
  --icon: #22c3e0;
  --link: #22c3e0;
  --link-hover: #6fdaee;
  --kicker: #22c3e0;
  --stat: #22c3e0;
  --hover-border: rgba(34, 195, 224, 0.4);
  --text-gradient: linear-gradient(100deg, #22c3e0, #7fe3f4 60%, #22c3e0);
  --btn-bg: #22c3e0;
  --btn-bg-hover: #48d2ea;
  --btn-text: #04121a;
  --ghost-bg: rgba(255, 255, 255, 0.04);
  --header-bg: rgba(6, 11, 22, 0.55);
  --header-bg-solid: rgba(6, 11, 22, 0.88);
  --nav-bg: rgba(6, 11, 22, 0.97);
  --chip-bg: rgba(14, 26, 46, 0.6);
  --chip-bg-strong: rgba(14, 26, 46, 0.85);
  --stats-bg: rgba(9, 18, 36, 0.9);
  --hero-photo-opacity: 0.32;
  --hero-overlay:
    radial-gradient(60% 55% at 85% 30%, rgba(34, 195, 224, 0.22), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(0, 140, 168, 0.18), transparent 70%),
    linear-gradient(90deg, rgba(6, 11, 22, 0.97) 0%, rgba(6, 11, 22, 0.8) 50%, rgba(6, 11, 22, 0.55) 100%),
    linear-gradient(180deg, transparent 60%, var(--bg) 100%);
  --orbit-glow: rgba(34, 195, 224, 0.25);
  --alliance-bg: linear-gradient(180deg, rgba(19, 34, 59, 0.9), rgba(14, 26, 46, 0.9));
  --ring: linear-gradient(135deg, #22c3e0, transparent 40%, transparent 60%, var(--brand));
  --contact-bg:
    radial-gradient(60% 80% at 100% 100%, rgba(34, 195, 224, 0.2), transparent 70%),
    linear-gradient(135deg, #0b2a3a, #0a1628 60%);
  --contact-border: rgba(34, 195, 224, 0.3);
  --contact-item-bg: rgba(6, 11, 22, 0.45);
  --footer-bg: #040810;
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c3e0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* ---------- 1b. Tema claro ---------- */
/* Paleta: blanco, azul acero (#e1e9f3 → #a0badb), azul del logo y acento naranja */
:root[data-theme="light"] {
  color-scheme: light;

  --brand: #0088c0;
  --brand-bright: #08a8e0;
  --brand-soft: rgba(0, 136, 192, 0.09);
  --brand-glow: rgba(0, 119, 168, 0.35);
  --steel-1: #e1e9f3;
  --steel-2: #c7d6e9;
  --steel-3: #a0badb;

  --bg: #ffffff;
  --bg-alt: #f3f7fc;
  --surface: #ffffff;
  --surface-2: #f6f9fd;
  --line: rgba(20, 50, 90, 0.1);
  --line-strong: rgba(20, 50, 90, 0.18);

  --text: #0f1b2d;
  --text-muted: #4a5a70;

  --paper: #eef3f9;
  --paper-card: #ffffff;
  --ink: #0f1b2d;
  --ink-muted: #4a5a70;
  --brand-ink: #006e9c;
  --paper-line: #dde5ef;

  --shadow: 0 20px 45px -24px rgba(20, 50, 90, 0.28);

  --accent: #efb32f;
  --icon: #0088c0;
  --link: #006e9c;
  --link-hover: #005f86;
  --kicker: #006e9c;
  --stat: #006e9c;
  --hover-border: rgba(0, 136, 192, 0.45);
  --text-gradient: linear-gradient(100deg, #006e9c, #0090c8 55%, #006e9c);
  --btn-bg: #006e9c;
  --btn-bg-hover: #00668f;
  --btn-text: #ffffff;
  --ghost-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.72);
  --header-bg-solid: rgba(255, 255, 255, 0.94);
  --nav-bg: rgba(255, 255, 255, 0.98);
  --chip-bg: rgba(255, 255, 255, 0.8);
  --chip-bg-strong: rgba(255, 255, 255, 0.94);
  --stats-bg: rgba(255, 255, 255, 0.92);
  --hero-photo-opacity: 0;
  --hero-overlay: linear-gradient(180deg, transparent 70%, var(--bg) 100%);
  --orbit-glow: rgba(255, 255, 255, 0.6);
  --alliance-bg: linear-gradient(160deg, #ffffff 0%, #f3f7fc 55%, var(--steel-1) 100%);
  --ring: linear-gradient(135deg, var(--brand), transparent 40%, transparent 60%, var(--accent));
  --contact-bg:
    radial-gradient(60% 90% at 100% 100%, rgba(255, 255, 255, 0.35), transparent 70%),
    linear-gradient(120deg, #f3f7fc 0%, var(--steel-1) 45%, var(--steel-2) 100%);
  --contact-border: var(--steel-2);
  --contact-item-bg: rgba(255, 255, 255, 0.75);
  --footer-bg: #f3f7fc;
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23006e9c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; --header-h: 84px; }
}

/* ---------- 2. Reset y base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Las secciones quedan justo debajo del encabezado fijo (también evita que el foco quede oculto, WCAG 2.4.11) */
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }

ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
strong { color: inherit; font-weight: 600; }

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

::selection { background: var(--brand); color: #fff; }

/* ---------- 3. Utilidades ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: calc(820px + var(--gutter) * 2); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.i {
  width: 1.25em; height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i-lg { width: 2rem; height: 2rem; color: var(--icon); }

.text-gradient {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--text-muted); }

.skip-link {
  position: absolute;
  left: var(--gutter); top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- 4. Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s;
}
.btn .i { transition: transform 0.25s var(--ease); }
.btn:hover .i { transform: translateX(3px); }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 10px 30px -10px var(--brand-glow);
}
.btn-primary:hover {
  color: var(--btn-text);
  background: var(--btn-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px var(--brand-glow);
}

.btn-ghost {
  background: var(--ghost-bg);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--icon);
  background: var(--brand-soft);
}

.btn-sm { min-height: 42px; padding: 0.5rem 1.1rem; font-size: 0.9rem; }

/* ---------- 5. Encabezado y navegación ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.site-header.is-scrolled {
  background: var(--header-bg-solid);
  border-bottom-color: var(--line);
}

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

.brand img { width: auto; height: 40px; }
@media (min-width: 1024px) { .brand img { height: 48px; } }

/* Logo según el tema */
.logo-for-light { display: none; }
[data-theme="light"] .logo-for-dark { display: none; }
[data-theme="light"] .logo-for-light { display: block; }

/* Controles del encabezado (idioma, tema y menú): mismo alto y forma de píldora.
   44 px en pantallas táctiles; 40 px en escritorio, alineados con el botón "Contáctenos" */
.header-actions {
  --ctl: 44px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
@media (max-width: 359px) { .header-actions { gap: 0.375rem; } }
@media (min-width: 1024px) {
  .header-actions { --ctl: 40px; }
  /* Separador sutil entre la navegación y los ajustes */
  .header-actions::before {
    content: "";
    width: 1px;
    height: 24px;
    margin-inline: 0.5rem 0.25rem;
    background: var(--line-strong);
  }
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: var(--ctl, 44px); height: var(--ctl, 44px);
  padding: 0;
  background: var(--ghost-bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, transform 0.4s var(--ease);
}
.theme-toggle:hover { border-color: var(--icon); color: var(--icon); }
.theme-toggle:active { transform: rotate(-30deg); }
.theme-toggle .i-moon { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-moon { display: block; }
html:not(.js) .theme-toggle { display: none; }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: var(--ctl, 44px); height: var(--ctl, 44px);
  padding: 0;
  background: var(--ghost-bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* Menú móvil */
.site-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  padding: 1rem var(--gutter) 1.5rem;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
}
.site-nav.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
  /* Visible al instante al abrir, para que el primer enlace pueda recibir el foco */
  transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0s;
}
.site-nav ul { display: grid; gap: 0.25rem; }
.site-nav a:not(.btn) {
  display: block;
  padding: 0.85rem 0.25rem;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="true"] { color: var(--link); }
.site-nav .btn { margin-top: 0.75rem; width: 100%; }

/* Sin JavaScript el menú sigue siendo accesible */
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .site-header { height: auto; position: static; }
html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 0.75rem; }
html:not(.js) .site-nav { position: static; opacity: 1; visibility: visible; transform: none; background: none; border: 0; padding: 0; }
html:not(.js) .site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
html:not(.js) .site-nav a:not(.btn) { border: 0; padding: 0.4rem 0; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .site-nav,
  html:not(.js) .site-nav {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .site-nav ul { display: flex; align-items: center; gap: 0.25rem; }
  .site-nav a:not(.btn) {
    position: relative;
    padding: 0.5rem 0.85rem;
    border: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
  }
  .site-nav a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0.85rem; right: 0.85rem; bottom: 0.2rem;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s var(--ease);
  }
  .site-nav a:not(.btn):hover,
  .site-nav a[aria-current="true"] { color: var(--text); }
  .site-nav a:not(.btn):hover::after,
  .site-nav a[aria-current="true"]::after { transform: scaleX(1); }
  .site-nav .btn { margin: 0 0 0 0.75rem; width: auto; }
  .site-nav { margin-left: auto; }
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(3rem, 2rem + 5vw, 6rem));
  padding-bottom: clamp(2.5rem, 2rem + 3vw, 4rem);
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 70% center;
  opacity: var(--hero-photo-opacity);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-overlay);
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 70% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 70% 40%, #000 20%, transparent 75%);
  opacity: 0.5;
}

.hero-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--brand-soft);
  animation: pulse 2.4s 2; /* WCAG 2.2.2: el movimiento automático dura menos de 5 s */
}

.lead {
  max-width: 60ch;
  font-size: var(--fs-lead);
  color: var(--text-muted);
}
.lead strong { color: var(--text); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
@media (max-width: 479px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

/* Visual orbital */
.hero-visual { display: none; }
.hero-visual { text-align: center; }
@media (min-width: 960px) {
  .hero-visual { display: block; }
}
.orbit {
  position: relative;
  aspect-ratio: 1;
  max-width: 460px;
  margin-inline: auto;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
}
.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.orbit::before { inset: 14%; }
.orbit::after {
  inset: 30%;
  background: radial-gradient(circle, var(--orbit-glow), transparent 70%);
  border-color: rgba(34, 195, 224, 0.35);
  box-shadow: 0 0 80px 10px rgba(34, 195, 224, 0.15);
}
.orbit-mark {
  position: absolute;
  z-index: 1;
  inset: 36.5% 34% 31.5%; /* un poco bajo el centro: al flotar sube 10 px */
  width: 32%;
  filter: drop-shadow(0 10px 30px rgba(34, 195, 224, 0.45));
  animation: float 4.5s ease-in-out 1; /* WCAG 2.2.2: un solo ciclo, menos de 5 s */
}
.chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  background: var(--chip-bg-strong);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  /* WCAG 2.2.2: aparición + un ciclo de flotación; termina antes de 5 s */
  animation: pop 0.6s var(--ease) both, float 3.6s ease-in-out 1;
  animation-delay: var(--in, 0s), var(--in, 0s);
}
.chip .i { color: var(--icon); }
.chip-1 { top: 4%; left: 8%; --in: 0.55s; }
.chip-2 { top: 22%; right: -6%; --in: 0.7s; --float: -1.5s; }
.chip-3 { bottom: 38%; left: -8%; --in: 0.85s; --float: -3s; }
.chip-4 { bottom: 6%; left: 24%; --in: 1s; --float: -4.5s; }
.chip-5 { bottom: 30%; right: -2%; --in: 1.15s; --float: -2.2s; }

/* Cifras */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
/* Cinco cifras: 2 columnas (la última a lo ancho), luego 3 + 2 y, en escritorio, una fila */
@media (max-width: 639px) {
  .stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stats li { grid-column: span 2; }
  .stats li:nth-child(n + 4) { grid-column: span 3; }
}
@media (min-width: 1024px) {
  .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stats li, .stats li:nth-child(n + 4) { grid-column: auto; }
}
.stats li {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  padding: 1.4rem 1.25rem;
  background: var(--stats-bg);
}
.stats strong {
  display: flex;
  align-items: flex-end;
  min-height: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--stat);
}
/* Cifras en palabras: dos líneas que ocupan el mismo alto que un número */
.stats .stat-text {
  font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.3rem);
  line-height: 1.1;
}
.stats span { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.4; }

/* ---------- 7. Secciones ---------- */
.section { padding-block: var(--section-y); position: relative; background-color: var(--bg); }
/* Desde el menú, estas secciones se detienen pasado su relleno superior: el título queda cerca del
   encabezado y entra más contenido en pantalla */
#equipos, #soluciones { scroll-margin-top: calc(1.75rem - var(--section-y)); }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section-head p:not(.kicker) { color: var(--text-muted); font-size: var(--fs-lead); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  color: var(--kicker);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 24px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Tarjetas */
.card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.card h3 { margin-top: 1rem; }
.card p { color: var(--text-muted); }

.card-glow { position: relative; overflow: hidden; }
.card-glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(40% 60% at 0% 0%, rgba(34, 195, 224, 0.18), transparent 70%);
  pointer-events: none;
}

/* Empresa */
.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.split > div > p { color: var(--text-muted); }
.split > div > p strong { color: var(--text); }
.split .lead { margin-bottom: 1.5rem; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; }
}
.mv-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) and (max-width: 959px) {
  .mv-grid { grid-template-columns: 1fr 1fr; }
}

/* Soluciones */
.solutions {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .solutions { grid-template-columns: repeat(2, 1fr); }
  .solutions > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .solutions { grid-template-columns: repeat(3, 1fr); }
  .solutions > :last-child:nth-child(odd) { grid-column: auto; }
}
.solution {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.solution:hover {
  transform: translateY(-4px);
  border-color: var(--hover-border);
  box-shadow: 0 30px 60px -30px var(--brand-glow);
}
.solution picture { aspect-ratio: 16 / 9; overflow: hidden; }
.solution picture img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), clip-path 1s var(--ease) 0.15s;
}
.solution:hover picture img { transform: scale(1.04); }
/* Revelado de la imagen al entrar en pantalla */
.js .solution[data-reveal]:not(.is-visible) picture img { clip-path: inset(0 0 100% 0); }
.solution-body { padding: 1.5rem 1.5rem 1.75rem; }
@media (min-width: 640px) { .solution-body { padding: 1.75rem 2rem 2rem; } }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  padding: 0.3rem 0.7rem;
  background: var(--brand-soft);
  color: var(--link);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
}
.tag .i { width: 1rem; height: 1rem; }

/* Listas con check */
.checks { display: grid; gap: 0.6rem; }
.checks li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em;
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  background: var(--brand-soft) var(--check-icon) center / 62% no-repeat;
}
.checks-lg li { font-size: 1.02rem; color: var(--text); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow .i { transition: transform 0.25s var(--ease); }
.link-arrow:hover .i { transform: translateX(4px); }

/* Equipos y periféricos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
}
.product {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.product:hover { border-color: var(--hover-border); transform: translateY(-3px); box-shadow: var(--shadow); }
.product h3 { margin: 1rem 0 0.35rem; font-size: 1.05rem; }
.product p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; margin-bottom: 1.25rem; }

/* Botón "Cotizar": lleva al formulario con el producto ya elegido */
.product-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--ghost-bg);
  color: var(--link);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.product-cta .i { width: 1rem; height: 1rem; transition: transform 0.25s var(--ease); }
.product-cta:hover { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.product-cta:hover .i { transform: translateX(3px); }

/* Campo resaltado brevemente al llegar desde "Cotizar" */
.field.is-prefilled textarea,
.field.is-prefilled select { border-color: var(--icon); background: var(--brand-soft); transition: background-color 1.2s; }

.service-strip {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--brand-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
}
.service-strip strong { color: var(--text); }

/* Sección clara: Experiencia */
.section-light {
  background: var(--paper);
  color: var(--ink);
}
.section-light .kicker { color: var(--brand-ink); }
.section-light .section-head p:not(.kicker) { color: var(--ink-muted); }

.clients {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .clients { grid-template-columns: 1.15fr 1fr; }
  .client-featured { grid-row: span 3; }
}
.client {
  padding: 1.75rem;
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px -20px rgba(11, 20, 36, 0.35);
}
.client h3 { font-size: 1.1rem; color: var(--ink); }
.client-featured {
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(0, 136, 192, 0.08), transparent 70%),
    var(--paper-card);
}
.client-featured h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 1.25rem; }
.client-featured ul { gap: 0.9rem; }
.client-featured li { font-size: 1rem; }
.client-badge {
  align-self: flex-start;
  margin-bottom: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(0, 136, 192, 0.1);
  color: var(--brand-ink);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
}
.client ul { display: grid; gap: 0.6rem; }
.client li {
  position: relative;
  padding-left: 1rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.client li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

/* Galería de evidencia: mosaico de fotos reales (verticales 1 × 2, horizontales 2 × 2) */
.evidence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(calc(33vw - 20px), auto);
  grid-auto-flow: dense;
  gap: 12px;
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
}
@media (min-width: 900px) {
  .evidence {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(clamp(120px, 15vw - 8px, 186px), auto);
    gap: 14px;
  }
}
.evidence-intro {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(90% 70% at 0% 100%, var(--brand-soft), transparent 70%),
    var(--paper-card);
  border: 1px solid var(--paper-line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
@media (min-width: 900px) {
  .evidence-intro { grid-column: span 1; grid-row: span 2; }
}
/* En dos columnas la última foto vertical quedaría sola: se muestra a lo ancho */
@media (max-width: 899px) {
  .evidence > .shot:last-child:not(.shot-wide) { grid-column: 1 / -1; }
}
.evidence-intro .kicker { margin-bottom: 0.6rem; }
.evidence-intro h3 { font-size: var(--fs-h3); color: var(--ink); margin-bottom: 0.6rem; }
.evidence-intro p:not(.kicker) { color: var(--ink-muted); font-size: 0.92rem; line-height: 1.5; }

.shot {
  position: relative;
  grid-row: span 2;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-line);
  box-shadow: 0 14px 34px -22px rgba(11, 20, 36, 0.55);
}
.shot-wide { grid-column: span 2; }
.shot a { display: block; height: 100%; }
.shot picture, .shot img { display: block; width: 100%; height: 100%; }
.shot img {
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.4s;
}
.shot a:hover img, .shot a:focus-visible img { transform: scale(1.05); }
.shot a:focus-visible { outline: none; }
.shot:has(a:focus-visible) { outline: 2px solid var(--link); outline-offset: 3px; }
/* Pie siempre legible: texto claro sobre un degradado oscuro de la propia foto, en ambos temas */
.shot figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.5rem 0.9rem 0.8rem;
  background: linear-gradient(180deg, transparent, rgba(4, 10, 20, 0.82));
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  pointer-events: none;
}
@media (min-width: 640px) { .shot figcaption { padding-inline: 1.1rem; font-size: 0.9rem; } }
.shot figcaption::before {
  content: "";
  display: block;
  width: 22px; height: 3px;
  margin-bottom: 0.45rem;
  border-radius: 2px;
  background: var(--accent);
}
/* Ícono de ampliar al pasar el ratón o llegar con el teclado */
.shot a::after {
  content: "";
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(4, 10, 20, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center / 16px no-repeat;
  opacity: 0;
  scale: 0.8;
  transition: opacity 0.25s, scale 0.25s var(--ease);
}
.shot a:hover::after, .shot a:focus-visible::after { opacity: 1; scale: 1; }
@media (hover: none) { .shot a::after { opacity: 0.85; scale: 1; } }

/* Visor de fotos (se crea desde main.js) */
.lightbox {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(3, 7, 15, 0.97); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; animation: lb-in 0.25s var(--ease); }
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--gutter);
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: #c9d6e6;
}
.lightbox-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 var(--gutter);
  touch-action: pan-y;
}
.lightbox-stage img {
  max-width: 100%;
  /* Alto disponible: pantalla menos la barra superior y el pie de foto */
  max-height: calc(100dvh - 9rem);
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  transition: opacity 0.2s;
}
.lightbox-stage img.is-loading { opacity: 0.25; }
.lightbox-caption {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.9rem var(--gutter) 1.25rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}
.lightbox-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.35); }
.lightbox-btn:focus-visible { outline: 2px solid #4cc8ef; outline-offset: 2px; }
.lightbox-btn .i { width: 1.25rem; height: 1.25rem; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
}
.lightbox-prev { left: calc(var(--gutter) + 4px); }
.lightbox-next { right: calc(var(--gutter) + 4px); }
@media (max-width: 639px) {
  /* En el celular las flechas van abajo, para no tapar la foto */
  .lightbox-nav { top: auto; bottom: -3.5rem; translate: none; }
  .lightbox-stage { margin-bottom: 3.75rem; }
  .lightbox-stage img { max-height: calc(100dvh - 13rem); }
}
@media (min-width: 900px) {
  .lightbox-stage { padding: 0 5.5rem; }
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox-open { overflow: hidden; }

/* Modelo de trabajo */
.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.steps li {
  position: relative;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-n {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, var(--icon), var(--brand-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.steps h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.steps p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

/* Línea de tiempo: vertical en móvil, horizontal en escritorio; se dibuja al entrar en pantalla */
.steps { position: relative; padding-left: 2rem; }
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  left: 0.55rem; top: 1rem; bottom: 1rem;
  width: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}
.steps::after {
  background: linear-gradient(180deg, var(--icon), var(--accent));
  transform-origin: top;
  transition: transform 1.6s var(--ease) 0.2s;
}
.js .steps:not(.is-visible)::after { transform: scaleY(0); }
.steps li::before {
  content: "";
  position: absolute;
  left: calc(-2rem + 0.55rem - 5px); top: 1.85rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--icon);
}
@media (min-width: 1024px) {
  .steps { padding-left: 0; padding-top: 2.25rem; }
  .steps::before,
  .steps::after {
    left: 1.5rem; right: 1.5rem; top: 0.45rem; bottom: auto;
    width: auto; height: 2px;
  }
  .steps::after {
    background: linear-gradient(90deg, var(--icon), var(--accent));
    transform-origin: left;
  }
  .js .steps:not(.is-visible)::after { transform: scaleX(0); }
  .steps li::before { left: 1.5rem; top: calc(-2.25rem + 0.45rem - 5px); }
}

.sectors-block { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); }
.sub-head { font-size: var(--fs-h3); margin-bottom: 1.25rem; }

/* Sectores */
.sectors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 0.75rem;
}
@media (min-width: 1024px) {
  .sectors { grid-template-columns: repeat(4, 1fr); }
}
.sectors li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 500;
}
.sectors .i { color: var(--icon); width: 1.4rem; height: 1.4rem; }

/* Alianza */
.alliance { overflow: hidden; }
.alliance::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 60% at 50% 0%, rgba(34, 195, 224, 0.14), transparent 70%);
  pointer-events: none;
}
.alliance-card {
  position: relative;
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  background: var(--alliance-bg);
  border-radius: calc(var(--radius-lg) + 6px);
  box-shadow: var(--shadow);
}
.alliance-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.alliance-cols {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 960px) {
  .alliance-cols { grid-template-columns: 1.2fr 0.8fr; gap: 3.5rem; }
}
.alliance-cols h3 { margin-bottom: 1.25rem; }
.value-list { display: grid; gap: 1.1rem; }
.value-list li {
  display: flex;
  gap: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.value-list li strong { color: var(--text); }
.value-list .i {
  width: 2.5rem; height: 2.5rem;
  padding: 0.55rem;
  color: var(--icon);
  background: var(--brand-soft);
  border-radius: 12px;
}
.alliance-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
@media (max-width: 479px) { .alliance-cta .btn { flex: 1 1 100%; } }

/* Preguntas frecuentes */
.faq { display: grid; gap: 0.75rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s;
}
.faq details[open] { border-color: var(--hover-border); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--link);
  font-size: 1.2rem;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.35rem 1.25rem; color: var(--text-muted); }
/* Respuesta con catálogo por categorías */
.faq details p:has(+ .faq-catalog) { padding-bottom: 0.75rem; }
.faq-catalog { display: grid; gap: 0.55rem; padding: 0 1.35rem 1rem; }
.faq-catalog li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.faq-catalog li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em;
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  background: var(--brand-soft) var(--check-icon) center / 62% no-repeat;
}
.faq-catalog strong { color: var(--text); font-weight: 600; }

/* Contacto */
.contact:not(.section-band) { padding-top: 0; }
.alliance-page { padding-top: clamp(2rem, 1rem + 4vw, 4rem); }
.contact-card {
  display: grid;
  gap: 2.5rem;
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  background: var(--contact-bg);
  border: 1px solid var(--contact-border);
  border-radius: calc(var(--radius-lg) + 6px);
}
@media (min-width: 960px) {
  .contact-card { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}
.contact-intro p:not(.kicker) { color: var(--text-muted); }
.contact-list { display: grid; gap: 0.5rem; }
.contact-list a,
.contact-list p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--contact-item-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-list a:hover { border-color: var(--icon); color: var(--text); }
.contact-list .i { color: var(--icon); }
.contact-list .contact-person {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  background: none;
  border: 0;
  padding: 0 0 0.5rem;
}
.contact-person strong { font-family: var(--font-display); font-size: 1.15rem; }
.contact-person span { color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- 8. Pie de página ---------- */
.site-footer {
  padding-block: 3rem 2rem;
  background: var(--footer-bg);
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.footer-inner {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
}
.footer-brand img { height: 52px; width: auto; margin-bottom: 1rem; }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer .footer-col ul { display: grid; gap: 0.65rem; }
.site-footer nav a { color: var(--text-muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--link); }
.footer-legal {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.footer-legal p { margin-bottom: 0.35rem; }
.footer-legal .muted { font-size: 0.8rem; opacity: 0.8; }

/* ---------- 9. Ajustes del tema claro ---------- */
/* Luz difusa con líneas: ocupa toda la portada, anclada abajo a la derecha, y se apaga antes de la sección siguiente */
.hero-curves {
  display: none;
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}
@media (min-width: 960px) {
  .hero-curves { opacity: 1; }
}
[data-theme="light"] .hero-curves { display: block; }
.curve-line {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.curve-line-soft { opacity: 0.6; }
.curve-accent { stroke: var(--accent); }

[data-theme="light"] .hero-grid { opacity: 0.35; }
[data-theme="light"] .orbit { border-color: rgba(255, 255, 255, 0.9); }
/* Difusión detrás de la órbita: atenúa las líneas de la luz difusa y se desvanece sin borde */
[data-theme="light"] .hero-visual::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: min(130%, 600px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15) 55%, transparent);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent);
  mask-image: radial-gradient(closest-side, #000 35%, transparent);
}
[data-theme="light"] .orbit::before { border-color: rgba(255, 255, 255, 0.7); }
[data-theme="light"] .orbit::after {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 80px 10px rgba(255, 255, 255, 0.5);
}
[data-theme="light"] .orbit-mark { filter: drop-shadow(0 12px 24px rgba(0, 90, 140, 0.25)); }
[data-theme="light"] .stats { box-shadow: var(--shadow); }
[data-theme="light"] .card,
[data-theme="light"] .solution,
[data-theme="light"] .product,
[data-theme="light"] .steps li,
[data-theme="light"] .sectors li,
[data-theme="light"] .faq details { box-shadow: 0 10px 30px -22px rgba(20, 50, 90, 0.3); }
[data-theme="light"] .card-glow::before {
  background: radial-gradient(40% 60% at 0% 0%, rgba(0, 136, 192, 0.08), transparent 70%);
}
[data-theme="light"] .alliance::before {
  background: radial-gradient(50% 60% at 50% 0%, rgba(0, 136, 192, 0.08), transparent 70%);
}
[data-theme="light"] .client { border-top-color: var(--accent); }
[data-theme="light"] .client li::before { background: var(--brand); }

/* ---------- 9b. Bandas, formulario, pie y selector de idioma ---------- */

/* Banda de color profundo (ritmo visual): mismos tokens, re-definidos localmente */
.section-band,
.photo-band,
.site-footer {
  --bg: #0b1f38;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.08);
  --line: rgba(160, 200, 240, 0.16);
  --line-strong: rgba(160, 200, 240, 0.3);
  --text: #eef4fb;
  --text-muted: #b3c3d7;
  --icon: #4cc8ef;
  --link: #7fd6f3;
  --link-hover: #b5e8f8;
  --kicker: #4cc8ef;
  --brand-soft: rgba(76, 200, 239, 0.12);
  --brand-glow: rgba(76, 200, 239, 0.3);
  --hover-border: rgba(76, 200, 239, 0.45);
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234cc8ef' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --btn-bg: #22c3e0;
  --btn-bg-hover: #48d2ea;
  --btn-text: #04121a;
  --ghost-bg: rgba(255, 255, 255, 0.06);
  --contact-item-bg: rgba(255, 255, 255, 0.06);
  --text-gradient: linear-gradient(100deg, #4cc8ef, #9be3f7 60%, #4cc8ef);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.55);
  color: var(--text);
}
.section-band {
  background:
    radial-gradient(55% 70% at 0% 100%, rgba(34, 195, 224, 0.12), transparent 65%),
    var(--bg);
  background-color: var(--bg);
}
[data-theme="light"] .section-band,
[data-theme="light"] .photo-band,
[data-theme="light"] .site-footer {
  --bg: #0b2a4a;
  --accent: #efb32f;
  --kicker: #efb32f;
}
.section-band .section-head p:not(.kicker) { color: var(--text-muted); }

/* Banda fotográfica */
.photo-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(5rem, 4rem + 6vw, 9rem);
  --text-muted: #d2deeb;
}
.photo-band-bg { position: absolute; inset: 0; z-index: -2; }
.photo-band-bg img { width: 100%; height: 100%; object-fit: cover; }
.photo-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(6, 14, 28, 0.94) 0%, rgba(6, 14, 28, 0.78) 50%, rgba(6, 14, 28, 0.3) 100%);
}
.photo-band-inner { max-width: 640px; }
.photo-band-inner p:not(.kicker) { color: var(--text-muted); font-size: var(--fs-lead); margin-bottom: 2rem; }

/* Cifras con icono */
.stat-icon { width: 1.6rem; height: 1.6rem; margin-bottom: 0.6rem; color: var(--icon); }

/* Tarjetas con acento lateral */
.product,
.steps li { border-left: 3px solid var(--icon); }
.product .i-lg {
  width: 2.75rem; height: 2.75rem;
  padding: 0.6rem;
  border-radius: 50%;
  background: var(--brand-soft);
}

/* Contacto: texto + formulario */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: start; }
}
.contact-intro > p:not(.kicker) { color: var(--text-muted); }
.callout {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.05);
}
.callout strong { color: var(--text); }

.contact-form {
  /* Tarjeta clara en ambos temas */
  --text: #0f1b2d;
  --text-muted: #4a5a70;
  --line: rgba(20, 50, 90, 0.14);
  --line-strong: #76849a; /* WCAG 1.4.11: borde de campos con contraste ≥ 3:1 */
  --icon: #0088c0;
  --link: #006e9c;
  --btn-bg: #006e9c;
  --btn-bg-hover: #00668f;
  --btn-text: #ffffff;
  --ghost-bg: #ffffff;
  --brand-soft: rgba(0, 136, 192, 0.09);
  color-scheme: light;
  padding: clamp(1.25rem, 1rem + 2vw, 2.25rem);
  background: #ffffff;
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}
.form-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  /* WCAG 2.4.7 / 2.4.13: indicador de foco sólido de 2 px */
  outline: 2px solid var(--icon);
  outline-offset: 1px;
  border-color: var(--icon);
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.5rem 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  cursor: pointer;
}
.consent input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--icon); } /* WCAG 2.5.8 */
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.form-actions .btn { flex: 1 1 200px; }
.form-note { margin-top: 1rem; color: var(--text-muted); font-size: 0.8rem; }
.consent a { color: var(--link); }

/* Estados de error del formulario */
.contact-form { --error: #b42318; --error-soft: #fef3f2; }
.field-error {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0;
  color: var(--error);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}
.field-error::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.05rem; height: 1.05rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: var(--error);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
}
.field-error[hidden] { display: none; }
.field-error-consent { margin: -0.75rem 0 1.25rem 2.1rem; }
.field [aria-invalid="true"] {
  border-color: var(--error);
  background: var(--error-soft);
}
.field [aria-invalid="true"]:focus-visible { outline-color: var(--error); }
.consent.has-error { color: var(--error); }
.consent [aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.form-status:not(:empty) {
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--error);
  border-radius: 0 10px 10px 0;
  background: var(--error-soft);
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Páginas internas: legales y agradecimiento */
.page-hero {
  position: relative;
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) clamp(2rem, 1.5rem + 2vw, 3rem);
  background:
    radial-gradient(50% 80% at 100% 0%, var(--brand-soft), transparent 70%),
    var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem); margin-bottom: 0.75rem; }
.page-hero .lead { margin-bottom: 0; }
.breadcrumb { margin-bottom: 1.25rem; font-size: var(--fs-sm); color: var(--text-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.6; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb [aria-current] { color: var(--text); }

.legal-layout { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) {
  .legal-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 4rem; align-items: start; }
  .legal-toc { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.legal-toc {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.legal-toc h2 { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--kicker); margin-bottom: 0.9rem; }
.legal-toc ol { display: grid; gap: 0.5rem; padding-left: 1.1rem; list-style: decimal; color: var(--text-muted); }
.legal-toc a { color: var(--text-muted); text-decoration: none; }
.legal-toc a:hover { color: var(--link); }

.legal { max-width: 72ch; }
.legal h2 {
  margin: 2.5rem 0 0.9rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h3 { margin: 1.5rem 0 0.5rem; font-size: 1.05rem; }
.legal p,
.legal li { color: var(--text-muted); }
.legal strong { color: var(--text); }
.legal ul,
.legal ol { display: grid; gap: 0.5rem; margin: 0 0 1em; padding-left: 1.25rem; list-style: disc; }
.legal ol { list-style: decimal; }
.legal dl { display: grid; gap: 0.25rem 1.5rem; margin: 0 0 1em; }
@media (min-width: 640px) { .legal dl { grid-template-columns: max-content 1fr; } }
.legal dt { color: var(--text); font-weight: 600; }
.legal dd { margin: 0 0 0.5rem; color: var(--text-muted); }
.legal .note {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--brand-soft);
}

.thanks {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}
.thanks-icon {
  display: grid;
  place-items: center;
  width: 84px; height: 84px;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--icon);
  animation: pop 0.7s var(--ease) both;
}
.thanks-icon .i { width: 2.6rem; height: 2.6rem; stroke-width: 2.4; }
.thanks .lead { margin-inline: auto; }
.thanks-fallback {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.thanks-fallback h2 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.thanks-fallback p { color: var(--text-muted); font-size: 0.95rem; }
.thanks-fallback .hero-actions,
.thanks > .hero-actions { justify-content: center; margin-top: 1.25rem; }
.thanks-next {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
  text-align: left;
}
@media (min-width: 640px) { .thanks-next { grid-template-columns: repeat(3, 1fr); } }
.thanks-next li {
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--icon);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.thanks-next strong { display: block; margin-bottom: 0.25rem; color: var(--text); font-family: var(--font-display); }
.footer-links a { color: var(--text-muted); }

/* Pie de página por columnas (siempre oscuro) */
.site-footer { background: #071526; border-top: 0; }
[data-theme="light"] .site-footer { background: #0b2340; }
[data-theme="light"] .site-footer .logo-for-dark { display: block; }
[data-theme="light"] .site-footer .logo-for-light { display: none; }
.footer-grid { display: grid; gap: 2.25rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-brand p { max-width: 36ch; }
.footer-title {
  margin-bottom: 1rem;
  color: var(--kicker);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-col a { color: var(--text-muted); text-decoration: none; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--link); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.footer-legal a { color: var(--text-muted); }

/* Selector de idioma: un solo botón compacto; cualquier clic cambia al otro idioma */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: var(--ctl, 44px);
  padding: 4px;
  background: var(--ghost-bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lang-opt {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 100%;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background-color 0.2s, color 0.2s;
}
.lang-opt.is-active { background: var(--brand-soft); color: var(--link); }
.lang-switch:hover { border-color: var(--icon); }
.lang-switch:hover .lang-opt:not(.is-active) { color: var(--text); }
/* Al hacer clic, el resaltado pasa de inmediato al idioma elegido mientras carga la otra página */
.lang-switch.is-switching .lang-opt.is-active { background: transparent; color: var(--text-muted); }
.lang-switch.is-switching .lang-opt:not(.is-active) { background: var(--brand-soft); color: var(--link); }
@media (max-width: 359px) { .lang-opt { min-width: 28px; padding: 0 4px; } }

/* Navegación compacta entre 1024 y 1280 px (textos largos en español) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .site-nav a:not(.btn) { padding-inline: 0.55rem; font-size: 0.9rem; }
  .site-nav a:not(.btn)::after { left: 0.55rem; right: 0.55rem; }
}

/* Títulos largos en pantallas pequeñas */
@media (max-width: 479px) {
  h1, h2 { hyphens: auto; overflow-wrap: break-word; }
}

/* ---------- 9c. Accesibilidad WCAG 2.2 ---------- */

/* 2.2.2 Pausar, detener, ocultar: con JavaScript la animación del logo es continua
   y el botón "Pausar animación" (o un clic en los anillos) la detiene */
.js .orbit-mark { animation: float 6s ease-in-out infinite; }
.js .chip {
  animation: pop 0.6s var(--ease) both, float 7s ease-in-out infinite;
  animation-delay: var(--in, 0s), var(--float, 0s);
}
.hero-visual.is-paused .orbit-mark,
.hero-visual.is-paused .chip { animation-play-state: paused; }
.js .hero-visual .orbit { cursor: pointer; }
.motion-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  margin: 1.75rem auto 0;
  padding: 0 0.95rem;
  background: var(--chip-bg-strong);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
/* Oculto a la vista (como "Saltar al contenido"): solo aparece al llegar con Tab.
   Con ratón se pausa haciendo clic en los anillos. */
.hero-visual { position: relative; }
.js .motion-toggle {
  display: inline-flex;
  position: absolute;
  width: 1px; height: 1px; min-height: 0;
  margin: 0; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.js .motion-toggle:focus-visible {
  position: static;
  width: auto; height: auto; min-height: 36px;
  margin: 1.75rem auto 0;
  padding: 0 0.95rem;
  border: 1px solid var(--line-strong);
  overflow: visible;
  clip: auto;
}
.motion-toggle:hover { border-color: var(--icon); color: var(--text); }
.motion-toggle .i { width: 0.95rem; height: 0.95rem; }
.motion-toggle .i-play,
.hero-visual.is-paused .motion-toggle .i-pause { display: none; }
.hero-visual.is-paused .motion-toggle .i-play { display: block; }
@media (prefers-reduced-motion: reduce) {
  .js .motion-toggle { display: none; }
  .js .hero-visual .orbit { cursor: default; }
}

/* 2.5.8 Tamaño del objetivo: enlaces sueltos de al menos 24 × 24 px */
.footer-col a,
.footer-legal a,
.breadcrumb a,
.legal-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  min-width: 24px;
}
.footer-col ul { gap: 0.4rem; }

/* 3.3.2 Indicación de campos obligatorios */
.form-required-note { margin: 0 0 1.25rem; color: var(--text-muted); font-size: 0.85rem; }
.req { color: var(--error); font-weight: 700; }

/* 2.4.11 Foco no oculto: margen adicional al mover el foco con el teclado */
:focus { scroll-margin-top: 16px; scroll-margin-bottom: 16px; }

/* Cambio de idioma sin movimiento: la página aparece ya ubicada en el mismo punto de lectura */
.restoring body { opacity: 0; }
.restoring [data-reveal],
.restoring .solution picture img,
.restoring .steps::after { transition: none !important; }
.no-intro .hero-copy > *,
.no-intro .orbit,
.no-intro .stats { animation: none !important; }
.no-intro .chip { animation: float 7s ease-in-out infinite; animation-delay: var(--float, 0s); }

/* ---------- 10. Movimiento y transiciones ---------- */

/* Separadores curvos entre secciones (eco de la curva de la papelería) */
.curve-top::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--curve-h) * -1 + 1px);
  height: var(--curve-h);
  background-color: inherit;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 80V44C320 -4 1060 -10 1440 40V80Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 80V44C320 -4 1060 -10 1440 40V80Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}
.curve-flip::before { transform: scaleX(-1); }
:root { --curve-h: clamp(28px, 4vw, 64px); }

/* Barra de progreso de lectura */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: 3px;
  background: linear-gradient(90deg, var(--icon), var(--accent));
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
  pointer-events: none;
}

/* Encabezado que se oculta al bajar y reaparece al subir */
.site-header { transition: background-color 0.3s, border-color 0.3s, transform 0.35s var(--ease); }
.site-header.is-hidden { transform: translateY(-100%); }

/* Entrada escalonada de la portada */
.js .hero-copy > * { animation: rise 0.8s var(--ease) both; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.18s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.28s; }
.js .orbit { animation: pop 1s var(--ease) 0.25s both; }
.js .stats { animation: rise 0.8s var(--ease) 0.4s both; }

/* Menú móvil con enlaces escalonados */
@media (max-width: 1023px) {
  .js .site-nav li {
    opacity: 0;
    translate: 0 -6px;
    transition: opacity 0.3s, translate 0.3s var(--ease);
  }
  .js .site-nav.is-open li { opacity: 1; translate: 0 0; }
  .js .site-nav.is-open li:nth-child(2) { transition-delay: 0.04s; }
  .js .site-nav.is-open li:nth-child(3) { transition-delay: 0.08s; }
  .js .site-nav.is-open li:nth-child(4) { transition-delay: 0.12s; }
  .js .site-nav.is-open li:nth-child(5) { transition-delay: 0.16s; }
  .js .site-nav.is-open li:nth-child(6) { transition-delay: 0.2s; }
}
.header-back { display: none; }
@media (min-width: 480px) { .header-back { display: inline-flex; } }

/* Preguntas frecuentes que se abren con suavidad (navegadores compatibles) */
.faq { interpolate-size: allow-keywords; }
.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }

/* Cambio de tema con revelado circular desde el botón (View Transitions API) */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
/* Curva que acelera hasta el final: con una que frena, en pantallas altas el círculo
   tarda en cubrir la última esquina y parece que se detiene */
::view-transition-new(root) { animation: theme-reveal 0.5s cubic-bezier(0.4, 0, 0.9, 0.6); }
/* Durante el cambio no se animan colores (si no, siguen cambiando tras el revelado) */
.theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); }
  to { clip-path: circle(var(--vt-r, 150%) at var(--vt-x, 50%) var(--vt-y, 0)); }
}

/* ---------- 11. Animaciones ---------- */
@keyframes rise {
  from { opacity: 0; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes pop {
  from { opacity: 0; scale: 0.85; }
  to { opacity: 1; scale: 1; }
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--brand-soft); }
  50% { box-shadow: 0 0 0 8px rgba(34, 195, 224, 0.04); }
}

/* Aparición al hacer scroll (solo si hay JavaScript) */
.js [data-reveal] {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js [data-reveal].is-visible { opacity: 1; translate: 0 0; }

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

/* ---------- 12. Impresión ---------- */
@media print {
  .site-header, .hero-bg, .hero-grid, .hero-visual, .hero-curves, .skip-link, .scroll-progress { display: none !important; }
  .curve-top::before { display: none; }
  body, .section-alt, .section-light, .alliance-card, .contact-card, .card, .solution, .product, .steps li, .sectors li, .faq details {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  .js [data-reveal] { opacity: 1 !important; translate: none !important; }
  .faq details p { display: block; }
  a { color: #000; }
}
