/* Laponia · "Donde empieza el Ártico" — la Tierra que se reproduce sola (motor en assets/js/globe3d.js).
   Las clases s1..s7 las pone el motor según el tiempo de la secuencia; gsx-static = estado final sin animación. */
.globe-story.gsx { position: relative; height: 100svh; min-height: 600px; overflow: hidden; color: var(--on-media);
  background: radial-gradient(110% 95% at 68% 62%, #0F264B 0%, #0A1832 38%, #050D1D 70%, #02060F 100%); }
.gsx-stage { position: absolute; inset: 0; }
.gsx-globe { position: absolute; inset: 0; z-index: 0; }
.gsx-globe canvas { display: block; width: 100%; height: 100%; transition: opacity .2s linear; }

/* velos: viñeta del primer plano + sombras suaves detrás de cada bloque de texto (sin recuadros) */
.gsx-vig, .gsx-shade-a, .gsx-shade-b { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1.6s ease; }
.gsx-vig { background: radial-gradient(120% 95% at 60% 42%, transparent 52%, rgba(2,6,15,.55) 100%); }
.gsx-shade-a { background: linear-gradient(90deg, rgba(3,9,20,.78) 0%, rgba(3,9,20,.5) 32%, transparent 56%); }
.gsx-shade-b { background: radial-gradient(60% 55% at 86% 92%, rgba(3,9,20,.8) 0%, rgba(3,9,20,.45) 50%, transparent 100%); }
.gsx.s4 .gsx-vig, .gsx.s4 .gsx-shade-a { opacity: 1; }
.gsx.s6 .gsx-shade-b { opacity: 1; }

/* título centrado mientras sube la Tierra */
.gsx-intro { position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--header-h) + 7svh); text-align: center; padding: 0 var(--gutter);
  opacity: 0; transform: translateY(16px); transition: opacity 1s ease, transform 1.2s cubic-bezier(.22,.8,.2,1); }
.gsx-intro .kicker { color: var(--ice); }
.gsx-h { font-family: var(--f-quote); font-weight: 500; font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1; margin: .1em 0 0; color: var(--on-media); }
.gsx.s1 .gsx-intro { opacity: 1; transform: none; }
.gsx.s2 .gsx-intro { opacity: 0; transform: translateY(-14px); transition-duration: .7s, .9s; }

/* bloques de texto: aparecen pieza a pieza */
.gsx-text { position: absolute; z-index: 3; padding: 0 var(--gutter); text-shadow: 0 1px 16px rgba(2,6,15,.7), 0 1px 3px rgba(2,6,15,.4); }
.gsx-text > * { opacity: 0; transform: translateY(14px); transition: opacity 1s ease, transform 1.2s cubic-bezier(.22,.8,.2,1); }
.gsx-text p { color: rgba(250,248,245,.92); font-size: clamp(1rem, 1.25vw, 1.12rem); line-height: 1.65; margin: 0 0 .9em; }
.gsx-text p:last-child { margin-bottom: 0; }
.gsx-a { left: max(0px, calc((100vw - var(--maxw)) / 2)); top: 50%; transform: translateY(-50%); width: min(34rem, 42vw); box-sizing: border-box; }
.gsx-a h2 { font-family: var(--f-quote); font-weight: 500; font-size: clamp(2.4rem, 4.2vw, 4rem); line-height: 1; margin: 0 0 .45em; color: var(--on-media); }
.gsx-b { right: max(0px, calc((100vw - var(--maxw)) / 2)); bottom: 8svh; width: min(30rem, 38vw); box-sizing: border-box; }
.gsx.s2 .gsx-a h2, .gsx.s3 .gsx-a p, .gsx.s6 .gsx-b p:nth-child(1), .gsx.s7 .gsx-b p:nth-child(n+2) { opacity: 1; transform: none; }

/* punto de Levi (lo coloca el motor) */
.gsx-pin { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.gsx-pin.on { opacity: 1; }
.gsx-dot, .gsx-ring { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; }
.gsx-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.22), 0 0 16px 2px rgba(170,210,255,.85); transform: scale(0); transition: transform .7s cubic-bezier(.34,1.56,.64,1); }
.gsx-ring { border: 1.5px solid rgba(255,255,255,.85); opacity: 0; }
.gsx-pin.on .gsx-dot { transform: scale(1); }
.gsx-pin.on .gsx-ring { animation: gsxPulse 2.4s cubic-bezier(.2,.7,.3,1) .6s infinite; }
.gsx-label { position: absolute; left: 16px; top: -.62em; font-family: var(--f-body); font-size: .8rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; line-height: 1.2;
  color: #fff; white-space: nowrap; padding-left: 12px; text-shadow: 0 1px 10px rgba(2,6,15,.8);
  opacity: 0; transform: translateX(-6px); transition: opacity .8s ease .35s, transform .9s cubic-bezier(.22,.8,.2,1) .35s; }
.gsx-label::before { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 1px; background: rgba(255,255,255,.75); }
.gsx-pin.on .gsx-label { opacity: 1; transform: none; }
@keyframes gsxPulse { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(4); opacity: 0; } }

/* sin WebGL: solo texto */
.gsx.gsx-nogl .gsx-intro { display: none; }

