/* ---------- font ---------- */
@font-face {
  font-family: "MG Brush";
  src: url("fonts/MGBrushV2.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-latin-ext.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-latin-ext.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-latin-ext.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  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;
}


/* ---------- tokens ---------- */
:root {
  --bg: #fbfaf7;          /* paper-white, barely warm */
  --ink: #0e0e0c;
  --ink-soft: #6b6b66;
  --rule: #1a1a17;
  --hair: rgba(14, 14, 12, 0.18);
  --accent: oklch(0.55 0.19 30);    /* warm rust, used sparingly */
  --hover-ms: 700ms;
  --hover-ease: cubic-bezier(.2,.85,.25,1);
  --max: 1240px;
  --pad: clamp(20px, 4vw, 56px);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- type ---------- */
.brush {
  font-family: "MG Brush", "Caveat", "Bradley Hand", cursive;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.95;
}

.mono {
  font-family: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1, h2, h3 { margin: 0; font-weight: 400; }

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; max-width: 62ch; text-wrap: pretty; }

/* ---------- layout ---------- */
.page {
  min-height: 100vh;
  padding: clamp(28px, 4vh, 52px) var(--pad) 96px;
  display: flex;
  flex-direction: column;
}

.shell {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(64px, 12vh, 140px);
}
/* tighter gap on pages that don't lead with the centered slogan */
.topbar:not(:has(+ .slogan)) {
  margin-bottom: clamp(28px, 5vh, 56px);
}

.logo {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 0.85;
}

.topbar nav {
  display: flex;
  gap: 22px;
}

.topbar nav a {
  font-size: 13px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 180ms ease, border-color 180ms ease;
}
.topbar nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- slogan ---------- */
.slogan {
  text-align: center;
  max-width: 540px;
  margin: 0 auto clamp(72px, 12vh, 130px);
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
}

/* ---------- game cards row ---------- */
.cards {
  display: flex;
  gap: 18px;
  align-items: stretch;
  width: 100%;
  margin: 0 auto;
  height: var(--row-h, clamp(220px, 26vw, 320px)); /* fixed — only widths change on hover */
}

/* two-card layout: cap width so each card stays ~1/3 of the row, matching the 3-card per-card size */
.cards--pair {
  max-width: calc(66.667% - 6px);
}

.card {
  flex: 1 1 0;
  position: relative;
  height: 100%;
  border: 1px solid var(--rule);
  background: #fff;
  overflow: hidden;
  transition: flex-grow var(--hover-ms) var(--hover-ease);
  cursor: pointer;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.card .shot {
  flex: 1 1 auto;
  min-height: 0;
  border-bottom: 1px solid var(--rule);
}

/* always-visible info strip at bottom of card */
.card-info {
  background: #fff;
  padding: 12px 18px 14px;
  display: flex;
  flex-direction: column;
}
.card-info .title {
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 0.95;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-info .extra {
  display: grid;
  gap: 10px;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transition: grid-template-rows var(--hover-ms) var(--hover-ease),
              opacity calc(var(--hover-ms) * 0.6) var(--hover-ease),
              margin-top var(--hover-ms) var(--hover-ease);
}
.card-info .extra > .extra-inner {
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 10px;
}
.card-info .tag {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.4;
  max-width: 46ch;
}
.card-info .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--hair);
}
.card-info .row .mono { font-size: 11px; }
.card-info .row .open {
  font-family: "MG Brush", cursive;
  font-size: 22px;
  line-height: 1;
}
.card:hover .card-info .extra,
.card:focus-visible .card-info .extra {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 10px;
}

/* hover behaviour: hovered card grows, others shrink.
   defaults: 2 / 1 / 1 → hovered = 50%, others = 25% each */
.cards:has(.card:hover) .card { flex-grow: var(--shrink, 1); }
.cards:has(.card:hover) .card:hover { flex-grow: var(--grow, 2); }

/* keyboard focus mirrors hover */
.card:focus-visible { outline: none; }
.cards:has(.card:focus-visible) .card { flex-grow: var(--shrink, 1); }
.cards:has(.card:focus-visible) .card:focus-visible { flex-grow: var(--grow, 2); }

/* placeholder shot */
.shot {
  position: relative;
  width: 100%;
  height: 100%;
  background: #f1f0eb;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 9px,
    rgba(14, 14, 12, 0.05) 9px 10px
  );
  display: grid;
  place-items: center;
  overflow: hidden;
}
.shot::after {
  content: attr(data-label);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg);
  padding: 4px 8px;
  border: 1px solid var(--hair);
}

