/* ============================================
   RSUNION® — Design System & Global Styles
   ============================================ */

/* PolySans — usada para títulos (display) */
@font-face {
  font-family: 'PolySans';
  src: url('../fonts/POLYSANS/PolySans-Slim.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PolySans';
  src: url('../fonts/POLYSANS/PolySans-Neutral.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PolySans';
  src: url('../fonts/POLYSANS/PolySans-Neutral.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PolySans';
  src: url('../fonts/POLYSANS/PolySans-NeutralItalic.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'PolySans';
  src: url('../fonts/POLYSANS/PolySans-Median.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PolySans';
  src: url('../fonts/POLYSANS/PolySans-Bulky.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ── Monochrome scale (pure B&W brand) ── */
  --bg-primary: #0A0A0A;       /* near-black — dark sections */
  --bg-secondary: #FFFFFF;     /* white — light sections */
  --bg-secondary-alt: #F4F4F4; /* faint neutral grey — alternating light sections */
  --bg-tertiary: #111111;      /* elevated dark */
  --bg-elevated: #161616;

  --text-primary-dark: #FFFFFF;
  --text-secondary-dark: #A3A3A3;
  --text-muted-dark: #6B6B6B;

  --text-primary-light: #0A0A0A;
  --text-secondary-light: #5C5C5C;
  --text-muted-light: #9A9A9A;

  /* Contextual "ink" — the old accent, now monochrome.
     Defaults to dark ink (for light surfaces); flipped to white
     inside .section--dark / .section--elevated / footer / etc. */
  --accent: #0A0A0A;
  --accent-contrast: #FFFFFF;
  --accent-soft: rgba(10, 10, 10, 0.62);
  --accent-glow: rgba(255, 255, 255, 0.16);

  /* Card surfaces (monochrome, contextual via section) */
  --card-bg: #FFFFFF;
  --card-border: rgba(10, 10, 10, 0.12);
  --card-border-hover: rgba(10, 10, 10, 0.34);

  --border-dark: rgba(255, 255, 255, 0.10);
  --border-light: rgba(10, 10, 10, 0.10);

  --font-display: 'PolySans', 'Space Grotesk', 'Helvetica Neue', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, monospace;

  --container-max: 1200px;
  --section-padding-y: clamp(64px, 8vw, 120px);
  --section-padding-x: clamp(24px, 4vw, 64px);

  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark surfaces flip the contextual ink + card tokens to their light variants */
.section--dark,
.section--elevated,
.footer,
.case-hero,
.case-metrics,
#home-main.is-dark {
  --accent: #FFFFFF;
  --accent-contrast: #0A0A0A;
  --accent-soft: rgba(255, 255, 255, 0.62);
  --card-bg: #0E0E0E;
  --card-border: rgba(255, 255, 255, 0.14);
  --card-border-hover: rgba(255, 255, 255, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Offset para anclas (#contact-form, #areas, etc.): la topnav es fixed (~70px),
     así que dejamos margen para que el destino no quede tapado por la barra. */
  scroll-padding-top: 90px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary-light);
  background: var(--bg-secondary);
  overflow-x: hidden;
}

/* Lenis smooth scroll — hoja oficial v1.1.20 (requerida por la librería) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

a { color: inherit; text-decoration: none; }

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

::selection { background: #0A0A0A; color: #FFFFFF; }

/* Visible keyboard focus (monochrome, contrast-adaptive via currentColor) */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}
/* Pointer users don't get the ring; keyboard users always do */
:focus:not(:focus-visible) { outline: none; }

/* Skip link — visible solo al enfocar con teclado */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10001;
  background: #0a0a0a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out-quint);
}
.skip-link:focus { transform: translateY(0); }

/* Solo para lectores de pantalla (mantiene jerarquía semántica sin afectar el diseño) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); letter-spacing: -0.01em; }

/* Logo SVG con mask — recoloreable vía currentColor */
.brand-logo {
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('../img/rsunion-logo.svg') no-repeat center / contain;
          mask: url('../img/rsunion-logo.svg') no-repeat center / contain;
  aspect-ratio: 404 / 44.4;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
}

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
}

.section--dark { background: var(--bg-primary); color: var(--text-primary-dark); }
.section--light {
  /* Textura grid en TODOS los fondos claros del sitio (todas las páginas).
     El hero (#home-main) no usa .section--light, así que queda excluido. */
  background-color: var(--bg-secondary);
  background-image:
    linear-gradient(to right, rgba(10, 10, 10, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 10, 10, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--text-primary-light);
  /* Resetea el contexto a CLARO aunque el <body> sea oscuro: así eyebrows,
     acentos y cards dentro de una sección clara renderizan en negro, no en blanco. */
  --accent: #0a0a0a;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(10, 10, 10, 0.62);
  --card-bg: #ffffff;
  --card-border: rgba(10, 10, 10, 0.12);
  --card-border-hover: rgba(10, 10, 10, 0.34);
}
.section--elevated { background: var(--bg-tertiary); color: var(--text-primary-dark); }

/* ============================================
   PHASE 1 — INTRO SEQUENCE
   ============================================ */

#intro {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: clamp(1500px, 200vmax, 2400px);
  perspective-origin: 50% 50%;
}

/* Escenario 3D que contiene los slides del cilindro horizontal.
   GSAP rota este contenedor sobre eje X; los slides hijos están enrollados
   alrededor de su superficie via --i (índice) y --radius. */
.intro-stage {
  --slide-count: 5;
  /* Radio responsive: en móvil el cilindro es más pequeño para que la
     magnificación 3D no desborde el texto fuera del viewport.
     vmin escala por el lado menor, ideal para portrait vs landscape. */
  --radius: clamp(120px, 32vmin, 480px);
  --angle-step: calc(360deg / var(--slide-count));
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 50% 0;
  pointer-events: none;
}

#intro::before {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, 0.10), transparent 52%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 255, 255, 0.05), transparent 55%);
  animation: introGradientShift 20s ease-in-out infinite alternate;
  opacity: 0.7;
  pointer-events: none;
}

/* Vignette vertical: oculta los slides vecinos del cilindro que se asoman
   arriba y abajo. Solo el slide central queda totalmente visible. */
#intro::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    #000 0%,
    #000 28%,
    transparent 42%,
    transparent 58%,
    #000 72%,
    #000 100%
  );
  pointer-events: none;
  z-index: 2;
}

@keyframes introGradientShift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-2%, 3%) rotate(2deg); }
}

/* Slides en caras del cilindro 3D — GSAP maneja rotationX, translateZ y opacity */
/* Slides enrollados en la superficie del cilindro.
   Orden de transform crítico: rotateX primero, translateZ después
   (mueve a la superficie en la dirección Z del sistema ya rotado). */
.intro-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(36px, 8vw, 72px);
  backface-visibility: hidden;
  transform-origin: 50% 50%;
  transform: rotateX(calc(var(--i, 0) * var(--angle-step) * -1)) translateZ(var(--radius));
}

.intro-headline {
  font-family: var(--font-display);
  font-weight: 400; /* PolySans-Neutral */
  font-size: clamp(16px, 2.9vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: min(960px, 80vw);
  margin-bottom: clamp(12px, 2vw, 20px);
  text-wrap: balance;
}
/* Palabras clave dentro del headline → PolySans-Bulky */
.intro-headline strong {
  font-weight: 800;
  font-style: normal;
}

.intro-subtext {
  font-family: var(--font-display);
  font-weight: 300; /* PolySans-Slim */
  font-size: clamp(11px, 1vw, 14px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  max-width: min(440px, 75vw);
}

#intro-skip {
  position: fixed;
  bottom: 24px;
  right: 24px;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
  z-index: 10000;
  min-height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  transition: color 200ms ease;
}
#intro-skip:hover { color: #fff; }

/* Botón "Siguiente" — anillo circular que se rellena conforme corre el tiempo
   hasta el próximo slide (sincronizado con el auto-avance por JS). Un clic adelanta.
   Más expresivo que el "Saltar intro", que queda como texto discreto a la derecha. */
#intro-next {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 10000;
  -webkit-tap-highlight-color: transparent;
  transition: background 200ms ease, transform 150ms ease;
}
#intro-next:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(-50%) scale(1.07);
}
#intro-next:active { transform: translateX(-50%) scale(0.93); }
#intro-next:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}
/* SVG del anillo ocupa todo el botón; lo giramos -90° para que arranque arriba. */
#intro-next .intro-next__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
#intro-next .intro-next__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 2;
}
#intro-next .intro-next__fill {
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  /* GSAP anima stroke-dashoffset; este es el estado "vacío" por defecto. */
  stroke-dasharray: 131.95;
  stroke-dashoffset: 131.95;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}
