/* ==========================================================================
   EmpleaRH — Hoja de estilos principal
   HTML + CSS + JS puro. Paleta tomada del logo (azul corporativo + verde).
   ========================================================================== */

/* Tipografías premium */
@import url("https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&f[]=satoshi@400,500,700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&display=swap");

:root {
  --brand-50:  #eef4fb;
  --brand-100: #d6e4f5;
  --brand-200: #aecaeb;
  --brand-300: #7ba6da;
  --brand-400: #4a7fc2;
  --brand-500: #2a5fa3;
  --brand-600: #1e4e8c; /* azul del logo */
  --brand-700: #173e73;
  --brand-800: #122f58;
  --brand-900: #0e2444;
  --brand-950: #081628;

  --leaf-100: #deefcb;
  --leaf-300: #9dcc68;
  --leaf-400: #7db840;
  --leaf-500: #62a02b; /* verde del logo */
  --leaf-600: #4d8121;

  --plum-500: #8a3597;
  --plum-600: #7e2e8e;
  --aqua-500: #1f9b9b;

  --ink: #0e2444;
  --mist: #f6f8fb;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;

  --display: "General Sans", "Satoshi", "Inter Tight", system-ui, sans-serif;
  --sans: "Inter Tight", "Satoshi", system-ui, sans-serif;

  --shadow-soft: 0 2px 8px -2px rgba(14, 36, 68, 0.08), 0 6px 20px -4px rgba(14, 36, 68, 0.08);
  --shadow-card: 0 4px 24px -6px rgba(14, 36, 68, 0.12);
  --shadow-lift: 0 18px 48px -12px rgba(14, 36, 68, 0.28);
  --shadow-glow: 0 0 0 1px rgba(30, 78, 140, 0.06), 0 20px 60px -20px rgba(30, 78, 140, 0.35);

  --gradient-brand: linear-gradient(135deg, #1e4e8c 0%, #122f58 60%, #0e2444 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --container: 1200px;
}

/* --------------------------------------------------------------------- Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  width: 100%;
  overscroll-behavior-x: none;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}

::selection {
  background: rgba(30, 78, 140, 0.18);
}

::-webkit-scrollbar {
  width: 11px;
}
::-webkit-scrollbar-track {
  background: #eef2f8;
}
::-webkit-scrollbar-thumb {
  background: #c2d2e6;
  border-radius: 999px;
  border: 3px solid #eef2f8;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-600);
}

/* ------------------------------------------------------------------- Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}
@media (min-width: 768px) {
  .section {
    padding: 128px 0;
  }
}

.bg-mist {
  background: var(--mist);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brand-600);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: rgba(74, 127, 194, 0.6);
}
.eyebrow.light {
  color: var(--leaf-300);
}
.eyebrow.light::before {
  background: rgba(157, 204, 104, 0.6);
}

.section-head {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.section-head.left {
  margin: 0;
  text-align: left;
}
.section-head h2 {
  margin-top: 12px;
  font-size: clamp(2.15rem, 5vw, 3rem);
  font-weight: 700;
}
.section-head p {
  margin-top: 16px;
  font-size: 1.15rem;
  color: var(--slate-600);
}
.section-head.on-dark h2 {
  color: #fff;
}
.section-head.on-dark p {
  color: rgba(255, 255, 255, 0.72);
}

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-accent {
  background: var(--leaf-500);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--brand-200);
  color: var(--brand-700);
  backdrop-filter: blur(6px);
}
.btn-light {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  backdrop-filter: blur(6px);
}
/* Efectos hover solo en dispositivos con puntero real (no táctiles) */
@media (hover: hover) {
  .btn-primary:hover {
    background: var(--brand-700);
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
  }
  .btn-accent:hover {
    background: var(--leaf-600);
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
  }
  .btn-ghost:hover {
    border-color: var(--brand-400);
    background: #fff;
  }
  .btn-light:hover {
    background: rgba(255, 255, 255, 0.2);
  }
}
/* En táctil: respuesta inmediata al presionar */
.btn:active {
  transform: scale(0.97);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 127, 194, 0.4);
}

