/* ============================================
   DREAMSEERS - design tokens
   ============================================ */
:root {
  --void: #0a0912;
  --void-deep: #050409;
  --panel: #14121e;
  --panel-raised: #1c1929;
  --mist: #2c2740;
  --mist-soft: #211d30;
  --moon: #eee9f7;
  --dim: #a49bc0;
  --dim-low: #6f6690;
  --dream: #8d7fe0;
  --dream-bright: #a99bff;
  --gold: #c9a24b;
  --gold-soft: #d8bd7f;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1180px;
  --edge: clamp(24px, 5vw, 96px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ============================================
   Slideshow mode: full-viewport sections that
   snap into place as you scroll, like a deck of
   slides changing rather than free scrolling.
   Opt in per page with <body class="page-slides">.
   ============================================ */
html.page-slides,
body.page-slides {
  scroll-snap-type: y mandatory;
}
body.page-slides .slide {
  min-height: 100vh;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 120px 0 80px;
  position: relative;
}
body.page-slides .slide-content {
  width: 100%;
  opacity: 0.35;
  transform: scale(0.96);
  filter: blur(2px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.16,.84,.44,1), filter 0.7s ease;
}
body.page-slides .slide.is-active .slide-content {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}
body.page-slides .site-footer {
  scroll-snap-align: start;
}

@media (prefers-reduced-motion: reduce) {
  html.page-slides, body.page-slides { scroll-snap-type: none; }
  body.page-slides .slide-content { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 720px) {
  body.page-slides .slide { min-height: auto; padding: 110px 0 60px; }
  html.page-slides, body.page-slides { scroll-snap-type: none; }
}

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

body {
  margin: 0;
  background: var(--void);
  color: var(--moon);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::selection { background: var(--dream); color: var(--void-deep); }

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  margin: 0;
  color: var(--moon);
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 600;
}

p { margin: 0; color: var(--dim); }

/* ============================================
   Layout helpers
   ============================================ */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.section {
  position: relative;
  padding: clamp(64px, 12vw, 160px) 0;
}

/* ============================================
   Ambient dream-mote canvas (signature element)
   ============================================ */
#motes {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
}

/* ============================================
   Planet landing backdrop — used on a game's own
   page instead of the starfield, since you've
   arrived on the surface rather than still flying
   through space between worlds.
   ============================================ */
.planet-landing-bg {
  position: fixed;
  inset: -5%;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center 18%;
  filter: blur(50px) brightness(0.38) saturate(1.25);
  transform: scale(1.1);
}
.planet-landing-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(5,4,9,0.55) 75%, rgba(5,4,9,0.85) 100%);
}

/* ============================================
   Nav
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px var(--edge);
  background: linear-gradient(to bottom, rgba(5,4,9,0.85) 0%, rgba(5,4,9,0) 100%);
  backdrop-filter: blur(2px);
  transform: translateY(-18px);
  opacity: 0;
  animation: nav-drop 0.75s cubic-bezier(.16,.84,.44,1) 0.15s forwards;
}
@keyframes nav-drop {
  to { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .nav { animation: none; transform: none; opacity: 1; }
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.nav-mark {
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--moon);
}

.nav-tagline {
  font-family: var(--body);
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim-low);
  padding-left: 18px;
  border-left: 1px solid var(--mist);
  white-space: nowrap;
}
@media (max-width: 860px) {
  .nav-tagline { display: none; }
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--dream), var(--gold-soft));
  z-index: 100;
  transition: width 0.1s linear;
}

/* Nav gains a solid, blurred backing once you scroll past the hero */
.nav {
  transition: background 0.45s ease, padding 0.45s ease, border-color 0.45s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 7, 14, 0.82);
  backdrop-filter: blur(14px);
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--mist-soft);
}

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--dim);
  line-height: 1;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--moon); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold-soft);
  transition: width 0.35s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--void-deep);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 28px;
    padding: 40px var(--edge);
    transition: right 0.45s cubic-bezier(.16,.84,.44,1);
    border-left: 1px solid var(--mist);
  }
  .nav-links.open { right: 0; }
  .nav-toggle {
    display: block;
    z-index: 60;
    background: none;
    border: none;
    color: var(--moon);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
  }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
  overflow: hidden;
}

