@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Italic.ttf") format("truetype"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }

:root {
  --stage: #0a0a0c;
  --stage2: #101014;
  --panel: #121216;
  --line: #26262c;
  --gold-line: rgba(232, 184, 75, .38);
  --porcelain: #ece6da;
  --dim: #a79d8b;
  --faint: #6e675b;
  --orange: #e5481f;
  --orange2: #c96d34;
  --gold: #e8b84b;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--stage);
  color: var(--porcelain);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(236,230,218,.05) 1px, transparent 1px);
  background-size: 5px 5px;
}
main, header, footer, .announce { position: relative; z-index: 1; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--orange); }
img { max-width: 100%; display: block; }

/* ---------- announcement bar ---------- */
.announce {
  background: linear-gradient(90deg, #171106, #241a08, #171106);
  border-bottom: 1px solid var(--gold-line);
  color: var(--gold);
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  text-align: center; padding: 9px 14px;
}
.announce b { color: var(--porcelain); font-weight: 700; }

/* ---------- nav ---------- */
header.nav {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 20px; max-width: 1180px; margin: 0 auto; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 12, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
section[id] { scroll-margin-top: 92px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--porcelain); }
.brand svg { width: 30px; height: 30px; }
.brand .word { font-family: var(--serif); font-size: 25px; letter-spacing: .04em; }
.brand .word em { color: var(--orange); font-style: italic; }
nav.links { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; align-items: center; }
nav.links a { color: var(--dim); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
nav.links a:hover, nav.links a.here { color: var(--porcelain); }
header.nav .nav-connect { flex: none; }
.btn {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--orange); color: #fff; border: 1px solid var(--orange);
  padding: 11px 20px; border-radius: 2px; cursor: pointer; transition: .18s;
}
.btn:hover { background: #c93a15; border-color: #c93a15; color: #fff; }
.btn.ghost { background: transparent; color: var(--porcelain); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.gold { background: transparent; color: var(--gold); border-color: var(--gold-line); }
.btn.gold:hover { background: rgba(232,184,75,.1); color: var(--gold); }
.btn:disabled { opacity: .45; cursor: wait; }
.btn.small { padding: 8px 14px; font-size: 11.5px; }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
section { padding: 54px 0 8px; }
.kicker { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; }
h1 { font-size: clamp(46px, 9.5vw, 96px); letter-spacing: .01em; }
h1 em, h2 em { font-style: italic; color: var(--orange); }
h2 { font-size: clamp(32px, 6vw, 52px); margin-bottom: 14px; }
h3 { font-size: 24px; }
p.lede { color: var(--dim); max-width: 640px; font-size: 15.5px; }
.mono-small { font-size: 12px; color: var(--faint); letter-spacing: .06em; }

/* ---------- hero stage ---------- */
.hero { padding-top: 30px; }
.stage-frame {
  margin-top: 30px; border: 1px solid var(--line); background: var(--stage2);
  padding: 12px; position: relative;
}
.stage-frame::after {
  content: "LIVING WORK · PHASES AT 00:00 UTC"; position: absolute; top: -9px; right: 18px;
  background: var(--stage); padding: 0 10px; font-size: 10px; letter-spacing: .24em; color: var(--gold);
}
.stage-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 12px; }
.stage-main img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid #1c1c22; }
.stage-side { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.stage-side img { width: 100%; height: 100%; object-fit: cover; border: 1px solid #1c1c22; }
.stage-cap { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; font-size: 11.5px; color: var(--faint); letter-spacing: .08em; flex-wrap: wrap; }
.stage-cap b { color: var(--porcelain); }

/* ---------- facts band ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin-top: 34px; }
.fact { padding: 18px 16px; border-right: 1px solid var(--line); min-width: 0; }
.fact:last-child { border-right: none; }
.fact .num { font-family: var(--serif); font-size: clamp(24px, 4.6vw, 36px); color: var(--porcelain); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact .lab { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }
.fact.hot .num { color: var(--gold); }

/* ---------- consoles ---------- */
.console {
  border: 1px solid var(--line); background: var(--panel); padding: 22px; margin-top: 18px;
  position: relative;
}
.console.goldframe { border-color: var(--gold-line); }
.console h3 { margin-bottom: 6px; }
.console .sub { color: var(--dim); font-size: 13.5px; max-width: 620px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
input[type="number"], input[type="text"] {
  background: #0c0c0f; border: 1px solid var(--line); color: var(--porcelain);
  font-family: var(--mono); font-size: 15px; padding: 11px 14px; border-radius: 2px; width: 180px;
}
input:focus { outline: none; border-color: var(--gold-line); }
.status { font-size: 13px; color: var(--dim); margin-top: 12px; min-height: 20px; }
.status b { color: var(--porcelain); }
.status .ok { color: var(--gold); }
.status .bad { color: var(--orange); }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.door { border: 1px solid var(--line); padding: 18px; background: #0e0e11; }
.door.gold { border-color: var(--gold-line); }
.door .amount { font-family: var(--serif); font-size: 34px; margin: 6px 0 2px; }
.door.gold .amount { color: var(--gold); }
.door .dlab { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); }
.door p { font-size: 12.5px; color: var(--dim); margin: 8px 0 14px; }
.promptbox {
  background: #0c0c0f; border: 1px dashed #3a3a42; padding: 14px 16px; font-size: 12.5px;
  color: var(--dim); white-space: pre-wrap; word-break: break-word; margin-top: 14px;
}
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.tier { border: 1px solid var(--line); padding: 14px; background: #0e0e11; }
.tier .tp { font-family: var(--serif); font-size: 26px; color: var(--porcelain); }
.tier .tl { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }

/* ---------- living wall ---------- */
.wall { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 18px; }
.tile { position: relative; border: 1px solid #1d1d23; aspect-ratio: 1; overflow: hidden; background: #0d0d10; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .tid { position: absolute; left: 5px; bottom: 4px; font-size: 9.5px; color: rgba(236,230,218,.85); text-shadow: 0 1px 3px #000; letter-spacing: .08em; }
.tile.burned img { filter: grayscale(1) brightness(.32); }
.tile.burned::after { content: "ASH"; position: absolute; top: 4px; right: 5px; font-size: 9px; letter-spacing: .2em; color: var(--faint); }
.tile.kept::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.tile.relic { border-color: var(--gold-line); }
.tile.empty { display: flex; align-items: center; justify-content: center; color: #2c2c33; font-size: 10px; letter-spacing: .14em; }
.wall-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 11px; color: var(--faint); margin-top: 12px; letter-spacing: .08em; }
.wall-legend .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 6px; }

/* ---------- prose pages ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 38px; font-size: 34px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--dim); margin: 10px 0; font-size: 14.5px; }
.prose ul { color: var(--dim); margin: 10px 0 10px 20px; font-size: 14.5px; }
.prose li { margin: 5px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { color: var(--gold); font-weight: 400; letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
.prose td { color: var(--dim); }
.prose td:first-child { color: var(--porcelain); }
code { background: #0c0c0f; border: 1px solid var(--line); padding: 1px 6px; font-size: 12.5px; color: var(--gold); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 70px; background: #08080a; }
.foot-grid { max-width: 1180px; margin: 0 auto; padding: 44px 20px 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 26px; }
.foot-grid h4 { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; font-weight: 400; }
.foot-grid a { display: block; color: var(--dim); font-size: 13px; margin: 7px 0; }
.foot-grid a:hover { color: var(--porcelain); }
.foot-grid p { color: var(--faint); font-size: 12.5px; max-width: 300px; }
.foot-base { max-width: 1180px; margin: 0 auto; padding: 16px 20px 26px; border-top: 1px solid #1a1a1f; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); letter-spacing: .06em; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(2) { border-right: none; }
  .fact { border-bottom: 1px solid var(--line); }
  .stage-grid { grid-template-columns: 1fr; }
  .stage-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .stage-side img { aspect-ratio: 1; height: auto; }
  .doors, .tiers { grid-template-columns: 1fr; }
  .wall { grid-template-columns: repeat(4, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  header.nav { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 14px; padding: 14px 16px 8px; }
  header.nav .brand { grid-column: 1; grid-row: 1; }
  header.nav .nav-connect { grid-column: 2; grid-row: 1; }
  header.nav nav.links {
    grid-column: 1 / -1; grid-row: 2; margin-left: 0;
    flex-wrap: nowrap; overflow-x: auto; gap: 20px;
    padding: 11px 2px 7px; margin-top: 10px;
    border-top: 1px solid var(--line);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  header.nav nav.links::-webkit-scrollbar { display: none; }
  header.nav nav.links {
    -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent);
    mask-image: linear-gradient(90deg, #000 86%, transparent);
  }
  section[id] { scroll-margin-top: 118px; }
  .announce { font-size: 10px; letter-spacing: .06em; padding: 8px 10px; }
  .kicker { letter-spacing: .18em; }
  input[type="number"], input[type="text"] { width: 100%; }
}
