/* =========================================================
   Valenzuela Serrano & Asociados S.A.S. - Inicio
   Mobile-first. Easing de referencia (Webisoft): var(--ease)
   ========================================================= */

:root {
  --color-black: #000000;
  --color-navy: #091F3C;
  --color-navy-light: #0F2E52;
  --color-gold: #D3AA46;
  --color-white: #FFFFFF;
  --color-silver: #EDEFF1;
  --color-paper: #f7f7f5;
  --gold-gradient: linear-gradient(135deg, #7a5c1e 0%, #D3AA46 22%, #F6E8B8 50%, #D3AA46 78%, #7a5c1e 100%);
  --ease: cubic-bezier(0.215, 0.61, 0.355, 1);

  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --muted-dark: rgba(237, 239, 241, .72);   /* texto secundario sobre fondo oscuro */
  --muted-light: #3d4a5c;                   /* texto secundario sobre fondo claro */
  --radius: 14px;
  --panel-radius: 28px;
  --gutter: 20px;
  --stack-top: 24px;     /* posición sticky de la primera tarjeta de servicios */
  --stack-step: 60px;    /* cuánto asoma cada tarjeta apilada (Webisoft usa 64px) */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--color-black);
  color: var(--color-silver);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0; color: var(--color-white); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

/* =========================================================
   PANELES APILADOS (patrón Webisoft)
   Cada panel queda sticky al llegar a su final y el siguiente
   se le sobrepone. --stick-top lo calcula script.js.
   ========================================================= */
.panel {
  position: sticky;
  top: var(--stick-top, 0px);
  overflow: clip;
}
.no-stick .panel { position: relative; top: auto; } /* durante ScrollTrigger.refresh() */
.panel::after {
  /* sombra que oscurece el panel mientras el siguiente lo cubre (scrub en script.js) */
  content: "";
  position: absolute; inset: 0;
  background: #000;
  opacity: var(--shade, 0);
  pointer-events: none;
  z-index: 20;
}
.panel + .panel {
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  box-shadow: 0 -24px 60px -10px rgba(0, 0, 0, .7);
}
.panel + .panel::before {
  /* línea divisoria dorada en el borde superior de cada panel */
  content: "";
  position: absolute; top: 0; left: var(--panel-radius); right: var(--panel-radius);
  height: 1px;
  background: var(--gold-gradient);
  background-size: 200% auto;
  animation: gold-shimmer 5s linear infinite;
  z-index: 3;
}
.panel--black { background: var(--color-black); }

/* ---------- Utilidades dorado metálico ---------- */
@keyframes gold-shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  background: var(--gold-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gold-shimmer 6s linear infinite;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 32px; height: 1px;
  background: var(--gold-gradient);
  background-size: 200% auto;
}
/* En fondo claro el gradiente pierde contraste como texto: texto navy, línea dorada */
.eyebrow--dark { background: none; color: var(--color-navy); animation: none; }

.icon {
  width: 44px; height: 44px;
  fill: none;
  stroke: url(#gold-grad);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--color-gold); /* fallback */
}

/* =========================================================
   MARCOS DE IMAGEN
   Si el archivo aún no existe en /assets, script.js agrega .is-missing
   y se muestra el marco con la medida recomendada (data-label).
   ========================================================= */
.media {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #0d2340 0%, #06101e 100%);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--cover { position: absolute; inset: 0; }
.media.is-missing img { display: none; }
.media.is-missing::after {
  content: "Imagen pendiente\A" attr(data-label);
  white-space: pre-line;
  position: absolute; inset: 10px;
  display: grid; place-items: center;
  text-align: center;
  padding: 12px;
  border: 1px dashed rgba(211, 170, 70, .55);
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.8;
  color: rgba(237, 239, 241, .65);
}

/* ---------- Botones ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-row--center { justify-content: center; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  text-decoration: none;
  isolation: isolate;
  overflow: hidden;
  transition: color .45s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.btn > * { position: relative; z-index: 1; }
.btn__icon { width: 20px; height: 20px; color: currentColor; }

/* Primario: fondo navy + borde gold-gradient. Hover: se llena con gradiente animado y texto navy */
.btn--primary {
  color: var(--color-white);
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--color-navy), var(--color-navy)) padding-box,
    var(--gold-gradient) border-box;
}
.btn--primary::before,
.btn--dark::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 0;
  background: var(--gold-gradient);
  background-size: 200% auto;
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.btn--primary:hover, .btn--primary:focus-visible,
.btn--dark:hover, .btn--dark:focus-visible { color: var(--color-navy); }
.btn--primary:hover::before, .btn--primary:focus-visible::before,
.btn--dark:hover::before, .btn--dark:focus-visible::before {
  opacity: 1;
  animation: gold-shimmer 2.4s linear infinite;
}

/* Secundario (WhatsApp) */
.btn--ghost {
  color: var(--color-white);
  border: 1.5px solid rgba(237, 239, 241, .35);
  background: rgba(255, 255, 255, .04);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  border-color: var(--color-silver);
  background: rgba(255, 255, 255, .1);
  transform: translateY(-2px);
}

/* Oscuro (para secciones claras) */
.btn--dark {
  color: var(--color-white);
  background: var(--color-navy);
  border: 1.5px solid var(--color-navy);
}

/* Gold (CTA final): relleno gradiente + pulso dorado en hover */
.btn--gold {
  color: var(--color-navy);
  background: var(--gold-gradient);
  background-size: 200% auto;
  border: 0;
  overflow: visible;
  animation: gold-shimmer 4s linear infinite;
}
.btn--gold::after {
  /* halo con el mismo gradiente: box-shadow no acepta gradientes, así que se usa una capa difuminada */
  content: "";
  position: absolute; inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: var(--gold-gradient);
  background-size: 200% auto;
  filter: blur(14px);
  opacity: 0;
  transform: scale(.9);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.btn--gold:hover, .btn--gold:focus-visible {
  transform: translateY(-2px);
  animation: gold-shimmer 4s linear infinite, gold-pulse 1.6s var(--ease) infinite;
}
.btn--gold:hover::after, .btn--gold:focus-visible::after {
  opacity: .75;
  animation: halo-pulse 1.6s var(--ease) infinite;
}
@keyframes gold-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(211, 170, 70, .55), 0 0 0 0 rgba(246, 232, 184, .35); }
  70%  { box-shadow: 0 0 0 14px rgba(211, 170, 70, 0), 0 0 0 26px rgba(246, 232, 184, 0); }
  100% { box-shadow: 0 0 0 0 rgba(211, 170, 70, 0), 0 0 0 0 rgba(246, 232, 184, 0); }
}
@keyframes halo-pulse {
  0%   { transform: scale(.95); opacity: .8; }
  70%  { transform: scale(1.18); opacity: .15; }
  100% { transform: scale(.95); opacity: .8; }
}

