:root {
  --bg: #0d0f12;
  --panel: #15181d;
  --ink: #e7e2d6;
  --muted: #a39d90;
  --brass: #d9b45a;
  --rule: #2a2e35;
  --warn: #e0785a;
  --measure: 42rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f3ec;
    --panel: #ffffff;
    --ink: #1c1d20;
    --muted: #5d5a53;
    --brass: #8a6618;
    --rule: #ddd7ca;
    --warn: #a8402a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 Georgia, "Times New Roman", serif;
}

a { color: var(--brass); }
a:hover { text-decoration-thickness: 2px; }

header.site {
  border-bottom: 1px solid var(--rule);
  padding: 1rem;
}

header.site nav {
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  align-items: baseline;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
}

header.site .name {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 0.2em 0 0.4em; }
h2 { font-size: 1.35rem; margin-top: 2.2em; border-bottom: 1px solid var(--rule); padding-bottom: 0.25em; }
h3 { font-size: 1.1rem; margin-top: 1.6em; }

.lede { font-size: 1.2rem; color: var(--muted); }

.hero {
  text-align: center;
  padding: 3rem 0 1rem;
}

.hero .clock {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--brass);
  letter-spacing: 0.2em;
}

.stars { color: var(--brass); letter-spacing: 0.2em; font-size: 1.4rem; }

.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--brass);
  border-radius: 4px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  text-decoration: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
}

.warning { border-left: 4px solid var(--warn); }

table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

kbd {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0.05em 0.4em;
  background: var(--panel);
  white-space: nowrap;
}

.table-wrap { overflow-x: auto; }

footer.site {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 1rem;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  text-align: center;
}

/* ── Home page ──────────────────────────────────────────────────────── */

/* The hero sits on the key art, which is dark in either colour scheme, so its
   colours are fixed rather than taken from the tokens. */
.home .hero {
  --gold: #d9b45a;
  display: grid;
  place-items: center;
  min-height: min(82vh, 780px);
  padding: 4rem 1rem 3rem;
  text-align: center;
  color: #efe9dc;
  background:
    linear-gradient(180deg, rgba(8, 9, 12, 0.55) 0%, rgba(8, 9, 12, 0.35) 40%, rgba(8, 9, 12, 0.9) 88%, var(--bg) 100%),
    url("media/hero.webp") center 30% / cover no-repeat #0d0f12;
}

.home .hero-inner { max-width: 48rem; }

.home .hero h1 { margin: 0.4rem 0 0.2rem; }

.home .hero h1 img {
  width: min(680px, 88vw);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6));
}

.home .hero .clock {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--gold);
  letter-spacing: 0.25em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.home .hero .lede {
  color: #efe9dc;
  font-size: 1.35rem;
  margin: 0.4rem 0 1.2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.home .hero .meta {
  margin-top: 1.2rem;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: #cfc7b6;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.actions, .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.actions .button, .cta .button { margin-top: 0; }

.home .hero .button { color: var(--gold); border-color: var(--gold); background: rgba(8, 9, 12, 0.55); }
.home .hero .button.primary { background: var(--gold); color: #17130a; }

.button.primary { background: var(--brass); color: var(--bg); }
.button:hover { filter: brightness(1.12); }

.cta { margin: 2.5rem 0 1rem; }

/* Wider than the column of text, centred on it. */
.wide {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(64rem, calc(100vw - 2rem));
}

.video {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.video video { display: block; width: 100%; height: 100%; }

.opening { margin-top: 2.6rem; font-size: 1.15rem; }

.facts {
  list-style: none;
  padding: 0;
  margin: 2.2rem 0 0.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}

.facts li {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.9rem 1rem;
}

.facts strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--brass);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery figure { margin: 0; }

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--rule);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.gallery a:hover img, .gallery a:focus-visible img { transform: translateY(-2px); filter: brightness(1.1); }

.gallery figcaption, #viewer figcaption {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

#viewer {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
  overflow: visible;
}

#viewer::backdrop { background: rgba(5, 6, 8, 0.9); }

#viewer figure { margin: 0; text-align: center; }

#viewer img {
  display: block;
  max-width: 92vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: 6px;
}

#viewer figcaption { color: #cfc7b6; font-size: 0.95rem; margin-top: 0.6rem; }

#viewer button {
  position: absolute;
  top: calc(50% - 1.5rem);
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(8, 9, 12, 0.7);
  color: #efe9dc;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

#viewer .prev { left: 0.6rem; }
#viewer .next { right: 0.6rem; }
#viewer .close { top: 0.6rem; right: 0.6rem; }

@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .home .hero { min-height: min(70vh, 620px); padding-top: 3rem; }
  .home .hero .lede { font-size: 1.15rem; }
}

@media (max-width: 440px) {
  .gallery { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery img { transition: none; }
}
