/* The two typefaces, served from here so that no visitor is sent to another company for them. */
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/barlow-condensed-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/barlow-condensed-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/barlow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/barlow-latin-500-normal.woff2) format('woff2'); }

:root {
  --ink: #f3f0e8;
  --dim: #a09c92;
  --accent: #ffb347;
  --hot: #ff6a4d;
  --cyan: #35e0ff;
  --bg: #07080c;
  --plate: #12151e;
  --line: rgba(255, 255, 255, 0.1);
  --display: 'Barlow Condensed', 'Bahnschrift', 'DIN Alternate', 'Segoe UI', system-ui, sans-serif;
  --text: 'Barlow', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* The wordmark: filled CUE, lighter REPUBLIC, the same gradient as in the game. */
.mark { font: 800 26px/1 var(--display); letter-spacing: 0.12em; background: linear-gradient(100deg, #ffe08a, var(--accent) 50%, var(--hot)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mark span { margin-left: 0.28em; }
.mark.small { font-size: 20px; }

.bar { position: fixed; inset: 0 0 auto 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px var(--gutter); background: linear-gradient(rgba(7, 8, 12, 0.92), rgba(7, 8, 12, 0.6)); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar nav { display: flex; gap: clamp(12px, 2.4vw, 30px); font: 600 14px var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.bar nav a:hover, .bar nav a:focus-visible { color: var(--accent); }

.hero { position: relative; min-height: min(100vh, 900px); display: grid; align-items: end; overflow: hidden; }
/* The picture is in two layers, a little larger than the space so that moving them never shows an edge. */
.hero { --mx: 0; --my: 0; }
.hero-shot, .hero-cue { position: absolute; inset: -4%; width: 108%; max-width: none; height: 108%; object-fit: cover; object-position: 50% 60%; will-change: transform; }
.hero-shot { transform: translate(calc(var(--mx) * -14px), calc(var(--my) * -9px)); }
/* The cue turns about its tip, and draws back as the mouse comes down the page. */
.hero-cue { transform-origin: 50% 61%; transform: translate(calc(var(--mx) * -14px), calc(var(--my) * -9px + (var(--my) + 1) * 9px)) rotate(calc(var(--mx) * -4deg)); filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.5)); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 8, 12, 0.96), rgba(7, 8, 12, 0.72) 38%, rgba(7, 8, 12, 0.1) 70%), linear-gradient(0deg, var(--bg), rgba(7, 8, 12, 0) 35%); }
.hero-text { position: relative; transform: translate(calc(var(--mx) * 16px), calc(var(--my) * 10px)); will-change: transform; max-width: 700px; padding: 120px var(--gutter) clamp(48px, 9vh, 110px); }
.kicker { margin: 0 0 10px; font: 600 14px var(--display); letter-spacing: 0.5em; text-transform: uppercase; color: var(--dim); }
h1 { margin: 0; font: 800 clamp(52px, 10.5vw, 112px)/0.92 var(--display); letter-spacing: 0.1em; background: linear-gradient(100deg, #ffe08a, var(--accent) 50%, var(--hot)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 28px rgba(255, 150, 60, 0.35)); }
h1 span { display: block; }
.strap { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; font: 600 15px var(--display); letter-spacing: 0.34em; text-transform: uppercase; color: var(--dim); }
.strap::before { content: ''; width: 38px; height: 2px; background: var(--accent); }
.lead { margin: 22px 0 0; font-size: 19px; color: #d9d5cb; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.badge { padding: 12px 26px; font: 700 15px var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: #1a1208; background: linear-gradient(100deg, #ffc247, #ff7a4d); clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
.badge.quiet { color: var(--ink); background: rgba(255, 255, 255, 0.1); }
.note { margin: 16px 0 0; font-size: 15px; color: var(--dim); }
.note b { color: var(--accent); font-weight: 500; }
a.badge:hover, a.badge:focus-visible { background: var(--accent); color: #1a1208; }
.plays { margin: 14px 0 0; font: 600 14px var(--display); letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink); }
.plays i { font-style: normal; color: var(--accent); }

h3 { margin: 0; font: 700 20px var(--display); letter-spacing: 0.12em; text-transform: uppercase; }
.split.top { align-items: start; margin-top: 30px; }
.points.dim li { border-left-color: var(--line); }
.fine { margin: 14px 0 0; font-size: 14px; color: var(--dim); }
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; margin-top: 34px; }
.dl { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 16px; padding: 20px 26px; color: #1a1208; background: linear-gradient(100deg, #ffc247, #ff7a4d);
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); transition: filter 0.15s; position: relative; }
/* The frame the game's own buttons have: a line of white inside the edge, and a dark one inside that. (Drawn as a slanted shape of its own, so that it follows the slant of the button.) */
.dl::before { content: ''; position: absolute; inset: 4px 7px; background: #0b0d12; clip-path: polygon(11px 0, 100% 0, calc(100% - 11px) 100%, 0 100%); }
.dl::after { content: ''; position: absolute; inset: 7px 11px; background: linear-gradient(100deg, #ffc247, #ff7a4d); clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.dl { background: #fff; }
.dl > * { position: relative; z-index: 1; }
.dl:hover, .dl:focus-visible { filter: brightness(1.12); }
.dl .os { grid-row: span 2; width: 34px; height: 34px; fill: #1a1208; }
.dl b { font: 800 21px var(--display); letter-spacing: 0.12em; text-transform: uppercase; }
.dl span { font-size: 13px; }
.how { max-width: 820px; margin-top: 26px; font-size: 15px; color: #cfcbc1; }
.how p { margin: 0 0 10px; }
.how code { padding: 1px 6px; background: var(--plate); font: 13px Consolas, monospace; }
.how summary { cursor: pointer; color: var(--dim); }
.how pre { overflow-x: auto; padding: 12px; background: var(--plate); font: 12px/1.6 Consolas, monospace; color: var(--dim); }

.band { padding: clamp(56px, 9vw, 110px) var(--gutter); border-top: 1px solid var(--line); }
.band:nth-of-type(odd) { background: linear-gradient(160deg, #0c0e15, var(--bg)); }
h2 { display: flex; align-items: baseline; gap: 16px; margin: 0; font: 800 clamp(34px, 5.4vw, 60px)/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
h2 i { font: 600 15px var(--display); letter-spacing: 0.2em; color: var(--accent); font-style: normal; }
.intro { max-width: 640px; margin: 14px 0 0; color: var(--dim); }

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 36px 0 0; padding: 0; list-style: none; }
.games li { display: grid; justify-items: center; gap: 12px; padding: 24px 8px 18px; background: var(--plate); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); font: 600 15px var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
.games b { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--c); font: 800 17px var(--display); letter-spacing: 0; color: #111; box-shadow: inset -8px -10px 16px rgba(0, 0, 0, 0.5), inset 6px 6px 12px rgba(255, 255, 255, 0.4), 0 8px 18px rgba(0, 0, 0, 0.6); }
/* The number sits on a white disc, as on a real ball. */
.games b { position: relative; isolation: isolate; }
.games b::before { content: ''; position: absolute; inset: 14px; z-index: -1; border-radius: 50%; background: #f6f2e6; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 70px); align-items: center; }
.points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.points li { padding-left: 20px; border-left: 2px solid var(--accent); color: #cfcbc1; }
.points b { color: var(--ink); font-weight: 500; }
figure { margin: 0; }
figure img { width: 100%; border-top: 2px solid var(--accent); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
.film video { display: block; width: 100%; height: auto; border-top: 2px solid var(--accent); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); background: #000; }
#specs .film { position: sticky; top: 90px; }
figcaption { margin-top: 12px; font: 600 13px var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; margin-top: 36px; }
.gallery a { position: relative; overflow: hidden; background: var(--plate); clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px)); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.35s ease, filter 0.35s ease; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.04); filter: brightness(1.12); }
.gallery span { position: absolute; left: 0; bottom: 0; padding: 8px 22px 8px 16px; font: 600 13px var(--display); letter-spacing: 0.18em; text-transform: uppercase; background: rgba(7, 8, 12, 0.85); clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 12px; margin-top: 36px; }
.cards article { padding: 24px 26px 22px; background: var(--plate); border-top: 2px solid var(--accent); clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
.cards h3 { margin: 0 0 8px; font: 700 24px var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.cards p { margin: 0; color: var(--dim); }

#specs h3 { margin-top: 26px; color: var(--accent); }
#specs h3 + .specs { margin-top: 12px; }
#specs .split { align-items: start; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; margin: 28px 0 0; }
.specs dt { font: 700 14px var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); padding-top: 3px; }
.specs dd { margin: 0; color: #cfcbc1; }

footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 30px var(--gutter); border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
footer p { margin: 0; }
footer a { text-decoration: underline; }
#privacy .intro { max-width: 760px; }

#lightbox { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 3vmin; background: rgba(4, 5, 8, 0.94); cursor: zoom-out; }
#lightbox[hidden] { display: none; }
#lightbox img { max-height: 94vh; box-shadow: 0 30px 90px #000; }

@media (max-width: 860px) {
  .bar nav a:not(:nth-child(-n + 3)) { display: none; }
  .split { grid-template-columns: 1fr; }
  .hero-shade { background: linear-gradient(0deg, var(--bg) 8%, rgba(7, 8, 12, 0.78) 45%, rgba(7, 8, 12, 0.35)); }
  .hero-shot, .hero-cue { object-position: 60% 50%; }
}
@media (max-width: 480px) {
  .bar nav { display: none; }
  .specs { grid-template-columns: 1fr; gap: 4px; }
  .specs dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery img { transition: none; }
}

/* The notice about cookies, until it is dismissed. */
#notice { position: fixed; left: 50%; bottom: 18px; z-index: 15; display: flex; align-items: center; gap: 18px; width: min(720px, calc(100vw - 28px)); transform: translateX(-50%); padding: 14px 18px 14px 20px;
  background: rgba(18, 21, 30, 0.97); border-top: 2px solid var(--accent); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7); font-size: 14.5px; color: #cfcbc1; }
#notice[hidden] { display: none; }
#notice p { margin: 0; flex: 1; }
#notice a { text-decoration: underline; }
#notice button { flex: none; padding: 10px 24px; border: 0; cursor: pointer; font: 700 14px var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: #1a1208; background: linear-gradient(100deg, #ffc247, #ff7a4d); clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%); }
@media (max-width: 560px) { #notice { flex-direction: column; align-items: stretch; text-align: center; gap: 12px; } }

/* Read by a screen reader or a search engine; not shown. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; font-size: 0; }

/* ---- in the manner of the game's menu ---- */
/* The menu at the top: each entry a slanted plate, as the game's are; the section being read is lit, with a bar at its edge. */
.bar nav { gap: 2px; color: #cfcabd; }
.bar nav a { position: relative; padding: 9px 16px 9px 15px; font-weight: 700; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); transition: background 0.14s, color 0.14s; }
.bar nav a:hover, .bar nav a:focus-visible { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); }
.bar nav a.on { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 36%, transparent), transparent); color: var(--ink); }
.bar nav a.on::before { content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 4px; background: var(--accent); transform: skewX(-18deg); box-shadow: 0 0 14px var(--accent); }
.mark { transition: filter 0.14s; }
a.mark:hover { filter: brightness(1.2) drop-shadow(0 0 12px rgba(255, 150, 60, 0.5)); }
/* Links in the text: the accent colour, and the same slanted plate behind them under the mouse. */
p a, footer a, #notice a, dd a, li a { color: var(--accent); text-decoration: none; padding: 1px 8px; margin: 0 -4px; clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); transition: background 0.14s, color 0.14s; }
footer a, #notice a { text-decoration: none; }
p a:hover, footer a:hover, #notice a:hover, dd a:hover, li a:hover, p a:focus-visible, footer a:focus-visible, #notice a:focus-visible { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); }
/* The quieter buttons light the way the game's options do; the bright ones brighten. */
.badge { transition: background 0.14s, color 0.14s, filter 0.14s; }
a.badge.quiet:hover, a.badge.quiet:focus-visible { background: color-mix(in srgb, var(--accent) 34%, transparent); color: var(--ink); }
#notice button { transition: filter 0.14s; }
#notice button:hover { filter: brightness(1.12); }
/* Everything else the mouse can rest on: its plate lights from the left, slanted at the far end. */
.cards article { transition: background 0.16s; }
.cards article:hover { background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 26%, var(--plate)), var(--plate) 75%); }
.cards article:hover h3 { color: var(--accent); }
.games li { transition: background 0.16s, color 0.16s; }
.games li:hover { background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 34%, var(--plate)), var(--plate)); color: var(--ink); }
.points li { transition: background 0.16s; clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
.points li:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 20%, transparent), transparent 85%); }
.specs dt, .specs dd { transition: color 0.16s; }
.gallery span { transition: background 0.16s, color 0.16s; }
.gallery a:hover span, .gallery a:focus-visible span { background: var(--accent); color: #1a1208; }
.how summary { display: inline-block; padding: 4px 14px; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); transition: background 0.14s, color 0.14s; }
.how summary:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); }
figure img, .film video { transition: filter 0.2s; }
figure:hover img { filter: brightness(1.08); }
@media (max-width: 900px) { .bar nav a { padding: 7px 9px; } }
@media (prefers-reduced-motion: reduce) { .bar nav a, .cards article, .games li, .points li, .badge { transition: none; } }

