/* ============================================================
   ENDGAMELOOP GAMES — studio shell
   Cinematic-fluid + angular glitch. Shared across landing
   and subpage templates. 3 palettes + PL/EN.
   ============================================================ */

/* ---------- TOKENS / PALETTES ---------- */
:root {
  /* DARK — brand panel (default) */
  --bg:        #181818;
  --bg-2:      #1e1d20;
  --bg-3:      #262329;
  --ink:       #cecece;
  --ink-dim:   rgba(206, 206, 206, 0.62);
  --ink-faint: rgba(206, 206, 206, 0.30);
  --accent:    #914fce;
  --accent-2:  #7324b3;
  --accent-ink:#ffffff;
  --line:      rgba(206, 206, 206, 0.18);
  --glow:      rgba(145, 79, 206, 0.40);
  --grid:      rgba(206, 206, 206, 0.08);
  --cut: 11px;
}

/* Local font file names must match these references and be uploaded to assets/fonts/. */
@font-face {
  font-family: "EndgameLoop";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/EndgameLoop-Regular.woff2") format("woff2"),
       url("../fonts/EndgameLoop-Regular.woff") format("woff"),
       url("../fonts/EndgameLoop-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "EndgameLoop";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/EndgameLoop-Bold.woff2") format("woff2"),
       url("../fonts/EndgameLoop-Bold.woff") format("woff"),
       url("../fonts/EndgameLoop-Bold.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "EndgameLoop";
  font-style: italic;
  font-weight: 400;
  src: url("../fonts/EndgameLoop-Italic.woff2") format("woff2"),
       url("../fonts/EndgameLoop-Italic.woff") format("woff"),
       url("../fonts/EndgameLoop-Italic.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "EndgameLoop";
  font-style: italic;
  font-weight: 700;
  src: url("../fonts/EndgameLoop-BoldItalic.woff2") format("woff2"),
       url("../fonts/EndgameLoop-BoldItalic.woff") format("woff"),
       url("../fonts/EndgameLoop-BoldItalic.ttf") format("truetype");
  font-display: swap;
}

[data-palette="light"] {
  --bg:        #eae8ee;
  --bg-2:      #f5f4f8;
  --bg-3:      #ffffff;
  --ink:       #221d2b;
  --ink-dim:   rgba(34, 29, 43, 0.64);
  --ink-faint: rgba(34, 29, 43, 0.30);
  --accent:    #7a36c2;
  --accent-2:  #571a91;
  --accent-ink:#ffffff;
  --line:      rgba(34, 29, 43, 0.14);
  --glow:      rgba(122, 54, 194, 0.20);
  --grid:      rgba(34, 29, 43, 0.05);
}

[data-palette="overdrive"] {
  --bg:        #0e0916;
  --bg-2:      #160f24;
  --bg-3:      #1f1533;
  --ink:       #e9ddf7;
  --ink-dim:   rgba(231, 220, 248, 0.66);
  --ink-faint: rgba(231, 220, 248, 0.34);
  --accent:    #a96bf2;
  --accent-2:  #8a3df0;
  --accent-ink:#ffffff;
  --line:      rgba(169, 107, 242, 0.18);
  --glow:      rgba(169, 107, 242, 0.55);
  --grid:      rgba(169, 107, 242, 0.07);
}
/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: "EndgameLoop", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- TYPE HELPERS ---------- */
.display {
  font-family: "EndgameLoop", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 0.98;
}
.mono { font-family: "Space Mono", ui-monospace, monospace; }
h1, h2, h3, h4 { margin: 0; font-family: "EndgameLoop", sans-serif; font-weight: 700; }

.eyebrow {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "∞";
  font-size: 15px;
  letter-spacing: 0;
  transform: translateY(-1px);
}

/* angular cut-corner utility (echoes the logo's clipped edges) */
.cut {
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

/* ============================================================
   CURSOR
   ============================================================ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  transform: translate(-50%, -50%) rotate(45deg);
  transition: transform 0.22s cubic-bezier(.2,.7,.2,1), opacity 0.22s ease;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid var(--accent);
  transform: translate(-50%, -50%) rotate(45deg);
  transition: width 0.4s cubic-bezier(.2,.7,.2,1), height 0.4s cubic-bezier(.2,.7,.2,1), opacity 0.22s ease, background 0.3s ease;
}
.cursor-label {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-family: "Space Mono", monospace;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); opacity: 0; white-space: nowrap;
  transition: opacity 0.2s ease;
}
body.cursor-hover .cursor-ring {
  width: 64px; height: 64px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
body.cursor-hover .cursor-dot { transform: translate(-50%, -50%) rotate(45deg) scale(0); }
body.cursor-drag .cursor-ring { width: 104px; height: 104px; border-style: dashed; }
body.cursor-drag .cursor-label { opacity: 1; }
@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
  button, a { cursor: pointer; }
}

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 40px;
  transition: opacity 0.8s ease, visibility 0.8s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-mark {
  width: 96px; height: 96px;
  filter: drop-shadow(0 0 30px var(--glow));
  animation: floaty 3.2s ease-in-out infinite;
}
@keyframes floaty { 50% { transform: translateY(-10px); } }
.preloader-word {
  font-family: "EndgameLoop", sans-serif;
  font-weight: 700; font-size: clamp(26px, 5vw, 44px);
  letter-spacing: 0.04em; line-height: 1;
}
.preloader-word b { color: var(--accent); font-weight: 700; }
.preloader-bar { width: min(360px, 64vw); display: flex; flex-direction: column; gap: 10px; }
.preloader-row {
  display: flex; justify-content: space-between;
  font-family: "Space Mono", monospace; font-size: 10px;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-dim);
}
.preloader-track { height: 2px; background: var(--line); position: relative; overflow: hidden; }
.preloader-fill { position: absolute; inset: 0; background: var(--accent); transform: translateX(-100%); transition: transform 0.2s linear; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 34px;
  transition: padding 0.4s ease, background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 12px 34px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-mark { display: flex; align-items: center; gap: 12px; }
.nav-mark .brand-logo {
  display: inline-block;
  width: auto;
  max-width: 260px;
  max-height: 80px;
  height: auto;
  flex: 0 0 auto;
}
.nav-mark .brand-logo--dark { display: inline-block; }
.nav-mark .brand-logo--light { display: none; }
.nav-mark .brand-logo--single { display: inline-block; }
html[data-palette="light"] .nav-mark .brand-logo--dark { display: none; }
html[data-palette="light"] .nav-mark .brand-logo--light { display: inline-block; }
.nav-word {
  font-family: "EndgameLoop", sans-serif; font-weight: 700;
  font-size: 18px; letter-spacing: 0.02em; line-height: 1;
}
.nav-word b { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 26px; }
.nav-link {
  font-family: "Space Mono", monospace; font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-dim);
  position: relative; transition: color 0.2s;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: var(--accent); transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }

.nav-cta {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px;
  font-family: "Space Mono", monospace; font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink);
  transition: background 0.25s, transform 0.25s;
}
.nav-cta:hover { background: var(--ink); transform: translateY(-1px); }
.nav-cta .dot { width: 6px; height: 6px; background: currentColor; transform: rotate(45deg); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 13px;
  padding: 16px 28px;
  font-family: "Space Mono", monospace; font-size: 11px;
  letter-spacing: 0.26em; text-transform: uppercase;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arr { display: inline-block; transition: transform 0.3s ease; }
.btn:hover .arr { transform: translate(3px, -3px); }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section { position: relative; padding: 130px 34px; }
.wrap { max-width: 1340px; margin: 0 auto; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; padding-bottom: 26px; margin-bottom: 64px;
  border-bottom: 1px solid var(--line);
}
.section-title {
  font-family: "EndgameLoop", sans-serif; font-weight: 700;
  font-size: clamp(34px, 5vw, 76px); line-height: 0.96;
  letter-spacing: -0.01em; text-transform: uppercase;
  max-width: 16ch;
}
.section-title .acc { color: var(--accent); }
.section-num {
  font-family: "Space Mono", monospace; font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-faint);
  white-space: nowrap; text-align: right;
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s cubic-bezier(.2,.6,.2,1), transform 0.9s cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============================================================
   HERO (landing)
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; padding: 120px 24px 90px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-grid {
  position: absolute; inset: -10%;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 42%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 42%, #000 0%, transparent 78%);
}
.hero-glow {
  position: absolute; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  left: 50%; top: 38%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
  filter: blur(20px);
}
.hero-glow.b { width: 40vw; height: 40vw; top: 18%; left: 70%; background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 38%, transparent) 0%, transparent 64%); }
.hero-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0,0,0,0.05) 3px 4px);
  opacity: 0.4; mix-blend-mode: overlay;
}
.hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.hero-icon {
  width: clamp(220px, 16vw, 500px);
  height: auto;
  filter: drop-shadow(0 18px 50px var(--glow));
  margin-bottom: 30px;
}
.hero-eyebrow { margin-bottom: 26px; }
.hero-word {
  font-family: "EndgameLoop", sans-serif; font-weight: 700;
  font-size: clamp(52px, 11vw, 168px); line-height: 0.86;
  letter-spacing: -0.02em; text-transform: uppercase; margin: 0;
}
.hero-word .lo { color: var(--accent); }
.hero-tag {
  font-family: "EndgameLoop", sans-serif; font-weight: 500;
  font-size: clamp(18px, 2.6vw, 34px); letter-spacing: 0.01em;
  margin: 26px 0 0; color: var(--ink);
}
.hero-sub { max-width: 600px; margin: 22px auto 0; font-size: 16px; line-height: 1.65; color: var(--ink-dim); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 40px; }
.hero-meta {
  position: absolute; bottom: 30px; left: 34px; right: 34px; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-family: "Space Mono", monospace; font-size: 10px;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-faint);
}
.hero-scroll { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-scroll-line { width: 1px; height: 36px; background: var(--line); position: relative; overflow: hidden; }
.hero-scroll-line::after { content: ""; position: absolute; left: 0; right: 0; top: -36px; height: 18px; background: var(--accent); animation: scroll-tick 2s ease-in-out infinite; }
@keyframes scroll-tick { 100% { transform: translateY(72px); } }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  position: relative; padding: 22px 0; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.marquee-track {
  display: flex; gap: 0; white-space: nowrap; width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee-track span {
  font-family: "EndgameLoop", sans-serif; font-weight: 600;
  text-transform: uppercase; font-size: clamp(20px, 3vw, 38px);
  letter-spacing: 0.02em; display: inline-flex; align-items: center;
}
.marquee-track .sep { color: var(--accent); margin: 0 38px; font-size: 0.7em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   MANIFEST
   ============================================================ */
.manifest { position: relative; }
.manifest .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: start; }
.manifest-side { position: sticky; top: 120px; }
.manifest-eyebrow { margin-bottom: 22px; }
.manifest-kicker {
  font-family: "EndgameLoop", sans-serif; font-weight: 700;
  font-size: clamp(30px, 3.4vw, 52px); line-height: 1; text-transform: uppercase;
}
.manifest-kicker .acc { color: var(--accent); }
.manifest-body p {
  font-family: "EndgameLoop", sans-serif; font-weight: 500;
  font-size: clamp(22px, 2.5vw, 36px); line-height: 1.34; letter-spacing: -0.005em;
  margin: 0 0 28px; color: var(--ink);
}
.manifest-body p .dim { color: var(--ink-faint); }
.manifest-body p b { color: var(--accent); font-weight: 700; }
.manifest-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.manifest-stat {
  border: 1px solid var(--line); padding: 18px 22px; min-width: 150px; background: var(--bg-2);
}
.manifest-stat .n { font-family: "EndgameLoop", sans-serif; font-weight: 700; font-size: 34px; color: var(--accent); line-height: 1; }
.manifest-stat .l { font-family: "Space Mono", monospace; font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-dim); margin-top: 8px; }

/* ============================================================
   GAMES PORTFOLIO
   ============================================================ */
.games-grid { display: flex; flex-direction: column; gap: 34px; }
.game {
  position: relative; display: grid; grid-template-columns: 1.15fr 1fr;
  background: var(--bg-2); border: 1px solid var(--line); overflow: hidden;
  min-height: 460px;
}
.game.flip { grid-template-columns: 1fr 1.15fr; }
.game.flip .game-art { order: 2; }
.game-art { position: relative; overflow: hidden; background: var(--bg-3); }
.game-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.6,.2,1); }
.game:hover .game-art img { transform: scale(1.05); }
.game-art .ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-faint);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--bg-3)), var(--bg-3)),
    repeating-linear-gradient(45deg, var(--grid) 0 9px, transparent 9px 18px);
}
.game-info { padding: 46px 46px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.game-status {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 7px 13px; border: 1px solid var(--accent);
  font-family: "Space Mono", monospace; font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent);
}
.game-status .dot { width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); }
.game-name { font-family: "EndgameLoop", sans-serif; font-weight: 700; font-size: clamp(40px, 4.6vw, 72px); line-height: 0.92; text-transform: uppercase; letter-spacing: -0.01em; }
.game-tagline { font-family: "EndgameLoop", sans-serif; font-weight: 500; font-size: clamp(16px, 1.6vw, 21px); color: var(--accent); }
.game-blurb { font-size: 15px; line-height: 1.65; color: var(--ink-dim); max-width: 46ch; }
.game-foot { display: flex; align-items: center; gap: 22px; margin-top: 8px; flex-wrap: wrap; }
.game-plat { font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); }
.game-link {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 4px; transition: gap 0.3s, color 0.3s;
}
.game-link:hover { gap: 18px; color: var(--accent); }
.game.featured .game-info { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--bg-2)), var(--bg-2)); }