#intro-next .intro-next__arrow {
  font-size: 18px;
  line-height: 1;
  color: #fff;
  transition: transform 150ms ease;
}
#intro-next:hover .intro-next__arrow { transform: translateX(2px); }
/* Oculto en el finale (la loadbar ya marca el progreso de cierre). */
#intro-next.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.8);
}
@media (prefers-reduced-motion: reduce) {
  #intro-next .intro-next__fill { filter: none; }
}

#intro-finale {
  /* Hereda layout y transforms 3D de .intro-slide; opacity la maneja GSAP.
     La clase .active solo dispara las animaciones internas (logo scale, loadbar). */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.intro-logo {
  color: #fff;
  transform: scale(0.8);
  transition: transform 600ms var(--ease-out-quart);
}
.intro-logo.brand-logo { height: clamp(20px, 3.4vw, 38px); width: auto; }
#intro-finale.active .intro-logo { transform: scale(1); }

.intro-loadbar {
  width: clamp(180px, 22vw, 280px);
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  margin-top: 32px;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.intro-loadbar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(255,255,255,0.55), #fff);
  border-radius: 2px;
}
#intro-finale.active .intro-loadbar::after {
  animation: introLoad 2500ms var(--ease-in-out-quart) forwards;
}
@keyframes introLoad { to { width: 100%; } }

#intro.wipe-up {
  animation: introWipeUp 600ms var(--ease-in-out-quart) forwards;
}
@keyframes introWipeUp {
  to { transform: translateY(-100%); }
}

/* ============================================
   PHASE 2 — HOME MAIN SCREEN
   ============================================ */

#home-main {
  /* Container más ancho SOLO en el hero: redefinir el token aquí hace que
     header, statement, footer y el ancla derecha del menú usen el mismo valor
     por herencia, sin afectar al resto del sitio (que sigue en 1200px).
     Resultado: el título se corre más a la izquierda y el menú más a la derecha. */
  --container-max: 1440px;
  min-height: 100vh;
  min-height: 100dvh; /* en móvil evita que la barra de direcciones recorte el footer */
  height: 100vh;
  height: 100dvh;
  background: var(--bg-secondary);
  padding: clamp(24px, 4vw, 48px);
  position: relative;
  display: flex;
  flex-direction: column;
}
/* En móvil el contenido del hero puede superar la altura del viewport (claim grande +
   secundario + footer). Liberamos la altura fija para que crezca sin recortar. */
@media (max-width: 768px) {
  #home-main { height: auto; min-height: 100dvh; }
}

.home-main__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

.home-logo {
  color: #111;
}
.home-logo.brand-logo { height: clamp(18px, 1.6vw, 22px); width: auto; }

.home-nav-directory {
  position: absolute;
  top: clamp(24px, 4vw, 48px);
  /* alineado al borde derecho del container centrado (no al borde del viewport) */
  right: max(clamp(24px, 4vw, 48px), calc((100% - var(--container-max)) / 2));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(3px, 0.3vw, 5px);
  z-index: 2;
  /* El contenedor es una columna alta sobre la mitad derecha del hero. Si
     capturara clics tapaba el statement; con pointer-events:none los huecos
     dejan pasar el cursor y solo los <a> (auto, abajo) reciben el click. */
  pointer-events: none;
}
/* Links tipográficos del hero — PolySans, caja normal, flecha + subrayado al hover */
.home-nav-directory a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500; /* PolySans-Median — carácter del hero */
  font-size: clamp(15px, 1.15vw, 19px);
  letter-spacing: -0.01em;
  color: #0a0a0a;
  padding: 5px 0;
  position: relative;
  pointer-events: auto; /* el único elemento clicable del directorio */
  transition: transform 260ms var(--ease-out-quint);
}
/* Flecha que entra deslizando al hover (reserva su espacio para no saltar el layout) */
.home-nav-directory a::after {
  content: '↗';
  font-family: var(--font-body);
  font-size: 0.78em;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 240ms ease, transform 260ms var(--ease-out-quint);
}
/* Subrayado que se dibuja desde la derecha */
.home-nav-directory a::before {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  width: 0;
  background: #0a0a0a;
  transition: width 300ms var(--ease-out-quint);
}
.home-nav-directory a:hover { transform: translateX(-5px); }
.home-nav-directory a:hover::after { opacity: 1; transform: translateX(0); }
.home-nav-directory a:hover::before { width: 100%; }

.home-main__statement {
  flex: 1;
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-statement-text {
  font-family: var(--font-display);
  font-weight: 300; /* PolySans-Slim */
  font-size: clamp(30px, 4.8vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: #0a0a0a;
  text-transform: uppercase;
}
/* Rematador: las últimas líneas más pequeñas → ritmo "claim grande → cierre filoso" */
.home-statement-text .line--sm { font-size: 0.52em; letter-spacing: -0.02em; }
.home-statement-text .line--sm--first { margin-top: 0.55em; }
/* Palabras clave dentro del statement → PolySans-Bulky (contraste fuerte) */
.home-statement-text strong {
  font-weight: 800;
  font-style: normal;
}
.home-statement-text .line {
  display: block;
  overflow: hidden;
}
.home-statement-text .line span {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  animation: lineUp 700ms var(--ease-out-quart) forwards;
}
.home-statement-text .line:nth-child(1) span { animation-delay: 100ms; }
.home-statement-text .line:nth-child(2) span { animation-delay: 200ms; }
.home-statement-text .line:nth-child(3) span { animation-delay: 300ms; }
.home-statement-text .line:nth-child(4) span { animation-delay: 400ms; }
.home-statement-text .line:nth-child(5) span { animation-delay: 500ms; }
@keyframes lineUp {
  to { transform: translateY(0); opacity: 1; }
}

.home-statement-secondary {
  margin-top: clamp(24px, 3vw, 40px);
  max-width: 700px;
  font-family: var(--font-display);
  font-weight: 300; /* PolySans-Slim */
  font-size: clamp(14px, 1.1vw, 18px);
  color: #666;
  line-height: 1.6;
  opacity: 0;
  animation: fadeIn 600ms 800ms ease forwards;
}

.home-main__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  max-width: var(--container-max);
  margin: 48px auto 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #111;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 600ms 1000ms ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .home-nav-directory { display: none; }
  #hamburger { display: flex !important; }
  .home-statement-text { font-size: clamp(30px, 8.6vw, 48px); letter-spacing: -0.03em; }
  .home-main__footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* El header ya no compite con el directorio (oculto): logo a la izq, hamburguesa a la der */
  .home-main__header { align-items: center; }
  /* Título + subtítulo centrados verticalmente en el hero (más abajo). */
  .home-main__statement { justify-content: center; }
  /* Líneas del fondo estáticas y empujadas hacia ABAJO en móvil. */
  .bg-paths svg { animation: none; transform: translateY(60%); }
}
@media (max-width: 480px) {
  /* A 375px el statement con letter-spacing negativo aún puede rozar el borde:
     bajamos un punto el máximo y suavizamos el tracking para evitar overflow. */
  .home-statement-text { font-size: clamp(26px, 8.4vw, 40px); letter-spacing: -0.02em; }
  /* El claim "rematador" no debe encogerse tanto que se pierda */
  .home-statement-text .line--sm { font-size: 0.6em; }
  .home-main__footer { font-size: 10px; letter-spacing: 0.12em; }
}

/* ============================================
   HERO — BACKGROUND PATHS (líneas fluidas B&N)
   ============================================ */

#home-main { overflow: hidden; }
/* Todo el contenido del hero por encima de las líneas */
#home-main > *:not(.bg-paths) { position: relative; z-index: 1; }
/* El header crea su propio stacking context al recibir z-index:1 de la regla de
   arriba, lo que ENCERRABA el z-index:2 del menú dentro de él. Como el statement
   viene después en el DOM con el mismo z-index:1, se pintaba encima del menú y
   robaba los clics. Lo elevamos por encima del statement para devolver el click. */
#home-main > .home-main__header { z-index: 6; }

.bg-paths {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  color: #0a0a0a; /* las líneas heredan este color vía currentColor */
}
.bg-paths svg {
  width: 100%;
  height: 100%;
  display: block;
  /* Origen en la esquina inferior izquierda: al escalar, el abanico crece hacia
     ARRIBA (arranca cerca de media pantalla) y su punta queda clavada en la
     esquina, en lugar de encogerse abajo. */
  transform-origin: 0% 100%;
  /* UNA sola capa animada por transform (compositor/GPU) — barato.
     NO animamos cada path: animar stroke-dashoffset en 22 curvas repinta
     cada frame y mata el rendimiento. Las líneas son estáticas y el conjunto
     deriva suavemente. */
  animation: pathsDrift 38s ease-in-out infinite alternate;
  will-change: transform;
}
.bg-paths path {
  fill: none;
  stroke: currentColor;
  vector-effect: non-scaling-stroke;
  opacity: var(--op, 0.12);
}
@keyframes pathsDrift {
  from { transform: translate3d(0, 0, 0) scale(1.6); }
  to   { transform: translate3d(-1.8%, 1.2%, 0) scale(1.72); }
}

/* En superficies oscuras (si se reutiliza) las líneas son blancas */
.section--dark .bg-paths,
.section--elevated .bg-paths { color: #ffffff; }

@media (prefers-reduced-motion: reduce) {
  .bg-paths svg { animation: none; transform: none; }
}

/* ============================================
   HAMBURGER + MOBILE MENU
   ============================================ */

#hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
#hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform 300ms ease, opacity 200ms ease;
}
#hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#hamburger.open span:nth-child(2) { opacity: 0; }
#hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

#mobile-menu {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  /* Por encima de todo (topnav 100, scroll-progress 200) salvo la intro del home.
     Antes 150 → la barra de progreso (200) se pintaba sobre el menú. */
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms var(--ease-out-quint);
}
#mobile-menu.open { opacity: 1; pointer-events: auto; }
/* Botón de cierre (X) inyectado por JS — esquina superior derecha del overlay.
   Hereda la opacidad/pointer-events del overlay (solo activo cuando .open). */
