@font-face {
  font-family: Cinzel;
  src: url(cinzel.woff2) format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --ground: #100d0b;
  --surface: #1e1813;
  --ink: #f1e8d4;
  --note: #b9ac93;
  --gold: #d9a93e;
  --gold-ink: #17110a;
  --margin: clamp(16px, 2.4vw, 32px);
  --gap: clamp(96px, 14vw, 200px);
  --display: Cinzel, Georgia, "Times New Roman", serif;
  --text: Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { background: var(--ground); scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { background: var(--ground); color: var(--ink); font: 18px/1.55 var(--text); overflow-x: clip; }
img, video { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.01em; line-height: 1.05; text-wrap: balance; }
h2 { font-size: clamp(36px, 5.4vw, 76px); }
h3 { font-size: 24px; line-height: 1.2; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--gold-ink); }

/* The bar */
.bar { position: absolute; z-index: 5; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--margin); background: linear-gradient(rgb(16 13 11 / .72), rgb(16 13 11 / 0)); }
.mark { font: 600 20px var(--display); text-decoration: none; }
.bar nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.bar nav a { font-size: 17px; text-decoration: none; }
.bar nav a:hover { color: var(--gold); }
.bar nav a[aria-current] { color: var(--gold); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.menu { display: none; width: 44px; height: 44px; padding: 11px 9px; background: none; border: 0; cursor: pointer; flex-direction: column; justify-content: space-between; }
.menu i { display: block; height: 2px; background: var(--ink); transition: transform .2s var(--ease), opacity .2s; }
.menu[aria-expanded="true"] i:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.menu[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu[aria-expanded="true"] i:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }
.lang { font: 600 16px var(--display); color: var(--gold-ink); background: var(--gold); border: 0; padding: 6px 10px; cursor: pointer; transition: transform .15s var(--ease); }
.lang:active { transform: scale(.94); }

/* The monument: the name hangs on chains, as on the game's title screen */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; background: #0b0a10; }
.hero-sky, .hero-front, .hero-clouds { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-sky, .hero-front { object-fit: cover; }
.hero-sky { transform: translateY(calc(var(--scroll, 0) * 14%)) scale(1.04); }
.hero-clouds { background: url(hero-clouds.webp) 0 0 / auto 100% repeat-x; animation: clouds 240s linear infinite; transform: translateY(calc(var(--scroll, 0) * 10%)); }
.hero-front { animation: drift 40s var(--ease) both alternate infinite; }
@keyframes clouds { to { background-position-x: calc(-200svh * 16 / 9); } }
.hero::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(rgb(8 6 8 / 0) 45%, rgb(8 6 8 / .62)); pointer-events: none; }
@keyframes drift { to { transform: scale(1.09) translateY(-1.5%); } }
.word { position: relative; z-index: 2; display: flex; justify-content: space-between; padding: 0 var(--margin); font-size: 15.4vw; font-weight: 700; line-height: .86; letter-spacing: 0; perspective: 1400px; color: #e9dcbf; }
.sign { position: relative; display: block; cursor: pointer; transform-style: preserve-3d; will-change: transform; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
/* Each letter hangs from an eye bolted through its top edge (--y: where the capital's top is, in em; --ring: a solid spot). The chain's
   last link is edge-on and threads the eye: the chain draws over the ring and ends in its hole. --k keeps them readable on a phone. */
.sign { --k: max(1em, 96px); --y: .032; }
.sign:nth-child(3) { --y: .018; }
.sign:nth-child(5) { --y: .016; }
.sign:nth-child(6) { --y: .022; }
.sign::before { content: ""; position: absolute; z-index: 1; left: var(--ring, 50%); margin-left: calc(var(--k) * -.03); top: calc(var(--y) * 1em - var(--k) * .036); width: calc(var(--k) * .06); height: 110vh; transform: translateY(-100%); background: url(chain.svg) bottom / calc(var(--k) * .06) calc(var(--k) * .2) repeat-y; pointer-events: none; }
.sign::after { content: ""; position: absolute; left: var(--ring, 50%); margin-left: calc(var(--k) * -.03); top: calc(var(--y) * 1em - var(--k) * .045); width: calc(var(--k) * .06); height: calc(var(--k) * .1); background: url(eye.svg) center / contain no-repeat; pointer-events: none; }
.last { color: var(--gold); }
.last i { display: block; font-style: normal; transform: rotate(9deg); transform-origin: 24% 4%; } /* the D, on its last nail */
.hero-foot { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 28px var(--margin) 28px; }
.hero-foot p { max-width: 60ch; font-size: 19px; text-shadow: 0 1px 12px #000; }
.hero-actions { display: flex; flex: none; flex-wrap: wrap; gap: 8px; }
.hero-actions .quiet { padding: 16px 24px; text-decoration: none; }

/* Controls */
.action { display: inline-block; flex: none; padding: 16px 28px; background: var(--gold); color: var(--gold-ink); font: 600 19px var(--display); text-decoration: none; border: 0; cursor: pointer; transition: transform .18s var(--ease), background-color .18s; }
.action:hover { background: #ecc25f; transform: translateY(-2px); }
.action:active { transform: translateY(1px) scale(.98); }
.action.dark { background: var(--gold-ink); color: var(--ink); }
.action.dark:hover { background: #2a1f13; }
.small { padding: 8px 14px; font-size: 15px; margin-top: 10px; }
.quiet { display: inline-block; padding: 14px 20px; text-decoration: none; background: var(--surface); color: var(--ink); font: 600 17px var(--display); border: 0; cursor: pointer; transition: transform .18s var(--ease), background-color .18s; }
.quiet:hover { background: #2d241b; transform: translateY(-2px); }
.quiet:active { transform: translateY(1px) scale(.98); }
.text-link { color: var(--gold); }

/* The game */
.game { padding: var(--gap) var(--margin) calc(var(--gap) / 2); }
.game h2 { font-size: clamp(36px, 6vw, 96px); margin-bottom: 48px; }
.statement { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; max-width: 34em; }
.points { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

/* The picture that opens to the whole screen */
.reel { height: 240vh; }
.reel-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.reel-title { position: absolute; z-index: 2; left: var(--margin); bottom: 24px; max-width: 80vw; padding: 10px 18px; background: var(--ground); font-size: clamp(24px, 3vw, 44px); }
.reel-plate { width: 100%; height: 100%; transform: scale(var(--open, .62)); will-change: transform; background: var(--surface); }
.reel-plate video { width: 100%; height: 100%; object-fit: cover; }

/* Maps */
.maps { padding: var(--gap) var(--margin); }
.giant { font-size: clamp(88px, 21vw, 340px); line-height: .85; font-weight: 600; margin-bottom: 48px; margin-left: -.04em; }
.map-rows li { display: grid; grid-template-columns: 5fr 7fr; gap: 8px 32px; align-items: baseline; padding: 24px 20px; margin-bottom: 8px; background: var(--surface); transition: background-color .2s, color .2s, transform .25s var(--ease); }
.map-rows li:hover { background: var(--gold); color: var(--gold-ink); transform: translateX(8px); }
.map-rows b { font: 500 clamp(24px, 2.6vw, 36px)/1.1 var(--display); }
.plate { margin-top: 72px; }
.plate img { width: 100%; }
figcaption { margin-top: 12px; }

/* The gallery */
.gallery-section { padding: 0 var(--margin) var(--gap); }
.gallery-section h2 { margin-bottom: 40px; }
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 32px 12px; }
.gallery li { grid-column: span 2; }
.gallery li:nth-child(1), .gallery li:nth-child(4) { grid-column: span 4; grid-row: span 2; }
.gallery p { margin-top: 10px; }
.shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }
.shot img { width: 100%; transition: transform .6s var(--ease); }
.shot:hover img { transform: scale(1.03); }
.lightbox { margin: auto; max-width: 96vw; max-height: 96vh; padding: 0; border: 0; background: none; }
.lightbox::backdrop { background: rgb(8 6 5 / .92); }
.lightbox form { text-align: right; margin-bottom: 8px; }
.lightbox img { max-height: 86vh; width: auto; }

/* Together */
.together { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding: 0 var(--margin) var(--gap); }
.together-picture img { width: 100%; }
.together-text p { margin-top: 20px; }

/* Download: the one field of gold */
.download { background: var(--gold); color: var(--gold-ink); padding: clamp(48px, 7vw, 96px) var(--margin); }
.mine .dl { outline: 3px solid var(--gold-ink); outline-offset: 4px; }
.how { padding: clamp(64px, 8vw, 112px) var(--margin); }
.how h2 { margin-bottom: 40px; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
.steps li { counter-increment: step; display: grid; gap: 10px; align-content: start; }
.steps li::before { content: counter(step); font: 600 clamp(48px, 6vw, 88px)/1 var(--display); color: var(--gold); }
.steps b { font: 500 26px/1.2 var(--display); }
.checks { margin-top: 24px; font-size: 15px; color: var(--note); }
.checks summary { cursor: pointer; min-height: 32px; }
.checks li { overflow-wrap: anywhere; margin-top: 8px; font-family: ui-monospace, monospace; font-size: 13px; }
.call { background: var(--gold); color: var(--gold-ink); padding: clamp(64px, 9vw, 128px) var(--margin); }
.call .giant { font-size: clamp(44px, 11.5vw, 190px); }
.call-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.call .quiet { background: rgb(23 17 10 / .14); color: var(--gold-ink); }
.call .quiet:hover { background: rgb(23 17 10 / .24); }
.download .giant { font-size: clamp(56px, 14.6vw, 240px); }
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 32px; }
.dl { display: block; padding: 28px 24px; background: var(--gold-ink); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), background-color .2s; }
.dl:hover { transform: translateY(-4px); background: #2a1f13; }
.dl[aria-disabled="true"] { cursor: default; transform: none; }
.dl b { display: block; font: 500 clamp(32px, 4vw, 56px)/1.1 var(--display); }
.download p { max-width: 70ch; }

/* Account */
.account-page { padding: 0 var(--margin) var(--gap); }
.page-head.short { padding-bottom: 32px; }
select { width: 100%; padding: 14px 16px; background: var(--surface); color: var(--ink); font: 18px var(--text); border: 2px solid #4a3b28; border-radius: 0; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; align-items: start; }
.setting { display: grid; gap: 14px; padding: 24px; background: var(--surface); min-width: 0; }
.setting h3 { margin: 0; }
.setting label { display: grid; gap: 6px; }
.setting .quiet { background: #33291f; justify-self: start; }
.setting .quiet:hover { background: #443629; }
.setting input:not([type=file]), .setting select { background: var(--ground); }
.danger summary { font: 500 24px/1.2 var(--display); cursor: pointer; color: #ff9d85; }
.danger form { display: grid; gap: 14px; margin-top: 14px; }
.profile-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 48px; }
.plain li { padding: 10px 0; display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid #33291f; overflow-wrap: anywhere; }
.plain li span:last-child { color: var(--note); flex: none; }
.auth { display: grid; gap: 20px; max-width: 620px; }
.auth label { display: grid; gap: 6px; }
input:not([type=file]) { width: 100%; padding: 14px 16px; background: var(--surface); color: var(--ink); font: 18px var(--text); border: 2px solid #4a3b28; border-radius: 0; }
input:focus { border-color: var(--gold); outline: 0; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.form-error { color: #ff9d85; }
.note { color: var(--note); font-size: 16px; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file:focus-within { outline: 3px solid var(--gold); outline-offset: 3px; }
.profile { min-width: 0; }
.profile-head { display: flex; gap: 24px; align-items: center; margin-bottom: 40px; }
.avatar { flex: none; width: clamp(112px, 14vw, 180px); aspect-ratio: 1; background: var(--surface); display: grid; place-items: center; overflow: hidden; font: 600 64px var(--display); color: var(--gold); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font: 500 clamp(32px, 4vw, 52px)/1.1 var(--display); overflow-wrap: anywhere; }
.profile h2 { font-size: clamp(28px, 3.4vw, 44px); margin: clamp(48px, 6vw, 72px) 0 24px; }

/* Figures */
.figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 260px), 1fr)); gap: 28px 24px; }
.figures dd { margin: 0; font: 500 clamp(26px, 2.8vw, 40px)/1.1 var(--display); font-variant-numeric: lining-nums; color: var(--gold); overflow-wrap: anywhere; }
.figures dt { order: 1; }
.figures div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.war { padding: 0 var(--margin) var(--gap); }
.war h2 { margin-bottom: 40px; }
.war p { margin-top: 32px; }

/* Dev log */
.log { padding: 0 var(--margin) var(--gap); }
.log-teaser { padding: 0 var(--margin) var(--gap); }
.log-teaser h2 { margin-bottom: 24px; }
.log-teaser p + p { margin-top: 32px; }
.entries figure, .entries video { margin-top: 20px; }
.entries img, .entries video { width: 100%; max-width: 1100px; }

/* The other pages */
.bar.solid { position: sticky; top: 0; background: rgb(16 13 11 / .94); border-bottom: 1px solid #2c2318; }
.page-head { padding: clamp(48px, 8vw, 112px) var(--margin) clamp(48px, 6vw, 80px); }
.page-head h1 { font-size: clamp(48px, 10vw, 160px); line-height: .95; margin-bottom: 28px; }
.stats-empty { padding: 0 var(--margin) var(--gap); font-size: clamp(24px, 2.6vw, 34px); }
.stat-group { padding: 0 var(--margin) clamp(64px, 8vw, 112px); }
.stat-group h2 { font-size: clamp(28px, 3.4vw, 44px); margin-bottom: 28px; }
.figures.big { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.figures.big dd { font-size: clamp(44px, 5vw, 76px); }
.bars li { position: relative; display: flex; justify-content: space-between; gap: 24px; padding: 14px 18px; margin-bottom: 6px; background: var(--surface); overflow: hidden; }
.bars li::before { content: ""; position: absolute; inset: 0; background: #3a2c17; transform-origin: left; transform: scaleX(var(--share, 0)); transition: transform .8s var(--ease); }
.bars span { position: relative; overflow-wrap: anywhere; }
.bars b { position: relative; font: 500 20px var(--display); color: var(--gold); }
.entries li { display: grid; grid-template-columns: 2fr 10fr; gap: 8px 32px; padding: 28px 0; }
.entries time { color: var(--gold); white-space: nowrap; }
.entries p { margin-top: 8px; max-width: 70ch; }

/* Graphs */
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; margin-bottom: 28px; }
.group-head h2 { margin: 0; }
.range { display: flex; align-items: center; gap: 4px; }
.range button { min-width: 44px; min-height: 40px; background: var(--surface); color: var(--ink); border: 0; font: 600 16px var(--display); cursor: pointer; }
.range button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.range span { margin-left: 8px; color: var(--note); }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; margin-bottom: 20px; }
.chart { padding: 20px; background: var(--surface); min-width: 0; }
.chart figcaption { margin: 0 0 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.chart figcaption b { font: 500 32px/1 var(--display); color: var(--gold); font-variant-numeric: lining-nums; }
.plot { display: flex; align-items: flex-end; gap: 1px; height: 120px; border-bottom: 1px solid #4a3b28; }
.plot i { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.plot i::before { content: ""; width: 100%; height: calc(var(--h, 0) * 100%); min-height: 0; background: var(--gold); border-radius: 2px 2px 0 0; }
.plot i.on::before { min-height: 3px; }
.plot i:hover::before { background: #f2d07f; }
.axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--note); font-size: 14px; }
.table-view { margin-top: 10px; color: var(--note); font-size: 15px; }
.table-view summary { cursor: pointer; min-height: 28px; }
.table-scroll { overflow-x: auto; }
.table-scroll table { border-collapse: collapse; margin-top: 8px; width: 100%; }
.table-scroll th, .table-scroll td { padding: 6px 10px 6px 0; text-align: left; border-bottom: 1px solid #33291f; white-space: nowrap; }
.tip { position: fixed; z-index: 9; left: 0; top: 0; transform: translate(var(--x, 0), var(--y, 0)); padding: 6px 10px; background: var(--ink); color: var(--gold-ink); font-size: 15px; pointer-events: none; white-space: nowrap; }
.heat-peak { font: 500 clamp(22px, 2.4vw, 30px)/1.2 var(--display); margin-bottom: 20px; }
.heat { display: grid; grid-template-columns: 2.6em repeat(24, minmax(0, 1fr)); gap: 2px; max-width: 1100px; font-size: 14px; }
.heat .hour { color: var(--note); }
.heat .dow { color: var(--note); align-self: center; }
.heat i { aspect-ratio: 1; max-height: 40px; width: 100%; background: var(--surface); }
.heat i[data-step="1"], .heat-legend i:nth-of-type(1) { background: #5e4a22; }
.heat i[data-step="2"], .heat-legend i:nth-of-type(2) { background: #7c612a; }
.heat i[data-step="3"], .heat-legend i:nth-of-type(3) { background: #9c7c31; }
.heat i[data-step="4"], .heat-legend i:nth-of-type(4) { background: #c0983a; }
.heat i[data-step="5"], .heat-legend i:nth-of-type(5) { background: #ecc25f; }
.heat-legend { display: flex; align-items: center; gap: 2px; margin: 14px 0; font-size: 14px; color: var(--note); }
.heat-legend i { width: 22px; height: 12px; }
.heat-legend span:first-child { margin-right: 8px; }
.heat-legend span:last-child { margin-left: 8px; }
.group-note { margin-bottom: 20px; }

/* The API page */
.api-table { min-width: 620px; }
.api-table td:last-child { white-space: normal; }
.api-table th { font-family: var(--display); color: var(--note); font-weight: 500; }
code { font-family: ui-monospace, "Cascadia Code", Menlo, monospace; font-size: .86em; color: var(--gold); }
.code { margin-top: 20px; padding: 16px 18px; background: var(--surface); overflow-x: auto; }
.lost-link { margin-top: 40px; }

/* Foot: the name again, inverted */
.foot { background: var(--ink); color: var(--gold-ink); padding: 64px var(--margin) 16px; overflow: hidden; }
.foot-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 56px; }
.foot h2 { font-size: 26px; margin-bottom: 12px; }
.foot-word { font: 700 15.4vw/.86 var(--display); text-align: center; white-space: nowrap; }

/* Entrances: only with script, so nothing stays hidden without it */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delay, 0ms); }
.js .reveal.seen { opacity: 1; transform: none; }

@media (max-width: 860px) {
  body { font-size: 17px; }
  .menu { display: flex; }
  .js .bar nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--margin) 16px; background: var(--ground); border-bottom: 1px solid #2c2318; }
  .js .bar nav.open { display: flex; }
  .bar nav a { padding: 12px 0; font-size: 20px; border-bottom: 1px solid #2c2318; }
  .bar nav .lang { align-self: flex-start; margin-top: 12px; padding: 10px 16px; }
  .bar { flex-wrap: wrap; }
  .gallery { grid-template-columns: 1fr; }
  .gallery li, .gallery li:nth-child(1), .gallery li:nth-child(4) { grid-column: auto; grid-row: auto; }
  .steps { grid-template-columns: 1fr; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions a { text-align: center; }
  .hero-foot p { font-size: 17px; }
  .heat { font-size: 12px; }
  .setting { padding: 18px; }
  .api-table { min-width: 0; }
  .api-table thead { display: none; }
  .api-table tr { display: block; padding: 12px 0; border-bottom: 1px solid #33291f; }
  .api-table td { display: block; padding: 2px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .hero-foot { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px var(--margin) 20px; }
  .action { text-align: center; }
  .together { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; gap: 20px; margin-top: 32px; }
  .map-rows li { grid-template-columns: 1fr; }
  .downloads { grid-template-columns: 1fr; }
  .entries li { grid-template-columns: 1fr; padding: 20px 0; }
  .reel { height: 200vh; }
  .profile-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-front, .hero-clouds { animation: none; }
  .reel { height: auto; }
  .reel-stage { position: static; display: block; height: auto; }
  .reel-plate { height: auto; aspect-ratio: 16 / 9; transform: none; }
  .reel-title { position: static; background: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}
