/* ---- Lander Intro Dialog (Anime.js) ---- */
html.lander-skipped #landerOverlay,
html.lander-skipped .lander-overlay {
  display: none !important;
}
html.lander-active .lander-overlay { display: flex; }
body.lander-locked {
  overflow: hidden !important;
  touch-action: none;
}
.lander-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 45%, rgba(15, 23, 42, 0.98) 0%, rgba(8, 14, 26, 0.99) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

/* Top Left: Language Row & Switcher */
.lander-lang-wrap {
  position: fixed;
  top: 22px;
  left: 28px;
  z-index: 10001;
  display: flex;
  align-items: center;
}
.lander-lang-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(148, 163, 184, 0.55);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
  outline: none;
}
.lander-lang-btn:hover {
  color: rgba(226, 232, 240, 0.9);
}
.lander-lang-tokens {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lander-lang-tokens .lt {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}
.lander-lang-tokens .lt:hover, .lander-lang-tokens .lt.active {
  color: #60A5FA;
  background: rgba(59, 130, 246, 0.12);
}
.lander-lang-sep {
  opacity: 0.35;
}

/* Language Switcher Modal */
.lander-lang-modal {
  position: fixed;
  inset: 0;
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lander-lang-dialog {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  width: 330px;
  max-width: 90vw;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.lander-lang-dialog.open {
  transform: scale(1);
}
.lander-lang-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.lander-lang-head h3 {
  font-size: 13px;
  font-weight: 700;
  color: #E2E8F0;
  letter-spacing: 0.02em;
}
.lander-lang-close {
  background: transparent;
  border: none;
  color: rgba(148, 163, 184, 0.6);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.lander-lang-close:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.1);
}
.lander-lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.lander-lang-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #CBD5E1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.lander-lang-opt:hover, .lander-lang-opt.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.45);
  color: #FFFFFF;
}
@media (max-width: 640px) {
  .lander-lang-wrap {
    top: 14px;
    left: 14px;
  }
  .lander-lang-tokens {
    gap: 4px;
  }
  .lander-skip-btn {
    bottom: 14px;
    right: 18px;
  }
}

/* Bottom Right: Skip Button */
.lander-skip-btn {
  position: fixed;
  bottom: 22px;
  right: 28px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.45);
  background: transparent;
  border: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
  z-index: 10001;
  padding: 4px 6px;
}
.lander-skip-btn:hover {
  color: rgba(226, 232, 240, 0.9);
}

/* Centered "Hi." Wrapper & Typography */
.lander-hi-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10000;
}
.lander-hi {
  font-size: clamp(3rem, 7.5vw, 5.2rem);
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  text-shadow: none;
  opacity: 0;
  pointer-events: none;
  letter-spacing: -0.03em;
  margin: 0;
  padding: 0;
  text-align: center;
  white-space: nowrap;
  will-change: clip-path, opacity, transform;
  transform-origin: center center;
}

/* Gliding Glowing Cursor: Thin White Rectangular Line */
.lander-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 10005;
  width: 2px;
  min-width: 2px;
  border-radius: 1px;
  background: #FFFFFF;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.85), 0 0 12px rgba(255, 255, 255, 0.4);
  transform: translateY(-50%);
  opacity: 0;
  will-change: left, top, height, opacity;
}

/* Center Narrative Stage */
.lander-stage {
  max-width: 820px;
  width: 92%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Start, not center: the overlay already centers the stage, and centered
     content that overflows a short screen spills above the scroll origin. */
  justify-content: flex-start;
  opacity: 0;
  position: relative;
  z-index: 10000;
  padding: 20px;
  /* Scroll beneath neither the fixed language row (top) nor skip (bottom). */
  max-height: calc(100% - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.lander-stage::-webkit-scrollbar {
  display: none;
}
.lander-query-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}
.lander-query {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #F8FAFC;
  line-height: 1.15;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
  clip-path: polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%);
  will-change: clip-path;
}
.lander-desc {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  font-size: clamp(0.95rem, 1.85vw, 1.15rem);
  line-height: 1.65;
  color: #CBD5E1;
  font-weight: 450;
  position: relative;
  text-align: center;
}
.lander-desc-line {
  display: block;
  margin: 6px 0;
  clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
  will-change: clip-path;
}
.lander-desc .m-word,
.lander-desc .anime-word,
.anime-word {
  display: inline-block;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  transition: color 0.3s ease;
}
.lander-desc .m-word[data-target],
.lander-desc .anime-word[data-target] {
  color: #FFFFFF;
  font-weight: 500;
}
.lander-chips-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  max-width: 720px;
}
.lander-story-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 9999px; /* circular pill box */
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #93C5FD;
  background: rgba(30, 58, 138, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(14px) scale(0.92);
  will-change: transform, opacity;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.lander-story-chip:hover {
  background: rgba(37, 99, 235, 0.32);
  border-color: rgba(147, 197, 253, 0.65);
  color: #FFFFFF;
  transform: translateY(-2px) scale(1.02);
}
.lander-story-chip .chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38BDF8;
  box-shadow: 0 0 8px #38BDF8, 0 0 14px rgba(56, 189, 248, 0.6);
  flex-shrink: 0;
}
.lander-explore-wrap {
  margin-top: 26px;
  opacity: 0;
  transform: translateY(-18px);
}
.lander-explore-btn {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: 12px;
  cursor: pointer;
  /* The intro is dark in both themes, so the button always takes the
     dark theme's resting colours; the light theme's are dark blue on navy. */
  background: rgba(59, 130, 246, 0.12);
  color: #93C5FD;
  border: 1px solid rgba(147, 197, 253, 0.35);
}

/* Liquid Glass Burst Lens */
.lander-glass-lens {
  position: fixed;
  top: 0;
  left: 0;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10002;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.5);
  backdrop-filter: blur(14px) saturate(220%) contrast(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(220%) contrast(1.2);
  background: radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.12) 36%, rgba(59, 130, 246, 0.08) 60%, rgba(255, 255, 255, 0) 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 12px 40px rgba(15, 23, 42, 0.35),
    0 0 24px rgba(59, 130, 246, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
