/* ==========================================================================
   Composites Solutions — hoja de estilos principal
   HTML5 + CSS moderno, sin dependencias. Objetivo: WCAG 2.2 nivel AA.
   ========================================================================== */

/* ---------- 1. Tokens de diseño ---------- */
:root {
  color-scheme: light dark;

  /* Marca */
  --brand: #f69400;            /* naranja corporativo del logotipo (decorativo / fondos con texto oscuro: 7,6:1) */
  --brand-strong: var(--brand); /* textos y enlaces naranjas: mismo color del logotipo (decisión de diseño; 2,3:1 sobre blanco) */
  --lang-current: var(--brand); /* idioma activo (petición de diseño; 2,3:1 sobre blanco) */
  --brand-soft: #fef5e8;

  /* Superficies y texto */
  --bg: #eef1f4;
  --surface: #ffffff;
  --surface-alt: #f6f8fa;
  --text: #1f2933;
  --text-muted: #4a5763;
  --border: #ccd4db;
  --link: var(--brand-strong);
  --link-hover: var(--brand);
  --focus: #1f2933;            /* contorno de foco oscuro: visible sobre fondos claros (14:1) */
  --on-brand: #1a1a1a;
  --header-bg: #ffffff;
  --footer-bg: #1f2933;
  --footer-text: #e6eaee;
  --footer-link: var(--brand);
  --danger: #b3261e;
  --success: #1b6e3a;
  --shadow: 0 1px 2px rgb(16 24 32 / 0.06), 0 4px 16px rgb(16 24 32 / 0.08);

  /* Tipografía y medidas */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --radius: 0.625rem;
  --container: 72rem;
  --gutter: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-strong: var(--brand);
    --brand-soft: #3a2a10;
    --bg: #12171c;
    --surface: #1b232b;
    --surface-alt: #222c35;
    --text: #e8ecef;
    --text-muted: #b2bdc7;
    --border: #3a4652;
    --link: var(--brand);
    --link-hover: var(--brand);
    --focus: var(--brand);
    --header-bg: #1b232b;
    --footer-bg: #0c1014;
    --danger: #ff8a80;
    --success: #7ed99c;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 16px rgb(0 0 0 / 0.35);
  }
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

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

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.85rem); }
h3 { font-size: 1.2rem; }

p, ul, ol, dl { margin: 0 0 1em; }
p { max-width: none; }

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--link-hover); text-decoration-thickness: 0.14em; }

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 48rem) { :root { --gutter: 1.5rem; } }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}

/* ---------- 3. Enlace "saltar al contenido" ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---------- 4. Cabecera y navegación ---------- */
.site-header {
  background: var(--header-bg);
  border-top: 5px solid var(--brand);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  width: 100%;
  max-width: var(--container);   /* mismo ancho que el contenido */
  margin-inline: auto;
  padding: 0.75rem var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.1;
  flex: none;
}
.brand:hover { color: var(--text); }
.brand img { width: 72px; height: auto; }
.brand-name span { display: block; margin-top: 0.3rem; font-weight: 400; font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.04em; text-transform: uppercase; }

.header-tools { display: flex; align-items: center; gap: 1rem; margin-left: auto; }

/* Selector de idioma estándar: en | es */
.lang-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  font-size: 1.1rem;            /* igual que el menú: misma línea base */
  font-weight: 700;
  line-height: 1.65;
}
.lang-list li + li::before {
  content: "|";
  color: var(--brand);
  font-weight: 400;
  margin-inline: 0.15rem;
}
.lang-list a,
.lang-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 48px;
  padding: 0.5rem 0.35rem;
  border-bottom: 3px solid transparent; /* misma caja que .nav-list a */
  border-radius: 0.4rem;
}
.lang-list a { color: var(--text); text-decoration: none; }
.lang-list a:hover { color: var(--brand-strong); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.lang-current { color: var(--lang-current); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--brand); background: var(--brand-soft); }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: inline; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}
.nav-list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 1.1rem;
  border-radius: 0.6rem 0.6rem 0 0;
  border-bottom: 3px solid transparent;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
/* Al pasar el ratón o con el foco del teclado: recuadro naranja suave y barra suave */
.nav-list a:hover,
.nav-list a:focus-visible { background: var(--brand-soft); color: var(--text); border-color: rgb(246 148 0 / 0.45); }
.nav-list a:focus-visible { outline-offset: -3px; }
/* Sección actual: texto y barra inferior en el naranja del logotipo, sin fondo.
   Además del color, la barra y aria-current indican la sección actual. */
.nav-list a[aria-current] { background: transparent; color: var(--brand); border-bottom-color: var(--brand); }
.nav-list a[aria-current]:hover,
.nav-list a[aria-current]:focus-visible { background: var(--brand-soft); color: var(--brand); }

