/* ============================================================
   CHIPSTACK STUDIOS · dark industrial identity
   ============================================================ */

:root {
  color-scheme: dark;
  --bg:        #0a0b0d;
  --bg-2:      #0e0f12;
  --panel:     #141519;
  --line:      #232529;
  --line-soft: #1b1d21;
  --text:      #edece6;
  --muted:     #97968e;
  --accent:    #f5b301;
  --accent-ink:#f5b301;
  --danger:    #ff6b2c;
  --nav-bg:      rgba(10,11,13,.78);
  --nav-menu-bg: rgba(10,11,13,.97);
  --footer-bg:   #08090a;
  --grid-line:   rgba(255,255,255,.028);
  --grain-op:    .045;

  --font-display: "Changa One", "Arial Black", sans-serif;
  --font-body:    "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  --nav-h: 72px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

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

/* film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: #0a0b0d; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2c31; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: min(1180px, 92%); margin-inline: auto; }

/* ---------- shared type ---------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mono-dim {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--muted);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: .95;
  letter-spacing: .02em;
  font-weight: 400;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  padding: 1rem 1.6rem;
  border: 1px solid var(--text);
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease);
  user-select: none;
}

.btn svg { transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0b0d;
}
.btn--solid:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--text);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 rgba(245, 179, 1, .25);
}

/* ---------- nav ---------- */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-nav.scrolled { border-bottom-color: var(--line-soft); }

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
}
.nav-mark { height: 48px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--muted);
  position: relative;
  padding: .4rem 0;
  transition: color .2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* circular-reveal page transitions (cross-document View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 9999; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 79px, var(--grid-line) 79px 80px),
    repeating-linear-gradient(90deg, transparent 0 79px, var(--grid-line) 79px 80px);
}
.hero-bg::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34%;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.6rem;
  width: min(1180px, 92%);
  will-change: transform, opacity;
}

.hero-logo {
  width: min(600px, 86vw);
  animation: hero-in 1.1s var(--ease) .1s both;
}
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(.95);
    filter: blur(10px) drop-shadow(0 30px 60px rgba(0,0,0,.55));
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) drop-shadow(0 30px 60px rgba(0,0,0,.55));
  }
}

.hero-fade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3rem;
  animation: hero-fade-in .9s var(--ease) .55s both;
}
@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: clamp(.85rem, 1.6vw, 1.05rem);
  color: var(--accent-ink);
  letter-spacing: .04em;
  max-width: 52ch;
}

.hero-intro {
  color: var(--muted);
  max-width: 46ch;
  font-size: 1.02rem;
}

.hero-fade .btn { margin-top: .8rem; }

/* ---------- sections ---------- */

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-note {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  color: var(--muted);
  text-align: right;
  line-height: 1.7;
}

/* ---------- game cards ---------- */

.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 3vw, 2rem);
}

.game-card {
  --game-accent: var(--accent);
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--game-accent);
}