.slogan .brush-link {
  font-family: "MG Brush", cursive;
  font-size: 1.5em;
  line-height: 0.9;
  vertical-align: -0.12em;
  letter-spacing: 0;
  margin: 0 0.04em;
  display: inline-block;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: transform 240ms var(--hover-ease);
}
.slogan .brush-link:hover { transform: translateY(-2px); }

/* ---------- small landing CTA (below games) ---------- */
.landing-cta {
  margin-top: clamp(80px, 14vh, 140px);
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}
.landing-cta .kicker {
  font-family: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.landing-cta a.link {
  font-family: "MG Brush", cursive;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  transition: transform 240ms var(--hover-ease);
}
.landing-cta a.link:hover { transform: translateY(-2px); }
.landing-cta a.link .arrow { font-size: 0.85em; }
.landing-cta .sub {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 6px 0 0;
}

/* ---------- page header (about / contact pages) ---------- */
.page-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 28px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}
.page-head h1.brush {
  font-size: clamp(72px, 10vw, 150px);
  line-height: 0.85;
  margin: 0;
}
.page-head.bare { border-bottom: none; padding-bottom: 0; margin-bottom: 36px; }
.page-head .meta {
  text-align: right;
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
}
.page-head .meta .label {
  font-family: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.page-head .meta .value { font-size: 15px; }

/* ---------- about ---------- */
.about {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about .kicker {
  font-family: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.about h2.brush {
  font-size: clamp(72px, 9vw, 130px);
  line-height: 0.85;
  margin: 0 0 28px;
}
.about .polaroid {
  background: #fff;
  padding: 14px 14px 64px;
  border: 1px solid var(--rule);
  transform: rotate(-2.4deg);
  width: 100%;
  max-width: 340px;
  position: relative;
  align-self: start;
  margin-top: 12px;
}
.about .polaroid .photo {
  aspect-ratio: 4 / 5;
  background: #f1f0eb;
  background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(14,14,12,0.05) 10px 11px);
  display: grid;
  place-items: center;
  position: relative;
}
.about .polaroid .photo .pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg);
  padding: 5px 9px;
  border: 1px solid var(--hair);
}
.about .polaroid .caption {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  text-align: center;
  font-family: "MG Brush", cursive;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
}
.about .body {
  font-size: 18px;
  line-height: 1.7;
  max-width: 58ch;
}
.about .body p {
  margin: 0 0 1.1em;
  font-size: inherit;
  max-width: none;
}
.about .body p:last-child { margin-bottom: 0; }
.about .body .brush {
  font-size: 1.5em;
  line-height: 0.9;
  vertical-align: -0.12em;
  letter-spacing: 0;
  margin: 0 0.06em;
}
.about .body .accent { color: var(--accent); }
.about .body a.under {
  color: inherit;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}

