/* ==========================================================================
   Black Heart Games — site styles
   Edit the tokens below to restyle the whole site.
   ========================================================================== */

:root {
  /* Colors */
  --color-bg: #2a1f27;               /* page background */
  --color-bg-footer: #231a20;
  --color-surface: #392b35;          /* cards */
  --color-border: #4d3b47;
  --color-heading: #E0D6CE;          /* "lightest light": headers */
  --color-body: #9A919B;             /* body text on the page background */
  --color-body-on-surface: #ABA3AC;  /* body text on cards (a touch lighter for contrast) */
  --color-accent: #B6607C;           /* eyebrows and accents */
  --color-sage: #7a9c96;
  --color-slate: #486b7f;
  --color-tan: #d1bfb0;
  --color-cream: #f4ece5;
  --color-ink: #2a1f27;              /* dark text on light buttons and tags */

  /* Fonts */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;

  /* Pixel art scale: how many screen pixels one art pixel takes up */
  --px-button: 3;
  --px-frame: 4;
  --px-logo: 3;      /* the big logo is 94 art pixels tall; 3 keeps every pixel crisp */

  /* Layout */
  --max-width: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-body);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--color-sage); }
a:hover { color: #a9c4be; }
:focus-visible { outline: 3px solid var(--color-sage); outline-offset: 3px; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-heading);
  color: var(--color-heading);
  letter-spacing: -0.02em;
}

p { margin: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--color-sage);
  color: var(--color-ink);
  font-weight: 800;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ---------- Header ---------- */

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--color-heading);
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; image-rendering: pixelated; }  /* 15 art pixels x 2 */
.brand span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.nav { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--color-body-on-surface);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.nav a:hover { color: var(--color-heading); text-decoration: underline; }

/* ---------- Pixel buttons ----------
   Each button image is 85x20 art pixels: 4px left cap, a stretchy middle,
   4px right cap. Change --px-button to make every button bigger or smaller. */

.pixel-btn {
  --s: var(--px-button);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--s) * 20px);
  max-width: 100%;
  padding: 0 calc(var(--s) * 4px);
  border-style: solid;
  border-width: 0 calc(var(--s) * 4px);
  border-image-slice: 0 4 0 4 fill;
  border-image-width: 0 calc(var(--s) * 4px) 0 calc(var(--s) * 4px);
  border-image-repeat: stretch;
  image-rendering: pixelated;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.pixel-btn span { display: inline-block; }
.pixel-btn:active span { transform: translateY(calc(var(--s) * 1px)); }

.pixel-btn--cta {
  border-image-source: url(assets/btn-cta-normal.png);
  color: var(--color-ink);
}
.pixel-btn--cta:hover,
.pixel-btn--cta:focus-visible {
  border-image-source: url(assets/btn-cta-hover.png);
  color: var(--color-ink);
}
.pixel-btn--cta:active {
  border-image-source: url(assets/btn-cta-press.png);
  color: #1e1520;
}

.pixel-btn--secondary {
  border-image-source: url(assets/btn-secondary-normal.png);
  color: var(--color-heading);
}
.pixel-btn--secondary:hover,
.pixel-btn--secondary:focus-visible {
  border-image-source: url(assets/btn-secondary-hover.png);
  color: var(--color-cream);
}
.pixel-btn--secondary:active {
  border-image-source: url(assets/btn-secondary-press.png);
  color: var(--color-cream);
}

.button-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 80% 20%, #4a3643 0%, var(--color-surface) 38%, var(--color-bg) 75%);
}
.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-block: clamp(40px, 7vw, 96px);
}

.hero-copy {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 600;
  line-height: 1.04;
}
.lede {
  max-width: 520px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.6;
}
.hero .button-row { margin-top: 8px; }

.hero-art {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

/* The pixel frame is a 9-slice: 6px corners, stretchy edges and middle */
.pixel-frame {
  --w: calc(var(--px-frame) * 6px);
  position: relative;
  width: min(100%, 480px);   /* the box: about 15% smaller than before */
  min-height: 390px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--w) solid transparent;
  border-image: url(assets/frame.png) 6 fill / var(--w) / 0 stretch;
  image-rendering: pixelated;
}
/* Pixel glow behind the logo: a dithered sprite sheet (4 frames, 108x86 art pixels each)
   that steps through a slow pulse, so it stays crisp like the rest of the pixel art. */