/* ============================================
   Global cursor-reactive glow, runs the full
   height of the page, not just inside the hero
   ============================================ */
#cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.6s ease;
  background: radial-gradient(
    620px circle at var(--cx, 50vw) var(--cy, 32vh),
    rgba(141, 127, 224, 0.14),
    rgba(141, 127, 224, 0.05) 42%,
    transparent 72%
  );
}
#cursor-glow.active { opacity: 1; }

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--edge);
  width: 100%;
}

.hero-eyebrow {
  opacity: 0;
  animation: rise 1s ease forwards 0.2s;
}

.hero-title {
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 0.98;
  margin-top: 18px;
  font-weight: 450;
}
.hero-title em {
  font-style: italic;
  color: var(--dream-bright);
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line span {
  display: block;
  transform: translateY(110%);
  animation: rise-block 1.1s cubic-bezier(.16,.84,.44,1) forwards;
}
.hero-title .line:nth-child(1) span { animation-delay: 0.35s; }
.hero-title .line:nth-child(2) span { animation-delay: 0.5s; }

.hero-sub {
  max-width: 460px;
  margin-top: 32px;
  font-size: 1.05rem;
  color: var(--dim);
  opacity: 0;
  animation: rise 1s ease forwards 0.9s;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rise-block {
  to { transform: translateY(0); }
}

/* ============================================
   Scroll indicator, double chevron, bottom center
   ============================================ */
#scroll-indicator {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
}
#scroll-indicator.is-hidden { opacity: 0; }

.scroll-chevron {
  position: relative;
  width: 14px;
  height: 14px;
}
.scroll-chevron:first-child { margin-bottom: -4px; }
.scroll-chevron::before {
  content: "";
  position: absolute;
  inset: 0;
  border-right: 2px solid var(--gold-soft);
  border-bottom: 2px solid var(--gold-soft);
  transform: rotate(45deg);
}
.scroll-chevron.top { opacity: 0.32; animation: chevron-bob 1.8s ease-in-out infinite; }
.scroll-chevron.bottom { opacity: 1; animation: chevron-bob 1.8s ease-in-out infinite 0.2s; }

@keyframes chevron-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-chevron.top, .scroll-chevron.bottom { animation: none; }
}

/* ============================================
   Reveal-on-scroll
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(.16,.84,.44,1), transform 0.9s cubic-bezier(.16,.84,.44,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1.is-visible { transition-delay: 0.12s; }
.reveal-delay-2.is-visible { transition-delay: 0.24s; }

/* Dreamy focus-in: soft blur resolves into clarity, like a star settling into view */
.reveal-blur {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(14px);
  transition: opacity 1.1s cubic-bezier(.16,.84,.44,1), filter 1.1s cubic-bezier(.16,.84,.44,1), transform 1.1s cubic-bezier(.16,.84,.44,1);
}
.reveal-blur.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Drifts in from the left */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.95s cubic-bezier(.16,.84,.44,1), transform 0.95s cubic-bezier(.16,.84,.44,1);
}
.reveal-left.is-visible { opacity: 1; transform: translateX(0); }

/* Drifts in from the right */
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.95s cubic-bezier(.16,.84,.44,1), transform 0.95s cubic-bezier(.16,.84,.44,1);
}
.reveal-right.is-visible { opacity: 1; transform: translateX(0); }

/* Gentle zoom, like a spotlight widening */
.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 1s ease, transform 1s cubic-bezier(.16,.84,.44,1);
}
.reveal-scale.is-visible { opacity: 1; transform: scale(1); }

/* Slow, pure fade: transparent to visible with no scale/blur pop */
.reveal-fade {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.6s ease, transform 1.6s ease;
}
.reveal-fade.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal-blur { filter: none; }
}

/* ============================================
   Section headers
   ============================================ */
