@font-face {
  font-family: "Bree Serif";
  src: url("../fonts/bree-serif-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0c0c0d;
  --background-secondary: #171719;
  --accent-red: #a30000;
  --accent-red-hover: #c21a16;
  --text-primary: #f1f1e8;
  --text-secondary: #b7b7b0;
  --border: #ffffff1c;
  --header-height: 4.75rem;
  --page-width: 75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1.5rem); }
body { margin: 0; background: var(--background); color: var(--text-primary); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.7; }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .25em; }
button { font: inherit; }
.icon { display: inline-block; width: 1.25rem; height: 1.25rem; flex-shrink: 0; vertical-align: middle; }
button, a { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 5px; }
::selection { background: var(--accent-red); color: #fff; }
h1, h2, h3, p { margin: 0; }
h2, h3 { font-family: "Bree Serif", Georgia, serif; font-weight: 400; line-height: 1.15; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); letter-spacing: -.025em; }
p { color: var(--text-secondary); font-size: 1.0625rem; }
.container { width: min(var(--page-width), calc(100% - 2.5rem)); margin-inline: auto; }
.section-space { padding-block: clamp(4rem, 8vw, 7rem); }
.skip-link { position: fixed; z-index: 100; top: .75rem; left: 1rem; padding: .75rem 1rem; color: #fff; background: var(--accent-red); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

.site-header { position: fixed; inset: 0 0 auto; z-index: 20; background: rgb(12 12 13 / 92%); border-bottom: 1px solid var(--border); }
.nav-wrap { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; }
.wordmark { text-decoration: none; font-size: .79rem; font-weight: 650; letter-spacing: .12em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; width: 100%; padding-bottom: .75rem; }
.site-nav a { display: block; padding: .5rem 0; text-decoration: none; font-size: .875rem; color: var(--text-secondary); }
.site-nav a:hover, .social-links a:hover { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--accent-red-hover); }
.menu-toggle { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .5rem 0 .5rem .5rem; color: var(--text-primary); background: none; border: 0; cursor: pointer; font-size: .8rem; }
.menu-icon { display: grid; gap: 4px; width: 19px; }
.menu-icon span { height: 1px; background: currentColor; }
.nav-ready .site-nav { flex-direction: column; align-items: stretch; gap: 0; }
.nav-ready .site-nav a { padding: .8rem 0; }