/* ------------------------------------------------------------------- Header */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 14px 16px 0;
}
.navbar {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.header.scrolled .navbar {
  border-color: rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}
/* En VISTA MÓVIL la barra es BLANCA SIEMPRE (sin efecto de cambio de color ni
   desenfoque): el fondo es sólido desde el inicio, lo que además es lo más
   ligero para la GPU del teléfono y elimina cualquier retraso al hacer scroll. */
@media (max-width: 1023px) {
  .navbar,
  .header.scrolled .navbar {
    background: #fff;
    border-color: rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.brand .wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--brand-700);
}
.brand .wordmark .rh {
  color: var(--leaf-500);
}
.brand .tag {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: var(--slate-400);
}
.header:not(.scrolled) .brand .wordmark {
  color: #fff;
}
.header:not(.scrolled) .brand .wordmark .rh {
  color: var(--leaf-300);
}
.header:not(.scrolled) .brand .tag {
  color: rgba(255, 255, 255, 0.6);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
  list-style: none;
}
@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s var(--ease);
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.header.scrolled .nav-links a {
  color: var(--slate-600);
}
.header.scrolled .nav-links a:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-cta {
  display: none;
}
@media (min-width: 640px) {
  .nav-cta {
    display: inline-flex;
  }
}
.nav-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  transition: background 0.2s;
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s var(--ease);
}
.header.scrolled .nav-toggle {
  color: var(--brand-700);
}
.nav-toggle:active {
  transform: scale(0.88);
}
.nav-toggle:active svg {
  transform: rotate(90deg);
}
@media (hover: hover) {
  .nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  .header.scrolled .nav-toggle:hover {
    background: var(--brand-50);
  }
}
@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
}
/* Vista móvil: barra blanca SIEMPRE, así que el logo y el botón van en su
   versión oscura/colorida también en el hero (EMPLEA azul, RH verde, RECURSOS
   HUMANOS gris) para que se lean sobre el blanco. Va después de las reglas
   ":not(.scrolled)" para ganar por orden de cascada. */
@media (max-width: 1023px) {
  .header:not(.scrolled) .brand .wordmark {
    color: var(--brand-700);
  }
  .header:not(.scrolled) .brand .wordmark .rh {
    color: var(--leaf-500);
  }
  .header:not(.scrolled) .brand .tag {
    color: var(--slate-400);
  }
  .header:not(.scrolled) .nav-toggle {
    color: var(--brand-700);
  }
}

.mobile-menu {
  max-width: var(--container);
  margin: 8px auto 0;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--slate-200);
  background: #fff;
  box-shadow: var(--shadow-card);
  display: none;
}
.mobile-menu.open {
  display: block;
  transform-origin: top right;
  animation: menuIn 0.4s var(--ease) both;
}
@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* Cada opción entra escalonada, en cascada */
.mobile-menu.open > * {
  animation: itemIn 0.45s var(--ease) both;
}
.mobile-menu.open > *:nth-child(1) { animation-delay: 0.06s; }
.mobile-menu.open > *:nth-child(2) { animation-delay: 0.11s; }
.mobile-menu.open > *:nth-child(3) { animation-delay: 0.16s; }
.mobile-menu.open > *:nth-child(4) { animation-delay: 0.21s; }
.mobile-menu.open > *:nth-child(5) { animation-delay: 0.26s; }
.mobile-menu.open > *:nth-child(6) { animation-delay: 0.31s; }
.mobile-menu.open > *:nth-child(7) { animation-delay: 0.36s; }
@keyframes itemIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.mobile-menu a {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 500;
  color: var(--slate-700);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.mobile-menu a:active {
  background: var(--brand-50);
  color: var(--brand-700);
}
@media (hover: hover) {
  .mobile-menu a:hover {
    background: var(--brand-50);
    color: var(--brand-700);
  }
}
.mobile-menu .btn {
  width: 100%;
  margin-top: 8px;
}

/* --------------------------------------------------------------------- Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
@keyframes heroEntrance {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-title-img {
  width: 500px;
  max-width: 90%;
  height: auto;
  display: block;
  margin: 0 auto;
  position: relative;
  top: -80px;
  animation: heroEntrance 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  text-shadow:
    0 2px 4px rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.2),
    0 20px 60px rgba(0, 0, 0, 0.12);
}


@media (max-width: 640px) {
  .hero-title-img {
    width: min(82vw, 340px);
    top: -40px;
  }
  /* Hero más bajo en móvil: deja que la siguiente sección asome antes */
  .hero {
    min-height: 88svh;
  }
  .hero .container {
    padding-top: 96px;
    padding-bottom: 64px;
  }
  .hero-actions {
    margin-top: 28px;
  }
}

