/* =============================================================
   PROLAIN · Neumática y Fluidos Industriales
   Arquetipo: Liquid Wave (adaptado a paleta industrial Oxford)
   =============================================================

   ÍNDICE
   1. Tokens
   2. Reset & base
   3. Utilidades
   4. Tipografía
   5. Componentes (botones, chips, cards)
   6. Splash
   7. Navbar
   8. Hero
   9. Ticker
   10. Servicios
   11. Fluidomecánica
   12. Proyectos / Confianza
   13. CTA Contacto
   14. Footer
   15. Efectos (olas, blobs, flujo, reveals)
   16. Responsive
   17. Reduced motion (solo efectos intrusivos)
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Paleta industrial — Azul Oxford como autoridad */
  --navy-deep: #061c36;
  --navy:      #0a2a4e;   /* Azul Oxford */
  --navy-2:    #0e3560;
  --navy-3:    #123f72;
  --blue:      #1b6fb3;
  --blue-soft: #5a9bd0;
  --aqua:      #8fc3e8;
  --green:     #7cb342;   /* acento corporativo, uso puntual */
  --bg:        #f5f7fa;
  --paper:     #ffffff;
  --ink:       #101a2b;
  --ink-soft:  #3b4a60;
  --ink-mute:  #66748a;
  --line:      rgba(10, 42, 78, 0.10);
  --line-dark: rgba(255, 255, 255, 0.14);
  --cream:     #eef4fb;   /* texto sobre navy — nunca #fff puro en masa */

  /* Tipografía */
  --display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --sans:    "Manrope", "Segoe UI", system-ui, sans-serif;
  /* Etiquetas/kickers técnicos — señalética industrial (antes IBM Plex Mono) */
  --label:   "Barlow Semi Condensed", "Segoe UI", system-ui, sans-serif;

  /* Ritmo */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(4rem, 9vw, 8.5rem);
  --radius: 14px;
  --radius-lg: 22px;

  /* Easings */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Sombra corporativa */
  --shadow: 0 14px 40px rgba(6, 28, 54, 0.12);
  --shadow-sm: 0 6px 18px rgba(6, 28, 54, 0.08);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;        /* scroll nativo — sin Lenis */
  overflow-x: clip;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;               /* clip, no hidden — preserva sticky */
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.06; letter-spacing: -0.02em; font-family: var(--display); }
ul { list-style: none; padding: 0; }

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

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

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--navy); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilidades
   ============================================================= */
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

.kicker {
  font-family: var(--label);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.kicker::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--green);
  display: inline-block;
}
.on-dark .kicker { color: var(--aqua); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* =============================================================
   4. Tipografía
   ============================================================= */
.h-xl {
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  font-weight: 800;
  max-width: 16ch;
}
.h-lg {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  font-weight: 800;
  color: var(--navy);
}
.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

/* =============================================================
   5. Componentes
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .01em;
  padding: 1rem 1.9rem;
  border-radius: 999px;
  transition: transform .2s var(--ease-out), background .3s var(--ease-out),
              color .3s var(--ease-out), box-shadow .3s var(--ease-out),
              border-color .3s var(--ease-out);
  border: 2px solid transparent;
  will-change: transform;
}
.btn svg { transition: transform .2s var(--ease-out); flex: none; }
.btn:hover svg { transform: translateX(5px); }

.btn-solid {
  background: var(--blue);
  color: #fff;
}
.btn-solid:hover {
  background: var(--navy-3);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(27, 111, 179, 0.35);
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-navy:hover {
  background: var(--navy-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  border-color: rgba(255,255,255,.45);
  color: var(--cream);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.8);
  transform: translateY(-3px);
}

/* Feedback de presión — la UI "escucha" el clic (Emil #1).
   Sutil (0.98) para un tono industrial confiable, no juguetón.
   Respuesta rápida al soltar; presiona desde el estado hover. */
.btn:active {
  transform: translateY(-1px) scale(.98);
  transition-duration: .11s;
}

.chip {
  font-family: var(--label);
  font-size: .78rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: .45rem 1rem;
  border-radius: 999px;
  transition: border-color .3s var(--ease-out), transform .3s var(--ease-out),
              box-shadow .3s var(--ease-out);
}
.chip:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* =============================================================
   6. Splash — doble red de seguridad (CSS + JS)
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 4000;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 100%);
  transition: opacity .7s var(--ease-out), visibility .7s;
  /* Seguridad CSS: se oculta sola a los 4.5s aunque falle el JS */
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes splashSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.splash-logo { width: min(400px, 80vw); opacity: .95; }
.splash-wave {
  margin-top: 1.6rem;
  width: 88px; height: 22px;
  overflow: hidden;
}
.splash-wave svg { animation: splashFlow 1.4s linear infinite; }
@keyframes splashFlow { to { transform: translateX(-44px); } }

