/* Hayden Core Technologies — Experience (prototipo cinematográfico) */

:root {
  --void: #030506;
  --deep: #0a0f14;
  --surface: #111920;
  --mist: #8fa3b0;
  --text: #e8eef2;
  --celeste: #0091a5;
  --celeste-glow: rgba(0, 145, 165, 0.45);
  --violet: #6d28d9;
  --violet-soft: rgba(109, 40, 217, 0.22);
  --hold-ms: 1.35s;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --glass: rgba(14, 22, 30, 0.72);
  --glass-border: rgba(232, 238, 242, 0.09);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text);
  background: var(--void);
  background-image:
    radial-gradient(ellipse 100% 60% at 15% -10%, rgba(0, 145, 165, 0.14), transparent 55%),
    radial-gradient(ellipse 80% 50% at 95% 30%, var(--violet-soft), transparent 50%),
    linear-gradient(180deg, #050a10 0%, var(--void) 45%, #040608 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--celeste);
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--text);
  color: var(--void);
  font-weight: 600;
  border-radius: 6px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--celeste);
  outline-offset: 2px;
}

/* ----- Gate overlay ----- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 90% 70% at 50% 110%, rgba(0, 145, 165, 0.18), transparent 50%),
    radial-gradient(ellipse 120% 80% at 50% 100%, #0d1820 0%, var(--void) 55%);
  transition: opacity 0.9s var(--ease-out-expo), visibility 0.9s;
}

.gate-aurora {
  position: absolute;
  inset: -20%;
  background:
    conic-gradient(from 210deg at 50% 50%, transparent 0deg, rgba(0, 145, 165, 0.07) 60deg, transparent 120deg, rgba(109, 40, 217, 0.06) 200deg, transparent 280deg);
  animation: aurora-spin 28s linear infinite;
  pointer-events: none;
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .gate-aurora { animation: none; opacity: 0.4; }
}

@keyframes aurora-spin {
  to { transform: rotate(360deg); }
}
.gate.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-inner {
  text-align: center;
  padding: 2rem;
  max-width: 38rem;
  position: relative;
  z-index: 1;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 auto 1.75rem;
  max-width: 36rem;
}

.trust-strip--gate {
  text-align: left;
  justify-content: center;
}

.trust-pill {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--mist);
  backdrop-filter: blur(10px);
}

.trust-pill--pending {
  border-color: rgba(143, 163, 176, 0.35);
  color: var(--mist);
}

.trust-pill--ok {
  border-color: rgba(0, 145, 165, 0.45);
  color: #b8e8ef;
  box-shadow: 0 0 20px rgba(0, 145, 165, 0.15);
}

.trust-pill--warn {
  border-color: rgba(220, 160, 80, 0.45);
  color: #e8c9a0;
}

.gate-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 1.5rem;
}

.gate-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 2rem;
  color: var(--text);
}

.gate-hint {
  font-size: 0.9rem;
  color: var(--mist);
  margin-bottom: 2rem;
}

.gate-hold-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
}

.gate-hold-btn {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(232, 238, 242, 0.2);
  background: rgba(17, 25, 32, 0.6);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.gate-hold-btn:hover,
.gate-hold-btn:focus-visible {
  border-color: var(--celeste-glow);
  box-shadow: 0 0 40px var(--celeste-glow);
  outline: none;
}

.gate-progress {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  pointer-events: none;
  transform: rotate(-90deg);
}
.gate-progress circle {
  fill: none;
  stroke: var(--celeste);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  filter: drop-shadow(0 0 6px var(--celeste-glow));
  transition: stroke-dashoffset 0.05s linear;
}
.gate.is-holding .gate-progress circle {
  transition: stroke-dashoffset var(--hold-ms) linear;
}

.gate-bypass {
  font-size: 0.8rem;
  color: var(--mist);
}
.gate-bypass kbd {
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid rgba(232, 238, 242, 0.2);
  font-family: inherit;
  font-size: 0.85em;
}

.gate-audio {
  margin-top: 1.25rem;
}
.gate-audio button {
  font: inherit;
  font-size: 0.8rem;
  color: var(--celeste);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ----- Ambient layers ----- */