/* ---------- contact ---------- */
.contact { }
.contact h2.brush {
  font-size: clamp(72px, 9vw, 130px);
  line-height: 0.85;
  margin: 0 0 28px;
}
.contact .lead {
  font-size: 18px;
  line-height: 1.7;
  max-width: 68ch;
  margin: 0 0 56px;
}
.contact .lead .brush {
  font-size: 1.45em;
  line-height: 0.9;
  vertical-align: -0.1em;
  letter-spacing: 0;
}
.contact .lead .accent { color: var(--accent); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.contact-grid.bare { border-top: none; padding-top: 0; }
.contact-block {
  display: grid;
  gap: 14px;
  align-content: start;
}
.contact-block .kicker {
  font-family: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-block h3.brush {
  font-size: clamp(34px, 3.6vw, 50px);
  line-height: 0.92;
  font-weight: 400;
  margin: 0;
  max-width: 14ch;
}
.contact-block p {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 4px 0 0;
  max-width: 42ch;
  line-height: 1.55;
}
.contact-email {
  font-family: "MG Brush", cursive;
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.05;
  display: inline-block;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  align-self: start;
  margin-top: 16px;
  transition: transform 240ms var(--hover-ease);
}
.contact-email:hover { transform: translateX(4px); }

/* ---------- footer ---------- */
footer {
  margin-top: auto;
  padding-top: 96px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 24px;
}
footer .links {
  display: flex;
  gap: 22px;
}
footer .links a {
  font-size: 13px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 180ms ease, border-color 180ms ease;
}
footer .links a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
footer .corner {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-family: "Geist Mono", monospace;
}

/* ---------- GAME PAGE ---------- */

.back {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 40px;
  color: var(--ink);
  transition: transform 240ms var(--hover-ease);
}
.back:hover { transform: translateX(-4px); }
.back .arr {
  font-family: "Geist", "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 300;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
}
.back .lbl {
  font-family: "MG Brush", cursive;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* (removed: .back:has(+ .gp-title-block) override is no longer needed — back sits inside the title column) */

.gp-title-block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.gp-title-block .title-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.gp-title-block .title-col .back {
  margin-bottom: 14px;
  align-self: flex-start;
}
.gp-title {
  font-size: clamp(64px, 9vw, 140px);
  line-height: 0.86;
}
.gp-title-block .right {
  text-align: right;
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
}
.gp-title-block .right .label {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.gp-title-block .right .value {
  font-size: 15px;
}

.gp-tagline {
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.35;
  max-width: 720px;
  margin-bottom: 64px;
  color: var(--ink);
}

/* gallery */
.gallery {
  margin-bottom: 40px;
}
.gallery .hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  background: #f1f0eb;
  position: relative;
  overflow: hidden;
  background-image: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(14,14,12,0.05) 12px 13px);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.gallery .hero .pill,
.thumb .pill {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg);
  padding: 5px 9px;
  border: 1px solid var(--hair);
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.thumb {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  background: #f1f0eb;
  background-image: repeating-linear-gradient(-45deg, transparent 0 9px, rgba(14,14,12,0.05) 9px 10px);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 220ms ease, opacity 220ms ease;
  position: relative;
  opacity: 0.78;
}
.thumb:hover { opacity: 1; transform: translateY(-2px); }
.thumb.active { opacity: 1; outline: 2px solid var(--ink); outline-offset: -3px; }

/* body */
.gp-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 80px;
  margin-bottom: 80px;
}
.gp-body h2 {
  font-family: "MG Brush", cursive;
  font-size: 48px;
  line-height: 0.9;
  margin: 48px 0 22px;
}
.gp-body h2:first-child,
.gp-body .gallery + h2 { margin-top: 0; }
.gp-body p { font-size: 17px; line-height: 1.65; }
.gp-body p:not(:last-child) { margin-bottom: 1.1em; }
.gp-body .inline-shot {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  background: #f1f0eb;
  background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(14,14,12,0.05) 10px 11px);
  display: grid;
  place-items: center;
  margin: 32px 0 40px;
}

.gp-side {
  border-left: 1px solid var(--rule);
  padding-left: 30px;
}
.gp-side .block { margin-bottom: 32px; }
.gp-side .label {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.gp-side .value { font-size: 15px; line-height: 1.5; }
.gp-side ul { padding: 0; margin: 0; list-style: none; }
.gp-side ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 14px;
}
.gp-side ul li:last-child { border-bottom: none; }

.features {
  margin: 56px 0 80px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 36px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.features .feat .num {
  font-family: "MG Brush", cursive;
  font-size: 38px;
  line-height: 1;
  margin-bottom: 6px;
}
.features .feat h3 {
  font-family: "Geist", sans-serif;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}
.features .feat p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}

/* CTA */
.cta {
  margin: 80px 0 24px;
  text-align: center;
  padding: 64px 24px;
}
.cta .kicker {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.cta .link {
  font-family: "MG Brush", cursive;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  position: relative;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  transition: transform 280ms var(--hover-ease);
}
.cta .link:hover { transform: translateY(-3px); }
.cta .link .arrow { font-size: 0.8em; }

/* ---------- snap dots (mobile carousel indicator) ---------- */
.snap-dots { display: none; }

/* ---------- BLOG LISTING ---------- */

.posts {
  display: flex;
  flex-direction: column;
}

.post-card {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 48px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
  color: inherit;
}
.post-card:first-child { border-top: 1px solid var(--rule); }
.post-card--right    { grid-template-columns: 3fr 2fr; }
.post-card--right .post-thumb { order: 2; }
.post-card--bigleft  { grid-template-columns: 3fr 2fr; }
.post-card--bigright { grid-template-columns: 2fr 3fr; }
.post-card--bigright .post-thumb { order: 2; }

.post-thumb {
  width: 100%;
  aspect-ratio: 19 / 13;
  object-fit: cover;
  display: block;
}
.post-thumb--placeholder {
  background: #f1f0eb;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 9px,
    rgba(14, 14, 12, 0.05) 9px 10px
  );
}

/* shared Polaroid look — listing-card thumb + in-body figure */
.post-thumb--polaroid,
.blog-body .polaroid {
  background: #fff;
  border: 1px solid var(--rule);
  position: relative;
  transform: rotate(var(--tilt, -2.4deg));
  backface-visibility: hidden;
  box-shadow: 0 2px 5px rgba(14, 14, 12, 0.14);
}
.post-polaroid-img,
.blog-body .polaroid img {
  display: block;
  backface-visibility: hidden;
  transform: translateZ(0);
  box-shadow: 0 0 1px rgba(14, 14, 12, 0.3);
}

/* listing-card thumb specifics */
.post-thumb--polaroid {
  padding: 12px;
  margin: 0;
  align-self: start;
  aspect-ratio: auto;
}
.post-thumb--polaroid--captioned { padding: 12px 12px 56px; }
.post-polaroid-img {
  width: 100%;
  aspect-ratio: 19 / 13;
  object-fit: cover;
}
.post-polaroid-img--placeholder {
  background: #f1f0eb;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 9px,
    rgba(14, 14, 12, 0.05) 9px 10px
  );
}
.post-polaroid-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  text-align: center;
  font-family: "MG Brush", cursive;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1;
  color: var(--ink);
}