/* =============================================================
   7. Navbar — sticky, solidifica al hacer scroll
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3000;
  transition: background .3s var(--ease-out), box-shadow .3s var(--ease-out),
              padding .3s var(--ease-out), backdrop-filter .3s;
  padding-block: 1.1rem;
  background: transparent;
}
.nav.is-solid {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 8px 30px rgba(6, 28, 54, 0.10);
  padding-block: .65rem;
}
.nav-inner {
  max-width: 1240px; margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}

.nav-brand { display: flex; align-items: center; flex: none; }
.nav-brand img { height: 64px; width: auto; transition: height .3s var(--ease-out); }
.nav.is-solid .nav-brand .logo-color { height: 68px; }
/* Logo blanco (PNG transparente) sobre el hero; logo a color al solidificar */
.nav-brand .logo-color { display: none; }
.nav.is-solid .nav-brand .logo-white,
.nav.is-open  .nav-brand .logo-white { display: none; }
.nav.is-solid .nav-brand .logo-color,
.nav.is-open  .nav-brand .logo-color { display: block; }

.nav-menu {
  display: flex; align-items: center; gap: 2rem;
}
.nav-menu a {
  position: relative;
  font-weight: 600;
  font-size: .95rem;
  color: var(--cream);
  padding-block: .4rem;
  transition: color .3s var(--ease-out);
}
.nav.is-solid .nav-menu a { color: var(--ink); }
.nav-menu a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav-menu a:hover::after,
.nav-menu a:focus-visible::after { transform: scaleX(1); }
.nav-menu a:hover { color: #fff; }
.nav.is-solid .nav-menu a:hover { color: var(--navy); }

.nav-right { display: flex; align-items: center; gap: 1rem; }

/* Selector de idioma ES | EN */
.lang {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color .3s var(--ease-out);
}
.nav.is-solid .lang { border-color: var(--line); }
.lang button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--label);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  padding: .4rem .7rem;
  color: var(--cream);
  transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
.lang button svg {
  width: 17px; height: 12px;
  border-radius: 2.5px;
  flex: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.nav.is-solid .lang button { color: var(--ink-mute); }
.lang button.is-active { background: var(--green); color: var(--navy-deep); }
.nav.is-solid .lang button.is-active { background: var(--navy); color: #fff; }

/* Burger móvil */
.burger {
  display: none;
  flex-direction: column; gap: 5px;
  padding: .5rem;
}
.burger span {
  width: 25px; height: 2.5px; border-radius: 2px;
  background: var(--cream);
  transition: transform .3s var(--ease-out), opacity .3s, background .3s;
}
.nav.is-solid .burger span { background: var(--navy); }
.nav.is-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav.is-open .burger span:nth-child(2) { opacity: 0; }
.nav.is-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* =============================================================
   8. Hero — vh alto, overlay Oxford, olas oscilantes
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(90% 70% at 75% 15%, rgba(27, 111, 179, 0.35) 0%, transparent 60%),
    linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-2) 100%);
  color: var(--cream);
  overflow: clip;
  /* Preparado para foto real: añadir aquí background-image url(...) —
     el overlay .hero-tint garantiza la legibilidad del texto */
}
.hero-tint {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(6,28,54,.45) 0%, rgba(6,28,54,.15) 45%, rgba(6,28,54,.55) 100%);
  pointer-events: none;
}

/* Líneas de flujo — corriente que atraviesa el hero */
.hero-flow {
  position: absolute; inset: 0; z-index: 1;
  opacity: .35;
  pointer-events: none;
}
.hero-flow path {
  fill: none;
  stroke: var(--blue-soft);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 10 180;
  animation: flowDash 7s linear infinite;
}
.hero-flow path:nth-child(2) { animation-delay: -2.4s; stroke: var(--aqua); opacity: .7; }
.hero-flow path:nth-child(3) { animation-delay: -4.8s; opacity: .5; }
@keyframes flowDash { to { stroke-dashoffset: -190; } }

