/* Only A Game: one stylesheet for the studio site.
   The colours are the Commodore 64's own: the blue screen, its lilac border, black, white
   and the light grey. Headings use Kestrel, the 8x8 typeface drawn for Cold Blood. */

@font-face {
  font-family: "Kestrel";
  src: url("/kestrel.woff2") format("woff2");
  font-display: block;
}

:root {
  --black: #000000;
  --screen: #352879;
  --border: #6C5EB5;
  --border-hi: #8A7FD0;
  --white: #FFFFFF;
  --text: #CFCFD6;
  --muted: #959595;
  --blood: #D64A4A;
  --px: "Kestrel", "Courier New", monospace;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --frame: clamp(12px, 2.6vw, 32px);
  --measure: 64ch;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--black); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--white); text-decoration-color: var(--border); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--white); }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
p { margin: 0 0 1em; max-width: var(--measure); }

.px { font-family: var(--px); font-weight: 400; letter-spacing: 0; text-transform: uppercase; line-height: 1.25; }
h1, h2, h3 { font-family: var(--px); font-weight: 400; color: var(--white); text-transform: uppercase; margin: 0; line-height: 1.25; }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.75rem); margin-bottom: 1.25rem; }
h3 { font-size: 1rem; margin-bottom: .6rem; }
.pixelated { image-rendering: pixelated; }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(48px, 8vw, 96px); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--white); color: var(--black); padding: 8px 12px; }

