/* =========================================================
   Matter Of Madness :: site styles
   Palette pulled from the studio mascot: purple, acid green,
   near-black plum.
   ========================================================= */

:root {
  /* Surfaces */
  --void:        #0A0410;
  --ink-900:     #100718;
  --ink-800:     #170C21;
  --surface:     #1C1028;
  --surface-2:   #251634;
  --line:        rgba(180, 96, 214, 0.16);
  --line-strong: rgba(180, 96, 214, 0.34);

  /* Brand */
  --purple:      #A72BC7;
  --purple-lt:   #CB55EC;
  --purple-deep: #6A1284;
  --green:       #3FD62B;
  --green-lt:    #6FF35E;

  /* Game accents */
  --whip:        #FFD31F;
  --road:        #C0A079;

  /* Type */
  --text:        #F3EAF8;
  --text-soft:   #CDBBD8;
  --muted:       #9B87A9;

  /* Shape */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, .45);
  --shadow-lg: 0 34px 90px rgba(0, 0, 0, .55);

  --nav-h: 72px;
  --ease: cubic-bezier(.22, .8, .28, 1);

  /* The studio air freshener, used as the pointer */
  --cursor: url('assets/brand/cursor-tree.png') 14 2;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Landing on a /#section link would otherwise tuck the heading under the
     sticky nav. */
  scroll-padding-top: calc(var(--nav-h) + 14px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* No overflow-x:hidden here on purpose. It turns <body> into its own scroll
   container, which breaks window.scrollTo and position:sticky. Everything that
   bleeds wide (the ticker, the background field, the strip) clips itself. */

img { max-width: 100%; display: block; }

/* `hidden` must beat the display rules on .mobile-menu / .lightbox */
[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--purple); color: #fff; }


/* ---------- Custom cursor ---------- */

body,
button,
a,
summary,
[role="button"] { cursor: var(--cursor), auto; }

a, button, [role="button"], .shot { cursor: var(--cursor), pointer; }

input, textarea, select { cursor: var(--cursor), text; }

/* Touch devices and anyone who asked for less motion keep the system cursor */
@media (pointer: coarse) {
  body, a, button, [role="button"], .shot, input, textarea, select { cursor: auto; }
}


/* ---------- Focus + skip link ---------- */

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 10px; left: 50%;
  transform: translate(-50%, -140%);
  z-index: 200;
  background: var(--green);
  color: #06210A;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }


/* ---------- Layout ---------- */

.container {
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
}

.section { padding: clamp(72px, 10vw, 132px) 0; position: relative; }

.section-alt {
  background:
    linear-gradient(180deg, transparent, rgba(28, 16, 40, .55) 12%, rgba(28, 16, 40, .55) 88%, transparent);
}

.section-head { max-width: 660px; margin-bottom: clamp(38px, 5vw, 62px); }
.section-head.centered { margin-inline: auto; text-align: center; }


/* ---------- Ambient background ---------- */

.bg-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, #1D0B29 0%, #120718 45%, var(--void) 100%);
}

/* Soft radial washes. Deliberately not blur()-filtered or animated: this layer
   is position:fixed, so anything expensive here repaints on every scroll. */
.bg-glow { position: absolute; }

.bg-glow-1 {
  width: 62vw; height: 62vw;
  top: -22vw; left: -16vw;
  background: radial-gradient(circle closest-side, rgba(167, 43, 199, .38), transparent 100%);
}
.bg-glow-2 {
  width: 56vw; height: 56vw;
  top: 40%; right: -18vw;
  background: radial-gradient(circle closest-side, rgba(63, 214, 43, .12), transparent 100%);
}
.bg-glow-3 {
  width: 60vw; height: 60vw;
  bottom: -22vw; left: 18%;
  background: radial-gradient(circle closest-side, rgba(106, 18, 132, .36), transparent 100%);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(203, 85, 236, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203, 85, 236, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 60% at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 30%, #000 0%, transparent 78%);
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ---------- Typography ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
}
.centered .eyebrow { justify-content: center; }

.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(63, 214, 43, .16);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(63, 214, 43, .16); }
  50%      { box-shadow: 0 0 0 8px rgba(63, 214, 43, .04); }
}