.hero-bg {
  position: absolute;
  inset: -5% 0;
  z-index: -2;
}
.hero-bg img {
  /* Escala fija ligera para cubrir bien sin necesidad de animación. */
  transform: scale(1.05);
}
/* Zoom continuo en escritorio (≥768px). */
@media (min-width: 768px) {
  .hero-bg img {
    animation: zoomSuave 15s ease-in-out infinite alternate;
  }
}
/* Zoom suave también en móvil: más lento y sutil. Ahora va fluido porque la
   imagen es liviana (~100 KB) y el hero ya no tiene blur ni burbujas; una
   animación de transform: scale por sí sola corre en la GPU sin repintar. */
@media (max-width: 640px) {
  .hero-bg img {
    animation: zoomMovil 15s ease-in-out infinite alternate;
  }
}

@keyframes zoomSuave {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.2);
  }
}
@keyframes zoomMovil {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1.28);
  }
}
.hero-bg video {
  width: 100%;
  height: 110%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-overlay.a {
  background: linear-gradient(
    135deg,
    rgba(10, 22, 40, 0.35) 0%,
    rgba(10, 22, 40, 0.15) 50%,
    rgba(27, 58, 107, 0.10) 100%
  );
}
.hero-overlay.b {
  background: linear-gradient(to top, rgba(8, 22, 40, 0.95), transparent 45%);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
}
.hero-blob.green {
  width: 380px;
  height: 380px;
  right: -100px;
  top: 22%;
  background: rgba(98, 160, 43, 0.18);
}
.hero-blob.aqua {
  width: 320px;
  height: 320px;
  left: -80px;
  bottom: -60px;
  background: rgba(31, 155, 155, 0.18);
}
/* En móvil ocultamos las burbujas: el filter: blur(80px) es de lo más caro
   para la GPU del teléfono y, al estar solo en el hero, era lo que dejaba
   lento el botón del menú ahí. Apenas se notan en pantalla pequeña. */
@media (max-width: 640px) {
  .hero-blob {
    display: none;
  }
}
.hero .container {
  position: relative;
  padding-top: 120px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--leaf-400);
}
.hero h1 {
  margin-top: 24px;
  max-width: 18ch;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
}
.hero .lead {
  margin-top: 24px;
  max-width: 56ch;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  display: grid;
  justify-items: center;
  padding-top: 6px;
}
.scroll-cue span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: cue 1.6s infinite;
}
@keyframes cue {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(8px);
    opacity: 0.4;
  }
}
/* En móvil ocultamos el indicador de scroll: su animación infinita mantenía
   activo el compositor en el hero. Con el hero a 88svh la siguiente sección
   ya asoma, así que el indicador no hace falta. */
@media (max-width: 640px) {
  .scroll-cue {
    display: none;
  }
}