.game-card-art {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.game-card-art svg,
.game-card-art img {
  width: 100%; height: 100%;
  transition: transform .6s var(--ease);
}
.game-card-art img { object-fit: cover; object-position: center 40%; }
.game-card:hover .game-card-art svg,
.game-card:hover .game-card-art img { transform: scale(1.045); }

.game-card-body {
  padding: clamp(1.4rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.game-card-meta {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex-wrap: wrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .18em;
  padding: .35rem .65rem;
  border: 1px solid;
}
.status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status--released { color: #35c27a; border-color: rgba(53,194,122,.4); }
.status--released::before { box-shadow: 0 0 8px #35c27a; }
.status--dev { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 40%, transparent); }
.status--dev::before { animation: pulse 1.6s ease-in-out infinite; }
.status--stealth { color: var(--muted); border-color: var(--line); }
@keyframes pulse { 50% { opacity: .3; } }

.game-card-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: .02em;
  line-height: 1;
}

.game-card-desc { color: var(--muted); font-size: .95rem; max-width: 52ch; }

.game-card-foot {
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-num {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .2em;
}

/* ---------- upcoming ---------- */

.upcoming-list { border-top: 1px solid var(--line); }

.upcoming-row {
  --game-accent: var(--accent);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.5rem);
  padding: 1.6rem .8rem;
  border-bottom: 1px solid var(--line);
  transition: background .25s, padding-left .3s var(--ease);
}
.upcoming-row:hover { background: var(--panel); padding-left: 1.4rem; }

.upcoming-idx {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .2em;
}
.upcoming-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 2rem);
  letter-spacing: .02em;
  transition: color .25s;
}
.upcoming-row:hover .upcoming-title { color: var(--game-accent); }
.upcoming-plat {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  color: var(--muted);
}
.upcoming-arrow {
  font-family: var(--font-mono);
  color: var(--muted);
  transition: transform .3s var(--ease), color .25s;
}
.upcoming-row:hover .upcoming-arrow { transform: translateX(6px); color: var(--game-accent); }

.upcoming-slot {
  margin-top: 2rem;
  border: 1px dashed var(--line);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}
.upcoming-slot-inner h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: .05em;
  margin: .7rem 0 .4rem;
  color: var(--muted);
}
.upcoming-slot-mark {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  user-select: none;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.about-lede {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 1.8rem;
}
.about-lede em {
  font-style: normal;
  color: var(--accent-ink);
}
.about-body { color: var(--muted); margin-bottom: 1.2rem; max-width: 58ch; }

.facts { border-top: 1px solid var(--line); }
.fact {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem .2rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
}
.fact dt { color: var(--muted); }
.fact dd { font-weight: 600; text-align: right; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--footer-bg);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  overflow: hidden;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: clamp(4rem, 13.5vw, 12rem);
  line-height: .9;
  letter-spacing: .02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  user-select: none;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  transition: -webkit-text-stroke-color .4s;
}
.footer-wordmark:hover { -webkit-text-stroke-color: rgba(245,179,1,.45); }

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer-brand { max-width: 300px; display: flex; flex-direction: column; gap: 1.2rem; }
.footer-logo-link { display: inline-block; }
.footer-logo { width: 210px; height: auto; transition: transform .3s var(--ease); }
.footer-logo-link:hover .footer-logo { transform: translateY(-3px); }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.footer-col a {
  display: block;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--text);
  padding: .3rem 0;
  transition: color .2s, transform .25s var(--ease);
}
.footer-col a:hover { color: var(--accent-ink); transform: translateX(4px); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .8rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .16em;
  color: var(--muted);
}

/* ---------- game detail page ---------- */

.page-main { padding-top: var(--nav-h); min-height: 100vh; }

.game-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--muted);
  margin-bottom: 2.5rem;
  transition: color .2s;
}
.back-link:hover { color: var(--accent-ink); }
.back-link svg { transform: rotate(180deg); }

.game-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.game-hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  line-height: .95;
  letter-spacing: .02em;
  margin-bottom: 1.2rem;
}
.game-hero-tag {
  font-family: var(--font-mono);
  color: var(--accent-ink);
  font-size: clamp(.85rem, 1.6vw, 1rem);
  letter-spacing: .05em;
  max-width: 60ch;
}
.sim-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: .5rem .8rem;
  margin-top: 1.1rem;
}

.game-banner {
  border: 1px solid var(--line);
  overflow: hidden;
}
.game-banner svg { width: 100%; height: auto; }
.game-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.game-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.game-desc p { color: var(--muted); margin-bottom: 1.3rem; max-width: 62ch; }
.game-desc p:first-child { color: var(--text); font-size: 1.15rem; line-height: 1.55; }

.game-sidebar { display: flex; flex-direction: column; gap: 2rem; }
.sidebar-block { border: 1px solid var(--line); padding: 1.5rem; }
.sidebar-block h4 {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.sidebar-block .fact { padding: .8rem 0; }
.sidebar-block .fact:first-of-type { border-top: 0; }
.sidebar-block .fact:last-child { border-bottom: 0; padding-bottom: 0; }
.sidebar-block .btn { width: 100%; justify-content: center; margin-top: .6rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 1.5rem;
}
.feature {
  background: var(--panel);
  padding: 1.6rem;
}
.feature-num {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .2em;
  color: var(--accent-ink);
  display: block;
  margin-bottom: .8rem;
}
.feature h5 {
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: .5rem;
}
.feature p { font-size: .85rem; color: var(--muted); }

/* ---------- game page: pitch + loop ---------- */

.pitch {
  max-width: 860px;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}
.pitch p {
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.pitch-lede {
  font-size: clamp(1.5rem, 3.4vw, 2.3rem) !important;
  line-height: 1.3 !important;
  color: var(--text) !important;
}

.loop-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  border: 1px solid var(--line);
  background: var(--panel);
  margin-top: 1rem;
}
.loop-step {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  padding: .95rem 1rem;
  white-space: nowrap;
}
.loop-step b { color: var(--accent-ink); font-weight: 600; }
.loop-step:last-child { color: var(--accent-ink); }
.loop-sep {
  display: flex;
  align-items: center;
  color: var(--line);
  font-family: var(--font-mono);
}

/* bench verbs */
.verb-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.9rem;
}
.verb {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: .45rem .7rem;
  transition: color .2s, border-color .2s;
}
.verb:hover { color: var(--accent-ink); border-color: var(--accent); }