.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  margin-top: 14px;
}
.section-head p {
  margin-top: 18px;
  font-size: 1.05rem;
  max-width: 52ch;
}

/* ============================================
   Game showcase feature (full-bleed, like the character slides)
   ============================================ */
.game-feature {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  min-height: min(72vh, 640px);
  display: flex;
  align-items: flex-end;
}
.game-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.02);
  transition: transform 1.4s cubic-bezier(.16,.84,.44,1);
}
.game-feature:hover img { transform: scale(1.07); }
.game-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5,4,9,0.95) 0%, rgba(5,4,9,0.55) 32%, rgba(5,4,9,0.05) 62%),
    linear-gradient(to right, rgba(5,4,9,0.4) 0%, transparent 55%);
  pointer-events: none;
}
.game-feature-info {
  position: relative;
  z-index: 2;
  padding: 40px clamp(24px, 4vw, 56px) 48px;
  max-width: 640px;
}
.game-feature-info .eyebrow { display: block; margin-bottom: 14px; }
.game-feature-info h3 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
}
.game-feature-info p {
  margin-top: 18px;
  font-size: 1.02rem;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.game-tags span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  background: rgba(255,255,255,0.08);
  padding: 6px 12px;
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moon);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gold-soft);
  transition: gap 0.3s ease, color 0.3s ease;
}
.btn:hover { gap: 16px; color: var(--gold-soft); }
.btn::after { content: "→"; }

/* ============================================
   Games hub, scalable card grid (games.html)
   ============================================ */
.games-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.game-index-card {
  display: block;
  background: linear-gradient(155deg, var(--panel) 0%, var(--panel-raised) 100%);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 24px 60px -45px rgba(0,0,0,0.7);
  transition: transform 0.5s cubic-bezier(.16,.84,.44,1), box-shadow 0.5s ease;
  opacity: 0;
  transform: translateY(20px);
}
.games-index.is-visible .game-index-card {
  opacity: 1;
  transform: translateY(0);
}
.games-index.is-visible .game-index-card:nth-child(1) { transition-delay: 0.05s; }
.games-index.is-visible .game-index-card:nth-child(2) { transition-delay: 0.15s; }
.games-index.is-visible .game-index-card:nth-child(3) { transition-delay: 0.25s; }
.games-index.is-visible .game-index-card:nth-child(4) { transition-delay: 0.35s; }
.games-index.is-visible .game-index-card:nth-child(5) { transition-delay: 0.45s; }
.games-index.is-visible .game-index-card:nth-child(6) { transition-delay: 0.55s; }

.game-index-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px -20px rgba(141,127,224,0.35);
}

.game-index-art {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.game-index-art img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s cubic-bezier(.16,.84,.44,1);
  mask-image: radial-gradient(ellipse 94% 92% at center, black 76%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 94% 92% at center, black 76%, transparent 100%);
}
.game-index-card:hover .game-index-art img { transform: scale(1.08); }