/* ------------------------------------------------------- Scroll reveal anim */
.reveal {
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  /* NOTA: sin will-change permanente. Antes estaba en cada .reveal (decenas
     de elementos), lo que dejaba decenas de capas de GPU vivas para siempre y
     saturaba el móvil, provocando repintados lentos al volver a una sección.
     Una animación de entrada de una sola vez no necesita will-change. */
}
.reveal.up {
  transform: translateY(28px);
}
@media (max-width: 768px) {
  .reveal.up{
    display: inline-block;
    margin-top: 100px !important;
  }
}
.reveal.left {
  transform: translateX(-36px);
}
.reveal.right {
  transform: translateX(36px);
}
.reveal.zoom {
  transform: scale(0.94);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------- About */
.about-grid {
  display: grid;
  gap: 56px;
  align-items: center;
}
@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}
/* Móvil/tablet: el texto va primero para empezar a leer apenas pasa el hero */
@media (max-width: 1023px) {
  .about-grid {
    gap: 32px;
  }
  .about-text {
    order: 1;
  }
  .about-media {
    order: 2;
  }
}
.about-media {
  position: relative;
}
.about-media .main {
  aspect-ratio: 4/5;
  width: 100%;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: var(--shadow-card);
}
.about-media .floating {
  position: absolute;
  right: 0;
  bottom: -40px;
  width: 62%;
  aspect-ratio: 4/3;
  border: 5px solid #fff;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow-lift);
}
.about-media .value-chip {
  position: absolute;
  left: -12px;
  top: 24px;
  background: var(--brand-700);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
}
.about-media .value-chip small {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--leaf-300);
}
.about-media .value-chip b {
  font-size: 0.9rem;
}
@media (max-width: 540px) {
  .about-media .floating,
  .about-media .value-chip {
    display: none;
  }
}
.about-text h2 {
  margin-top: 12px;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  font-weight: 700;
}
.about-text .intro {
  margin-top: 20px;
  font-size: 1.18rem;
  color: var(--slate-600);
}
.mv-grid {
  margin-top: 32px;
  display: grid;
  gap: 20px;
}
@media (min-width: 600px) {
  .mv-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.mv-card {
  height: 100%;
  border: 1px solid var(--slate-100);
  background: var(--mist);
  border-radius: 18px;
  padding: 24px;
  transition: all 0.3s var(--ease);
}
.mv-card:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-soft);
}
.mv-card .ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-600);
  color: #fff;
}
.mv-card h3 {
  margin-top: 16px;
  font-size: 1.2rem;
}
.mv-card p {
  margin-top: 8px;
  font-size: 1rem;
  color: var(--slate-600);
}
.value-pills {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
.value-pills li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 0.875rem;
  font-weight: 500;
}
.value-pills svg {
  width: 15px;
  height: 15px;
  color: var(--leaf-500);
}

/* ---------------------------------------------------------------- Services */
.services-list {
  margin-top: 64px;
}
.service {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 1024px) {
  .service {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}
.service + .service {
  margin-top: 96px;
}
@media (min-width: 768px) {
  .service + .service {
    margin-top: 128px;
  }
}
.service-media {
  position: relative;
}
.service-media .frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.service-media img {
  aspect-ratio: 5/4;
  width: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 0.7s var(--ease);
}
.service-media .frame:hover img {
  transform: scale(1.12);
}
.service-media .frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, rgba(14, 36, 68, 0.4), transparent 55%);
}
.service-num {
  position: absolute;
  left: 20px;
  top: 20px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  color: var(--brand-700);
  font-family: var(--display);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}
.service-media .accent {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(98, 160, 43, 0.1);
  filter: blur(40px);
  z-index: -1;
}
.service.img-left .service-media .accent {
  left: -32px;
  top: -32px;
}
.service.img-right .service-media .accent {
  right: -32px;
  bottom: -32px;
}
.service-body h3 {
  margin-top: 12px;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
}
.service-body p {
  margin-top: 16px;
  font-size: 1.08rem;
  color: var(--slate-600);
}
.subservices {
  margin-top: 24px;
  display: grid;
  gap: 12px;
  list-style: none;
}
@media (min-width: 600px) {
  .subservices {
    grid-template-columns: 1fr 1fr;
  }
}
.subservices li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1rem;
  color: var(--slate-700);
}
.subservices .tick {
  flex: none;
  margin-top: 2px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--leaf-100);
  color: var(--leaf-600);
}
.subservices .tick svg {
  width: 13px;
  height: 13px;
}
/* En desktop alternamos el orden visual de imagen/texto */
@media (min-width: 1024px) {
  .service.img-right .service-media {
    order: 2;
  }
  .service.img-right .service-body {
    order: 1;
  }
}

