/* Phantom Draft Games. Mobile first: base = phone, wider via min-width.
   Look: tiled dark backdrop, darker floating panels (see docs/design-and-content.md).
   Fonts are the game's own (Cinzel Bold, Inter; both SIL OFL), self-hosted, subset. */
@font-face { font-family: Cinzel; src: url(/assets/fonts/cinzel-bold.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url(/assets/fonts/inter-regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #1d2333;
  --bar: #0d1018;
  --band: #0a0d14;
  --panel: rgba(14, 17, 26, .84);
  --panel-solid: #0e111a;
  --text: #e8e6d6;
  --muted: #bcc0cc;
  --accent: #f28a63;
  --accent-hover: #f7a283;
  --on-accent: #0e111a;
  --leaf: #9fd3b8;
  --blood: #ff8a76;
  --frame: #c8c6b4;
  --focus: #ffd166;
  --serif: Cinzel, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow: 0 2px 10px rgba(0, 0, 0, .5);
  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='%23fff' fill-opacity='.04'%3E%3Cpath d='M14 6a9 9 0 1 0 9 11 7.4 7.4 0 0 1-9-11z'/%3E%3Cpath d='M56 48a9 9 0 1 0 9 11 7.4 7.4 0 0 1-9-11z'/%3E%3C/g%3E%3C/svg%3E");
  --max: 67.5rem;
  --bar-h: 3.5rem;
  --gutter: .75rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 1rem); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg) var(--tile); color: var(--text);
  font: 1.125rem/1.55 var(--sans);
  min-height: 100vh; min-height: 100dvh;
  overflow-wrap: break-word;
  display: flex; flex-direction: column;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .5rem; text-wrap: balance; }
p { margin: 0 0 1rem; max-width: 62ch; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--accent-hover); text-decoration-thickness: .15em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.flush { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 20; background: var(--accent); color: var(--on-accent); padding: .75rem 1rem; font-weight: 700; border-radius: .25rem; }
.skip:focus { top: .5rem; color: var(--on-accent); }

/* Top bar */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bar); box-shadow: var(--shadow); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; min-height: var(--bar-h); margin: 0; padding: 0; list-style: none; }
.bar a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; min-width: 3rem; padding-inline: .5rem; text-decoration: none; font-size: 1rem; }
.bar a:hover { text-decoration: underline; }
.bar .mark img { width: 1.75rem; height: 1.75rem; }
.bar .soc { display: none; }
.bar .soc svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.ico { width: 1.25rem; height: 1.25rem; fill: currentColor; flex: none; }

/* Buttons (Freehold store buttons: solid accent, dark text) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .5rem 1.25rem; background: var(--accent); color: var(--on-accent); border: 3px solid var(--accent); font: 700 1rem/1.2 var(--serif); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; text-align: center; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: transparent; color: var(--accent-hover); }
.btns { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.btns .btn { width: 100%; max-width: 22rem; }

/* Studio hero: only the logo, lots of room */
.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: calc(100vh - var(--bar-h)); min-height: calc(100svh - var(--bar-h)); padding: 2rem var(--gutter); }
.hero .emblem { width: min(50vw, 13rem); height: auto; margin-bottom: 1.25rem; }
.hero h1 { max-width: 100%; overflow-wrap: anywhere; margin: 0; font-size: clamp(2.1rem, 10.5vw, 5.5rem); letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.hero .sub { display: block; margin-top: .35rem; font-size: clamp(1.1rem, 4.6vw, 2rem); letter-spacing: .6em; padding-left: .6em; color: var(--accent); }

/* Sections: big uppercase heading + floating panels */
.section { padding-top: 4rem; }
.section > .wrap > h2, .page-title { text-align: center; text-transform: uppercase; letter-spacing: .08em; font-size: 2rem; margin-bottom: 1.25rem; text-shadow: var(--shadow); }
.panel { background: var(--panel); box-shadow: var(--shadow); }

.game { margin-bottom: 4rem; }
.game-banner { position: relative; display: grid; place-items: center; min-height: 13rem; padding: 1.5rem 1rem; background: #11151f; overflow: hidden; box-shadow: var(--shadow); }
.game-banner > picture, .game-banner > picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.game-banner > picture img { object-fit: cover; object-position: 60% 40%; }
.game-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10, 13, 20, .25), rgba(10, 13, 20, .55)); }
.game-title { position: relative; z-index: 1; margin: 0; }
.game-title img { width: min(10rem, 100%); height: auto; margin-inline: auto; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6)); }
.game-info { padding: 1.25rem .75rem .5rem; }
.game-cols { display: flex; flex-direction: column; gap: 1.25rem; }
.game-text { font-size: 1.25rem; line-height: 1.4; }
.game-text .lead { font-weight: 400; color: var(--text); font-size: 1.375rem; }
.framed { border: 3px solid var(--frame); background: #151a28; }
.game-media { display: grid; place-items: center; padding: 1rem; }
.game-media img { width: 100%; max-width: 26rem; height: auto; }
.thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.thumbs li { aspect-ratio: 1 / 1; min-height: 0; padding: .5rem; overflow: hidden; }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.game-action { text-align: center; padding: 1.5rem .5rem 1.75rem; }
.game-action .status { margin: 0 0 1rem; font: 700 1.5rem/1.2 var(--serif); letter-spacing: .06em; max-width: none; }

/* Developer card (Freehold team card) */
.person { display: flex; flex-direction: column; max-width: 46rem; margin-inline: auto; box-shadow: var(--shadow); }
.person-art { display: grid; place-items: center; min-height: 14rem; background: #11151f; }
.person-art img { width: 7.5rem; }
.person-body { padding: 1.25rem; background: var(--panel); }
.person-body h3 { font-size: 1.75rem; }
.person-role { margin: 0 0 1rem; color: var(--muted); }

/* Contact boxes */
.boxes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.box { padding: 1.25rem; }
.box-item { margin: 0 0 .5rem; }
.box-item:last-child { margin: 0; }
.box-item .label { display: block; margin: 0; }
.box a { display: inline-flex; align-items: center; gap: .5rem; min-height: 3rem; overflow-wrap: anywhere; }
.box h3 { font-size: 1.25rem; }

/* Footer band */
.site-footer { margin-top: 4rem; background: var(--band); padding: 1.5rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom)); text-align: center; font-size: 1rem; }
.site-footer p { margin: 0 auto; max-width: none; }
.site-footer a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: .25rem; }

