/* ═══════════════════════════════════════════════════════════
   MÁGICA ESCENA - SISTEMA DE TIPOGRAFÍA CON VARIABLES CSS
   ═══════════════════════════════════════════════════════════

   📝 CONFIGURACIÓN CENTRALIZADA DE FUENTES
   Modifica solo las variables de abajo para cambiar toda 
   la tipografía del sitio. Después recarga y ¡listo!
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ─── 1. FAMILIAS TIPOGRÁFICAS ─── */
  --font-display: "Space Grotesk", sans-serif; /* Títulos, headlines */
  --font-body: "Inter", sans-serif; /* Texto, descripciones */
  --font-mono: monospace; /* Código, números */

  /* ─── 2. PESOS (WEIGHTS) ─── */
  --weight-thin: 100;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-black: 900;

  /* ─── 3. TAMAÑOS DE FUENTE ─── */
  --text-xs: 0.65rem; /* Labels pequeños */
  --text-sm: 0.75rem; /* Labels, captions */
  --text-base: 0.9rem; /* Texto base */
  --text-md: 1rem; /* Texto estándar */
  --text-lg: 1.1rem; /* Texto grande */
  --text-xl: 1.25rem; /* Subtítulos */
  --text-2xl: 1.5rem; /* Títulos pequeños */
  --text-3xl: clamp(1.8rem, 3vw, 2.5rem); /* Títulos medianos */
  --text-4xl: clamp(2rem, 4vw, 3.5rem); /* Títulos grandes */
  --text-5xl: clamp(2.5rem, 5vw, 5rem); /* Headlines */
  --text-6xl: clamp(3.5rem, 5vw, 5rem); /* Hero text */

  /* ─── 4. INTERLETRADO (TRACKING) ─── */
  --tracking-tight: -0.03em; /* Headlines grandes */
  --tracking-normal: -0.02em; /* Títulos */
  --tracking-wide: 0.05em; /* Subtítulos */
  --tracking-wider: 0.15em; /* Labels mayúsculas */
  --tracking-widest: 0.2em; /* Labels pequeñas */

  /* ─── 5. ALTURA DE LÍNEA ─── */
  --leading-none: 1; /* Títulos single-line */
  --leading-tight: 1.1; /* Headlines */
  --leading-snug: 1.4; /* Títulos multilinea */
  --leading-normal: 1.6; /* Texto body */
  --leading-relaxed: 1.7; /* Descripciones largas */
  --leading-loose: 1.8; /* Texto legibilidad máxima */
}

/* ═══════════════════════════════════════════════════════════
   FIN DEL BLOQUE DE CONFIGURACIÓN
   ═══════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════
   ESTILOS DE CONTACTO (migrados de inline a clases)
   ═══════════════════════════════════════════════════════════ */

.contact-title-large {
  font-size: clamp(2rem, 4vw, 3.5rem);
  max-width: 85vw;
}

.contact-description {
  max-width: 500px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.contact-phone-wrapper {
  margin: 2vh 0;
}

.contact-phone-link {
  font-size: clamp(2.5rem, 5vw, 3rem);
  color: #00ffbf;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
}

.contact-phone-link:hover {
  text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.contact-hours {
  margin-top: 0.5vh;
  display: block;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2vh 2vw;
  align-items: start;
  width: 100%;
}

/* Variante de 3 columnas */
.contact-info-grid.contact-info-3cols {
  grid-template-columns: 1fr 1fr 1fr !important;
}

.contact-col {
  display: flex;
  flex-direction: column;
  gap: 2vh;
}

.contact-label-inline {
  font-size: 0.65rem;
  margin: 0;
}

.contact-address-text {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
  margin-top: 0.5vh;
  line-height: 1.4;
}

.contact-email-wrapper {
  margin-top: 1vh;
}

.contact-email {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
  text-decoration: none !important;
  display: block;
  margin-top: 0.5vh;
  width: fit-content;
  transition: all 0.3s;
  border-bottom: none; /* ← Sin línea base */
  padding-bottom: 0; /* ← Sin padding extra */
}

.contact-email:hover {
  color: #c200ff;
  /* Sin border-color porque no hay borde */
}

.contact-social-wrapper {
  margin-top: 1vh;
}

.contact-social-links {
  display: flex;
  flex-direction: column;
  gap: 1vh;
  margin-top: 1vh;
}

.contact-social-link {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5vw;
  transition: all 0.3s;
}

.contact-social-link:hover {
  color: #c200ff;
  transform: translateX(5px);
}

.contact-services-wrapper {
  margin-top: 1vh;
}

.contact-services-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5vh;
  line-height: 1.5;
}

.contact-footer {
  margin-top: auto;
  padding-top: 4vh;
}

.contact-footer-label {
  margin-top: 1vh;
  display: block;
}

.section-label-outer {
  opacity: 0;
}

.info-meta-block {
  display: block;
  width: 100%;
}

.icon-hidden {
  display: none;
}

.icon-stroke {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-equipo {
  position: relative;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   FIN ESTILOS CONTACTO
   ═══════════════════════════════════════════════════════════ */

/* ==========================================
   MÁGICA ESCENA - CSS OPTIMIZADO V2
   Loops controlados | Sin basura | Performance++
   ========================================== */

/* TÍTULOS GLOBAL - Space Grotesk 100 */
h1,
h2,
.home-headline,
.home-headline-secondary,
.home-headline-compact,
.title-section,
.cell-title,
.logo,
.info-title,
.info-header,
.project-section-header {
  font-family: var(--font-display) !important;
  font-weight: 100 !important;
  letter-spacing: -0.02em;
}

/* FIX CLS: Prevenir desplazamientos de layout */
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
  aspect-ratio: attr(width) / attr(height);
}

/* Reservar espacio para elementos dinámicos */
.section-left {
  /* Base consolidado (del último bloque que ganaba la cascada) */
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.1);

  /* Glassmorphism base */
  backdrop-filter: blur(0px) contrast(300%) saturate(300%);

  /* Efectos */
  mask-image: radial-gradient(
    ellipse 200% 100% at 00% 50%,
    rgba(0, 0, 0, 80) 1%,
    transparent 90%
  );
}

/* Específicos -para secciones*/
.section-left[data-idx="0"] {
}
.section-left[data-idx="1"] {
}
.section-left[data-idx="2"] {
}
.section-left[data-idx="3"] {
}
.section-left[data-idx="4"] {
}

/* Prevenir layout shift en celdas */
.cell {
  contain: layout style paint;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #fff;
  --secondary: #888;
  --accent: #00f7ff;
  --bg-dark: #0a0a0a;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-dramatic: cubic-bezier(0.77, 0, 0.175, 1);
}

@property --aurora-x {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 50%;
}

@property --aurora-y {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 60%;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background:
    radial-gradient(
      ellipse 120% 60% at var(--aurora-x) var(--aurora-y),
      rgba(105, 0, 190, 0.623) 0%,
      rgba(97, 3, 173, 0.11) 40%,
      rgba(140, 0, 255, 0.116) 70%,
      transparent 100%
    ),
    #000;
  color: var(--primary);
  position: relative;
  animation: auroraFloat 15s ease-in-out infinite;
  /* Optimización GPU para aurora */
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: layout style paint;
}

/* ==========================================
   CONTROL DE ANIMACIONES - OPTIMIZACIÓN
   ========================================== */

/* Pausar animaciones no críticas cuando el body tiene clase paused */
body.paused-animations {
  animation-play-state: paused !important;
}

body.paused-animations * {
  animation-play-state: paused !important;
}

/* Excepciones críticas que deben mantenerse siempre */
body.paused-animations .critical-animation,
body.paused-animations .ribbon-dot.active,
body.paused-animations .ribbon-dot.active::after {
  animation-play-state: running !important;
}

/* Pausar aurora específicamente */
body.paused-aurora {
  animation: none !important;
}

/* Pausar elementos cuando no están en viewport (controlado via JS) */
.anim-paused {
  animation-play-state: paused !important;
}

/* Will-change dinámico - solo durante animaciones */
.will-animate {
  will-change: transform, opacity;
}

.no-will-change {
  will-change: auto;
}

/* ==========================================
   MEDIA QUERY: REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Mantener aurora pero estática */
  html,
  body {
    animation: none !important;
    background:
      radial-gradient(
        ellipse 120% 60% at 50% 60%,
        rgba(105, 0, 190, 0.623) 0%,
        rgba(97, 3, 173, 0.11) 40%,
        rgba(140, 0, 255, 0.116) 70%,
        transparent 100%
      ),
      #000;
  }

  /* Desactivar parpadeos y pulsos */
  .ribbon-dot.active::after,
  .scroll-hint {
    animation: none !important;
    display: none !important;
  }
}