/* ----------------------------------------------------------------- Showcase */
.showcase {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.showcase img {
  position: absolute;
  inset: -10% 0;
  z-index: -2;
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}
.showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to right,
    rgba(8, 22, 40, 0.85),
    rgba(14, 36, 68, 0.6) 50%,
    rgba(14, 36, 68, 0.3)
  );
}
.showcase .container {
  padding: 80px 24px;
}
.showcase h2 {
  margin-top: 12px;
  max-width: 20ch;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  color: #fff;
}
.showcase p {
  margin-top: 16px;
  max-width: 40ch;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.78);
}
/* Móvil: showcase más bajo y compacto para no alargar tanto el scroll */
@media (max-width: 640px) {
  .showcase {
    min-height: 44vh;
  }
  .showcase .container {
    padding: 56px 24px;
  }
  /* Degradado más parejo de abajo hacia arriba: mejor lectura en vertical */
  .showcase::before {
    background: linear-gradient(
      to top,
      rgba(8, 22, 40, 0.9),
      rgba(14, 36, 68, 0.45) 70%,
      rgba(14, 36, 68, 0.3)
    );
  }
}

/* ------------------------------------------------------------------ Process */
.timeline {
  position: relative;
  margin-top: 64px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 21px;
  width: 1px;
  background: linear-gradient(to bottom, var(--brand-200), var(--brand-300), var(--leaf-300));
}
@media (min-width: 1024px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
}
.tl-item + .tl-item {
  margin-top: 40px;
}
@media (min-width: 1024px) {
  .tl-item {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .tl-item + .tl-item {
    margin-top: 56px;
  }
}
.tl-node {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-glow);
  border: 4px solid #fff;
}
@media (min-width: 1024px) {
  .tl-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}
.tl-card {
  border: 1px solid var(--slate-100);
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s var(--ease);
}
.tl-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-card);
}
.tl-card .step {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--leaf-600);
}
.tl-card h3 {
  margin-top: 8px;
  font-size: 1.28rem;
}
.tl-card p {
  margin-top: 8px;
  font-size: 1rem;
  color: var(--slate-600);
}
@media (min-width: 1024px) {
  .tl-item:nth-child(odd) .tl-card {
    grid-column: 1;
    text-align: right;
    margin-right: 56px;
  }
  .tl-item:nth-child(even) .tl-card {
    grid-column: 2;
    margin-left: 56px;
  }
}

/* ------------------------------------------------------------------ Sectors */
.cards-grid {
  margin-top: 56px;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.sector-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--slate-100);
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s var(--ease);
}
.sector-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-lift);
}
.sector-card .blob {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--brand-50);
  transition: transform 0.5s var(--ease);
}
.sector-card:hover .blob {
  transform: scale(1.6);
}
.sector-card .inner {
  position: relative;
}
.sector-card .ic {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s var(--ease);
}
.sector-card:hover .ic {
  transform: scale(1.08);
}
.sector-card .ic svg {
  width: 26px;
  height: 26px;
}
.sector-card h3 {
  margin-top: 20px;
  font-size: 1.3rem;
}
.sector-card p {
  margin-top: 8px;
  font-size: 1rem;
  color: var(--slate-600);
}

