/* ============================================================
   ARTEOS DIGITAL · main.css
   Design system: DESIGN-SYSTEM.md (raíz del repo)
   ============================================================ */

/* ---------- Fuentes (self-hosted) ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-var-italic-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC;
}
@font-face {
  font-family: 'Fragment Mono';
  src: url('/assets/fonts/fragment-mono-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC;
}

/* ---------- Tokens ---------- */
:root {
  --petrol-100: #D9E4EC;
  --petrol-200: #A8C2D4;
  --petrol-400: #3E6B8C;
  --petrol-700: #1B5478;
  --petrol-800: #164562;
  --petrol-900: #0C2F47;
  --paper-50:  #F5F7F9;
  --paper-100: #E8EDF1;
  --paper-200: #D5DDE3;
  --ink-300:   #9FAEBA;
  --ink-400:   #566B7C;
  --ink-600:   #425663;
  --ink-950:   #16232E;
  --ink-band:  #0D1B26;
  --lacre-600: #B2431E;
  --lacre-700: #9E3A19;
  --ambar-400: #D9822B;
  --success:   #2F7A4E;
  --danger:    #A5342B;

  --font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Fragment Mono', ui-monospace, 'Cascadia Mono', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-ui: 200ms;
  --dur-reveal: 550ms;

  --wrapper: 1200px;
  --sec-pad: clamp(4rem, 2rem + 6vw, 8rem);
  --focus-ring: 0 0 0 3px rgba(178, 67, 30, 0.4);
}
@supports (color: oklch(0.5 0.1 230)) {
  :root {
    --petrol-200: oklch(0.81 0.045 230);
    --petrol-700: oklch(0.42 0.08 230);
    --paper-50: oklch(0.972 0.004 230);
    --ink-band: oklch(0.185 0.025 235);
    --lacre-600: oklch(0.52 0.145 40);
    --lacre-700: oklch(0.465 0.14 40);
    --ambar-400: oklch(0.68 0.13 65);
  }
}

/* ---------- Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink-950);
  background: var(--paper-50);
  font-feature-settings: 'kern' 1, 'liga' 1;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.6em; font-weight: 640; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0 0 1em; max-width: 70ch; }
ul, ol { padding-left: 1.2em; }
a { color: var(--petrol-700); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--dur-ui) var(--ease); }
a:hover { color: var(--petrol-900); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
::selection { background: var(--petrol-200); color: var(--ink-950); }

.wrapper { max-width: var(--wrapper); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.prose { max-width: 760px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Números tabulares */
.num, .kpi-value, .cert-meta, time { font-feature-settings: 'tnum' 1; }

