/* taskdeck launch site — pixel building.
   Palette: SWEETIE-16, same tokens as pixel-taskdeck's spaces.css.
   Sign chrome (dark wood + slate border + amber text) mirrors office.js renderSign. */

:root {
  --bg: #1a1c2c;
  --floor: #29366f;
  --floor-lit: #3b5dc9;
  --wall: #94b0c2;
  --ink: #f4f4f4;
  --dim: #94b0c2;
  --ok: #38b764;
  --busy: #ffcd75;
  --bad: #b13e53;
  --accent: #41a6f6;
  --slate: #566c86;
  --slate-dark: #333c57;
  --sign-bg: #2a212e;
  --sign-text: #ffcd75;
  --px: 3px; /* CSS px per world px; overwritten by JS to match the canvas scale */
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); overflow-anchor: none; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Courier New", ui-monospace, Menlo, monospace;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
  image-rendering: pixelated;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--busy); }
:focus-visible { outline: var(--px) dashed var(--busy); outline-offset: 3px; }

code {
  background: var(--bg);
  border: 1px solid var(--slate-dark);
  padding: 0 5px;
  font-size: .95em;
}

kbd {
  display: inline-block;
  min-width: 1.4em;
  text-align: center;
  padding: 0 5px;
  background: var(--floor);
  border: 2px solid var(--wall);
  border-bottom-width: 4px;
  color: var(--busy);
  font-family: inherit;
  font-weight: 700;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── world canvas ─────────────────────────────────────────── */
#world { display: none; }
.js-world #world {
  display: block;
  position: fixed; inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── building & floors ────────────────────────────────────── */
/* Default (no JS): a plain readable page. JS adds .js-world and switches to
   absolute floor positioning driven by the shared world layout. */
#building {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}
.js-world #building {
  max-width: none;
  padding: 0;
  margin: 0;
  /* width + margin-left set by JS in --px units */
}

section { padding: 48px 0; }
.js-world section {
  position: absolute;
  left: 0; right: 0;
  padding: 0;
}

.scene-gap { height: 0; }         /* JS sizes these to reserve canvas scenery space */

.floor-content {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(var(--px) * 4) calc(var(--px) * 6);
}

/* ── signage panels (office.js sign chrome as CSS) ────────── */
.panel {
  background: var(--sign-bg);
  border: var(--px) solid var(--wall);
  box-shadow: calc(var(--px) * 2) calc(var(--px) * 2) 0 rgba(0, 0, 0, .8);
  padding: calc(var(--px) * 5) calc(var(--px) * 6);
}

h2, h3, .floor-title {
  color: var(--sign-text);
  text-transform: uppercase;
  letter-spacing: .12em;
  line-height: 1.3;
}
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.floor-title {
  font-size: 21px;
  margin: 0 0 20px;
  text-align: center;
  text-shadow: 2px 2px 0 #000;
}

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
strong { color: var(--busy); font-weight: 700; }
.panel strong { color: var(--busy); }

.fine { color: var(--dim); font-size: 12.5px; margin-top: 12px; }
.center { text-align: center; }

/* ── hero ─────────────────────────────────────────────────── */
.hero-content { max-width: 620px; text-align: center; }

.eyebrow {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.ok-dot { color: var(--ok); }

.hero-title {
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink);
  text-shadow: calc(var(--px) * 1.5) calc(var(--px) * 1.5) 0 #000;
  margin: 0 0 18px;
  text-wrap: balance;
}

.lede { color: var(--dim); margin-bottom: 24px; }
.lede strong, .lede code { color: var(--ink); }
.lede.center { max-width: 56ch; margin-left: auto; margin-right: auto; }

/* ── install row & buttons ────────────────────────────────── */
.install-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: stretch;
  margin-bottom: 10px;
}
.install-row.center { margin-top: 8px; }

.npx {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.npx .ps1 { color: var(--ok); font-weight: 700; }
.npx code { border: 0; background: none; font-size: 15px; font-weight: 700; }
.npx button {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  background: var(--floor);
  color: var(--dim);
  border: 2px solid var(--wall);
  padding: 3px 8px;
  cursor: pointer;
}
.npx button:hover { color: var(--busy); border-color: var(--busy); background: var(--floor-lit); }
.npx button:active { transform: translateY(1px); }

.pxbtn {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  color: var(--ink);
  background: var(--floor);
  border: var(--px) solid var(--wall);
  box-shadow: calc(var(--px) * 1.5) calc(var(--px) * 1.5) 0 rgba(0, 0, 0, .8);
}
.pxbtn:hover { background: var(--floor-lit); color: var(--ink); }
.pxbtn:active { transform: translate(2px, 2px); box-shadow: none; }
.pxbtn.primary { background: var(--busy); border-color: #b1652c; color: #2a212e; }
.pxbtn.primary:hover { background: #ffe0a3; color: #2a212e; }

/* ── sources list ─────────────────────────────────────────── */
.sources { list-style: none; margin: 14px 0 4px; padding: 0; }
.sources li { margin: 10px 0; padding-left: 26px; position: relative; color: var(--dim); }
.sources li strong { color: var(--ink); }
.chip {
  position: absolute; left: 0; top: .35em;
  width: 12px; height: 12px;
  border: 2px solid rgba(0, 0, 0, .5);
}
.chip-busy { background: var(--busy); }
.chip-accent { background: var(--accent); }
.chip-ok { background: var(--ok); }
.chip-bad { background: var(--bad); }

/* ── posters (the loop) ───────────────────────────────────── */
.posters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--px) * 6);
}
.poster p { color: var(--dim); font-size: 13.5px; }
.poster p strong { color: var(--ink); }
.step {
  display: inline-block;
  min-width: 1.5em;
  text-align: center;
  background: var(--busy);
  color: var(--sign-bg);
  margin-right: 6px;
}

/* ── CRT (the terminal) ───────────────────────────────────── */
.crt-holder { display: flex; justify-content: center; }
.crt-holder + .fine { margin-top: calc(var(--px) * 16); }
.crt {
  position: relative;
  overflow: hidden;
  padding: calc(var(--px) * 3);
  background: #14152b;
  max-width: 100%;
}
.crt::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 4px);
}
.crt pre {
  margin: 0;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--ink);
}
.t-busy { color: var(--busy); }
.t-ok { color: var(--ok); }
.t-dim { color: var(--slate); }
.t-accent { color: var(--accent); }
.t-sel { background: var(--floor); }

/* ── lobby facts & footer ─────────────────────────────────── */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  justify-content: center;
  margin: 28px 0 0;
  color: var(--dim);
  font-size: 12.5px;
}
.facts span b { display: block; color: var(--ink); font-size: 15px; }

footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: var(--px) solid var(--slate-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
  color: var(--slate);
  font-size: 12px;
}

/* ── elevator nav ─────────────────────────────────────────── */
#elevator {
  display: none;
  position: fixed;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  flex-direction: column;
  gap: 6px;
}
.js-world #elevator { display: flex; }
#elevator a {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--sign-bg);
  border: 2px solid var(--slate);
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
#elevator a:hover { border-color: var(--busy); color: var(--busy); }
#elevator a.here { border-color: var(--busy); color: var(--sign-bg); background: var(--busy); }

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .posters { grid-template-columns: 1fr; }
  .floor-content { padding-left: calc(var(--px) * 4); padding-right: calc(var(--px) * 4); }
  .crt pre { font-size: 10px; }
  .js-world #elevator { display: none; } /* full-bleed tower: no room beside the copy */
}

/* ── reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
