/* Layout: one quiet column, imagery does the talking; nav is small type in a thin top bar.
   Light theme only, by choice. Change colours and fonts here. */
/* Game title fonts (assets/fonts). Each is used only for the game titles set to it in the admin panel. */
@font-face {
  font-family: "Super Bouncer";
  src: url("../assets/fonts/super-bouncer.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/poppins-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F6F6F5;      /* page background, a light warm grey */
  --surface: #FFFFFF;    /* cards, dropdown */
  --bar: #EBEBE9;        /* top bar and game page sections, a little darker than the page */
  --band: var(--bar);    /* game page band below the trailer */
  --band-shots: var(--band); /* screenshot section */
  --ink: #1C1C1E;        /* main text, matches the black in the wordmark */
  --ink-2: #626367;      /* secondary text, from the cube's grey side */
  --line: #E2E2E1;       /* hairlines */
  --accent: #D61920;     /* brand red from the logo (slightly deeper for readable links) */
  --accent-ink: #FFFFFF;
  --red: #EC1C24;        /* exact logo red */

  --f-display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
/* Game title fonts: Super Bouncer for Mom Simulator, Poppins SemiBold for Farming Simulator */
.font-bouncer { font-family: "Super Bouncer", var(--f-display); font-weight: 400; letter-spacing: 0.01em; }
.font-poppins { font-family: "Poppins", var(--f-display); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { font: 400 12px/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-2); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); }
.text-link { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; font-weight: 600; }
.sel { user-select: all; font-family: var(--f-mono); font-size: 15px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bar) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid #D2D2D0;
}
.topbar-in { max-width: var(--max); margin-inline: auto; padding: 14px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo-icon { height: 40px; width: auto; }
.logo-text { height: 32px; width: auto; }
.logo-word { font: 700 19px/1 var(--f-display); letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font: 500 14px/1 var(--f-body); color: var(--ink-2); text-decoration: none;
  padding: 10px 12px; border-radius: var(--radius); background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: color .15s;
}
.nav-link svg { width: 12px; height: 12px; transition: transform .2s; }
.nav-link { font-weight: 700; }
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link.active { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-toggle { display: none; }

/* Games dropdown */
.dd { position: relative; }
.dd-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, -4px);
  list-style: none; margin: 0; padding: 8px; width: 260px;
  max-height: min(400px, calc(100vh - 100px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 18px 40px -18px rgba(28, 28, 30, .25);
  opacity: 0; visibility: hidden; transition: opacity .16s, transform .16s, visibility .16s;
}
.dd.open .dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-menu a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius); text-decoration: none; }
.dd-menu a:hover, .dd-menu a:focus-visible { background: var(--paper); }
.dd-thumb { width: 40px; height: 40px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); background-size: cover; background-position: center; flex: none; }
.dd-text { display: flex; flex-direction: column; min-width: 0; }
.dd-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.dd-meta { font: 400 11px/1.4 var(--f-mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.dd-all { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.dd-all a { font-size: 13px; color: var(--accent); font-weight: 600; }

/* ---------- Home ---------- */
main { display: block; min-height: 70vh; outline: none; }
.hero { padding-block: clamp(64px, 8vw, 100px) clamp(28px, 4vw, 44px); display: grid; gap: 30px; }
/* Home intro (like Playdead): a bold paragraph under the top bar, across the full width with both edges lined up.
   The size is set so the intro fills about 4 lines on a computer screen. */
.hero h1 { font: 700 clamp(15px, 1.4vw, 18px)/1.65 var(--f-body); letter-spacing: 0; max-width: none; text-align: justify; text-wrap: pretty; }
/* On phones a justified line has too few words and leaves big gaps, so it lines up on the left there */
@media (max-width: 600px) { .hero h1 { text-align: left; } }
.feature { padding-block: 8px clamp(48px, 7vw, 88px); }
.feature-link { display: grid; gap: 20px; text-decoration: none; color: var(--ink); }
.feature-img { border-radius: var(--radius); overflow: hidden; }
.feature-img { aspect-ratio: 16 / 9; max-width: 100%; background: var(--line); }
.feature-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.feature-link:hover .feature-img:not(.ks) img { transform: scale(1.025); }
.feature-img.ks { position: relative; }
.ks-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 2.4s ease-in-out !important; will-change: transform, opacity; }
.ks-slide.on { opacity: 1; z-index: 1; }
.ks-slide.prev { opacity: 0; z-index: 0; }
/* Slow zoom and pan, in a different direction for each picture */
.ks-slide.on, .ks-slide.prev { animation: ks-a 11s ease-out both; }
.ks-slide:nth-child(4n+2).on, .ks-slide:nth-child(4n+2).prev { animation-name: ks-b; }
.ks-slide:nth-child(4n+3).on, .ks-slide:nth-child(4n+3).prev { animation-name: ks-c; }
.ks-slide:nth-child(4n+4).on, .ks-slide:nth-child(4n+4).prev { animation-name: ks-d; }
@keyframes ks-a { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-2.5%, -1.5%); } }
@keyframes ks-b { from { transform: scale(1.14) translate(2.5%, 1%); } to { transform: scale(1.03) translate(0, 0); } }
@keyframes ks-c { from { transform: scale(1.03) translate(1.5%, -1%); } to { transform: scale(1.15) translate(2.5%, 1.5%); } }
@keyframes ks-d { from { transform: scale(1.15) translate(-2%, 1.5%); } to { transform: scale(1.04) translate(1%, 0); } }
@media (prefers-reduced-motion: reduce) { .ks-slide.on, .ks-slide.prev { animation: none; } }
.feature-cap { display: grid; gap: 8px; }
.feature-cap h2 { font-size: clamp(28px, 4.4vw, 56px); }
.feature-cap p { max-width: 50ch; color: var(--ink-2); }
.feature-cap .text-link { justify-self: start; margin-top: 4px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.section-head h2 { font-size: clamp(22px, 2.4vw, 28px); }
.count { font: 400 12px/1 var(--f-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
#games-list { padding-bottom: clamp(56px, 8vw, 104px); scroll-margin-top: 80px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(24px, 3vw, 40px) clamp(20px, 2.4vw, 32px); }
.game-card { text-decoration: none; display: grid; gap: 14px; }
.game-card-img { aspect-ratio: 16 / 10; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--line); }
.game-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.game-card:hover .game-card-img img { transform: scale(1.04); }
.card-slides { position: relative; }
.card-track { display: flex; height: 100%; transition: transform .6s ease; }
.card-track img { flex: 0 0 100%; }
.game-card:hover .card-slides img { transform: none; }
.card-dots { display: flex; justify-content: center; gap: 7px; margin-top: -4px; min-height: 8px; }
.game-card { align-content: start; }
.card-dot { width: 7px; height: 7px; border-radius: 50%; background: #C9C9C7; transition: background .3s, transform .3s; }
.card-dot.on { background: var(--accent); transform: scale(1.15); }
.game-card-body { display: grid; gap: 4px; min-width: 0; }
.game-card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.game-card h3 { font-size: 22px; }
.game-card p { color: var(--ink-2); }
.game-card .meta { font: 400 12px/1.5 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; }
.pill { font: 400 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; padding: 6px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); white-space: nowrap; }
.pill-soft { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Game page ---------- */
.game-head { padding-block: clamp(36px, 6vw, 72px) clamp(24px, 4vw, 40px); display: grid; gap: 14px; }
.game-head h1 { font-size: clamp(44px, 8vw, 104px); }
.back { font: 400 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); text-decoration: none; justify-self: start; margin-bottom: 10px; }
.back::before { content: "\2190  "; }
.back:hover { color: var(--ink); }
.video { aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: #0d1111; position: relative; }
.video iframe, .video video { width: 100%; height: 100%; border: 0; display: block; }
.video-empty { background-size: cover; background-position: center; display: grid; place-items: center; }
.play { width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.92); position: relative; }
.play::after { content: ""; position: absolute; left: 34px; top: 26px; border-left: 24px solid var(--ink); border-top: 16px solid transparent; border-bottom: 16px solid transparent; }
.video-note { position: absolute; bottom: 16px; left: 18px; font: 400 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.9); }

/* Game hero: trailer banner whose edges fade into the page (Play Store style) */
.game-hero { position: relative; max-width: 1680px; margin-inline: auto; }
.hero-media {
  position: relative; overflow: hidden; container-type: size;
  width: 76%; margin-left: auto; aspect-ratio: 16 / 9; max-height: 80vh;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.35) 18%, #000 42%, #000 90%, transparent 100%), linear-gradient(to bottom, #000 62%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.35) 18%, #000 42%, #000 90%, transparent 100%), linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-composite: intersect;
}
.hero-poster, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.hero-video {
  inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: max(100%, 177.78cqh); height: max(100%, 56.25cqw);
  pointer-events: none; opacity: 0; transition: opacity .8s;
}
video.hero-video { width: 100%; height: 100%; }
.hero-media.live .hero-video { opacity: 1; }
.hero-play {
  position: absolute; left: 60%; top: 46%; transform: translate(-50%, -50%); z-index: 2;
  display: grid; justify-items: center; gap: 12px; color: #fff; text-decoration: none;
}
.hero-play:hover .player-btn { transform: scale(1.07); }
.hero-media.playing .hero-poster, .hero-media.playing .hero-play { display: none; }
.hero-media.playing .hero-video {
  top: 0; left: 0; transform: none; width: 100%; height: 100%; opacity: 1; pointer-events: auto; background: #000;
}
.hero-media.playing {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%);
}
/* Muted autoplay: video replaces the wallpaper but keeps the same soft fades */
.hero-media.ambient .hero-poster, .hero-media.ambient .hero-play { display: none; }
.hero-media.ambient .hero-video { top: 0; left: 0; transform: none; width: 100%; height: 100%; opacity: 1; pointer-events: none; }
.game-hero .hero-info { transition: opacity .3s; }
.game-hero.is-playing .hero-info { opacity: 0; pointer-events: none; }
.game-hero.is-playing .hero-info-in { pointer-events: none; }
.hero-video iframe, .hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hero-media.playing .hero-video video { object-fit: contain; }
.hero-info { position: absolute; inset: 0; display: flex; align-items: flex-end; pointer-events: none; }
.hero-info-in {
  pointer-events: auto; display: grid; gap: 14px; justify-items: start;
  width: min(520px, 40%); padding: 0 0 clamp(64px, 7vw, 104px) var(--gutter);
  margin-left: max(0px, calc((100% - var(--max)) / 2));
}
.hero-info h1 { font-size: clamp(40px, 4.6vw, 76px); }
.hero-info-in { text-shadow: 0 0 18px var(--paper), 0 0 6px var(--paper); }
.hero-info .lead { color: var(--ink); max-width: 34ch; }
.hero-info .back { margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; align-items: center; }
.btn-trailer {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px 14px 18px; border: 0; border-radius: 99px;
  background: var(--accent); color: #fff; font: 600 15px/1 var(--f-body); text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(214, 25, 32, .7); transition: transform .15s, background .15s;
}
.btn-trailer svg { width: 20px; height: 20px; }
.hero-actions { text-shadow: none; }
.btn-trailer:hover { transform: translateY(-1px); background: var(--ink); }
.stores-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stores-row .store { padding: 10px 14px; }
.trailer-modal { position: fixed; inset: 0; z-index: 95; background: rgba(12, 12, 14, .94); display: grid; place-items: center; padding: 56px 16px; }
.trailer-frame { width: min(1280px, 100%, calc((100vh - 120px) * 16 / 9)); aspect-ratio: 16 / 9; }
.trailer-frame iframe, .trailer-frame video { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #000; }

.trailer-wrap { padding-block: clamp(32px, 5vw, 64px) 0; }
.player { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; }
.player-poster, .player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.player video { object-fit: contain; }
.player-play { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-decoration: none; color: #fff; background: rgba(10, 10, 12, .28); transition: background .2s; }
.player-play:hover { background: rgba(10, 10, 12, .12); }
.player-btn { width: 88px; height: 88px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 14px 32px -10px rgba(0,0,0,.55); transition: transform .2s; }
.player-btn svg { width: 38px; height: 38px; margin-left: 4px; }
.player-play:hover .player-btn { transform: scale(1.06); }
.player-label { font: 600 15px/1 var(--f-body); letter-spacing: .02em; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.shots-wrap { padding-block: clamp(24px, 3.5vw, 40px) 0; }
/* Darker band from the screenshots down to the footer; its top edge is the fine line */
.game-body { margin-top: clamp(40px, 6vw, 72px); background: var(--band); border-top: 1px solid #CFCFCD; }
.game-body .shots-wrap::after, .game-body .next a, .game-body .facts div { border-color: #D2D2D0; }
.game-body .shots-wrap::after { background: #D2D2D0; }
/* Screenshot section: darker still, full width, ending at the line below the screenshots */
.game-body .shots-wrap { background: var(--band-shots); box-shadow: 0 0 0 100vmax var(--band-shots); clip-path: inset(0 -100vmax); }
/* Fine divider line above the trailer and the screenshots */
.trailer-wrap::before { content: ""; display: block; height: 1px; background: #CFCFCD; margin-bottom: clamp(24px, 3.5vw, 40px); }
.shots-wrap::after { content: ""; display: block; height: 1px; background: #CFCFCD; margin-top: clamp(32px, 4.5vw, 56px); }
.slider { display: grid; gap: 12px; outline: none; }
.slider:focus-visible .slider-view { outline: 2px solid var(--accent); outline-offset: 3px; }
.slider-view { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--line); aspect-ratio: 16 / 9; max-width: 100%; }
.slider-track { display: flex; height: 100%; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.slide { flex: 0 0 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.35); transition: background .15s, color .15s, transform .15s;
}
.slider-btn svg { width: 22px; height: 22px; }
.slider-btn:hover { background: var(--accent); color: #fff; }
.slider-btn:active { transform: translateY(-50%) scale(.94); }
.slider-prev { left: 16px; }
.slider-next { right: 16px; }
.slider-count { position: absolute; right: 14px; bottom: 12px; padding: 6px 10px; border-radius: 99px; background: rgba(20,20,22,.7); color: #fff; font: 400 12px/1 var(--f-mono); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.thumb { flex: 0 0 120px; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 4px; overflow: hidden; cursor: pointer; opacity: .55; outline: 2px solid transparent; outline-offset: -2px; transition: opacity .15s, outline-color .15s; background: var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: .85; }
.thumb.on { opacity: 1; outline-color: var(--accent); }

.about { padding-block: clamp(48px, 7vw, 88px); display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-text { display: grid; gap: 16px; max-width: 65ch; min-width: 0; }
.about-text h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 4px; }
.features { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.features li { padding-left: 22px; position: relative; }
.features li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 2px; background: var(--accent); }
.facts { border-top: 2px solid var(--ink); padding-top: 18px; display: grid; gap: 20px; position: sticky; top: 90px; }
.facts dl { margin: 0; display: grid; gap: 0; }
.facts dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 400 12px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.get { font-size: 16px; font-family: var(--f-body); font-weight: 600; letter-spacing: 0; }
.stores { display: grid; gap: 10px; }
.store {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: 16px; line-height: 1.2;
  transition: background .15s, transform .15s;
}
.store:hover { background: var(--accent); transform: translateY(-1px); }
.store svg { width: 24px; height: 24px; flex: none; }
.store small { display: block; font: 400 10px/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; opacity: .75; }
.store-off { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.store-off:hover { background: transparent; transform: none; }

.next { padding-bottom: clamp(56px, 8vw, 104px); }
.next a { display: grid; gap: 8px; padding-top: 28px; border-top: 1px solid var(--line); text-decoration: none; }
.next-title { font: 700 clamp(32px, 5vw, 60px)/1.1 var(--f-display); letter-spacing: -0.02em; transition: color .2s; }
.next a:hover .next-title { color: var(--accent); }
.next-title::after { content: " \2192"; }

/* ---------- Simple pages ---------- */
.page { padding-block: clamp(56px, 9vw, 112px); display: grid; gap: 20px; }
.page h1 { font-size: clamp(44px, 7vw, 88px); }
.page-body { display: grid; gap: 14px; max-width: 65ch; color: var(--ink); }
.rows, .posts { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.rows li { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
/* Jobs: openings on a darker panel, like the Contact info bar */
.jobs-rows { margin-top: clamp(24px, 3.5vw, 40px); border-top: 0; background: #E4E4E2; border-radius: var(--radius); padding: 4px clamp(20px, 2.6vw, 32px); }
.jobs-rows li { align-items: center; border-bottom-color: #D2D2D0; }
.jobs-rows li:last-child { border-bottom: 0; }
.btn-apply { margin-top: 0; padding: 11px 22px; text-decoration: none; }
/* Job application form */
.back-link { display: inline-block; margin-bottom: 16px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.back-link:hover { color: var(--accent); }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.post-actions .btn { margin-top: 0; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.post-actions .form-note { min-height: 0; }
/* Rich text written in the admin panel (blog entries, support) */
.page-body.rich { gap: 12px; line-height: 1.65; }
.page-body.policy { gap: 12px; max-width: 72ch; margin-top: 12px; line-height: 1.65; }
.rich h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 28px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.rich h3 { font: 600 17px/1.4 var(--f-body); margin: 12px 0 0; }
.rich p, .rich ul, .rich ol { margin: 0; }
.rich ul, .rich ol { display: grid; gap: 8px; padding-left: 1.4em; }
.rich li::marker { color: var(--ink-2); }
.rich a { color: var(--accent); word-break: break-word; }
.rich strong, .rich b { font-weight: 700; }
.rich h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.rich blockquote { margin: 0; padding-left: 16px; border-left: 3px solid var(--line); color: var(--ink-2); }
.rich [id] { scroll-margin-top: 90px; }
.rich .toc-link { color: var(--ink); font-weight: 700; text-decoration: none; }
.post-image { display: block; width: 100%; max-width: 720px; height: auto; margin-top: 12px; }
.rich .toc-link:hover { color: var(--accent); text-decoration: underline; }
.form.apply-form { max-width: 720px; margin-top: clamp(24px, 3.5vw, 40px); background: #E4E4E2; border-radius: var(--radius); padding: clamp(24px, 3.2vw, 40px); }
.apply-form .btn-upload { display: inline-flex; align-items: center; gap: 10px; margin-top: 0; font-size: 15px; }
.btn-upload svg { width: 18px; height: 18px; }
.file-input, .form .file-input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.file-input:focus-visible + .file-name { outline: 2px solid var(--accent); }
.file-name { font-size: 14px; color: var(--ink-2); }
.form-sub { font-size: clamp(20px, 2.4vw, 26px); margin: 20px 0 0; }
.form select { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); width: 100%; }
.form select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.row-main { font: 700 clamp(20px, 2.4vw, 26px)/1.2 var(--f-display); letter-spacing: -0.01em; }
.row-sub { display: block; margin-top: 4px; font: 500 14px/1.4 var(--f-body); color: var(--ink-2); letter-spacing: 0; }
.row-empty { justify-content: center !important; font-weight: 600; color: var(--ink-2); padding: 28px 0 !important; }
.row-meta, .posts time { font: 400 12px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.posts li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.posts h3 { font-size: clamp(20px, 2.2vw, 24px); margin-bottom: 6px; }
.posts p { color: var(--ink-2); }
.contact { margin: clamp(24px, 3.5vw, 40px) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; align-items: center; background: #E4E4E2; border-radius: var(--radius); padding: clamp(20px, 2.6vw, 30px) clamp(20px, 2.6vw, 32px); }
.contact dt { font: 400 12px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.contact dd { margin: 4px 0 0; overflow-wrap: anywhere; }
/* Three equal columns, centred, with fine dividers between them */
.contact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.contact > div { text-align: center; padding: 4px 16px; }
.contact > div + div { border-left: 1px solid #CFCFCD; }
@media (max-width: 720px) {
  .contact { grid-template-columns: 1fr; gap: 0; }
  .contact > div { padding: 12px 0; }
  .contact > div + div { border-left: 0; border-top: 1px solid #CFCFCD; }
}
.contact-rule { border: 0; height: 1px; background: #CFCFCD; margin: clamp(32px, 4.5vw, 56px) 0 0; }
.form-title { font-size: clamp(24px, 3vw, 36px); margin: clamp(40px, 5.5vw, 64px) 0 0; }
.form { display: grid; gap: 8px; max-width: 520px; margin-top: 16px; }
.form label { font-weight: 600; font-size: 14px; margin-top: 8px; }
.form input, .form textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); width: 100%; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.btn { justify-self: start; margin-top: 12px; font: 600 15px/1 var(--f-body); padding: 14px 22px; border: 0; border-radius: var(--radius); background: var(--ink); color: var(--paper); cursor: pointer; }
.btn:hover { background: var(--accent); }
.form-note { color: var(--ink-2); font-size: 14px; min-height: 1.6em; }
.social { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-weight: 600; }
.social a { color: var(--accent); }

/* ---------- Footer ---------- */
.footer-bar { border-top: 1px solid #D2D2D0; background: var(--bar); }
/* Keep the bottom bar at the bottom of the window on short pages (Support, Jobs, Blog) */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
.footer { flex-shrink: 0; }
.footer-in { padding-block: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; font-size: 14px; color: var(--ink-2); }
.footer nav { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }
.foot-social-row { padding-block: 8px 20px; }
.foot-social { display: flex; flex-wrap: wrap; gap: 10px; }
.social-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #E4E4E2; color: var(--ink); transition: background .15s, color .15s, transform .15s; }
.social-icon svg { width: 21px; height: 21px; }
a.social-icon:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.social-icon.off { opacity: .6; cursor: default; }

/* ---------- Lightbox ---------- */
[hidden] { display: none !important; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12, 15, 15, .94); display: grid; place-items: center; padding: 56px 16px; }
.lightbox img { max-height: calc(100vh - 140px); max-width: min(1400px, 100%); border-radius: 4px; }
.lb-btn { position: absolute; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; padding: 10px 16px; cursor: pointer; opacity: .8; }
.lb-btn:hover { opacity: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8); font: 400 12px/1 var(--f-mono); letter-spacing: .1em; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-media {
    width: 100%; max-height: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%), linear-gradient(to bottom, #000 70%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%), linear-gradient(to bottom, #000 70%, transparent 100%);
  }
  .hero-info { position: static; }
  .hero-play { left: 50%; top: 46%; gap: 8px; }
  .hero-play .player-btn { width: 60px; height: 60px; }
  .hero-play .player-btn svg { width: 26px; height: 26px; }
  .game-hero.is-playing .hero-info { opacity: 1; }
  .hero-media.playing { -webkit-mask-image: none; mask-image: none; }
  .hero-info-in { width: auto; margin: -12px 0 0; padding: 0 var(--gutter) 8px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .facts { position: static; }
}
@media (max-width: 720px) {
  .nav-toggle { display: grid; gap: 6px; background: none; border: 0; padding: 10px 6px; cursor: pointer; }
  .nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform .2s; }
  .nav-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bar); border-bottom: 1px solid #D2D2D0;
    padding: 8px var(--gutter) 16px; display: none;
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav-open .nav { display: flex; }
  .nav-link { font-size: 17px; padding: 14px 0; justify-content: space-between; width: 100%; }
  .nav-link.active { box-shadow: none; color: var(--accent); }
  .dd-menu { position: static; transform: none; width: auto; box-shadow: none; border: 0; padding: 0 0 8px; background: transparent; display: none; opacity: 1; visibility: visible; }
  .dd.open .dd-menu { display: block; transform: none; }
  .posts li { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .slider-btn { width: 40px; height: 40px; }
  .slider-prev { left: 8px; }
  .slider-next { right: 8px; }
  .thumb { flex-basis: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Big monitors: use more of the screen so the page doesn't sit in a narrow strip */
@media (min-width: 1800px) {
  :root { --max: 1400px; }
  body { font-size: 17px; }
  .game-hero { max-width: 2000px; }
}
@media (min-width: 2400px) {
  :root { --max: 1640px; }
  body { font-size: 18px; }
  .game-hero { max-width: 2400px; }
  .hero h1 { font-size: 20px; }
}

/* Forms */
.hp, .form .hp { position: absolute; left: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
.form-done { font-weight: 600; padding: 18px 0; outline: none; }
.cf-turnstile { margin-top: 8px; }
.draft-badge { display: inline-block; font: 600 12px/1.4 var(--f-body); background: #FFF1C9; color: #6B4E00; border-radius: 999px; padding: 2px 10px; margin-left: 6px; vertical-align: 2px; }