.glow {
  --gw: calc(108 * var(--px-frame) * 1px);
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--gw);
  height: calc(86 * var(--px-frame) * 1px);
  transform: translate(-50%, -50%);
  background: url(assets/glow.png) 0 0 / calc(var(--gw) * 4) 100% no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
  animation: glow-pulse 4.8s steps(4) infinite;
}
@keyframes glow-pulse {
  from { background-position-x: 0; }
  to   { background-position-x: calc(var(--gw) * -4); }
}

.hero-logo {
  position: relative;
  height: calc(94px * var(--px-logo));
  width: auto;
  image-rendering: pixelated;
  
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head h2 {
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 600;
  line-height: 1.1;
}
.section-head p { font-size: 19px; }

/* ---------- Game showcases ---------- */

.games-intro { padding-bottom: 8px; }
.games-intro .section-head { margin-bottom: 24px; }
.showcase {
  --mood: var(--color-bg);
  padding-block: clamp(48px, 7vw, 96px);
  background: var(--mood);
  scroll-margin-top: 0;
}
.showcase--plink {
  --mood: #2b2140;
  background:
    linear-gradient(270deg, rgba(36, 26, 56, 0.86) 0%, rgba(36, 26, 56, 0.7) 38%, rgba(36, 26, 56, 0.15) 75%, rgba(36, 26, 56, 0.05) 100%),
    url(assets/games/plinkidle-banner.webp) center bottom / cover no-repeat,
    var(--mood);
}
.game-logo { display: block; width: min(100%, 420px); height: auto; }
.showcase--messy { --mood: #213230; }
.showcase--rombo { --mood: #3a2624; }
.showcase--rats  { --mood: #2e2229; }
.games-intro + .showcase { margin-top: 40px; }

.showcase-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.showcase--flip .showcase-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.art-link { display: contents; }
.showcase--flip .showcase-art { order: 2; }

/* Every game's art sits in the same pixel frame as the hero logo.
   The media runs right up to the frame's inner edge, with pixel-notched corners. */
.showcase-art {
  --w: calc(var(--px-frame) * 6px);
  --u: calc(var(--px-frame) * 1px);
  position: relative;
  padding: 0;
  border: var(--w) solid transparent;
  border-image: url(assets/frame.png) 6 fill / var(--w) / 0 stretch;
  image-rendering: pixelated;
}
.showcase-art > img,
.showcase-art > video,
.showcase-art .rombo-scene,
.showcase-art .art-soon,
.showcase-art .slab-body {
  display: block;
  position: relative;
  /* grow outward over the frame's inner aubergine margin (3 art pixels each side) */
  width: calc(100% + var(--u) * 6);
  margin: calc(var(--u) * -3);
  height: auto;
  aspect-ratio: 16 / 9;
  image-rendering: auto;
  clip-path: polygon(
    calc(100% - var(--u) * 3) calc(var(--u) * 0),
    calc(100% - var(--u) * 3) calc(var(--u) * 1),
    calc(100% - var(--u) * 2) calc(var(--u) * 1),
    calc(100% - var(--u) * 2) calc(var(--u) * 2),
    calc(100% - var(--u) * 1) calc(var(--u) * 2),
    calc(100% - var(--u) * 1) calc(var(--u) * 3),
    calc(100% - var(--u) * 0) calc(var(--u) * 3),
    calc(100% - var(--u) * 0) calc(100% - var(--u) * 3),
    calc(100% - var(--u) * 1) calc(100% - var(--u) * 3),
    calc(100% - var(--u) * 1) calc(100% - var(--u) * 2),
    calc(100% - var(--u) * 2) calc(100% - var(--u) * 2),
    calc(100% - var(--u) * 2) calc(100% - var(--u) * 1),
    calc(100% - var(--u) * 3) calc(100% - var(--u) * 1),
    calc(100% - var(--u) * 3) calc(100% - var(--u) * 0),
    calc(var(--u) * 3) calc(100% - var(--u) * 0),
    calc(var(--u) * 3) calc(100% - var(--u) * 1),
    calc(var(--u) * 2) calc(100% - var(--u) * 1),
    calc(var(--u) * 2) calc(100% - var(--u) * 2),
    calc(var(--u) * 1) calc(100% - var(--u) * 2),
    calc(var(--u) * 1) calc(100% - var(--u) * 3),
    calc(var(--u) * 0) calc(100% - var(--u) * 3),
    calc(var(--u) * 0) calc(var(--u) * 3),
    calc(var(--u) * 1) calc(var(--u) * 3),
    calc(var(--u) * 1) calc(var(--u) * 2),
    calc(var(--u) * 2) calc(var(--u) * 2),
    calc(var(--u) * 2) calc(var(--u) * 1),
    calc(var(--u) * 3) calc(var(--u) * 1),
    calc(var(--u) * 3) calc(var(--u) * 0)
  );
}
.showcase-art > img, .showcase-art > video { object-fit: cover; }
.showcase-art .art-soon { display: flex; }

.showcase-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.showcase-copy h1,
.showcase-copy h3 {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.04;
}
.showcase-copy .hook { font-size: 20px; line-height: 1.6; color: var(--color-body-on-surface); max-width: 520px; }
.showcase-copy .note { font-size: 15px; font-weight: 700; color: var(--color-sage); }
.showcase-copy .button-row { margin-top: 8px; }

.pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pill--tan   { background: var(--color-tan);   color: var(--color-ink); }
.pill--sage  { background: var(--color-sage);  color: var(--color-ink); }
.pill--slate { background: var(--color-slate); color: #ffffff; }
.pill--cream { background: var(--color-cream); color: var(--color-ink); }

/* Rombo: layered scene (all layers share one canvas, so they stack exactly) */
.showcase--rombo .rombo-scene { aspect-ratio: 1600 / 1064; overflow: hidden; }
.rombo-scene .layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 0.6s ease-out;
}
.rombo-scene .layer--bg { transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.06); }
.rombo-scene .layer--logo { inset: auto auto 3% 3%; width: 46%; height: auto; }
.showcase--messy .rombo-scene { aspect-ratio: 1400 / 788; overflow: hidden; }
.mh-scene .layer--florence { inset: auto 0 -3% auto; width: auto; height: 113%; object-fit: contain; object-position: right bottom; animation: sway 6s ease-in-out infinite; }
.mh-scene .layer--logo { inset: auto auto 24% 4%; width: 50%; height: auto; }
@keyframes sway { 0%, 100% { margin-bottom: 0; } 50% { margin-bottom: 3px; } }
.rombo-scene .layer--robot  { animation: bob 4.2s ease-in-out infinite; }
.rombo-scene .layer--skippy { animation: bob 3.1s ease-in-out -1.2s infinite; }
@keyframes bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -5px; } }

/* Rat's Revenge: placeholder until key art exists */
.art-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #21171d;
  color: var(--color-tan);
  font-weight: 700;
}