#nodes-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, transparent 0%, var(--void) 100%);
  opacity: 0.85;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.orb--1 {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  top: 10%;
  right: -8%;
  background: radial-gradient(circle, rgba(0, 145, 165, 0.35), transparent 70%);
  animation: orb-float 18s ease-in-out infinite;
}

.orb--2 {
  width: min(45vw, 360px);
  height: min(45vw, 360px);
  bottom: 15%;
  left: -10%;
  background: radial-gradient(circle, rgba(109, 40, 217, 0.25), transparent 70%);
  animation: orb-float 22s ease-in-out infinite reverse;
}

@media (prefers-reduced-motion: reduce) {
  .orb--1, .orb--2 { animation: none; opacity: 0.2; }
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-12px, 18px) scale(1.05); }
}

/* ----- Top bar (tras gate) ----- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(to bottom, rgba(3, 5, 6, 0.88), rgba(3, 5, 6, 0.4) 70%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo), border-color 0.4s;
  pointer-events: none;
}

.experience-ready .top-bar {
  border-bottom-color: var(--glass-border);
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { display: block; width: 36px; height: 36px; }
.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.brand-name {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-tag {
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--celeste);
}

.top-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.top-links a:hover,
.top-links a:focus-visible {
  color: var(--text);
  border-color: rgba(0, 145, 165, 0.35);
  outline: none;
}

/* ----- Scroll story ----- */
.story {
  position: relative;
  z-index: 5;
  scroll-snap-type: y mandatory;
  overflow-y: auto;
  height: 100vh;
  height: 100dvh;
}

.chapter {
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 1.5rem 4rem;
  position: relative;
}

.chapter-glow {
  position: absolute;
  inset: 10% 5%;
  border-radius: 32px;
  background: radial-gradient(ellipse at 30% 40%, rgba(0, 145, 165, 0.08), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.chapter--nucleo .chapter-inner,
.chapter--continuo .chapter-inner,
.chapter--adn .chapter-inner,
.chapter--eco .chapter-inner,
.chapter--cierre .chapter-inner {
  position: relative;
  z-index: 1;
}

.chapter--continuo {
  background: linear-gradient(180deg, transparent 0%, rgba(109, 40, 217, 0.04) 50%, transparent 100%);
}

.chapter--eco {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 145, 165, 0.05) 40%, transparent 100%);
}

/* Capítulo I: texto + logo grande a la derecha (referencia layout hero) */
.chapter-inner--nucleo-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 38%);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  max-width: 1180px;
}

.chapter-nucleo-copy {
  min-width: 0;
}

.mega--nucleo-split {
  max-width: 22ch;
}

.lead--nucleo-split {
  max-width: 36rem;
}

.chapter-nucleo-logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

/* Difuso oscuro (viñeta): bordes hundidos, centro más libre = lejanía en el espacio */
.chapter-nucleo-logo::after {
  content: '';
  position: absolute;
  inset: -14%;
  z-index: 2;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    ellipse 88% 88% at 50% 44%,
    rgba(2, 4, 8, 0) 38%,
    rgba(1, 4, 10, 0.28) 62%,
    rgba(0, 2, 6, 0.72) 86%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

.chapter-nucleo-logo__halo {
  position: absolute;
  width: 112%;
  height: 112%;
  max-width: 336px;
  max-height: 336px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 45, 55, 0.35) 0%,
    rgba(2, 8, 14, 0.55) 38%,
    transparent 68%
  );
  animation: chapter-nucleo-halo-pulse 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.chapter-nucleo-logo__img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(33.6vw, 320px);
  height: auto;
  object-fit: contain;
  animation: chapter-nucleo-logo-alive 6.5s ease-in-out infinite;
  filter: brightness(0.58) saturate(0.82) drop-shadow(0 10px 28px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 12px rgba(0, 80, 92, 0.22));
}

