/* ─── RESET & ESTRUCTURA BASE ──────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }

:root {
  /* Universos cromáticos muteados */
  --bg-foto:       #E8E3DB;   /* Lino Crudo */
  --text-foto:     #1F1D1B;   /* Grafito Absoluto */
  --gold-foto:     #9E7648;   /* Latón Envejecido */
  --gold-foto-dim: rgba(158, 118, 72, 0.15);
  
  --bg-diseno:     #DCDAD1;   /* Arena Mate */
  --text-diseno:   #111111;   /* Negro Brutalista */
  --blue-diseno:   #0014FF;   /* Azul Técnico */

  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-sans:  'Outfit', sans-serif;
  --ff-tech:  'Space Grotesk', sans-serif;
  
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  background: #111111;
  font-family: var(--ff-sans);
  overflow: hidden;
  min-height: 100vh;
  cursor: none;
}

/* ─── TEXTURA & CURSOR ─────────────────────────────────────── */
.noise {
  position: fixed; inset: -50%; width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .03; pointer-events: none; z-index: 90;
}

.cursor {
  position: fixed; width: 6px; height: 6px; background: #000; border-radius: 50%;
  pointer-events: none; z-index: 9999; transform: translate(-50%,-50%);
  transition: width .3s var(--ease-expo), height .3s var(--ease-expo);
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.8); border-radius: 50%;
  pointer-events: none; z-index: 9998; transform: translate(-50%,-50%);
  transition: transform .15s var(--ease-expo), width .4s var(--ease-expo), height .4s var(--ease-expo);
  mix-blend-mode: difference;
}
.cursor.hover { width: 16px; height: 18px; }
.cursor-ring.hover { width: 50px; height: 50px; opacity: .4; }

/* ─── CABECERA FLOTANTE MEJORADA ───────────────────────────── */
.hub-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  padding: 2.5rem 4rem; display: flex; justify-content: space-between;
  font-family: var(--ff-tech); font-size: 0.7rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--text-foto); opacity: 0.5;
  pointer-events: none; 
}
.hub-brand {
  pointer-events: auto; 
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s var(--ease-expo);
}
.hub-brand:hover { opacity: 0.8; }

.hub-location { 
  pointer-events: auto; /* Actúa como escudo sólido */
  user-select: none; /* Evita que el usuario seleccione el texto por accidente */
}

/* ─── CONTENEDOR PRINCIPAL ─────────────────────────────────── */
.hub-main { min-height: 100vh; display: flex; width: 100vw; position: relative; }

.hub-panel {
  position: relative; width: 50%; display: flex; flex-direction: column;
  justify-content: center; padding: 6rem; text-decoration: none;
  transition: width 0.7s var(--ease-expo), filter 0.5s;
  overflow: hidden;
}
.hub-panel:hover { filter: brightness(0.96); }
.panel-body { position: relative; z-index: 10; max-width: 480px; width: 100%; }

/* ─── TEXTURAS FONDO (MANOS) ───────────────────────────────── */
.bg-hand {
  position: absolute; top: 50%; height: 65vh; width: auto; z-index: 1;
  opacity: 0.08; filter: grayscale(100%) contrast(1.2);
  mix-blend-mode: multiply; pointer-events: none;
  transition: transform 1.2s var(--ease-expo), opacity 0.8s;
}
.hand-human { left: -5%; transform: translateY(-50%) rotate(5deg); }
.panel-foto:hover .hand-human { transform: translateY(-50%) rotate(0deg) scale(1.05) translateX(3%); opacity: 0.18; }

.hand-robot { right: -5%; transform: translateY(-50%) rotate(-5deg); }
.panel-diseno:hover .hand-robot { transform: translateY(-50%) rotate(0deg) scale(1.05) translateX(-3%); opacity: 0.18; }

/* ─── PANEL FOTOGRAFÍA (IZQUIERDA ORIGINAL) ─────────────────── */
.panel-foto { background-color: var(--bg-foto); color: var(--text-foto); align-items: flex-start; text-align: left; }
.panel-foto .panel-meta { font-family: var(--ff-sans); font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-foto); margin-bottom: 1.5rem; display: block; font-weight: 400; }
.panel-foto .panel-title { font-family: var(--ff-display); font-size: clamp(2.5rem, 4vw, 4.5rem); font-weight: 300; margin-bottom: 0.8rem; letter-spacing: 0.02em; }
.panel-foto .panel-tagline { font-family: var(--ff-sans); font-size: 0.85rem; color: var(--text-foto); opacity: 0.65; margin-bottom: 3.5rem; font-weight: 300; }