/* ============================================================
   DEVLOG / NEWS
   ============================================================ */
.news-list { display: flex; flex-direction: column; }
.news-item {
  display: grid; grid-template-columns: 180px 1fr auto; gap: 32px; align-items: center;
  padding: 30px 8px; border-top: 1px solid var(--line); transition: padding-left 0.35s ease, background 0.35s ease;
}
.news-item:last-child { border-bottom: 1px solid var(--line); }
.news-item:hover { padding-left: 24px; background: var(--bg-2); }
.news-meta { font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.news-meta .tag { color: var(--accent); display: block; margin-top: 7px; }
.news-title { font-family: "EndgameLoop", sans-serif; font-weight: 600; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.1; text-transform: uppercase; }
.news-excerpt { font-size: 14px; color: var(--ink-dim); margin-top: 8px; max-width: 60ch; line-height: 1.6; }
.news-arrow { font-family: "Space Mono", "Segoe UI Symbol", monospace; font-variant-ligatures: none; font-size: 22px; color: var(--ink); transition: transform 0.3s, color 0.3s; }
.news-item:hover .news-arrow { font-variant-ligatures: none; transform: translate(4px, -4px); color: var(--ink); }
.news-arrow svg, .channel-arrow svg { width: 18px; height: 18px; display: inline-block; }
.news-arrow, .channel-arrow { color: var(--ink); }

/* ============================================================
   COMMUNITY
   ============================================================ */
.community { position: relative; }
.community-bg { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--glow), transparent 60%); pointer-events: none; }
.community .wrap { position: relative; z-index: 1; }
.community-lead { font-family: "EndgameLoop", sans-serif; font-weight: 500; font-size: clamp(22px, 2.6vw, 38px); line-height: 1.3; max-width: 22ch; margin-bottom: 50px; }
.community-lead .acc { color: var(--accent); }
.channels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.channel {
  position: relative; padding: 28px 24px 24px; background: var(--bg-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px; min-height: 168px;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), border-color 0.4s, background 0.4s;
}
.channel:hover { transform: translateY(-8px); border-color: var(--accent); background: var(--bg-3); }
.channel-glyph { width: 30px; height: 30px; color: var(--accent); }
.channel-name { font-family: "EndgameLoop", sans-serif; font-weight: 700; font-size: 22px; text-transform: uppercase; line-height: 1; }
.channel-meta { font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); margin-top: auto; }
.channel-arrow { position: absolute; top: 24px; right: 22px; font-family: "Space Mono", monospace; font-variant-ligatures: none; color: var(--ink-ink); transition: transform 0.3s, color 0.3s; }
.channel:hover .channel-arrow { font-variant-ligatures: none; transform: translate(3px, -3px); color: var(--ink); }