/* in-body Polaroid figure — same look, larger; flow caption auto-collapses */
.blog-body .polaroid {
  padding: 14px;
  margin: 2.4em auto;
  max-width: min(420px, 100%);
}
.blog-body .polaroid img {
  width: 100%;
  height: auto;
  margin: 0;
  border: none;
}
.blog-body .polaroid figcaption {
  margin: 14px 8px 2px;
  text-align: center;
  font-family: "MG Brush", cursive;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1;
  color: var(--ink);
  font-style: normal;
}

.post-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.post-card-title {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 0.9;
  margin: 0;
}

.post-subtitle {
  font-size: 14px;
  color: var(--accent);
  margin: 0;
  line-height: 1.4;
}

.post-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0;
}

.post-open {
  display: inline-block;
  margin-top: 6px;
  transition: transform 200ms var(--hover-ease);
}
.post-card:hover .post-open { transform: translateX(4px); }
.post-card:hover .post-card-title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---------- BLOG ARTICLE ---------- */

.blog-article {
  max-width: 68ch;
  margin-inline: auto;
  padding-bottom: 80px;
}

.blog-head {
  padding-bottom: 32px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-title {
  font-size: clamp(56px, 8vw, 110px);
  line-height: 0.87;
  margin: 0;
}

.blog-body {
  font-size: 17px;
  line-height: 1.75;
}

.blog-body p {
  max-width: none;
  margin: 0 0 1.3em;
}

.blog-body h2 {
  font-family: "MG Brush", "Caveat", "Bradley Hand", cursive;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 0.9;
  margin: 2em 0 0.5em;
}

.blog-body h3 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 1.8em 0 0.5em;
}