.game-index-body { padding: 26px 28px 30px; }
.game-index-body h3 {
  font-size: 1.7rem;
  margin-top: 10px;
}
.game-index-body p {
  margin-top: 14px;
  font-size: 0.95rem;
}
.game-index-status {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  background: rgba(255,255,255,0.05);
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.4s ease, color 0.4s ease;
}
.game-index-card:hover .game-index-status {
  background: rgba(201,162,75,0.14);
  color: var(--gold-soft);
}
.future-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.future-item {
  background: var(--panel);
  border-radius: 6px;
  padding: 40px 32px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(18px);
  transition: background 0.4s ease, transform 0.6s cubic-bezier(.16,.84,.44,1), opacity 0.6s ease, box-shadow 0.4s ease;
}
.future-strip.is-visible .future-item { opacity: 1; transform: translateY(0); }
.future-strip.is-visible .future-item:nth-child(1) { transition-delay: 0.05s; }
.future-strip.is-visible .future-item:nth-child(2) { transition-delay: 0.15s; }
.future-strip.is-visible .future-item:nth-child(3) { transition-delay: 0.25s; }
.future-strip.is-visible .future-item:nth-child(4) { transition-delay: 0.35s; }
.future-strip .future-item:hover {
  background: var(--panel-raised);
  transform: translateY(-5px);
  box-shadow: 0 24px 50px -35px rgba(0,0,0,0.7);
}
.future-item .status {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.future-item h4 {
  font-size: 1.5rem;
  margin-top: auto;
  padding-top: 24px;
}
.future-item p { margin-top: 10px; font-size: 0.9rem; }

/* ============================================
   About teaser
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-grid .lede {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--moon);
  font-weight: 400;
  line-height: 1.35;
}
.about-grid .lede em { color: var(--dream-bright); font-style: italic; }

.stat-row {
  display: flex;
  gap: clamp(28px, 5vw, 56px);
  margin-top: 40px;
  flex-wrap: wrap;
}
.stat-row .stat strong {
  display: block;
  font-family: var(--display);
  font-size: 2.1rem;
  color: var(--gold-soft);
  font-weight: 500;
}
.stat-row .stat span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim-low);
}

/* ============================================
   Credits
   ============================================ */
.credits-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.credit-entry {
  background: var(--panel);
  border-radius: 6px;
  padding: 26px 24px;
  opacity: 0;
  transform: translateY(16px);
  transition: transform 0.55s cubic-bezier(.16,.84,.44,1), opacity 0.55s ease, background 0.35s ease, box-shadow 0.35s ease;
}
.credits-list.is-visible .credit-entry { opacity: 1; transform: translateY(0); }
.credits-list.is-visible .credit-entry:nth-child(1) { transition-delay: 0.04s; }
.credits-list.is-visible .credit-entry:nth-child(2) { transition-delay: 0.1s; }
.credits-list.is-visible .credit-entry:nth-child(3) { transition-delay: 0.16s; }
.credits-list.is-visible .credit-entry:nth-child(4) { transition-delay: 0.22s; }
.credits-list .credit-entry:hover {
  background: var(--panel-raised);
  box-shadow: 0 20px 44px -32px rgba(0,0,0,0.7);
}
.credit-entry .role {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim-low);
}
.credit-entry .name {
  display: block;
  font-family: var(--display);
  font-size: 1.3rem;
  margin-top: 8px;
  color: var(--moon);
}
.credit-entry .name a:hover { color: var(--dream-bright); }

.credit-links {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.credit-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: var(--dim);
  transition: background 0.3s ease, color 0.3s ease;
}
.credit-links a:hover {
  background: rgba(141,127,224,0.18);
  color: var(--moon);
}
.credit-links svg { width: 14px; height: 14px; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--mist);
  padding: 56px 0 34px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-mark {
  font-family: var(--display);
  font-size: 1.6rem;
  font-style: italic;
  color: var(--moon);
}
.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-col h5 {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim-low);
  margin-bottom: 14px;
  font-family: var(--body);
  font-weight: 600;
}
.footer-col a, .footer-col span {
  display: block;
  font-size: 0.9rem;
  color: var(--dim);
  margin-bottom: 8px;
  transition: color 0.25s ease;
}
.footer-col a:hover { color: var(--moon); }

.discord-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.discord-link svg { flex-shrink: 0; display: block; position: relative; top: 0.5px; }
.footer-col a.discord-link {
  display: flex;
  align-items: center;
}
.btn.discord-link {
  display: inline-flex;
  align-items: center;
}

.footer-bottom {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--mist-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--dim-low);
}

/* ============================================
   Inner-page header (about / game detail / future)
   ============================================ */
.page-header {
  padding: clamp(140px, 20vw, 220px) 0 clamp(48px, 8vw, 90px);
  position: relative;
  z-index: 1;
}
.page-header h1 {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  margin-top: 16px;
}
.page-header p {
  margin-top: 22px;
  max-width: 60ch;
  font-size: 1.05rem;
}
.breadcrumb {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim-low);
}
.breadcrumb a:hover { color: var(--gold-soft); }