.section-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* Purple and green are near-complements, so a gradient between them runs
   through grey. Headings use flat acid green instead. */
.accent {
  color: var(--green-lt);
  text-shadow: 0 0 34px rgba(63, 214, 43, .22);
}

.section-sub, .body-text {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 1.03rem;
  max-width: 58ch;
}
.centered .section-sub { margin-inline: auto; }


/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease);
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-icon { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: linear-gradient(120deg, var(--purple), var(--purple-lt));
  color: #fff;
  box-shadow: 0 10px 30px rgba(167, 43, 199, .35);
}
.btn-primary:hover { box-shadow: 0 16px 40px rgba(167, 43, 199, .5); }

.btn-ghost {
  background: rgba(255, 255, 255, .03);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(203, 85, 236, .12);
  border-color: var(--purple-lt);
}

.btn-whip {
  background: var(--whip);
  color: #17130A;
  box-shadow: 0 10px 30px rgba(255, 211, 31, .26);
}
.btn-whip:hover { box-shadow: 0 16px 40px rgba(255, 211, 31, .38); }

.btn-300 {
  background: var(--road);
  color: #17140F;
  box-shadow: 0 10px 30px rgba(192, 160, 121, .22);
}
.btn-300:hover { box-shadow: 0 16px 40px rgba(192, 160, 121, .34); }

.btn-sm { padding: 10px 18px; font-size: .86rem; }


/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color .3s var(--ease), border-color .3s var(--ease),
              backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(12, 6, 18, .78);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-inner {
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
}
.nav-mark {
  width: auto; height: 38px;
  filter: drop-shadow(0 0 12px rgba(167, 43, 199, .5));
  transition: transform .35s var(--ease);
}
.nav-brand:hover .nav-mark { transform: translateY(-2px) rotate(-4deg); }

.nav-wordmark {
  width: auto; height: 19px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6));
}

.nav-links ul {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  display: block;
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: .93rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: rgba(203, 85, 236, .12); }

.nav-links a.is-active { color: var(--text); }
.nav-links a.is-active::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 2px;
  width: 16px; height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--green);
}

.nav-burger {
  display: none;
  width: 42px; height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ---------- Mobile menu ---------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  background: rgba(10, 4, 16, .97);
  backdrop-filter: blur(10px);
  /* Visible as soon as [hidden] comes off. The fade is an animation rather
     than a transition so the overlay can never get stuck at opacity 0. */
  animation: overlayIn .25s var(--ease);
}
.mobile-menu.is-closing { animation: overlayOut .25s var(--ease) forwards; }

@keyframes overlayIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlayOut { from { opacity: 1; } to { opacity: 0; } }

.mobile-menu ul {
  margin: 0; padding: 0;
  list-style: none;
  text-align: center;
}
.mobile-menu ul a {
  display: block;
  padding: 14px 10px;
  font-family: 'Bungee', sans-serif;
  font-size: 1.55rem;
  letter-spacing: .02em;
  color: var(--text);
  transition: color .2s var(--ease);
}
.mobile-menu ul a:hover { color: var(--green); }

.mobile-menu-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 46px; height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
}

.mobile-menu-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}
.mobile-menu-foot a { text-decoration: underline; text-underline-offset: 4px; }
.mobile-menu-foot a:hover { color: var(--green); }


/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: clamp(28px, 5vw, 68px);
  min-height: min(78vh, 720px);
  padding-bottom: clamp(60px, 8vw, 110px);
}

.hero-title {
  margin: 0 0 22px;
  font-family: 'Bungee', system-ui, sans-serif;
  font-size: clamp(2.6rem, 7.4vw, 5.6rem);
  line-height: .96;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.hero-title span { display: block; }
.hero-title .of {
  font-size: .42em;
  letter-spacing: .3em;
  color: var(--muted);
  padding: 6px 0 4px;
}
.hero-title .accent {
  color: transparent;
  text-shadow: none;
  background: linear-gradient(100deg, var(--green), var(--green-lt) 55%, #A9F58C);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 6px 26px rgba(63, 214, 43, .22));
}

.hero-sub {
  max-width: 50ch;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  color: var(--text-soft);
  margin: 0 0 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0; padding: 0;
  list-style: none;
  font-size: .86rem;
  color: var(--muted);
}
.hero-meta strong {
  display: block;
  font-family: 'Bungee', sans-serif;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: .02em;
}

/* Hero art */

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 380px;
}

.hero-art-glow {
  position: absolute;
  width: 78%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 43, 199, .45), rgba(63, 214, 43, .12) 55%, transparent 72%);
  filter: blur(18px);
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1);    opacity: .85; }
  50%      { transform: scale(1.08); opacity: 1; }
}