.hero-inner {
  position: relative; z-index: 2;
  width: 100%;
  padding-block: clamp(7rem, 16vh, 10rem) clamp(9rem, 20vh, 13rem);
}
.hero h1 {
  margin-block: 1.4rem 1.3rem;
  color: #fff;
}
.hero h1 em {
  font-style: normal;
  color: var(--aqua);
}
.hero .lead {
  color: rgba(238, 244, 251, 0.85);
  margin-bottom: 2.4rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-meta {
  margin-top: 3.2rem;
  display: flex; flex-wrap: wrap; gap: 1.8rem;
  font-family: var(--label);
  font-size: .78rem;
  letter-spacing: .1em;
  color: rgba(238, 244, 251, 0.65);
}
.hero-meta span { display: inline-flex; align-items: center; gap: .55rem; }
.hero-meta i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  font-style: normal;
}

/* Olas oscilantes del hero — dos capas a velocidades distintas */
.hero-waves {
  position: absolute; left: 0; right: 0; bottom: -2px; z-index: 2;
  height: clamp(90px, 14vw, 190px);
  pointer-events: none;
}
.wave-layer {
  position: absolute; inset: 0;
  display: flex;
  width: 200%;
}
.wave-layer svg { width: 50%; height: 100%; flex: none; }
.wave-a { animation: waveDrift 16s linear infinite; opacity: .5; }
.wave-b { animation: waveDrift 9s linear infinite reverse; }
@keyframes waveDrift { to { transform: translateX(-50%); } }

/* =============================================================
   9. Ticker — materialidades en flujo continuo
   ============================================================= */
.ticker {
  background: var(--bg);
  border-block: 1px solid var(--line);
  overflow: clip;
  padding-block: 1.1rem;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerFlow 30s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group {
  display: flex;
  gap: 3.5rem;
  padding-right: 3.5rem;
  flex: none;
}
.ticker-track span {
  font-family: var(--label);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex; align-items: center; gap: 3.5rem;
  white-space: nowrap;
}
.ticker-track span::after {
  content: "◦";
  color: var(--green);
}
@keyframes tickerFlow { to { transform: translateX(-50%); } }

/* =============================================================
   10. Servicios — "Ingeniería que nos conecta"
   ============================================================= */
.services {
  padding-block: var(--section-pad);
  background: var(--bg);
}
.services-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.services-head .lead { margin-top: 1rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.svc {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.1rem 1.7rem 2rem;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out),
              border-color .3s var(--ease-out);
  overflow: clip;
}
.svc::before {
  /* lámina de agua que sube al hacer hover */
  content: "";
  position: absolute; inset: auto 0 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--aqua));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .3s var(--ease-out);
}
.svc:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(27, 111, 179, 0.35);
}
.svc:hover::before { transform: scaleY(1); }

.svc-blob {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(150deg, var(--navy) 20%, var(--blue) 100%);
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  animation: blobMorph 9s ease-in-out infinite;
  margin-bottom: 1.4rem;
  transition: background .3s var(--ease-out);
}
.svc:nth-child(2) .svc-blob { animation-delay: -2.2s; }
.svc:nth-child(3) .svc-blob { animation-delay: -4.4s; }
.svc:nth-child(4) .svc-blob { animation-delay: -6.6s; }
@keyframes blobMorph {
  0%, 100% { border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; }
  33%      { border-radius: 56% 44% 42% 58% / 45% 56% 44% 55%; }
  66%      { border-radius: 45% 55% 60% 40% / 55% 45% 52% 48%; }
}

.svc h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .65rem;
  line-height: 1.28;
}
.svc p {
  font-size: .93rem;
  color: var(--ink-mute);
}
/* Foto hero de la tarjeta — full-bleed arriba (cancela el padding del card) */
.svc-photo {
  margin: -2.1rem -1.7rem 1.4rem;
  overflow: clip;
}
.svc-photo img {
  display: block; width: 100%; height: auto;
  transition: transform .4s var(--ease-out);
}
.svc:hover .svc-photo img { transform: scale(1.04); }

.svc-num {
  position: absolute; top: 1.1rem; right: 1.1rem; z-index: 2;
  font-family: var(--label);
  font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  color: #fff;
  background: rgba(10, 42, 78, 0.72);
  backdrop-filter: blur(4px);
  padding: .18rem .55rem;
  border-radius: 999px;
}

/* =============================================================
   11. Fluidomecánica — dos columnas asimétricas
   ============================================================= */
.fluid {
  position: relative;
  padding-block: var(--section-pad);
  background: var(--paper);
}
.fluid-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.fluid h2 { margin-block: 1.3rem .9rem; }
.fluid-slogan {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 1.4rem;
}
.fluid-text p { color: var(--ink-soft); margin-bottom: 1.6rem; }