/* ---------- Tipos display ---------- */
.display-xl { font-size: clamp(2.15rem, 1rem + 5.6vw, 5.25rem); line-height: 1.04; font-stretch: 118%; font-weight: 660; letter-spacing: -0.02em; overflow-wrap: break-word; }
.display-l  { font-size: clamp(2.2rem, 1.2rem + 3.4vw, 3.75rem); line-height: 1.06; font-stretch: 115%; font-weight: 650; letter-spacing: -0.015em; }
.display-m  { font-size: clamp(1.85rem, 1.3rem + 2vw, 2.75rem); line-height: 1.1; font-stretch: 112%; font-weight: 650; }
h2, .h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.06rem); }
h3, .h3 { font-size: 1.31rem; }
.lead { font-size: clamp(1.06rem, 1rem + 0.5vw, 1.31rem); line-height: 1.5; color: var(--ink-600); max-width: 62ch; }
.kicker {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-600); margin: 0 0 1rem; max-width: none;
}
.on-dark .kicker { color: var(--petrol-200); }
.mono-trace {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em;
  color: var(--ink-400); word-spacing: 0.2em;
}
.on-dark .mono-trace { color: var(--petrol-200); opacity: 0.75; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600;
  padding: 0.78em 1.5em; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease);
  min-height: 44px;
}
.btn-primary { background: var(--lacre-600); color: #fff; }
.btn-primary:hover { background: var(--lacre-700); color: #fff; }
.btn-secondary { border-color: var(--petrol-700); color: var(--petrol-700); background: transparent; }
.btn-secondary:hover { background: var(--petrol-700); color: var(--paper-50); }
.btn-outline-light { border-color: var(--petrol-200); color: var(--paper-50); background: transparent; }
.btn-outline-light:hover { background: var(--paper-50); color: var(--ink-band); border-color: var(--paper-50); }
.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: ' →'; transition: transform var(--dur-ui) var(--ease); display: inline-block; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.skip-link {
  position: absolute; left: 1rem; top: -100%; z-index: 200;
  background: var(--ink-band); color: var(--paper-50); padding: 0.7em 1.2em;
  border-radius: 0 0 8px 8px; text-decoration: none; transition: top 150ms var(--ease);
}
.skip-link:focus { top: 0; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-ui) var(--ease), box-shadow var(--dur-ui) var(--ease);
}
/* Fondo con blur en pseudo-elemento: backdrop-filter en el propio header
   crearía un containing block y rompería el panel de navegación fixed en móvil */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--paper-50) 88%, transparent);
  backdrop-filter: blur(12px);
}
.site-header.scrolled {
  border-bottom-color: var(--paper-200);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 12px 32px rgba(27,84,120,0.08);
}
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 72px; }
.brand { flex-shrink: 0; display: flex; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; display: flex; align-items: center; }
.nav-list > li > a {
  text-decoration: none; color: var(--ink-950); font-weight: 500; font-size: 0.97rem;
  padding: 0.6em 0.8em; border-radius: 8px;
}
.nav-list > li > a:hover { color: var(--petrol-700); background: var(--paper-100); }
.nav-list > li > a[aria-current="page"] { color: var(--petrol-700); font-weight: 600; }
.menu-toggle {
  background: none; border: 0; padding: 0.4em 0.3em; margin-left: -0.5em; cursor: pointer;
  color: var(--ink-600); display: flex; align-items: center; border-radius: 6px;
}
.menu-toggle svg { transition: transform var(--dur-ui) var(--ease); }
.has-menu.open .menu-toggle svg { transform: rotate(180deg); }
.submenu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 300px;
  background: var(--paper-50); border: 1px solid var(--paper-200); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 16px 40px rgba(27,84,120,0.12);
  list-style: none; margin: 0; padding: 0.5rem;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity var(--dur-ui) var(--ease), transform var(--dur-ui) var(--ease), visibility var(--dur-ui);
}
.has-menu.open .submenu, .has-menu:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) { .has-menu:hover .submenu { opacity: 1; visibility: visible; transform: none; } }
.submenu a {
  display: block; padding: 0.65rem 0.85rem; border-radius: 9px; text-decoration: none; color: var(--ink-950);
}
.submenu a:hover { background: var(--paper-100); }
.submenu strong { display: block; font-weight: 600; font-size: 0.95rem; }
.submenu span { display: block; font-size: 0.82rem; color: var(--ink-600); }
.lang-switch {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em;
  text-decoration: none; color: var(--ink-600); padding: 0.5em 0.6em; border-radius: 6px;
}
.lang-switch:hover { color: var(--petrol-700); background: var(--paper-100); }
.nav-cta { font-size: 0.9rem; padding: 0.65em 1.3em; }
.nav-burger { display: none; }

@media (max-width: 959px) {
  /* Mantiene visibles el logo y el control de cierre aunque la cabecera esté
     superpuesta a una sección oscura o color-mix/backdrop-filter no se pinte. */
  body.nav-open .site-header {
    background: var(--paper-50);
    border-bottom-color: var(--paper-200);
  }
  body.nav-open .site-header::before { background: var(--paper-50); }
  .site-nav {
    position: fixed; inset: 0; top: 72px; background: var(--paper-50);
    flex-direction: column; align-items: stretch; gap: 0; padding: 1rem clamp(1.1rem,4vw,2rem) 2rem;
    overflow-y: auto; transform: translateX(100%); visibility: hidden;
    transition: transform 250ms var(--ease), visibility 250ms;
  }
  body.nav-open .site-nav { transform: none; visibility: visible; }
  body.nav-open { overflow: hidden; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { flex-wrap: wrap; border-bottom: 1px solid var(--paper-200); }
  .nav-list > li > a { flex: 1; padding: 1rem 0.2rem; font-size: 1.15rem; }
  .menu-toggle { padding: 1rem; margin: 0; }
  .submenu {
    position: static; min-width: 0; width: 100%; border: 0; box-shadow: none; background: transparent;
    display: none; opacity: 1; visibility: visible; transform: none; padding: 0 0 0.75rem;
  }
  .has-menu.open .submenu { display: block; }
  .nav-cta { margin-top: 1.5rem; justify-content: center; }
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; margin-left: auto; padding: 10px;
    position: relative; z-index: 1; color: var(--ink-950);
    background: none; border: 0; cursor: pointer; border-radius: 8px;
  }
  .nav-burger span { display: block; width: 100%; height: 2px; flex: 0 0 2px; background: currentColor; border-radius: 2px; transition: transform 250ms var(--ease), opacity 250ms var(--ease); }
  body.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--sec-pad); }