/* generic content sections */
.content-block { max-width: 760px; }
.content-block h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 20px;
}
.content-block p + p { margin-top: 16px; }
.content-block p { font-size: 1.02rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 40px;
}
.gallery-grid .g-item {
  aspect-ratio: 4/3;
  background: linear-gradient(160deg, var(--mist-soft), var(--void-deep));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.6s cubic-bezier(.16,.84,.44,1), opacity 0.6s ease, box-shadow 0.4s ease;
}
.gallery-grid.is-visible .g-item { opacity: 1; transform: translateY(0) scale(1); }
.gallery-grid.is-visible .g-item:nth-child(1) { transition-delay: 0.03s; }
.gallery-grid.is-visible .g-item:nth-child(2) { transition-delay: 0.09s; }
.gallery-grid.is-visible .g-item:nth-child(3) { transition-delay: 0.15s; }
.gallery-grid.is-visible .g-item:nth-child(4) { transition-delay: 0.21s; }
.gallery-grid.is-visible .g-item:nth-child(5) { transition-delay: 0.27s; }
.gallery-grid.is-visible .g-item:nth-child(6) { transition-delay: 0.33s; }
.gallery-grid .g-item:hover { box-shadow: 0 20px 50px -30px rgba(141,127,224,0.45); }
.gallery-grid .g-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(.16,.84,.44,1);
  mask-image: radial-gradient(ellipse 94% 92% at center, black 78%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 94% 92% at center, black 78%, transparent 100%);
}
.gallery-grid .g-item:hover img { transform: scale(1.08); }
.gallery-grid .g-item span {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim-low);
}

.divider {
  height: 1px;
  background: var(--mist);
  margin: 0;
}

/* ============================================
   Planet constellation (homepage) — tiny planets
   connected by faint lines. No image, no status
   text, until you hover; then the real art fades
   in and the status label appears.
   ============================================ */
.planet-constellation {
  position: relative;
  margin-top: 20px;
  padding: 30px 0;
}

.constellation-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.planet-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(64px, 10vw, 160px);
}

.planet-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.planet-visual-sm {
  position: relative;
  width: clamp(20px, 2.2vw, 30px);
  flex-shrink: 0;
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(.16,.84,.44,1);
}
.planet-card:hover .planet-visual-sm,
.planet-card:focus-visible .planet-visual-sm {
  transform: scale(1.7);
}

.planet-orb-sm {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 30%, var(--planet-glow, rgba(141,127,224,0.55)), rgba(20,18,30,0.95) 68%),
    conic-gradient(from 200deg, var(--planet-tint, rgba(201,162,75,0.32)), var(--planet-glow, rgba(141,127,224,0.26)), var(--planet-tint, rgba(201,162,75,0.32)));
  box-shadow:
    0 6px 16px -6px var(--planet-glow, rgba(141,127,224,0.5)),
    inset -4px -3px 8px rgba(0,0,0,0.6),
    inset 3px 2px 6px rgba(255,255,255,0.08);
  transition: box-shadow 0.4s ease;
}
.planet-card:hover .planet-orb-sm {
  box-shadow:
    0 10px 26px -8px var(--planet-glow, rgba(141,127,224,0.65)),
    inset -4px -3px 8px rgba(0,0,0,0.55),
    inset 3px 2px 6px rgba(255,255,255,0.1);
}
.planet-orb-sm img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center 18%;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.planet-card:hover .planet-orb-sm img,
.planet-card:focus-visible .planet-orb-sm img {
  opacity: 1;
}
.planet-orb-sm::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,0.18), transparent 55%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.planet-orb-sm.is-placeholder .tba-glyph { display: none; }
.planet-orb .tba-glyph {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: 0.05em;
  color: rgba(238,233,247,0.55);
}

.planet-card-name {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.92rem;
  color: var(--dim);
  white-space: nowrap;
  transition: color 0.4s ease, transform 0.4s cubic-bezier(.16,.84,.44,1);
}
.planet-card:hover .planet-card-name,
.planet-card:focus-visible .planet-card-name {
  color: var(--gold-soft);
  transform: translateY(10px);
}