@keyframes auroraFloat {
  0%,
  100% {
    --aurora-x: 50%;
    --aurora-y: 60%;
  }

  33% {
    --aurora-x: 55%;
    --aurora-y: 58%;
  }

  66% {
    --aurora-x: 45%;
    --aurora-y: 62%;
  }
}

#canvas-background,
#canvas-foreground,
#canvas-fireflies,
#opal-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#canvas-background {
  z-index: 0;
  filter: blur(8px);
  opacity: 0.4;
}

#canvas-foreground {
  z-index: 1;
  filter: blur(4px);
  opacity: 0.75;
}

#canvas-fireflies {
  z-index: 2;
}

.center-ribbon {
  position: fixed;
  left: 50%;
  top: 0;
  width: 1.5vw;
  height: 100vh;
  z-index: 150;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 3vh 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.3) 20%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.3) 80%,
    rgba(0, 0, 0, 0.6) 100%
  );
  backdrop-filter: blur(8px) brightness(3);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

.ribbon-top {
  height: 25%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 2rem;
  width: 100%;
}

.ribbon-middle {
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ribbon-bottom {
  height: 25%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2rem;
  width: 100%;
}

.section-title-container {
  position: relative;
  overflow: hidden;
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.section-title-text {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00f7ff;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  animation: titleSlideInVertical 0.6s var(--transition-smooth) forwards;
}

@keyframes titleSlideInVertical {
  0% {
    opacity: 0;
    transform: rotate(180deg) translateY(30px) scale(0.8);
    filter: blur(10px);
  }

  100% {
    opacity: 1;
    transform: rotate(180deg) translateY(0) scale(1);
    filter: blur(0);
  }
}

.ribbon-dots {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
}

.ribbon-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.4s var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.ribbon-dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.5);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.ribbon-dot.active {
  background: var(--accent);
  transform: scale(0.8);
  box-shadow:
    0 0 20px var(--accent),
    0 0 40px rgba(1, 255, 234, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

.ribbon-dot.active::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0.5;
  animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }

  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

.vertical-brand {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--font-display);
  white-space: nowrap;
  transition: color 0.4s ease;
}

.center-ribbon:hover .vertical-brand {
  color: rgba(255, 255, 255, 0.8);
}

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 4;
  pointer-events: all;
  background: transparent !important;
  contain: strict;
  aspect-ratio: 16/9;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12),
    rgba(0, 0, 0, 0.35) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 99998;
  pointer-events: none;
  opacity: 0.5;

  /* Optimizaciones añadidas: */
  will-change: auto; /* No forzar capa GPU */
  contain: strict; /* Aislar renderizado */
  transform: translateZ(0); /* Forzar composición eficiente */
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: visible;
  z-index: 10;
}

.panel-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100vh;
  overflow-y: scroll;
  background: transparent;
  z-index: 10;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.panel-left::-webkit-scrollbar {
  width: 4px;
}

.panel-left::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.home-layout {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3vh 3vw 6vh 3vw;
  font-family: var(--font-display);
}

.home-content {
  padding: 0vh 0vw;
  display: flex;
  flex-direction: column;
  height: 91vh;
}

.home-section {
  display: flex;
  flex-direction: column;
  gap: 0vh;
  /* Espacio entre texto y línea */
  width: 100%;
}

/* NUEVA CELDA SUPERIOR - 100% del layout */
.home-hero-top {
  width: 100%;
  min-height: 35%;
  border-radius: 0px;
  padding: 0vh 0vw;
  margin-bottom: 0vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

.hero-top-content {
  display: flex;
  flex-direction: column;
  gap: 1vh;
  z-index: 1;
}

.hero-badge {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c200ff;
  font-weight: 600;
  background: rgba(194, 0, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 2px;
  display: inline-block;
  align-self: flex-start;
  border: 1px solid rgba(194, 0, 255, 0.3);
}

.hero-top-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: uppercase;
}

.home-section-last {
  margin-top: auto;
  /* Empuja el scroll al fondo */
  padding-top: 2vh;
}

.home-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 400;
  opacity: 0.7;
  color: #fff;
  display: block;
  margin: 1vh 0vh 1vh 0vh;
}

.home-headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.95;
  font-weight: 100;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  max-width: 90vw;
  color: #fff;
  padding-top: 0.1em;
}

/* LÍNEAS DIVISORIAS */
.home-divider-line {
  width: 100%;
  max-width: 70%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.25);
  margin: 1vh 0vh 1vh 0vh;
  clear: both;
}

/* HEADLINE SECUNDARIO - Tu Stand no es solo... */
.home-headline-secondary {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.95;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  max-width: 90vw;
  color: #fff;
  margin: 0;
  padding: 0;
  opacity: 1 !important;
  display: flex;
  flex-direction: column;
}

.home-headline-line-secondary {
  display: block;
  white-space: nowrap;
  opacity: 1 !important;
}

/* HEADLINE COMPACTO - 50% más pequeño */
.home-headline-compact {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 2.5rem);
  line-height: 1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  max-width: 90vw;
  color: #fff;
  margin: 1vh 1vh;
  padding: 0;
  display: block;
}

.home-headline-compact .home-headline-line {
  display: block;
  white-space: nowrap;
}

.home-headline-line {
  display: block;
  white-space: nowrap;
}

.home-bottom-line {
  width: 100%;
  max-width: 600px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.25);
  margin-top: 2vh;
  margin-bottom: 4vh;
}

.home-description {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 300;
  max-width: 450px;
  margin-bottom: 5vh;
  opacity: 0.85;
  letter-spacing: 0.01em;
  color: #fff;
}

.home-scroll-indicator {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.6;
  font-weight: 400;
  color: #fff;
}

.home-scroll-line {
  width: 60px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.3);
}

#gridContainer {
  position: relative;
  width: 100%;
  height: 100%;
  contain: layout;
}

/* FIX CLS: Celda activa no empuja otros elementos */
#gridContainer.has-active {
  /* Eliminado position: fixed - era el causante del empuje masivo */
  /* El contenedor se mantiene en su posición normal en el DOM */
  position: relative;
  width: 100%;
  height: 100%;
}

.cell {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  cursor: pointer;
  /* Transición solo de opacidad y borde */
  transition:
    border-color 0.8s cubic-bezier(0.77, 0, 0.175, 1),
    background-color 0.8s cubic-bezier(0.77, 0, 0.175, 1),
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  /* Will-change dinámico - solo cuando anima */
  will-change: auto;
  contain: layout style paint;
}

.cell.animating {
  will-change: transform, opacity;
}

.cell:nth-child(1) {
  top: 0;
  left: 0;
  width: 33.333%;
  height: 33.333%;
}

.cell:nth-child(2) {
  top: 0;
  left: 33.333%;
  width: 33.333%;
  height: 33.333%;
}

.cell:nth-child(3) {
  top: 0;
  left: 66.666%;
  width: 33.334%;
  height: 33.333%;
}

.cell:nth-child(4) {
  top: 33.333%;
  left: 0;
  width: 33.333%;
  height: 33.333%;
}

.cell:nth-child(5) {
  top: 33.333%;
  left: 33.333%;
  width: 33.333%;
  height: 33.333%;
}

.cell:nth-child(6) {
  top: 33.333%;
  left: 66.666%;
  width: 33.334%;
  height: 33.333%;
}

.cell:nth-child(7) {
  top: 66.666%;
  left: 0;
  width: 33.333%;
  height: 33.334%;
}

.cell:nth-child(8) {
  top: 66.666%;
  left: 33.333%;
  width: 33.333%;
  height: 33.334%;
}

.cell:nth-child(9) {
  top: 66.666%;
  left: 66.666%;
  width: 33.334%;
  height: 33.334%;
}

.cell.active {
  z-index: 1000;
  cursor: default;
  border: 1px solid rgba(255, 255, 255, 0);
  background: rgba(238, 0, 0, 0);
  overflow: visible !important;
  contain: none !important;
}

/* Hover suave sin saltos */
.cell:not(.active):hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
  z-index: 10;
}

#gridContainer.has-active .cell:not(.active) {
  opacity: 0.25;
  /* Solo atenuar, sin escalar ni mover */
  filter: brightness(0.4);
  pointer-events: none;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  /* SIN transform: scale - evita empuje hacia el centro */
}