@media (max-width: 900px) {
  .showcase-inner,
  .showcase--flip .showcase-inner { grid-template-columns: minmax(0, 1fr); }
  .showcase--flip .showcase-art { order: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rombo-scene .layer { transition: none; animation: none !important; }
}

/* ---------- Promise / About ---------- */

.about .container { display: flex; flex-direction: column; gap: 56px; }

.promise {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 24px;
  max-width: 860px;
  padding: clamp(20px, 3vw, 32px);
  border-radius: 20px;
  background: #4a3643;
}
.promise-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-surface);
}
.promise-icon svg { width: 28px; height: 28px; }
.promise-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.promise .eyebrow { margin: 0; font-size: 12px; letter-spacing: 0.1em; color: var(--color-tan); }
.promise-text p { margin: 0; font-size: 15px; line-height: 1.6; color: #cfc4cc; }
.promise-text .promise-lead { font-size: 15px; color: #e6dde3; }
.promise-text a { color: var(--color-tan); font-weight: 700; }
@media (max-width: 520px) { .promise { flex-direction: column; gap: 14px; } }

.values { display: flex; flex-wrap: wrap; gap: 32px; }
.value {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 2px solid var(--color-sage);
}
.value h3 { font-size: 24px; font-weight: 600; }
.value p { font-size: 17px; color: var(--color-body); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-bg-footer);
  border-top: 1px solid var(--color-border);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-block: clamp(48px, 6vw, 80px);
}
.footer-contact { display: flex; flex-direction: column; gap: 12px; }
.footer-contact h2 { font-size: clamp(32px, 4vw, 44px); font-weight: 600; }
.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 20px;
  font-weight: 800;
}
.social { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glow { animation: none; background-position-x: calc(var(--gw) * -1); }
  .card { transition: none; }
  .card:hover { transform: none; }
  .pixel-btn:active span { transform: none; }
}