@keyframes chapter-nucleo-logo-alive {
  0%,
  100% {
    transform: scale(1) translateY(0);
    filter: brightness(0.56) saturate(0.8) drop-shadow(0 12px 32px rgba(0, 0, 0, 0.7))
      drop-shadow(0 0 10px rgba(0, 70, 82, 0.18));
  }
  50% {
    transform: scale(1.024) translateY(-3px);
    filter: brightness(0.62) saturate(0.84) drop-shadow(0 14px 36px rgba(0, 0, 0, 0.62))
      drop-shadow(0 0 14px rgba(0, 90, 100, 0.24));
  }
}

@keyframes chapter-nucleo-halo-pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.94);
  }
  50% {
    opacity: 0.72;
    transform: scale(0.99);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-nucleo-logo__halo,
  .chapter-nucleo-logo__img {
    animation: none;
  }
  .chapter-nucleo-logo__img {
    filter: brightness(0.58) saturate(0.82) drop-shadow(0 10px 28px rgba(0, 0, 0, 0.65))
      drop-shadow(0 0 10px rgba(0, 70, 82, 0.18));
  }
  .chapter-nucleo-logo__halo {
    opacity: 0.45;
    transform: none;
  }
}

@media (max-width: 840px) {
  .chapter-inner--nucleo-split {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .chapter-nucleo-logo {
    order: -1;
    max-width: min(57.6vw, 256px);
    margin-inline: auto;
  }
  .chapter-nucleo-logo__img {
    max-width: 100%;
  }
  .mega--nucleo-split {
    max-width: none;
  }
}

.chapter-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.chapter-inner--nucleo-split.chapter-inner {
  max-width: 1180px;
}

.chapter-label {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--celeste);
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.chapter.is-visible .chapter-label {
  opacity: 1;
  transform: translateY(0);
}

.mega {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 400;
  line-height: 1.02;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.mega .word {
  display: inline-block;
  margin-right: 0.25em;
  opacity: 0;
  transform: translateY(1.2em) rotate(2deg);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.85s var(--ease-out-expo);
}
.chapter.is-visible .mega .word {
  opacity: 1;
  transform: translateY(0) rotate(0);
}
.chapter.is-visible .mega .word:nth-child(1) { transition-delay: 0.05s; }
.chapter.is-visible .mega .word:nth-child(2) { transition-delay: 0.12s; }
.chapter.is-visible .mega .word:nth-child(3) { transition-delay: 0.19s; }
.chapter.is-visible .mega .word:nth-child(4) { transition-delay: 0.26s; }
.chapter.is-visible .mega .word:nth-child(5) { transition-delay: 0.33s; }
.chapter.is-visible .mega .word:nth-child(6) { transition-delay: 0.4s; }
.chapter.is-visible .mega--5 .word:nth-child(1) { transition-delay: 0.05s; }
.chapter.is-visible .mega--5 .word:nth-child(2) { transition-delay: 0.12s; }
.chapter.is-visible .mega--5 .word:nth-child(3) { transition-delay: 0.19s; }
.chapter.is-visible .mega--5 .word:nth-child(4) { transition-delay: 0.26s; }
.chapter.is-visible .mega--5 .word:nth-child(5) { transition-delay: 0.33s; }

.mega--wide {
  max-width: none;
}

.mega--compact {
  font-size: clamp(2rem, 6vw, 3.5rem);
  max-width: 20ch;
}

.lead--after-dna {
  margin-top: 2.25rem;
}

.lead--flat {
  margin-bottom: 1.25rem;
}

.lead {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.65;
  color: var(--mist);
  max-width: 38rem;
  margin: 0 0 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s 0.15s var(--ease-out-expo), transform 0.9s 0.15s var(--ease-out-expo);
}
.chapter.is-visible .lead {
  opacity: 1;
  transform: translateY(0);
}

.accent-line {
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--celeste), transparent);
  margin-top: 2rem;
  transition: width 1.1s 0.3s var(--ease-out-expo);
}
.chapter.is-visible .accent-line { width: min(280px, 50vw); }