.hover-plus-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease;
  overflow: hidden;
}

.cell:not(.active):hover .hover-plus-field {
  opacity: 1;
}

.compact-content {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 2vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
}

.cell.active .compact-content {
  z-index: 10;
  pointer-events: none;
}

.cell.active .cell-number {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  letter-spacing: 0.15em;
  margin-bottom: 0.5vh;
}

.cell-subtitle {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5vh;
  opacity: 1;
}

.cell.active .expanded-layer {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 0.5fr;
  grid-template-rows: 1fr 1fr 1fr;
  grid-template-areas:
    "empty1 colA colB empty4"
    "title  title title title"
    "empty6 desc desc empty8";
  opacity: 0;
  pointer-events: none;
  background: #00000000;
  z-index: 2;
  overflow: visible;
}

.cell.active .expanded-layer {
  opacity: 1;
  pointer-events: all;
}

.grid-empty1 {
  grid-area: empty1;
}

.grid-colA {
  grid-area: colA;
  padding: 1.5vw 3vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 3;
}

.grid-colB {
  grid-area: colB;
  padding: 1.5vw 3vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 3;
}

.grid-empty4 {
  grid-area: empty4;
}

.grid-empty6 {
  grid-area: empty6;
}

.grid-desc {
  grid-area: desc;
  padding: 1vw 3vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 3;
}

.grid-empty8 {
  grid-area: empty8;
}

.grid-title-text {
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 300;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.grid-list-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2vh;
  font-weight: 600;
}

.grid-list {
  list-style: none;
}

.grid-list li {
  font-size: clamp(0.85rem, 1.2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.9);
  padding: 1vh 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.grid-quote {
  font-size: clamp(1.2rem, 2vw, 1.3rem);
  line-height: 1.5;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.95);
}

.plus-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

.plus-icon {
  position: absolute;
  width: 5vw;
  height: 5vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plus-icon svg {
  width: 100%;
  height: 100%;
  opacity: 0.2;
}

/* IMAGOTIPO DE FONDO - SIN ANIMACIÓN (eliminado logoPulse basura) */
.team-background-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  height: auto;
  opacity: 0.15;
  filter: blur(8px);
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 0;
  /* Eliminado animation: logoPulse - era basura */
}

.team-background-logo svg {
  width: 100%;
  height: 100%;
  fill: #fff;
}

/* Eliminado keyframes logoPulse completamente */

.team-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(5, 1fr);
  width: 100%;
  height: 100%;
  background: transparent !important;
  contain: layout style paint;
}

.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

.grid-lines::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px
  );
  background-size: calc(100% / 7) 100%;
}

.grid-lines::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px
  );
  background-size: 100% calc(100% / 5);
}

.grid-crosses {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 101;
}

.cross {
  position: absolute;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
}

.cross::before,
.cross::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
}

.cross::before {
  width: 100%;
  height: 1px;
  top: 50%;
  left: 0;
}

.cross::after {
  width: 1px;
  height: 100%;
  left: 50%;
  top: 0;
}

.flap-cell {
  position: relative;
  transform-style: preserve-3d;
  cursor: pointer;
  z-index: 10;
  min-width: 0;
}

.flap-cell.animating {
  pointer-events: none;
}

.flap-front,
.flap-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  overflow: hidden;
  background: transparent !important;
}

.flap-back {
  transform: rotateX(180deg);
}

.flap-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  aspect-ratio: 2/3;
}

.info-cell .flap-front {
  overflow: visible;
}

.info-cell .flap-front img {
  position: absolute;
  width: 300%;
  height: 200%;
  object-fit: fill;
  filter: none;
  aspect-ratio: unset;
  max-width: none;
}

.flap-back .photo-fragment {
  aspect-ratio: 2/3;
}

.photo-fragment {
  position: absolute;
  width: 200%;
  height: 300%;
  object-fit: cover;
  max-width: none;
  display: block;
}

.text-fragment {
  position: absolute;
  width: 300%;
  height: 200%;
  object-fit: fill;
  max-width: none;
  display: block;
}

.has-photo.single-cell .flap-back .photo-fragment {
  width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.cell-empty .flap-back {
  background: transparent !important;
}

.info-cell .flap-back {
  background: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
}

.photo-2x3-color .flap-back {
  background: rgba(26, 26, 26, 0.8) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden !important;
  position: relative !important;
}

/* FIX: Asegurar que el sprite 2x3 se vea completo */
.photo-2x3-color .flap-back .photo-fragment {
  width: 200% !important;
  height: 300% !important;
  min-width: 200% !important;
  min-height: 300% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  position: absolute !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

.photo-2x3-color .flap-back::before,
.photo-2x3-color .flap-back::after {
  display: none !important;
}

.has-photo .flap-back {
  background: rgba(255, 255, 255, 0.9) !important;
}

.has-photo .flap-back .photo-fragment {
  filter: grayscale(100%) contrast(1.2);
  mix-blend-mode: multiply;
  position: relative;
  z-index: 2;
}

.has-photo .flap-back::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at center,
    #000 0%,
    #000 1px,
    transparent 1px
  );
  background-size: 4px 4px;
  opacity: 0.8;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: multiply;
}

.has-photo .flap-back::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  filter: contrast(20) brightness(1.1);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
}

.has-photo.dense .flap-back::before {
  background-size: 3px 3px;
  opacity: 0.9;
}

.has-photo.loose .flap-back::before {
  background-size: 6px 3px;
  opacity: 0.7;
}

.has-photo.angle .flap-back::before {
  transform: rotate(45deg);
  background-size: 5px 5px;
}

.info-cell .flap-back::before,
.info-cell .flap-back::after {
  display: none !important;
}

/* Hero text sprite en el frente de info-cell */
.info-cell .flap-front {
  overflow: visible;
}

.info-cell .flap-front .hero-fragment {
  position: absolute;
  width: 300%;
  height: 200%;
  object-fit: fill;
  filter: none;
  aspect-ratio: unset;
  max-width: none;
  display: block;
}

.section-content {
  max-width: 520px;
  width: 100%;
  position: relative;
  z-index: 11;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem;
}

.section-content::-webkit-scrollbar {
  width: 2px;
}

.section-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

.section-num {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 2rem;
  font-weight: 500;
  flex-shrink: 0;
}

.logo {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 100;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  flex-shrink: 0;
}

.tagline {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.description {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 3rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.title-section {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 100;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, #ccc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.text-section {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2.5rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  flex-shrink: 0;
}

.stat {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
}

.stat-num {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.process-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}

.process-item {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: rgba(255, 255, 255, 0.7);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.process-item:hover {
  color: var(--primary);
  padding-left: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.process-num {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  flex-shrink: 0;
}

.tech-item {
  background: rgba(255, 255, 255, 0.08);
  padding: 1.25rem;
  border-radius: 8px;
  text-align: center;
  font-size: clamp(0.85rem, 1.2vw, 0.9rem);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.tech-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--primary);
  transform: translateY(-2px);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex-shrink: 0;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.4);
}

.contact-value {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--primary);
  font-weight: 500;
}

.labels-container {
  position: fixed;
  left: 50%;
  top: 0;
  width: auto;
  height: 100vh;
  pointer-events: none;
  z-index: 200;
  display: none;
}

.section-label-outer {
  position: absolute;
  right: -6rem;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-body);
  text-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
  background: rgba(0, 0, 0, 0.4);
  padding: 1.5rem 0.5rem;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  transition: opacity 0.4s ease;
}

.section-label-outer.scrambling {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.nav-left {
  position: fixed;
  left: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 100;
  display: none;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.4s var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.3);
}