/* ============================================================
   SUBPAGE TEMPLATE
   ============================================================ */
.page-head {
  position: relative; padding: 180px 34px 70px; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.page-head-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.page-head-bg .hero-glow { top: -10%; left: 80%; }
.page-head .wrap { position: relative; z-index: 1; }
.page-eyebrow { margin-bottom: 22px; }
.page-title { font-family: "EndgameLoop", sans-serif; font-weight: 700; font-size: clamp(48px, 9vw, 132px); line-height: 0.9; text-transform: uppercase; letter-spacing: -0.02em; }
.page-title .acc { color: var(--accent); }
.page-lead { max-width: 56ch; margin-top: 28px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; color: var(--ink-dim); }

/* content blocks */
.block { padding: 80px 34px; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block-grid { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
.block-label {
  position: sticky; top: 110px;
  font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent);
}
.block-label .n { display: block; color: var(--ink-faint); margin-bottom: 8px; }
.prose p { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.7; color: var(--ink-dim); max-width: 64ch; margin: 0 0 18px; }
.prose p b, .prose strong { color: var(--ink); font-weight: 500; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fact { background: var(--bg-2); padding: 24px 26px; }
.fact .l { font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 10px; }
.fact .v { font-family: "EndgameLoop", sans-serif; font-weight: 600; font-size: 19px; color: var(--ink); }

.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.asset {
  position: relative; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), border-color 0.4s;
}
.asset:hover { transform: translateY(-6px); border-color: var(--accent); }
.asset-preview {
  aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; background: var(--bg-3);
  background-image: repeating-linear-gradient(45deg, var(--grid) 0 9px, transparent 9px 18px);
}
.asset-preview img { width: 64%; height: 64%; object-fit: contain; }
.asset-preview .ph { font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-faint); }
.asset-foot { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.asset-name { font-family: "EndgameLoop", sans-serif; font-weight: 600; font-size: 15px; text-transform: uppercase; }
.asset-dl { font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }

.contact-card {
  background: var(--bg-2); border: 1px solid var(--line); padding: 44px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
}
.contact-card h3 { font-family: "EndgameLoop", sans-serif; font-weight: 700; font-size: clamp(24px, 3vw, 40px); text-transform: uppercase; }
.contact-card .mail { font-family: "Space Mono", monospace; font-size: 14px; color: var(--accent); letter-spacing: 0.04em; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: 80px 34px 40px; border-top: 1px solid var(--line); position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 44px; margin-bottom: 56px; max-width: 1340px; margin-left: auto; margin-right: auto; }
.footer-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-mark img,
.footer-mark .brand-logo {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 180px;
  max-height: 40px;
  object-fit: contain;
  flex: 0 0 auto;
}
.footer-mark .brand-logo--dark { display: inline-block; }
.footer-mark .brand-logo--light { display: none; }
.footer-mark .brand-logo--single { display: inline-block; }
html[data-palette="light"] .footer-mark .brand-logo--dark { display: none; }
html[data-palette="light"] .footer-mark .brand-logo--light { display: inline-block; }
.footer-word { font-family: "EndgameLoop", sans-serif; font-weight: 700; font-size: 18px; letter-spacing: 0.02em; }
.footer-word b { color: var(--accent); }
.footer-blurb { font-size: 13px; color: var(--ink-dim); max-width: 320px; line-height: 1.65; }
.footer-col h4 { font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--ink-dim); transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  max-width: 1340px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--line);
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint);
}

