/* ==========================================================================
   ABUND TERRA ACADEMY · THE JOURNEY (home)
   Zone 0 Cosmic Entrance · Zone 1 Earth & Land Orbits · Zone 2-3 Secret Place
   ========================================================================== */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.at-home { background: #000; touch-action: none; }
.cosmos { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
[hidden] { display: none !important; }

/* ---------------- ZONE 0 · cosmic entrance ---------------- */
.gate { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; overflow: hidden; }
.gate__swarm { position: absolute; inset: 0; width: 100%; height: 100%; }
.gate__rays { position: absolute; left: 50%; top: 38%; width: 160vmax; height: 160vmax; transform: translate(-50%, -50%); pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(180, 205, 74, .07) 0deg 2deg, transparent 2deg 9deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0,0,0,.5) 18%, transparent 46%); mask: radial-gradient(circle, #000 0%, rgba(0,0,0,.5) 18%, transparent 46%);
  transition: opacity 2.4s ease; animation: raysTurn 90s linear infinite; }
@keyframes raysTurn { to { transform: translate(-50%, -50%) rotate(360deg); } }
.gate.is-lit .gate__rays { opacity: 1; }
.gate__logo { position: absolute; left: 50%; top: 34%; width: min(300px, 52vw); height: auto; transform: translate(-50%, -50%) scale(.2); opacity: 0;
  filter: drop-shadow(0 0 30px rgba(145, 181, 44, .45)); transition: transform 2.6s cubic-bezier(.16, .8, .2, 1), opacity 2s ease; }
.gate.is-lit .gate__logo { transform: translate(-50%, -50%) scale(1); opacity: 1; animation: logoFloat 7s ease-in-out 2.6s infinite; }
@keyframes logoFloat { 0%, 100% { transform: translate(-50%, -50%) translateY(0); } 50% { transform: translate(-50%, -50%) translateY(-12px); } }
.gate__ui { position: absolute; left: 0; right: 0; top: calc(34% + min(160px, 28vw)); display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 0 16px; opacity: 0; transform: translateY(14px); transition: opacity 1.4s ease, transform 1.4s ease; }
.gate.is-ready .gate__ui { opacity: 1; transform: none; }
.gate__name { font-family: var(--font-script); font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: 1; color: var(--ivory); text-shadow: 0 0 30px rgba(180, 205, 74, .55), 0 0 6px rgba(116, 53, 31, .6); opacity: 0; }
.gate.is-ready .gate__name { opacity: 1; transition: opacity 1.6s ease .2s; }
.gate__tag { margin-top: -6px; font-family: var(--font-display); font-weight: 500; font-size: .78rem; letter-spacing: .5em; text-transform: uppercase; color: var(--sunlit); }
.gate__btn { margin-top: 18px; display: inline-flex; align-items: center; gap: 12px; padding: 16px 34px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: .85rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ivory);
  background: linear-gradient(180deg, rgba(39, 101, 27, .55), rgba(23, 79, 22, .75)); border: 1px solid rgba(180, 205, 74, .7);
  box-shadow: 0 0 0 6px rgba(145, 181, 44, .08), 0 0 40px rgba(145, 181, 44, .35); transition: transform .3s ease, box-shadow .3s ease; }
.gate__btn svg { width: 20px; height: 20px; }
.gate__btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 8px rgba(145, 181, 44, .12), 0 0 60px rgba(180, 205, 74, .55); }
.gate__silent { font-family: var(--font-hud); font-size: .8rem; letter-spacing: .14em; color: var(--text-dim); border-bottom: 1px solid rgba(247, 243, 232, .35); padding-bottom: 2px; }
.gate__silent:hover { color: var(--ivory); }
.gate__hint { font-family: var(--font-hud); font-size: .64rem; letter-spacing: .28em; text-transform: uppercase; color: var(--text-faint); }
.gate.is-leaving { opacity: 0; transition: opacity 1.8s ease; pointer-events: none; }