.hero-mascot {
  position: relative;
  width: min(100%, 400px);
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .6));
  animation: float 6s ease-in-out infinite;
  will-change: transform;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.freshener {
  position: absolute;
  top: -48px; right: 2%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  animation: swing 5.5s ease-in-out infinite;
}
.freshener-string {
  width: 2px; height: 96px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(203, 85, 236, .05), rgba(203, 85, 236, .7));
}
.freshener img {
  width: 66px; height: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .6));
}
@keyframes swing {
  0%, 100% { transform: rotate(-7deg); }
  50%      { transform: rotate(7deg); }
}

/* Ticker */

.hero-ticker {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(28, 16, 40, .5);
  overflow: hidden;
  padding: 13px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  font-family: 'Bungee', sans-serif;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-soft);
  animation: marquee 30s linear infinite;
}
.ticker-track .sep { color: var(--green); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ---------- Game sections ----------
   Each game owns one section: banner, trailer, then its own sub-blocks
   (enemies, screenshots). Nothing about a game lives outside its section. */

.gamesec {
  position: relative;
  padding-bottom: clamp(60px, 8vw, 104px);
}

.gamesec-banner {
  position: relative;
  padding: clamp(54px, 8vw, 96px) 0 clamp(28px, 4vw, 44px);
  margin-bottom: clamp(28px, 4vw, 46px);
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.gamesec-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(70% 130% at 8% 0%, var(--accent-soft, rgba(203, 85, 236, .16)), transparent 62%);
}
.gamesec-whip { --accent-soft: rgba(255, 211, 31, .15); }
.gamesec-300  { --accent-soft: rgba(192, 160, 121, .15); }

.gamesec-banner-inner { position: relative; }

.gamesec-index {
  margin: 0 0 14px;
  font-family: 'Bungee', sans-serif;
  font-size: .66rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
}

.gamesec-title {
  margin: 0 0 20px;
  font-family: 'Bungee', sans-serif;
  font-size: clamp(2.2rem, 6.4vw, 4.4rem);
  line-height: .98;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.gamesec-title span {
  display: block;
  margin-top: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(.8rem, 1.5vw, 1rem);
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--muted);
}

.gamesec-badges { display: flex; flex-wrap: wrap; gap: 8px; }

/* Trailer + pitch row */
.game-top {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(26px, 4vw, 52px);
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(155deg, rgba(37, 22, 52, .74), rgba(16, 7, 24, .8));
  box-shadow: var(--shadow-md);
}

/* Sub-blocks inside a game section */
.subsec { margin-top: clamp(52px, 7vw, 92px); }

.subsec-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-family: 'Bungee', sans-serif;
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
}
.subsec-label .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(63, 214, 43, .16);
}

.subsec-title {
  margin: 0 0 30px;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* Media */

.game-media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #05030A;
  box-shadow: var(--shadow-sm);
}

/* ---------- Trailer player ----------
   Self hosted MP4 with the browser's own controls. No third party player, no
   cookie banner, nothing to load before someone presses play. */

.media-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #05030A;
  overflow: hidden;
}

.game-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #05030A;
}

/* Download / channel links under each player */
.media-fallback {
  margin: 10px 0 0;
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
}
.media-fallback a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.media-fallback a:hover { color: var(--green); }

/* Body */

.game-body { position: relative; }