/* Escritorio: logo, menú y selector de idioma en una sola fila */
@media (min-width: 68rem) {
  .header-inner { flex-wrap: nowrap; }
  .site-nav { flex: 1 1 auto; display: flex; justify-content: center; }
  .nav-list { width: 100%; justify-content: space-evenly; }
  .header-tools { margin-left: 0; }
}

/* Móvil y tableta: menú desplegable */
@media (max-width: 67.99rem) {
  .js .nav-toggle { display: inline-flex; }
  .site-nav { order: 3; width: 100%; }
  .js .site-nav { display: none; }
  .js .nav-open .site-nav { display: block; }
  .nav-list { flex-direction: column; padding-block: 0.5rem; }
  .nav-list a { border-radius: 0.5rem; border-bottom: 0; border-left: 4px solid transparent; }
  .nav-list a[aria-current] { border-left-color: var(--brand); }
}
@media (max-width: 30rem) {
  .brand { font-size: 1.1rem; gap: 0.5rem; }
  .brand img { width: 52px; }
  .brand-name span { font-size: 0.68rem; }
  .header-tools { gap: 0.5rem; }
  .lang-list { font-size: 1.1rem; }
}

/* ---------- 5. Cabecera de página y migas ---------- */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(1.5rem, 1rem + 2.5vw, 3rem);
}
.page-hero h1 { margin-bottom: 0.3em; }
.page-hero h1::after {
  content: "";
  display: block;
  width: 4rem;
  height: 5px;
  margin-top: 0.35em;
  background: var(--brand);
  border-radius: 3px;
}
.lead { font-size: 1.2rem; color: var(--text-muted); margin: 0; }

.breadcrumb ol {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--text-muted);
}
.breadcrumb [aria-current] { font-weight: 600; color: var(--text); }

/* ---------- 6. Secciones y bloques ---------- */
.section { padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); }
.section + .section { padding-top: 0; }
.section-title { margin-bottom: 1.25rem; }
.prose > :last-child { margin-bottom: 0; }