.blog-body a {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  transition: color 160ms ease, border-color 160ms ease;
}
.blog-body a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.blog-body img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hair);
  margin: 2em 0;
}
.blog-body img.img-bare {
  border: none;
  background: transparent;
}

.blog-body blockquote {
  border-left: 3px solid var(--rule);
  padding-left: 24px;
  margin: 2em 0;
  color: var(--ink-soft);
  font-style: italic;
}

/* key cap style — swap note:
   option 6 (current): accent-tinted key cap
   option 1 (plain):   background:var(--bg); border-color:var(--hair); box-shadow: 0 2px 0 var(--hair); remove accent lines */
.blog-body code {
  font-size: 0.88em;
  background: oklch(0.55 0.19 30 / 0.06);
  border: 1px solid oklch(0.55 0.19 30 / 0.2);
  box-shadow: 0 2px 0 oklch(0.55 0.19 30 / 0.15);
  padding: 1px 6px 2px;
  border-radius: 3px;
  position: relative;
  top: -1px;
}

.blog-body pre {
  background: var(--rule);
  color: var(--bg);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 2em 0;
  border-radius: 2px;
}

.blog-body pre code {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  font-size: 14px;
  color: inherit;
  position: static;
  top: auto;
}

.blog-body hr {
  border: none;
  border-top: 1px solid var(--hair);
  margin: 3em 0;
}

.blog-body .katex-display {
  margin: 1.8em 0;
  overflow-x: auto;
}

/* ---------- BLOG RICH FORMATTING ---------- */

/* lead paragraph + drop cap */
.blog-body .lead {
  font-size: 1.22em;
  line-height: 1.6;
  color: var(--ink);
}
.blog-body .lead::first-letter {
  font-family: "MG Brush", "Caveat", "Bradley Hand", cursive;
  float: left;
  font-size: 4.4em;
  line-height: 0.62;
  color: var(--accent);
  padding: 10px 14px 0 0;
}

/* emphasis — two tiers, both rust */
/* strong: rust + brush display font */
.blog-body .brush {
  font-size: 1.35em;
  line-height: 1.1;
  vertical-align: -0.04em;
}
.blog-body .accent { color: var(--accent); }
/* soft: rust, normal font (.accent on its own) */

/* pull-quote */
.blog-body .pullquote {
  font-family: "MG Brush", "Caveat", "Bradley Hand", cursive;
  font-size: clamp(34px, 4.8vw, 56px);
  line-height: 0.98;
  text-align: center;
  color: var(--ink);
  max-width: none;
  margin: 1.6em auto;
  padding: 0.5em 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}

/* stat triptych */
.blog-body .stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(24px, 6vw, 72px);
  margin: 2.4em 0;
  text-align: center;
}
.blog-body .stat .num {
  display: block;
  font-family: "MG Brush", "Caveat", "Bradley Hand", cursive;
  font-size: clamp(56px, 10vw, 92px);
  line-height: 0.85;
  color: var(--accent);
}
.blog-body .stat .label {
  display: block;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* aside — italic rust, indented from the left */
.blog-body aside {
  margin: 1.6em 0 1.6em 2em;
  font-style: italic;
  font-size: 0.97em;
  line-height: 1.6;
  color: var(--accent);
}
.blog-body aside p { margin: 0; }
.blog-body aside p + p { margin-top: 0.8em; }

/* figure + captioned placeholder */
.blog-body figure {
  margin: 2.4em 0;
}
.blog-body figure .ph {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hair);
  background: #f1f0eb;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 9px,
    rgba(14, 14, 12, 0.05) 9px 10px
  );
}
.blog-body figure .ph .pill {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--hair);
  padding: 3px 8px;
}
.blog-body figcaption {
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 10px;
}