/* ---------- the screen: lilac border round a blue C64 screen ---------- */
.monitor { background: var(--border); padding: var(--frame); }
.monitor.loading { animation: load 1.4s steps(1) both; }
@keyframes load {
  0%   { background: repeating-linear-gradient(180deg, #000 0 9px, #444 9px 14px, #000 14px 21px, #352879 21px 26px); }
  12%  { background: repeating-linear-gradient(180deg, #352879 0 6px, #000 6px 17px, #444 17px 23px, #000 23px 30px); }
  25%  { background: repeating-linear-gradient(180deg, #000 0 4px, #444 4px 12px, #352879 12px 15px, #000 15px 27px); }
  38%  { background: repeating-linear-gradient(180deg, #444 0 7px, #000 7px 13px, #352879 13px 22px, #000 22px 25px); }
  50%  { background: repeating-linear-gradient(180deg, #000 0 11px, #352879 11px 14px, #000 14px 20px, #444 20px 29px); }
  62%  { background: repeating-linear-gradient(180deg, #352879 0 3px, #000 3px 15px, #444 15px 18px, #000 18px 26px); }
  75%  { background: repeating-linear-gradient(180deg, #000 0 8px, #444 8px 11px, #000 11px 19px, #352879 19px 28px); }
  88%  { background: repeating-linear-gradient(180deg, #444 0 5px, #000 5px 16px, #352879 16px 19px, #000 19px 31px); }
  100% { background: var(--border); }
}
@media (prefers-reduced-motion: reduce) { .monitor.loading { animation: none; } }
.screen { background: var(--screen); color: #B9B2EA; }

.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 18px var(--gutter); }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font-family: var(--px); text-transform: uppercase; font-size: .95rem; }
.brand img { width: 30px; height: 30px; image-rendering: pixelated; }
.nav { display: flex; gap: clamp(14px, 3vw, 32px); list-style: none; margin: 0; padding: 0; font-family: var(--px); text-transform: uppercase; font-size: .9rem; }
.nav a { color: #B9B2EA; text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); }

/* home: the wordmark is the hero */
.hero-home { padding: clamp(40px, 9vw, 120px) var(--gutter) clamp(44px, 8vw, 100px); }
.wordmark { font-family: var(--px); color: var(--white); text-transform: uppercase; font-size: min(7vw, 7.2rem); line-height: 1; margin: 0; white-space: nowrap; }
.wordmark .cursor { display: inline-block; width: .82em; height: .86em; margin-left: .12em; background: #B9B2EA; vertical-align: -.02em; }
.ready { font-family: var(--px); text-transform: uppercase; color: #B9B2EA; font-size: clamp(.9rem, 1.6vw, 1.15rem); margin: clamp(20px, 3vw, 36px) 0 0; max-width: none; }
.lede { color: var(--white); font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.5; max-width: 40ch; margin: 18px 0 0; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; font-family: var(--px); text-transform: uppercase; font-size: .95rem; line-height: 1; text-decoration: none; color: var(--white); background: var(--border); border: 3px solid var(--border); }
.btn:hover { background: var(--border-hi); border-color: var(--border-hi); }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.ghost:hover { border-color: var(--white); }
.btn small { font-family: var(--body); text-transform: none; font-size: .8rem; color: #D9D5F5; margin-left: 10px; }

/* ---------- the games list ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature .shot { border: 6px solid var(--border); background: var(--screen); }
.feature .logo { width: min(420px, 100%); margin: 0 0 14px -8px; }
.feature .platforms { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.feature .platforms li { font-family: var(--px); text-transform: uppercase; font-size: .78rem; color: var(--muted); border: 2px solid #444; padding: 6px 9px; }
.more { max-width: none; margin-top: clamp(40px, 6vw, 72px); padding-top: 24px; border-top: 2px solid #222; color: var(--muted); }

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 56px); }

/* ---------- Cold Blood ---------- */
.cb-hero { position: relative; background: #050510 var(--hero) center 75% / cover no-repeat; min-height: min(78vh, 720px); display: flex; align-items: flex-end; }
.cb-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.6) 58%, rgba(0,0,0,.92) 100%); }
.cb-hero .wrap { position: relative; z-index: 1; padding-block: clamp(32px, 6vw, 64px); }
.cb-hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cb-hero .logo { width: min(620px, 92%); margin-left: -1.5%; }
.cb-hero .tag { color: var(--white); font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.45; max-width: 34ch; margin: 10px 0 0; text-shadow: 0 1px 2px #000; }
.cb-hero .btn.ghost { background: rgba(0,0,0,.35); }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border-block: 2px solid #222; }
.facts div { padding: 20px 20px 20px 0; }
.facts div + div { padding-left: 20px; border-left: 2px solid #222; }
.facts dt { font-family: var(--px); text-transform: uppercase; color: var(--muted); font-size: .78rem; margin-bottom: 6px; }
.facts dd { margin: 0; color: var(--white); }

.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.story blockquote { margin: 0; font-family: var(--px); text-transform: uppercase; color: var(--white); font-size: clamp(1.1rem, 2.2vw, 1.6rem); line-height: 1.5; }
.story blockquote span { color: var(--blood); }

.grid-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); margin: 0; padding: 0; list-style: none; }
.grid-shots figure { margin: 0; }
.grid-shots img { width: 100%; image-rendering: pixelated; border: 4px solid var(--border); background: #000; }
figcaption { color: var(--muted); font-size: .92rem; margin-top: 8px; }

.strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 420px); gap: 16px; overflow-x: auto; padding: 4px 0 18px; scroll-snap-type: x mandatory; scrollbar-color: var(--border) #111; }
.strip figure { margin: 0; scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 1484 / 1060; object-fit: cover; border: 4px solid #222; }
.strip figcaption { font-family: var(--px); text-transform: uppercase; font-size: .74rem; color: var(--muted); }

.load { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); }
.steps { margin: 0; padding-left: 1.4em; }
.steps li { margin-bottom: .8em; padding-left: .3em; }
.steps li::marker { font-family: var(--px); color: var(--border-hi); }
pre { margin: .6em 0 0; padding: 14px 18px; background: var(--screen); color: #B9B2EA; font: 400 1rem/1.5 var(--px); border-left: 6px solid var(--border); overflow-x: auto; }
code { font-family: var(--px); font-size: .92em; color: var(--white); }
.files { list-style: none; margin: 0; padding: 0; border-top: 2px solid #222; }
.files li { border-bottom: 2px solid #222; }
.files a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 4px; text-decoration: none; }
.files a:hover { background: #0d0b1f; }
.files b { color: var(--white); font-weight: 700; }
.files span { color: var(--muted); font-size: .92rem; grid-column: 1; }
.files em { font-style: normal; font-family: var(--px); text-transform: uppercase; font-size: .8rem; color: #B9B2EA; grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.note { color: var(--muted); font-size: .95rem; }

/* ---------- footer ---------- */
.foot { border-top: 2px solid #222; padding-block: 28px 40px; color: var(--muted); font-size: .92rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; }
.foot a { color: var(--text); }

@media (max-width: 860px) {
  .feature, .about, .story, .load { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts div:nth-child(n+3) { border-top: 2px solid #222; }
  .grid-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .wordmark { font-size: 13.5vw; white-space: normal; }
}
@media (max-width: 520px) {
  .grid-shots { grid-template-columns: 1fr; }
  .bar { padding-inline: 14px; }
  .nav { font-size: .8rem; }
  .btn { width: 100%; }
}