.mobile-menu__close {
  position: absolute;
  top: clamp(18px, 4vw, 32px);
  right: clamp(18px, 4vw, 32px);
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 2;
}
.mobile-menu__close span {
  position: absolute;
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}
.mobile-menu__close span:first-child { transform: rotate(45deg); }
.mobile-menu__close span:last-child { transform: rotate(-45deg); }
#mobile-menu a {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  /* Entrada escalonada de los enlaces al abrir */
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms var(--ease-out-quint), transform 420ms var(--ease-out-quint);
}
#mobile-menu.open a { opacity: 1; transform: translateY(0); }
#mobile-menu.open a:nth-child(1) { transition-delay: 0.10s; }
#mobile-menu.open a:nth-child(2) { transition-delay: 0.16s; }
#mobile-menu.open a:nth-child(3) { transition-delay: 0.22s; }
#mobile-menu.open a:nth-child(4) { transition-delay: 0.28s; }
#mobile-menu.open a:nth-child(5) { transition-delay: 0.34s; }
#mobile-menu.open a:nth-child(6) { transition-delay: 0.40s; }
#mobile-menu .cta {
  margin-top: 24px;
  background: #fff;
  color: #0a0a0a;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
}

/* ============================================
   INNER PAGE NAV BAR
   ============================================ */

.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px clamp(24px, 4vw, 56px);
  background: #0a0a0a; /* full negro sólido — idéntico en todas las páginas */
  border-bottom: 1px solid var(--border-dark);
  color: #fff;
  transition: padding 300ms ease;
}
.topnav.light {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border-light);
  color: #111;
}
.topnav__logo.brand-logo { height: 19px; width: auto; flex-shrink: 0; }

/* Links CENTRADOS — posición absoluta para no desplazar logo ni CTA */
.topnav__links {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 40px);
}
.topnav__links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  position: relative;
  padding: 6px 2px;
  opacity: 0.82;
  transition: opacity 200ms ease;
}
.topnav__links a:hover { opacity: 1; }
.topnav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 0;
  background: currentColor;
  transition: width 250ms var(--ease-out-quint);
}
.topnav__links a:hover::after { width: 100%; }

/* CTA empujado a la derecha (los links están fuera de flujo) — más grande y con aire */
.topnav__cta {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #0a0a0a !important;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 220ms var(--ease-out-quint), background 220ms ease, box-shadow 260ms var(--ease-out-quint);
}
.topnav__cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,0.30); }
.topnav__cta:active { transform: translateY(0) scale(0.97); }
.topnav__cta::after { display: none !important; }
.topnav.light .topnav__cta { background: #0a0a0a; color: #fff !important; }
.topnav.light .topnav__cta:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.28); }

/* Hamburguesa dentro del topnav (oculta en desktop) */
.topnav #hamburger { display: none; flex-shrink: 0; }
/* El topnav SIEMPRE es negro → las barras de la hamburguesa van en BLANCO sí o sí
   (no dependemos de currentColor heredado, que en algún contexto salía oscuro). */
.topnav #hamburger span { background: #fff; }

@media (max-width: 1024px) {
  .topnav__links { display: none; }       /* en pantallas medianas, nav por hamburguesa */
  .topnav #hamburger { display: flex; }
}
@media (max-width: 600px) {
  .topnav__cta { display: none; }          /* en móvil chico, solo logo + hamburguesa */
  /* Sin el CTA (que tenía margin-left:auto) la hamburguesa quedaba pegada al logo;
     se la damos a ella para empujarla al extremo derecho, donde el usuario la busca. */
  .topnav #hamburger { margin-left: auto; }
}
@media (max-width: 480px) {
  /* Padding lateral más ajustado y el logo un punto menor: logo + hamburguesa
     conviven holgados a 375px sin desbordar la barra fija. */
  .topnav { padding-left: 18px; padding-right: 18px; gap: 12px; }
  .topnav__logo.brand-logo { height: 17px; }
}

/* ============================================
   SCROLL PROGRESS
   ============================================ */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: #6b6b6b; /* gris medio: visible sobre fondos claros y oscuros, sin blend (perf) */
  z-index: 200;
  width: 0%;
  transition: width 100ms linear;
}

/* ============================================
   BACK TO TOP
   ============================================ */

#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  backdrop-filter: blur(10px);
  transition: transform 200ms ease;
}
#back-to-top.visible { display: flex; }
#back-to-top:hover { transform: scale(1.1); }

/* ============================================
   COOKIE BANNER
   ============================================ */

#cookies {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 480px;
  background: #0a0a0a;
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  gap: 16px;
  align-items: center;
  z-index: 95;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  font-size: 14px;
  /* Oculto por defecto (fuera de vista) → la entrada se anima al añadir .is-visible */
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity 350ms var(--ease-out-quint), transform 350ms var(--ease-out-quint);
}
#cookies button {
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
#cookies button.accept { background: #fff; color: #000; }
#cookies button.reject { background: transparent; color: #fff; border: 1px solid #444; }
#cookies.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

@media (max-width: 600px) {
  /* En móvil el banner ocupa casi todo el ancho: apilamos texto y botones para que
     los botones (≥44px de alto efectivo) no se aplasten ni se salgan. */
  #cookies { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  #cookies button { width: 100%; padding: 12px 16px; min-height: 44px; }
  /* El botón "volver arriba" comparte esquina con el banner; lo elevamos por encima
     y aseguramos que quede sobre él (el banner es z-index 95). */
  #back-to-top { bottom: 96px; z-index: 96; }
}

/* ============================================
   CREDIBILITY BAR (MARQUEE)
   ============================================ */

.marquee {
  overflow: hidden;
  background: #111;
  padding: 32px 0;
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
}
.marquee__track {
  display: flex;
  gap: 80px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee__item {
  height: clamp(22px, 2.8vw, 40px);
  width: auto;
  object-fit: contain;
  /* Convierte logos de cualquier color a blanco sobre fondo oscuro */
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: opacity 300ms ease;
  flex-shrink: 0;
}
.marquee__item:hover { opacity: 1; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============================================
   ÁREAS GRID
   ============================================ */

/* Bento: 3 columnas con flujo denso para alturas/anchos variables */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* Filas de altura FIJA: imprescindible para que las cards con span (tall/wide)
     se alineen con las normales. Con 'auto' las filas no cuadran entre columnas.
     280px deja aire de sobra al contenido más largo (títulos 2 líneas + 3 de sub). */
  grid-auto-rows: 280px;
  grid-auto-flow: dense;
  gap: clamp(12px, 1.4vw, 20px);
}

.area-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(24px, 2vw, 34px);
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  cursor: pointer;
  transition: transform 600ms var(--ease-out-expo),
              border-color 700ms var(--ease-out-expo),
              box-shadow 600ms var(--ease-out-expo);
}
/* Atmósfera: orbe suave de luz (profundidad estilo Coinflect) */
.area-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(72% 70% at 88% 8%, rgba(255,255,255,0.10), transparent 56%),
    radial-gradient(60% 65% at 6% 100%, rgba(255,255,255,0.05), transparent 60%);
  opacity: 0.9;
  transition: opacity 600ms ease, transform 900ms var(--ease-out-expo);
}
.area-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
  box-shadow: 0 24px 50px rgba(0,0,0,0.38);
}
.area-card:hover::before { opacity: 1; transform: scale(1.07); }

.area-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.area-card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  width: 42px;
  height: 42px;
  border: 1px solid var(--card-border-hover);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.area-card__arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--accent);
  transition: transform 600ms var(--ease-out-expo), background 500ms ease, color 500ms ease, border-color 500ms ease;
}
.area-card:hover .area-card__arrow {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
  transform: translate(3px, -3px);
}
.area-card__title {
  font-family: var(--font-display);
  font-weight: 600; /* PolySans-Median */
  font-size: clamp(20px, 1.7vw, 27px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.area-card__sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--accent-soft);
  max-width: 94%;
}