.planet-card-status {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 8px;
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim-low);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.planet-card:hover .planet-card-status,
.planet-card:focus-visible .planet-card-status {
  opacity: 1;
  transform: translateY(0);
}

/* Click-to-zoom transition elements (created by JS) */
.planet-zoom-dim {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--void-deep);
  opacity: 0;
  pointer-events: none;
}
.planet-zoom-clone {
  position: fixed;
  z-index: 9001;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  box-shadow: 0 0 200px rgba(141,127,224,0.6);
}
.planet-zoom-clone img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }

/* ============================================
   Planet slides (games.html hub) — each game is
   a planet in the starfield; scrolling flies you
   toward the nearest one as it grows into view.
   ============================================ */
.planet-content {
  transform: scale(0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(28px, 4vw, 44px);
  width: 100%;
}
body.page-slides .planet-content { transition: none; }

@media (max-height: 700px) {
  .planet-content { gap: clamp(16px, 3vw, 28px); }
  .planet-visual { width: min(38vw, 340px); }
}

a.zoom-nav {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.planet-visual {
  position: relative;
  width: min(50vw, 460px);
  max-width: 84vw;
}

.planet-ring {
  position: absolute;
  inset: -18% -34%;
  border: 1px solid rgba(238,233,247,0.14);
  border-radius: 50%;
  transform: rotate(-14deg);
  pointer-events: none;
}
.planet-ring::before {
  content: "";
  position: absolute;
  inset: 6%;
  border: 1px solid rgba(201,162,75,0.1);
  border-radius: 50%;
}

.planet-orb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 50px 150px -25px var(--planet-glow, rgba(141,127,224,0.5)),
    inset -38px -28px 74px rgba(0,0,0,0.68),
    inset 18px 10px 54px rgba(255,255,255,0.05);
}
.planet-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.planet-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,0.16), transparent 55%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.planet-info .eyebrow { display: block; margin-bottom: 8px; }
.planet-info h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.planet-info p {
  margin-top: 14px;
  max-width: 46ch;
  font-size: 1.02rem;
}
.planet-info .btn { margin-top: 24px; }

@media (max-width: 640px) {
  .planet-visual { width: min(64vw, 340px); }
}

/* ============================================
   Character slides (everdream.html cast)
   Each character is its own full-viewport slide;
   scrolling moves straight from one to the next.
   ============================================ */
.char-slide {
  padding: 0;
  align-items: flex-end;
  overflow: hidden;
}
body.page-slides .char-slide.slide { min-height: 100vh; }

.char-slide .slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.char-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transform: scale(1.03);
}

.char-slide-bg-placeholder {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 38% 32%, rgba(141,127,224,0.4), rgba(20,18,30,0.96) 68%),
    conic-gradient(from 200deg, rgba(201,162,75,0.2), rgba(141,127,224,0.16), rgba(201,162,75,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
}
.char-slide-bg-placeholder span {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: 0.06em;
  color: rgba(238,233,247,0.4);
}

.char-slide-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5,4,9,0.94) 0%, rgba(5,4,9,0.5) 34%, rgba(5,4,9,0.08) 62%, rgba(5,4,9,0.3) 100%),
    linear-gradient(to right, rgba(5,4,9,0.5) 0%, transparent 50%);
  pointer-events: none;
}

.char-slide-info {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(64px, 10vw, 110px);
}
.char-slide-info h2 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  margin-top: 12px;
}
.char-slide-info p {
  margin-top: 16px;
  max-width: 56ch;
  font-size: 1.05rem;
}

/* Fixed dot nav for jumping directly to a character, shown only while
   scrolling through the character slides */
.char-dots {
  position: fixed;
  right: clamp(20px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%) translateX(12px);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.char-dots.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}
.char-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(238,233,247,0.4);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}
.char-dots button:hover { border-color: var(--gold-soft); }
.char-dots button.is-active {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  transform: scale(1.3);
}

@media (max-width: 640px) {
  .char-dots { display: none; }
}

/* ============================================
   Applications page — forms + Roblox group CTA
   ============================================ */
