/* Critical State Studios — shared styles */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #e8dfd0;
  --ink: #1c1a17;
  --ink-soft: #5b544a;
  --line: rgba(28, 26, 23, .16);
  --line-strong: rgba(28, 26, 23, .55);
  --card: rgba(255, 252, 245, .22);
  --track: .32em;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* faint paper grain over everything so every section reads as one sheet */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .4 0 0 0 0 .33 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 60; background: var(--ink); color: var(--paper); padding: 8px 12px; }

/* type */
.caps {
  font-size: 11px; font-weight: 500;
  letter-spacing: var(--track);
  text-transform: uppercase;
}
.muted { color: var(--ink-soft); }
.section-title {
  margin: 0;
  text-align: center;
  font-size: 15px; font-weight: 500;
  letter-spacing: .5em;
  padding-left: .5em;
  text-transform: uppercase;
}
.section-title::after {
  content: "";
  display: block;
  width: 48px; height: 1px;
  margin: 22px auto 0;
  background: var(--line-strong);
}
.section-lede {
  margin: 22px auto 0;
  max-width: 560px;
  text-align: center;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--ink-soft);
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .9em;
  padding: .95em 1.6em .95em calc(1.6em + var(--track));
  border: 1px solid var(--line-strong);
  color: var(--ink);
  text-decoration: none;
  font-size: 12px; font-weight: 500;
  letter-spacing: var(--track);
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(232, 223, 208, .55);
  transition: background .25s, color .25s, border-color .25s;
}
.btn svg { width: 14px; height: 10px; flex: none; transition: transform .25s; }
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--paper); border-color: var(--ink); outline: none; }
.btn:hover svg { transform: translateX(3px); }
.btn.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.solid:hover, .btn.solid:focus-visible { background: transparent; color: var(--ink); }

/* ---------- hero (home) ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.hero > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  /* feather the edges so the paper blends into the page background */
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at center, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 70% at center, #000 60%, transparent 100%);
  animation: fade 1.6s ease-out both;
}
@media (orientation: portrait) {
  .hero > img {
    inset: auto; left: 50%; top: 50%;
    width: 165vw; height: auto;
    transform: translate(-50%, -50%);
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, #000 55%, transparent 100%);
            mask-image: radial-gradient(ellipse 50% 50% at center, #000 55%, transparent 100%);
  }
}
.hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hero .cta {
  position: absolute;
  left: 50%;
  bottom: max(6vh, 28px);
  transform: translateX(-50%);
  animation: fade 1.2s .9s ease-out both;
}
.hero .cta svg { width: 10px; height: 14px; }
.hero .cta:hover svg { transform: translateY(3px); }
.hero-nav {
  position: absolute; top: 22px; right: 24px;
  display: flex; gap: 28px;
  animation: fade 1.2s 1.1s ease-out both;
}
.hero-nav a { text-decoration: none; color: var(--ink-soft); }
.hero-nav a:hover { color: var(--ink); }
@media (orientation: portrait) {
  .hero .cta { bottom: max(12vh, 40px); }
  .hero-nav { left: 0; right: 0; justify-content: center; }
}

/* ---------- sections ---------- */
.block { padding: 12vh 0 4vh; }
.block + .block { padding-top: 10vh; }

/* ---------- game tiles ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 340px));
  justify-content: center;
  gap: 28px;
  margin-top: 56px;
}
.tile {
  position: relative;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  background: var(--card);
  transition: opacity .7s ease-out, transform .7s ease-out, border-color .25s, box-shadow .25s, background .25s;
  transition-delay: var(--d, 0s);
}
.js .tile { opacity: 0; transform: translateY(18px); }
.js .tile.in { opacity: 1; transform: none; }
.js .tile.queued { display: none; }
.tile.live:hover, .tile.live:focus-within {
  border-color: var(--line-strong);
  background: rgba(255, 252, 245, .4);
  box-shadow: 0 18px 40px -24px rgba(28, 26, 23, .45);
  transform: translateY(-4px);
  transition-delay: 0s;
}
.tile-art {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.tile-art img {
  position: absolute; inset: 0; margin: auto;
  width: 78%; height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(28, 26, 23, .12));
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.tile.live:hover .tile-art img { transform: scale(1.05) rotate(-2deg); }
.tile-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.tile h3 {
  margin: 0;
  font-size: 15px; font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.tile h3 a { text-decoration: none; outline: none; }
/* the title link stretches over the whole card: one click to play */
.tile h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tile p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.tile-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 18px;
}
.tile-foot .go { display: inline-flex; align-items: center; gap: .6em; }
.tile-foot .go svg { width: 14px; height: 10px; transition: transform .25s; }
.tile.live:hover .go svg { transform: translateX(4px); }
.tile-info {
  position: relative; z-index: 2;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.tile-info:hover, .tile-info:focus-visible { color: var(--ink); border-color: var(--ink); outline: none; }
.tile.soon { border-style: dashed; }
.tile.soon .tile-art img { filter: none; opacity: .3; width: 70%; height: 70%; }
.tile.soon .tile-foot { color: var(--ink-soft); }
.sentinel { height: 1px; }

/* ---------- about ---------- */
.about {
  max-width: 720px;
  margin: 56px auto 0;
  text-align: center;
}
.about .lead {
  margin: 0;
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.65;
  font-weight: 400;
}
.socials {
  list-style: none;
  margin: 44px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px;
}
.socials a {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 150px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .25s, background .25s;
}
.socials a:hover, .socials a:focus-visible { border-color: var(--line-strong); background: rgba(255, 252, 245, .35); outline: none; }
.socials .handle { font-size: 12.5px; color: var(--ink-soft); letter-spacing: .02em; text-transform: none; font-weight: 400; }
.say-hi { margin: 28px 0 0; font-size: 14px; color: var(--ink-soft); }
.say-hi a { color: var(--ink); }

/* ---------- inner-page bar ---------- */
.bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px 16px;
}
.mark {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  font-size: 12px; font-weight: 500;
  letter-spacing: .38em;
  text-transform: uppercase;
}
.mark img { width: 34px; height: 34px; object-fit: contain; }
.bar nav { display: flex; gap: 24px; }
.bar nav a { text-decoration: none; color: var(--ink-soft); }
.bar nav a:hover { color: var(--ink); }
@media (max-width: 560px) {
  .mark span { display: none; }
}