/* Tamaños bento */
.area-card--tall { grid-row: span 2; }
.area-card--wide { grid-column: span 2; }

/* Variante destacada: invertida a blanco (como la card blanca de la referencia) */
.area-card--feature {
  background: #fff;
  border-color: #fff;
  color: #0a0a0a;
}
.area-card--feature::before { display: none; } /* blanca lisa, sin gradiente */
.area-card--feature .area-card__num { color: #0a0a0a; border-color: rgba(0,0,0,0.22); }
.area-card--feature .area-card__arrow { color: #0a0a0a; border-color: rgba(0,0,0,0.18); }
.area-card--feature:hover .area-card__arrow { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.area-card--feature .area-card__sub { color: #565656; }
.area-card--feature:hover { box-shadow: 0 26px 60px rgba(0,0,0,0.18); }

@media (max-width: 1100px) {
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .area-card--wide { grid-column: span 2; }
}
@media (max-width: 720px) {
  .areas-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .area-card { min-height: 200px; }
  .area-card--tall, .area-card--wide { grid-row: auto; grid-column: auto; }
}

/* ============================================
   METHODOLOGY CARDS
   ============================================ */

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.method-card {
  position: relative;
  background: var(--card-bg);
  padding: clamp(28px, 3vw, 40px);
  border-radius: 22px;
  border: 1.5px solid var(--card-border);
  transition: transform 550ms var(--ease-out-expo), box-shadow 550ms var(--ease-out-expo), border-color 700ms var(--ease-out-expo);
}
.method-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
  box-shadow: 0 22px 50px rgba(0,0,0,0.08);
}
.method-card__num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.1em;
}
.method-card__title {
  font-family: var(--font-display);
  font-weight: 600; /* PolySans-Median */
  font-size: clamp(20px, 1.8vw, 28px);
  margin-bottom: 12px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.method-card__body {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}
/* method-card sobre secciones oscuras → cuerpo en gris claro legible */
.section--dark .method-card__body,
.section--elevated .method-card__body { color: rgba(255,255,255,0.72); }

/* En secciones claras: gradiente blanco→gris + borde casi invisible + sombra suave
   (la card "flota", se ve premium en vez de caja con borde marcado) */
.section--light .method-card:not(.method-card--dark) {
  background: #ffffff; /* blanca lisa, sin gradiente */
  border-color: transparent; /* sin borde, solo sombra */
  /* Sombra suave estilo Apple — envuelve todos los ángulos pero sutil */
  box-shadow:
    0 0 22px rgba(0, 0, 0, 0.03),
    0 4px 10px rgba(0, 0, 0, 0.035),
    0 14px 34px rgba(0, 0, 0, 0.07);
}
.section--light .method-card:not(.method-card--dark):hover {
  border-color: transparent;
  box-shadow:
    0 0 26px rgba(0, 0, 0, 0.04),
    0 6px 14px rgba(0, 0, 0, 0.045),
    0 20px 46px rgba(0, 0, 0, 0.10);
}
/* Variante OSCURA (cards 03/04) — misma atmósfera que las cards de áreas */
.section--light .method-card--dark {
  background:
    radial-gradient(72% 70% at 88% 8%, rgba(255,255,255,0.10), transparent 56%),
    radial-gradient(60% 65% at 6% 100%, rgba(255,255,255,0.05), transparent 60%),
    #0e0e0e;
  border-color: rgba(255,255,255,0.16);
  color: #fff;
  --accent: #fff;
  --accent-soft: rgba(255,255,255,0.62);
  --card-border-hover: rgba(255,255,255,0.45);
  box-shadow:
    0 0 24px rgba(0, 0, 0, 0.06),
    0 14px 34px rgba(0, 0, 0, 0.12);
}
.section--light .method-card--dark:hover {
  box-shadow:
    0 0 28px rgba(0, 0, 0, 0.08),
    0 20px 46px rgba(0, 0, 0, 0.16);
}
.section--light .method-card--dark .method-card__body { color: rgba(255,255,255,0.72); }

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

/* ============================================
   PAQUETES (TIERS)
   ============================================ */

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tier-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 22px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 550ms var(--ease-out-expo), box-shadow 550ms var(--ease-out-expo), border-color 700ms var(--ease-out-expo);
}
.tier-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 18px 50px rgba(0,0,0,0.45);
}
.tier-card__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
}
.tier-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.tier-card__desc {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
}
.tier-card__price {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-dark);
}
.tier-card__price-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3vw, 40px);
  color: #fff;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.tier-card__price-unit {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
}

.tier-card--1 { --tier-accent: rgba(255,255,255,0.4); }
.tier-card--2 { --tier-accent: rgba(255,255,255,0.6); }
.tier-card--3 { --tier-accent: #fff; border-color: var(--accent); }

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

/* ============================================
   PAQUETE HONORARIOS — columna izquierda sticky mientras
   la columna derecha (tier cards) sigue scroll vertical
   ============================================ */

.paq-split__left {
  position: sticky;
  top: 0;
  align-self: start;
  padding-top: clamp(20px, 4vw, 80px);
}

@media (max-width: 900px) {
  .paq-split__left { position: static; }
}

/* ============================================
   PRICING TABLE (Servicios page)
   ============================================ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pricing-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 40px 32px;
}
.pricing-card--featured {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
  transform: scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.pricing-card__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.pricing-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.pricing-card__price {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 52px;
  letter-spacing: -0.04em;
  margin: 16px 0 4px;
  font-variant-numeric: tabular-nums;
}
.pricing-card__price-unit {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0.6;
  letter-spacing: 0.05em;
}
.pricing-card__features {
  list-style: none;
  margin-top: 32px;
}
.pricing-card__features li {
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  gap: 10px;
}
.pricing-card--featured .pricing-card__features li {
  border-top-color: rgba(255,255,255,0.1);
}
.pricing-card__features li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
/* La card destacada es oscura: invertimos sus detalles a blanco */
.pricing-card--featured .pricing-card__badge { background: #fff; color: #0a0a0a; }
.pricing-card--featured .pricing-card__features li::before { color: #fff; }

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card--featured { transform: none; }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 17px 30px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border-radius: 999px;
  transition: transform 220ms var(--ease-out-quint), background 220ms ease, box-shadow 280ms var(--ease-out-quint), color 200ms ease, border-color 200ms ease;
  min-height: 50px;
  letter-spacing: -0.01em;
}
/* Feedback de press para todos los botones */
.btn:active { transform: scale(0.97); }
/* Primary = the contextual ink (black on light surfaces, white on dark),
   text uses its contrast token. Pure monochrome, inverts by section. */
.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
  transition: transform 200ms var(--ease-out-quint), box-shadow 250ms ease, opacity 200ms ease;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.section--dark .btn--primary:hover,
.section--elevated .btn--primary:hover {
  box-shadow: 0 10px 34px rgba(255,255,255,0.18);
}
.btn--primary:active { transform: translateY(0) scale(0.98); }
.btn--white { background: #fff; color: #0a0a0a; }
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,255,255,0.2); }
.btn--dark { background: #0a0a0a; color: #fff; }
.btn--dark:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.18); }
.btn--ghost { background: transparent; border: 1px solid currentColor; transition: background 200ms ease, color 200ms ease, transform 200ms var(--ease-out-quint); }
.btn--ghost:hover { background: var(--accent); color: var(--accent-contrast); transform: translateY(-2px); }
.btn--large { padding: 20px 36px; font-size: 17px; min-height: 56px; }

/* En móvil, todos los CTAs centrados (excepto el de la barra de navegación).
   display:flex + width:fit-content + margin auto centra el botón inline-flex
   dentro de su contenedor. Los botones con width:100% inline (submit del form,
   .alt-cta) ganan por inline/especificidad y se quedan a todo el ancho. */
