/* Broken Terminal Games - black & white terminal theme */
:root {
  --bg: #000;
  --fg: #f2f2f2;
  --dim: #a3a3a3;
  --line: #3a3a3a;
  --brand: #ffb000;
  --accent: var(--brand);
  --panel: #0b0b0b;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --head: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Impact, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.65 var(--mono);
  -webkit-font-smoothing: antialiased;
}
/* subtle scanlines */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0, rgba(255,255,255,.025) 1px, transparent 1px, transparent 3px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fg); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { background: var(--fg); color: var(--bg); text-decoration: none; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--fg); color: var(--bg); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.wrap { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }

h1, h2, h3 { font-family: var(--head); text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; margin: 0 0 1rem; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-top: 2.5rem; }
h3 { font-size: 1.7rem; }
h3 a, h2 a { text-decoration: none; }
.lead { font-size: 1.15rem; color: var(--fg); max-width: 60ch; }
.measure { max-width: 65ch; }
p { margin: 0 0 1rem; }
.label { font-size: .8rem; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; margin-bottom: .6rem; }
.date { color: var(--dim); font-size: .85rem; letter-spacing: .08em; }
.crumbs { font-size: .8rem; letter-spacing: .1em; color: var(--dim); margin-bottom: 1.5rem; }
.crumbs a { color: var(--dim); }
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* header */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(0,0,0,.92); backdrop-filter: blur(6px); z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; font-family: var(--head); font-weight: 700; letter-spacing: .06em; font-size: 1.15rem; }
.brand:hover { background: none; color: var(--fg); }
.brand img { border-radius: 6px; }
nav { display: flex; gap: 1.4rem; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
nav a { text-decoration: none; padding: .2rem .3rem; }

/* hero */
.hero { border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 8vw, 6rem) 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero-art img { width: 100%; max-width: 520px; margin-inline: auto; }
.boot { color: var(--fg); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0 2rem; }
.btn { display: inline-block; border: 1px solid var(--fg); padding: .7rem 1.2rem; text-decoration: none; letter-spacing: .1em; font-size: .85rem; text-transform: uppercase; background: transparent; color: var(--fg); }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.primary:hover { background: transparent; color: var(--fg); }
.btn.big { padding: .95rem 1.6rem; font-size: .95rem; }
.btn.disabled { border-style: dashed; color: var(--dim); border-color: var(--dim); cursor: not-allowed; }
.more { text-decoration: none; letter-spacing: .1em; font-size: .85rem; border-bottom: 1px solid var(--fg); }

/* sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.alt { background: var(--panel); border-block: 1px solid var(--line); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.card { border: 1px solid var(--line); padding: 1.5rem; background: var(--panel); display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--fg); transform: translateY(-2px); }
.card h3 { margin-bottom: .6rem; }
.card p:not(.label) { color: #d0d0d0; flex: 1; }

/* game page */
.media.placeholder { border: 1px dashed var(--dim); aspect-ratio: 16/9; display: grid; place-content: center; text-align: center; margin: 1rem 0 2rem; background: repeating-linear-gradient(135deg, #0a0a0a, #0a0a0a 12px, #000 12px, #000 24px); color: var(--dim); }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; margin: 0; border-top: 1px solid var(--line); padding-top: 1rem; }
.specs dt { color: var(--dim); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; padding-top: .15rem; }
.specs dd { margin: 0; }
.specs.wide { max-width: 760px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 1.5rem; }
ul.plain li { padding: .25rem 0; }
ul.plain li::before { content: "> "; color: var(--dim); }
ul.plain.inline { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: 0; }

/* devlog */
.post-item { border-top: 1px solid var(--line); padding: 1.5rem 0; }
.post p { max-width: 65ch; }

/* press */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin: 1.5rem 0 2rem; }
.logo-tile { margin: 0; border: 1px solid var(--line); }
.logo-tile img { aspect-ratio: 4/3; object-fit: contain; width: 100%; padding: 1rem; }
.logo-tile img.dark { background: #000; }
.logo-tile img.light { background: #fff; }
.logo-tile figcaption { font-size: .78rem; padding: .7rem 1rem; border-top: 1px solid var(--line); background: var(--bg); color: var(--fg); display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2rem; margin-top: 2rem; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.foot-logo { width: 110px; height: 110px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: .15rem 0; }
.legal { color: var(--dim); font-size: .8rem; margin-top: 2rem; }

@media (max-width: 800px) {
  .hero-grid, .two, .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 300px; }
  .bar { justify-content: center; }
  nav { gap: .9rem; flex-wrap: wrap; justify-content: center; }
  .specs { grid-template-columns: 1fr; gap: .1rem; }
  .specs dd { margin-bottom: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .card { transition: none; }
}


/* ---------- COLOR LAYER ---------- */
::selection { background: var(--brand); color: #000; }
a:hover { background: var(--brand); color: #000; }
a:focus-visible, .btn:focus-visible { outline-color: var(--brand); }
nav a:hover { background: none; color: var(--brand); }
.brand:hover { background: none; color: var(--fg); }
.label { color: var(--dim); }
.boot { color: var(--brand); }
.cursor { color: var(--brand); }
.crumbs a:hover { color: #000; }
.hl { color: var(--brand); }
.date { color: var(--brand); }
.more { border-bottom-color: var(--brand); color: var(--brand); }
.more:hover { background: var(--brand); color: #000; }
ul.plain li::before { color: var(--brand); }

/* buttons */
.btn { border-color: var(--brand); color: var(--brand); }
.btn:hover { background: var(--brand); color: #000; }
.btn.primary { background: var(--brand); color: #000; border-color: var(--brand); font-weight: 700; }
.btn.primary:hover { background: transparent; color: var(--brand); }
.game .btn.primary { background: var(--accent); border-color: var(--accent); }
.game .btn.primary:hover { background: transparent; color: var(--accent); }
.btn.disabled { color: var(--dim); border-color: var(--dim); }

/* header line */
.site-header { border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255,176,0,.25); }

/* hero glow */
.hero { background: radial-gradient(60% 70% at 78% 50%, rgba(255,176,0,.13), transparent 70%); }
.hero-art img { filter: drop-shadow(0 0 28px rgba(255,176,0,.22)); }

/* glitch flicker on headline (plays once on load) */
.glitch { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .glitch { animation: flick 1.2s steps(1) 1; }
}
@keyframes flick {
  0%,100% { text-shadow: none; transform: none; }
  8%  { text-shadow: 3px 0 #ff4a3d, -3px 0 #3dd9ff; transform: translateX(-2px); }
  14% { text-shadow: none; transform: none; }
  30% { text-shadow: -4px 0 #ff4a3d, 4px 0 #3dd9ff; transform: translateX(2px); }
  36% { text-shadow: none; transform: none; }
  60% { text-shadow: 2px 0 #ff4a3d, -2px 0 #3dd9ff; }
  64% { text-shadow: none; }
}

/* cards use their game's accent */
.card { border-top: 3px solid var(--accent); }
.card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 30px -12px var(--accent); }
.card .label { color: var(--accent); }
.card h3 a:hover { background: none; color: var(--accent); }
.card .more { color: var(--accent); border-bottom-color: var(--accent); width: fit-content; }
.card .more:hover { background: var(--accent); color: #000; }

/* redaction bars */
.redact { background: var(--fg); color: var(--fg); padding: 0 .25em; user-select: none; border-radius: 1px; }

/* game pages */
.game h1 { border-bottom: 4px solid var(--accent); padding-bottom: .5rem; display: inline-block; }
.game .label:first-of-type { color: var(--accent); }
.game .media.placeholder { border-color: var(--accent); }
.game .media .label { color: var(--accent); }
.game ul.plain li::before { color: var(--accent); }
.specs dt { color: var(--accent); }

/* hazard stripe */
.hazard { height: 10px; margin-top: 2rem; background: repeating-linear-gradient(-45deg, var(--brand) 0 14px, #000 14px 28px); opacity: .9; }
.site-footer { margin-top: 0; }
.site-footer .label { color: var(--brand); }

/* post/press accents */
.post-item h2 a:hover { background: none; color: var(--brand); }
.post-item { border-top-color: var(--brand); border-top-style: dashed; }
.logo-tile figcaption a { color: var(--brand); }
.logo-tile.light figcaption a:hover, .logo-tile figcaption a:hover { color: #000; }

.game p.label { color: var(--accent); }
.hero-art img { filter: drop-shadow(0 0 30px rgba(255,176,0,.35)); }