/* ----- DNA strip ----- */
.dna-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 2rem 0 0;
  padding-bottom: 1.25rem;
  max-width: 100%;
}
.dna-char {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  color: rgba(232, 238, 242, 0.15);
  letter-spacing: -0.02em;
  transition: color 0.4s ease, transform 0.4s ease;
}
.dna-char.is-lit {
  color: var(--text);
  transform: scale(1.05);
  text-shadow: 0 0 24px var(--celeste-glow);
}

/* ----- Continuo / Φ·K panel ----- */
.continuum-panel {
  display: grid;
  grid-template-columns: min(200px, 38vw) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-top: 0.5rem;
}

@media (max-width: 720px) {
  .continuum-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .continuum-copy .mega,
  .continuum-copy .lead,
  .analisis-list { text-align: left; }
}

.phi-meter {
  position: relative;
  width: min(200px, 42vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.phi-meter__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(232, 238, 242, 0.12);
  background: conic-gradient(from 0deg, var(--celeste), transparent 35%, var(--violet) 65%, transparent 100%);
  opacity: 0.35;
  animation: phi-spin 24s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .phi-meter__ring { animation: none; }
}

@keyframes phi-spin {
  to { transform: rotate(-360deg); }
}

.phi-meter__core {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.15em 0.25em;
  padding: 1.25rem 1rem;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  width: 72%;
  aspect-ratio: 1;
  box-shadow: 0 0 40px rgba(0, 145, 165, 0.12);
}

.phi-meter__x,
.phi-meter__phi,
.phi-meter__k {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 400;
  color: var(--text);
}

.phi-meter__eq,
.phi-meter__slash {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--mist);
}

.analisis-list {
  margin: 0;
  padding-left: 1.15rem;
  max-width: 42rem;
  color: var(--mist);
  font-size: 0.92rem;
  line-height: 1.6;
}

.analisis-list li {
  margin-bottom: 0.65rem;
}

.analisis-list code {
  font-size: 0.82em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: rgba(0, 145, 165, 0.12);
  color: #b8e8ef;
}

/* ----- Pillars ----- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
@media (max-width: 800px) {
  .pillars { grid-template-columns: 1fr; }
}

.pillar-icon {
  display: block;
  font-size: 0.75rem;
  color: var(--celeste);
  margin-bottom: 0.5rem;
  letter-spacing: 0.2em;
}

.pillar {
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(20, 30, 40, 0.85), rgba(12, 18, 24, 0.75));
  border: 1px solid rgba(232, 238, 242, 0.08);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo), border-color 0.3s;
}
.chapter.is-visible .pillar {
  opacity: 1;
  transform: translateY(0);
}
.chapter.is-visible .pillar:nth-child(1) { transition-delay: 0.1s; }
.chapter.is-visible .pillar:nth-child(2) { transition-delay: 0.2s; }
.chapter.is-visible .pillar:nth-child(3) { transition-delay: 0.3s; }
.pillar:hover { border-color: rgba(0, 145, 165, 0.35); }

.pillar h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.pillar p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--mist);
  line-height: 1.55;
}

/* ----- Horizontal ecosystem rail ----- */
.rail-wrap {
  margin-top: 2rem;
  position: relative;
}
.rail-wrap::before,
.rail-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
}
.rail-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--void), transparent);
}
.rail-wrap::after {
  right: 0;
  background: linear-gradient(-90deg, var(--void), transparent);
}

.rail-hint {
  font-size: 0.75rem;
  color: var(--mist);
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
}

.rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0 1.25rem;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--celeste) var(--surface);
}
.rail:active { cursor: grabbing; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--celeste); border-radius: 3px; }

.eco-card {
  flex: 0 0 min(300px, 85vw);
  scroll-snap-align: start;
  border-radius: 20px;
  padding: 1.5rem;
  background: linear-gradient(155deg, rgba(22, 32, 42, 0.92), rgba(8, 12, 18, 0.88));
  border: 1px solid rgba(232, 238, 242, 0.1);
  transition: transform 0.35s var(--ease-out-expo), border-color 0.35s, box-shadow 0.35s;
}
.eco-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 145, 165, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.eco-card .logo-slot {
  height: 56px;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.eco-card img { max-height: 48px; max-width: 140px; width: auto; object-fit: contain; }
.eco-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.eco-card p {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--mist);
  line-height: 1.5;
}
.eco-card .eco-link {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--celeste);
  text-decoration: none;
}
.eco-card .eco-link:hover { text-decoration: underline; }