/* decorative divider */
.blog-body hr.orn {
  border: none;
  text-align: center;
  margin: 3em 0;
}
.blog-body hr.orn::after {
  content: "❧";
  font-family: "MG Brush", "Caveat", cursive;
  font-size: 28px;
  color: var(--accent);
}

/* numbered horsemen list */
.blog-body ol.horsemen {
  list-style: none;
  counter-reset: horseman;
  padding: 0;
  margin: 1.6em 0;
}
.blog-body ol.horsemen li {
  counter-increment: horseman;
  position: relative;
  padding: 14px 0 14px 64px;
  border-bottom: 1px solid var(--hair);
  min-height: 56px;
  display: flex;
  align-items: center;
}
.blog-body ol.horsemen li:first-child { border-top: 1px solid var(--hair); }
.blog-body ol.horsemen li::before {
  content: counter(horseman);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: "MG Brush", "Caveat", "Bradley Hand", cursive;
  font-size: 52px;
  line-height: 1;
  color: var(--accent);
  width: 48px;
  text-align: center;
}

/* ---------- strikethrough ---------- */

del,
.strike {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--ink);
}

.strike-thick {
  text-decoration: line-through;
  text-decoration-thickness: 4px;
  text-decoration-color: var(--ink);
}

.strike-rust {
  text-decoration: line-through;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--accent);
}

.strike-wavy {
  text-decoration: line-through wavy;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--ink);
}

.strike-wavy-rust {
  text-decoration: line-through wavy;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
}

.strike-double {
  text-decoration: line-through double;
  text-decoration-color: var(--ink);
}

.strike-scratch {
  position: relative;
  color: var(--ink-soft);
}
.strike-scratch::after {
  content: '';
  position: absolute;
  left: -1px;
  right: -1px;
  top: 48%;
  height: 10px;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 1px,
    var(--ink) 1px 2px,
    transparent 2px 4px,
    rgba(14,14,12,0.35) 4px 5px,
    transparent 5px 7px,
    var(--ink) 7px 8px,
    transparent 8px 10px
  );
  transform: translateY(-50%) rotate(-0.4deg);
  pointer-events: none;
}

/* ---------- workflow diagram ---------- */
.blog-body .wf { margin: 2.4em 0; }

.blog-body .wf-zone {
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.blog-body .wf-zone::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--rule);
}
.blog-body .wf-zone + .wf-zone,
.blog-body .wf-step + .wf-zone { margin-top: 28px; }

.blog-body .wf-step {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 22px;
  align-items: center;
}
.blog-body .wf-num {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  display: block;
}
.blog-body .wf-title {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  display: block;
  margin-top: 6px;
}
.blog-body .wf-art { min-width: 0; }

/* spacing between steps */
.blog-body .wf-arrow {
  height: 22px;
}

/* square placeholder override */
.blog-body figure .ph.wf-sq {
  width: 168px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
}

/* real image dropped into a .ph frame: fills it, keeps badges on top */
.blog-body .ph img, .blog-body .ph .wf-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border: 0;
}

/* filetype badge on a placeholder */
.blog-body .wf-filetype {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: var(--accent);
  padding: 3px 8px;
}

/* search box (step 02) */
.blog-body .wf-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: #fff;
}
.blog-body .wf-search svg { flex-shrink: 0; display: block; }
.blog-body .wf-search-q {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--ink);
}
.blog-body .wf-search-caret {
  width: 1px;
  height: 15px;
  background: var(--accent);
  animation: wf-blink 1.1s steps(1) infinite;
}
@keyframes wf-blink { 50% { opacity: 0; } }