.panel-foto .cta-btn {
  display: inline-flex; align-items: center; gap: 1rem; padding: 1.2rem 2.5rem;
  font-family: var(--ff-sans); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  border: 1px solid var(--gold-foto); color: var(--gold-foto); position: relative; overflow: hidden;
  transition: color .4s var(--ease-expo); z-index: 20;
}
.panel-foto .cta-btn::before {
  content: ''; position: absolute; inset: 0; background: var(--gold-foto-dim);
  transform: translateX(-101%); transition: transform .5s var(--ease-expo); z-index: -1;
}
.panel-foto .cta-btn:hover::before { transform: translateX(0); }
.panel-foto .cta-btn:hover { color: var(--text-foto); }

/* ─── PANEL DISEÑO (DERECHA ORIGINAL) ─────────────────────── */
.panel-diseno { background-color: var(--bg-diseno); color: var(--text-diseno); align-items: flex-end; text-align: right; }
.panel-diseno .panel-body { display: flex; flex-direction: column; align-items: flex-end; }
.panel-diseno .panel-meta { font-family: var(--ff-tech); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--blue-diseno); margin-bottom: 1.5rem; display: block; font-weight: 700; }
.panel-diseno .panel-title { font-family: var(--ff-tech); font-size: clamp(2.2rem, 3.8vw, 4rem); font-weight: 700; margin-bottom: 0.8rem; letter-spacing: -0.02em; text-transform: uppercase; }
.panel-diseno .panel-tagline { font-family: var(--ff-sans); font-size: 0.85rem; color: #444444; margin-bottom: 3.5rem; font-weight: 400; }

.panel-diseno .cta-btn {
  display: inline-flex; align-items: center; gap: 1rem; padding: 1.2rem 2.5rem;
  font-family: var(--ff-tech); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--blue-diseno); color: #fff; border: 2px solid var(--blue-diseno);
  position: relative; overflow: hidden; transition: all .4s var(--ease-expo); z-index: 20;
}
.panel-diseno .cta-btn::before {
  content: ''; position: absolute; inset: 0; background: var(--text-diseno);
  transform: translateX(-101%); transition: transform .5s var(--ease-expo); z-index: -1;
}
.panel-diseno .cta-btn:hover::before { transform: translateX(0); }
.panel-diseno .cta-btn:hover { border-color: var(--text-diseno); color: #fff; transform: translateY(-2px); }

.action-arrow { transition: transform 0.4s var(--ease-expo); display: inline-block; }
.hub-panel:hover .action-arrow { transform: translateX(6px); }

/* EXPANSIÓN DINÁMICA DE SECCIONES */
.hub-main:has(.panel-foto:hover) .panel-foto { width: 56%; }
.hub-main:has(.panel-foto:hover) .panel-diseno { width: 44%; }
.hub-main:has(.panel-diseno:hover) .panel-diseno { width: 56%; }
.hub-main:has(.panel-diseno:hover) .panel-foto { width: 44%; }

/* ─── EJE CENTRAL DINÁMICO ────────────────────────────────── */
.hub-divider {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: rgba(31, 29, 27, 0.12); z-index: 50; transform: translateX(-50%);
  transition: left 0.7s var(--ease-expo);
}
.hub-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: #111111; border: 1px solid rgba(255,255,255,0.15);
  width: 46px; height: 40px; display: flex; align-items: center; justify-content: center;
}
.badge-text { font-family: var(--ff-tech); font-size: 0.7rem; color: #ffffff; }

.hub-main:has(.panel-foto:hover) .hub-divider { left: 56%; }
.hub-main:has(.panel-diseno:hover) .hub-divider { left: 44%; }

/* ─── REVEAL ENGINE ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(15px); transition: opacity 0.8s var(--ease-expo), transform 0.8s var(--ease-expo); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ─── RESPONSIVE MOBILE ────────────────────────────────────── */
@media (max-width: 900px) {
  .hub-main { flex-direction: column; }
  .hub-panel { width: 100% !important; min-height: 50vh; padding: 4rem 2rem; }
  .panel-diseno { align-items: flex-start; text-align: left; }
  .panel-diseno .panel-body { align-items: flex-start; }
  .bg-hand { height: 40vh; opacity: 0.05; }
  .hand-human { left: -10%; top: 60%; }
  .hand-robot { right: -10%; top: 60%; }
  .hub-divider { left: 0 !important; right: 0; top: 50%; bottom: auto; width: 100%; height: 1px; }
  .hub-badge { top: 50%; left: 50%; }
  .hub-header { padding: 1.5rem 2rem; }
  .hub-location { display: none; }
}