/* ----- Quote chapter ----- */
.quote-block {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.25;
  margin: 0;
  max-width: 18ch;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}
.chapter.is-visible .quote-block {
  opacity: 1;
  transform: scale(1);
}
.quote-src {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--celeste);
}

/* ----- CTA ----- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s 0.2s var(--ease-out-expo), transform 0.8s 0.2s var(--ease-out-expo);
}
.chapter.is-visible .cta-row {
  opacity: 1;
  transform: translateY(0);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.75rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--void);
  background: var(--celeste);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s;
}
.btn-primary:hover {
  transform: scale(1.03);
  box-shadow: 0 0 32px var(--celeste-glow);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.95rem 1.5rem;
  font: inherit;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--mist);
  background: transparent;
  border: 1px solid rgba(232, 238, 242, 0.2);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.25s, color 0.25s;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(0, 145, 165, 0.5);
}

.footer-mini {
  text-align: center;
  padding: 2rem 1rem 3rem;
  font-size: 0.75rem;
  color: rgba(143, 163, 176, 0.6);
  position: relative;
  z-index: 5;
}
.footer-mini a { color: var(--mist); }

/* ----- Section nav dots ----- */
.section-nav {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.experience-ready .section-nav {
  opacity: 1;
  pointer-events: auto;
}

.section-nav button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(232, 238, 242, 0.2);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.section-nav button:hover,
.section-nav button:focus-visible {
  background: var(--celeste);
  transform: scale(1.25);
  outline: none;
}
.section-nav button.is-active {
  background: var(--celeste);
  box-shadow: 0 0 12px var(--celeste-glow);
}

@media (max-width: 600px) {
  .section-nav { display: none; }
  .top-links {
    display: none;
  }
}

html.is-secure-context .gate-hint strong {
  color: #b8e8ef;
}

/* ========== Capítulo orbital (#nucleo) + lab.js (tema Experience) ========== */
.chapter-inner--wide {
  max-width: min(960px, 100%);
  margin-inline: auto;
}

.orbit-lead {
  max-width: 42rem;
  margin-bottom: 2rem;
}

.orbit-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.72em;
  letter-spacing: 0.12em;
}

@keyframes orbit-core-breathe {
  0%, 100% {
    box-shadow:
      0 0 36px rgba(0, 145, 165, 0.12),
      inset 0 0 48px rgba(0, 145, 165, 0.05);
  }
  50% {
    box-shadow:
      0 0 52px rgba(0, 145, 165, 0.28),
      inset 0 0 60px rgba(0, 145, 165, 0.09);
  }
}

.orbit-webgl-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 145, 165, 0.45);
  background: radial-gradient(ellipse 80% 70% at 50% 40%, rgba(0, 145, 165, 0.12), var(--surface) 78%);
  aspect-ratio: 1 / 1;
  max-height: min(48vh, 420px);
  margin: 0 auto 0.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  .orbit-webgl-frame {
    animation: orbit-core-breathe 5.5s ease-in-out infinite;
  }
}

.orbit-webgl-frame #lab-webgl {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.orbit-webgl-hint {
  text-align: center;
  font-size: 0.72rem;
  color: var(--mist);
  letter-spacing: 0.06em;
  margin: 0 0 2.5rem;
}

.orbit-lab-grid {
  margin-top: 0.5rem;
}

.chapter--orbita .lab-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.chapter--orbita .lab-grid--single {
  max-width: 560px;
  margin-inline: auto;
}

.chapter--orbita .lab-panel {
  padding: 1.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 0 40px rgba(0, 145, 165, 0.1);
}

.chapter--orbita .lab-panel-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
  letter-spacing: 0.03em;
}

.chapter--orbita .lab-panel-desc {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--mist);
}

.chapter--orbita .lab-panel-desc strong {
  color: #7fe8f2;
  font-weight: 600;
}

