/* ---------- Tokens ---------- */
:root {
  --bg:        oklch(0.98 0.006 80);
  --bg-elev:   oklch(0.965 0.008 80);
  --ink:       oklch(0.18 0.01 60);
  --ink-soft:  oklch(0.42 0.01 60);
  --ink-mute:  oklch(0.60 0.008 60);
  --line:      oklch(0.90 0.006 80);
  --line-soft: oklch(0.93 0.005 80);
  --accent:    oklch(0.66 0.16 38);    /* warm coral */
  --accent-ink: oklch(0.99 0.01 80);

  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "JetBrains Mono", monospace;
  --font-display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --display-weight: 600;
  --display-tracking: -0.035em;

  --radius: 4px;
  --maxw: 1240px;
}

[data-theme="dark"] {
  --bg:        oklch(0.16 0.01 60);
  --bg-elev:   oklch(0.20 0.01 60);
  --ink:       oklch(0.96 0.006 80);
  --ink-soft:  oklch(0.72 0.01 80);
  --ink-mute:  oklch(0.50 0.01 80);
  --line:      oklch(0.28 0.01 60);
  --line-soft: oklch(0.23 0.01 60);
  --accent:    oklch(0.74 0.16 40);
  --accent-ink: oklch(0.16 0.01 60);
}

/* Display font variants set per tweak */
[data-display="serif"] {
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --display-weight: 400;
  --display-tracking: -0.015em;
}
[data-display="mono"] {
  --font-display: "Geist Mono", ui-monospace, monospace;
  --display-weight: 500;
  --display-tracking: -0.04em;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  transition: background-color .35s ease, color .35s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: 18px;
}
.brand__mark {
  width: 22px;
  height: 22px;
  color: var(--accent);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.brand:hover .brand__mark { transform: rotate(-12deg); }

.nav__links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav__links a {
  position: relative;
  padding: 4px 0;
  transition: color .2s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }

@media (max-width: 720px) {
  .nav__links { display: none; }
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  background: var(--bg-elev);
  transition: border-color .2s ease, background-color .2s ease;
}
.nav__cta:hover { border-color: var(--ink); background: var(--bg); }
.nav__cta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 0%, transparent); }
}

/* ---------- Section meta labels ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
}
.section { padding: 120px 0; border-top: 1px solid var(--line-soft); }
.section:first-of-type { border-top: 0; }

.section__head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  margin-bottom: 56px;
}
.section__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  padding-top: 10px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.04;
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
@media (max-width: 820px) {
  .section { padding: 88px 0; }
  .section__head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 0;
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero__top {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  padding-top: 24px;
}
.hero__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero__meta span:first-child { color: var(--ink); }

.hero__headline {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(48px, 8.2vw, 132px);
  line-height: 0.94;
  margin: 0;
  text-wrap: balance;
}
.hero__headline em {
  font-style: italic;
  color: var(--accent);
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}
[data-display="serif"] .hero__headline em { color: var(--accent); }

.hero__bottom {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 60px;
  align-items: end;
  padding: 80px 0 56px;
}
.hero__caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.hero__caption .arrow {
  display: inline-block;
  margin-right: 8px;
  color: var(--accent);
}
.hero__copy {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 38ch;
  text-wrap: pretty;
}
.hero__copy strong { color: var(--ink); font-weight: 500; }

.hero__indicators {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.indicator {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  color: var(--ink-soft);
}
.indicator span:first-child { color: var(--ink-mute); }

@media (max-width: 980px) {
  .hero__top, .hero__bottom { grid-template-columns: 1fr; gap: 32px; }
  .hero__bottom { padding: 56px 0 40px; }
}

.hero__mark {
  position: absolute;
  right: 32px;
  top: 100px;
  width: 18vw;
  max-width: 220px;
  min-width: 110px;
  aspect-ratio: 1;
  color: var(--accent);
  opacity: 0.92;
  pointer-events: none;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
@media (max-width: 980px) { .hero__mark { display: none; } }

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 60px;
}
.about__lede {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.25;
  margin: 0 0 28px;
  text-wrap: pretty;
}
.about__body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 16px;
  text-wrap: pretty;
}
.about__facts {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.fact {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
}
.fact dt { color: var(--ink-mute); letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; padding-top: 2px; }
.fact dd { margin: 0; color: var(--ink); }
@media (max-width: 820px) {
  .about__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Games ---------- */