.dot.active {
  background: var(--primary);
  transform: scale(1.4);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================
           PANEL DERECHO - BOTONES UNIFICADOS PREMIUM
           ========================================== */
.panel-right {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}

/* Contenedor principal - glass premium */
/* ==========================================
           LOGO COLOR AL LADO DE CONTROLES
           ========================================== */
.visor-logo-color {
  position: absolute;
  top: 3vh;
  left: calc(50% + 4.5vw);
  /* Alineado con info-container */
  width: 2vw;
  height: auto;
  z-index: 31;
  filter: drop-shadow(0 0 15px rgba(194, 0, 255, 0.4));
  transition: all 0.4s ease;
  pointer-events: none;
  /* No interfiere con clics */
}

.visor-logo-color:hover {
  filter: drop-shadow(0 0 25px rgba(194, 0, 255, 0.8));
  transform: scale(1.05);
}

@media (max-width: 1024px) {
  .visor-logo-color {
    width: 6vw;
    top: 1.5vh;
    left: 52%;
  }
}

@media (max-width: 768px) {
  .visor-logo-color {
    display: none;
    /* Ocultar en móvil para no saturar */
  }
}

.controls-container {
  position: absolute;
  top: 3vh;
  right: 3vw;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 30;
  pointer-events: auto;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* 1. NAVEGACIÓN LINEAL - UNIFICADA */
.nav-lineal {
  display: flex;
  align-items: center;
  gap: 2px;
  border: none;
  border-radius: 0;
  overflow: visible;
  height: auto;
  background: transparent;
}

.model-counter-lineal {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.8);
  padding: 0 0.8rem;
  height: 44px;
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  font-weight: 500;
  box-sizing: border-box;
}

/* #play-pause-btn.playing neutralized */

/* Dots indicadores cuadrados */
.nav-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0.8rem;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  transition: background 0.3s ease;
}

.nav-dot.active {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
}

.nav-dot:hover {
  background: rgba(194, 0, 255, 0.5);
}

/* ==========================================
   BOTONES VISOR - CLASE UNIFICADA
   ========================================== */