.fluid-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.2rem; }

/* Diagrama de red de tuberías con flujo animado */
.fluid-visual {
  position: relative;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 70%, var(--navy-2) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow);
  overflow: clip;
}
.fluid-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 70% 20%, rgba(27,111,179,.3), transparent 65%);
  pointer-events: none;
}
/* Foto real dentro del marco navy — sobre el overlay radial */
.fluid-photo {
  position: relative; z-index: 1;
  display: block; width: 100%; height: auto;
  border-radius: var(--radius);
}

.pipes { width: 100%; height: auto; position: relative; z-index: 1; }

.pipes .pipe {
  fill: none;
  stroke: rgba(143, 195, 232, 0.28);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pipes .flow {
  fill: none;
  stroke: var(--aqua);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16 42;
  animation: pipeFlow 3.2s linear infinite;
}
.pipes .flow.slow  { animation-duration: 4.6s; stroke: var(--blue-soft); }
.pipes .flow.green { stroke: var(--green); animation-duration: 3.8s; }
@keyframes pipeFlow { to { stroke-dashoffset: -58; } }

.pipes .joint {
  fill: var(--navy-deep);
  stroke: var(--aqua);
  stroke-width: 2;
}
.pipes .joint-pulse {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.6;
  opacity: 0;
  animation: jointPulse 3s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.pipes .joint-pulse.d2 { animation-delay: 1.5s; }
@keyframes jointPulse {
  0%   { opacity: .9; transform: scale(0.4); }
  70%  { opacity: 0;  transform: scale(2.1); }
  100% { opacity: 0;  transform: scale(2.1); }
}

/* Manómetro oscilante */
.pipes .gauge-needle {
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: gaugeSwing 4.5s ease-in-out infinite;
}
@keyframes gaugeSwing {
  0%, 100% { transform: rotate(-32deg); }
  45%      { transform: rotate(26deg); }
  65%      { transform: rotate(14deg); }
}

.fluid-visual-caption {
  position: relative; z-index: 1;
  margin-top: 1.2rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--label);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(238, 244, 251, 0.6);
}
.fluid-visual-caption b {
  color: var(--green);
  font-weight: 600;
}

/* =============================================================
   12. Proyectos / Empresas que confían
   ============================================================= */
.proof {
  position: relative;
  padding-block: var(--section-pad);
  background: var(--bg);
}
.proof-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.proof-head .lead { margin-top: 1rem; }

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}
.proof-card {
  position: relative;
  min-height: 240px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed rgba(27, 111, 179, 0.35);
  background:
    linear-gradient(160deg, rgba(27, 111, 179, 0.05), rgba(10, 42, 78, 0.03));
  display: grid; place-items: center;
  text-align: center;
  padding: 1.5rem;
  transition: border-color .3s var(--ease-out), transform .3s var(--ease-out),
              background .3s var(--ease-out);
}
.proof-card:hover {
  border-color: var(--blue);
  transform: translateY(-5px);
  background: rgba(255,255,255,.75);
}
.proof-card svg { color: var(--blue-soft); margin-inline: auto; margin-bottom: .9rem; }
.proof-card p {
  font-family: var(--label);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  max-width: 24ch;
}

/* =============================================================
   Carrusel de proyectos — una foto a la vez, crossfade cada 6s
   ============================================================= */