.games {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
}
.games__list {
  display: flex;
  flex-direction: column;
}
.game-card {
  position: relative;
  display: grid;
  grid-template-columns: 260px 1fr auto;
  gap: 40px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  transition: padding-left .35s cubic-bezier(.2,.7,.2,1);
}
.game-card:last-child { border-bottom: 1px solid var(--line); }
.game-card:hover { padding-left: 16px; }
.game-card::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-20px, -50%) scale(0);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.game-card:hover::before { transform: translate(0, -50%) scale(1); }

.game-card__art {
  aspect-ratio: 4 / 3;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.game-card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 9px,
    color-mix(in oklab, var(--ink) 5%, transparent) 9px,
    color-mix(in oklab, var(--ink) 5%, transparent) 10px
  );
}
.game-card__art-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  text-transform: uppercase;
  z-index: 1;
}
.game-card__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  margin: 0 0 8px;
}
.game-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.game-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.game-card__meta span::before {
  content: "";
  width: 4px; height: 4px;
  background: var(--ink-mute);
  border-radius: 50%;
}
.game-card__meta span:first-child::before { display: none; }
.game-card__desc {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 52ch;
  text-wrap: pretty;
}
.game-card__status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}
.game-card__status .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s infinite;
}

@media (max-width: 980px) {
  .games { grid-template-columns: 1fr; gap: 32px; }
  .game-card { grid-template-columns: 1fr; gap: 20px; }
  .game-card__status { justify-self: start; }
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact__lede {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  margin: 0 0 20px;
  text-wrap: balance;
}
.contact__sub {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 38ch;
  text-wrap: pretty;
}
.contact__channels {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.channel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left .3s cubic-bezier(.2,.7,.2,1);
  position: relative;
}
.channel:hover { padding-left: 12px; }
.channel__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.channel__value {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(20px, 2vw, 26px);
}
.channel__arrow {
  width: 20px;
  height: 20px;
  color: var(--ink-mute);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), color .2s ease;
}
.channel:hover .channel__arrow { transform: translate(4px, -4px); color: var(--accent); }

@media (max-width: 980px) {
  .contact { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 60px;
  align-items: start;
}
.footer__brand {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer__brand .brand__mark { width: 24px; height: 24px; }
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 14px;
  font-weight: 400;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer__col a { color: var(--ink-soft); font-size: 14px; transition: color .15s ease; }
.footer__col a:hover { color: var(--ink); }
.footer__copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-align: right;
  line-height: 1.6;
}
@media (max-width: 980px) {
  .footer__inner { grid-template-columns: 1fr; gap: 40px; }
  .footer__copy { text-align: left; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

/* ---------- Legal pages ---------- */
.legal {
  padding: 80px 0 120px;
}
.legal__head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 64px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.legal__title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.98;
  margin: 0;
}
.legal__body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
}
.legal__toc {
  position: sticky;
  top: 96px;
  align-self: start;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal__toc a {
  color: var(--ink-mute);
  padding: 4px 0;
  transition: color .15s ease;
}
.legal__toc a:hover, .legal__toc a.is-active { color: var(--ink); }
.legal__content { max-width: 70ch; }
.legal__content h2 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  font-size: 28px;
  margin: 56px 0 16px;
  scroll-margin-top: 96px;
}
.legal__content h2:first-child { margin-top: 0; }
.legal__content p, .legal__content li {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}
.legal__content ul { padding-left: 18px; }
.legal__content li { margin-bottom: 6px; }
.legal__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
@media (max-width: 820px) {
  .legal__head, .legal__body { grid-template-columns: 1fr; gap: 24px; }
  .legal__toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 16px; }
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  box-shadow: 0 20px 40px -20px color-mix(in oklab, var(--ink) 25%, transparent),
              0 4px 12px -6px color-mix(in oklab, var(--ink) 15%, transparent);
  z-index: 100;
  display: none;
}
.tweaks.is-open { display: block; }
.tweaks__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.tweaks__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.tweaks__close {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 4px;
  color: var(--ink-mute);
}
.tweaks__close:hover { background: var(--bg-elev); color: var(--ink); }
.tweak {
  margin-bottom: 14px;
}
.tweak__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.tweak__row { display: flex; gap: 8px; flex-wrap: wrap; }
.tweak__swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s ease, transform .15s ease;
  position: relative;
}
.tweak__swatch.is-active { border-color: var(--ink); }
.tweak__swatch:hover { transform: scale(1.08); }
.tweak__pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
  transition: all .15s ease;
}
.tweak__pill.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tweak__pill:hover:not(.is-active) { border-color: var(--ink); color: var(--ink); }
