:root {
  color-scheme: dark;
  --canvas: #050816;
  --surface: rgba(12, 18, 40, 0.72);
  --surface-strong: rgba(18, 27, 58, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.08);
  --text: #f7f2ec;
  --muted: rgba(247, 242, 236, 0.7);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #ff845c;
  --accent-soft: #ffb98c;
  --teal: #9cf3ec;
  --gold: #ffd8a4;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --stage-progress: 0;
  --studio-opacity: 1;
  --studio-shift: 0;
  --studio-scale: 1;
  --game-opacity: 0;
  --game-shift: 70;
  --game-scale: 0.94;
  --space-opacity: 0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 151, 94, 0.24), transparent 28%),
    linear-gradient(180deg, #1e1327 0%, #091021 36%, #050816 100%);
  color: var(--text);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  isolation: isolate;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem clamp(1.2rem, 2vw, 2.25rem);
  background: linear-gradient(180deg, rgba(5, 8, 22, 0.86), rgba(5, 8, 22, 0));
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand__logo {
  width: 4rem;
  height: 4rem;
  flex: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 18px 26px rgba(255, 126, 79, 0.24));
}

.brand__text {
  display: grid;
  gap: 0.12rem;
}

.brand__text strong {
  font-family: "Sora", "Space Grotesk", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand__text span {
  color: var(--muted);
  font-size: 0.86rem;
}

.topbar__nav {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.topbar__nav a {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  transform: translateY(-1px);
}

.scroll-stage {
  position: relative;
  min-height: 260vh;
}

.scroll-stage__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  overflow: clip;
}

.scroll-stage__backdrop,
.panel {
  position: absolute;
  inset: 0;
}

.scroll-stage__backdrop {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 179, 113, 0.34), transparent 26%),
    radial-gradient(circle at 78% 18%, rgba(255, 101, 123, 0.2), transparent 24%),
    linear-gradient(150deg, #120f22 0%, #1a1130 26%, #0c1f3e 60%, #040712 100%);
  transition: background 220ms ease-out;
}

.scroll-stage__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(106, 140, 255, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(8, 13, 34, 0) 0%, rgba(4, 7, 18, 0.26) 100%);
  opacity: var(--space-opacity);
  transition: opacity 220ms ease-out;
}

.noise,
.aurora,
.grid-glow,
.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.noise {
  opacity: 0.08;
  mix-blend-mode: soft-light;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1px),
    radial-gradient(circle at 60% 80%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px);
  background-size: 120px 120px, 180px 180px, 140px 140px;
}

.aurora {
  filter: blur(44px);
  opacity: calc(0.62 - var(--space-opacity) * 0.24);
}

.aurora--left {
  inset: auto auto 12% -4%;
  width: 34rem;
  height: 20rem;
  border-radius: 999px;
  background: rgba(255, 150, 102, 0.28);
  animation: drift 12s ease-in-out infinite;
}

.aurora--right {
  inset: 8% -6% auto auto;
  width: 30rem;
  height: 18rem;
  border-radius: 999px;
  background: rgba(90, 140, 255, 0.26);
  animation: drift 15s ease-in-out infinite reverse;
}

.grid-glow {
  opacity: calc(0.18 - var(--space-opacity) * 0.08);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, transparent 0%, black 34%, transparent 100%);
}

.stars {
  opacity: calc(var(--space-opacity) * 0.9);
  background-repeat: repeat;
  animation: starPan 28s linear infinite;
}

.stars--one {
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.2px),
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.86) 0 1.2px, transparent 1.4px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.3px),
    radial-gradient(circle at 25% 80%, rgba(156, 243, 236, 0.8) 0 1.4px, transparent 1.8px);
  background-size: 260px 260px, 320px 320px, 360px 360px, 420px 420px;
}

.stars--two {
  opacity: calc(var(--space-opacity) * 0.54);
  background-image:
    radial-gradient(circle at 30% 30%, rgba(255, 222, 160, 0.9) 0 1px, transparent 1.2px),
    radial-gradient(circle at 72% 62%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.2px),
    radial-gradient(circle at 14% 74%, rgba(255, 255, 255, 0.76) 0 1px, transparent 1.2px);
  background-size: 280px 280px, 380px 380px, 460px 460px;
  animation-duration: 42s;
}

.panel {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding: max(5.75rem, 12vh) 0 2.5rem;
}

.panel--studio,
.panel--game {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.panel--studio {
  opacity: var(--studio-opacity);
  transform:
    translateY(calc(var(--studio-shift) * 1px))
    scale(var(--studio-scale));
  transition: opacity 180ms linear, transform 180ms linear;
}

.panel--game {
  opacity: var(--game-opacity);
  transform:
    translateY(calc(var(--game-shift) * 1px))
    scale(var(--game-scale));
  transition: opacity 180ms linear, transform 180ms linear;
}

.panel__copy {
  position: relative;
  z-index: 1;
  max-width: 38rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.eyebrow--space {
  color: var(--teal);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Sora", "Space Grotesk", sans-serif;
  line-height: 0.98;
}

h1 {
  font-size: clamp(3.4rem, 9vw, 7.25rem);
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  letter-spacing: -0.05em;
}

h3 {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.lede,
.teaser-copy,
.note-card p {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.72;
}

.cta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button,
.tag-row span,
.studio-pills li {
  border-radius: 999px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0.85rem 1.3rem;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent) 0%, #ff5d74 100%);
  box-shadow: 0 18px 42px rgba(255, 111, 71, 0.26);
}

.button--ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.studio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.studio-pills li,
.tag-row span {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(247, 242, 236, 0.88);
  font-size: 0.94rem;
}

.hero-card,
.scene-card,
.note-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  min-height: 30rem;
}

.hero-card__content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: 1.6rem;
  padding: clamp(1.8rem, 3vw, 2.2rem);
}

