:root {
  --header-bg: rgba(8, 12, 20, 0.58);
  --nav: rgba(244, 246, 248, 0.92);
  --nav-hover: #fff;
  --header-h: 4.75rem;
  /* Verde del morro / franja del tren (referencia visual) */
  --train-green: #39b54a;
  /* Verde flúor para los halos neón */
  --green-neon: 77, 255, 115;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* iOS: sin inflado automático de texto al girar el dispositivo */
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #060a10;
  color: var(--nav);
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.65rem clamp(1rem, 4vw, 2.75rem);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.logo img {
  display: block;
  height: clamp(2.875rem, 6.5vw, 3.75rem);
  width: auto;
  max-width: min(15.5rem, 58vw);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.logo:hover img {
  opacity: 0.92;
}

/* --- Menú superior con efecto hover (bordes + relleno verde) --- */

.hover-nav {
  display: flex;
  align-items: center;
}

.hover-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.15rem, 1.2vw, 0.9rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hover-nav__link {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.hover-nav__text {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.3s ease;
}

/* Bordes superior e inferior: nacen estirados e invisibles y encajan al pasar */
.hover-nav__borders {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-top: 2px solid var(--train-green);
  border-bottom: 2px solid var(--train-green);
  opacity: 0;
  transform: scaleY(2);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* Relleno verde que baja desde arriba */
.hover-nav__fill {
  position: absolute;
  top: 2px;
  left: 0;
  width: 100%;
  height: calc(100% - 2px);
  z-index: 1;
  background: var(--train-green);
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top center;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.hover-nav__link:hover .hover-nav__text,
.hover-nav__link:focus-visible .hover-nav__text {
  color: #04140a;
}

.hover-nav__link:hover .hover-nav__borders,
.hover-nav__link:focus-visible .hover-nav__borders,
.hover-nav__link:hover .hover-nav__fill,
.hover-nav__link:focus-visible .hover-nav__fill {
  opacity: 1;
  transform: scaleY(1);
}

/* Botón hamburguesa (solo móvil) */
.hover-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hover-nav__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* Agrupa menú + idioma a la derecha de la cabecera */
.site-header__right {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.8vw, 1.4rem);
  min-width: 0;
}

/* --- Selector de idioma con banderas (ES / EN) --- */
.lang-switch {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.2rem;
  padding: 0.22rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.3rem 0.62rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font: 700 0.7rem/1 inherit;
  font-family: inherit;
  letter-spacing: 0.09em;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}

.lang-switch__btn img {
  display: block;
  width: 1.1rem;
  height: 0.78rem;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.lang-switch__btn:hover {
  color: #fff;
}

.lang-switch__btn.is-active {
  background: rgba(57, 181, 74, 0.22);
  color: #fff;
}

.lang-switch__btn:focus-visible {
  outline: 2px solid var(--train-green);
  outline-offset: 2px;
}

@media (max-width: 1240px) {
  .hover-nav__toggle {
    display: flex;
    position: relative;
    z-index: 6;
  }

  /* En móvil las banderas quedan junto a la hamburguesa y sobre el overlay */
  .site-header__right {
    flex-direction: row-reverse;
    gap: 0.55rem;
  }

  .lang-switch {
    position: relative;
    z-index: 6;
  }

  .hover-nav__list {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 1.1rem;
    padding: calc(var(--header-h) + 1rem) 1.5rem 2rem;
    background: rgba(4, 7, 11, 0.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .hover-nav.is-open .hover-nav__list {
    display: flex;
  }

  .hover-nav__text {
    padding: 0.7rem 1.2rem;
    font-size: 1.15rem;
  }

  .hover-nav.is-open .hover-nav__bar:nth-child(1) {
    transform: translateY(0.525rem) rotate(45deg);
  }

  .hover-nav.is-open .hover-nav__bar:nth-child(2) {
    opacity: 0;
  }

  .hover-nav.is-open .hover-nav__bar:nth-child(3) {
    transform: translateY(-0.525rem) rotate(-45deg);
  }

  /* Con el menú abierto la cabecera debe tapar el menú flotante inferior */
  .site-header.nav-open {
    z-index: 200;
  }
}

body.nav-lock {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .hover-nav__text,
  .hover-nav__borders,
  .hover-nav__fill,
  .hover-nav__bar {
    transition: none;
  }
}

/* --- Recorrido principal: vídeo de portada + viaje lateral a Calidad --- */

.journey {
  /* Altura total de scroll del recorrido completo (en pantallas) */
  --journey-length: 6;
  position: relative;
  margin: 0;
  height: calc(var(--journey-length) * 100vh);
  height: calc(var(--journey-length) * 100dvh);
  background-color: #060a10;
}

.journey__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.journey__track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.journey__panel {
  position: relative;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
}

.journey__hero-sticky {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  height: 100%;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(1.5rem, 4vh, 3rem)) clamp(1rem, 4vw, 3rem)
    2rem;
  will-change: transform, opacity;
}

/* Despertar de la portada: arranca "apagada" (penumbra, sin color) y
   enciende hasta el 100% cuando journey.js dibuja el primer fotograma.
   Al terminar, journey.js retira ambas clases y el filtro desaparece. */
.journey__panel--hero.is-asleep .journey__hero-sticky {
  filter: saturate(0) brightness(0.32);
}

.journey__panel--hero.is-waking .journey__hero-sticky {
  filter: saturate(1) brightness(1);
  transition: filter 2.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .journey__panel--hero.is-asleep .journey__hero-sticky,
  .journey__panel--hero.is-waking .journey__hero-sticky {
    filter: none;
    transition: none;
  }
}

/* --- Costura inmersiva entre paneles: ambos bordes se funden en la misma
   oscuridad, y su intensidad la gobierna journey.js con --seam --- */

.journey__panel--hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: clamp(8rem, 18vw, 20rem);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(4, 7, 11, 0.72) 55%,
    #04070b 100%
  );
  opacity: var(--seam, 0);
  pointer-events: none;
  z-index: 3;
}

.journey__panel--marquee::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: clamp(9rem, 20vw, 22rem);
  background: linear-gradient(
    90deg,
    #04070b 0%,
    rgba(4, 7, 11, 0.72) 45%,
    transparent 100%
  );
  opacity: var(--seam, 0);
  pointer-events: none;
  z-index: 3;
}

.journey__panel--marquee {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(1rem, 3vh, 2rem)) 0 0;
  background: radial-gradient(
      ellipse 100% 70% at 50% 0%,
      #1c2632 0%,
      #0f141c 42%,
      #06090e 100%
    );
  color: rgba(255, 255, 255, 0.88);
}

/* En pantallas estrechas el recorrido vuelve a ser vertical: el vídeo
   conserva su pin propio y los paneles fluyen en bloque. */
@media (max-width: 900px) {
  .journey {
    height: auto;
  }

  .journey__sticky {
    position: static;
    height: auto;
    overflow: visible;
  }

  .journey__track {
    display: block;
    transform: none !important;
  }

  .journey__panel {
    width: 100%;
    flex: none;
    height: auto;
  }

  .journey__panel--hero {
    height: 250vh;
    height: 250dvh;
  }

  .journey__hero-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
  }

  .journey__panel--marquee {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: clamp(2.75rem, 7vw, 4.75rem);
    /* El ancla #calidad aterriza justo bajo la cabecera fija */
    scroll-margin-top: var(--header-h);
  }

  /* Con el panel a altura automática, height: 100% ya no resuelve:
     el hero crece con flex para que su contenido siga centrado */
  .marquee-hero {
    flex: 1 0 auto;
    height: auto;
  }

  .journey__panel--hero::after,
  .journey__panel--marquee::before {
    display: none;
  }
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero__canvas.is-ready {
  /* "Algo de transparencia": la secuencia se funde con el fondo oscuro */
  opacity: 0.55;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(6, 10, 16, 0.55) 0%,
    rgba(6, 10, 16, 0.12) 38%,
    rgba(6, 10, 16, 0.28) 72%,
    rgba(6, 10, 16, 0.82) 100%
  );
}

.hero__title {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: min(28rem, 100%);
  font-size: clamp(2.25rem, 5.5vw + 1.1rem, 4.75rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
  text-wrap: balance;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero__title-strong {
  font-weight: 700;
  color: var(--train-green);
  text-shadow:
    0 0 1px rgba(0, 0, 0, 0.8),
    0 1px 3px rgba(0, 0, 0, 0.55);
}

.hero__trailer {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.5rem;
  min-height: 3rem;
  padding: 0 1.4rem 0 0.55rem;
  border: 1px solid rgba(57, 181, 74, 0.55);
  border-radius: 999px;
  background: rgba(6, 10, 16, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.hero__trailer:hover,
.hero__trailer:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(57, 181, 74, 0.9);
  background: rgba(10, 18, 26, 0.72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.hero__trailer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: var(--train-green);
  color: #04140a;
}

.hero__trailer-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  margin-left: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .hero__trailer {
    transition: none;
  }

  .hero__trailer:hover,
  .hero__trailer:focus-visible {
    transform: none;
  }
}

/* --- Modal del tráiler --- */

.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.trailer-modal[hidden] {
  display: none;
}

.trailer-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.trailer-modal.is-open .trailer-modal__backdrop {
  opacity: 1;
}

.trailer-modal__dialog {
  position: relative;
  width: min(68rem, 100%);
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition:
    opacity 0.32s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.trailer-modal.is-open .trailer-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.trailer-modal__video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: clamp(0.75rem, 1.6vw, 1.25rem);
  background: #04070b;
  border: 1px solid rgba(var(--green-neon), 0.35);
  box-shadow:
    0 0 26px rgba(var(--green-neon), 0.2),
    0 0 80px rgba(var(--green-neon), 0.1),
    0 30px 80px rgba(0, 0, 0, 0.65);
}

.trailer-modal__close {
  position: absolute;
  top: -0.9rem;
  right: -0.9rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(57, 181, 74, 0.6);
  border-radius: 50%;
  background: #0a1018;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.trailer-modal__close:hover,
.trailer-modal__close:focus-visible {
  transform: scale(1.08);
  border-color: var(--train-green);
}

.trailer-modal__close svg {
  width: 1.15rem;
  height: 1.15rem;
}

body.trailer-lock {
  overflow: hidden;
}

@media (max-width: 560px) {
  .trailer-modal {
    padding: 0.75rem;
  }

  .trailer-modal__close {
    top: -1.2rem;
    right: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trailer-modal__backdrop,
  .trailer-modal__dialog,
  .trailer-modal__close {
    transition: none;
  }
}

/* --- Hero de marquesina animada (segunda pantalla del recorrido) --- */

.marquee-hero {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  /* El viaje lateral y la inmersión final se aplican como transform */
  transform-origin: 0 0;
  will-change: transform, opacity;
}

.marquee-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: auto 0;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.marquee-hero__tagline {
  margin: 0 0 1.15rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(var(--green-neon), 0.35);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(var(--green-neon), 0.07);
  box-shadow: 0 0 20px rgba(var(--green-neon), 0.16);
}

.marquee-hero__title {
  margin: 0 0 1.2rem;
  max-width: min(76rem, 100%);
  font-size: clamp(2.4rem, 4.6vw + 0.9rem, 4.9rem);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -0.028em;
  color: #fff;
  text-wrap: balance;
}

.marquee-hero__description {
  margin: 0 0 1.7rem;
  max-width: min(38rem, 100%);
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.58);
}

.marquee-hero__cta {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.7rem;
  border-radius: 999px;
  background: var(--train-green);
  color: #04140a;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, background-color 0.2s ease;
}

.marquee-hero__cta:hover {
  transform: scale(1.05);
  background: #46c65a;
}

.marquee-hero__cta:active {
  transform: scale(0.97);
}

/* Marquesina inferior: carril infinito de imágenes, ligeramente rotado */
.marquee-hero__marquee {
  overflow: hidden;
  padding: 0.75rem 0 clamp(1.5rem, 4vh, 2.75rem);
  /* Si cambias esta inclinación/escala, actualiza DIVE_ROT y DIVE_SCALE
     en journey.js para que la copia de inmersión siga encajando */
  transform: rotate(-2deg) scale(1.07);
  transform-origin: center;
}

.marquee-hero__row {
  display: flex;
  width: max-content;
  /* 22 fotos por mitad: duración proporcional para conservar la
     velocidad de paso original (46s con 8 fotos) */
  animation: marquee-scroll 126s linear infinite;
  will-change: transform;
}

.marquee-hero__img {
  width: clamp(11rem, 20vw, 18rem);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  /* El bucle usa translateX(-50%): el espaciado va en margin para que
     la mitad del carril mida exactamente lo mismo que la otra */
  margin-right: clamp(0.8rem, 1.6vw, 1.25rem);
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  filter: saturate(0.92) brightness(0.9);
}

/* Durante la inmersión el carril se congela: la cámara viaja hacia la
   foto elegida y el mundo queda quieto */
.journey__panel--marquee.is-diving .marquee-hero__row {
  animation-play-state: paused;
}

/* Copia a resolución completa de la foto elegida. Se maqueta ya a su
   tamaño final y se ENCOGE con transform: como nunca se amplía por
   encima de su rasterizado, la ampliación no puede pixelarse. Hereda el
   mismo acabado que las fotos del carril para que el relevo sea
   invisible (borde y sombra los escala journey.js). */
.marquee-hero__dive {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  z-index: 3;
  object-fit: cover;
  transform-origin: 50% 50%;
  border: 0 solid rgba(255, 255, 255, 0.12);
  filter: saturate(0.92) brightness(0.9);
  pointer-events: none;
  will-change: transform, opacity;
}

.journey__panel--marquee.is-diving .marquee-hero__dive {
  display: block;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-hero__row {
    animation: none;
  }
}

/* --- Servicios: pasos con autoplay e imagen sincronizada --- */

.services {
  /* Duración de cada paso; feature-steps.js la mantiene sincronizada */
  --sv-interval: 4000ms;
  position: relative;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 4vw, 3rem);
  background: #060a10;
  scroll-margin-top: var(--header-h);
}

/* En escritorio la página sube POR ENCIMA de la pantalla final de la
   inmersión: solapa el último viewport del recorrido, donde la foto ya
   descansa al 90% de transparencia (la inmersión termina en
   SPLIT_DIVE_END, journey.js, justo cuando esta sección empieza a
   entrar). */
@media (min-width: 901px) {
  .services {
    margin-top: -100vh;
    margin-top: -100dvh;
    z-index: 2;
  }
}

/* Y toda la sección vive sobre esa misma imagen: una capa fija (sticky)
   con la foto de la inmersión al 10% de opacidad — el mismo 90% de
   transparencia — que journey.js sincroniza al elegir la foto del zoom. */
.services__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.services__bg-img {
  position: sticky;
  top: 0;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  object-fit: cover;
  opacity: 0.1;
  filter: saturate(0.92) brightness(0.9);
}

.services__inner {
  position: relative;
  z-index: 1;
  max-width: 74rem;
  margin: 0 auto;
}

.services__header {
  margin-bottom: clamp(2.25rem, 6vh, 3.75rem);
  text-align: center;
}

.services__tagline {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(var(--green-neon), 0.35);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(var(--green-neon), 0.07);
  box-shadow: 0 0 20px rgba(var(--green-neon), 0.16);
}

.services__title {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw + 0.8rem, 3.4rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #fff;
  text-wrap: balance;
}

.services__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.services__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.services__item {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.services__item:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.services__btn {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem 0.5rem 0.95rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.services__num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  margin-top: 0.1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.services__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.services__name {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 650;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.3s ease;
}

/* La descripción solo se despliega en el paso activo */
.services__desc {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s ease;
}

.services__desc > span {
  display: block;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.52);
}

.services__item.is-active .services__desc {
  grid-template-rows: 1fr;
}

.services__item.is-active .services__desc > span {
  padding-top: 0.35rem;
}

.services__item.is-active .services__name {
  color: #fff;
}

.services__item.is-active .services__num {
  background: var(--train-green);
  border-color: var(--train-green);
  color: #04140a;
}

.services__item:hover .services__name {
  color: #fff;
}

/* Barra de progreso del paso activo (marca el ritmo del autoplay) */
.services__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(var(--green-neon), 0.75),
    rgba(var(--green-neon), 0.25)
  );
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}

.services__item.is-active .services__progress {
  opacity: 1;
  animation: services-progress var(--sv-interval) linear forwards;
}

.services.is-paused .services__progress {
  animation-play-state: paused;
}

@keyframes services-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.services__media {
  position: relative;
  height: clamp(22rem, 56vh, 33rem);
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.services__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  filter: saturate(0.94) brightness(0.92);
  transition:
    opacity 0.55s ease,
    transform 1.1s ease;
}

.services__img.is-active {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 900px) {
  .services__layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .services__media {
    order: -1;
    height: clamp(14rem, 42vw, 22rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .services__desc,
  .services__img,
  .services__num {
    transition: none;
  }

  .services__progress {
    display: none;
  }
}

/* El encuadre del canvas (equivalente a object-position) se calcula en
   journey.js: 68% en escritorio y 75% en pantallas <= 720px. */

@media (max-width: 480px) {
  .logo img {
    height: clamp(2.625rem, 9vw, 3.25rem);
    max-width: min(14rem, 82vw);
  }

  .services__btn {
    gap: 0.85rem;
  }

  .services__num {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.72rem;
  }
}

/* --- Galería de trabajo: selector expandible de fotos reales --- */

.gallery {
  position: relative;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 4vw, 3rem);
  background: #060a10;
  scroll-margin-top: var(--header-h);
}

.gallery__inner {
  max-width: 72rem;
  margin: 0 auto;
}

.gallery__header {
  max-width: 46rem;
  margin: 0 auto clamp(2.5rem, 6vh, 4rem);
  text-align: center;
}

.gallery__tagline {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(var(--green-neon), 0.35);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(var(--green-neon), 0.07);
}

.gallery__title {
  margin: 0 0 1.1rem;
  font-size: clamp(1.9rem, 3.2vw + 0.8rem, 3.4rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #fff;
  text-wrap: balance;
}

.gallery__text {
  margin: 0;
  font-size: clamp(0.92rem, 1.4vw, 1.02rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.58);
}

/* Dos filas de acordeón: en cada una la foto activa se expande y las
   demás quedan como láminas */
.gallery__rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gallery__options {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  height: clamp(17rem, 40vh, 22rem);
}

.gallery__option {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  flex: 1 1 0%;
  min-width: 2rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background-color: #10151d;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  filter: saturate(0.92) brightness(0.9);
  transition:
    flex 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    filter 0.45s ease;
  will-change: flex;
}

.gallery__option.is-active {
  flex: 9 1 0%;
  border-color: rgba(57, 181, 74, 0.65);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  filter: saturate(1) brightness(1);
  cursor: default;
}

.gallery__option:hover:not(.is-active) {
  border-color: rgba(255, 255, 255, 0.32);
  filter: saturate(1) brightness(1.02);
}

.gallery__option:focus-visible {
  outline: 2px solid var(--train-green);
  outline-offset: 3px;
}

/* Penumbra inferior para que la etiqueta respire sobre la foto */
.gallery__shade {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(
    to top,
    rgba(4, 7, 11, 0.88),
    rgba(4, 7, 11, 0)
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.gallery__option.is-active .gallery__shade {
  opacity: 1;
}

.gallery__label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: clamp(0.45rem, 1.2vw, 1.1rem);
  text-align: left;
}

.gallery__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(10, 14, 20, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: border-color 0.45s ease;
}

.gallery__option.is-active .gallery__icon {
  border-color: rgba(57, 181, 74, 0.65);
}

.gallery__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.gallery__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.gallery__name,
.gallery__desc {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateX(25px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.gallery__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.gallery__desc {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.72);
}

.gallery__option.is-active .gallery__name,
.gallery__option.is-active .gallery__desc {
  opacity: 1;
  transform: translateX(0);
}

/* Entrada escalonada: cada lámina aparece deslizándose desde la
   izquierda cuando la sección asoma (gallery.js añade .is-in) */
.gallery__options:not(.is-in) .gallery__option {
  opacity: 0;
  transform: translateX(-60px);
}

.gallery__options.is-in .gallery__option {
  animation: gallery-slide-in 0.7s ease both;
  animation-delay: calc(var(--go, 0) * 140ms);
}

@keyframes gallery-slide-in {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* En pantallas estrechas el acordeón pasa a vertical */
@media (max-width: 720px) {
  .gallery__options {
    flex-direction: column;
    height: min(185vw, 48rem);
  }

  .gallery__option {
    min-width: 0;
    min-height: 2.4rem;
  }

  .gallery__option.is-active {
    flex: 8 1 0%;
  }

  .gallery__label {
    padding: 0.85rem;
  }

  .gallery__name,
  .gallery__desc {
    white-space: normal;
  }

  .gallery__desc {
    font-size: 0.8rem;
  }

  .gallery__options:not(.is-in) .gallery__option {
    transform: translateY(40px);
  }

  @keyframes gallery-slide-in {
    from {
      opacity: 0;
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery__option,
  .gallery__shade,
  .gallery__name,
  .gallery__desc {
    transition: none;
  }

  .gallery__options:not(.is-in) .gallery__option {
    opacity: 1;
    transform: none;
  }

  .gallery__options.is-in .gallery__option {
    animation: none;
  }
}

/* --- Perfiles profesionales: carril horizontal fijado al scroll --- */

.profiles {
  /* Altura total de scroll de la sección (viewports) */
  --profiles-length: 3;
  position: relative;
  height: calc(var(--profiles-length) * 100vh);
  height: calc(var(--profiles-length) * 100dvh);
  background:
    radial-gradient(
      ellipse 90% 60% at 50% 100%,
      rgba(var(--green-neon), 0.05) 0%,
      transparent 55%
    ),
    #060a10;
  scroll-margin-top: var(--header-h);
}

.profiles__sticky {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(1.25rem, 4vh, 2.5rem));
}

.profiles__header {
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  text-align: center;
}

.profiles__tagline {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(var(--green-neon), 0.35);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(var(--green-neon), 0.07);
  box-shadow: 0 0 20px rgba(var(--green-neon), 0.16);
}

.profiles__title {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw + 0.8rem, 3.4rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #fff;
  text-wrap: balance;
}

.profiles__viewport {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 0;
}

/* El carril viaja hacia la izquierda (tú avanzas hacia la derecha)
   empujado por profiles-scroll.js */
.profiles__track {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0 clamp(1.25rem, 6vw, 5rem);
  list-style: none;
  will-change: transform;
}

.profile-card {
  flex: 0 0 auto;
  width: min(42rem, 66vw);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.4rem;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.055) 0%,
    rgba(255, 255, 255, 0.015) 100%
  );
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.profile-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
}

.profile-card__abbr {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.05rem;
  border: 1px solid rgba(var(--green-neon), 0.45);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--train-green);
  background: rgba(var(--green-neon), 0.08);
  box-shadow:
    0 0 14px rgba(var(--green-neon), 0.28),
    0 0 36px rgba(var(--green-neon), 0.14);
}

.profile-card__index {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.38);
}

.profile-card__name {
  margin: 0 0 0.9rem;
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: #fff;
  text-wrap: balance;
}

.profile-card__text {
  margin: 0;
  font-size: clamp(0.95rem, 1.25vw, 1.05rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
}

/* Progreso del viaje horizontal */
.profiles__progress {
  position: absolute;
  left: 50%;
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  width: min(18rem, 42vw);
  height: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.profiles__progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(var(--green-neon), 0.85),
    rgba(var(--green-neon), 0.35)
  );
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

/* En pantallas estrechas la sección vuelve al flujo vertical */
@media (max-width: 900px) {
  .profiles {
    height: auto;
  }

  .profiles__sticky {
    position: static;
    height: auto;
    overflow: visible;
    padding-bottom: clamp(2.5rem, 8vw, 4rem);
  }

  .profiles__header {
    margin-bottom: 1.75rem;
  }

  .profiles__track {
    flex-direction: column;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    transform: none !important;
  }

  .profile-card {
    width: 100%;
  }

  .profiles__progress {
    display: none;
  }
}

/* --- Certificaciones: Adif, AESF y cobertura nacional --- */

.certs {
  position: relative;
  padding: clamp(4.5rem, 11vh, 8rem) clamp(1.25rem, 4vw, 3rem);
  background:
    radial-gradient(
      ellipse 80% 55% at 50% 0%,
      rgba(255, 255, 255, 0.035) 0%,
      transparent 60%
    ),
    #060a10;
  scroll-margin-top: var(--header-h);
}

.certs__inner {
  max-width: 68rem;
  margin: 0 auto;
}

.certs__header {
  max-width: 46rem;
  margin: 0 auto clamp(2.5rem, 6vh, 4rem);
  text-align: center;
}

.certs__tagline {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(var(--green-neon), 0.35);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(var(--green-neon), 0.07);
  box-shadow: 0 0 20px rgba(var(--green-neon), 0.16);
}

.certs__title {
  margin: 0 0 1.1rem;
  font-size: clamp(1.9rem, 3.2vw + 0.8rem, 3.4rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #fff;
  text-wrap: balance;
}

.certs__text {
  margin: 0;
  font-size: clamp(0.92rem, 1.4vw, 1.02rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.58);
}

/* Tarjetas claras para respetar los colores corporativos de los logos */
.certs__logos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: 56rem;
  margin: 0 auto clamp(2.75rem, 7vh, 4.5rem);
}

.certs__logo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  margin: 0;
  padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1.25rem, 3vw, 2.25rem);
  border-radius: 1.25rem;
  background: #f4f6f8;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Halo verde neón de fondo al pasar el cursor */
.certs__logo-card:hover {
  transform: translateY(-4px);
  background: #eefbf2;
  border-color: rgba(var(--green-neon), 0.6);
  box-shadow:
    0 0 18px rgba(var(--green-neon), 0.45),
    0 0 48px rgba(var(--green-neon), 0.28),
    0 0 96px rgba(var(--green-neon), 0.16),
    0 22px 55px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .certs__logo-card {
    transition: none;
  }

  .certs__logo-card:hover {
    transform: none;
  }
}

.certs__logo-card img {
  display: block;
  height: clamp(2.4rem, 4.5vw, 3.4rem);
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.certs__logo-card figcaption {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  color: rgba(9, 14, 21, 0.62);
}

/* Cobertura nacional */
.certs__coverage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.4rem;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.012) 100%
  );
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.certs__coverage-title {
  margin: 0 0 0.9rem;
  font-size: clamp(1.55rem, 2.6vw, 2.4rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  text-wrap: balance;
}

.certs__coverage-nat {
  color: var(--train-green);
}

.certs__coverage-desc {
  margin: 0;
  font-size: clamp(0.92rem, 1.3vw, 1.02rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.58);
}

/* El mapa original es oscuro sobre claro: invertido + screen se funde
   con el fondo y quedan solo los puntos claros */
.certs__map {
  width: 100%;
  max-width: 24rem;
  justify-self: center;
  filter: invert(1) brightness(0.92);
  mix-blend-mode: screen;
}

@media (max-width: 760px) {
  .certs__logos {
    grid-template-columns: 1fr;
  }

  .certs__coverage {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .certs__map {
    max-width: 18rem;
  }
}

/* --- Aparición al hacer scroll (reveal.js) --- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease calc(var(--rd, 0) * 90ms),
    transform 0.7s ease calc(var(--rd, 0) * 90ms);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Contacto: formulario y mapa con datos --- */

.contact {
  position: relative;
  padding: clamp(4.5rem, 11vh, 8rem) clamp(1.25rem, 4vw, 3rem);
  background:
    radial-gradient(
      ellipse 85% 60% at 50% 100%,
      rgba(var(--green-neon), 0.055) 0%,
      transparent 58%
    ),
    #060a10;
  scroll-margin-top: var(--header-h);
}

.contact__inner {
  max-width: 62rem;
  margin: 0 auto;
}

.contact__header {
  max-width: 44rem;
  margin: 0 auto clamp(2.25rem, 6vh, 3.5rem);
  text-align: center;
}

.contact__tagline {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(var(--green-neon), 0.35);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(var(--green-neon), 0.07);
  box-shadow: 0 0 20px rgba(var(--green-neon), 0.16);
}

.contact__title {
  margin: 0 0 1.1rem;
  font-size: clamp(1.9rem, 3.2vw + 0.8rem, 3.4rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #fff;
  text-wrap: balance;
}

.contact__text {
  margin: 0;
  font-size: clamp(0.92rem, 1.4vw, 1.02rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.58);
}

.contact__form {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.4rem;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.012) 100%
  );
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
  margin-bottom: 1.1rem;
}

.contact__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.contact__field span {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.contact__field input,
.contact__field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.75rem;
  background: rgba(6, 10, 16, 0.65);
  font: inherit;
  /* >= 16px: evita el zoom automático de iOS al enfocar el campo */
  font-size: 1rem;
  color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact__field textarea {
  resize: vertical;
  min-height: 8rem;
}

.contact__field input::placeholder,
.contact__field textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.contact__field input:focus-visible,
.contact__field textarea:focus-visible {
  outline: none;
  border-color: rgba(var(--green-neon), 0.65);
  box-shadow: 0 0 0 3px rgba(var(--green-neon), 0.16);
}

.contact__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1.1rem 0 1.4rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

.contact__consent input {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--train-green);
}

.contact__consent a {
  color: var(--train-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.contact__submit {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--train-green);
  color: #04140a;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, background-color 0.2s ease;
}

.contact__submit:hover {
  transform: scale(1.04);
  background: #46c65a;
}

.contact__submit:active {
  transform: scale(0.97);
}

.contact__status {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(var(--green-neon), 0.85);
}

.contact__status[data-type="info"] {
  color: rgba(236, 244, 238, 0.72);
}

.contact__status[data-type="error"] {
  color: rgba(255, 138, 128, 0.92);
}

/* Datos de contacto: mosaico de tarjetas con icono y acento neón */
.contact__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.25rem);
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
}

.contact-tile {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.9rem, 2vw, 1.15rem);
  padding: clamp(1.25rem, 2.6vw, 1.65rem) clamp(1.25rem, 2.8vw, 1.8rem);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1.15rem;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.012) 100%
  );
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* Solo las tarjetas enlazables (email y teléfono) se encienden */
a.contact-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--green-neon), 0.5);
  box-shadow:
    0 0 18px rgba(var(--green-neon), 0.22),
    0 0 48px rgba(var(--green-neon), 0.12),
    0 18px 45px rgba(0, 0, 0, 0.4);
}