/* ===== Fireflies: 13-frame 32x48 sprite, plays once per spawn (rise + twinkle) ===== */
.fireflies { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.firefly {
  --fs: 3;
  position: absolute;
  width: calc(32px * var(--fs));
  height: calc(48px * var(--fs));
  background: url(assets/firefly.png) 0 0 / calc(32px * 13 * var(--fs)) 100% no-repeat;
  image-rendering: pixelated;
  opacity: 0.5;
  filter: drop-shadow(0 0 6px rgba(182, 96, 124, 0.55)) drop-shadow(0 0 14px rgba(182, 96, 124, 0.35));
  animation: firefly-rise var(--dur, 1.45s) steps(13) forwards;
}
@keyframes firefly-rise {
  from { background-position-x: 0; }
  to   { background-position-x: calc(32px * -13 * var(--fs)); }
}
@media (prefers-reduced-motion: reduce) { .fireflies { display: none; } }

/* ---------- Game pages and About ---------- */

.section--tight { padding-top: 0; }
.game-hero { padding-block: clamp(40px, 6vw, 80px); }

.prose { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.prose p { margin: 0; font-size: 20px; line-height: 1.7; color: var(--color-body-on-surface); }

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.shots .shot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
  border: 4px solid var(--color-border);
  color: var(--color-tan);
  font-weight: 700;
  text-align: center;
  padding: 12px;
}
.back { margin: 40px 0 0; font-weight: 700; }

.about-intro .container { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.about-intro h1 { font-size: clamp(38px, 5.5vw, 68px); font-weight: 600; line-height: 1.05; max-width: 16ch; }
.about-intro .lede { max-width: 640px; }

.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 28px;
  border-radius: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.person h3 { font-size: 28px; font-weight: 600; }
.person .role { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-sage); }
.person p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--color-body-on-surface); }
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 3px solid var(--color-border);
  font-size: 56px;
  line-height: 1;
  object-fit: cover;
}
img.avatar { display: block; width: 140px; height: 140px; }
.person p a { color: var(--color-sage); font-weight: 700; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .shots { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .site-header .container { flex-wrap: nowrap; gap: 8px; }
  .brand { gap: 8px; }
  .brand span { font-size: 15px; }
  .nav { flex-wrap: nowrap; gap: 0; }
  .nav a { padding: 0 6px; font-size: 14px; }
}

/* PlinkIdle page extras: gallery, lightbox, fact sheet */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 32px; margin: 0; }
.facts > div { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 2px solid var(--color-border); }
.facts .facts-wide { grid-column: 1 / -1; }
.facts dt { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-sage); }
.facts dd { margin: 0; font-size: 19px; color: var(--color-heading); }
.press { margin: 28px 0 0; font-size: 17px; }

