@font-face { font-family: "Switzer"; src: url("assets/fonts/Switzer-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* The Future Workspace house colours */
  --ink: #123b34;
  --ink-deep: #0c2823;
  --teal: #15514a;
  --ochre: #ba7517;
  --ochre-light: #e3a857;
  --paper: #f2efe6;
  --dim: rgba(242, 239, 230, 0.68);
  --rule: rgba(242, 239, 230, 0.16);
  --gutter: clamp(14px, 2.2vw, 28px);
  --sheet: min(416px, 36vw);
  --sans: "Switzer", system-ui, "Helvetica Neue", Helvetica, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--ink-deep); color: var(--paper); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: inherit; }
kbd { font: inherit; font-size: 0.78em; font-weight: 600; padding: 1px 6px; border: 1px solid var(--rule); border-radius: 4px; }
:focus-visible { outline: 2px solid var(--ochre-light); outline-offset: 2px; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; cursor: grab; opacity: 0; transition: opacity 1.2s ease; }
#scene.dragging { cursor: grabbing; }
.world-ready #scene { opacity: 1; }

/* ---------- top bar ---------- */
.bar { position: fixed; top: var(--gutter); left: var(--gutter); right: var(--gutter); z-index: 6; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.bar > * { pointer-events: auto; }
.mark { background: var(--ink); padding: 7px 14px 9px; border-radius: 8px; font-weight: 720; font-size: 1.3rem; letter-spacing: -0.03em; text-decoration: none; }
.tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tools button, dialog button { font: inherit; font-size: 0.875rem; font-weight: 520; color: var(--paper); background: var(--ink); border: 0; border-radius: 8px; padding: 9px 13px; cursor: pointer; }
.tools button:hover, .mark:hover, dialog button:hover { background: var(--teal); }
.tools button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
html:not(.has-sound) #btn-sound { display: none; }

/* ---------- markers in the world ---------- */
#markers { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.marker { position: absolute; left: 0; top: 0; text-decoration: none; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s linear 0.4s; }
.marker.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.4s ease; }
.marker::before { content: ""; position: absolute; left: -0.5px; bottom: 0; width: 1px; height: 30px; background: var(--paper); opacity: 0.85; }
.marker b { position: absolute; left: 0; bottom: 30px; transform: translateX(-50%); white-space: nowrap; background: var(--ink); padding: 6px 11px 7px; border-radius: 7px; font-weight: 620; font-size: 0.95rem; }
.marker span { margin-left: 8px; font-size: 0.8125rem; font-weight: 650; color: var(--ochre-light); }
.marker:hover b { background: var(--teal); }

/* ---------- sheets ---------- */
#content { position: relative; z-index: 5; pointer-events: none; }
.sheet { display: none; pointer-events: auto; }
.sheet.on { display: block; }

.sheet.hero { position: fixed; left: var(--gutter); bottom: clamp(20px, 6vh, 56px); max-width: 480px; text-shadow: 0 1px 18px rgba(4, 16, 13, 0.55); }
body::after { content: ""; position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 0.6s;
  background: radial-gradient(ellipse 58% 62% at 8% 96%, rgba(6, 22, 19, 0.72), transparent 72%); }
body[data-place="home"]::after { opacity: 1; }
h1 { font-size: clamp(2.25rem, 5vw, 4.25rem); font-weight: 740; line-height: 0.96; letter-spacing: -0.035em; }
.hero .lede { margin-top: 16px; font-size: 1.0625rem; max-width: 26em; }
.places { list-style: none; margin-top: 22px; border-top: 1px solid var(--rule); text-shadow: none; }
.places a { display: grid; grid-template-columns: 5.2em 1fr auto; align-items: baseline; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.places a:hover b { color: var(--ochre-light); }
.places b { font-weight: 650; font-size: 1.125rem; }
.places span { color: var(--dim); font-size: 0.9375rem; }
.about { margin-top: 16px; color: var(--dim); font-size: 0.9375rem; max-width: 30em; }
.links { margin-top: 8px; font-size: 0.9375rem; display: flex; gap: 18px; }

.sheet:not(.hero) { position: fixed; left: var(--gutter); top: calc(var(--gutter) + 58px); bottom: var(--gutter); width: var(--sheet); background: var(--ink); border-radius: 12px; padding: 22px 24px 28px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--teal) transparent; }
.back { display: inline-block; font-size: 0.9375rem; font-weight: 560; text-decoration: none; color: var(--dim); }
.back::before { content: "\2190"; margin-right: 8px; }
.back:hover { color: var(--paper); }
.kind { margin-top: 22px; color: var(--ochre-light); font-size: 0.875rem; font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 730; line-height: 1; letter-spacing: -0.03em; margin-top: 2px; }
.sheet:not(.hero) .lede { margin-top: 12px; color: var(--dim); }