/* node editor + applied (step 03) */
.blog-body .wf-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.blog-body .wf-nodes {
  flex: 1.5;
  min-width: 0;
  border: 1px solid var(--hair);
}
.blog-body .wf-nodes svg { display: block; width: 100%; height: auto; }
.blog-body .wf-applied { flex: 1; min-width: 0; }
.blog-body .wf-applied .ph { width: 100%; height: 100%; aspect-ratio: auto; }

/* unity mini-workflow (step 05) */
.blog-body .wf-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.blog-body .wf-mini-cell {
  flex: 1;
  min-width: 84px;
  text-align: center;
}
.blog-body .wf-mini-cell .ph {
  width: 100%;
  aspect-ratio: 1 / 1;
}
.blog-body .wf-mini-box {
  border: 1px solid var(--hair);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f7f3;
}
.blog-body .wf-mini-cap {
  font-family: "Geist Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 7px;
  line-height: 1.3;
}
.blog-body .wf-mini-arrow {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 14px;
}

@media (max-width: 900px) {
  .blog-body .wf-step {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .blog-body .wf-arrow { margin-left: 0; justify-content: center; }
  .blog-body .wf-row { flex-direction: column; }
}

/* ---------- BLOG ANIMATIONS ---------- */

@keyframes blog-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.blog-head time        { animation: blog-fade-up 400ms ease both; }
.blog-head .blog-title { animation: blog-fade-up 500ms ease 100ms both; }
.page-head .brush      { animation: blog-fade-up 400ms ease both; }

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 480ms ease, transform 480ms ease;
}
.reveal.visible { opacity: 1; transform: none; }

.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 100;
  transition: width 80ms linear;
  pointer-events: none;
}

.top-fade {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 18px;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
  z-index: 99;
  pointer-events: none;
}


/* ---------- utilities ---------- */

.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;
}