/* Portada */
.home-hero {
  background:
    linear-gradient(90deg, rgb(15 20 25 / 0.82) 0%, rgb(15 20 25 / 0.68) 60%, rgb(15 20 25 / 0.6) 100%),
    url("../img/home/sebastien-roubinet.jpg") center / cover no-repeat;
  color: #fff;
  padding-block: clamp(3rem, 2rem + 8vw, 8rem);
}
@media (max-width: 52rem) {
  /* En pantallas estrechas el texto ocupa todo el ancho: velo uniforme para garantizar el contraste */
  .home-hero {
    background:
      linear-gradient(rgb(15 20 25 / 0.78), rgb(15 20 25 / 0.78)),
      url("../img/home/sebastien-roubinet.jpg") center / cover no-repeat;
  }
}
.home-hero h1 { color: #fff; }
.home-hero h1::after { content: ""; display: block; width: 4rem; height: 5px; margin-top: 0.35em; background: var(--brand); border-radius: 3px; }
.home-hero p { font-size: 1.25rem; color: #f1f3f5; text-shadow: 0 1px 3px rgb(0 0 0 / 0.5); }
.home-hero .credit { font-size: 0.85rem; color: #d5dbe0; margin-top: 2rem; }

.split {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  align-items: center;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse > :first-child { order: 2; }
}
.split img, .feature img, .rounded {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Tarjetas */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-top: 4px solid var(--brand);
}
.card img {
  width: 100%;
  aspect-ratio: 830 / 560;
  object-fit: cover;
}
.card-body { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card-body > * { margin: 0; }
.card h2, .card h3 { font-size: 1.2rem; }
.card p { color: var(--text-muted); }
.card .card-link { color: var(--text); text-decoration: none; }
.card .card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card-link { color: var(--link); text-decoration: underline; }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card .card-link:focus-visible { outline: none; }
.card .more { margin-top: auto; display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; color: var(--link); }

/* Tarjetas que ocupan siempre todo el ancho disponible */
@media (min-width: 52rem) {
  .cards--fill { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Franja destacada "Nuestra experiencia" (Proyectos) */
.band {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 2rem + 3.5vw, 5rem);
}
.band--experience {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--surface) 75%);
  border-bottom: 1px solid var(--border);
}
/* Filigrana: la libélula del logotipo en marca de agua */
.band--experience::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -2.5rem;
  width: min(30rem, 60vw);
  aspect-ratio: 216 / 129;
  background: url("../img/logo.png") center / contain no-repeat;
  opacity: 0.09;
  transform: rotate(-8deg);
  pointer-events: none;
}
.experience {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 1.5rem + 3vw, 4rem);
  align-items: center;
}
@media (min-width: 52rem) {
  .experience { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.experience-media { position: relative; margin: 0 1.25rem 1.25rem 0; }
.experience-media::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border: 3px solid var(--brand);
  border-radius: var(--radius);
}
.experience-media img {
  position: relative;
  width: 100%;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.experience-media .zoom { box-shadow: var(--shadow); background: #fff; }
.experience-media .zoom img { box-shadow: none; border-radius: 0; }
.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.experience-text h2 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem); }
.experience-text h2::after {
  content: "";
  display: block;
  width: 4rem;
  height: 5px;
  margin-top: 0.35em;
  background: var(--brand);
  border-radius: 3px;
}
.experience-copy { font-size: 1.1rem; line-height: 1.65; margin: 0; }
/* Procesos destacados dentro del texto */
.experience-copy .proc { box-shadow: inset 0 -0.4em 0 rgb(246 148 0 / 0.22); }
/* Icono de enlace externo dentro de texto */
a .icon-ext { width: 0.9em; height: 0.9em; vertical-align: -0.1em; }

/* Título de sección con barra naranja */
.section-title--bar { display: flex; align-items: center; gap: 0.75rem; }
.section-title--bar::before {
  content: "";
  flex: none;
  width: 0.45em;
  height: 1.1em;
  background: var(--brand);
  border-radius: 2px;
}

/* Bloques de contenido con imagen (productos, servicios) */
.feature-list { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.feature {
  display: grid;
  gap: 1.25rem 2rem;
  align-items: start;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 0.75rem + 1.5vw, 2rem);
  scroll-margin-top: 1rem;
}
@media (min-width: 52rem) {
  .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.feature h2 { margin-bottom: 0.5em; }
.feature h2::before {
  content: "";
  display: inline-block;
  width: 0.45em; height: 0.9em;
  margin-right: 0.45em;
  background: var(--brand);
  border-radius: 2px;
  vertical-align: -0.08em;
}
.feature ul { padding-left: 1.25rem; }
.feature li + li { margin-top: 0.3em; }

.external-link { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; }
.external-link .icon { width: 1em; height: 1em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.65rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--brand); color: var(--on-brand); text-decoration: underline; text-underline-offset: 0.2em; box-shadow: 0 0 0 4px var(--brand-soft); }
.btn--ghost { background: transparent; color: #fff; border-color: #fff; }
.btn--ghost:hover { background: rgb(255 255 255 / 0.15); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Casos con tabla de datos (tooling) */
.cases { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.case {
  display: grid;
  gap: 1rem 2rem;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
@media (min-width: 46rem) { .case { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.case h2 { font-size: 1.2rem; }
.case dl { display: grid; gap: 0.15rem 1rem; margin: 0; }
@media (min-width: 30rem) { .case dl { grid-template-columns: max-content 1fr; } }
.case dt { font-weight: 700; }
.case dd { margin: 0 0 0.5rem; }
.case figure { margin: 0; justify-self: center; text-align: center; }
.case figure img { border-radius: var(--radius); margin-inline: auto; }

figcaption, .credit { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.5rem; }

/* Rejilla de figuras (otros proyectos, sectores) */
.figure-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.figure-grid > li {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.figure-grid figure { margin: 0; display: flex; flex-direction: column; height: 100%; }
.figure-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.figure-grid figcaption { padding: 0.9rem 1.1rem 1.1rem; margin: 0; color: var(--text); font-size: 1rem; }
.figure-grid figcaption strong, .figure-grid h2 { display: block; font-size: 1.1rem; margin: 0; }
.figure-grid .credit { display: block; margin-top: 0.25rem; }

/* ---------- 7. Galería de infusión ---------- */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  counter-reset: paso -1;
}
.gallery li { counter-increment: paso; }
.gallery figure {
  margin: 0;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.gallery a { display: block; position: relative; color: inherit; text-decoration: none; }
.gallery a:focus-visible { outline-offset: -3px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.25s ease; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { padding: 0.6rem 0.85rem 0.8rem; margin: 0; color: var(--text); font-size: 0.95rem; }
.gallery .step { display: block; font-size: 0.8rem; font-weight: 700; color: var(--brand-strong); text-transform: uppercase; letter-spacing: 0.05em; }

/* Imágenes ampliables: indicador de zoom */
.zoom {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  color: inherit;
}
.zoom img { transition: transform 0.3s ease; }
.zoom:hover img { transform: scale(1.03); }
.zoom-badge {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgb(15 20 25 / 0.7);
  color: #fff;
  opacity: 0.85;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  pointer-events: none;
}
.zoom-badge .icon { width: 1.3rem; height: 1.3rem; }
.zoom:hover .zoom-badge,
.zoom:focus-visible .zoom-badge { opacity: 1; background: var(--brand); color: var(--on-brand); }
.zoom:focus-visible { outline-offset: 3px; }
.feature .zoom, .split .zoom { box-shadow: var(--shadow); }
.feature .zoom img, .split .zoom img { box-shadow: none; border-radius: 0; }
.figure-grid .zoom { border-radius: 0; }

/* Visor (dialog nativo) — pasador estándar de tamaño fijo:
   el marco no cambia con la resolución de cada imagen y el pie siempre
   queda en la misma posición. */
.lightbox {
  width: min(70rem, 100vw - 2rem);
  height: min(46rem, 100vh - 2rem);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #0e1216;
  color: #f1f3f5;
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.5);
  overflow: hidden;
}
.lightbox::backdrop { background: rgb(5 8 10 / 0.88); }
.lightbox-inner {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.5rem 0.5rem 1.25rem; }
.lightbox-bar h2 { font-size: 0.95rem; margin: 0; font-weight: 600; color: #c9d1d8; }
.lightbox-figure {
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 4.5rem; /* zona de imagen flexible + pie de altura fija */
  min-height: 0;
}
.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  padding-inline: 4.5rem;
  touch-action: pan-y;
}
.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}
.lightbox figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 1.25rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  overflow: hidden;
}
.lightbox button {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #5d6a75;
  border-radius: 50%;
  background: #1d252d;
  color: #fff;
  font: inherit;
  line-height: 0;
  cursor: pointer;
}
/* Icono centrado con posicionamiento absoluto: igual en todos los navegadores */
.lightbox button .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0;
  transform: translate(-50%, -50%);
  vertical-align: baseline;
}
.lightbox button:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.lightbox .lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox .lb-prev { left: 0.75rem; }
.lightbox .lb-next { right: 0.75rem; }
.lightbox.is-single .lb-arrow { display: none; }
.lightbox :focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (max-width: 40rem) {
  .lightbox-stage { padding: 0 0.5rem 4rem; }
  .lightbox .lb-arrow { top: auto; bottom: 0.5rem; transform: none; background: rgb(29 37 45 / 0.85); }
}

/* ---------- 8. Contacto ---------- */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 60rem) { .contact-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}
address { font-style: normal; }
.contact-data { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 0.75rem; }
.contact-data li { display: flex; gap: 0.75rem; align-items: flex-start; }
.contact-data .icon { color: var(--brand-strong); margin-top: 0.25rem; }
.map { margin: 0; }
.map iframe { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: var(--radius); display: block; }

/* ---------- 9. Pie ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  border-top: 5px solid var(--brand);
  font-size: 0.98rem;
}
.site-footer a { color: var(--footer-link); }
.site-footer a:hover { color: var(--brand); text-decoration-thickness: 0.14em; }
.site-footer :focus-visible { outline-color: var(--brand); }
.footer-grid {
  display: grid;
  gap: 2rem;
  padding-block: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.site-footer h2 { font-size: 1.05rem; color: #fff; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.footer-about { display: flex; gap: 1rem; align-items: flex-start; }
.footer-about img { width: 72px; flex: none; }
.footer-about p { margin: 0; }
.footer-bottom {
  border-top: 1px solid rgb(255 255 255 / 0.15);
  padding-block: 1rem;
  font-size: 0.9rem;
  color: #c3cbd2;
}
.footer-bottom p { margin: 0; max-width: none; }

/* ---------- 10. Utilidades ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.note { font-size: 0.95rem; color: var(--text-muted); }
.legal h2 { margin-top: 1.75rem; font-size: 1.35rem; }
.legal { max-width: none; }

/* ---------- 11. Preferencias del usuario ---------- */
@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;
  }
  .gallery a:hover img { transform: none; }
}

@media (forced-colors: active) {
  .card, .feature, .panel, .case, .figure-grid > li, .gallery figure { border: 1px solid CanvasText; }
  .nav-list a .icon { background: none; color: LinkText; }
  .nav-list a[aria-current] { border-color: Highlight; }
  .btn, .lang-switch, .nav-toggle { border: 2px solid ButtonText; }
}

@media print {
  .site-header nav, .header-tools, .skip-link, .map, .lightbox { display: none !important; }
  body { background: #fff; color: #000; }
  .site-footer { background: none; color: #000; border: 0; }
  .site-footer a, a { color: #000; }
  .card, .feature, .panel, .case { box-shadow: none; border: 1px solid #999; }
  .home-hero { background: none; color: #000; }
  .home-hero h1, .home-hero p { color: #000; }
}