.proj { border-top: 1px solid var(--rule); padding: 16px 0 4px; margin-top: 14px; }
.proj + .proj { margin-top: 12px; }
.proj h3 { font-size: 1.25rem; font-weight: 660; letter-spacing: -0.015em; line-height: 1.2; }
.proj h3 a { text-decoration: none; display: block; }
.proj h3 a:hover, .proj.on h3 a { color: var(--ochre-light); }
.proj .line { margin-top: 6px; color: var(--dim); font-size: 0.9375rem; }
.proj.on .line { color: var(--paper); }
.more { display: none; padding-bottom: 12px; }
.proj.on .more { display: block; }
.media { margin-top: 14px; }
.media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--ink-deep); }
.media.icon img { object-fit: contain; padding: 22px; background: var(--teal); }
.media figcaption, .missing-note { margin-top: 7px; font-size: 0.8125rem; color: var(--dim); }
.missing-note { margin-top: 0; padding: 18px 16px; border: 1px dashed var(--rule); border-radius: 6px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; margin-top: 12px; font-size: 0.875rem; font-weight: 540; }
.facts li + li::before { content: "\00b7"; margin: 0 8px; color: var(--dim); }
.status { margin-top: 6px; font-size: 0.875rem; color: var(--dim); }
.status.live { color: var(--ochre-light); font-weight: 600; }
.open { display: inline-block; margin-top: 14px; background: var(--paper); color: var(--ink); font-weight: 640; font-size: 0.9375rem; text-decoration: none; padding: 10px 14px; border-radius: 8px; }
.open:hover { background: #fff; }

/* ---------- dialogs ---------- */
dialog { margin: 12vh auto auto; width: min(520px, calc(100vw - 32px)); background: var(--ink); color: var(--paper); border: 0; border-radius: 12px; padding: 18px; }
dialog::backdrop { background: rgba(5, 18, 15, 0.55); }
#find-input { width: 100%; font: inherit; font-size: 1.125rem; color: var(--paper); background: var(--ink-deep); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; }
#find-input::placeholder { color: var(--dim); }
#find-results { list-style: none; margin-top: 10px; }
#find-results a { display: flex; justify-content: space-between; gap: 14px; padding: 9px 10px; border-radius: 6px; text-decoration: none; }
#find-results a:hover, #find-results a:focus-visible, #find-results a.first { background: var(--teal); }
#find-results b { font-weight: 600; }
#find-results span, #find-results .none { color: var(--dim); font-size: 0.9375rem; }
#find-results .none { padding: 9px 10px; }
#keys h2 { font-size: 1.5rem; margin: 2px 4px 12px; }
#keys dl div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 8px 4px; border-top: 1px solid var(--rule); font-size: 0.9375rem; }
#keys dd { color: var(--dim); }
#keys form { margin-top: 14px; text-align: right; }
#keys button { background: var(--teal); }
.noscript { position: fixed; inset: auto 0 0 0; padding: 16px; background: var(--ink); z-index: 9; }

/* ---------- when the world cannot start: a plain, complete page ---------- */
.no-world body { overflow: auto; }
.no-world #scene, .no-world #markers, .no-world body::after, .no-world #btn-light, .no-world #btn-sound { display: none; }
.no-world .bar { position: static; padding: var(--gutter); }
.no-world #content { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter) 80px; }
.no-world .sheet, .no-world .sheet.hero, .no-world .sheet:not(.hero) { display: block; position: static; width: auto; max-width: none; background: none; padding: 0; margin-top: 56px; overflow: visible; text-shadow: none; }
.no-world .more { display: block; }
.no-world .back { display: none; }

@media (max-width: 820px) {
  .tools button { padding: 8px 10px; font-size: 0.8125rem; }
  #btn-keys, .places kbd, #btn-find kbd { display: none; }
  .sheet:not(.hero) { left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 56vh; border-radius: 16px 16px 0 0; padding: 18px 18px 26px; }
  .sheet.hero { right: var(--gutter); bottom: 18px; }
  .hero .lede { font-size: 1rem; }
  .about { display: none; }
  body::after { background: linear-gradient(to top, rgba(6, 22, 19, 0.82), transparent 62%); }
}
@media (prefers-reduced-motion: reduce) { #scene, .marker, body::after { transition: none; } }