.section-tight { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.band-dark {
  background: var(--ink-band); color: var(--paper-50); position: relative; overflow: clip;
}
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--paper-50); }
.band-dark p { color: var(--petrol-100); }
.band-dark a:not(.btn) { color: var(--petrol-200); }
.band-dark a:not(.btn):hover { color: var(--paper-50); }
.band-alt { background: var(--paper-100); }
.dot-grid::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(245,247,249,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero .wrapper { position: relative; z-index: 2; }
.hero-home { padding-block: clamp(5rem, 3rem + 8vw, 10rem) clamp(4rem, 2rem + 6vw, 7rem); }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(13,27,38,0.92) 30%, rgba(13,27,38,0.55)); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero-trace { margin-top: 3.5rem; }

/* Traza SVG animada */
.trace-svg { width: 100%; height: auto; }
.trace-svg .flow { stroke-dasharray: 6 10; animation: trace-flow 24s linear infinite; }
@keyframes trace-flow { to { stroke-dashoffset: -320; } }

/* ---------- Media band (imágenes/vídeo de sección) ---------- */
.media-band { margin: 0 0 0; }
.media-band img, .media-band video {
  width: 100%; height: auto; display: block; border-radius: 14px;
  border: 1px solid var(--paper-200);
}
/* En banda de tinta el metraje va montado como lámina de inspección: marco fino, radio corto,
   y un resplandor ambiente detrás (el propio medio, muy desenfocado, sangrando hacia la banda) */
.band-dark .media-band img, .band-dark .media-band video { border-color: var(--petrol-900); border-radius: 8px; }
.media-band figcaption { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-400); margin-top: 0.6rem; }
.band-dark .media-band figcaption {
  color: var(--petrol-200); margin-top: 0.85rem;
  display: flex; justify-content: space-between; gap: 0.4rem 2rem; flex-wrap: wrap;
}
.band-dark .media-band figcaption .plate-id { white-space: nowrap; margin-left: auto; }
.band-dark .media-band + .kpi-row { margin-top: 2.6rem; }
/* Lámina a sangre: la imagen ES la banda entera, con su proporción exacta (sin recortes);
   el contenido se apoya en el borde inferior */
.band-full {
  position: relative; overflow: hidden; aspect-ratio: var(--media-ar, 16 / 9);
  display: flex; align-items: flex-end; padding-block: 3rem 2.4rem;
}
.band-full .band-full-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* los <picture> (webp + fallback) no deben interferir en el layout de su contenedor */
.band-full picture, .sol-visual picture { display: contents; }
.band-full::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(13,27,38,0) 34%, rgba(13,27,38,0.6) 72%, rgba(13,27,38,0.85));
}
.band-full > .wrapper { position: relative; width: 100%; }
.band-full .kpi-value, .band-full .kpi-label { text-shadow: 0 1px 2px rgba(13,27,38,0.8), 0 2px 6px rgba(13,27,38,0.65), 0 4px 18px rgba(13,27,38,0.55); }
.band-full-plain { padding-block: 0; }
.band-full-plain::before { content: none; }