.game-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.badge {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.badge-live {
  border-color: rgba(63, 214, 43, .4);
  background: rgba(63, 214, 43, .1);
  color: var(--green-lt);
}

.game-title {
  margin: 0 0 16px;
  font-family: 'Bungee', sans-serif;
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.game-title span {
  display: block;
  margin-top: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .42em;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--muted);
}
.game-title-whip {
  color: var(--whip);
  text-shadow: 0 0 36px rgba(255, 211, 31, .22);
}
.game-title-300 {
  color: var(--road);
  text-shadow: 0 0 36px rgba(192, 160, 121, .2);
}

.game-desc {
  margin: 0 0 20px;
  color: var(--text-soft);
  max-width: 46ch;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.chip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  font-size: .8rem;
  color: var(--text-soft);
}
.chips-lg .chip { padding: 8px 16px; font-size: .86rem; }

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


/* ---------- Enemies (Whip Wreck bestiary) ---------- */

.pac-head { max-width: 780px; }

.pac-title {
  margin: 0 0 22px;
  font-family: 'Bungee', sans-serif;
  font-size: clamp(2.1rem, 6.4vw, 4.2rem);
  line-height: .98;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.pac-title .pac-line { display: block; }
.pac-title .pac-from { color: var(--text-soft); }
.pac-title .accent { text-shadow: 0 0 46px rgba(63, 214, 43, .3); }

.pac-lead {
  margin: 0 auto 14px;
  max-width: 62ch;
  font-size: 1.03rem;
  color: var(--text-soft);
}
.pac-lead-sm {
  font-family: 'Bungee', sans-serif;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
}

.pac-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}
.pac-dots span {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--d);
  box-shadow: 0 0 16px var(--d);
  opacity: .9;
}

.enemy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}

.enemy {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--e);
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, rgba(37, 22, 52, .78), rgba(14, 6, 21, .9));
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease),
              box-shadow .3s var(--ease);
}
.enemy::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(90% 60% at 50% 0%, var(--e), transparent 70%);
  opacity: .1;
  transition: opacity .3s var(--ease);
}
.enemy:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .45);
}
.enemy:hover::before { opacity: .18; }

/* The box hugs the sprite and the sprite carries a fixed pixel height.
   A percentage height here does not resolve and the sprite falls back to its
   natural 420px, which lands on top of the card text. */
.enemy-art {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 20px;
}
.enemy-art::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  width: 84px; height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--e);
  opacity: .22;
  filter: blur(7px);
}
.enemy-art img {
  position: relative;
  height: clamp(132px, 15vw, 170px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55));
  transition: transform .35s var(--ease);
}
.enemy:hover .enemy-art img { transform: translateY(-5px) scale(1.04); }

.enemy-body { position: relative; display: flex; flex-direction: column; flex: 1; }

.enemy-origin {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 10px;
  padding: 4px 11px;
  border: 1px solid var(--e);
  border-radius: 999px;
  font-family: 'Bungee', sans-serif;
  font-size: .58rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--e);
}
.enemy-origin-ours {
  border-style: dashed;
}

.enemy-name {
  margin: 0;
  font-family: 'Bungee', sans-serif;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--e);
  text-transform: uppercase;
}
.enemy-alias {
  margin: 7px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.enemy-role {
  margin: 3px 0 16px;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.enemy-notes {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.enemy-notes li {
  position: relative;
  padding-left: 17px;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--text-soft);
}
.enemy-notes li::before {
  content: '';
  position: absolute;
  left: 0; top: .62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--e);
}

.enemy-stat {
  margin: 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: .84rem;
  color: var(--text-soft);
}
.enemy-stat span {
  display: block;
  margin-bottom: 2px;
  font-family: 'Bungee', sans-serif;
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The power pellet. Pac-Man's frightened ghosts are blue, so this block is
   the one place on the page that goes blue too. */
.pellet {
  --pellet: #3B7BFF;

  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(22px, 4vw, 46px);
  margin-top: 18px;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid rgba(59, 123, 255, .34);
  border-radius: var(--r-xl);
  background: linear-gradient(120deg, rgba(20, 30, 66, .82), rgba(14, 7, 22, .85));
  overflow: hidden;
}
.pellet::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(60% 120% at 12% 50%, rgba(59, 123, 255, .26), transparent 62%);
}

.pellet-art {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
}
.pellet-art::after {
  content: '';
  position: absolute;
  width: 132px; height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 123, 255, .5), transparent 68%);
}
.pellet-art img {
  position: relative;
  height: clamp(130px, 15vw, 172px);
  width: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .55));
}

.pellet-body { position: relative; }