.btn-visor {
  width: 44px;
  height: 44px;
  background: rgba(225, 0, 255, 0.055);
  border: 0.5px solid rgba(255, 255, 255, 0);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 200;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  border-radius: 20;
  transition: all 1s ease;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.btn-visor:hover {
  background: rgba(195, 0, 255, 0);
  border-color: rgb(255, 174, 0);
  color: #fff;
}

.btn-visor:active {
  background: rgba(194, 0, 255, 0.3);
}

/* Botón galería — estado activo cuando la galería está abierta */
.btn-visor.gallery-btn.active {
  background: rgba(194, 0, 255, 0.2);
  border-color: rgba(194, 0, 255, 0.8);
  box-shadow: 0 0 15px rgba(194, 0, 255, 0.3);
}
.btn-visor.gallery-btn.active .gallery-text-main {
  color: #c200ff;
}

/* Excepción galería — ancho variable por el texto de 2 líneas */
.btn-visor.gallery-btn {
  width: auto;
  min-width: 160px;
  padding: 0 1.5rem;
  flex-direction: column;
  gap: 0.15rem;
}

/* Excepción prev/next — símbolo más grande */
.btn-visor.btn-prev,
.btn-visor.btn-next {
  font-size: 1.5rem;
}

/* Rotación activa */
.btn-visor.btn-rotate.active,
.btn-visor.btn-rotate.active svg {
  animation: rotateIcon 3s linear infinite;
}

@keyframes rotateIcon {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.gallery-text-main {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #fff;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  line-height: 1;
  transition: all 0.3s ease;
}

.gallery-text-sub {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  line-height: 1;
  transition: all 0.3s ease;
}

/* 4. GUÍA DEL MOUSE - ELEGANTE */
.mouse-guide {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  height: auto;
  transition: all 0.4s ease;
}

.mouse-guide:hover {
  border-color: rgba(194, 0, 255, 0.3);
  background: rgba(194, 0, 255, 0.05);
}

.mouse-icon-wire {
  position: relative;
  width: 18px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 9px;
  flex-shrink: 0;
}

.mouse-icon-wire::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 3px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 1px;
}

.mouse-actions-wire {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.action-wire {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.action-label-wire {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: lowercase;
  white-space: nowrap;
}

.action-icon-wire {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

/* Responsive ajustado */
@media (max-width: 1024px) {
  .controls-container {
    top: 1.5vh;
    right: 2vw;
    left: 52%;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.4rem;
  }

  .gallery-btn-prominent {
    min-width: 140px;
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .controls-container {
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem;
  }

  .mouse-guide {
    display: none;
  }

  .gallery-btn-prominent {
    min-width: 120px;
    padding: 0 0.8rem;
  }

  .gallery-text-sub {
    display: none;
  }

  .gallery-text-main {
    font-size: 0.75rem;
  }

  .nav-lineal {
    height: 44px;
  }

  .btn-lineal,
  .btn-rotation {
    width: 44px;
    height: 44px;
  }

  .model-counter-lineal {
    height: 44px;
    padding: 0 1rem;
    font-size: 0.7rem;
  }
}

/* TÍTULO DEL PROYECTO CON FUENTE SPACE GROTESK 100 */

.loader {
  position: absolute;
  top: 50%;
  left: 75%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 5;
  display: none;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.gallery-overlay {
  position: fixed;
  inset: 0;
  width: 50%;
  height: 100%;
  background: rgba(5, 5, 7, 0.25);
  backdrop-filter: blur(40px) saturate(180%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  clip-path: circle(0% at 100% 0%);
  opacity: 0;
  pointer-events: none;
  transition:
    clip-path 1s var(--transition-dramatic),
    opacity 0.6s ease;
}

.gallery-overlay.active {
  clip-path: circle(150% at 100% 0%);
  opacity: 1;
  pointer-events: all;
}

.gallery-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(255, 51, 102, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(102, 51, 255, 0.1) 0%,
      transparent 50%
    );
}

.gallery-overlay.active .gallery-close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  transition-delay: 0.5s;
}

.gallery-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0);
}

.gallery-wrapper {
  display: flex;
  height: 100%;
  width: fit-content;
  will-change: transform;
}

.project-slide {
  position: relative;
  width: 50vw;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 4vw 4vw 4vw 4vw;
  gap: 2vw;
  contain: layout;
}

.project-image-container {
  position: relative;
  width: calc(50vw - 14vw);
  height: calc(100% - 8vw);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.project-image-container {
  position: relative;
  width: calc(50vw - 14vw);
  height: calc(100% - 8vw);
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 10;
}

.trail-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
}

.trail-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trail-c img {
  filter: grayscale(100%) brightness(1.3) sepia(100%) hue-rotate(180deg)
    saturate(500%) contrast(1.2);
}

.trail-m img {
  filter: grayscale(100%) brightness(1.3) sepia(100%) hue-rotate(280deg)
    saturate(500%) contrast(1.2);
}

.trail-y img {
  filter: grayscale(100%) brightness(1.3) sepia(100%) hue-rotate(10deg)
    saturate(500%) contrast(1.2);
}

.trail-k img {
  filter: grayscale(100%) brightness(0.7) contrast(1.4);
}

.project-number {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #999;
  z-index: 100;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  align-self: center;
}

.fixed-title {
  position: fixed;
  bottom: 4vw;
  left: 4vw;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #fff;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.gallery-overlay.active .fixed-title {
  opacity: 1;
  transition-delay: 0.5s;
}

.cursor-dot {
  position: fixed;
  width: 12px;
  height: 12px;
  background: #ffd700;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
}

.cursor-dot.active {
  opacity: 1;
}

.progress-bar-cmyk {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.gallery-overlay.active .progress-bar-cmyk {
  opacity: 1;
  transition-delay: 0.5s;
}

.progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.4s ease;
}

.progress-dot.active {
  background: #fff;
  transform: scale(1.3);
}

.scroll-hint {
  position: fixed;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #999;
  z-index: 50;
  animation: pulse 2s infinite;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.gallery-overlay.active .scroll-hint {
  opacity: 1;
  transition-delay: 0.8s;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.12;
  }

  50% {
    opacity: 0.8;
  }
}

/* FIX OVERFLOW-X PROCESOS */

.procesos-container {
  position: relative !important;
  width: 100% !important;
}

.procesos-slider-wrapper {
  perspective: 1200px;
  perspective-origin: 50% 50%;
  overflow: visible !important;
  cursor: grab;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.procesos-slider-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 100%;
  width: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  /* Centrado absoluto */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.procesos-expanded.active {
  overflow: visible !important;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .center-ribbon {
    width: 50px;
  }

  .vertical-brand {
    font-size: 0.55rem;
    letter-spacing: 0.25em;
  }

  .section-title-text {
    font-size: 0.6rem;
  }

  .panel-left {
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
  }

  .section-label-outer {
    right: 1rem;
    font-size: 0.75rem;
  }

  .controls-container {
    left: 50%;
    /* En tablet volver al centro */
    gap: 1rem;
    height: auto;
    flex-wrap: wrap;
  }

  .mouse-guide {
    display: none;
  }

  .gallery-overlay {
    width: 100%;
  }

  .project-slide {
    width: 100%;
    padding: 4vh 6vw 4vh 4vw;
  }

  .project-image-container {
    width: calc(100vw - 10vw);
    height: calc(100% - 8vh);
  }

  .home-headline {
    font-size: clamp(2rem, 8vw, 4rem);
  }

  .section-content {
    padding: 3rem;
    max-height: 85vh;
  }
}

@media (max-width: 768px) {
  .center-ribbon {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }

  .nav-left {
    left: 1rem;
    display: flex;
  }

  .section-label-outer {
    display: none;
  }

  .home-layout {
    padding: 2vh 6vw 6vh 6vw;
  }

  .home-headline {
    font-size: clamp(1.8rem, 10vw, 3rem);
  }

  .home-top-line {
    top: 30vh;
  }

  .home-label {
    top: calc(15vh + 6px);
  }

  .controls-container {
    top: 1rem;
    gap: 0.5rem;
    flex-direction: row;
    justify-content: center;
    width: 100%;
    left: 50%;
  }

  .nav-lineal,
  .btn-lineal,
  .model-counter-lineal,
  .gallery-btn-prominent,
  .btn-rotation {
    height: 50px;
  }

  .btn-lineal,
  .btn-rotation {
    width: 50px;
  }

  .gallery-text-sub {
    font-size: 0.7rem;
  }

  .gallery-text-main {
    display: none;
  }

  /* Ocultar texto pequeño en móvil */

  .cell:nth-child(1) {
    width: 50%;
    height: 20%;
  }

  .cell:nth-child(2) {
    left: 50%;
    width: 50%;
    height: 20%;
  }

  .cell:nth-child(3) {
    top: 20%;
    width: 50%;
    height: 20%;
  }

  .cell:nth-child(4) {
    top: 20%;
    left: 50%;
    width: 50%;
    height: 20%;
  }

  .cell:nth-child(5) {
    top: 40%;
    left: 0;
    width: 50%;
    height: 20%;
  }

  .cell:nth-child(6) {
    top: 40%;
    left: 50%;
    width: 50%;
    height: 20%;
  }

  .cell:nth-child(7) {
    top: 60%;
    left: 0;
    width: 50%;
    height: 20%;
  }

  .cell:nth-child(8) {
    top: 60%;
    left: 50%;
    width: 50%;
    height: 20%;
  }

  .cell:nth-child(9) {
    top: 80%;
    left: 0;
    width: 100%;
    height: 20%;
  }

  .expanded-layer {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "title"
      "colA"
      "colB"
      "desc";
    padding-top: 20vh;
  }

  .grid-empty1,
  .grid-empty4,
  .grid-empty6,
  .grid-empty8 {
    display: none;
  }
}

/* TÍTULO PROYECTOS - NUEVO */
/* ==========================================
           BOTONES DE CIERRE UNIFICADOS - PREMIUM
           ========================================== */

.close-btn,
.close-btn-team,
.gallery-close,
.procesos-close-btn {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(248, 248, 248, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  padding: 0;
  z-index: 1000;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.close-btn:hover,
.close-btn-team:hover,
.gallery-close:hover,
.procesos-close-btn:hover {
  color: #ffffff;
  background: rgba(194, 0, 255, 0.3);
  border-color: rgba(194, 0, 255, 0.9);
  transform: scale(0.3) rotate(90deg);
  box-shadow:
    0 0 30px rgba(194, 0, 255, 0.6),
    0 0 60px rgba(194, 0, 255, 0.3),
    0 0 0 2px rgba(194, 0, 255, 0.2);
}

.close-btn:active,
.close-btn-team:active,
.gallery-close:active,
.procesos-close-btn:active {
  transform: scale(0.5);
  box-shadow: 0 2px 10px rgba(194, 0, 255, 0.4);
}

.close-btn svg,
.close-btn-team svg,
.procesos-close-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

/* Posiciones específicas */
.close-btn {
  top: 3vh;
  right: 3vw;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.close-btn-team {
  /* Referencia: casilla 23 (col 3, row 3) */
  left: calc(100% / 7 * 2.55); /* 42.86% - inicio col 3 */
  top: calc(100% / 5 * 3.1); /* 60% - inicio row 3 */

  /* Centrado en la casilla */
  transform: translate(-50%, -50%) scale(0.8);

  opacity: 0;
  pointer-events: none;
}

.gallery-close {
  top: 2rem;
  right: 2rem;
  opacity: 0;
  transform: scale(0.8) rotate(-90deg);
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
  padding: 0;
}

/* Estados visibles */
.cell.active .close-btn,
.close-btn-team.visible,
.gallery-overlay.active .gallery-close,
.procesos-expanded.active .procesos-close-btn {
  opacity: 1;
  pointer-events: all;
  transform: scale(1) rotate(0deg);
  transition-delay: 0.5s;
}

/* Efecto pulse sutil para llamar la atención */
@keyframes pulseClose {
  0%,
  100% {
    box-shadow:
      0 4px 20px rgba(0, 0, 0, 0.4),
      0 0 0 0 rgba(194, 0, 255, 0.4);
  }

  50% {
    box-shadow:
      0 4px 25px rgba(0, 0, 0, 0.5),
      0 0 0 8px rgba(194, 0, 255, 0);
  }
}

.cell.active .close-btn,
.close-btn-team.visible,
.gallery-overlay.active .gallery-close,
.procesos-expanded.active .procesos-close-btn {
  animation: pulseClose 2s ease-in-out infinite;
  animation-delay: 1s;
}

.controls-title {
  font-family: var(--font-display) !important;
  font-size: clamp(1.75rem, 3vw, 2.5rem) !important;
  font-weight: 100 !important;
  color: #c200ff !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  text-shadow: 0 0 20px rgba(194, 0, 255, 0.3) !important;
  margin-right: 2rem !important;
  white-space: nowrap !important;
}

/* TITULOS DE SERVICIOS - NUEVO */
.cell-title {
  font-family: var(--font-display) !important;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem) !important;
  font-weight: 100;
  letter-spacing: -0.025em !important;
  color: #ffffffb9 !important;
  line-height: 1.1 !important;
  transform-origin: left bottom !important;
  will-change: transform, color !important;
  position: relative !important;
  z-index: 10 !important;
}

.cell.active .cell-title {
  font-family: var(--font-display) !important;
  font-weight: var(--weight-medium) !important;
  z-index: 100 !important;
  color: #fff !important;
}

#play-pause-btn {
  /* transition neutralized */
}

/* #play-pause-btn.playing neutralized */

.project-section-header {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  /* 20% más pequeño que 1.75rem/3vw/2.5rem */
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 400;
  margin-bottom: 1.5vh;
  padding-left: 55%;
  padding-top: 4vh;
}

/* ==========================================
           INFO PROYECTO - GRID 2x3 LIMPIO
           ========================================== */
.info-header {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 400;
  padding: 0 1.5rem 0.75rem 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  /* Estático: sin transición */
  transition: none;
}

.info-grid {
  display: grid;
  grid-template-columns: 140px 1fr 175px;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "num title title"
    "num desc meta";
  min-height: 140px;
  border: none !important;
  /* Transición suave para textos descriptivos */
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-grid.visible {
  opacity: 1;
  transform: translateY(0);
}

.info-number {
  grid-area: num;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 5vw, 5rem);
  font-weight: 700;
  color: #c200ff;
  border-right: 0.5px solid rgba(255, 255, 255, 0.2);
  aspect-ratio: 1 / 1;
  width: 100%;
  height: 100%;
  min-height: 140px;
}

.info-number span {
  line-height: 1;
  display: block;
}

.info-title {
  grid-area: title;
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem 0.5rem 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 100;
  color: #c200ff;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  border: none !important;
  border-bottom: none !important;
}

.info-description {
  grid-area: desc;
  display: flex;
  align-items: flex-start;
  padding: 0.5rem 1.5rem 0.5rem 0.5rem;
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  border: none !important;
}

.info-meta {
  grid-area: meta;
  display: grid !important;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, min-content);
  gap: 0.05rem;
  padding: 0 0 1rem 1.5rem;
  border: none !important;
  border-left: none !important;
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
}

.info-meta span {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-info-container {
  position: absolute;
  bottom: 3vw;
  left: calc(50% + 4.5vw);
  right: 3vw;
  border: none !important;
  outline: none !important;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
}

/* TÍTULOS VISIBLES EN CELDAS INACTIVAS */
#gridContainer.has-active .cell:not(.active) .cell-title {
  opacity: 1 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
}

.info-meta {
  border-left: none;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  flex-direction: row;
  gap: 1rem;
}

/* ==========================================
BOTONES PROCESOS - FLOTANTES INDEPENDIENTES (FIX)
========================================== */
.procesos-controls {
  position: absolute;
  top: 57%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 0; /* Colapsado para no capturar eventos del mouse */
  z-index: 1000;
  pointer-events: none;
  margin: 0;
  padding: 0;
  display: block; /* Eliminar flex para usar absolute en hijos */
}

.procesos-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  margin: 0;
  pointer-events: auto;
  border-radius: 50%;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Botón Anterior - Flotando a la izquierda del carrusel */
.procesos-nav-btn:first-child {
  left: calc(50% - 30vh); /* 24vh (mitad card) + 4vh margen */
}

/* Botón Siguiente - Flotando a la derecha del carrusel */
.procesos-nav-btn:last-child {
  right: calc(50% - 30vh);
}

.procesos-nav-btn:hover {
  background: rgba(194, 0, 255, 0.5);
  border-color: rgba(194, 0, 255, 0.9);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 30px rgba(194, 0, 255, 0.4);
}

.procesos-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.procesos-nav-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  transition: all 0.3s ease;
}

/* Ocultar flechas antiguas si quedan */
.procesos-arrow {
  display: none !important;
}

/* ==========================================
           OCULTAR SCROLLBAR EN PROCESOS
           ========================================== */
.procesos-slider-wrapper {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  overflow: -moz-scrollbars-none !important;
}

.procesos-slider-wrapper::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.procesos-slider-wrapper::-webkit-scrollbar-thumb {
  display: none !important;
}

.procesos-slider-wrapper::-webkit-scrollbar-track {
  display: none !important;
}

/* Asegurar que el contenedor padre tampoco muestre scrollbar */
.procesos-container {
  overflow-x: hidden !important;
  scrollbar-width: none !important;
}

.procesos-container::-webkit-scrollbar {
  display: none !important;
}
/* PROCESOS - Layout Empresa Integrado */
.procesos-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4vh 3vw;
  position: relative;
  overflow: hidden;
}

.procesos-header {
  margin-bottom: 3vh;
  position: relative;
  z-index: 2;
}

.procesos-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 100;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--primary);
  margin-bottom: 1vh;
  text-transform: uppercase;
}