/* Game page (Caves of Qud pattern) */
.g-hero { position: relative; display: grid; place-items: center; min-height: 22rem; padding: 3rem 1rem; background: #11151f; overflow: hidden; }
.g-hero picture, .g-hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.g-hero picture img { object-fit: cover; object-position: 62% 30%; }
.g-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10, 13, 20, .2), rgba(10, 13, 20, .6)); }
.g-hero h1 { position: relative; z-index: 1; margin: 0; }
.g-hero h1 img { width: min(11rem, 100%); height: auto; margin-inline: auto; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .7)); }
.g-strip { background: linear-gradient(to bottom, #0d1018, #1a2236); padding: 2.5rem 0; }
.g-box { max-width: 46rem; margin-inline: auto; padding: 1.5rem 1rem; text-align: center; background: var(--panel-solid); border: .5rem solid var(--frame); }
.g-box h2 { color: var(--leaf); font-size: 1.5rem; letter-spacing: .06em; text-transform: uppercase; }
.g-box p { margin-inline: auto; }
.g-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.5rem; margin: 0; padding: 0; list-style: none; }
.g-links a { display: inline-flex; align-items: center; gap: .5rem; min-height: 3rem; font-size: 1.25rem; }
.g-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: center; padding-block: 2rem; }
.g-row .shot { display: grid; place-items: center; padding: 1.5rem; background: #151a28; box-shadow: var(--shadow); }
.g-row .shot img { width: 100%; max-width: 30rem; }
.g-row h2 { font-size: 1.75rem; }
.g-row p { font-size: 1.375rem; line-height: 1.4; }
.g-feat { max-width: 54rem; margin: 0 auto; padding: 1.25rem; list-style: none; }
.g-feat li { margin: 0 0 1.25rem; }
.g-feat li:last-child { margin: 0; }
.g-feat strong { font-weight: 400; color: var(--leaf); }
.g-feat li:nth-child(3n+1) strong { color: var(--accent); }
.g-feat li:nth-child(3n+2) strong { color: var(--leaf); }
.g-feat li:nth-child(3n) strong { color: var(--blood); }
.g-close { margin-top: 3rem; }
dl.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0 0 .75rem; }
.prose { max-width: 46rem; margin-inline: auto; padding: 1.25rem; }
.prose h2 { font-size: 1.5rem; }
.dl-list { margin: 0; padding: 0; list-style: none; }
.dl-list a { display: inline-flex; align-items: center; min-height: 3rem; }

@media (min-width: 31.25em) {
  :root { --gutter: 1.25rem; }
  .bar a { padding-inline: .875rem; }
  .bar .soc { display: inline-flex; padding-inline: .5rem; }
  .thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 37em) {
  .btns { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .btns .btn { width: auto; flex: 1 1 14rem; }
  .hero h1 { letter-spacing: .08em; }
  .section > .wrap > h2, .page-title { font-size: 3rem; }
  .person { flex-direction: row; }
  .person-art { flex: 0 0 33%; min-height: 16rem; }
  .person-body { flex: 1; }
  dl.facts { grid-template-columns: auto minmax(0, 1fr); row-gap: .5rem; }
  dl.facts dd { margin: 0; }
}
@media (min-width: 47.5em) {
  :root { --gutter: 1.5rem; }
  .bar a { font-size: 1.125rem; padding-inline: 1.125rem; }
  .game-banner { min-height: 22rem; }
  .game-title img { width: 16.4rem; }
  .game-info { padding: 1.75rem 1.5rem .5rem; }
  .game-cols { flex-direction: row; align-items: stretch; }
  .game-text { flex: 1 1 50%; }
  .game-media { flex: 1 1 50%; }
  .boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .g-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
  .g-row:nth-of-type(even) .shot { order: 2; }
  .g-hero { min-height: 32rem; }
  .g-hero h1 img { width: 18rem; }
  .game-action .status { font-size: 2rem; }
}
@media (min-width: 62.5em) {
  :root { --gutter: 2.5rem; }
  .game-info { padding: 2.25rem 2.25rem .75rem; }
  .section { padding-top: 5rem; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn, .bar a, .thumbs li { transition: transform .15s ease-out, background-color .15s ease, border-color .15s ease; }
  .btn:hover, .bar a:hover { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .emblem, .hero h1 { animation: rise .7s ease-out both; }
  .hero h1 { animation-delay: .15s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media (forced-colors: active) {
  .btn, .framed, .g-box { border: 2px solid ButtonText; }
  .panel, .person { border: 1px solid CanvasText; }
}
@media print { .skip, .site-header { display: none; } body { background: #fff; color: #000; } }