.pellet-label {
  margin: 0 0 10px;
  font-family: 'Bungee', sans-serif;
  font-size: .6rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--pellet);
}
.pellet-title {
  margin: 0 0 14px;
  font-family: 'Bungee', sans-serif;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #CFE0FF;
}
.pellet-text {
  margin: 0 0 10px;
  max-width: 58ch;
  font-size: .96rem;
  color: var(--text-soft);
}
.pellet-kicker {
  margin-bottom: 0;
  color: #9FBEFF;
  font-weight: 600;
}


/* ---------- Roadside sign band ---------- */

.subsec-sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

/* The posts hang below the board, so the figure reserves their height as
   padding. Without that they overlap whatever comes next. */
.sign {
  --post-h: clamp(34px, 5vw, 56px);

  position: relative;
  margin: 0;
  width: min(560px, 88%);
  padding-bottom: var(--post-h);
  transform: rotate(-1.2deg);
}
.sign img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .6);
  box-shadow: 0 30px 44px rgba(0, 0, 0, .7);
}

/* Two wooden posts, tucked just under the board */
.sign-post {
  position: absolute;
  bottom: 0;
  z-index: 0;
  width: 12px;
  /* 3px taller than the reserved space, so the top slides under the board */
  height: calc(var(--post-h) + 3px);
  background: linear-gradient(90deg, #2C231A, #4A3B2A 40%, #241C14);
  border-radius: 0 0 2px 2px;
}
.sign-post-l { left: 24%; }
.sign-post-r { right: 24%; }

.signband-note {
  margin: 0;
  font-family: 'Bungee', sans-serif;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--road);
  opacity: .75;
  text-align: center;
}


/* ---------- Gallery ---------- */

.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.shots:focus { outline: none; }
.shot {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #05030A;
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease),
              box-shadow .3s var(--ease);
}
.shot-wide { grid-column: span 2; }

.shot img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .5s var(--ease), opacity .3s var(--ease);
  opacity: .88;
}
.shot:hover {
  transform: translateY(-4px);
  border-color: var(--purple-lt);
  box-shadow: 0 18px 40px rgba(167, 43, 199, .22);
}
.shot:hover img { transform: scale(1.06); opacity: 1; }

.shot::after {
  content: '⤢';
  position: absolute;
  right: 10px; bottom: 8px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(10, 4, 16, .72);
  color: var(--green);
  font-size: .9rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.shot:hover::after { opacity: 1; transform: translateY(0); }

/* Full-bleed band closing the gallery, sits outside .container */
.gallery-strip {
  margin-top: clamp(38px, 5vw, 60px);
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent, #000 34%, #000 72%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 34%, #000 72%, transparent);
}
.gallery-strip img {
  width: 100%;
  height: clamp(160px, 26vw, 330px);
  object-fit: cover;
  object-position: center 42%;
  opacity: .72;
}


/* ---------- Studio ---------- */

.studio-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.studio-card {
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, rgba(37, 22, 52, .85), rgba(16, 7, 24, .85));
  box-shadow: var(--shadow-md);
  text-align: center;
}
.studio-lockup {
  width: min(100%, 320px);
  height: auto;
  margin: 0 auto 22px;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .55));
}
.studio-quote {
  margin: 0 0 26px;
  padding: 0 6px;
  font-size: 1.06rem;
  font-style: italic;
  color: var(--text);
}
.studio-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.stat-num {
  display: block;
  font-family: 'Bungee', sans-serif;
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--green);
}
.stat-label {
  display: block;
  font-size: .78rem;
  color: var(--muted);
}


/* ---------- Press CTA ---------- */

.press-cta {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: clamp(24px, 4vw, 54px);
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(140deg, rgba(37, 22, 52, .8), rgba(16, 7, 24, .84));
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.press-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(70% 120% at 100% 0%, rgba(203, 85, 236, .16), transparent 62%);
}
.press-cta-body { position: relative; }
.press-cta-body .section-title { margin-bottom: 14px; }

.press-cta-contact {
  margin-top: 14px;
  font-size: .92rem;
}
.press-cta-contact a {
  color: var(--green-lt);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.press-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.press-cta-art {
  position: relative;
  display: grid;
  place-items: center;
}
.press-cta-art img {
  width: min(100%, 280px);
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .55));
}