/* ----------------------------------------------------------------- Benefits */
.benefits {
  position: relative;
  overflow: hidden;
  background: var(--gradient-brand);
  color: #fff;
}
.benefits .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.benefits .blob.a {
  left: -120px;
  top: 40px;
  width: 360px;
  height: 360px;
  background: rgba(31, 155, 155, 0.12);
}
.benefits .blob.b {
  right: -120px;
  bottom: 40px;
  width: 360px;
  height: 360px;
  background: rgba(98, 160, 43, 0.12);
}
.benefits .container {
  position: relative;
}
.benefit-card {
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: blur(4px);
  transition: all 0.3s var(--ease);
}
.benefit-card:hover {
  transform: translateY(-6px);
  border-color: rgba(157, 204, 104, 0.4);
  background: rgba(255, 255, 255, 0.1);
}
.benefit-card .ic {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(98, 160, 43, 0.9);
  color: #fff;
  transition: transform 0.3s var(--ease);
}
.benefit-card:hover .ic {
  transform: scale(1.1);
}
.benefit-card .ic svg {
  width: 24px;
  height: 24px;
}
.benefit-card h3 {
  margin-top: 20px;
  font-size: 1.2rem;
  color: #fff;
}
.benefit-card p {
  margin-top: 8px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------------------------------------------------------------------- CTA */
.cta {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-align: center;
}
.cta img {
  position: absolute;
  inset: -12% 0;
  z-index: -2;
  width: 100%;
  height: 124%;
  object-fit: cover;
  will-change: transform;
}
/* En táctil el parallax está desactivado, así que estas imágenes de fondo no
   necesitan capa de GPU permanente: liberamos memoria en el móvil. */
@media (hover: none) {
  .showcase img,
  .cta img {
    will-change: auto;
  }
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(8, 22, 40, 0.9), rgba(18, 47, 88, 0.78) 60%, rgba(30, 78, 140, 0.68));
}
.cta .container {
  padding: 96px 24px;
}
.cta h2 {
  margin: 0 auto;
  max-width: 22ch;
  font-size: clamp(1.9rem, 5vw, 3rem);
  color: #fff;
}
.cta p {
  margin: 20px auto 0;
  max-width: 40ch;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
}
.cta .btn {
  margin-top: 36px;
}

/* ------------------------------------------------------------------ Contact */
.contact-grid {
  margin-top: 56px;
  display: grid;
  gap: 32px;
}
@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 2fr 3fr;
  }
}
.contact-info {
  position: relative;
  overflow: hidden;
  height: 100%;
  border-radius: 22px;
  background: var(--gradient-brand);
  color: #fff;
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.contact-info .blob {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 192px;
  height: 192px;
  border-radius: 50%;
  background: rgba(98, 160, 43, 0.15);
  filter: blur(50px);
}
.contact-info h3 {
  color: #fff;
  font-size: 1.25rem;
}
.contact-info .sub {
  margin-top: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}
.contact-info ul {
  margin-top: 32px;
  list-style: none;
  display: grid;
  gap: 20px;
}
.contact-info li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-info .ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--leaf-300);
}
.contact-info .ic svg {
  width: 20px;
  height: 20px;
}
.contact-info small {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
}
.contact-info .val {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
}
.contact-socials {
  margin-top: 32px;
  display: flex;
  gap: 8px;
}
.contact-socials a {
  padding: 6px 14px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s;
}
.contact-socials a:hover {
  border-color: var(--leaf-300);
  color: #fff;
}

.contact-form {
  border: 1px solid var(--slate-100);
  background: #fff;
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.form-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.form-grid .full {
  grid-column: 1 / -1;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
}
.field label .req {
  color: var(--leaf-600);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: #fff;
  transition: all 0.2s;
}
.field textarea {
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--slate-400);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(30, 78, 140, 0.1);
}
.form-error {
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.875rem;
}
.form-success {
  text-align: center;
  padding: 48px 16px;
}
.form-success .check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--leaf-100);
  color: var(--leaf-600);
}
.form-success .check svg {
  width: 32px;
  height: 32px;
}
.form-success h3 {
  margin-top: 20px;
  font-size: 1.5rem;
}
.form-success p {
  margin-top: 8px;
  color: var(--slate-600);
}