/* ---------- Secciones ---------- */
.section { padding: 88px 0; }
.section:not(.panel) { position: relative; } /* los .panel son sticky */
.section--black { background: var(--color-black); }
.section--navy  { background: var(--color-navy); }
.section--light { background: var(--color-paper); color: var(--muted-light); }
.section--light h2, .section--light h3 { color: var(--color-navy); }

.section__head { max-width: 760px; margin-bottom: 48px; }
.section__head h2 { font-size: clamp(1.9rem, 5.2vw, 3rem); }
.section__lead { margin-top: 18px; font-size: 1.05rem; color: var(--muted-dark); max-width: 640px; }
.section--light .section__lead { color: var(--muted-light); }

/* Pista "desliza" (solo celular) */
.swipe-hint {
  display: flex; align-items: center; gap: 8px;
  margin-top: 18px;
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-dark);
}
.swipe-hint svg { width: 16px; height: 16px; fill: none; stroke: url(#gold-grad); stroke-width: 2; animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }

/* Deslizador horizontal nativo (celular): servicios e industrias */
.h-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  margin: 0 calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 8px;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.h-slider::-webkit-scrollbar { display: none; }
.h-slider > * { flex: 0 0 84%; max-width: 380px; scroll-snap-align: start; }

/* =========================================================
   1. HERO
   ========================================================= */
.hero { background: var(--color-black); }

/* Fondo decorativo: retícula y líneas doradas, sin foto de fondo */
.hero__decor {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100vh;
  pointer-events: none;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__glow {
  position: absolute;
  width: 70vmax; height: 70vmax;
  right: -25vmax; top: -25vmax;
  background: radial-gradient(circle, rgba(211, 170, 70, .14) 0%, transparent 60%);
  pointer-events: none;
}

/* Dos columnas: texto a la izquierda, foto a la derecha */
.hero__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: center;
  align-content: start;
  min-height: 100vh;
  padding-top: 48px;
  padding-bottom: 36px;
}
.hero__content { max-width: 640px; }
.hero__title {
  font-size: clamp(2.05rem, 8.2vw, 2.7rem);
  font-weight: 600;
  max-width: 18ch;
  letter-spacing: -.01em;
  margin-bottom: 20px;
}
.js .hero__title { visibility: hidden; } /* evita parpadeo antes del SplitText */
.hero__title .line { padding-bottom: .06em; }
.hero__sub { font-size: 1rem; max-width: 54ch; color: var(--muted-dark); margin-bottom: 28px; }

/* Foto enmarcada a la derecha */
.hero__visual {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-bottom: 44px; /* espacio para la mitad de los iconos que sobresale */
}
.hero__frame {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(211, 170, 70, .38);
  background: #050d18;
  box-shadow: 0 34px 70px -38px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(255, 255, 255, .04);
}
.hero__frame::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, .32));
  pointer-events: none;
}
.hero__frame img { width: 100%; height: 100%; object-fit: cover; }
.hero__frame.is-missing::after { inset: 14px 14px auto auto; display: block; padding: 8px 10px; font-size: .58rem; z-index: 2; }