/* ---------------- ZONE 1 · the Earth ---------------- */
.earth { position: fixed; inset: 0; z-index: 5; }
.topbar { position: absolute; z-index: 30; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: max(14px, env(safe-area-inset-top)) clamp(14px, 3vw, 36px) 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 0 10px rgba(145, 181, 44, .5)); }
.brand span { display: flex; flex-direction: column; line-height: 1; }
.brand b { font-family: var(--font-script); font-weight: 400; font-size: 1.7rem; color: var(--ivory); }
.brand i { font-style: normal; font-family: var(--font-display); font-size: .58rem; letter-spacing: .42em; text-transform: uppercase; color: var(--sunlit); margin-top: 2px; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; padding: 5px; border-radius: 999px; background: rgba(10, 16, 8, .55); border: 1px solid rgba(180, 205, 74, .2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topnav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-family: var(--font-display); font-weight: 500; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); transition: color .3s, background .3s; }
.topnav a:hover { color: var(--ivory); background: rgba(145, 181, 44, .14); }
.topnav__lock { color: var(--sunlit) !important; border: 1px solid rgba(180, 205, 74, .35); }
.topnav svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tools { display: flex; gap: 14px; }
.stage { position: absolute; inset: 0; z-index: 2; touch-action: none; cursor: grab; }
html.is-dragging .stage { cursor: grabbing; }
.globe, .sparks { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.globe { z-index: 3; } .sparks { z-index: 6; }
.shadow-cone { position: absolute; z-index: 1; inset: 0; pointer-events: none; opacity: .85;
  background: radial-gradient(ellipse 60% 22% at var(--shadow-x, 72%) 46%, rgba(0, 0, 0, .55), transparent 70%); }
.orbit { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.orb { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; pointer-events: auto; will-change: transform, opacity; }
.orb.is-behind { z-index: 0 !important; }
.orb__disc { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; color: var(--c);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .18), rgba(10, 18, 8, .85) 62%); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent);
  box-shadow: 0 0 26px color-mix(in srgb, var(--c) 45%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 22%, transparent); transition: transform .35s ease, box-shadow .35s ease; }
.orb__disc svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.orb__label { font-family: var(--font-display); font-weight: 600; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ivory); text-shadow: 0 0 10px #000, 0 0 3px #000; white-space: nowrap; }
.orb--land.is-front .orb__disc { transform: scale(1.15); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent), 0 0 50px var(--c); }
.orb--land:hover .orb__disc { transform: scale(1.12); }
.orb--sun, .orb--moon { pointer-events: none; }
.sun { position: relative; display: block; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, #fffbe8 0%, #ffe9a6 28%, #f7c548 52%, rgba(247, 158, 40, .6) 70%, transparent 72%);
  box-shadow: 0 0 60px 20px rgba(255, 214, 110, .55), 0 0 140px 60px rgba(255, 190, 70, .25); }
.sun i { position: absolute; left: 50%; top: 50%; width: 330px; height: 330px; margin: -165px 0 0 -165px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 236, 160, .55) 0deg 1.4deg, transparent 1.4deg 12deg);
  -webkit-mask: radial-gradient(circle, transparent 17%, #000 19%, transparent 70%); mask: radial-gradient(circle, transparent 17%, #000 19%, transparent 70%);
  animation: sunRays 26s linear infinite; }
@keyframes sunRays { to { transform: rotate(360deg); } }
.moon { display: block; width: 86px; height: 86px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 34%, rgba(90, 96, 104, .55) 0 9%, transparent 10%),
    radial-gradient(circle at 62% 58%, rgba(90, 96, 104, .5) 0 12%, transparent 13%),
    radial-gradient(circle at 48% 26%, rgba(110, 116, 122, .45) 0 6%, transparent 7%),
    radial-gradient(circle at 70% 30%, rgba(110, 116, 122, .4) 0 5%, transparent 6%),
    radial-gradient(circle at 36% 70%, rgba(100, 106, 112, .4) 0 7%, transparent 8%),
    radial-gradient(circle at 40% 38%, #f3f1ea, #c9c6bd 55%, #8d8a82 100%);
  box-shadow: 0 0 40px 10px rgba(220, 228, 240, .28), inset -14px -10px 26px rgba(0, 0, 0, .45); }

.hint { position: absolute; z-index: 10; left: 50%; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 164px); transform: translateX(-50%);
  font-family: var(--font-hud); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; transition: opacity 1s; }