/* ------------------------------------------------------------------- Footer */
.footer {
  position: relative;
  overflow: hidden;
  background: var(--gradient-brand);
  color: #fff;
}
.footer .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.footer .blob.a {
  right: -100px;
  top: -100px;
  width: 320px;
  height: 320px;
  background: rgba(98, 160, 43, 0.1);
}
.footer .blob.b {
  left: -100px;
  bottom: -100px;
  width: 320px;
  height: 320px;
  background: rgba(31, 155, 155, 0.1);
}
.footer .container {
  position: relative;
  padding: 64px 24px;
}
.footer-grid {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}
.footer .brand .wordmark {
  color: #fff;
}
.footer .brand .wordmark .rh {
  color: var(--leaf-300);
}
.footer .brand .tag {
  color: rgba(255, 255, 255, 0.6);
}
.footer-about p {
  margin-top: 16px;
  max-width: 32ch;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}
.footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
}
.footer ul {
  margin-top: 18px;
  list-style: none;
  display: grid;
  gap: 10px;
}
.footer ul a,
.footer ul li {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s;
}
.footer ul a:hover {
  color: #fff;
}
.footer-socials {
  margin-top: 20px;
  display: flex;
  gap: 8px;
}
.footer-socials a {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}
.footer-socials a:hover {
  border-color: var(--leaf-300);
  color: #fff;
}
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
  }
}
.footer-bottom a:hover {
  color: #fff;
}
.footer-credit a {
  color: var(--leaf-300);
  font-weight: 600;
}
.footer-credit a:hover {
  color: #fff;
}

/* Utilidad para grid de fondo sutil */
.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(30, 78, 140, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.6;
}
.rel {
  position: relative;
}

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------------------------------------------------- Botón flotante WhatsApp */
.whatsapp-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 28px -6px rgba(37, 211, 102, 0.55), 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
  /* Pulso suave que invita a tocar. */
  animation: waPulse 2.4s ease-out infinite;
}
.whatsapp-fab svg {
  width: 34px;
  height: 34px;
}
.whatsapp-fab:active {
  transform: scale(0.92);
}
@media (hover: hover) {
  .whatsapp-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 34px -6px rgba(37, 211, 102, 0.65), 0 6px 16px rgba(0, 0, 0, 0.2);
  }
}
@keyframes waPulse {
  0% {
    box-shadow: 0 10px 28px -6px rgba(37, 211, 102, 0.55), 0 0 0 0 rgba(37, 211, 102, 0.45);
  }
  70% {
    box-shadow: 0 10px 28px -6px rgba(37, 211, 102, 0.55), 0 0 0 16px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 10px 28px -6px rgba(37, 211, 102, 0.55), 0 0 0 0 rgba(37, 211, 102, 0);
  }
}
@media (max-width: 640px) {
  .whatsapp-fab {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }
  .whatsapp-fab svg {
    width: 30px;
    height: 30px;
  }
}

/* ============================================================================
   AJUSTE MÓVIL/TABLET — menos espacio en blanco
   Usa ≤1023px (igual que la barra móvil) porque algunos teléfonos reportan un
   ancho mayor a 640px y los ajustes anteriores no llegaban a aplicarse.
   En escritorio (≥1024px) todo queda igual.
   ============================================================================ */
@media (max-width: 1023px) {
  /* --- Menos espacio vertical entre secciones y elementos --- */
  .section {
    padding: 36px 0;
  }
  .section-head h2 {
    margin-top: 6px;
  }
  .section-head p {
    margin-top: 10px;
  }
  .services-list {
    margin-top: 28px;
  }
  .cards-grid,
  .contact-grid {
    margin-top: 28px;
  }
  .timeline {
    margin-top: 28px;
  }
  .service {
    gap: 18px;
  }
  .service + .service {
    margin-top: 40px;
  }
  .service-body h3 {
    margin-top: 8px;
  }
  .service-body p {
    margin-top: 12px;
  }
  .about-text h2 {
    margin-top: 8px;
  }
  .about-text .intro {
    margin-top: 12px;
  }
  .mv-grid {
    margin-top: 18px;
  }
  .value-pills {
    margin-top: 18px;
  }
  .subservices {
    margin-top: 12px;
  }
  .cta {
    min-height: auto;
  }
  .cta .container {
    padding: 56px 24px;
  }
  .cta .btn {
    margin-top: 24px;
  }
}