/* Servicios al pie de la foto: mitad dentro, mitad fuera */
.hero__services {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -40px;
  z-index: 3;
}
.hero__services-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin: 0;
  padding: 0;
  scrollbar-width: none;
}
.hero__services-list::-webkit-scrollbar { display: none; }
.hero-service {
  flex: 0 0 136px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 80px;
  padding: 10px 6px;
  text-align: center;
  border-radius: 12px;
  border: 1px solid rgba(211, 170, 70, .3);
  background: linear-gradient(160deg, rgba(9, 31, 60, .92), rgba(0, 0, 0, .88));
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: hero-badge-float 7s ease-in-out infinite;
  animation-delay: calc(var(--i) * -1.1s);
  transition: border-color .5s var(--ease), background .5s var(--ease), box-shadow .5s var(--ease);
}
.hero-service:hover {
  border-color: rgba(211, 170, 70, .64);
  background: linear-gradient(160deg, rgba(15, 46, 82, .96), rgba(0, 0, 0, .9));
  box-shadow: 0 18px 36px -18px rgba(211, 170, 70, .45), inset 0 1px 0 rgba(246, 232, 184, .16);
}
.hero-service__icon {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(211, 170, 70, .45);
  background: radial-gradient(circle at 32% 26%, rgba(211, 170, 70, .24), rgba(9, 31, 60, .4) 70%);
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.hero-service__icon svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: url(#gold-grad);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-service:hover .hero-service__icon {
  transform: scale(1.09);
  border-color: rgba(246, 232, 184, .82);
  box-shadow: 0 0 18px rgba(211, 170, 70, .35);
}
.hero-service__label {
  font-size: .56rem;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.25;
  text-transform: uppercase;
  color: rgba(246, 232, 184, .94);
}
.hero-service--clone { display: flex; }
@keyframes hero-badge-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Párrafo que se rellena con el scroll */
.hero__statement {
  position: relative;
  z-index: 2;
  padding-top: 12vh;
  padding-bottom: 28vh;
}
.fill-text {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.55rem, 4.2vw, 3rem);
  line-height: 1.3;
  max-width: 24ch;
  color: var(--color-white);
}
.fill-text .fill-char { color: rgba(237, 239, 241, .2); }