/* Gallery: a tinted band, one big feature shot, hover frame, dimming of the others */
.gallery-band {
  padding-block: clamp(48px, 7vw, 96px);
  background: linear-gradient(180deg, #2b2140 0%, #221a33 100%);
  margin-block: clamp(24px, 4vw, 48px);
}
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.shot-link {
  position: relative;
  display: block;
  line-height: 0;
  background: var(--color-surface);
  outline-offset: 10px;
  transition: transform 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}
.shot-link--feature { grid-column: span 2; grid-row: span 2; }
.shot-link img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
/* the pixel frame, drawn around the thumbnail (outside it) when you hover or focus */
.shot-link::after {
  content: "";
  position: absolute;
  inset: -12px;
  border: 12px solid transparent;
  border-image: url(assets/frame.png) 6 / 12px / 0 stretch;
  image-rendering: pixelated;
  opacity: 0;
  pointer-events: none;
}
.shot-link:hover, .shot-link:focus-visible { transform: scale(1.025); z-index: 2; }
.shot-link:hover::after, .shot-link:focus-visible::after { opacity: 1; }
.gallery:hover .shot-link:not(:hover):not(:focus-visible) { opacity: 0.6; filter: saturate(0.7); }
.shot-link .cap {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 10px;
  background: var(--color-ink);
  color: var(--color-cream);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}
.shot-link--feature .cap { font-size: 14px; padding: 7px 12px; left: 14px; bottom: 14px; }

/* Lightbox (a native <dialog>) */
.lightbox {
  width: min(1100px, 96vw);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-heading);
  overflow: visible;
}
.lightbox::backdrop { background: rgba(18, 12, 24, 0.9); }
.lb-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lb-frame { width: min(100%, calc((100vh - 250px) * 1.7778 + 48px)); width: min(100%, calc((100dvh - 250px) * 1.7778 + 48px)); }
.lb-frame > img { aspect-ratio: 16 / 9; }
.lb-caption { margin: 0; font-weight: 800; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-tan); }
.lb-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; }
.lb-count { min-width: 56px; text-align: center; font-weight: 800; color: var(--color-heading); }
button.pixel-btn { appearance: none; -webkit-appearance: none; margin: 0; background-color: transparent; font-family: var(--font-body); }
button.pixel-btn--secondary { color: var(--color-heading); }

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .shot-link--feature { grid-row: auto; }
}
@media (max-width: 520px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .shot-link--feature { grid-column: auto; }
  .lb-controls .pixel-btn { --s: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .shot-link, .shot-link::after { transition: none; }
  .shot-link:hover, .shot-link:focus-visible { transform: none; }
}

/* Feature reel: a framed slab per feature, animated clip on top and your text banner underneath */
.reel { display: flex; flex-direction: column; gap: 40px; max-width: 1040px; margin-inline: auto; }
.reel .slab { margin: 0; }
.showcase-art .slab-body { aspect-ratio: auto; background: #1d1526; }
.slab-body video, .slab-body .feature-still { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; }
.slab-body .slab-banner { display: block; width: 100%; height: auto; image-rendering: auto; }

/* Messy Hearts page */
.pill--ink { background: #2a2e2a; color: var(--color-cream); }
.mh-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 560px;
  padding-block: clamp(32px, 5vw, 64px);
  background: #b8c79a url(assets/games/messy/bg.webp) center / cover no-repeat;
  color: #26302c;
}
.mh-florence {
  position: absolute;
  right: max(-40px, calc((100vw - 1200px) / 2 - 60px));
  bottom: 0;
  height: 112%;
  width: auto;
  max-width: 54%;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
}
.mh-hero-inner { position: relative; z-index: 1; }
.mh-hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 470px; }
.mh-logo { display: block; width: min(100%, 460px); height: auto; }
.mh-hero .hook { margin: 0; font-size: 21px; line-height: 1.55; color: #26302c; font-weight: 600; }
.mh-hero .note { margin: 0; font-size: 15px; font-weight: 800; color: #3a4a44; }
.mh-hero .pixel-btn--secondary { color: var(--color-heading); }

.mh-features { display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 1000px; margin-inline: auto; }
.mh-banner { display: block; max-width: 100%; height: auto; transition: transform 0.18s ease; }
.mh-banner:hover { transform: translateX(6px); }
.mh-banner--static:hover { transform: none; }
.mh-features { gap: 26px; }
.mh-text { width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 14px; }
.mh-text p { margin: 0; font-size: 19px; line-height: 1.7; color: var(--color-body-on-surface); }
.mh-text h3 { margin: 10px 0 0; font-size: 26px; color: var(--color-sage, #8FB0A0); }

.watch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.watch-item { display: flex; flex-direction: column; gap: 12px; }
.watch-label { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-tan); }
.gallery-band--messy { background: linear-gradient(180deg, #1f2d2b 0%, #1a2423 100%); }

@media (max-width: 900px) {
  .mh-hero { flex-direction: column; align-items: stretch; min-height: 0; padding-bottom: 0; }
  .mh-florence { position: relative; right: auto; height: auto; width: min(100%, 420px); max-width: none; align-self: flex-end; margin: 12px 0 0 auto; }
  .watch-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .mh-banner { transition: none; } .mh-banner:hover { transform: none; } }

/* Game pages: about cards (2 columns): clip + banner on top, text below */
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
.about-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; }
.about-card:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 12px); justify-self: center; }
.about-card p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--color-body-on-surface); }
.card-media { overflow: hidden; border-radius: 8px; background: #1d1526; }
.card-media video, .card-media .feature-still { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; }
.card-media .slab-banner { display: block; width: 100%; height: auto; }
.about-lead { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 36px; text-align: center; }
.about-lead p { margin: 0; max-width: 620px; font-size: 18px; line-height: 1.65; color: var(--color-body-on-surface); }
.about-divider { margin: 40px auto 0; max-width: 100%; height: auto; }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-card:last-child:nth-child(odd) { width: auto; }
}
#trailer { padding-top: clamp(32px, 5vw, 56px); }
.card-media { background: transparent; }
.card-media:has(video, .feature-still) { background: #1d1526; }