.procesos-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
  max-width: 70%;
}

.procesos-slider-wrapper {
  position: relative;
  overflow: hidden;
  cursor: grab;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
}

.procesos-slider-wrapper:active {
  cursor: grabbing;
}

.procesos-slider-track {
  display: flex;
  gap: 2vw;
  height: 100%;
  will-change: transform;
  align-items: center;
  padding: 0 2vw;
}

.procesos-card {
  flex: 0 0 45vh;
  width: 45vh;
  height: 45vh;
  border: 1px solid rgb(255, 0, 0);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  /* Optimización */
  will-change: auto;
  contain: layout style paint;
}

.procesos-card.animating {
  will-change: transform, opacity;
}

.procesos-card:hover {
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(0px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(194, 0, 255, 0.1);
  backdrop-filter: saturate(400%);
}

.procesos-card-content {
  height: 100%;
  padding: 3vh 2vw;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.procesos-card h3 {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1vh;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-transform: uppercase;
}

.procesos-card p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  line-height: 1.4;
  max-width: 95%;
  flex: 1;
}

.procesos-illustration {
  width: 50%;
  height: 50%;
  margin: 0 auto 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: sepia(95%) saturate(500%) hue-rotate(180deg); /* #c200ff exacto */
}

.procesos-discover-btn {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 1vh;
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-display);
  transition: all 0.3s ease;
}

.procesos-arrow-square {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0;
}

.procesos-discover-btn:hover .procesos-arrow-square,
.procesos-card:hover .procesos-arrow-square {
  background: rgba(194, 0, 255, 0.2);
  border-color: rgba(194, 0, 255, 0.8);
  box-shadow: 0 0 20px rgba(194, 0, 255, 0.3);
}

.procesos-arrow-square span {
  position: relative;
  z-index: 2;
  transition: color 0.3s;
  font-size: 1.5rem;
  font-weight: 200;
  line-height: 1;
}

.procesos-discover-btn:hover .procesos-arrow-square span,
.procesos-card:hover .procesos-arrow-square span {
  color: #fff;
}

/* Eliminar el efecto del círculo anterior */
.procesos-arrow-square::before {
  display: none;
}

.procesos-controls-old {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22vw;
  margin-top: 2vh;
  padding-bottom: 2vh;
}

.procesos-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 200;
  backdrop-filter: blur(10px);
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.procesos-arrow:hover {
  background: rgba(194, 0, 255, 0.2);
  border-color: rgba(194, 0, 255, 0.8);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(194, 0, 255, 0.3);
  color: #c200ff;
}

.procesos-arrow::before {
  content: "";
  font-size: 1.8rem;
  font-weight: 200;
  line-height: 1;
  margin-top: -2px;
}

.procesos-arrow[onclick*="moveSlider(-1)"]::before {
  content: "‹";
}

.procesos-arrow[onclick*="moveSlider(1)"]::before {
  content: "›";
}

.procesos-expanded {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  display: flex;
  pointer-events: none;
  /* Permite clicks a través del contenedor vacío */
}

.procesos-expanded.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.procesos-expanded-content {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

.procesos-expanded-left {
  width: 50%;
  height: 100%;
  padding: 6vh 4vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  background: rgba(20, 20, 30, 0.97);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.procesos-expanded-right {
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  padding: 6vh 4vw;
  box-sizing: border-box;
}

.procesos-split-illustration {
  width: 70%;
  height: 70%;
  max-width: 350px;
  max-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.procesos-split-illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(1) brightness(2);
}

/* Posición específica procesos */
.procesos-close-btn {
  top: 3vh;
  right: 3vw;
}

.procesos-split-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2vh;
  opacity: 0.7;
  color: #c200ff;
}

.procesos-split-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.1;
  font-weight: 100;
  letter-spacing: -0.03em;
  color: var(--primary);
  margin-bottom: 3vh;
  text-transform: uppercase;
}

.procesos-split-desc {
  font-size: 0.9rem;
  line-height: 1.615;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.8vh;
  max-width: 90%;
}

.procesos-split-list {
  list-style: none;
  margin-top: 1.2vh;
}

.procesos-split-list li {
  padding: 1.425vh 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.855rem;
  display: flex;
  align-items: center;
  gap: 1vh;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s;
}

.procesos-split-list li:hover {
  padding-left: 1vh;
  color: #00ffbf;
}

.procesos-split-list li:before {
  content: "→";
  color: #00ffc8;
  font-weight: bold;
}

.procesos-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3vh;
  margin-top: auto;
  padding-top: 3vh;
  border-top: 1px solid rgba(0, 255, 213, 0.247);
}

.procesos-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.5vh;
}

.procesos-stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 100;
  line-height: 1;
  color: #00ffb3;
  letter-spacing: -0.03em;
}

.procesos-stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.procesos-split-illustration {
  width: 70%;
  height: 70%;
  stroke: rgb(0, 255, 255);
  stroke-width: 0.5;
  fill: none;
}

@media (max-width: 768px) {
  .procesos-card {
    flex: 0 0 25vh;
    height: 25vh;
  }

  .procesos-title {
    font-size: 1.5rem;
  }
}

/* Contenedor de controles */
.controls-container {
  gap: 0.5rem !important;
}

.nav-lineal {
  height: auto !important;
  border: none !important;
  background: transparent !important;
  overflow: visible !important;
}

/* ==========================================
   FIX: Procesos - Ocultar cards
   ========================================== */