/* ---- small screens: the menu behind a button ---- */
.menu-btn { display: none; padding: 9px 20px; border: 0; cursor: pointer; font: 700 14px var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); background: rgba(255, 255, 255, 0.1); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); transition: background 0.14s; }
.menu-btn:hover, .bar.open .menu-btn { background: color-mix(in srgb, var(--accent) 34%, transparent); }
@media (max-width: 1100px) {
  .menu-btn { display: block; }
  .bar nav, .bar nav a:not(:nth-child(-n + 3)) { display: none; }
  .bar.open nav { display: grid; position: absolute; left: 0; right: 0; top: 100%; gap: 2px; padding: 10px var(--gutter) 16px; background: rgba(7, 8, 12, 0.97); border-bottom: 1px solid var(--line); font-size: 17px; max-height: calc(100vh - 60px); overflow-y: auto; }
  .bar.open nav a, .bar.open nav a:not(:nth-child(-n + 3)) { display: block; padding: 13px 18px; clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
  .bar.open nav a.on::before { left: 0; transform: none; }
}
/* Nothing wider than the screen, whatever its size; things to press big enough for a thumb. */
html, body { overflow-x: clip; }
img, video { max-width: 100%; height: auto; }
.hero-shot, .hero-cue { height: 108%; }
.gallery img { height: auto; }
.how pre { max-width: 100%; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 860px) {
  .downloads { grid-template-columns: 1fr 1fr; }
  .cta .badge { padding: 12px 20px; }
  .curtain-foot { width: 80vw; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .downloads { grid-template-columns: 1fr; }
  .dl { padding: 18px 24px; }
  .games { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .gallery { grid-template-columns: 1fr; }
  .band { padding-left: 18px; padding-right: 18px; }
  .hero-text { padding-left: 18px; padding-right: 18px; }
  footer { flex-direction: column; align-items: flex-start; }
}