/* ---------- Marquee clientes ---------- */
.clients { border-block: 1px solid var(--paper-200); background: var(--paper-50); }
.clients-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.marquee { overflow: hidden; position: relative; }
.marquee-track {
  display: flex; align-items: center; gap: clamp(2.5rem, 6vw, 5.5rem); width: max-content;
  animation: marquee 42s linear infinite; padding-block: 1.9rem;
}
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.client-mark {
  font-stretch: 118%; font-weight: 650; font-size: clamp(1.15rem, 1rem + 0.8vw, 1.55rem);
  letter-spacing: 0.02em; color: var(--ink-400); white-space: nowrap; text-transform: uppercase;
  transition: color var(--dur-ui) var(--ease); text-decoration: none;
}
.client-mark:hover { color: var(--petrol-700); }
.client-logo {
  height: clamp(26px, 2px + 2.2vw, 36px); width: auto; max-width: 150px; object-fit: contain;
  filter: grayscale(1) brightness(0.45) opacity(0.7);
  transition: filter var(--dur-ui) var(--ease);
}
.client-logo:hover { filter: none; }
.clients-grid .client-logo { height: clamp(30px, 4px + 2.4vw, 42px); max-width: 170px; }
/* Lockups verticales o cuadrados (Kutxabank, Orange): más altura para tamaño óptico equivalente */
.client-logo--tall { height: clamp(40px, 8px + 3vw, 56px); }
.clients-grid .client-logo--tall { height: clamp(46px, 10px + 3.2vw, 64px); }
@media (prefers-reduced-motion: reduce) { .client-logo { transition: none; } }
.clients-grid { display: flex; flex-wrap: wrap; gap: 1.5rem clamp(2rem, 5vw, 4rem); align-items: center; padding-block: 1.9rem; }

/* ---------- Paneles de solución (asimétricos) ---------- */
.sol-panel {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
  padding-block: clamp(2.5rem, 2rem + 3vw, 5rem);
}
.sol-panel + .sol-panel { border-top: 1px solid var(--paper-200); }
.sol-panel:nth-child(even) .sol-copy { order: 2; }
.sol-num {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--lacre-600);
  letter-spacing: 0.1em; display: block; margin-bottom: 0.75rem;
}
.sol-visual { color: var(--petrol-400); }
.sol-visual svg { width: 100%; max-width: 380px; margin-inline: auto; }
.sol-visual img {
  width: 100%; max-width: 440px; margin-inline: auto; display: block;
  /* funde los 4 bordes con el fondo de página: los bodegones IA nunca traen el paper-50 exacto */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
  mask-composite: intersect;
}
.sol-caps { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 0.4rem; }
.sol-caps li { padding-left: 1.4em; position: relative; font-size: 0.95rem; color: var(--ink-600); }
.sol-caps li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 0.7em; height: 1.5px; background: var(--petrol-400); }
@media (max-width: 899px) {
  .sol-panel { grid-template-columns: 1fr; }
  .sol-panel:nth-child(even) .sol-copy { order: 0; }
  .sol-visual { display: none; }
}

/* ---------- KPIs ---------- */
.kpi-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem); margin-block: 2rem;
}
.kpi-value {
  font-family: var(--font-mono); font-size: clamp(1.6rem, 1rem + 2.2vw, 2.9rem);
  color: var(--petrol-700); display: block; line-height: 1.1;
}
.on-dark .kpi-value, .band-dark .kpi-value { color: var(--ambar-400); }
/* Valores largos con espacio ("+1 billón"): mismo cuerpo que el resto, en una sola línea;
   su fila reparte el ancho por contenido en vez de columnas iguales para que quepa */
.kpi-value.long { white-space: nowrap; }
.kpi-row:has(.kpi-value.long) { display: flex; flex-wrap: wrap; justify-content: space-between; }
.kpi-row:has(.kpi-value.long) > div { flex: 1 1 auto; min-width: 160px; }
.kpi-label { font-size: 0.85rem; color: var(--ink-600); display: block; margin-top: 0.35rem; max-width: 22ch; }
.band-dark .kpi-label { color: var(--petrol-200); }

/* ---------- Colophon de confianza ---------- */
.colophon {
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.03em;
  color: var(--ink-600); line-height: 2.1;
}
.colophon a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--ink-300); }
.colophon a:hover { color: var(--petrol-700); border-color: var(--petrol-700); }
.colophon .sep { color: var(--ink-300); margin-inline: 0.5em; }
.band-dark .colophon { color: var(--petrol-200); }
.band-dark .colophon .sep { color: var(--petrol-400); }