/* gameplay stills */
.shot-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.shot {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: .55rem;
  transition: transform .3s var(--ease), border-color .3s;
}
.shot:nth-child(odd)  { transform: rotate(-.6deg); }
.shot:nth-child(even) { transform: rotate(.5deg); }
.shot:hover { transform: rotate(0) translateY(-4px); border-color: var(--accent); }
.shot img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
}

/* junk ladder */
.loop-strip--ladder { margin-top: 0; }
.ladder-caption {
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 500;
  line-height: 1.4;
  max-width: 56ch;
  margin-top: 2rem;
}

/* ---------- game page: world / dossier ---------- */

.world-intro {
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: 62ch;
  margin-bottom: .5rem;
}
.world-map {
  border: 1px solid var(--line);
  background: var(--panel);
  margin: 2.2rem 0 .5rem;
}
.world-map img { display: block; width: 100%; }
.world-map figcaption {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: .75rem 1rem;
}
.world-sub {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--accent-ink);
  margin: 2.8rem 0 1.3rem;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.3rem;
}
.file-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.15rem;
  padding-top: 1.5rem;
  position: relative;
  transition: transform .3s var(--ease), border-color .3s;
}
.file-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 76px;
  height: 20px;
  background: rgba(245, 179, 1, .32);
  border-left: 1px dashed rgba(255,255,255,.25);
  border-right: 1px dashed rgba(255,255,255,.25);
  transform: translateX(-50%) rotate(-2.5deg);
}
.file-card:nth-child(odd)  { transform: rotate(-.5deg); }
.file-card:nth-child(even) { transform: rotate(.55deg); }
.file-card:hover { transform: rotate(0) translateY(-4px); border-color: var(--accent); }

.file-card-head {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: .9rem;
}
.file-face {
  width: 52px; height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--accent);
  overflow: hidden;
}
.file-face img { width: 100%; height: 100%; object-fit: cover; }
.file-card h5 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: .03em;
}
.file-tag {
  font-family: var(--font-mono);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--accent-ink);
}
.file-card p { font-size: .88rem; color: var(--muted); }

.places {
  margin-top: .4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
}
.place {
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}
.place-map img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}
.place-body { padding: 1.4rem 1.5rem 1.6rem; }
.place-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: .03em;
  margin-bottom: .6rem;
}
.place p { color: var(--muted); max-width: 64ch; }
.place-res {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.res {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .45rem .5rem;
  transition: background .2s;
}
.res[data-ci] { cursor: pointer; }
.res[data-ci]:hover { background: var(--bg-2); }
.res img {
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  object-fit: cover;
  flex: none;
}
.res b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: .03em;
}
.res span {
  display: block;
  font-family: var(--font-mono);
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--accent-ink);
}
.world-travel { grid-column: 1 / -1; }

/* ---------- character dossier sheet ---------- */

.file-card[data-ci] { cursor: pointer; }

.char-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4%;
  visibility: hidden;
}
.char-modal.open { visibility: visible; }
.char-back {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  opacity: 0;
  transition: opacity .3s;
}
.char-modal.open .char-back { opacity: 1; }
.char-sheet {
  position: relative;
  display: grid;
  grid-template-columns: 290px 1fr;
  width: 100%;
  max-width: 740px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .3s, transform .3s var(--ease);
}
.char-modal.open .char-sheet { opacity: 1; transform: none; }
.char-sheet::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 90px;
  height: 22px;
  background: rgba(245, 179, 1, .32);
  border-left: 1px dashed rgba(255, 255, 255, .25);
  border-right: 1px dashed rgba(255, 255, 255, .25);
  transform: translateX(-50%) rotate(-2deg);
}
.char-img {
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.char-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.char-letter {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--accent);
}
.char-body { padding: 2rem 2.2rem; }
#cm-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: .03em;
  margin: .4rem 0 1.1rem;
}
#cm-notes {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
}
#cm-notes li {
  font-size: .88rem;
  color: var(--muted);
  padding: .45rem 0 .45rem 1.4rem;
  border-bottom: 1px dashed var(--line);
  position: relative;
}
#cm-notes li:last-child { border-bottom: 0; }
#cm-notes li::before {
  content: "»";
  position: absolute;
  left: 0;
  color: var(--accent-ink);
  font-family: var(--font-mono);
}
#cm-quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}
.char-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.char-close:hover { color: var(--bg); background: var(--accent); }