.chapter--orbita .lab-xr-status {
  min-height: 2.75rem;
  font-size: 0.88rem;
  color: var(--celeste);
  margin: 0 0 1rem;
}

.chapter--orbita .lab-xr-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chapter--orbita .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.chapter--orbita .btn-primary {
  background: linear-gradient(145deg, #22d3ee 0%, var(--celeste) 100%);
  color: var(--void);
  border-color: rgba(0, 145, 165, 0.55);
  box-shadow: 0 0 28px rgba(0, 145, 165, 0.35);
}

.chapter--orbita .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--celeste-glow);
}

.chapter--orbita .btn-secondary {
  background: rgba(17, 25, 32, 0.65);
  color: var(--text);
  border-color: rgba(0, 145, 165, 0.4);
  backdrop-filter: blur(8px);
}

.chapter--orbita .btn-secondary:hover {
  border-color: var(--celeste);
  color: #b8e8ef;
}

.chapter--orbita .lab-scroll-wrap {
  margin-bottom: 3rem;
  padding: 2rem 1.25rem;
  min-height: 50vh;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(165deg, rgba(17, 25, 32, 0.95), rgba(8, 12, 18, 0.88));
  position: relative;
  overflow: hidden;
}

.chapter--orbita .lab-parallax-title,
.chapter--orbita .lab-parallax-desc {
  text-align: center;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.chapter--orbita .lab-parallax-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.chapter--orbita .lab-parallax-desc {
  font-size: 0.9rem;
  color: var(--mist);
  margin-bottom: 2rem;
}

.chapter--orbita .lab-parallax-layers {
  position: relative;
  min-height: 200px;
  max-width: 36rem;
  margin: 0 auto;
}

.chapter--orbita .lab-float {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: none;
  transition: transform 0.05s linear;
  will-change: transform;
}

.chapter--orbita .lab-float--back {
  left: 8%;
  top: 28%;
  font-size: clamp(2rem, 7vw, 3.5rem);
  color: rgba(0, 145, 165, 0.16);
}

.chapter--orbita .lab-float--mid {
  left: 50%;
  top: 42%;
  transform: translate(-50%, 0);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: rgba(0, 145, 165, 0.38);
}

.chapter--orbita .lab-float--front {
  right: 6%;
  bottom: 12%;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: #5ee7e8;
  text-shadow: 0 0 24px rgba(0, 145, 165, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .orbit-webgl-frame {
    animation: none;
  }
  .chapter--orbita .lab-float {
    transition: none;
  }
}

.chapter--orbita .lab-gyro {
  padding-bottom: 1.5rem;
}

.chapter--orbita .lab-gyro-hint {
  display: block;
  margin: 0 auto 1.25rem;
}

.chapter--orbita .lab-gyro-stage {
  perspective: 900px;
  max-width: 400px;
  margin: 0 auto;
  min-height: 180px;
}

.chapter--orbita .lab-gyro-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out;
}

.chapter--orbita .lab-gyro-orbit {
  position: absolute;
  inset: 8%;
  border: 2px solid rgba(0, 145, 165, 0.45);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(0, 145, 165, 0.12), inset 0 0 28px rgba(0, 145, 165, 0.06);
}

.chapter--orbita .lab-gyro-core {
  position: absolute;
  inset: 32%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(0, 145, 165, 0.25), rgba(17, 25, 32, 0.9));
  border: 1px solid rgba(0, 145, 165, 0.45);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: 0.12em;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.footer-mini--official {
  padding: 2.5rem 1rem 3.5rem;
}

.footer-mini-inner {
  max-width: 52rem;
  margin: 0 auto;
}

.footer-mini-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.footer-mini-nav a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
}

.footer-mini-nav a:hover {
  color: var(--celeste);
  text-decoration: underline;
}

.footer-mini-legal {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.55;
  color: rgba(143, 163, 176, 0.75);
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
}

.footer-mini-legal a {
  color: var(--mist);
}

.footer-kbd-exp {
  display: inline-block;
  font-size: 0.68em;
  padding: 0.1em 0.35em;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  background: rgba(17, 25, 32, 0.8);
}