@media (max-width: 768px) {
  .btn:not(.topnav__cta) {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-header__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-header__title {
  font-family: var(--font-display);
  font-weight: 600; /* PolySans-Median — corte real más robusto, más presencia */
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 820px;
  margin-bottom: 16px;
  text-wrap: balance;
}
/* Palabras clave dentro de cualquier título de sección → Bulky (contraste) */
.section-header__title strong {
  font-weight: 800;
  font-style: normal;
}
/* Títulos largos con tracking negativo no deben cortarse ni provocar scroll en móvil */
@media (max-width: 480px) {
  .section-header__title { letter-spacing: -0.025em; overflow-wrap: break-word; }
  .section-cta-title--lg { letter-spacing: -0.02em; overflow-wrap: break-word; }
}

/* Títulos de CTA centrado (reutilizable) — mismo patrón Slim+Bulky */
.section-cta-title {
  font-family: var(--font-display);
  font-weight: 300; /* PolySans-Slim */
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 760px;
  margin: 0 auto 32px;
}
.section-cta-title strong {
  font-weight: 800;
  font-style: normal;
}
/* Variante grande (CTA final) */
.section-cta-title--lg {
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 880px;
  margin-bottom: 24px;
}
.section-header__subtitle {
  font-family: var(--font-display);
  font-weight: 300; /* PolySans-Slim — coherente con el hero */
  font-size: clamp(15px, 1.3vw, 18px);
  /* --accent-soft se voltea por contexto (oscuro→claro), así no falla sobre fondo oscuro */
  color: var(--accent-soft);
  max-width: 620px;
  line-height: 1.55;
}
.section--dark .section-header__subtitle { color: rgba(255,255,255,0.7); }

/* ============================================
   SUBPAGE HERO — hero distintivo para subpáginas
   (áreas / casos). Negro profundo + atmósfera + líneas
   animadas + divisor inferior → se lee como HERO, no
   como una sección más.
   ============================================ */

.subpage-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(128px, 16vh, 200px) var(--section-padding-x) clamp(60px, 8vh, 104px);
  background: #060606;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
/* Glow atmosférico (orbe) */
.subpage-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(72% 80% at 74% -12%, rgba(255, 255, 255, 0.11), transparent 60%),
    radial-gradient(55% 65% at -5% 115%, rgba(255, 255, 255, 0.06), transparent 60%);
}
/* Las líneas del hero, en blanco */
.subpage-hero .bg-paths { color: #ffffff; z-index: -1; }
/* Fundido inferior hacia negro para una transición limpia a la sección siguiente */
.subpage-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40%;
  z-index: -1;
  background: linear-gradient(to bottom, transparent, #060606);
  pointer-events: none;
}
.subpage-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.subpage-hero__eyebrow {
  display: block; /* propia línea, debajo del back-link */
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
  margin: 32px 0 18px;
}
.subpage-hero__title {
  font-family: var(--font-display);
  font-weight: 800; /* Bulky — presencia máxima */
  font-size: clamp(46px, 8.5vw, 118px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
  margin-bottom: 26px;
}
.subpage-hero__sub {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(17px, 1.7vw, 25px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.74);
  max-width: 660px;
}

/* Variante CLARA del hero de subpágina — Resultados / Paquetes / Nosotros / Contacto.
   Mismo componente que las áreas pero en BLANCO, texto negro y las MISMAS líneas
   fluidas del hero del home (.bg-paths) en oscuro. Las distingue de las áreas
   (que conservan el hero negro). */
.subpage-hero--light {
  background-color: var(--bg-secondary);
  color: var(--text-primary-light);
  border-bottom: 1px solid var(--border-light);
  /* contexto claro → acentos en negro */
  --accent: #0a0a0a;
  --accent-soft: rgba(10, 10, 10, 0.62);
}
/* glow neutro tenue para dar profundidad */
.subpage-hero--light::before {
  background: radial-gradient(62% 72% at 80% -12%, rgba(10, 10, 10, 0.05), transparent 60%);
}
.subpage-hero--light::after { display: none; } /* sin fundido oscuro inferior */
/* Líneas oscuras sobre blanco (anula el blanco que usan las áreas) */
.subpage-hero--light .bg-paths { color: #0a0a0a; }
.subpage-hero--light .subpage-hero__eyebrow { color: var(--accent-soft); }
.subpage-hero--light .subpage-hero__title { color: var(--text-primary-light); }
.subpage-hero--light .subpage-hero__sub { color: #555; }

@media (max-width: 768px) {
  /* Padding-top excesivo en pantallas cortas → lo bajamos manteniendo el respiro del topnav fijo */
  .subpage-hero { padding-top: clamp(104px, 14vh, 140px); padding-bottom: clamp(48px, 7vh, 80px); }
}
@media (max-width: 480px) {
  /* A 375px palabras largas (INTELIGENCIA, POSTPRODUCCIÓN) desbordarían con tracking negativo.
     Romper palabras y suavizar el tracking evita el corte/scroll horizontal. */
  .subpage-hero__title {
    font-size: clamp(38px, 11vw, 56px);
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }
  .subpage-hero__sub { font-size: clamp(15px, 4.4vw, 18px); }
  .subpage-hero__eyebrow { margin-top: 24px; }
}

/* ============================================
   BACK LINK — "← Volver" con presencia (píldora)
   ============================================ */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  color: rgba(255, 255, 255, 0.78);
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  transition: color 200ms ease, background 200ms ease, border-color 200ms ease, transform 240ms var(--ease-out-quint);
}
.back-link:hover {
  color: #0a0a0a;
  background: #fff;
  border-color: #fff;
  transform: translateX(-3px);
}
.back-link__arrow { display: inline-block; transition: transform 240ms var(--ease-out-quint); }
.back-link:hover .back-link__arrow { transform: translateX(-4px); }
/* Variante para fondos claros */
.section--light .back-link,
.back-link--on-light {
  color: rgba(10, 10, 10, 0.72);
  border-color: rgba(10, 10, 10, 0.22);
}
.section--light .back-link:hover,
.back-link--on-light:hover {
  color: #fff;
  background: #0a0a0a;
  border-color: #0a0a0a;
}

/* ============================================
   RITMO DE SECCIONES — divisor sutil entre secciones
   contiguas del mismo valor (define los límites)
   ============================================ */
.section--dark + .section--dark,
.section--elevated + .section--elevated,
.section--dark + .section--elevated,
.section--elevated + .section--dark {
  border-top: 1px solid var(--border-dark);
}
.section--light + .section--light {
  border-top: 1px solid var(--border-light);
}

/* ============================================
   STATS / COUNTERS
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat__number {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: inherit;
  font-variant-numeric: tabular-nums; /* evita el "salto" de ancho al animar contadores */
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}
.section--light .stat__label { color: #6b6b6b; }

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* ============================================
   SOBRE NOSOTROS (home) — intro editorial + banda de stats full-width
   Clases propias para no afectar a .stats-grid del resto del sitio.
   ============================================ */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
/* Banda a todo el ancho: las 4 cifras como una "ficha" de números enormes */
.stats-band {
  margin-top: clamp(56px, 7vw, 96px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.5vw, 40px);
  color: #111;
}
.stats-band .stat {
  border-top: 1px solid #e5e5e5; /* regla superior por columna */
  padding-top: clamp(18px, 1.8vw, 28px);
  gap: 14px;
}
.stats-band .stat__number {
  font-size: clamp(56px, 7vw, 104px);
  letter-spacing: -0.05em;
}

@media (max-width: 768px) {
  .about-intro { grid-template-columns: 1fr; gap: 28px; }
  .stats-band { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
}
@media (max-width: 480px) {
  /* Dos columnas de cifras enormes a 375px se aprietan; reducimos tamaño y gap
     para que las dos columnas respiren sin desbordar. */
  .stats-band { gap: 24px 16px; }
  .stats-band .stat__number { font-size: clamp(40px, 12vw, 56px); letter-spacing: -0.04em; }
}

/* ============================================
   FINAL CTA — panel oscuro flotante sobre banda clara
   Da distinción a la pregunta final: rompe la secuencia de bloques oscuros
   (testimonios → CTA → footer) con una banda clara y una tarjeta elevada.
   ============================================ */
.final-cta {
  position: relative;
  background: var(--bg-secondary-alt); /* banda gris clara → frontera dura con el negro vecino */
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
}
/* Grid de la banda clara: líneas oscuras, desvanecidas en los bordes superior/inferior */
.final-cta__bandgrid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  stroke: rgba(10, 10, 10, 0.06);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
}
.final-cta__panel {
  position: relative;
  z-index: 1; /* por encima del grid de la banda */
  max-width: 1040px;
  margin: 0 auto;
  /* Contexto OSCURO dentro del panel: btn--primary => blanco sobre negro */
  --accent: #ffffff;
  --accent-contrast: #0a0a0a;
  background: linear-gradient(160deg, #161616 0%, #0a0a0a 62%);
  color: #fff;
  border-radius: clamp(20px, 2.4vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.55); /* elevación → "flota" sobre la banda */
  overflow: hidden;
  text-align: center;
}
.final-cta__inner {
  position: relative;
  z-index: 1;
  padding: clamp(48px, 7vw, 96px) clamp(24px, 5vw, 80px);
}
.final-cta__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, 92%);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.final-cta__eyebrow {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 18px;
}
.final-cta__title {
  color: #fff;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 18px;
}
.final-cta__sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.66);
  margin-bottom: clamp(28px, 3vw, 40px);
}
/* Sin sombra de reposo ni glow: el botón usa el hover base de btn--primary
   (sube 2px + sombra sutil), idéntico al de "Conoce nuestra historia". */

/* ============================================
   TESTIMONIAL
   ============================================ */

.testimonial {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.testimonial__quote {
  font-family: var(--font-display);
  font-weight: 300; /* PolySans-Slim — coherente con el patrón del sitio */
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 32px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.testimonial__author {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.testimonial__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.testimonial__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}
.testimonial__dot.active { background: var(--accent); transform: scale(1.3); }

/* ============================================
   RS MEDIA — bento de imágenes (mezcla orientaciones)
   ============================================ */
.rsmedia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: clamp(140px, 16vh, 210px);
  gap: 14px;
}
.rsmedia-tile {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #111;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
}
.rsmedia-tile--wide { grid-column: 1 / -1; }   /* horizontal a todo el ancho */
.rsmedia-tile--tall { grid-row: span 2; }       /* vertical, ocupa 2 filas */
.rsmedia-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%) contrast(1.04); /* blanco y negro, coherente con la marca */
  transition: transform 800ms var(--ease-out-expo), filter 500ms ease;
}
.rsmedia-tile:hover img { transform: scale(1.06); filter: grayscale(100%) contrast(1.08) brightness(1.04); } /* zoom + leve realce, sigue B&N */

@media (max-width: 900px) {
  /* el split RS Media se apila en móvil */
  .rsmedia-split { grid-template-columns: 1fr !important; gap: 40px !important; }
}

/* ============================================
   RS IA — split: muro de reels (2×2) a la izq, texto a la der
   ============================================ */
.rsia-split {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;   /* columna de reels acotada → más compactos */
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
.rsia-split .rsia-reels { grid-column: 1; grid-row: 1; }   /* reels a la izquierda, llenan su track */
.rsia-split .rsia-text  { grid-column: 2; grid-row: 1; max-width: 560px; }

/* Muro de reels: 4 videos verticales tipo teléfono, 2×2 */
.rsia-reels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.rsia-reel {
  position: relative;
  margin: 0;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
}
.rsia-reel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 700ms var(--ease-out-expo);
}
.rsia-reel:hover video { transform: scale(1.05); }
.rsia-reel__tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 36px 16px 14px;
  font-family: var(--font-display);   /* misma fuente que los títulos */
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
  /* degradado al pie para legibilidad, sin la pill genérica */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

@media (max-width: 900px) {
  /* se apila: el texto va primero (orden del DOM), luego el muro de reels 2×2 */
  .rsia-split { grid-template-columns: 1fr; gap: 32px; }
  .rsia-split .rsia-reels,
  .rsia-split .rsia-text { grid-column: auto; grid-row: auto; }
  .rsia-split .rsia-text { max-width: none; }
  .rsia-split .rsia-reels { width: min(420px, 100%); margin: 0 auto; }  /* centrado al apilar */
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: #0a0a0a;
  color: #fff;
  padding: 80px var(--section-padding-x) 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: var(--container-max);
  margin: 0 auto 64px;
}
.footer__brand {
  margin-bottom: 16px;
}
.footer__brand.brand-logo { height: 28px; width: auto; }
.footer__tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
  max-width: 280px;
  margin-bottom: 24px;
}
.footer__regions {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.62);
}
.footer__heading {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.62);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 12px; }
.footer ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  transition: color 200ms ease;
}
.footer ul li a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid var(--border-dark);
  padding-top: 32px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ============================================
   RESULTADOS / CASE STUDIES
   ============================================ */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