/* =========================================================
   2. MARQUEE
   ========================================================= */
.trust {
  position: relative;
  background: var(--color-navy);
  padding: 20px 0;
  overflow: hidden;
}
.marquee { overflow: hidden; }
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
  will-change: transform;
}
.trust:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 100vw;
}
.marquee__group li {
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-white);
  padding: 0 26px;
}
.marquee__group li.marquee__sep {
  padding: 0;
  width: 9px; height: 9px;
  transform: rotate(45deg);
  background: var(--gold-gradient);
  background-size: 200% auto;
  animation: gold-shimmer 3s linear infinite;
}
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* =========================================================
   3. PROBLEMA
   ========================================================= */
.problem__grid { display: grid; gap: 20px; }
.problem-card {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 46, 82, .35), rgba(9, 31, 60, .1));
  border: 1px solid rgba(237, 239, 241, .1);
}
.problem-card::before {
  content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 1px;
  background: var(--gold-gradient); background-size: 200% auto;
  animation: gold-shimmer 6s linear infinite;
}
.problem-card .icon { margin-bottom: 22px; }
.problem-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.problem-card p { color: var(--muted-dark); font-size: .95rem; }
.problem__note { margin-top: 28px; font-size: .8rem; color: rgba(237, 239, 241, .55); }

/* =========================================================
   4. SERVICIOS
   Celular: deslizador horizontal. Escritorio: tarjetas apiladas sticky.
   ========================================================= */
.stack {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  margin: 0 calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 8px;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.stack::-webkit-scrollbar { display: none; }
.stack__item { flex: 0 0 84%; max-width: 380px; scroll-snap-align: start; display: flex; }

.service-card {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%;
  border-radius: var(--radius);
  background: var(--color-navy-light);
  border: 1px solid rgba(237, 239, 241, .08);
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
/* Borde gold-gradient: capa con máscara que solo deja ver 1.5px de borde */
.service-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--gold-gradient);
  background-size: 200% auto;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity .5s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.service-card:hover, .service-card:focus-within {
  transform: scale(1.05);
  box-shadow: 0 18px 40px -18px rgba(211, 170, 70, .45);
}
.service-card:hover::before, .service-card:focus-within::before {
  opacity: 1;
  animation: gold-shimmer 3s linear infinite;
}
.service-card__media {
  order: -1;
  aspect-ratio: 4 / 3;
  padding: 14px; /* deja aire entre la imagen y el marco punteado */
}
/* Marco punteado dorado que enmarca la imagen de cada servicio */
.service-card__media::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(211, 170, 70, .55);
  border-radius: 12px;
  pointer-events: none;
  z-index: 2;
}
/* Si la imagen faltara, el aviso ya dibuja su propio marco punteado */
.service-card__media.is-missing::before { display: none; }
.service-card__media img {
  position: relative;
  z-index: 1;
  border-radius: 8px;
}
.service-card__body { padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.service-card__index {
  font-size: .72rem; font-weight: 600; letter-spacing: .16em;
  color: rgba(237, 239, 241, .5);
}
.service-card h3 { font-size: 1.3rem; }
.service-card__lead { color: var(--color-white); font-weight: 500; }
.service-card__body > p:not(.service-card__lead) { color: var(--muted-dark); font-size: .92rem; }
.service-card__link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 10px;
  font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--color-silver);
  text-decoration: none;
}
.service-card__link::after { content: ""; position: absolute; inset: 0; z-index: 3; } /* toda la tarjeta es clicable */
.service-card__link svg {
  width: 16px; height: 16px; fill: none; stroke: url(#gold-grad); stroke-width: 2;
  transition: transform .45s var(--ease);
}
.service-card:hover .service-card__link svg { transform: translateX(4px); }

/* =========================================================
   5. POR QUÉ (claro)
   ========================================================= */
.why__layout { display: grid; gap: 48px; }
.why__grid { display: grid; gap: 36px; }
.why-col {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid rgba(9, 31, 60, .12);
}
.why-col::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 64px; height: 2px;
  background: var(--gold-gradient); background-size: 200% auto;
  animation: gold-shimmer 5s linear infinite;
}
.why-col__num {
  position: absolute; top: 24px; right: 0;
  font-family: var(--font-head); font-size: 2.6rem; line-height: 1;
  color: rgba(9, 31, 60, .1);
}
.why-col .icon { margin-bottom: 18px; stroke-width: 1.6; }
.why-col h3 { font-size: 1.45rem; margin-bottom: 8px; }
.why-col p { color: var(--muted-light); }
.why__media {
  border-radius: var(--radius);
  aspect-ratio: 9 / 11;
  padding: 14px; /* deja aire entre la foto y el marco dorado */
  box-shadow: 0 28px 60px -30px rgba(9, 31, 60, .45);
}
/* Marco dorado de la foto "Por qué", con el mismo lenguaje de las tarjetas de servicios */
.why__media::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(211, 170, 70, .7);
  border-radius: 10px;
  pointer-events: none;
  z-index: 2;
}
.why__media img {
  position: relative;
  z-index: 1;
  border-radius: 8px;
}