.hero { min-height: 100vh; min-height: 100svh; position: relative; isolation: isolate; display: grid; place-items: center; padding: calc(var(--header-height) + 4rem) 0 7rem; }
.hero-media, .hero-media::after { position: absolute; inset: 0; }
.hero-media { z-index: -1; overflow: hidden; background: var(--background); }
.hero-poster { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.hero-video.is-current { z-index: 2; opacity: 1; }
.hero-video.is-outgoing { z-index: 1; opacity: 1; }
.video-toggle { position: absolute; right: 1.25rem; bottom: 5rem; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .45rem .75rem; background: rgb(12 12 13 / 85%); color: var(--text-secondary); border: 1px solid var(--border); border-radius: 3px; font-size: .7rem; cursor: pointer; }
.video-toggle .icon { width: 1rem; height: 1rem; }
.video-toggle[data-paused="false"] .icon--play, .video-toggle[data-paused="true"] .icon--pause { display: none; }
.video-toggle:hover { color: var(--text-primary); }
.hero-media::after { content: ""; z-index: 3; background: linear-gradient(180deg, rgb(12 12 13 / 32%) 0%, rgb(26 4 4 / 40%) 48%, rgb(12 12 13 / 65%) 80%, var(--background) 100%); }
.hero-content { text-align: center; }
.hero h1 { display: flex; justify-content: center; }
.game-logo { width: min(39rem, 88vw); filter: drop-shadow(0 4px 18px rgb(0 0 0 / 40%)); }
.hero-tagline { color: var(--text-primary); font-size: clamp(1.1rem, 2.1vw, 1.5rem); margin: 1.3rem auto 1.8rem; max-width: 28em; text-wrap: balance; text-shadow: 0 2px 8px #000; }
.hero-actions { display: flex; flex-direction: column; gap: .8rem; justify-content: center; align-items: stretch; max-width: 22rem; margin-inline: auto; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .7rem; min-height: 3.4rem; padding: .8rem 1.5rem; border: 1px solid transparent; border-radius: 3px; font-size: .9375rem; font-weight: 600; line-height: 1.5; text-decoration: none; cursor: pointer; transition: background-color .18s, border-color .18s; }
.button-primary { background: var(--accent-red); color: #fff; }
.button-primary:hover { background: var(--accent-red-hover); }
.button-secondary { background: rgb(12 12 13 / 75%); color: var(--text-primary); border-color: #ffffff70; }
.button-secondary:hover { background: var(--background-secondary); border-color: var(--text-primary); }
.button:disabled { background: #651c1c; color: #ded1ce; cursor: default; }
.hero-scroll { position: absolute; bottom: 1.75rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 1rem; min-height: 44px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; white-space: nowrap; color: var(--text-secondary); }
.hero-scroll .icon { width: 1.1rem; height: 1.1rem; }

.game-description { max-width: 49rem; margin-inline: auto; text-align: center; }
.game-description h2::before { content: ""; display: block; width: 2.5rem; height: 3px; background: var(--accent-red); margin: 0 auto 1.6rem; }
.game-description p { font-size: clamp(1.1rem, 1.7vw, 1.3rem); margin-top: 1.4rem; }
.screenshots { margin-top: clamp(2.75rem, 5vw, 4rem); }
.screenshots h3 { font-size: 1.4rem; margin-bottom: 1.25rem; }
.gallery-controls { display: flex; align-items: center; justify-content: center; gap: .65rem; margin-top: 1.25rem; }
.gallery-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: transparent; color: var(--text-primary); cursor: pointer; }
.gallery-button .icon { width: 1.15rem; height: 1.15rem; }
.gallery-button:hover { border-color: var(--text-secondary); background: var(--background-secondary); }
.gallery-status { min-width: 4.5rem; color: var(--text-secondary); font-size: .8rem; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.screenshot-stage { position: relative; }
.screenshot-grid { display: grid; gap: 1rem; }
.screenshot-outgoing { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.screenshot-link, .screenshot-preview { display: block; position: relative; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.screenshot-link img, .screenshot-preview img { width: 100%; }
.screenshot-expand { position: absolute; right: .7rem; bottom: .7rem; display: grid; place-items: center; width: 2rem; height: 2rem; background: rgb(12 12 13 / 85%); border-radius: 2px; }
.screenshot-expand .icon { width: 1rem; height: 1rem; }
.screenshot-link:hover { border-color: var(--text-secondary); }
.lightbox { width: min(90rem, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); padding: 3.5rem .5rem .5rem; color: var(--text-primary); background: var(--background); border: 1px solid var(--border); border-radius: 4px; }
.lightbox::backdrop { background: rgb(0 0 0 / 92%); }
.lightbox-image { width: 100%; height: auto; max-height: calc(100dvh - 7rem); object-fit: contain; }
.lightbox-close { position: absolute; right: .75rem; top: .3rem; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .4rem .5rem; border: 0; background: none; color: var(--text-primary); cursor: pointer; font-size: .875rem; }
.about-section { border-top: 1px solid var(--border); padding-block: clamp(2.75rem, 5vw, 4.5rem); }
.section-row { display: grid; gap: 1.5rem; }
.section-row p { max-width: 36rem; font-size: 1.125rem; }
.section-row h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); }
.press-section { background: var(--background-secondary); border-block: 1px solid var(--border); }
.press-section .button { margin-top: 1.75rem; }
.press-section .press-pending { margin-top: .8rem; font-size: .85rem; }
.contact-section { text-align: center; }
.contact-section > p { margin-top: 1.4rem; }
.contact-email { display: inline-flex; align-items: center; gap: .45em; max-width: 100%; margin-top: .6rem; font-family: "Bree Serif", Georgia, serif; font-size: clamp(1.1rem, 3.7vw, 2.7rem); text-decoration: none; overflow-wrap: anywhere; }
.contact-email .icon { width: .8em; height: .8em; }
.contact-email span { min-width: 0; }
.contact-email:hover { text-decoration: underline; text-decoration-color: var(--accent-red-hover); }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1.75rem; margin-top: 2rem; }
.social-links a { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .6rem 0; color: var(--text-secondary); font-size: .9rem; text-decoration: none; }
.social-links .icon { width: 1.125rem; height: 1.125rem; }
.site-footer { border-top: 1px solid var(--border); padding-block: 1.5rem; text-align: center; }
.site-footer p { font-size: .8rem; }

.admin-bar .site-header { top: 32px; }
html:has(.admin-bar) { scroll-padding-top: calc(var(--header-height) + 3.5rem); }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { #wpadminbar { position: fixed; } }
@media (min-width: 36rem) {
  .hero-actions { flex-direction: row; max-width: none; }
  .screenshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 48rem) {
  .container { width: min(var(--page-width), calc(100% - 5rem)); }
  .wordmark { font-size: .9rem; }
  .site-nav, .nav-ready .site-nav { flex-direction: row; width: auto; gap: 2rem; padding: 0; }
  .section-row { grid-template-columns: 1fr 1.2fr; align-items: start; gap: 4rem; }
  .about-section { align-items: center; }
  .screenshot-grid { gap: 1.4rem; }
  .video-toggle { bottom: 1.75rem; right: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .hero-video { display: none; }
}