/* responsive */
@media (max-width: 900px) {
  /* tighten vertical rhythm on small screens */
  .topbar:has(+ .slogan) { margin-bottom: 36px; }
  .slogan { margin-bottom: 40px; }
  .landing-cta { margin-top: 48px; }

  /* --- games row becomes a horizontal snap carousel --- */
  .cards--pair { max-width: none; }
  .cards {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    height: auto;
    gap: 14px;

    /* full-bleed: cards can peek past the page padding */
    width: auto;
    margin-left: calc(var(--pad) * -1);
    margin-right: calc(var(--pad) * -1);
    /* inline padding = (100vw - card width) / 2 so the first card sits
       centered at scrollLeft=0, mirroring the right edge. Using vw (not %)
       so the math doesn't compete with the card's own % width. */
    padding: 6px 8vw 18px;

    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 8vw;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;

    /* one-time intro nudge to hint scrollability */
    animation: snap-nudge 1100ms 500ms cubic-bezier(.3,.7,.2,1.1) 1 both;
  }
  .cards::-webkit-scrollbar { display: none; width: 0; height: 0; }

  /* trailing sentinel — restores scroll-end padding that Chrome drops on
     horizontally scrolling flex containers, so the last card can scroll
     fully into view. */
  .cards::after {
    content: "";
    /* matches padding-inline so the last card has symmetric trailing space */
    flex: 0 0 8vw;
    align-self: stretch;
  }

  @keyframes snap-nudge {
    0%   { transform: translateX(0); }
    38%  { transform: translateX(-22px); }
    72%  { transform: translateX(7px); }
    100% { transform: translateX(0); }
  }

  .card {
    flex: 0 0 84vw;
    min-width: 0;
    max-width: none;
    /* FIXED height — prevents layout shift on activate, which was
       reflowing the row mid-snap and yanking scrollLeft back to center. */
    height: clamp(380px, 102vw, 540px);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    position: relative;
    display: block;       /* override desktop flex column */
    overflow: hidden;
    transition:
      opacity 360ms ease,
      box-shadow 320ms ease;
  }

  /* peeking neighbours quiet down so the active card reads as focused */
  .card:not(.is-active) { opacity: 0.62; }
  .card.is-active {
    opacity: 1;
    box-shadow: 0 14px 32px -22px rgba(14,14,12,0.45);
  }

  /* disable the desktop hover-grow behaviour on touch / small screens */
  .cards:has(.card:hover) .card,
  .cards:has(.card:hover) .card:hover,
  .cards:has(.card:focus-visible) .card,
  .cards:has(.card:focus-visible) .card:focus-visible { flex-grow: 0; }

  /* shot fills the entire card; card-info overlays its bottom edge */
  .card .shot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-bottom: none;
  }

  /* card-info is a unit pinned to the bottom; by default, translated DOWN
     by --info-shift so the .extra block sits past the card's clipping
     edge and only the title strip is visible. On .is-active it slides
     back to 0, dragging the extra info up into view. */
  .card-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--rule);
    padding: 14px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transform: translateY(var(--info-shift, 120px));
    transition: transform 620ms cubic-bezier(.22,.9,.28,1);
    will-change: transform;
  }
  .card.is-active .card-info {
    transform: translateY(0);
  }

  .card-info .title {
    font-size: 32px;
    white-space: normal;
    margin: 0;
  }

  /* reset the desktop grid-rows collapse trick — on mobile the extra
     is always rendered at its natural height. its visibility is
     controlled entirely by the parent's translateY. */
  .card-info .extra,
  .card:hover .card-info .extra,
  .card:focus-visible .card-info .extra {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 4px;
    transition: none;
  }
  .card-info .extra > .extra-inner {
    transform: none;
    transition: none;
  }

  .card-info .tag { font-size: 13.5px; }
  .card-info .row .open { font-size: 24px; }

  /* dot indicator below the carousel */
  .snap-dots {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 14px;
    padding: 4px;
  }
  .snap-dots button {
    appearance: none;
    border: none;
    background: var(--hair);
    width: 7px;
    height: 7px;
    padding: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: width 320ms cubic-bezier(.34,1.56,.64,1),
                background 200ms ease;
  }
  .snap-dots button.on {
    width: 24px;
    background: var(--ink);
  }
  .snap-dots button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
  }

  .about { grid-template-columns: 1fr; }
  .about .polaroid { max-width: 280px; margin: 0 auto 12px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .gp-body { grid-template-columns: 1fr; gap: 0; }
  .gp-side { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 32px; margin-top: 24px; }
  .features { grid-template-columns: 1fr; }
  .gp-title-block { grid-template-columns: 1fr; }
  .gp-title-block .right { text-align: left; }
  .thumbs { grid-template-columns: repeat(3, 1fr); }

  /* blog */
  .post-card { grid-template-columns: 1fr; gap: 18px; padding: 32px 0; }
  .post-card-title { font-size: clamp(34px, 9vw, 48px); }
  .post-thumb--polaroid { max-width: 320px; margin: 0 auto; }
  .blog-title { font-size: clamp(48px, 14vw, 80px); }
  .blog-body { font-size: 16px; }
  .blog-body h2 { font-size: clamp(34px, 10vw, 52px); }
  .blog-body .lead::first-letter { font-size: 3.6em; padding: 8px 10px 0 0; }
  .blog-body .pullquote { font-size: clamp(30px, 8vw, 44px); }
  .blog-body .stats { gap: 28px; }
  .blog-body .stat .num { font-size: clamp(48px, 16vw, 72px); }
  .blog-body ol.horsemen li { padding-left: 52px; }
  .blog-body ol.horsemen li::before { font-size: 42px; width: 40px; }
}

/* respect users who prefer no motion (mobile carousel) */
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .cards { animation: none; }
  .card { transition: none; }
  .snap-dots button { transition: background 120ms linear; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-head time,
  .blog-head .blog-title,
  .page-head .brush { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
