/* radialstrike.com: one stylesheet for every page. The colours follow the
   game: the dark chasm, lit islands and the gold title of its link preview. */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #070b16;
  --panel: #0f1628;
  --panel-edge: #232d47;
  --text: #e8e4d8;
  --muted: #a3a9b9;
  --gold: #f2c14e;
  --gold-deep: #d49a2a;
  --grass: #5f7a3a;
  --ink: #0b0f1c;
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    17px/1.6 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--gold);
}

h1,
h2,
h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.4em;
}

h1 {
  font-size: clamp(3rem, 9vw, 6rem);
  color: var(--gold);
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gold);
}

h3 {
  font-size: 1.6rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(var(--wrap), 100% - 32px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(7 11 22 / 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-edge);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--gold);
  text-decoration: none;
  margin-right: auto;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--gold);
  cursor: pointer;
}

.button:hover {
  background: #ffd36b;
}

.button.small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.95rem;
}

.button.ghost {
  background: transparent;
  color: var(--gold);
}

.button.ghost:hover {
  background: rgb(242 193 78 / 0.1);
}

.button:focus-visible,
a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero picture,
.hero picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 40%;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 4%, rgb(7 11 22 / 0.55) 45%, transparent),
    linear-gradient(to right, rgb(7 11 22 / 0.85), transparent 65%);
}

.hero .wrap {
  position: relative;
  z-index: 1;
  padding: 120px 0 56px;
}

.tagline {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  margin-bottom: 0.3em;
}

.lede {
  color: var(--muted);
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.caption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 28px;
}

/* Sections */
section {
  padding: 72px 0;
}

section + section {
  border-top: 1px solid var(--panel-edge);
}

.intro {
  color: var(--muted);
  max-width: 40em;
  margin-bottom: 32px;
}

.steps,
.modes {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 24px;
}

.card p:last-child {
  margin-bottom: 0;
}

.steps .card {
  counter-increment: step;
}

.steps .card h3::before {
  content: counter(step) '. ';
  color: var(--gold);
}

.meta {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.split {
  display: grid;
  gap: 32px;
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1.1fr 1fr;
  }
}

.shot {
  border-radius: var(--radius);
  border: 1px solid var(--panel-edge);
}

.promise {
  text-align: center;
}

.promise p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.fine {
  color: var(--muted);
  max-width: 44em;
}

.fine h3 {
  color: var(--text);
  font-size: 1.3rem;
  margin-top: 1.4em;
}

textarea {
  width: 100%;
  min-height: 160px;
  background: var(--ink);
  color: var(--text);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  padding: 12px;
  font:
    0.9rem/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}

.handoff {
  margin: 24px 0;
}

.handoff[hidden] {
  display: none;
}

/* Play page */
.choose {
  padding: 56px 0 72px;
}

.choose h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
}

.games {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 32px;
}

@media (min-width: 860px) {
  .games {
    grid-template-columns: 1.35fr 1fr;
    align-items: start;
  }
}

.game {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  overflow: hidden;
}

.game.lead {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 1px var(--gold-deep);
}

.game img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.game .body {
  padding: 24px;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 10px;
}

.badge.quiet {
  background: var(--panel-edge);
  color: var(--text);
}

/* Footer */
footer {
  border-top: 1px solid var(--panel-edge);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.9rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

footer a {
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