/* Etiqueta editorial al inicio de la barra (mono + regla vertical), da contexto
   y hace que el filtro se sienta intencional, no un set de chips por defecto. */
.filter-bar__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-right: 6px;
  padding-right: 16px;
  border-right: 1px solid rgba(255,255,255,0.16);
  white-space: nowrap;
}
/* Pills: lenguaje mono/monocromo del sitio. Hairline en reposo, inversión total
   en activo con un punto-marcador, micro-lift en hover. Nada genérico. */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(0,0,0,0.16);
  color: #444;
  background: transparent;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms ease;
  white-space: nowrap;
}
.filter-pill:hover { color: #0a0a0a; border-color: rgba(0,0,0,0.4); transform: translateY(-1px); }
.filter-pill.active { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
/* Punto-marcador solo en el filtro activo */
.filter-pill.active::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.filter-pill:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
/* Filtros sobre secciones oscuras (contexto invertido) */
.section--dark .filter-pill,
.section--elevated .filter-pill { color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.18); }
.section--dark .filter-pill:hover,
.section--elevated .filter-pill:hover { background: rgba(255,255,255,0.05); color: #fff; border-color: rgba(255,255,255,0.55); }
.section--dark .filter-pill.active,
.section--elevated .filter-pill.active { background: #fff; color: #0a0a0a; border-color: #fff; }

@media (max-width: 768px) {
  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
}

/* ============================================
   RESULTS GRID — mismo lenguaje visual que las "Áreas de Trabajo":
   sección negra + tarjetas oscuras con número e ícono en círculo, glow suave y
   flecha que se rellena en hover. Una tarjeta destacada grande con la métrica.
   ============================================ */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  grid-auto-flow: dense;
  gap: clamp(12px, 1.4vw, 20px);
}
.result-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(24px, 2vw, 34px);
  background: #0e0e0e;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 600ms var(--ease-out-expo),
    border-color 700ms var(--ease-out-expo),
    box-shadow 600ms var(--ease-out-expo);
}
/* Atmósfera: orbe suave de luz (igual que .area-card) */
.result-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(72% 70% at 88% 8%, rgba(255, 255, 255, 0.10), transparent 56%),
    radial-gradient(60% 65% at 6% 100%, rgba(255, 255, 255, 0.05), transparent 60%);
  opacity: 0.9;
  transition: opacity 600ms ease, transform 900ms var(--ease-out-expo);
}
.result-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
}
.result-card:hover::before { opacity: 1; transform: scale(1.07); }
.result-card.hidden { display: none; }

.result-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.result-card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.result-card__arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  transition: transform 600ms var(--ease-out-expo), background 500ms ease, color 500ms ease, border-color 500ms ease;
}
.result-card:hover .result-card__arrow {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
  transform: translate(3px, -3px);
}
.result-card__body { display: flex; flex-direction: column; }
.result-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 1.7vw, 27px);
  line-height: 1.14;
  letter-spacing: -0.02em;
}
.result-card__sub {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
  max-width: 94%;
  margin-top: 10px;
}

/* Destacada — grande (2×2) con la métrica como protagonista */
.result-card--feature { grid-column: span 2; grid-row: span 2; }
.result-card--feature .result-card__title {
  font-size: clamp(26px, 2.4vw, 40px);
  line-height: 1.05;
  margin-top: 18px;
}
.result-card__metric-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 6.5vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.result-card__metric-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 12px;
}
/* how-card y account-card blancas sobre fondo claro → mismo tratamiento */
.section--light .how-card,
.section--light .account-card {
  border-color: transparent;
  box-shadow:
    0 0 22px rgba(0, 0, 0, 0.03),
    0 4px 10px rgba(0, 0, 0, 0.035),
    0 14px 34px rgba(0, 0, 0, 0.07);
}
.section--light .how-card:hover,
.section--light .account-card:hover {
  box-shadow:
    0 0 26px rgba(0, 0, 0, 0.04),
    0 6px 14px rgba(0, 0, 0, 0.045),
    0 20px 46px rgba(0, 0, 0, 0.10);
}
@media (max-width: 1100px) {
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .result-card--feature { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 720px) {
  .results-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .result-card { min-height: 220px; }
  .result-card--feature { grid-column: span 1; }
}

/* ============================================
   AREA SUBPAGE PROCESS TIMELINE
   ============================================ */

.process-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.process-step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--border-dark);
  align-items: start;
}
.process-step:last-child { border-bottom: 1px solid var(--border-dark); }
.section--light .process-step { border-color: var(--border-light); }

.process-step__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.process-step__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.process-step__body {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.75;
}

@media (max-width: 768px) {
  .process-step { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
}

/* ============================================
   FORM
   ============================================ */

.form {
  display: grid;
  gap: 20px;
}
.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}
.form__input, .form__textarea, .form__select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 14px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 200ms ease, background 200ms ease;
}
.form__input:focus, .form__textarea:focus, .form__select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}
.form__textarea { resize: vertical; min-height: 120px; }
.form__select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23fff' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

/* ============================================
   REVEAL ON SCROLL
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 700ms var(--ease-out-quart), transform 700ms var(--ease-out-quart);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="300"] { transition-delay: 300ms; }
.reveal[data-delay="400"] { transition-delay: 400ms; }
.reveal[data-delay="500"] { transition-delay: 500ms; }
.reveal[data-delay="600"] { transition-delay: 600ms; }

/* ============================================
   CASE STUDY PAGE
   ============================================ */

