@font-face {
  font-family: "Fira Sans";
  src: url("fonts/FiraSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans Extra Condensed";
  src: url("fonts/FiraSansExtraCondensed-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --unlit: #15120b;
  --carpet: #221c10;
  --tile: #2b2415;
  --edge: #453a22;
  --lamp: #f5c842;
  --lamp-low: #b98f24;
  --paper: #f1e8d0;
  --dim: #b5aa8c;
  --alarm: #ff8a70;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--unlit);
  color: var(--paper);
  font: 500 1.0625rem/1.6 "Fira Sans", system-ui, sans-serif;
  font-synthesis: none;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--lamp); text-underline-offset: 0.18em; }
a:hover { color: var(--paper); }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; }

h1, h2, h3 {
  font-family: "Fira Sans Extra Condensed", "Fira Sans", sans-serif;
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
}

h1 { font-size: clamp(2.1rem, 9vw, 3.6rem); overflow-wrap: anywhere; }
h2 { font-size: 1.9rem; margin-top: 2.6rem; margin-bottom: 0.7rem; }
h3 { font-size: 1.4rem; margin-top: 1.7rem; margin-bottom: 0.4rem; }

strong { font-weight: 500; color: var(--lamp); }

p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.45em; }
li::marker { color: var(--lamp-low); }

/* The ceiling: one fluorescent panel, the page's only ornament. It lights whatever stands under it. */
.ceiling {
  position: relative;
  padding: 0 var(--gutter) 2.2rem;
  background:
    radial-gradient(90% 300px at 50% 0, rgba(245, 200, 66, 0.2), transparent 75%);
}
.ceiling::before {
  content: "";
  display: block;
  width: min(72%, 420px);
  height: 14px;
  margin: 0 auto 1.1rem;
  background: linear-gradient(#fff6d6, #ffe68d);
  box-shadow: 0 6px 60px 14px rgba(255, 224, 120, 0.42), 0 0 0 3px #3b3323;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
  min-height: 48px;
}
.brand {
  font: 700 1.5rem/1 "Fira Sans Extra Condensed", sans-serif;
  color: var(--paper);
  text-decoration: none;
}
.langs { display: flex; gap: 0.25rem; }
.langs a, .langs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.5rem;
}
.langs span { color: var(--dim); }

.reading {
  max-width: calc(44rem + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) 3.5rem;
}
.page-head { max-width: 44rem; margin: 1.1rem auto 0; }
.page-head p { color: var(--dim); margin: 0.6rem 0 0; }

.unset {
  color: var(--unlit);
  background: var(--alarm);
  padding: 0 0.35em;
}

/* Rows of data read as tiles on a phone and as a table when there is room. */
.rows { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 1rem; line-height: 1.5; }
.rows th { font: 700 1.2rem/1.2 "Fira Sans Extra Condensed", sans-serif; color: var(--dim); text-align: left; padding: 0.4rem 0.8rem 0.4rem 0; vertical-align: bottom; }
.rows td { vertical-align: top; padding: 0.75rem 0.8rem 0.75rem 0; border-top: 1px solid var(--edge); }
.rows td:first-child { color: var(--lamp); }
@media (max-width: 719px) {
  .rows thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rows, .rows tbody, .rows tr, .rows td { display: block; width: 100%; }
  .rows tr { background: var(--carpet); border: 1px solid var(--edge); padding: 0.9rem; margin-bottom: 0.7rem; }
  .rows td { border: 0; padding: 0 0 0.6rem; }
  .rows td:last-child { padding-bottom: 0; }
  .rows td:first-child { font: 700 1.3rem/1.2 "Fira Sans Extra Condensed", sans-serif; }
  .rows td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; color: var(--dim); font-size: 0.875rem; }
}

/* The game's own key: a lit plate on a darker lip. */
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.5rem 1.4rem;
  background: var(--lamp);
  color: #1d1705;
  font: 700 1.35rem/1.1 "Fira Sans Extra Condensed", sans-serif;
  text-align: center;
  text-decoration: none;
  border-bottom: 4px solid var(--lamp-low);
}
.key:hover { background: #ffdc6a; color: #1d1705; }
.key:active { border-bottom-width: 1px; margin-top: 3px; }

.notice {
  background: var(--carpet);
  border-left: 4px solid var(--lamp);
  padding: 0.9rem 1rem;
  margin: 1.2rem 0;
}
.notice > :last-child { margin-bottom: 0; }

/* Home. */
.hero-frame {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 1.4rem;
}
.hero-text h1 { font-size: clamp(4.2rem, 21vw, 8.5rem); line-height: 0.92; color: #fff4cf; text-shadow: 0 0 44px rgba(255, 224, 120, 0.3); }
.hero-text .line { font-size: 1.3rem; line-height: 1.35; margin: 1rem 0 1.3rem; max-width: 28ch; }
.hero-text .status { color: var(--dim); margin: 0.9rem 0 0; font-size: 1rem; }
.hero-frame img { width: 100%; aspect-ratio: 864 / 1200; object-fit: cover; }

.descent { max-width: calc(1080px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.floor { display: grid; gap: 1.1rem; padding: 2.4rem 0 0; }
.floor h2 { margin-top: 0; font-size: 2.3rem; }
.floor img { width: 100%; aspect-ratio: 864 / 1200; object-fit: cover; }
.floor figcaption, .caption { color: var(--dim); font-size: 0.95rem; margin-top: 0.5rem; }
.floor figure { margin: 0; }

.spec { max-width: calc(1080px + 2 * var(--gutter)); margin: 3rem auto 0; padding: 0 var(--gutter) 3rem; }
.spec h2 { margin-top: 0; }
.spec ul { padding-left: 1.15rem; columns: 1; max-width: 44rem; }

.foot {
  border-top: 1px solid var(--edge);
  background: #0f0d07;
  padding: 1.6rem var(--gutter) 2.4rem;
  font-size: 1rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; max-width: 1080px; margin: 0 auto; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; }
.foot p { max-width: 1080px; margin: 0.8rem auto 0; color: var(--dim); }

@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .hero-frame { grid-template-columns: 1.15fr 0.85fr; align-items: end; gap: 2.5rem; padding-top: 1rem; }
  .floor { grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; padding-top: 3.5rem; }
  .floor:nth-of-type(even) figure { order: 2; }
  .floor > div { max-width: 30rem; }
}

@media (prefers-reduced-motion: no-preference) {
  /* One flicker when the page loads, as a tube catching. */
  .ceiling::before { animation: catch 1.1s steps(1) 1; }
  @keyframes catch {
    0% { opacity: 0.15; }
    18% { opacity: 1; }
    26% { opacity: 0.25; }
    40% { opacity: 1; }
    48% { opacity: 0.5; }
    60% { opacity: 1; }
  }
}

/* The wordmark stands in for the title; the name stays in the heading for screen readers. */
.hero-frame h1 img.logo { display: block; width: min(100%, 520px); height: auto; aspect-ratio: auto; object-fit: contain; }
h1 .logo-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