.carousel {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  overflow: clip;
  box-shadow: var(--shadow);
  background: var(--navy-deep);
  touch-action: pan-y;   /* permite scroll vertical; el horizontal lo maneja el swipe */
  cursor: grab;
}
.carousel:active { cursor: grabbing; }
.carousel .slides { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .9s var(--ease-out);
}
.slide.is-active { opacity: 1; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.slide-kind {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 3rem 1.6rem 1.3rem;
  font-family: var(--label);
  text-transform: uppercase; letter-spacing: .14em;
  font-size: clamp(.82rem, 2.2vw, .95rem); font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(4, 14, 26, .82), transparent);
}
.carousel-dots {
  position: absolute; z-index: 2; right: 1.3rem; bottom: 1.15rem;
  display: flex; gap: .5rem;
}
.carousel-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; cursor: pointer;
  border-radius: 999px; background: rgba(255, 255, 255, .45);
  transition: background .3s var(--ease-out), transform .3s var(--ease-out);
}
.carousel-dots button:hover { background: rgba(255, 255, 255, .75); }
.carousel-dots button.is-active { background: #fff; transform: scale(1.3); }

/* Flechas ‹ › — navegar sin los puntos */
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 999px; cursor: pointer; color: #fff;
  background: rgba(4, 14, 26, .45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s var(--ease-out), background .3s var(--ease-out);
}
.carousel-arrow.prev { left: 1rem; }
.carousel-arrow.next { right: 1rem; }
.carousel-arrow:hover { background: rgba(4, 14, 26, .72); }
.carousel-arrow:active { transform: translateY(-50%) scale(.94); }
.carousel-arrow svg { width: 20px; height: 20px; }
@media (hover: hover) { .carousel:hover .carousel-arrow { opacity: 1; } }
@media (hover: none)  { .carousel-arrow { opacity: .85; } }

/* Logos de clientes — gris que revive a color al pasar el cursor */
.logos-row { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.logos-label {
  font-family: var(--label);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 1.2rem;
}
.logos-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: stretch;
}
.logo-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 2.2rem;
  min-height: 86px;
  min-width: 200px;
  display: grid;
  place-items: center;
  transition: border-color .3s var(--ease-out), transform .3s var(--ease-out),
              box-shadow .3s var(--ease-out);
}
.logo-item:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}
.logo-item img {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(1) opacity(.55);
  transition: filter .3s var(--ease-out), transform .3s var(--ease-out);
}
.logo-item:hover img {
  filter: none;
  transform: scale(1.04);
}
/* Logos originalmente blancos (ej. Scania): se invierten a oscuro sobre tarjeta clara */
.logo-item img.logo-invert { filter: invert(1) grayscale(1) opacity(.6); }
.logo-item:hover img.logo-invert { filter: invert(1) opacity(.95); }
.logo-slot {
  background: transparent;
  border-style: dashed;
  border-color: rgba(27, 111, 179, 0.35);
  font-family: var(--label);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* =============================================================
   12b. Redes PCI — Protección Contra Incendios
   (acento rojo seguridad sobre Oxford profundo)
   ============================================================= */
.pci {
  position: relative;
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--cream);
  padding-block: var(--section-pad);
  overflow: clip;
}
.pci::before {
  /* halo cálido sutil — señal de fuego contenida */
  content: "";
  position: absolute; inset: -25% -10% auto;
  height: 75%;
  background: radial-gradient(50% 42% at 82% 18%, rgba(224, 74, 58, 0.20), transparent 70%);
  pointer-events: none;
}
.pci-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.pci .kicker { color: #f0917f; }
.pci .kicker::before { background: #e04a3a; }
.pci h2 { color: #fff; }
.pci-slogan {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0917f;
  margin: .9rem 0 1.3rem;
}
.pci-body { color: rgba(238, 244, 251, 0.82); margin-bottom: 1.6rem; }

.pci-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.6rem; }
.pci-chips .chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--cream);
}
.pci-chips .chip:hover { border-color: #f0917f; background: rgba(255, 255, 255, 0.1); }

.pci-insured {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--label);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 2.1rem;
}
.pci-insured svg { flex: none; }

.btn-fire { background: #e04a3a; color: #fff; }
.btn-fire:hover {
  background: #c73b2c;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(224, 74, 58, 0.35);
}

.pci-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.pci-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.3rem;
  transition: transform .3s var(--ease-out), border-color .3s var(--ease-out),
              background .3s var(--ease-out);
}
.pci-card:hover {
  transform: translateY(-5px);
  border-color: rgba(240, 145, 127, 0.6);
  background: rgba(255, 255, 255, 0.09);
}
.pci-card svg { color: #f0917f; margin-bottom: .8rem; }
.pci-card h3 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: .4rem; line-height: 1.3; }
.pci-card p { font-family: var(--label); font-size: .78rem; color: rgba(238, 244, 251, 0.65); }

/* =============================================================
   13. CTA Contacto — Oxford profundo con olas superiores
   ============================================================= */