/* ---------- Link cards ---------- */

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(37, 22, 52, .5);
  transition: transform .25s var(--ease), border-color .25s var(--ease),
              background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.link-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-lt);
  background: rgba(50, 28, 70, .6);
  box-shadow: 0 18px 40px rgba(167, 43, 199, .22);
}

.link-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(167, 43, 199, .3), rgba(63, 214, 43, .18));
  color: var(--text);
}
.link-icon svg { width: 22px; height: 22px; }

.link-text { display: flex; flex-direction: column; line-height: 1.35; }
.link-text strong { font-size: 1rem; }
.link-text span { font-size: .84rem; color: var(--muted); }

.link-arrow {
  margin-left: auto;
  color: var(--green);
  transition: transform .25s var(--ease);
}
.link-card:hover .link-arrow { transform: translateX(4px); }


/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: rgba(10, 4, 16, .7);
  padding: 46px 0 38px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-brand img:first-child { height: 54px; width: auto; }
.footer-wordmark { height: 20px; width: auto; }
.footer-tag {
  margin: 8px 0 0;
  font-size: .85rem;
  color: var(--muted);
  text-align: left;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  font-size: .9rem;
  color: var(--text-soft);
}
.footer-links a { transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--green); }
.footer-copy {
  margin: 0;
  font-size: .78rem;
  color: var(--muted);
  max-width: 58ch;
}


/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(6, 3, 10, .94);
  backdrop-filter: blur(8px);
  animation: overlayIn .22s var(--ease);
}
.lightbox.is-closing { animation: overlayOut .22s var(--ease) forwards; }

.lb-figure {
  margin: 0;
  max-width: min(1200px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.lb-figure img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
}
.lb-figure figcaption {
  font-size: .9rem;
  color: var(--text-soft);
  text-align: center;
}

.lb-close, .lb-nav {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(28, 16, 40, .8);
  color: var(--text);
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
              transform .2s var(--ease);
}
.lb-close:hover, .lb-nav:hover {
  background: rgba(167, 43, 199, .35);
  border-color: var(--purple-lt);
}

.lb-close {
  top: 18px; right: 20px;
  width: 46px; height: 46px;
  font-size: 1.7rem;
  line-height: 1;
}
.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 50px; height: 50px;
}
.lb-nav:hover { transform: translateY(-50%) scale(1.06); }
.lb-nav svg { width: 22px; height: 22px; }
.lb-prev { left: clamp(10px, 2vw, 28px); }
.lb-next { right: clamp(10px, 2vw, 28px); }

body.is-locked { overflow: hidden; }


/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

.rv-d1 { transition-delay: .08s; }
.rv-d2 { transition-delay: .16s; }
.rv-d3 { transition-delay: .24s; }
.rv-d4 { transition-delay: .32s; }


/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: 0;
  }
  .hero-copy { order: 2; }
  .hero-art  { order: 1; min-height: 300px; }
  .hero-sub  { margin-inline: auto; }
  .hero-actions, .hero-meta { justify-content: center; }
  .hero-mascot { width: min(72%, 300px); }
  .freshener { right: 12%; }

  .game-top { grid-template-columns: 1fr; }

  .studio-grid,
  .press-cta { grid-template-columns: 1fr; }
  .press-cta-art { display: none; }

  .shots { grid-template-columns: repeat(2, 1fr); }
  .shot-wide { grid-column: span 2; }

  .pellet { flex-direction: column; text-align: center; gap: 20px; }
  .pellet-text { max-width: none; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-wordmark { height: 17px; }

  .container, .nav-inner { width: calc(100% - 32px); }

  .hero-meta { gap: 10px 20px; font-size: .8rem; }

  .footer-brand { flex-direction: column; text-align: center; }
  .footer-tag { text-align: center; }

  .lb-nav { width: 42px; height: 42px; }
}

@media (max-width: 520px) {
  .shots { grid-template-columns: 1fr; }
  .shot-wide { grid-column: span 1; }
  .studio-stats { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero-actions, .game-actions { flex-direction: column; align-items: stretch; }

  .enemy { padding: 20px; }
}


/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