.apply-intro-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 780px) {
  .apply-intro-grid { grid-template-columns: 1fr; }
}

.roblox-card {
  background: var(--panel);
  border-radius: 8px;
  padding: 32px;
}
.roblox-card .eyebrow { display: block; margin-bottom: 10px; }
.roblox-card h3 { font-size: 1.4rem; margin-top: 4px; }
.roblox-card p { margin-top: 12px; font-size: 0.94rem; }

.apply-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.apply-nav a {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  background: rgba(255,255,255,0.05);
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease;
}
.apply-nav a:hover { background: rgba(141,127,224,0.16); color: var(--moon); }

.app-section {
  scroll-margin-top: 110px;
}
.app-card {
  background: var(--panel);
  border-radius: 10px;
  padding: clamp(28px, 4vw, 48px);
}
.app-card-head { max-width: 640px; }
.app-card-head .eyebrow { display: block; margin-bottom: 10px; }
.app-card-head p { margin-top: 14px; font-size: 0.98rem; }

.app-form {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.app-form .field-full { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .app-form { grid-template-columns: 1fr; }
}

.app-form label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}
.app-form input,
.app-form select,
.app-form textarea {
  width: 100%;
  background: var(--void);
  border: 1px solid var(--mist);
  border-radius: 4px;
  padding: 12px 14px;
  color: var(--moon);
  font-family: var(--body);
  font-size: 0.94rem;
  transition: border-color 0.3s ease;
}
.app-form input::placeholder,
.app-form textarea::placeholder { color: var(--dim-low); }
.app-form input:focus,
.app-form select:focus,
.app-form textarea:focus {
  outline: none;
  border-color: var(--dream);
}
.app-form textarea { resize: vertical; min-height: 110px; }
.app-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a49bc0' stroke-width='1.5' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.app-form .btn {
  border: none;
  background: none;
  font-family: var(--body);
  cursor: pointer;
}

.form-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--dim-low);
}

/* ============================================
   Application chooser cards + modal popups
   ============================================ */
.apply-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 780px) {
  .apply-cards { grid-template-columns: 1fr; }
}

.apply-choice-card {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border-radius: 10px;
  padding: 28px 26px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(.16,.84,.44,1), background 0.4s ease, box-shadow 0.4s ease;
}
.apply-choice-card:hover,
.apply-choice-card:focus-visible {
  background: var(--panel-raised);
  transform: translateY(-5px);
  box-shadow: 0 24px 50px -32px rgba(141,127,224,0.5);
}
.apply-choice-card .eyebrow { display: block; margin-bottom: 10px; }
.apply-choice-card h3 {
  font-size: 1.35rem;
  margin-top: 4px;
}
.apply-choice-card p {
  margin-top: 12px;
  font-size: 0.9rem;
}
.apply-choice-card .apply-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.apply-choice-card .apply-cta::after { content: "→"; transition: transform 0.3s ease; }
.apply-choice-card:hover .apply-cta::after { transform: translateX(4px); }

/* Modal */
.app-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5,4,9,0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.app-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.app-modal {
  position: relative;
  width: min(720px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: 12px;
  padding: clamp(28px, 4vw, 48px);
  transform: translateY(24px) scale(0.98);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(.16,.84,.44,1), opacity 0.4s ease;
}
.app-modal-overlay.is-open .app-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.app-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.06);
  color: var(--moon);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.app-modal-close:hover { background: rgba(255,255,255,0.14); }

@media (prefers-reduced-motion: reduce) {
  .app-modal-overlay, .app-modal { transition: none; }
}

/* Application form success state (shown after fetch-based submit) */
.app-success {
  text-align: center;
  padding: 20px 0 8px;
}
.app-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(141,127,224,0.16);
  color: var(--dream-bright);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-success h2 { font-size: 1.6rem; }
.app-success p {
  margin-top: 12px;
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.96rem;
}
.app-success .btn {
  margin-top: 26px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--body);
}

.form-status-message {
  margin-top: 16px;
  font-size: 0.85rem;
}
.form-status-message.is-error { color: #e08a8a; }