.procesos-container .procesos-slider-wrapper,
.procesos-container .procesos-controls,
.procesos-container .procesos-header {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.procesos-container.expanded-mode .procesos-slider-wrapper,
.procesos-container.expanded-mode .procesos-controls,
.procesos-container.expanded-mode .procesos-header {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.procesos-expanded.active {
  z-index: 999 !important;
}

/* ==========================================
   FIX: Home headline - Fuente uniforme
   ========================================== */
#scramble-home-text-secondary {
  opacity: 1 !important;
}
.home-headline-secondary,
.home-headline-line-secondary {
  display: block !important;
  opacity: 1 !important;
  color: #ffffff !important;
  visibility: visible !important;
  font-weight: 100 !important;
  font-family: var(--font-display) !important;
}
.home-headline-line-secondary span {
  font-weight: 100 !important;
  font-family: var(--font-display) !important;
}

/* ==========================================
   FIX: Visor de Cámara (SIN líneas horizontales)
   ========================================== */
.camera-frame-container {
  position: fixed;
  top: 10vh;
  left: calc(50% + 4.5vw);
  right: 3vw;
  height: 70vh;
  pointer-events: none;
  z-index: 100;
}

.camera-frame-corner {
  position: absolute;
  width: 60px;
  height: 60px;
  pointer-events: none;
}

.camera-frame-corner.top-left {
  top: 30px;
  left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.camera-frame-corner.top-right {
  top: 30px;
  right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.camera-frame-corner.bottom-left {
  bottom: 30px;
  left: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.camera-frame-corner.bottom-right {
  bottom: 30px;
  right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.camera-frame-line-top {
  top: 30px;
}

.camera-frame-line-bottom {
  bottom: 30px;
}

.camera-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5rem;
  height: 5rem;
  pointer-events: none;
}

.camera-crosshair::before,
.camera-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.45);
}

.camera-crosshair::before {
  width: 1px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.camera-crosshair::after {
  width: 100%;
  height: 1px;
  top: 50%;
  transform: translateY(-50%);
}

/* ==========================================
   CARRUSEL 3D WETRANSFER-STYLE - PROCESOS
   ========================================== */
.procesos-slider-wrapper {
  perspective: 1200px;
  perspective-origin: 50% 50%;
  overflow: visible !important;
  cursor: grab;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.procesos-slider-wrapper:active {
  cursor: grabbing;
}

.procesos-slider-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 100%;
  width: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.procesos-card {
  flex: none;
  width: 48vh;
  height: 48vh; /* CUADRADA */
  position: absolute;
  transform-style: preserve-3d;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  backface-visibility: hidden;
  /* CENTRADO ABSOLUTO */
  left: 50%;
  top: 50%;
  margin-left: -24vh; /* -width/2 */
  margin-top: -24vh; /* -height/2 */
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 1);
}
.procesos-card.active:hover {
  background: rgba(0, 0, 0, 1);
}

/* Sistema dinámico de posiciones 3D - CENTRADAS E INFINITAS */
.procesos-card.active {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  z-index: 10;
  box-shadow: 0 25px 50px -12px rgba(163, 4, 255, 0.171);
  border-color: rgba(255, 255, 255, 0.3);
}

.procesos-card.prev {
  transform: translate3d(-13vh, 0, -12vh) rotateY(25deg) scale(0.85);
  opacity: 0.8;
  z-index: 8;
}

.procesos-card.next {
  transform: translate3d(13vh, 0, -12vh) rotateY(-25deg) scale(0.85);
  opacity: 0.8;
  z-index: 8;
}

.procesos-card.far-prev {
  transform: translate3d(-30vh, 0, -28vh) rotateY(35deg) scale(0.7);
  opacity: 0.5;
  z-index: 5;
}

.procesos-card.far-next {
  transform: translate3d(30vh, 0, -28vh) rotateY(-35deg) scale(0.7);
  opacity: 0.5;
  z-index: 5;
}

.procesos-card.deep-prev {
  transform: translate3d(-50vh, 0, -45vh) rotateY(45deg) scale(0.6);
  opacity: 0.3;
  z-index: 3;
}

.procesos-card.deep-next {
  transform: translate3d(50vh, 0, -45vh) rotateY(-45deg) scale(0.6);
  opacity: 0.3;
  z-index: 3;
}

.procesos-card.back-prev {
  transform: translate3d(-60vh, 0, -60vh) rotateY(55deg) scale(0.45);
  opacity: 0.15;
  z-index: 1;
}

.procesos-card.back-next {
  transform: translate3d(60vh, 0, -60vh) rotateY(-55deg) scale(0.45);
  opacity: 0.15;
  z-index: 1;
}

.procesos-card.hidden-left,
.procesos-card.hidden-right {
  transform: translate3d(0, 0, -80vh) scale(0.3);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

.procesos-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 2;
}

.procesos-card::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 10%;
  right: 10%;
  height: 20px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.3) 0%,
    transparent 70%
  );
  filter: blur(10px);
  transform: rotateX(90deg);
  transform-origin: center top;
  opacity: 0.6;
  transition: all 0.6s ease;
}

.procesos-card.active::after {
  opacity: 1;
  bottom: -30px;
  filter: blur(15px);
}

@media (max-width: 1024px) {
  .procesos-card {
    flex: none;
    width: 40vh;
    height: 40vh; /* CUADRADA */
    position: absolute;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    backface-visibility: hidden;
    /* CENTRADO ABSOLUTO */
    left: 50%;
    top: 50%;
    margin-left: -20vh; /* -width/2 */
    margin-top: -20vh; /* -height/2 */
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
  }
  .procesos-card.prev {
    transform: translateX(calc(-50% - 14vh)) translateZ(-12vh) rotateY(25deg)
      scale(0.85);
  }
  .procesos-card.next {
    transform: translateX(calc(-50% + 14vh)) translateZ(-12vh) rotateY(-25deg)
      scale(0.85);
  }
  .procesos-card.far-prev {
    transform: translateX(calc(-50% - 24vh)) translateZ(-28vh) rotateY(35deg)
      scale(0.7);
  }
  .procesos-card.far-next {
    transform: translateX(calc(-50% + 24vh)) translateZ(-28vh) rotateY(-35deg)
      scale(0.7);
  }
  .procesos-card.deep-prev {
    transform: translateX(calc(-50% - 32vh)) translateZ(-45vh) rotateY(45deg)
      scale(0.6);
  }
  .procesos-card.deep-next {
    transform: translateX(calc(-50% + 32vh)) translateZ(-45vh) rotateY(-45deg)
      scale(0.6);
  }
  .procesos-card.back-prev {
    transform: translateX(calc(-50% - 38vh)) translateZ(-60vh) rotateY(55deg)
      scale(0.45);
  }
  .procesos-card.back-next {
    transform: translateX(calc(-50% + 38vh)) translateZ(-60vh) rotateY(-55deg)
      scale(0.45);
  }

  /* Ajustar botones flotantes en tablets */
  .procesos-nav-btn:first-child {
    left: calc(50% - 24vh);
  }
  .procesos-nav-btn:last-child {
    right: calc(50% - 24vh);
  }
}

@media (max-width: 768px) {
  .procesos-card {
    flex: none;
    width: 40vh;
    height: 40vh; /* CUADRADA */
    position: absolute;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    backface-visibility: hidden;
    /* CENTRADO ABSOLUTO */
    left: 50%;
    top: 50%;
    margin-left: -20vh; /* -width/2 */
    margin-top: -20vh; /* -height/2 */
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
  }
  .procesos-card.prev {
    transform: translateX(calc(-50% - 40vw)) translateZ(-12vh) rotateY(20deg)
      scale(0.9);
    opacity: 0.6;
  }
  .procesos-card.next {
    transform: translateX(calc(-50% + 40vw)) translateZ(-12vh) rotateY(-20deg)
      scale(0.9);
    opacity: 0.6;
  }
  .procesos-card.far-prev,
  .procesos-card.far-next,
  .procesos-card.deep-prev,
  .procesos-card.deep-next,
  .procesos-card.back-prev,
  .procesos-card.back-next {
    opacity: 0;
    pointer-events: none;
  }

  /* Ajustar botones flotantes en móvil - más cerca del centro */
  .procesos-nav-btn:first-child {
    left: 5%;
  }
  .procesos-nav-btn:last-child {
    right: 5%;
  }
}
/* ==========================================
   MÁGICA ESCENA - UTILITIES
   ========================================== */

/* Ocultar loader cuando termine la carga */
.loaded #loader,
.loader-hidden {
  display: none !important;
  animation: none !important;
  visibility: hidden;
  opacity: 0;
}

/* Pausar animaciones cuando body tiene clase 'paused' */
body.paused-animations * {
  animation-play-state: paused !important;
}
/* ═══════════════════════════════════════════════════════════
   LAYOUT DE CONTACTO - Estilos organizados y limpios
   ═══════════════════════════════════════════════════════════ */

.contact-layout {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3vh 3vw 3vw 3vw;
  font-family: var(--font-display);
}

.contact-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 91vh;
  justify-content: flex-end;
  padding-bottom: 4vh;
}

.contact-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.contact-section-phone {
  margin: 2vh 0;
}

.contact-phone-link {
  font-size: clamp(2.5rem, 5vw, 3rem);
  color: #b700ff;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
}

.contact-phone-link:hover {
  text-shadow: 0 0 30px rgba(211, 2, 253, 0.5);
}

.contact-hours {
  margin-top: 0.5vh;
  display: block;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3vw;
  max-width: 95%;
  margin-top: 2vh;
}