.hero-card__logo {
  width: 8rem;
  height: 8rem;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hero-card__label {
  margin: 0;
  max-width: 14rem;
  font-family: "Sora", "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-card__ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.hero-card__ring--large {
  inset: 8% -18% auto auto;
  width: 22rem;
  height: 22rem;
  animation: spin 20s linear infinite;
}

.hero-card__ring--small {
  inset: auto auto 10% -10%;
  width: 14rem;
  height: 14rem;
  animation: spin 16s linear infinite reverse;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  gap: 0.9rem;
}

.metric {
  padding: 1rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
}

.metric strong {
  display: block;
  font-family: "Sora", "Space Grotesk", sans-serif;
  font-size: 1.6rem;
}

.metric span {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.scroll-cue {
  position: absolute;
  left: 0;
  bottom: clamp(1rem, 3vw, 1.8rem);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: rgba(247, 242, 236, 0.78);
  font-size: 0.92rem;
}

.scroll-cue__line {
  width: 6rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), transparent);
  animation: pulseLine 2.2s ease-in-out infinite;
}

.panel__copy--game {
  max-width: 34rem;
}

.scene-card {
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(81, 123, 255, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(7, 11, 28, 0.88);
}

.space-scene {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-xl) - 0.5rem);
  background:
    radial-gradient(circle at top, rgba(59, 106, 255, 0.14), transparent 32%),
    linear-gradient(180deg, #091229 0%, #060a18 100%);
}

.space-scene__sparkles {
  fill: white;
  animation: twinkle 3.6s ease-in-out infinite alternate;
}

.space-scene__planet--warm {
  animation: floatSoft 8s ease-in-out infinite;
  transform-origin: 708px 206px;
}

.space-scene__planet--cool {
  animation: floatSoft 10s ease-in-out infinite reverse;
  transform-origin: 182px 472px;
}

.space-scene__ship {
  animation: shipFlight 6s ease-in-out infinite;
  transform-origin: 442px 320px;
}

.space-scene__engine-flame {
  transform-origin: 212px 316px;
  animation: enginePulse 0.8s ease-in-out infinite alternate;
}

.space-scene__engine-halo {
  animation: haloPulse 1.2s ease-in-out infinite alternate;
}

.space-scene__corgi {
  animation: captainBob 3.2s ease-in-out infinite alternate;
  transform-origin: 442px 316px;
  transform-box: fill-box;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.studio-notes {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: -3rem auto 4rem;
  padding: 2rem 0 0;
}

.section-heading {
  max-width: 40rem;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.note-card {
  min-height: 16rem;
  padding: 1.5rem;
}

.note-card p {
  font-size: 1rem;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(2%, -4%, 0) scale(1.06);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseLine {
  0%,
  100% {
    transform: scaleX(0.8);
    opacity: 0.4;
  }

  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes starPan {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-40px, 32px, 0);
  }
}

@keyframes twinkle {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 1;
  }
}

@keyframes shipFlight {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }

  50% {
    transform: translate3d(8px, -10px, 0) rotate(1deg);
  }
}

@keyframes floatSoft {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes enginePulse {
  from {
    transform: scaleX(0.92) scaleY(0.94);
    opacity: 0.64;
  }

  to {
    transform: scaleX(1.1) scaleY(1.12);
    opacity: 0.92;
  }
}

@keyframes haloPulse {
  from {
    opacity: 0.52;
    transform: scale(0.96);
  }

  to {
    opacity: 0.8;
    transform: scale(1.08);
  }
}

@keyframes captainBob {
  from {
    transform: translateY(-2px);
  }

  to {
    transform: translateY(3px);
  }
}

@media (max-width: 980px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar__nav {
    justify-content: center;
  }

  .panel--studio,
  .panel--game,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    width: min(100%, calc(100% - 2rem));
  }

  .hero-card {
    min-height: auto;
  }

  .scroll-cue {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 1rem;
  }

  .brand__text span {
    display: none;
  }

  .topbar__nav {
    width: 100%;
  }

  .topbar__nav a {
    flex: 1;
    text-align: center;
  }

  .scroll-stage {
    min-height: 230vh;
  }

  .panel {
    padding-top: max(7.6rem, 16vh);
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .scene-card {
    padding: 0.7rem;
  }

  .studio-notes {
    margin-top: -1rem;
  }
}

@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;
  }

  .scroll-stage {
    min-height: auto;
  }

  .scroll-stage__sticky {
    position: relative;
    height: auto;
    display: grid;
    gap: 2rem;
    padding-top: 6.5rem;
  }

  .scroll-stage__backdrop {
    position: absolute;
    inset: 0;
  }

  .panel {
    position: relative;
    width: min(1180px, calc(100% - 2rem));
    transform: none !important;
    opacity: 1 !important;
  }

  .studio-notes {
    margin-top: 2rem;
  }
}