@media (max-width: 640px) {
  .char-sheet { grid-template-columns: 1fr; max-height: 88vh; overflow: auto; }
  .char-img { border-right: 0; border-bottom: 1px solid var(--line); }
  .char-img img { max-height: 250px; object-position: center 30%; }
}
.world-travel {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1.3rem;
  padding-left: .2rem;
}

/* ---------- game page: escalation arc ---------- */

.arc { border-top: 1px solid var(--line); }
.arc-step {
  display: grid;
  grid-template-columns: 210px 1fr 340px;
  gap: 2rem;
  padding: 2.4rem .2rem;
  border-bottom: 1px solid var(--line);
}
.arc-step:not(:has(.arc-img)) { grid-template-columns: 210px 1fr; }
.arc-num {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--arc-accent);
  display: block;
  margin-bottom: .7rem;
}
.arc-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: .03em;
  line-height: 1.05;
}
.arc-body p { color: var(--muted); max-width: 62ch; }
.arc-img {
  border: 1px solid var(--arc-accent);
  border-color: color-mix(in srgb, var(--arc-accent) 45%, var(--line));
  align-self: start;
}
.arc-img img { display: block; width: 100%; }
.arc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .9rem;
  margin-top: 1.4rem;
}
.arc-card {
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}
.arc-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.arc-card figcaption { padding: .7rem .8rem .8rem; }
.arc-card b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: .9rem;
  letter-spacing: .03em;
}
.arc-card span {
  font-family: var(--font-mono);
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--arc-accent);
}
.rank-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  border: 1px solid var(--line);
  background: var(--panel);
  margin-top: 1.4rem;
}
.rank {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .7rem .9rem;
  font-family: var(--font-mono);
}
.rank b { font-size: .66rem; font-weight: 600; letter-spacing: .14em; }
.rank i { font-style: normal; font-size: .6rem; color: var(--arc-accent); letter-spacing: .1em; }
.rank:last-of-type b { color: var(--arc-accent); }

.legal {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  color: var(--muted);
  text-align: center;
  padding-top: 1.6rem;
}

/* ---------- game page: case systems + closer ---------- */

.files {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
  padding: clamp(3rem, 6vw, 5rem) 0 0;
}
.file-block {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--panel);
  overflow: hidden;
}
.file-block-img img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 30%;
  border-bottom: 1px solid var(--line);
}
.file-block-body { padding: 1.5rem 1.8rem 1.8rem; }
.file-block h5 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: .03em;
  margin: .6rem 0 .8rem;
}
.file-block p { color: var(--muted); font-size: .95rem; }

.closer {
  text-align: center;
  padding: clamp(3rem, 7vw, 5.5rem) 0 0;
}
.closer p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  line-height: 1.2;
  max-width: 26ch;
  margin-inline: auto;
}

.other-games { padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 6rem); }
.other-games .upcoming-list { border-top-color: var(--line); }

.not-found {
  padding: 8rem 0;
  text-align: center;
}
.not-found h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  margin-bottom: 1rem;
}
.not-found p { color: var(--muted); margin-bottom: 2rem; }

/* ---------- privacy / prose page ---------- */

.prose { max-width: 720px; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6rem); }
.prose h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: .6rem;
}
.prose .updated { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em; color: var(--muted); margin-bottom: 3rem; }
.prose h2 {
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--accent-ink);
  margin: 2.4rem 0 .8rem;
}
.prose p { color: var(--muted); margin-bottom: 1rem; }
.prose a { color: var(--accent-ink); }
.prose ul { color: var(--muted); margin: 0 0 1rem 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--accent); }

.noscript-note { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.noscript-note a { color: var(--accent-ink); text-decoration: underline; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .games-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .game-detail-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .places { grid-template-columns: 1fr; }
  .file-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .shot-strip { grid-template-columns: 1fr 1fr; }
  .files { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .shot-strip { grid-template-columns: 1fr; }
  .shot img { aspect-ratio: 4 / 3; object-position: top; }
}

@media (max-width: 1000px) {
  .arc-step,
  .arc-step:not(:has(.arc-img)) { grid-template-columns: 1fr; gap: 1.1rem; }
  .arc-img { max-width: 480px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-right { gap: 1rem; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--nav-menu-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 1rem 4%;
    transform: translateY(-120%);
    transition: transform .4s var(--ease);
  }
  .nav-open .nav-links { transform: translateY(0); }
  .nav-links a {
    width: 100%;
    padding: 1rem .2rem;
    font-size: .8rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a::after { display: none; }
}

@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .section-note { text-align: left; }
  .upcoming-row { grid-template-columns: auto 1fr auto; }
  .upcoming-plat { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- reduced motion ---------- */

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