/* ---------- Cert cards ---------- */
.cert-list { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-block: 2.5rem; }
.cert-card {
  border: 1px solid var(--paper-200); border-radius: 14px; padding: 1.6rem;
  display: flex; flex-direction: column; gap: 0.6rem; background: #fff;
  transition: border-color var(--dur-ui) var(--ease);
}
.cert-card:hover { border-color: var(--petrol-400); }
.cert-card h3 { margin: 0; font-size: 1.15rem; }
.cert-norm { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lacre-600); }
.cert-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-600); line-height: 1.8; margin: 0; }
.cert-desc { font-size: 0.93rem; color: var(--ink-600); margin: 0; flex: 1; }
.cert-card .link-arrow { font-size: 0.9rem; }
.cert-issuer {
  display: flex; align-items: center; gap: 0.6rem;
  padding-top: 0.9rem; margin-top: 0.4rem; border-top: 1px solid var(--paper-100);
}
.cert-issuer img { height: 30px; width: auto; max-width: 110px; object-fit: contain; }
.cert-issuer img.chip-dark { background: var(--ink-band); padding: 6px 10px; border-radius: 6px; height: 34px; box-sizing: border-box; }
.cert-issuer span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-400); }
.cert-license {
  font-family: var(--font-mono); font-size: 0.9rem; color: var(--petrol-700);
  letter-spacing: 0.04em; margin: 0;
}

.cert-chip {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--petrol-200); border: 1px solid var(--petrol-800); border-radius: 999px;
  padding: 0.45em 1em; text-decoration: none; white-space: nowrap;
  transition: color var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease);
}
.cert-chip:hover { color: var(--paper-50); border-color: var(--petrol-200); }