.contact-col {
  display: flex;
  flex-direction: column;
  gap: 1vh;
}

.contact-label-small {
  font-size: 0.65rem;
  margin: 0;
}

.contact-text {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
  margin-top: 0.5vh;
  line-height: 1.4;
}

.contact-email {
  font-family: var(--font-display) !important;
  font-size: 1rem !important;
  color: #fff !important;
  text-decoration: none !important;
  display: block !important;
  margin-top: 0.5vh !important;
  border-bottom: none !important; /* ← Fuerza sin línea */
  padding-bottom: 0 !important; /* ← Sin espacio extra */
  width: fit-content !important;
  transition: all 0.3s !important;
}

.contact-email:hover {
  color: #c200ff !important;
  border-bottom: none !important; /* ← También en hover */
}

.contact-social-links {
  display: flex;
  flex-direction: column;
  gap: 1vh;
  margin-top: 0.5vh;
}

.contact-social-link {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5vw;
  transition: all 0.3s;
}

.contact-social-link:hover {
  color: #c200ff;
  transform: translateX(5px);
}

.contact-services {
  margin-top: 3vh;
  max-width: 95%;
}

.contact-services-label {
  font-size: 0.65rem;
  margin: 0;
  display: inline-block;
  margin-right: 1vw;
}

.contact-services-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.contact-footer {
  margin-top: 3vh;
  padding-top: 1.5vh;
}

.contact-footer-nit {
  margin-top: 1vh;
  display: block;
}

/* Título específico de contacto */
.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  max-width: 85vw;
  line-height: 0.95;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
  padding: 0;
}

/* Descripción específica de contacto */
.contact-description {
  max-width: 500px;
  font-size: 1.1rem;
  line-height: 1.6;
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.85);
}
/* ═══════════════════════════════════════════════════════════
   POPUP DE CONTACTO - Llamada o WhatsApp
   ═══════════════════════════════════════════════════════════ */

.contact-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.contact-popup.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.contact-popup-content {
  background: rgba(10, 10, 15, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 2rem;
  min-width: 280px;
  max-width: 90vw;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.contact-popup.active .contact-popup-content {
  transform: scale(1);
}

.contact-popup-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.contact-popup-close:hover {
  background: rgba(194, 0, 255, 0.2);
  border-color: #c200ff;
}

.contact-popup-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: -0.01em;
}

.contact-popup-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-popup-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
}

.contact-popup-option:hover {
  background: rgba(194, 0, 255, 0.1);
  border-color: rgba(194, 0, 255, 0.5);
  transform: translateX(4px);
}

.contact-popup-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.contact-popup-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ============================================================
   TIPOGRAFÍA ESCALADA — monitores < 1700px
   Reducción del 22% en todas las variables de fuente
   ============================================================ */
@media (max-width: 1699px) {
  /* SERVICIOS expanded — elementos flotantes, sin depender del grid */
  .cell.active .expanded-layer {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    overflow: visible !important;
  }

  /* Ocultar celdas vacías del grid */
  .cell.active .grid-empty1,
  .cell.active .grid-empty4,
  .cell.active .grid-empty6,
  .cell.active .grid-empty8 {
    display: none !important;
  }

  /* Columna A — flotante, alineada con el quote */
  .cell.active .grid-colA {
    position: absolute !important;
    top: 6% !important;
    left: 25% !important;
    width: 34% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* Columna B — flotante derecha, más separada de colA */
  .cell.active .grid-colB {
    position: absolute !important;
    top: 6% !important;
    left: 63% !important;
    width: 34% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* Quote — left alineado con colA, 40% más ancho */
  .cell.active .grid-desc {
    position: absolute !important;
    bottom: 19% !important;
    left: 25% !important;
    width: 48% !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .grid-list-title {
    font-size: 0.65rem !important;
    margin-bottom: 1.2vh !important;
  }
  .grid-list li {
    font-size: 0.82rem !important;
    padding: 0.7vh 0 !important;
  }
  .grid-quote {
    font-size: 0.82rem !important;
    line-height: 1.6 !important;
  }

  .grid-title-text {
    font-size: clamp(1.25rem, 3.1vw, 3.12rem) !important;
  }

  /* Controles visor 3D — compactos, sin nav-dots */
  .controls-container {
    gap: 0.3rem !important;
    padding: 0 !important;
  }

  .btn-visor {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.9rem !important;
  }

  .btn-visor.btn-prev,
  .btn-visor.btn-next {
    font-size: 1.1rem !important;
  }

  .btn-visor.gallery-btn {
    min-width: 110px !important;
    padding: 0 0.8rem !important;
  }

  .gallery-text-main {
    font-size: 0.62rem !important;
  }
  .gallery-text-sub {
    font-size: 0.5rem !important;
  }

  .model-counter-lineal {
    font-size: 0.62rem !important;
    padding: 0 0.5rem !important;
    height: 32px !important;
  }

  /* Ocultar dots — demasiado espacio para < 1700px */
  .nav-dots {
    display: none !important;
  }

  /* Ocultar mouse guide */
  .mouse-guide {
    display: none !important;
  }

  /* Ribbon — 15% más ancho, dots 30% más pequeños */
  .center-ribbon {
    width: 1.725vw !important;
  }

  .ribbon-dot {
    width: 10px !important;
    height: 10px !important;
  }

  .ribbon-dot.active::after {
    width: 8px !important;
    height: 8px !important;
  }

  /* Botones cerrar — 40% más pequeños */
  .close-btn,
  .close-btn-team,
  .gallery-close,
  .procesos-close-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 1rem !important;
  }

  .close-btn svg,
  .close-btn-team svg,
  .procesos-close-btn svg {
    width: 13px !important;
    height: 13px !important;
  }

  :root {
    --text-xs: 0.51rem;
    --text-sm: 0.59rem;
    --text-base: 0.7rem;
    --text-md: 0.78rem;
    --text-lg: 0.86rem;
    --text-xl: 0.98rem;
    --text-2xl: 1.17rem;
    --text-3xl: clamp(1.4rem, 2.3vw, 1.95rem);
    --text-4xl: clamp(1.56rem, 3.1vw, 2.73rem);
    --text-5xl: clamp(1.95rem, 3.9vw, 3.9rem);
    --text-6xl: clamp(2.73rem, 3.9vw, 3.9rem);
  }

  /* Textos hardcodeados más comunes — reducción directa */
  .home-headline-secondary {
    font-size: clamp(1.95rem, 3.9vw, 3.9rem) !important;
  }
  .home-headline-compact {
    font-size: clamp(0.98rem, 1.95vw, 1.95rem) !important;
  }
  .home-description {
    font-size: 0.78rem !important;
  }
  .home-label {
    font-size: 0.55rem !important;
  }

  .contact-headline {
    font-size: clamp(1.1rem, 1.8vw, 2rem) !important;
    line-height: 0.95 !important;
  }
  .contact-phone-link {
    font-size: clamp(1.4rem, 2.8vw, 1.9rem) !important;
  }
  .contact-description {
    font-size: 0.78rem !important;
  }
  .contact-section-phone {
    margin: 0.8vh 0 !important;
  }
  .contact-hours {
    font-size: 0.6rem !important;
  }
  .contact-label-small,
  .contact-services-label {
    font-size: 0.55rem !important;
  }
  .contact-text,
  .contact-email,
  .contact-address-text {
    font-size: 0.75rem !important;
  }
  .contact-social-link {
    font-size: 0.75rem !important;
  }
  .contact-services-text {
    font-size: 0.72rem !important;
  }

  .procesos-title {
    font-size: clamp(1.4rem, 2.34vw, 1.95rem) !important;
  }
  .procesos-split-title {
    font-size: clamp(1.56rem, 2.34vw, 2.18rem) !important;
  }

  .grid-title-text {
    font-size: clamp(1.56rem, 3.9vw, 3.9rem) !important;
  }
  .grid-quote {
    font-size: clamp(0.94rem, 1.56vw, 1.01rem) !important;
  }
  .cell-title {
    font-size: clamp(0.86rem, 1.4vw, 1.09rem) !important;
  }

  .info-title {
    font-size: clamp(1.17rem, 1.95vw, 1.56rem) !important;
  }
  .info-description {
    font-size: 0.78rem !important;
  }
  .info-header {
    font-size: 0.59rem !important;
  }

  .section-title-text {
    font-size: 0.78rem !important;
  }
  .vertical-brand {
    font-size: 0.51rem !important;
  }
}