/* ---------- game page ---------- */
.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  padding: 6vh 0 4vh;
}
.game-art {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  background: var(--card);
}
.game-art img {
  position: absolute; inset: 0; margin: auto;
  width: 76%; height: 76%;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(28, 26, 23, .14));
}
.eyebrow { margin: 0 0 16px; color: var(--ink-soft); }
.game-intro h1 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1.15;
  text-transform: uppercase;
}
.game-intro .tagline { margin: 12px 0 0; font-size: 17px; color: var(--ink-soft); }
.game-intro .summary { margin: 22px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 24px;
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.facts dt { color: var(--ink-soft); padding-top: 2px; }
.facts dd { margin: 0; font-size: 14px; }
@media (max-width: 760px) {
  .game-hero { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .game-art { max-width: 420px; width: 100%; margin: 0 auto; }
}

.prose { max-width: 680px; margin: 48px auto 0; }
.prose p { margin: 0 0 1.1em; }

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 880px;
  margin-left: auto; margin-right: auto;
  gap: 20px;
  margin-top: 48px;
}
.feature { border: 1px solid var(--line); background: var(--card); padding: 22px; }
.feature.soon { border-style: dashed; }
.feature .caps { color: var(--ink-soft); }
.feature h3 { margin: 10px 0 0; font-size: 16px; font-weight: 500; letter-spacing: .04em; }
.feature p { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  max-width: 880px;
  margin-left: auto; margin-right: auto;
  gap: 20px;
  margin-top: 48px;
}
.gallery figure { margin: 0; }
.gallery a { display: block; border: 1px solid var(--line); background: var(--card); padding: 10px; transition: border-color .25s; }
.gallery a:hover { border-color: var(--line-strong); }
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-soft); text-align: center; }

.link-list {
  list-style: none; margin: 48px auto 0; padding: 0;
  max-width: 680px;
  border-top: 1px solid var(--line);
}
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 4px;
  text-decoration: none;
}
.link-list a span:last-child { color: var(--ink-soft); font-size: 13px; letter-spacing: .02em; text-transform: none; font-weight: 400; }
.link-list a:hover span:first-child { text-decoration: underline; text-underline-offset: 4px; }
.fine-note { max-width: 680px; margin: 40px auto 0; text-align: center; font-size: 12.5px; color: var(--ink-soft); }

/* ---------- legal ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 6vh 16px 4vh; }
.legal h1 { margin: 0; font-size: clamp(24px, 3.6vw, 34px); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.legal h2 { margin: 56px 0 0; padding-top: 32px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; }
.legal h3 { margin: 28px 0 0; font-size: 15px; font-weight: 500; }
.legal p { margin: 8px 0 0; }
.legal .toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 12vh;
  border-top: 1px solid var(--line);
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  padding: 48px 16px 28px;
}
.site-footer h2 { margin: 0 0 12px; font-size: 11px; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-soft); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer .brand-col p { margin: 12px 0 0; font-size: 13px; color: var(--ink-soft); max-width: 300px; }
.site-footer .fine {
  padding: 18px 16px 40px;
  font-size: 10.5px;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 760px) {
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .site-footer .brand-col { grid-column: 1 / -1; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero > img, .hero .cta, .hero-nav { animation: none; }
  .js .tile { transition: none; opacity: 1; transform: none; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tile + game page labels */
.badge {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  padding: 5px 9px 5px calc(9px + var(--track));
  font-size: 10px;
  background: var(--ink); color: var(--paper);
}
.tile p.availability, .game-intro .availability {
  margin-top: 6px;
  font-size: 12.5px; font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink);
}
.game-intro .availability { margin-top: 10px; font-size: 14px; }
.game-art.wide { aspect-ratio: auto; background: none; }
.game-art.wide img { position: static; display: block; width: 100%; height: auto; filter: none; }