a.contact-tile:hover .contact-tile__value {
  color: var(--train-green);
}

.contact-tile__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid rgba(var(--green-neon), 0.35);
  border-radius: 0.85rem;
  color: var(--train-green);
  background: rgba(var(--green-neon), 0.08);
  box-shadow: 0 0 16px rgba(var(--green-neon), 0.14);
}

.contact-tile__meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  padding-top: 0.15rem;
}

.contact-tile__label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.contact-tile__value {
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
  overflow-wrap: anywhere;
  transition: color 0.25s ease;
}

@media (max-width: 760px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .contact__cards {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-tile,
  .contact-tile__value {
    transition: none;
  }

  a.contact-tile:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .contact__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .contact__submit {
    justify-content: center;
  }

  .contact__status {
    text-align: center;
  }
}

/* --- Pie de página --- */

.site-footer {
  position: relative;
  background: #04070b;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.6);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(2.75rem, 6vh, 4.5rem) clamp(1.25rem, 4vw, 3rem);
}

.site-footer__brand img {
  height: 3rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 1.1rem;
}

.site-footer__brand p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
  max-width: 34rem;
}

.site-footer__col h3 {
  margin: 0.35rem 0 1rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.site-footer__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.site-footer__col a {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__col a:hover {
  color: #fff;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  max-width: 74rem;
  margin: 0 auto;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem) 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__bottom p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.site-footer__cookies {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.site-footer__cookies:hover {
  color: #fff;
}

.site-footer--compact .site-footer__bottom {
  border-top: 0;
}

@media (max-width: 820px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Aviso de cookies --- */

.cookie-banner {
  position: fixed;
  left: clamp(1rem, 3vw, 2rem);
  bottom: calc(clamp(1rem, 3vh, 2rem) + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: min(24rem, calc(100vw - 8.5rem));
  padding: 1.15rem 1.3rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.1rem;
  background: rgba(10, 15, 22, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.cookie-banner.is-visible {
  opacity: 1;
  transform: none;
}

.cookie-banner p {
  margin: 0 0 0.95rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

.cookie-banner a {
  color: var(--train-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.6rem;
}

.cookie-banner__btn {
  flex: 1;
  min-height: 2.4rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: none;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.cookie-banner__btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.cookie-banner__btn--accept {
  border-color: var(--train-green);
  background: var(--train-green);
  color: #04140a;
}

.cookie-banner__btn--accept:hover {
  background: #46c65a;
  color: #04140a;
}

.cookie-banner__btn:active {
  transform: scale(0.97);
}

/* En pantallas estrechas el aviso ocupa el ancho y se eleva por encima
   del botón del menú flotante para no taparlo */
@media (max-width: 560px) {
  .cookie-banner {
    left: 1rem;
    right: 1rem;
    width: auto;
    bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
  }

  .cookie-banner__btn {
    min-height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
  }
}

/* --- Página legal --- */

.legal-page {
  background: #060a10;
}

.legal {
  max-width: 46rem;
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(2.5rem, 7vh, 4.5rem))
    clamp(1.25rem, 4vw, 2rem) clamp(3rem, 8vh, 5rem);
}

.legal__intro {
  margin-bottom: clamp(2.25rem, 6vh, 3.5rem);
}

.legal__tagline {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(var(--green-neon), 0.35);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(var(--green-neon), 0.07);
}

.legal__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: #fff;
  text-wrap: balance;
}

.legal__updated {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

.legal__section {
  margin-bottom: clamp(2rem, 5vh, 3rem);
  padding-top: 0.5rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.legal__section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--train-green);
}

.legal__section h3 {
  margin: 1.6rem 0 0.6rem;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.88);
}

.legal__section p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.66);
}

.legal__section p a {
  color: var(--train-green);
  text-decoration: none;
}

.legal__section p a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Ficha del responsable del tratamiento */
.legal__data {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
}

.legal__data div {
  display: grid;
  grid-template-columns: minmax(9.5rem, 12rem) 1fr;
  gap: 0.35rem 1.25rem;
  align-items: baseline;
}

.legal__data dt {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.legal__data dd {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.legal__data dd a {
  color: var(--train-green);
  text-decoration: none;
}

.legal__data dd a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 560px) {
  .legal__data div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.legal__back {
  margin: 2.5rem 0 0;
}

.legal__back a {
  color: var(--train-green);
  font-weight: 650;
  text-decoration: none;
}

.legal__back a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

