:root {
  --text: #FFFFFF;
  --text-dim: rgba(255, 255, 255, 0.8);
  --text-faint: rgba(255, 255, 255, 0.52);
  --pill-bg: rgba(8, 28, 48, 0.24);
  --pill-border: rgba(255, 255, 255, 0.28);
  --pill-active-bg: rgba(255, 255, 255, 0.96);
  --pill-active-text: #082333;
  --serif: 'Didot', 'Bodoni 72', 'Baskerville', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  --mono: 'SF Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; cursor: none !important; }
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0A6BE1;
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

#glCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
}

/* =========================================================
   CUSTOM 3D ROUNDED CARTOON CURSOR + ANIMATED GRAB HAND
   ========================================================= */
.toy-cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
  transition: opacity 0.2s ease;
}
.toy-cursor svg {
  display: block;
  overflow: visible;
}
.cursor-svg {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.18s var(--ease), transform 0.22s var(--ease);
}
/* Default 3D Rounded Arrow */
.toy-cursor[data-state="arrow"] .cur-arrow {
  opacity: 1;
  transform: translate(-5px, -4px) scale(1);
}
.toy-cursor[data-state="pointer"] .cur-arrow {
  opacity: 1;
  transform: translate(-5px, -4px) scale(1.14) rotate(-6deg);
}
/* Hovering Plushie: Continuous Animated Grabbing Hand */
.toy-cursor[data-state="grab-anim"] .cur-hand-open {
  opacity: 1;
  transform: translate(-22px, -22px) scale(1);
  animation: handGrabCycle 0.68s ease-in-out infinite;
}
@keyframes handGrabCycle {
  0%, 100% { transform: translate(-22px, -22px) scale(1.06) rotate(-5deg); }
  50%      { transform: translate(-22px, -19px) scale(0.88) rotate(6deg); }
}
.toy-cursor[data-state="grab-anim"] .finger-curl {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: fingerPinch 0.68s ease-in-out infinite;
}
@keyframes fingerPinch {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.72) translateY(3px); }
}
/* Actively Pulling Slingshot: Closed 3D Fist */
.toy-cursor[data-state="grabbing"] .cur-hand-closed {
  opacity: 1;
  transform: translate(-22px, -20px) scale(0.95) rotate(-8deg);
}

/* Soft Volumetric Cloud-Dive Transition Veil (Fused M3) */
.cloud-veil {
  position: fixed;
  inset: -14vh -14vw;
  z-index: 18;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 55% 42% at 24% 48%, rgba(255, 255, 255, 0.96), transparent 70%),
    radial-gradient(ellipse 60% 48% at 74% 52%, rgba(246, 250, 255, 0.95), transparent 72%),
    radial-gradient(ellipse 75% 60% at 50% 50%, rgba(255, 255, 255, 0.98), rgba(232, 244, 255, 0.88) 58%, transparent 90%);
  will-change: opacity, transform;
}

/* Crisp Minimalist Slingshot Aiming Overlay (Fused M4) */
.sling-svg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 19;
  pointer-events: none;
}

/* Whisper-Quiet Top Bar */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  padding: 26px 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.top-bar > * { pointer-events: auto; }
.brand {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.16em;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 2px 16px rgba(5, 25, 55, 0.22);
}
.top-cue {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: 999px;
}

/* Minimal Floating Chapter Info (Left Spacious Negative Space) */
.chapter-info {
  position: fixed;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  max-width: 340px;
  pointer-events: none;
  transition: opacity 0.42s var(--ease), transform 0.52s var(--ease);
}
.chapter-info.is-launching {
  opacity: 0;
  transform: translateY(calc(-50% + 16px));
}
.chapter-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.chapter-title {
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 60px);
  font-weight: 400;
  line-height: 1.02;
  color: #fff;
  margin-bottom: 14px;
  text-shadow: 0 4px 26px rgba(5, 25, 55, 0.22);
}
.chapter-desc {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-dim);
  margin-bottom: 22px;
}

/* Action Row: CTA Link OR Coming Soon Badge OR Landing Social Icons */
.chapter-actions {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.chapter-enter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(10px);
  padding: 11px 20px;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.chapter-enter:hover {
  background: #fff;
  color: #082333;
  transform: translateY(-2px);
}
.coming-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(8, 28, 48, 0.28);
  border: 1px dashed rgba(255, 255, 255, 0.45);
  padding: 10px 18px;
  border-radius: 999px;
}

/* Landing Page Social Icon Row (Minimal Icon-Only Circles) */
.social-icons {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex-shrink: 0;
}
.icon-btn:hover {
  background: #fff;
  color: #082333;
  transform: translateY(-2px) scale(1.04);
}

.is-hidden { display: none !important; }

/* Minimal Loading Pill */
.loader-pill {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(8, 28, 48, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  padding: 12px 22px;
  border-radius: 999px;
  transition: opacity 0.4s ease;
}
.loader-pill.fade-out { opacity: 0; pointer-events: none; }

/* Bottom Floating 4-Section Pill Dock */
.toss-dock {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 999px;
  box-shadow: 0 18px 44px rgba(5, 25, 55, 0.18);
}
.toss-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  transition: background 0.28s var(--ease), color 0.28s var(--ease), transform 0.22s var(--ease);
}
.toss-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; transform: translateY(-1px); }
.toss-btn.active { background: var(--pill-active-bg); color: var(--pill-active-text); font-weight: 600; }
.toss-btn .num { opacity: 0.52; font-size: 10px; }

@media (max-width: 860px) {
  * { cursor: auto !important; }
  .toy-cursor { display: none; }
  .top-bar { padding: 16px 20px; }
  .top-cue { display: none; }
  .chapter-info { left: 20px; right: 20px; top: 82px; transform: none; max-width: none; text-align: center; }
  .chapter-actions { justify-content: center; }
  .toss-dock { width: calc(100vw - 24px); overflow-x: auto; justify-content: flex-start; }
}