.case-hero {
  padding: 140px var(--section-padding-x) 80px;
  background: #0a0a0a;
  color: #fff;
}
.case-hero__container { max-width: 1200px; margin: 0 auto; }
.case-hero__img {
  width: 100%;
  aspect-ratio: 21/9;
  border-radius: 20px;
  background: radial-gradient(120% 140% at 72% 18%, #262626 0%, #131313 48%, #070707 100%);
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}
.case-hero__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 60% at 25% 80%, rgba(255,255,255,0.12), transparent 60%),
    radial-gradient(40% 40% at 85% 20%, rgba(255,255,255,0.06), transparent 55%);
}
.case-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.case-hero__meta {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 24px;
}

.case-metrics {
  background: #111;
  padding: 64px var(--section-padding-x);
  color: #fff;
}
.case-metrics__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.case-section {
  padding: 80px var(--section-padding-x);
  max-width: 880px;
  margin: 0 auto;
}
.case-section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3vw, 40px);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.case-section__body {
  font-size: 17px;
  line-height: 1.7;
  color: #333;
}
.case-section__body p + p { margin-top: 20px; }

@media (max-width: 768px) {
  .case-metrics__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   PORTFOLIO ACCOUNTS GRID
   ============================================ */

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.account-card {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border-dark);
  border-radius: 18px;
  padding: 24px;
  transition: transform 500ms var(--ease-out-expo), background 450ms ease, box-shadow 500ms var(--ease-out-expo), border-color 700ms var(--ease-out-expo);
}
.section--light .account-card {
  background: #fff;
  border-color: var(--border-light);
}
.account-card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.08); }
.section--light .account-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.account-card__handle {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 4px;
}
.account-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
}
.account-card__platform {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}
/* Conteo de seguidores dentro de una .account-card (prueba social) */
.account-card__followers {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.account-card__followers span {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
}

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

/* ============================================
   ACCORDION (Services breakdown)
   ============================================ */

.accordion-item {
  border-top: 1px solid var(--border-light);
}
.accordion-item:last-child { border-bottom: 1px solid var(--border-light); }
.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: -0.01em;
  color: inherit;
  background: transparent;
}
.accordion-trigger__tier {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-right: 16px;
  text-transform: uppercase;
}
.accordion-trigger__icon {
  font-size: 24px;
  transition: transform 300ms ease;
  flex-shrink: 0;
}
.accordion-item.open .accordion-trigger__icon { transform: rotate(45deg); }
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms var(--ease-out-quart);
}
.accordion-content__inner {
  padding: 0 0 32px;
  font-size: 15px;
  line-height: 1.65;
  color: #555;
}
.accordion-content__inner ul {
  margin-top: 12px;
  padding-left: 20px;
}
.accordion-content__inner li { margin-top: 8px; }

/* ============================================
   PROCESS HOW-IT-WORKS (Servicios)
   ============================================ */

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.how-card {
  padding: 32px 24px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dark);
}
.section--light .how-card { background: #fff; border-color: var(--border-light); }
.how-card__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 16px;
}
.how-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.how-card__body { font-size: 14px; line-height: 1.55; opacity: 0.7; }

@media (max-width: 1024px) {
  /* Paso intermedio de tablet: 4 → 2 columnas (antes saltaba directo a 1 en 900) */
  .how-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) { .how-grid { grid-template-columns: 1fr; } }

/* ============================================
   RESPONSIVE — SPLITS Y GRIDS DEFINIDOS POR INLINE-STYLE EN EL HTML
   Estos layouts fijan sus columnas con style="grid-template-columns:..." en el
   marcado (propiedad de los agentes de HTML). El inline gana en especificidad,
   así que para colapsarlos en tablet/móvil hace falta !important. Sin esto
   provocan scroll horizontal y columnas aplastadas en 768/375px.
   Mismo patrón ya usado por .rsmedia-split.
   ============================================ */

/* TABLET (≤1024px): los layouts de 3+ columnas bajan a 2 */
@media (max-width: 1024px) {
  .values-grid,
  .team-grid,
  .web-cases,
  .gallery-grid,
  .design-gallery,
  .edits-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* MÓVIL (≤768px): todo lo de 2 columnas o splits laterales se apila a 1 */
@media (max-width: 768px) {
  .paq-split,
  .contact-split,
  .story-split,
  .mvv-grid,
  .crm-cases,
  .ia-cases,
  .form__row {
    grid-template-columns: 1fr !important;
  }
  /* Reducimos los gaps grandes de los splits de escritorio en una sola columna */
  .paq-split,
  .contact-split,
  .story-split {
    gap: clamp(28px, 6vw, 48px) !important;
  }
}

/* MÓVIL chico (≤600px): los grids de tablet pasan a una sola columna */
@media (max-width: 600px) {
  .values-grid,
  .team-grid,
  .web-cases,
  .gallery-grid,
  .design-gallery,
  .edits-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================
   NAVEGACIÓN ENTRE CASOS (prev / next)
   Reemplaza los enlaces de texto plano por dos botones-tarjeta claros: muestran
   la dirección + el titulo real del caso destino, con hover y flecha que se mueve.
   Asi se ve y se entiende que son botones y a donde llevan.
   ============================================ */
.case-nav-section {
  /* Banda NEGRA: rompe la cadena de bloques claros (Resultados + CTA) y mete el
     beat oscuro antes del footer. Línea inferior sutil para separarla del footer
     (que también es negro). */
  background: var(--bg-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(40px, 6vw, 64px) var(--section-padding-x);
}
.case-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
}
/* Tarjetas oscuras sobre la banda negra (mismo lenguaje que las area-card del home) */
.case-nav__link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  transition: transform 240ms cubic-bezier(0.23, 1, 0.32, 1),
              border-color 240ms ease, box-shadow 240ms ease, background 240ms ease;
}
.case-nav__link--next { align-items: flex-end; text-align: right; }
.case-nav__link:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.6);
  background: rgba(255, 255, 255, 0.05);
}
.case-nav__dir {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.case-nav__arrow {
  display: inline-block;
  transition: transform 240ms cubic-bezier(0.23, 1, 0.32, 1);
}
.case-nav__link--prev:hover .case-nav__arrow { transform: translateX(-4px); }
.case-nav__link--next:hover .case-nav__arrow { transform: translateX(4px); }
.case-nav__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(15px, 1.7vw, 20px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
}
@media (max-width: 640px) {
  .case-nav { grid-template-columns: 1fr; }
  .case-nav__link--next { align-items: flex-start; text-align: left; }
}

/* Imágenes no arrastrables en todo el sitio */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ============================================
   AVISO DE PRIVACIDAD — enlace de footer + modal
   El modal se inyecta desde main.js (una sola fuente del texto legal); el botón
   vive en el footer de cada página con [data-privacy]. Lenguaje B&N del sitio.
   ============================================ */

/* Enlace en la barra inferior del footer (línea de copyright) */
.footer__legal-link {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 200ms ease;
}
.footer__legal-link:hover { color: #fff; }

/* Overlay + contenedor */
.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 10050; /* sobre menú móvil (10001), intro y cookies */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  /* Animación abrir/cerrar con transiciones (no display:none, para que la SALIDA
     también anime). El contenedor solo gestiona visibilidad/interacción; el fade y
     el desplazamiento los hacen el overlay y el diálogo. Al cerrar, ocultamos la
     visibilidad con un retraso = duración de la transición, para que la salida sea
     visible antes de desaparecer. */
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 320ms;
}
.privacy-modal.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear 0s;
}
.privacy-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 300ms ease;
}
.privacy-modal.is-open .privacy-modal__overlay { opacity: 1; }

/* Diálogo blanco, redondeado, con cuerpo scrolleable */
.privacy-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(860px, 100%);
  max-height: min(88vh, 920px);
  background: #fff;
  color: #111;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 320ms cubic-bezier(0.23, 1, 0.32, 1);
}
.privacy-modal.is-open .privacy-modal__dialog {
  opacity: 1;
  transform: none;
}