.cta {
  position: relative;
  background: linear-gradient(170deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--cream);
  padding-block: calc(var(--section-pad) + 2rem) var(--section-pad);
  overflow: clip;
}
.cta-waves {
  position: absolute; top: -2px; left: 0; right: 0;
  height: clamp(60px, 9vw, 120px);
  transform: scaleY(-1);
  pointer-events: none;
}
.cta-inner { text-align: center; position: relative; z-index: 1; }
.cta h2 { color: #fff; margin-block: 1.2rem 1rem; font-size: clamp(1.9rem, 4vw, 3rem); }
.cta .lead { color: rgba(238, 244, 251, 0.8); margin-inline: auto; margin-bottom: 2.4rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.cta-note {
  margin-top: 2.6rem;
  font-family: var(--label);
  font-size: .78rem;
  letter-spacing: .12em;
  color: rgba(238, 244, 251, 0.55);
}

/* =============================================================
   14. Footer
   ============================================================= */
.footer {
  background: var(--navy-deep);
  color: rgba(238, 244, 251, 0.7);
  padding-block: 3.8rem 2rem;
  border-top: 1px solid var(--line-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.8rem;
}
.footer-brand img { width: 300px; max-width: 100%; margin-bottom: 1.1rem; }
.footer-brand p { font-size: .92rem; max-width: 34ch; }

.footer h4 {
  font-family: var(--label);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 1.1rem;
}
.footer li { margin-bottom: .65rem; }
.footer a {
  font-size: .94rem;
  transition: color .3s var(--ease-out);
}
.footer a:hover { color: #fff; }
.footer-contact a {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--cream); font-weight: 600;
}
.footer-contact svg { flex: none; color: var(--green); }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-dark);
  font-family: var(--label);
  font-size: .74rem;
  letter-spacing: .06em;
  color: rgba(238, 244, 251, 0.45);
}

/* =============================================================
   15. Efectos — reveals
   ============================================================= */
/* Entrada del hero — CSS puro escalonado (robusto: siempre termina visible) */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.hero [data-hero-seq] { animation: heroIn .7s var(--ease-out) both; }
.hero-inner > :nth-child(1) { animation-delay: .1s; }
.hero-inner > :nth-child(2) { animation-delay: .2s; }
.hero-inner > :nth-child(3) { animation-delay: .3s; }
.hero-inner > :nth-child(4) { animation-delay: .4s; }
.hero-inner > :nth-child(5) { animation-delay: .5s; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* Defensa: si un elemento lleva reveal + data-split nunca debe quedar oculto */
.reveal[data-split] { opacity: 1; transform: none; }
/* Escalonado suave en grids — cascada corta (Emil: 30–80ms entre ítems) */
.reveal[data-delay="1"] { transition-delay: .07s; }
.reveal[data-delay="2"] { transition-delay: .14s; }
.reveal[data-delay="3"] { transition-delay: .21s; }

/* =============================================================
   16. Responsive — mobile first ajustes descendentes
   ============================================================= */
@media (max-width: 1279px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Menú móvil — colapsa a hamburguesa antes (5 ítems + banderas no caben) */
@media (max-width: 1100px) {
  .burger { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff;
    box-shadow: var(--shadow);
    max-height: 0; overflow: hidden;
    transition: max-height .3s var(--ease-out);
  }
  .nav.is-open .nav-menu { max-height: 360px; }
  .nav-menu a {
    color: var(--ink) !important;
    padding: 1rem var(--gutter);
    border-bottom: 1px solid var(--line);
  }
  .nav-menu a::after { display: none; }
  /* al abrir menú el nav siempre solidifica */
  .nav.is-open { background: #fff; box-shadow: var(--shadow); }
  .nav.is-open .burger span { background: var(--navy); }
  .nav.is-open .lang { border-color: var(--line); }
  .nav.is-open .lang button { color: var(--ink-mute); }
  .nav.is-open .lang button.is-active { background: var(--navy); color: #fff; }
}

@media (max-width: 959px) {
  .fluid-grid { grid-template-columns: 1fr; }
  .pci-grid { grid-template-columns: 1fr; }
  .fluid-visual { order: -1; max-width: 560px; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 719px) {
  .services-grid { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-meta { gap: 1rem 1.6rem; }
}

@media (max-width: 539px) {
  .btn { width: 100%; justify-content: center; }
  .hero-actions, .cta-actions { flex-direction: column; }
  .nav-brand img { height: 52px; }
  /* Selector de idioma compacto: solo banderas */
  .lang button span { display: none; }
  .lang button { padding: .42rem .55rem; }
  .pci-features { grid-template-columns: 1fr; }
}

/* =============================================================
   17. Reduced motion — SOLO efectos intrusivos
   (micro-interacciones y hovers se mantienen SIEMPRE)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave-a, .wave-b { animation-duration: 40s; }   /* se ralentiza, no se apaga */
  .hero-flow path { animation: none; }
  .joint-pulse { animation: none; }
  /* NO desactivar: hovers, reveals, blobs lentos, ticker */
}
