/* Awakened World: the 3D Citadel is the hero, the page is quiet text over it (docs/site-plan.md). */
:root {
  --abyss: #08171c;       /* night sky, the avatar's background */
  --deep: #0f2e35;
  --copper: #c2803f;      /* the avatar's gear */
  --patina: #5fa79a;      /* oxidized copper, the Citadel's cladding in the game */
  --core: #9b5cff;        /* the Aether Core */
  --parchment: #e9e2d2;   /* text */
  --muted: #a9b5ad;
  --display: "Forum", "Times New Roman", serif;
  --body: "Golos Text", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--parchment);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

/* loading line at the bottom while the model streams in */
.loader { position: fixed; left: 50%; bottom: 9vh; transform: translateX(-50%); width: min(320px, 70vw);
  z-index: 3; text-align: center; transition: opacity .8s; }
.loader-line { display: block; height: 1px; background: var(--patina); transform-origin: left;
  transform: scaleX(var(--load, 0)); transition: transform .3s; }
.loader-text { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); }
.loaded .loader { opacity: 0; pointer-events: none; }

/* top bar */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 4; display: flex; justify-content: space-between;
  align-items: center; padding: 18px var(--gutter); pointer-events: none; }
.bar > * { pointer-events: auto; }
.mark { font: 400 22px/1 var(--display); color: var(--parchment); text-decoration: none; letter-spacing: .02em; }
.langs { display: flex; gap: 2px; padding: 2px 4px; border-radius: 8px; background: color-mix(in srgb, var(--abyss) 45%, transparent);
  backdrop-filter: blur(6px); }
.langs button { font: 500 13px/1 var(--body); color: var(--muted); background: none; border: 0; padding: 8px 7px;
  cursor: pointer; border-radius: 4px; }
.langs button[aria-pressed="true"] { color: var(--copper); }
.langs button:hover { color: var(--parchment); }

/* sections: tall scroll stops, text docked to the left over a soft scrim */
main { position: relative; z-index: 2; }
.stop { min-height: 140vh; padding: 0 var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.stop > * { max-width: 34rem; }
.hero { min-height: 100vh; justify-content: flex-end; padding-bottom: 12vh;
  background: linear-gradient(90deg, color-mix(in srgb, var(--abyss) 70%, transparent), transparent 60%); }
h1 { font: 400 clamp(46px, 9.5vw, 136px)/.92 var(--display); margin: 0 0 24px; letter-spacing: -.01em;
  text-shadow: 0 2px 40px rgba(8, 23, 28, .7); }
.lead { font-size: clamp(17px, 1.4vw, 20px); margin: 0 0 28px; max-width: 32rem; }
.address { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.address-text { font: 600 clamp(18px, 1.6vw, 22px)/1 var(--body); padding: 13px 18px; border: 1px solid var(--copper);
  border-radius: 6px; background: color-mix(in srgb, var(--abyss) 55%, transparent); color: var(--parchment); }
.copy { font: 600 15px/1 var(--body); padding: 14px 20px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--copper); color: var(--abyss); }
.copy:hover { background: #d4924f; }
.copy-status { min-height: 1.6em; margin: 8px 0 0; font-size: 14px; color: var(--patina); }
.when { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.hint { margin: 18px 0 0; color: var(--muted); font-size: 14px; }

:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

/* content sections: plain text over a soft scrim on the left, the Citadel keeps the right side */
.stop:not(.hero) { background: linear-gradient(90deg, color-mix(in srgb, var(--abyss) 78%, transparent) 0, color-mix(in srgb, var(--abyss) 45%, transparent) 38rem, transparent 60%); }
h2 { font: 400 clamp(36px, 4.6vw, 64px)/1.02 var(--display); margin: 0 0 22px; text-shadow: 0 2px 30px rgba(8, 23, 28, .6); }
h3 { font: 600 18px/1.3 var(--body); margin: 22px 0 6px; color: var(--copper); }
.stop p { margin: 0 0 16px; }
.floors { list-style: none; margin: 8px 0 20px; padding: 0; columns: 2; column-gap: 28px; }
.floors li { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; break-inside: avoid; }
.floors .num { font: 400 20px/1 var(--display); color: var(--patina); min-width: 1.4em; text-align: right; }
.people { margin: 10px 0 0; }
.people > div { padding: 16px 0; border-top: 1px solid color-mix(in srgb, var(--patina) 35%, transparent); }
.people dt { font: 400 28px/1.1 var(--display); }
.people dd { margin: 6px 0 0; }
.people .quote { color: var(--muted); font-style: italic; }
.ai { font: 600 11px/1 var(--body); font-style: normal; color: var(--core); border: 1px solid var(--core); border-radius: 4px;
  padding: 3px 5px; vertical-align: 6px; letter-spacing: .04em; }
.life h3:first-child { margin-top: 0; }
.steps { margin: 0 0 24px; padding-left: 1.3em; }
.steps li { padding: 6px 0 6px 4px; }
.steps li::marker { font: 400 20px var(--display); color: var(--patina); }
code { font: 600 .95em var(--body); color: var(--parchment); background: color-mix(in srgb, var(--deep) 80%, transparent);
  padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta { font: 600 15px/1 var(--body); padding: 15px 22px; border-radius: 6px; background: var(--copper); color: var(--abyss); text-decoration: none; }
.cta:hover { background: #d4924f; }
.copy-ghost { background: transparent; color: var(--parchment); border: 1px solid var(--copper); }
.copy-ghost:hover { background: color-mix(in srgb, var(--copper) 18%, transparent); }
.prices { margin: 0 0 18px; }
.prices > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0;
  border-top: 1px solid color-mix(in srgb, var(--patina) 35%, transparent); }
.prices dt { font: 400 26px/1.1 var(--display); }
.prices dd { margin: 0; font: 600 18px/1.4 var(--body); text-align: right; }
.rules { margin: 0; padding-left: 1.1em; }
.rules li { padding: 3px 0; }
.foot { position: relative; z-index: 2; padding: 40px var(--gutter) 48px; color: var(--muted); font-size: 13px;
  background: linear-gradient(0deg, var(--abyss), transparent); }
.foot a { color: var(--parchment); }
.foot p { max-width: 40rem; margin: 8px 0 0; }

@media (max-width: 760px) {
  .stop:not(.hero) { justify-content: flex-end; padding-bottom: 10vh;
    background: linear-gradient(0deg, color-mix(in srgb, var(--abyss) 88%, transparent) 45%, transparent 85%); }
  .floors { columns: 1; }
  .hero { padding-bottom: 8vh; background: linear-gradient(0deg, color-mix(in srgb, var(--abyss) 85%, transparent) 30%, transparent 75%); }
  .bar { padding-top: 12px; }
}