.privacy-modal__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--border-light);
}
.privacy-modal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(17px, 2vw, 20px);
  letter-spacing: -0.01em;
  color: #111;
}
.privacy-modal__close {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: #111;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: opacity 160ms ease, background 160ms ease;
}
.privacy-modal__close:hover { opacity: 0.6; }
.privacy-modal__close:focus-visible { outline: 2px solid #111; outline-offset: 2px; }

.privacy-modal__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(20px, 3vw, 32px);
}
.privacy-modal__body > p:first-child { margin-top: 0; }
.privacy-modal__body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin: 28px 0 8px;
  color: #111;
}
.privacy-modal__body h4 {
  font-weight: 700;
  font-size: 14px;
  margin: 18px 0 6px;
  color: #222;
}
.privacy-modal__body p {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 12px;
}
.privacy-modal__body ul {
  margin: 0 0 14px;
  padding-left: 20px;
  list-style: disc;
}
.privacy-modal__body li {
  font-size: 14px;
  line-height: 1.65;
  color: #444;
  margin-bottom: 6px;
}
.privacy-modal__body strong { color: #111; }
.privacy-modal__body a { color: #111; text-decoration: underline; }
.privacy-modal__updated {
  margin-top: 28px;
  font-size: 12px;
  color: #777;
}

@media (prefers-reduced-motion: reduce) {
  .privacy-modal,
  .privacy-modal__overlay,
  .privacy-modal__dialog { transition: none; }
  .privacy-modal__dialog { transform: none; }
}

/* ============================================
   SELECTOR DE IDIOMA (ES / EN) — banderas inyectadas por main.js
   Dos banderas SVG inline (MX / US): la activa se resalta, la otra es un <a>
   que navega a la página equivalente del otro idioma.
   ============================================ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 5px;
  line-height: 0;
  cursor: pointer;
  opacity: 0.45;
  filter: grayscale(0.35);
  transition: opacity 200ms ease, filter 200ms ease,
              transform 200ms var(--ease-out-quint);
  -webkit-tap-highlight-color: transparent;
}
.lang-switch__btn svg {
  display: block;
  width: 22px;
  height: auto;
  border-radius: 2px;
}
.lang-switch a.lang-switch__btn:hover {
  opacity: 0.9;
  filter: grayscale(0);
  transform: translateY(-1px);
}
.lang-switch a.lang-switch__btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  opacity: 1;
}
.lang-switch__btn.is-active {
  opacity: 1;
  filter: grayscale(0);
  cursor: default;
}
.lang-switch__btn.is-active svg {
  box-shadow: 0 0 0 1.5px currentColor;
  border-radius: 2px;
}

/* Topnav: las banderas van a la derecha del CTA (currentColor = blanco en el
   topnav negro, oscuro en el hero claro → el anillo de la activa se adapta). */
.lang-switch--nav { margin-left: 4px; }

/* Home: último ítem de la columna vertical del hero (alineada a la derecha). */
.lang-switch--home {
  margin-top: 12px;
  pointer-events: auto;
}

/* Menú móvil: centradas, más grandes para el toque. */
.lang-switch--mobile {
  margin-top: 28px;
  gap: 16px;
  justify-content: center;
}
.lang-switch--mobile .lang-switch__btn svg { width: 34px; }

/* Las banderas viven dentro de contenedores con estilos de enlace fuertes
   (.home-nav-directory a → flecha ↗ + subrayado + tamaño grande; #mobile-menu a
   → 28px). Neutralizamos lo heredado y fijamos currentColor para que el anillo
   de la bandera activa contraste en cada fondo. */
.lang-switch__btn { font-size: 0; }
.lang-switch--home { color: #0a0a0a; }
.lang-switch--home .lang-switch__btn::after,
.lang-switch--home .lang-switch__btn::before { content: none; display: none; }
.lang-switch--home a.lang-switch__btn:hover { transform: translateY(-1px); }
.lang-switch--mobile { color: #fff; }

/* El selector del navbar solo se ve en desktop; en ≤1024px (el nav pasa a
   hamburguesa) el cambio de idioma vive dentro del menú móvil. */
@media (max-width: 1024px) {
  .lang-switch--nav { display: none; }
}

/* ============================================
   CONTACTO — validación, selector de lada y modal de calendario
   Añadidos: estados de error de formulario, honeypot anti-spam,
   tema oscuro para intl-tel-input y modal flotante del calendario.
   ============================================ */

/* Honeypot: fuera de pantalla, invisible para humanos, accesible para bots. */
.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Mensajes de error inline (un <span> por campo, vacío hasta que falla la validación). */
.form__error {
  display: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: #ff6b6b;
  margin-top: 2px;
}
.form__error.is-visible { display: block; }
.form__error--global {
  margin-top: 12px;
  text-align: center;
  font-size: 12.5px;
}
/* Resalta el campo inválido. */
.form__input.is-invalid,
.form__textarea.is-invalid,
.form__select.is-invalid,
.contact-form-card .iti.is-invalid .form__input {
  border-color: #ff6b6b;
}

/* Alineación de la fila de 2 campos (correo / teléfono): las etiquetas reservan
   2 líneas, así los inputs quedan al mismo nivel aunque una etiqueta envuelva. */
.contact-form-card .form__row .form__label {
  min-height: 2.6em;
  line-height: 1.3;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0 4px;
}
@media (max-width: 768px) {
  /* En una sola columna ya no hace falta reservar altura. */
  .contact-form-card .form__row .form__label { min-height: 0; }
}

/* --- intl-tel-input v29: tema oscuro CENTRALIZADO (receta oficial) ---
   Fuente: docs oficiales theming.md. El fondo del panel del dropdown lo controla
   la variable --iti-country-selector-bg; el texto (nombres de país) se HEREDA del
   color de la página (aquí blanco), no está hardcodeado por la librería.
   Definimos las 4 variables oficiales en :root para que alcancen el dropdown en
   CUALQUIER modo: inline (desktop) y fullscreen (mobile, que la librería monta en
   <body>, fuera de .contact-form-card). Las clases .iti__* solo existen en la página
   de contacto, así que poner las variables en :root es inocuo en el resto del sitio.
   Sin !important, sin tocar fondos/overflow internos: solo las palancas oficiales.
   Usamos `html:root` (no `:root`) a propósito: el CSS de la librería se enlaza
   DESPUÉS de este archivo y define `:root{--iti-country-selector-bg:white}` con la
   misma especificidad, así que ganaría por orden. `html:root` tiene un punto más de
   especificidad → nuestras variables ganan SIEMPRE, sin depender del orden de <link>
   ni de !important. Cascadea desde <html> y alcanza también el dropdown fullscreen
   que la librería monta en <body>. */
html:root {
  --iti-country-selector-bg: #141414;          /* fondo del panel del dropdown */
  --iti-border-color: rgba(255,255,255,0.18);  /* bordes del panel y separadores */
  --iti-icon-color: rgba(255,255,255,0.72);    /* flecha, lupa, check */
  --iti-hover-color: rgba(255,255,255,0.12);   /* país resaltado / hover */
}
.iti { width: 100%; }                          /* full-width (docs: troubleshooting) */
/* El input de búsqueda no trae fondo propio en la librería → hereda el blanco
   del user-agent. La receta oscura oficial estiliza el fondo del input; lo hacemos
   transparente para que tome el #141414 del panel (una sola fuente de color). */
.iti__search-input { background: transparent; color: #fff; }
/* Matices de jerarquía sobre el texto heredado (blanco): lada y placeholder tenues. */
.iti__dial-code { color: rgba(255,255,255,0.55); }
.iti__search-input::placeholder { color: rgba(255,255,255,0.45); }
.iti__country-list { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.3) transparent; }

/* --- Modal de calendario (overlay + solo el iframe del calendario) --- */
.cal-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 320ms;
}
.cal-modal.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear 0s;
}
.cal-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 300ms ease;
}
.cal-modal.is-open .cal-modal__overlay { opacity: 1; }
.cal-modal__dialog {
  position: relative;
  /* Ancho amplio en desktop: a >=940px el calendario cambia a layout horizontal
     (mes + horarios lado a lado, ~570px de alto) y entra completo en viewport sin
     scroll. Verificado contra el embed real a 1080px. */
  width: min(1080px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 320ms cubic-bezier(0.23, 1, 0.32, 1);
}
.cal-modal.is-open .cal-modal__dialog { opacity: 1; transform: none; }
.cal-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  font-size: 24px;
  line-height: 1;
  color: #111;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: opacity 160ms ease, transform 160ms ease;
}
.cal-modal__close:hover { transform: scale(1.05); }
.cal-modal__close:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.cal-modal__iframe {
  display: block;
  width: 100%;
  border: none;
  min-height: 520px;
  border-radius: 18px;
}

/* MOBILE: el calendario es vertical y alto. Modal a pantalla completa y el iframe
   a alto fijo (100% del diálogo); el JS NO lo crece, así la página del calendario
   scrollea DENTRO del iframe de forma nativa (touch) — sin el problema de scroll de
   iframes cross-origin dentro de modales. Usa 100dvh para descontar la barra del
   navegador móvil (fallback 100vh). */
@media (max-width: 768px) {
  .cal-modal { padding: 0; }
  .cal-modal__dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    overflow: hidden;       /* no scrollea el diálogo; scrollea el iframe interno */
  }
  .cal-modal__iframe {
    height: 100%;
    min-height: 0;
    border-radius: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cal-modal,
  .cal-modal__overlay,
  .cal-modal__dialog { transition: none; }
  .cal-modal__dialog { transform: none; }
}