/* ---------- Sectores (rejilla fija, sin scroll) ---------- */
.sector-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 2.25rem clamp(1.25rem, 2.5vw, 2.5rem); counter-reset: sector;
  margin-top: 2.5rem;
}
.sector-strip > article::before {
  counter-increment: sector; content: counter(sector, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; color: var(--petrol-400);
  display: block; border-bottom: 1px solid var(--paper-200); padding-bottom: 0.6rem; margin-bottom: 0.85rem;
}
.sector-strip .sector-ico { display: block; color: var(--petrol-400); margin-bottom: 0.65rem; }
.sector-strip .sector-ico svg { display: block; width: 27px; height: 27px; }
.sector-strip h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.sector-strip p { font-size: 0.92rem; color: var(--ink-600); margin: 0; }

/* ---------- Steps (cómo funciona) ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; counter-reset: step; margin-block: 2rem; padding: 0; list-style: none; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); color: var(--lacre-600); font-size: 0.85rem; letter-spacing: 0.1em;
  display: block; border-bottom: 1px solid var(--paper-200); padding-bottom: 0.6rem; margin-bottom: 0.8rem;
}
.steps h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.steps p { font-size: 0.93rem; color: var(--ink-600); margin: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; counter-reset: faq; border-top: 2px solid var(--ink-950); margin-top: 1.5rem; }
.faq details { border-bottom: 1px solid var(--ink-300); counter-increment: faq; }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 1rem; align-items: baseline;
  padding: 1.3rem 0.2rem; font-weight: 600; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  transition: color var(--dur-ui) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: counter(faq, decimal-leading-zero);
  font-family: var(--font-mono); font-weight: 400; font-size: 0.8rem; color: var(--lacre-600);
}
.faq summary::after {
  content: '+'; justify-self: end; align-self: center;
  font-family: var(--font-mono); font-weight: 400; color: var(--petrol-700); font-size: 1.35rem;
  line-height: 1; transition: transform var(--dur-ui) var(--ease);
}
.faq summary:hover { color: var(--petrol-700); }
.faq details[open] summary { color: var(--petrol-900); }
.faq details[open] summary::after { content: '+'; transform: rotate(45deg); }
.faq details > div { padding: 0 2.5rem 1.5rem 3.6rem; color: var(--ink-600); }
.faq details > div p { max-width: 60ch; }

/* ---------- Formularios ---------- */
/* ---------- Contacto: pliego de solicitud + lámina de contacto directo ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-aside { background: var(--ink-band); border-radius: 14px; padding: clamp(1.5rem, 3vw, 2.3rem); }
.contact-aside .aside-kicker {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--petrol-200); margin: 0 0 1.2rem; max-width: none;
}
.aside-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.aside-steps li { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: baseline; }
.aside-steps .n { font-family: var(--font-mono); color: var(--ambar-400); font-size: 0.9rem; }
.aside-steps p { margin: 0; max-width: none; color: var(--paper-50); font-size: 0.95rem; line-height: 1.55; }
.contact-aside hr { border: 0; border-top: 1px solid var(--petrol-900); margin: 1.7rem 0; }
.aside-sede { font-style: normal; margin: 0 0 1.25rem; }
.aside-sede:last-of-type { margin-bottom: 0; }
.aside-sede h3 { font-size: 1rem; margin: 0 0 0.3rem; color: var(--paper-50); }
.aside-sede p { margin: 0 0 0.2rem; font-size: 0.92rem; color: var(--petrol-200); max-width: none; }
.aside-sede a { color: var(--paper-50); font-family: var(--font-mono); font-size: 0.95rem; text-decoration: none; }
.aside-sede a:hover { color: var(--ambar-400); }
.aside-foot { font-family: var(--font-mono); font-size: 0.74rem; color: var(--petrol-200); margin: 0; max-width: none; line-height: 1.8; }
.aside-foot a { color: var(--paper-50); }
.aside-foot a:hover { color: var(--ambar-400); }
@media (max-width: 899px) { .contact-grid { grid-template-columns: 1fr; } }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; max-width: 760px; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field .btn { align-self: flex-start; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: 0.93rem; }
.form-field label .req { color: var(--lacre-600); }
.form-field input, .form-field select, .form-field textarea {
  font: inherit; color: var(--ink-950); background: #FBFCFD;
  border: 1.5px solid var(--ink-300); border-radius: 6px; padding: 0.75em 0.9em; min-height: 52px;
  transition: border-color var(--dur-ui) var(--ease);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus-visible, .form-field select:focus-visible, .form-field textarea:focus-visible {
  border-color: var(--petrol-700); box-shadow: var(--focus-ring); outline: none;
}
.form-field input[aria-invalid="true"], .form-field textarea[aria-invalid="true"], .form-field select[aria-invalid="true"] { border-color: var(--danger); }
.form-error { color: var(--danger); font-size: 0.85rem; min-height: 1.1em; margin: 0; }
.form-consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.88rem; color: var(--ink-600); }
.form-consent input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--petrol-700); }
.form-status { font-size: 0.95rem; margin-top: 1rem; }
.form-status.ok { color: var(--success); }
.form-status.error { color: var(--danger); }
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; pointer-events: none; }
@media (max-width: 639px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.03em; padding-block: 1.25rem 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5em; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: '/'; color: var(--ink-300); margin-right: 0.5em; }
.breadcrumbs a { color: var(--ink-600); text-decoration: none; }
.breadcrumbs a:hover { color: var(--petrol-700); }
.breadcrumbs [aria-current] { color: var(--ink-950); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-band); color: var(--petrol-100); margin-top: var(--sec-pad); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: clamp(2rem, 4vw, 3.5rem); padding-block: clamp(3rem, 5vw, 4.5rem) 2.5rem;
}
.footer-col h2 { font-size: 0.82rem; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--petrol-200); font-weight: 400; margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--paper-100); text-decoration: none; font-size: 0.93rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-brand p { font-size: 0.9rem; color: var(--petrol-200); margin-top: 1.25rem; }
.footer-sedes li { font-size: 0.88rem; color: var(--petrol-200); }
.footer-sedes strong { color: var(--paper-100); display: block; }
.footer-col .btn { margin-top: 1.5rem; }
.footer-certs {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  padding-block: 1.75rem; border-top: 1px solid var(--petrol-900);
}
.footer-legal { border-top: 1px solid var(--petrol-900); }
.footer-legal-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding-block: 1.4rem; font-size: 0.82rem; }
.footer-legal p { margin: 0; color: var(--petrol-200); }
.footer-legal ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.footer-legal a { color: var(--petrol-200); text-decoration: none; }
.footer-legal a:hover { color: #fff; }
@media (max-width: 899px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 559px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll (solo con JS activo; sin JS todo es visible) ---------- */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Página legal / documento ---------- */
.doc-body h2 { margin-top: 2.2em; }
.doc-body h3 { margin-top: 1.6em; }
.doc-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-400); }

/* ---------- Callout ---------- */
.callout {
  border: 1px solid var(--paper-200); border-radius: 10px; background: var(--paper-100);
  padding: 1.1rem 1.3rem; font-size: 0.93rem; color: var(--ink-600); max-width: 760px;
}

/* ---------- Tablas ---------- */
.table-scroll { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
table.data th, table.data td { text-align: left; padding: 0.7em 1em; border-bottom: 1px solid var(--paper-200); }
table.data th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-600); font-weight: 400; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .trace-svg .flow { animation: none; }
  .hero-media video { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-burger, .hero-media, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Distintivos oficiales de certificación (petición del CISO 2026-08-21) */
.cert-issuer img.cert-badge { height: 96px; width: auto; }
