/* LogIA — Hero con globo + zoom a Barcelona
   Todo lo de este archivo va prefijado con .lg- para no chocar con tus estilos. */

.lg-story {
  --lg-bg: #050a18;
  --lg-text: #e6ecf8;
  --lg-muted: #b4c0d8;
  --lg-accent: #3b82f6;
  --lg-accent-soft: #7fb2ff;
  --lg-dive: 0;
  --lg-black: 0;
  position: relative;
  height: 520vh; /* +tramo de zambullida Barcelona → oficina */
  background: var(--lg-bg);
  color: var(--lg-text);
  font-family: Inter, system-ui, sans-serif;
  z-index: 2;
}
/* Al ceder a la oficina, el bloque del mapa deja de tapar lo que hay debajo */
.lg-story.lg-handoff {
  background: transparent;
  z-index: 0;
}

.lg-stage {
  position: sticky;
  top: 0;
  z-index: 2;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--lg-bg);
  /* El mapa cede solo cuando el fundido a negro ya cubre el plano */
  opacity: calc(1 - var(--lg-dive, 0));
  transition: none;
  pointer-events: none;
}

/* Cortina negra: el zoom a BCN termina en negro; la oficina arranca desde negro */
.lg-curtain {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background: #000;
  opacity: var(--lg-black, 0);
  will-change: opacity;
}

.lg-gl,
.lg-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform: translateZ(0);
  will-change: contents;
}
.lg-gl { z-index: 1; }
.lg-fx { z-index: 2; }

/* Velo oscuro detrás del titular (solo en la composición "centrado") */
.lg-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(60% 46% at 50% 44%, rgba(5, 10, 24, 0.82) 0%, rgba(5, 10, 24, 0.55) 45%, rgba(5, 10, 24, 0) 100%);
  opacity: 0;
}
.lg-story[data-composicion="centrado"] .lg-scrim { opacity: var(--lg-h, 1); }

/* ---------- Hero ---------- */
.lg-hero {
  position: absolute;
  inset: 0;
  z-index: 3;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(100px, 15vh, 150px) 24px 0;
  text-align: center;
  pointer-events: none;
  opacity: var(--lg-h, 1);
  transform: translateY(calc((1 - var(--lg-h, 1)) * -56px));
}
.lg-story[data-composicion="centrado"] .lg-hero {
  justify-content: center;
  padding-top: 72px;
}

.lg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background: rgba(12, 24, 52, 0.6);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a9c4f5;
}
.lg-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 10px #60a5fa;
}

.lg-title {
  margin: 26px 0 0;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 800;
  font-size: clamp(40px, min(6vw, 9.5vh), 86px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #f4f7ff;
  text-shadow: 0 4px 40px rgba(5, 10, 24, 0.8);
}
.lg-title em {
  display: block;
  margin-top: 0.06em;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.97em;
  letter-spacing: -0.01em;
  color: var(--lg-accent-soft);
}

.lg-sub {
  margin: 22px 0 0;
  max-width: 540px;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--lg-muted);
  text-shadow: 0 2px 20px rgba(5, 10, 24, 0.9);
}

.lg-ctas {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  pointer-events: auto;
}
.lg-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: filter 0.2s, transform 0.2s;
}
.lg-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.lg-btn--primary {
  background: var(--lg-accent);
  color: #fff;
  box-shadow: 0 12px 36px -12px rgba(59, 130, 246, 0.8);
}
.lg-btn--ghost {
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(10, 20, 42, 0.6);
  color: #dce5f5;
  font-weight: 500;
}

.lg-cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d4def2;
  text-shadow: 0 1px 12px rgba(5, 10, 24, 0.9);
  pointer-events: none;
  opacity: var(--lg-h, 1);
}
.lg-cue svg { animation: lg-bob 1.8s ease-in-out infinite; }
@keyframes lg-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Texto que aparece al llegar a España ---------- */
.lg-caption {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 5vw, 72px);
  right: 20px;
  bottom: clamp(32px, 10vh, 104px);
  max-width: 470px;
  pointer-events: none;
  opacity: var(--lg-c1, 0);
  transform: translateY(calc((1 - var(--lg-c1, 0)) * 24px));
  text-shadow: 0 2px 24px rgba(5, 10, 24, 0.95);
}
.lg-caption__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lg-accent-soft);
}
.lg-caption__title {
  margin: 12px 0 0;
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #f4f7ff;
}
.lg-caption__text {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--lg-muted);
}

.lg-nowrap { white-space: nowrap; }

@media (max-width: 600px) {
  .lg-eyebrow { font-size: 10px; letter-spacing: 0.08em; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-cue svg { animation: none; }
}