/* móvil y pantallas verticales: título + bloque 1 arriba, Tierra abajo; en Levi el bloque 1 deja sitio al 2 */
@media (max-width: 859px), (max-aspect-ratio: 1/1) {
  .globe-story.gsx { min-height: 560px; }
  .gsx-intro { top: calc(var(--header-h) + 5svh); }
  .gsx-h { font-size: clamp(2.3rem, 10vw, 3.4rem); }
  .gsx-a { left: 0; right: 0; top: calc(var(--header-h) + 4svh); transform: none; width: auto; max-width: 38rem; }
  .gsx-a h2 { font-size: clamp(2rem, 8.6vw, 2.8rem); margin-bottom: .35em; }
  .gsx-text p { font-size: .97rem; line-height: 1.55; }
  .gsx-b { left: 0; right: 0; bottom: calc(2svh + 76px); width: auto; max-width: 38rem; margin-left: auto; }
  .gsx-shade-a { background: linear-gradient(180deg, rgba(3,9,20,.82) 0%, rgba(3,9,20,.5) 38%, transparent 60%); }
  .gsx-shade-b { background: linear-gradient(0deg, rgba(3,9,20,.85) 0%, rgba(3,9,20,.55) 40%, transparent 62%); }
  .gsx-vig { background: radial-gradient(120% 90% at 50% 42%, transparent 50%, rgba(2,6,15,.5) 100%); }
  /* el primer texto ya no se oculta al aparecer el segundo */
}

/* sin movimiento: estado final directo */
@media (prefers-reduced-motion: reduce) {
  .gsx *, .gsx *::before, .gsx *::after { transition: none !important; animation: none !important; }
  .gsx .gsx-ring { display: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 859px), (prefers-reduced-motion: reduce) and (max-aspect-ratio: 1/1) {
  .globe-story.gsx { height: auto; min-height: 0; padding: calc(var(--header-h) + 24px) 0 48px; }
  .gsx-stage { position: relative; inset: auto; display: flex; flex-direction: column; gap: 28px; }
  .gsx-globe { position: relative; inset: auto; order: 2; height: min(92vw, 520px); }
  .gsx-a { position: relative; order: 1; top: auto; }
  .gsx-b { position: relative; order: 3; bottom: auto; }
  .gsx-intro, .gsx-vig, .gsx-shade-a, .gsx-shade-b { display: none; }
  .gsx-text > * { opacity: 1 !important; transform: none !important; }
}

/* Levi: marcador de ubicación blanco (la punta toca el punto exacto) */
.gsx-dot { display: none; }
.gsx-marker { position: absolute; left: -11px; top: -31px; width: 22px; height: 31px; max-width: none; filter: drop-shadow(0 2px 6px rgba(2, 6, 15, .7)) drop-shadow(0 0 10px rgba(170, 210, 255, .5));
  transform: translateY(-14px) scale(.6); opacity: 0; transform-origin: 50% 100%; transition: transform .7s cubic-bezier(.34, 1.56, .64, 1), opacity .4s ease; }
.gsx-pin.on .gsx-marker { transform: none; opacity: 1; }
.gsx-ring { left: -6px; top: -4px; width: 12px; height: 8px; }
.gsx-label { top: -1.9em; left: 14px; }

/* móvil: textos algo más compactos para dejar a la vista el marcador de Levi entre los dos bloques */
@media (max-width: 859px), (max-aspect-ratio: 1/1) {
  .gsx-a h2 { font-size: clamp(1.8rem, 7.6vw, 2.4rem); margin-bottom: .25em; }
  .gsx-a { top: calc(var(--header-h) + 2svh); }
  .gsx-text p { font-size: .88rem; line-height: 1.45; margin-bottom: .55em; }
  .gsx-b { bottom: calc(1.5svh + 70px); }
  .gsx-pin { z-index: 4; }
  .gsx-label { font-size: .86rem; text-shadow: 0 1px 8px rgba(2,6,15,.95), 0 0 2px rgba(2,6,15,.9); }
}

/* 8-oct: en móvil el texto, más grande (lo justo para que el marcador de Levi siga a la vista entre los dos bloques) */
@media (max-width: 859px), (max-aspect-ratio: 1/1) {
  .gsx-a h2 { font-size: clamp(2rem, 8.4vw, 2.7rem); }
  .gsx-text p { font-size: clamp(.98rem, 4.3vw, 1.08rem); line-height: 1.5; margin-bottom: .6em; }
  .gsx-b { bottom: calc(1.2svh + 66px); }
}
/* pantallas de móvil bajas (con las barras del navegador): un pelo más compacto para que Levi siga entre los dos bloques */
@media (max-width: 859px) and (max-height: 760px) {
  .gsx-text p { font-size: 1rem; line-height: 1.45; margin-bottom: .45em; }
  .gsx-a h2 { font-size: clamp(1.9rem, 8vw, 2.4rem); margin-bottom: .2em; }
  .gsx-a { top: calc(var(--header-h) + 1.2svh); }
  .gsx-b { bottom: calc(1svh + 62px); }
}
/* reinicio instantáneo al salir de la sección (sin fundidos que se crucen al volver) */
.gsx.gsx-reset *, .gsx.gsx-reset *::before, .gsx.gsx-reset *::after { transition: none !important; }
/* el título de entrada se va del todo antes de que aparezca el de arriba (no se ven los dos a la vez) */
.gsx.s2 .gsx-intro { transition-duration: .35s, .5s; }
.gsx.s2 .gsx-a h2 { transition-delay: .4s; }
/* 9-oct: unión suave con la sección siguiente (Fechas): la Tierra se funde hacia el azul noche por abajo */
.globe-story.gsx::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 20, 28, 0) 0%, rgba(11, 20, 28, .45) 45%, rgba(11, 20, 28, .85) 78%, #0B141C 100%); }
/* 14-oct: fondo del globo un poco más claro, en el azul pizarra del resto de la web (antes casi negro) */
.globe-story.gsx { background: radial-gradient(110% 95% at 68% 62%, #1B3550 0%, #15283C 40%, #112131 72%, #0E1B27 100%); }