.hint.is-hidden { opacity: 0; }
.hint--touch { display: none; } @media (hover: none) { .hint--touch { display: inline; } .hint--mouse { display: none; } }
.selector { position: absolute; z-index: 10; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(94vw, 720px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; }
.selector__side { font-family: var(--font-hud); font-size: .7rem; letter-spacing: .14em; color: var(--text-faint); padding: 8px; transition: color .3s; }
.selector__side:hover { color: var(--ivory); }
.selector__side:first-child { text-align: right; } .selector__side:nth-child(3) { text-align: left; }
.selector__current { position: relative; padding: 10px 22px; border: 1px solid rgba(180, 205, 74, .45); border-radius: 14px; background: rgba(10, 16, 8, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.selector__name { font-family: var(--font-display); font-weight: 600; font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ivory); white-space: nowrap; }
.selector__line { grid-column: 1 / -1; font-family: var(--font-body); font-style: italic; font-size: .98rem; color: var(--text-dim); min-height: 1.6em; }
.selector__enter { grid-column: 1 / -1; justify-self: center; display: inline-flex; gap: 10px; padding: 14px 30px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: #10200a;
  background: linear-gradient(180deg, #eef5c8, var(--sunlit) 55%, var(--opportunity)); box-shadow: 0 10px 34px rgba(145, 181, 44, .4); transition: transform .3s; }
.selector__enter:hover { transform: translateY(-2px); }
.world-arrow { position: absolute; z-index: 10; top: 50%; width: 70px; height: 40px; margin-top: -20px; color: var(--text-dim); transition: color .3s; }
.world-arrow svg { width: 100%; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.world-arrow:hover { color: var(--ivory); }
.world-arrow--prev { left: clamp(4px, 3vw, 40px); } .world-arrow--next { right: clamp(4px, 3vw, 40px); }

/* ---------------- cinematic words ---------------- */
.cine { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity 1s ease; }
.cine p { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 4vw, 2.8rem); letter-spacing: .08em; color: var(--ivory); text-align: center; padding: 0 20px;
  text-shadow: 0 0 30px rgba(145, 181, 44, .8), 0 0 4px #000; transform: scale(.94); transition: transform 2.4s ease; }
.cine em { font-style: normal; font-family: var(--font-script); font-size: 1.5em; color: var(--sunlit); }
.cine.is-on { opacity: 1; } .cine.is-on p { transform: scale(1.04); }

/* ---------------- ZONE 2-3 · the Secret Place ---------------- */
.cave { position: fixed; inset: 0; z-index: 8; background: radial-gradient(ellipse 80% 70% at 50% 60%, #14100a, #050403 70%); }
.cave__sky { position: absolute; left: 50%; top: -12vh; width: min(70vw, 760px); height: min(36vh, 360px); transform: translateX(-50%); border-radius: 50%; overflow: hidden; filter: blur(2px); }
.cave__day, .cave__night { position: absolute; inset: 0; transition: opacity 3.5s ease; }
.cave__day { background: radial-gradient(ellipse at 50% 80%, #fff8dc 0%, #ffe39a 25%, #9fd0e8 60%, #5d9bc4 100%); }
.cave__night { opacity: 0; background:
  radial-gradient(1px 1px at 20% 40%, #fff, transparent), radial-gradient(1.5px 1.5px at 60% 30%, #fff, transparent), radial-gradient(1px 1px at 80% 60%, #fff, transparent),
  radial-gradient(1px 1px at 35% 70%, #dfe8ff, transparent), radial-gradient(2px 2px at 48% 52%, #fff, transparent), radial-gradient(1px 1px at 70% 75%, #fff, transparent),
  radial-gradient(circle at 70% 40%, #f2f0e6 0 5%, rgba(242, 240, 230, .25) 7%, transparent 12%),
  radial-gradient(ellipse at 50% 80%, #1c2a48 0%, #0a1226 60%, #040812 100%); }
.cave.is-night .cave__day { opacity: 0; } .cave.is-night .cave__night { opacity: 1; }
.cave__beam { position: absolute; left: 50%; top: 0; width: min(64vw, 680px); height: 100%; transform: translateX(-50%); pointer-events: none; transition: opacity 3.5s ease, filter 3.5s ease;
  background: linear-gradient(180deg, rgba(255, 236, 170, .55), rgba(255, 226, 150, .18) 45%, rgba(255, 226, 150, 0) 85%);
  clip-path: polygon(30% 0, 70% 0, 92% 100%, 8% 100%); mix-blend-mode: screen; }
.cave.is-night .cave__beam { opacity: .55; filter: hue-rotate(160deg) saturate(.3); }
.cave__gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; }
.cave__top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: max(14px, env(safe-area-inset-top)) clamp(14px, 3vw, 36px) 0; }
.cave__title { font-family: var(--font-script); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--ivory); text-shadow: 0 0 20px rgba(180, 205, 74, .6); }
.cave__tools { display: flex; gap: 12px; align-items: center; }
.lang { display: flex; border: 1px solid rgba(180, 205, 74, .45); border-radius: 999px; overflow: hidden; }
.lang button { padding: 6px 12px; font-family: var(--font-hud); font-size: .72rem; letter-spacing: .1em; color: var(--text-dim); }
.lang button[aria-pressed="true"] { background: var(--sunlit); color: #10200a; }
.story { position: absolute; z-index: 5; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 92px); transform: translateX(-50%); width: min(92vw, 860px); text-align: center; pointer-events: none; }
.story__line { font-family: var(--font-body); font-style: italic; font-size: clamp(1.1rem, 2.4vw, 1.6rem); line-height: 1.5; color: var(--ivory); text-shadow: 0 0 14px #000, 0 0 30px rgba(0, 0, 0, .8); opacity: 0; transform: translateY(8px); transition: opacity 1.2s ease, transform 1.2s ease; }
.story__line.is-on { opacity: 1; transform: none; }
.cave__phase { position: absolute; z-index: 5; left: 50%; top: calc(max(14px, env(safe-area-inset-top)) + 64px); transform: translateX(-50%); font-family: var(--font-hud); font-size: .64rem; letter-spacing: .4em; text-transform: uppercase; color: var(--text-faint); }
.cave__go { position: absolute; z-index: 6; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100vw - 32px);
  padding: 14px 26px; border-radius: 18px; font-family: var(--font-display); font-weight: 500; font-size: .86rem; letter-spacing: .04em; color: var(--ivory); text-align: center;
  background: rgba(247, 243, 232, .08); border: 1px solid rgba(247, 243, 232, .3); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .15); transition: background .3s, transform .3s; }
.cave__go b { color: var(--sunlit); }
.cave__go:hover { background: rgba(180, 205, 74, .18); transform: translateX(-50%) translateY(-2px); }
.cave.is-rising .cave__gl { transition: transform 1.6s cubic-bezier(.6, 0, .4, 1), filter 1.6s; transform: scale(1.5) translateY(10%); filter: brightness(1.8); }
.noscript { position: fixed; inset: auto 0 20px; z-index: 50; text-align: center; padding: 16px; }

@media (max-width: 760px) {
  .topnav { order: 3; width: 100%; justify-content: center; border-radius: 16px; }
  .topnav a { padding: 6px 9px; font-size: .6rem; letter-spacing: .06em; }
  .tools { gap: 8px; } .tools .dw-switch { font-size: .62rem; }
  .brand b { font-size: 1.35rem; } .brand img { width: 36px; height: 36px; }
  .orb__disc { width: 54px; height: 54px; } .orb__disc svg { width: 30px; height: 30px; }
  .orb__label { font-size: .54rem; letter-spacing: .1em; }
  .sun { width: 72px; height: 72px; } .sun i { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
  .moon { width: 54px; height: 54px; }
  .selector__side { font-size: .58rem; } .selector__name { font-size: .74rem; }
  .world-arrow { width: 44px; }
  .hint { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 150px); font-size: .56rem; letter-spacing: .14em; }
  .cave__go { font-size: .76rem; padding: 12px 16px; }
}
html.dw-calm .gate__rays, html.dw-calm .sun i { animation: none; }
@media (prefers-reduced-motion: reduce) { .gate__rays, .sun i, .gate.is-lit .gate__logo { animation: none; } }
.story::before { content: ''; position: absolute; left: -10%; right: -10%; top: -30px; bottom: -40px; z-index: -1; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 70%); }
@media (max-width: 520px) { .cave__title { font-size: 1.6rem; white-space: nowrap; } .cave__top .dw-switch { padding-left: 8px; padding-right: 8px; } }

/* ---------- the cinematic cave: intro-cueva.mp4 under the Tree of Life ---------- */
.cave__film { position: absolute; inset: 0; z-index: 1; display: none; overflow: hidden; background: #050604; }
.cave.has-film .cave__film { display: block; }
.cave.has-film .cave__sky, .cave.has-film .cave__beam { display: none; }
/* a soft, blurred copy of the first frame fills the sides on wide screens */
.cave__film::before { content: ''; position: absolute; inset: -40px; background: url('../video/intro-cueva-poster.webp') center / cover no-repeat; filter: blur(34px) brightness(.45) saturate(1.1); transform: scale(1.1); }
.cave__video { position: absolute; top: 0; left: 50%; height: 100%; width: auto; aspect-ratio: 9 / 16; max-width: none; transform: translateX(-50%); object-fit: cover; background: transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  opacity: 0; transition: opacity 1.4s ease; }
.cave.is-film-on .cave__video { opacity: 1; }
@media (max-aspect-ratio: 4 / 5) { .cave__video { left: 0; width: 100%; transform: none; -webkit-mask-image: none; mask-image: none; } }
/* the 20-second day/night cycle washes over the film */
.cave__tint { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 90% 70% at 50% 30%, rgba(255, 226, 150, .10), transparent 70%); mix-blend-mode: soft-light; transition: background 3.5s ease, opacity 3.5s ease; }
.cave.is-night .cave__tint { background: linear-gradient(180deg, rgba(8, 16, 46, .62), rgba(4, 10, 28, .42)); mix-blend-mode: multiply; }
/* the Tree glows around Dionne, never over her: the centre column is kept almost clear */
.cave.has-film .cave__gl { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(50% - var(--hole, 22vw) * 1.7), rgba(0, 0, 0, .16) calc(50% - var(--hole, 22vw)), rgba(0, 0, 0, .16) calc(50% + var(--hole, 22vw)), #000 calc(50% + var(--hole, 22vw) * 1.7), #000 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(50% - var(--hole, 22vw) * 1.7), rgba(0, 0, 0, .16) calc(50% - var(--hole, 22vw)), rgba(0, 0, 0, .16) calc(50% + var(--hole, 22vw)), #000 calc(50% + var(--hole, 22vw) * 1.7), #000 100%); mix-blend-mode: screen; }
.cave.has-film .cave__top { background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent); padding-bottom: 18px; }
.cave__unmute { position: absolute; z-index: 6; left: 50%; top: calc(max(14px, env(safe-area-inset-top)) + 64px); transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; font-family: var(--font-display); font-size: .82rem; letter-spacing: .08em; color: var(--ivory); background: rgba(0, 0, 0, .55); border: 1px solid rgba(180, 205, 74, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer; }
.cave__unmute[hidden] { display: none; }
.cave.has-film .cave__phase { top: auto; left: clamp(14px, 3vw, 36px); right: auto; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 22px); transform: none; text-align: left; }
@media (max-width: 760px) { .cave.has-film .cave__phase { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 84px); } }
.cave__earth { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ivory); background: rgba(5, 10, 6, .55); border: 1px solid rgba(180, 205, 74, .55); box-shadow: 0 0 18px rgba(180, 205, 74, .25); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cave__earth svg { width: 18px; height: 18px; fill: none; stroke: var(--sunlit, #b4cd4a); stroke-width: 1.4; }
.cave__earth:hover { box-shadow: 0 0 28px rgba(180, 205, 74, .45); }
@media (max-width: 520px) { .cave__earth { padding: 8px; } .cave__earth span { display: none; } }

/* ---------- the SPIN cue: an orbit ring + a gentle swipe, until the first touch ---------- */
.spin-cue { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: opacity 1.2s ease; opacity: 0; animation: cueIn 1.4s ease 2.2s forwards; }
.spin-cue.is-hidden { animation: none; opacity: 0 !important; }
@keyframes cueIn { to { opacity: 1; } }
.spin-cue__ring { position: absolute; left: calc(var(--gx, 50%) - var(--gr, 200px) * 1.16); top: calc(var(--gy, 50%) + var(--gr, 200px) * .02); width: calc(var(--gr, 200px) * 2.32); height: calc(var(--gr, 200px) * .62); overflow: visible; }
.spin-cue__arc { fill: none; stroke: rgba(180, 205, 74, .55); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 2 5; animation: cueDash 3s linear infinite; }
.spin-cue__head { fill: none; stroke: #b4cd4a; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.spin-cue__dot { fill: #f7f3e8; filter: drop-shadow(0 0 4px #b4cd4a) drop-shadow(0 0 10px #b4cd4a); }
@keyframes cueDash { to { stroke-dashoffset: -14; } }
.spin-cue__label { position: absolute; left: calc(var(--gx, 50%) + var(--gr, 200px) * .62); top: calc(var(--gy, 50%) + var(--gr, 200px) * .5); display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(5, 10, 4, .58); border: 1px solid rgba(180, 205, 74, .5); box-shadow: 0 0 22px rgba(180, 205, 74, .25);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap; animation: cueFloat 3.6s ease-in-out infinite; }
.spin-cue__label b { font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .38em; text-transform: uppercase; color: #f7f3e8; }
.spin-cue__label i { font-family: var(--font-body); font-style: italic; font-size: .82rem; color: rgba(247, 243, 232, .7); margin-left: -2px; }
.spin-cue__hand { width: 22px; height: 22px; fill: none; stroke: #b4cd4a; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; animation: cueSwipe 2.4s ease-in-out infinite; }
@keyframes cueFloat { 50% { transform: translateY(-6px); } }
@keyframes cueSwipe { 0%, 100% { transform: translateX(-4px) rotate(-8deg); } 50% { transform: translateX(5px) rotate(8deg); } }
@media (max-width: 760px) {
  .spin-cue__label { left: auto; right: 12px; top: calc(var(--gy, 50%) + var(--gr, 200px) * .74); padding: 7px 12px 7px 9px; }
  .spin-cue__label i { display: none; }
}
.dw-calm .spin-cue__label, .dw-calm .spin-cue__hand, .dw-calm .spin-cue__arc { animation: none; }
@media (prefers-reduced-motion: reduce) { .spin-cue__label, .spin-cue__hand, .spin-cue__arc { animation: none; } }

/* ---------- the entrance: the logo carries the name now ---------- */
.gate__logo { top: 38%; width: min(420px, 74vw, 52vh); }
.gate__ui { top: calc(38% + min(210px, 37vw, 26vh) + 8px); }
.gate__ui .gate__btn { margin-top: 6px; }
@media (max-width: 520px) { .gate__logo { top: 34%; } .gate__ui { top: calc(34% + min(37vw, 26vh) + 10px); } }

/* SPIN label: centered in the clear space above the globe, on every screen */
.spin-cue__label, .spin-cue__label i { left: 50%; right: auto; }
.spin-cue__label { left: 50%; top: var(--cue-top, 96px); transform: translateX(-50%); padding: 10px 18px 10px 12px; gap: 10px; animation: cueFloatC 3.6s ease-in-out infinite, cuePulse 3.6s ease-in-out infinite;
  border-color: rgba(180, 205, 74, .75); background: rgba(5, 12, 4, .7); }
.spin-cue__label b { font-size: .92rem; letter-spacing: .42em; }
.spin-cue__label i { display: inline !important; font-size: .86rem; }
.spin-cue__orbit { width: 18px; height: 18px; fill: none; stroke: #b4cd4a; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: cueTurn 2.4s linear infinite; }
@keyframes cueFloatC { 50% { transform: translateX(-50%) translateY(-5px); } }
@keyframes cuePulse { 0%, 100% { box-shadow: 0 0 18px rgba(180, 205, 74, .25); } 50% { box-shadow: 0 0 34px rgba(180, 205, 74, .55); } }
@keyframes cueTurn { to { transform: rotate(-360deg); } }
@media (max-width: 760px) { .spin-cue__label { left: 50%; right: auto; top: var(--cue-top, 160px); padding: 9px 14px 9px 10px; } .spin-cue__label b { font-size: .86rem; } .spin-cue__label i { font-size: .8rem; } }
.spin-cue { animation-delay: 1.2s; }
.dw-calm .spin-cue__orbit { animation: none; }
@media (prefers-reduced-motion: reduce) { .spin-cue__orbit { animation: none; } .spin-cue__label { animation: none; } }

/* ---------- keep Dionne clearly visible through the whole film (day and night) ---------- */
/* the Tree barely touches the centre column, so it never shows through her */
.cave.has-film .cave__gl { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(50% - var(--hole, 22vw) * 1.75), rgba(0, 0, 0, .05) calc(50% - var(--hole, 22vw)), rgba(0, 0, 0, .05) calc(50% + var(--hole, 22vw)), #000 calc(50% + var(--hole, 22vw) * 1.75), #000 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(50% - var(--hole, 22vw) * 1.75), rgba(0, 0, 0, .05) calc(50% - var(--hole, 22vw)), rgba(0, 0, 0, .05) calc(50% + var(--hole, 22vw)), #000 calc(50% + var(--hole, 22vw) * 1.75), #000 100%); }
/* night falls on the cave around her, not on her: a clear oval stays lit where she stands */
.cave.has-film.is-night .cave__tint { mix-blend-mode: multiply;
  background: rgba(14, 24, 60, .55);
  -webkit-mask-image: radial-gradient(ellipse calc(var(--hole, 22vw) * 1.25) 58% at 50% 54%, transparent 55%, #000 100%); mask-image: radial-gradient(ellipse calc(var(--hole, 22vw) * 1.25) 58% at 50% 54%, transparent 55%, #000 100%); }
/* the hologram feeling: very fine drifting light lines over the film, faint enough that she stays sharp */
.cave__film::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 2s ease;
  background: repeating-linear-gradient(180deg, rgba(180, 240, 220, .045) 0 1px, transparent 1px 4px); animation: holoDrift 9s linear infinite; }
.cave.is-film-on .cave__film::after { opacity: 1; }
@keyframes holoDrift { to { background-position: 0 120px; } }
.dw-calm .cave__film::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .cave__film::after { animation: none; } }
.cave.has-film .story::before { display: none; }
.cave.has-film .story__line { text-shadow: 0 0 10px #000, 0 0 24px rgba(0, 0, 0, .9), 0 2px 3px #000; }
.cave__cc { padding: 7px 11px; border-radius: 8px; font-family: var(--font-display); font-weight: 700; font-size: .7rem; letter-spacing: .12em; color: var(--ivory); background: rgba(5, 10, 6, .55); border: 1px solid rgba(180, 205, 74, .55); cursor: pointer; }
.cave__cc[aria-pressed="false"] { opacity: .5; text-decoration: line-through; }
.cave.no-cc .story { display: none; }
.cave.has-film .story__line { font-size: clamp(1rem, 2.1vw, 1.35rem); max-width: 34ch; margin: 0 auto; }

/* ---------- film captions: English on the left, Spanish on the right ---------- */
.cc-pair { display: none; }
.cave.is-film-on .cc-pair { display: block; }
.cave.has-film .story { display: none; }
.cave.no-cc .cc-pair { display: none; }
.cc { position: absolute; z-index: 5; top: 56%; width: calc(50% - var(--hole, 22vw) * 1.15 - clamp(16px, 3vw, 48px)); max-width: 420px; margin: 0;
  font-family: var(--font-body); font-style: italic; font-size: clamp(1rem, 1.7vw, 1.35rem); line-height: 1.5; color: var(--ivory);
  text-shadow: 0 0 10px #000, 0 0 22px rgba(0, 0, 0, .9), 0 2px 3px #000; opacity: 0; transform: translateY(8px); transition: opacity .7s ease, transform .7s ease; }
.cc.is-on { opacity: 1; transform: none; }
.cc--en { left: clamp(16px, 3vw, 48px); text-align: left; padding-left: 14px; border-left: 2px solid rgba(180, 205, 74, .7); }
.cc--es { right: clamp(16px, 3vw, 48px); text-align: right; padding-right: 14px; border-right: 2px solid rgba(127, 224, 200, .7); }
.cc::before { display: block; font-family: var(--font-display); font-style: normal; font-weight: 600; font-size: .62rem; letter-spacing: .3em; margin-bottom: 6px; opacity: .75; }
.cc--en::before { content: 'EN'; color: #b4cd4a; } .cc--es::before { content: 'ES'; color: #7fe0c8; }
/* phones: the film fills the screen, so the two captions sit low, side by side, on a soft dark veil */
@media (max-aspect-ratio: 4 / 5) {
  .cc { top: auto; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 108px); width: calc(50% - 22px); font-size: .86rem; line-height: 1.4;
    background: rgba(0, 0, 0, .38); padding-top: 8px; padding-bottom: 8px; border-radius: 10px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
  .cc--en { left: 12px; padding-right: 10px; } .cc--es { right: 12px; padding-left: 10px; }
}
@media (max-width: 520px) { .cave.has-film .lang { display: none; } .cave.has-film .cave__title { font-size: 1.35rem; } .cave__tools { gap: 6px; } }

/* ---------- the Sun and Moon are now crystal particle spheres (celestial.js) ---------- */
.sun.is-crystal, .moon.is-crystal { position: relative; background: none !important; box-shadow: none !important; overflow: visible; }
.sun.is-crystal i { display: none; }
.crystal-body { position: absolute; pointer-events: none; display: block; }
.orb--sun .orb__label, .orb--moon .orb__label { position: relative; z-index: 2; margin-top: 6px; }