/* =========================================================
   6. INDUSTRIAS
   ========================================================= */
.industries__grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  margin: 0 calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 8px;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.industries__grid::-webkit-scrollbar { display: none; }
.industry {
  flex: 0 0 84%; max-width: 380px; scroll-snap-align: start;
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 46, 82, .45), rgba(9, 31, 60, .15));
  border: 1px solid rgba(237, 239, 241, .1);
  overflow: hidden;
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.industry .icon { transition: transform .6s var(--ease); }
.industry__body { padding: 22px 22px 26px; display: grid; gap: 10px; align-content: start; }
.industry .icon { width: 40px; height: 40px; }
.industry h3 { font-size: 1.2rem; }
.industry p { color: var(--muted-dark); font-size: .92rem; }
.industry:hover {
  border-color: rgba(211, 170, 70, .5);
  box-shadow: 0 18px 36px -18px rgba(211, 170, 70, .4);
}
.industry:hover .icon { transform: scale(1.08) rotate(2.5deg); }

/* =========================================================
   7. CASOS DE ÉXITO (Swiper creative)
   ========================================================= */
.cases__inner { position: relative; z-index: 1; }
.cases__slider { max-width: 860px; }
.cases .swiper { overflow: hidden; border-radius: 18px; }
.case-card {
  display: grid;
  gap: 24px;
  padding: 36px 28px;
  border-radius: 18px;
  background: var(--color-navy-light);
  border: 1px solid rgba(211, 170, 70, .28);
  margin: 0;
  cursor: grab;
}
.case-card:active { cursor: grabbing; }
.case-card__quote { width: 40px; height: 40px; fill: none; stroke: url(#gold-grad); stroke-width: 1.4; stroke-linejoin: round; }
.case-card blockquote {
  margin: 0;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  line-height: 1.55;
  color: var(--color-white);
}
.case-card figcaption { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.case-card figcaption > div:last-child { display: grid; gap: 2px; }
.case-card figcaption strong { color: var(--color-white); font-weight: 600; }
.case-card figcaption span { color: var(--muted-dark); font-size: .85rem; }

/* Placa 2:1 para logos de clientes (archivos normalizados a 400x200) */
.case-card__logo {
  position: relative;
  flex-shrink: 0;
  width: 140px; height: 70px;
  border-radius: 10px;
  background: var(--color-white);
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: 0 0 0 1.5px rgba(211, 170, 70, .6);
}
.case-card__logo img { width: 100%; height: 100%; object-fit: contain; }
.case-card__logo.is-missing img { display: none; }
.case-card__logo.is-missing { background: var(--color-black); }
.case-card__logo.is-missing::after {
  content: attr(data-initials);
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
  background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.cases__controls { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
.slider-btn {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--color-navy), var(--color-navy)) padding-box,
    var(--gold-gradient) border-box;
  cursor: pointer;
  transition: transform .45s var(--ease), opacity .3s var(--ease);
}
.slider-btn svg { width: 20px; height: 20px; fill: none; stroke: url(#gold-grad); stroke-width: 2; }
.slider-btn--prev svg { transform: rotate(180deg); }
.slider-btn:hover { transform: scale(1.08); }
.slider-btn.swiper-button-disabled { opacity: .35; cursor: default; transform: none; }
.cases__pagination { display: flex; gap: 8px; width: auto !important; }
.cases__pagination .swiper-pagination-bullet {
  width: 28px; height: 3px; border-radius: 2px; margin: 0 !important;
  background: rgba(237, 239, 241, .3); opacity: 1;
  transition: width .45s var(--ease), background .45s var(--ease);
}
.cases__pagination .swiper-pagination-bullet-active { width: 48px; background: var(--gold-gradient); }

/* =========================================================
   8. SOBRE LA FIRMA (claro)
   ========================================================= */
.about { background: var(--color-silver); }
.about__grid { display: grid; gap: 24px; }
.partner {
  display: grid;
  border-radius: var(--radius);
  background: var(--color-white);
  box-shadow: 0 18px 40px -28px rgba(9, 31, 60, .35);
  overflow: hidden;
}
.partner__photo { aspect-ratio: 1 / 1; }
.partner__photo img { object-position: top; }
.partner__body { padding: 26px 26px 30px; }
.partner h3 { font-size: 1.5rem; }
.partner__role {
  margin: 6px 0 12px;
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #8a6a22;
}
.partner p { color: var(--muted-light); }
.about__cta { margin-top: 40px; }

/* =========================================================
   PREGUNTAS FRECUENTES
   ========================================================= */
.faq__list { display: grid; gap: 12px; }
.faq__item {
  border-radius: var(--radius);
  background: var(--color-navy-light);
  border: 1px solid rgba(237, 239, 241, .08);
  transition: border-color .4s var(--ease);
}
.faq__item[open] { border-color: rgba(211, 170, 70, .45); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 22px 24px;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item h3 { font-size: 1.1rem; line-height: 1.35; }
.faq__item summary svg {
  flex-shrink: 0; width: 22px; height: 22px; fill: none; stroke: url(#gold-grad); stroke-width: 2;
  transition: transform .45s var(--ease);
}
.faq__item[open] summary svg { transform: rotate(45deg); }
.faq__item p { padding: 0 24px 24px; color: var(--muted-dark); }

/* =========================================================
   9. CTA FINAL
   ========================================================= */
.final-cta {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0;
  text-align: center;
}
.final-cta__parallax { position: absolute; inset: -20% 0; pointer-events: none; }
.final-cta__ring {
  position: absolute; left: 50%; top: 50%;
  width: 720px; height: 720px; margin: -360px 0 0 -360px;
  border-radius: 50%;
  padding: 1px;
  background: var(--gold-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: .22;
}
.final-cta__ring--2 { width: 1080px; height: 1080px; margin: -540px 0 0 -540px; opacity: .1; }
.final-cta::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(9, 31, 60, .7), rgba(0, 0, 0, .6) 70%);
}
.final-cta__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.final-cta h2 { font-size: clamp(2.1rem, 6.4vw, 4rem); max-width: 16ch; }
.final-cta .section__lead { margin: 20px auto 40px; }

/* =========================================================
   WHATSAPP FLOTANTE
   ========================================================= */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25D366; color: var(--color-white);
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .6), 0 0 0 2px rgba(211, 170, 70, .55);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08); box-shadow: 0 14px 34px -8px rgba(0, 0, 0, .7), 0 0 0 3px rgba(211, 170, 70, .8); }

/* =========================================================
   Breakpoints (mobile-first)
   ========================================================= */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .problem__grid { grid-template-columns: repeat(2, 1fr); }
  .case-card { padding: 48px 44px; }
  .case-card__logo { width: 168px; height: 84px; }
  .partner { grid-template-columns: 42% 1fr; }
  .partner__photo { aspect-ratio: auto; min-height: 100%; }
}

@media (min-width: 960px) {
  :root { --panel-radius: 36px; }
  .section { padding: 128px 0; }
  .problem__grid { grid-template-columns: repeat(3, 1fr); }
  .swipe-hint { display: none; }

  /* Hero en dos columnas: texto a la izquierda, foto a la derecha */
  .hero__layout {
    grid-template-columns: 1fr 1.12fr;
    gap: clamp(40px, 4vw, 64px);
    align-content: center;
    padding-top: 120px;
    padding-bottom: 108px;
  }
  .hero__content { max-width: none; }
  .hero__title {
    font-size: clamp(2.4rem, 3.6vw, 3.55rem);
    max-width: 16ch;
    margin-bottom: 24px;
  }
  .hero__sub { font-size: clamp(1rem, 1.15vw, 1.12rem); margin-bottom: 34px; }
  .hero__visual { margin-bottom: 52px; }
  .hero__services { bottom: -46px; }
  .hero__services-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }
  .hero-service { flex: none; min-height: 92px; }
  .hero-service--clone { display: none; }
  .hero-service__icon { width: 34px; height: 34px; }
  .hero-service__icon svg { width: 18px; height: 18px; }
  .hero-service__label { font-size: .58rem; }

  /* Servicios: tarjetas apiladas sticky (Webisoft: cada una asoma 64px sobre la anterior) */
  .stack {
    display: block;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .stack__item {
    position: sticky;
    top: calc(var(--stack-top) + var(--i) * var(--stack-step));
    max-width: none;
    margin-bottom: 28px;
  }
  .stack__item:last-child { margin-bottom: 0; }
  .services { padding-bottom: 56px; } /* lo usa setStackStep() en script.js */
  .service-card {
    flex-direction: row;
    min-height: 380px;
    box-shadow: 0 -18px 40px -24px rgba(0, 0, 0, .8);
  }
  .service-card:hover, .service-card:focus-within { transform: scale(1.02); }
  .service-card__media { order: 0; width: 40%; aspect-ratio: auto; flex-shrink: 0; }
  .service-card__body {
    display: grid;
    grid-template-columns: 90px 1fr;
    grid-auto-rows: min-content;
    column-gap: 16px;
    row-gap: 12px;
    padding: 16px 40px 36px 32px;
  }
  .service-card__body > * { grid-column: 2; }
  /* franja superior visible cuando la tarjeta queda tapada: índice + título */
  .service-card__index { grid-column: 1; grid-row: 1; align-self: center; font-size: .8rem; }
  .service-card h3 { grid-row: 1; font-size: 1.6rem; min-height: 28px; display: flex; align-items: center; }
  .service-card .icon { grid-column: 1; grid-row: 2 / span 2; margin-top: 6px; }
  .service-card__lead { font-size: 1.1rem; margin-top: 8px; }
  .service-card__body > p:not(.service-card__lead) { font-size: 1rem; max-width: 52ch; }

  .why__layout { grid-template-columns: 1.25fr .9fr; align-items: center; gap: 72px; }
  .why__grid { gap: 32px; }

  .industries__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .industry { max-width: none; }

  .about__grid { grid-template-columns: repeat(2, 1fr); }
  .partner { grid-template-columns: 40% 1fr; }

  .faq__layout { display: grid; grid-template-columns: .9fr 1.3fr; gap: 64px; align-items: start; }
}

/* =========================================================
   Movimiento reducido
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .marquee__track { animation: none; }
  .fill-text .fill-char { color: inherit; }
}