/* ============================================================
   TWEAKS PANEL
   ============================================================ */
.tweaks {
  position: fixed; top: 120px; right: 20px; transform: none; z-index: 95;
  display: flex; flex-direction: column; gap: 18px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border: 1px solid var(--line); backdrop-filter: blur(16px);
  padding: 18px 16px; width: min(260px, calc(100vw - 40px)); max-width: 260px;
  max-height: calc(100vh - 140px);
  overflow: hidden;
}
.tweaks h5 { margin: 0; font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); }
.tweaks-group { display: flex; flex-direction: column; gap: 8px; }
.tweaks-label { font-family: "Space Mono", monospace; font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-dim); }
.tweaks-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tweaks-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tweaks-btn {
  min-width: 0;
  padding: 10px 8px; border: 1px solid rgba(255,255,255,0.28);
  font-family: "Space Mono", monospace; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  white-space: nowrap;
  color: #f3f3f3;
  background: rgba(255,255,255,0.08);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tweaks-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
html[data-palette="light"] .tweaks-btn {
  color: var(--ink);
  border-color: rgba(34,29,43,0.16);
  background: rgba(255,255,255,0.85);
}
html[data-palette="light"] .tweaks-btn:hover:not(.is-active) {
  color: var(--ink);
  border-color: var(--accent);
  background: rgba(255,255,255,0.96);
}
.tweaks-btn:hover:not(.is-active) {
  color: #ffffff;
  border-color: var(--accent);
  background: rgba(255,255,255,0.14);
}
.tweaks-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .nav-right .nav-link { display: none; }
  .manifest .wrap { grid-template-columns: 1fr; gap: 40px; }
  .manifest-side { position: static; }
  .game, .game.flip { grid-template-columns: 1fr; }
  .game.flip .game-art { order: 0; }
  .game-art { min-height: 280px; }
  .game-info { padding: 34px 28px; }
  .channels { grid-template-columns: repeat(2, 1fr); }
  .news-item { grid-template-columns: 1fr; gap: 12px; }
  .news-arrow { display: none; font-family: "Space Mono", "Segoe UI Symbol", monospace; }
  .block-grid { grid-template-columns: 1fr; gap: 20px; }
  .block-label { position: static; }
  .asset-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tweaks {
    position: absolute;
    top: 120px;
    right: 12px;
    width: auto;
    min-width: 90px;
    max-width: 150px;
    border-radius: 18px;
    padding: 14px 12px;
    background: rgba(24, 24, 24, 0.92);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    z-index: 150;
  }
  .nav { top: 0; }
  .tweaks h5,
  .tweaks-group:last-child,
  .tweaks-label {
    display: none;
  }
  .tweaks-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 7px;
  }
  .tweaks-btn {
    padding: 10px 8px;
    font-size: 10px;
    border-radius: 12px;
    width: 100%;
    text-align: center;
  }
}
@media (max-width: 600px) {
  .section { padding: 90px 22px; }
  .hero-meta { left: 22px; right: 22px; bottom: 18px; }
  .facts { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: 1fr; }
  .channels { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 14px; }
  .tweaks { right: 12px; width: 180px; padding: 16px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ============================================================
   WORDPRESS THEME ADJUSTMENTS
   ============================================================ */
/* WP admin bar offset for the fixed nav */
body.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .nav { top: 46px; } }

/* blank Elementor game-page canvas: clear the fixed nav */
.game-page { padding-top: 86px; min-height: 70vh; }
.game-page > .elementor { width: 100%; }

/* subpage editable content area */
.subpage-content { min-height: 30vh; }

/* prose: style the_content output (classic / Gutenberg) */
.prose h2, .prose h3, .prose h4 {
  font-family: "EndgameLoop", sans-serif; text-transform: uppercase;
  letter-spacing: -0.01em; margin: 34px 0 14px; line-height: 1.05;
}
.prose h2 { font-size: clamp(26px, 3vw, 38px); }
.prose h3 { font-size: clamp(21px, 2.2vw, 28px); }
.prose ul, .prose ol { color: var(--ink-dim); font-size: clamp(16px, 1.5vw, 18px); line-height: 1.7; max-width: 64ch; padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); border-bottom: 1px solid var(--line); }
.prose a:hover { border-color: var(--accent); }
.prose img { margin: 24px 0; }
.prose blockquote {
  border-left: 2px solid var(--accent); margin: 24px 0; padding: 6px 0 6px 24px;
  font-family: "EndgameLoop", sans-serif; font-size: clamp(20px, 2.2vw, 28px); color: var(--ink);
}

/* footer menu (WP nav) inherits footer-col list styling */
.footer-col ul { list-style: none; }

/* pagination */
.pagination, .nav-links { display: flex; gap: 10px; flex-wrap: wrap; font-family: "Space Mono", monospace; font-size: 12px; }
.pagination a, .pagination .current, .nav-links a {
  padding: 10px 14px; border: 1px solid var(--line); color: var(--ink-dim);
}
.pagination .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
