/* Full-screen 3D office: the building fills the viewport, UI floats over it, the page never scrolls.
   Night is the dark theme, day the light theme; office.js reads the same tokens for the scene. */
:root {
  --bg: #0f1b30; --ink: #edf1f6; --ink-2: #9fb0c6; --panel: rgba(18, 31, 54, .86); --panel-solid: #15243e;
  --rule: rgba(160, 182, 210, .22); --accent: #ffc85a; --accent-ink: #1d1404; --card: #f4f6f9; --card-ink: #14233f;
  --shadow: 0 18px 50px rgba(3, 8, 20, .45);
  --font: "Be Vietnam Pro", system-ui, sans-serif; --display: "Barlow Condensed", "Be Vietnam Pro", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --bar: 64px; --side: 400px; --gut: 28px; --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #cdd9e5; --ink: #14233f; --ink-2: #4a5d78; --panel: rgba(246, 248, 251, .88); --panel-solid: #f6f8fb;
    --rule: rgba(20, 35, 63, .16); --accent: #b8660b; --accent-ink: #fff; --card: #fff; --card-ink: #14233f;
    --shadow: 0 18px 50px rgba(30, 50, 80, .18); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #cdd9e5; --ink: #14233f; --ink-2: #4a5d78; --panel: rgba(246, 248, 251, .88); --panel-solid: #f6f8fb;
  --rule: rgba(20, 35, 63, .16); --accent: #b8660b; --accent-ink: #fff; --card: #fff; --card-ink: #14233f;
  --shadow: 0 18px 50px rgba(30, 50, 80, .18); color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { position: fixed; inset: 0; font: 400 15px/1.55 var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p, h1, h2 { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#scene.dragging { cursor: grabbing; }
/* keeps the copy readable when a zoomed room slides under the left column */
.scrim { position: fixed; left: 0; top: 0; bottom: 0; width: calc(var(--side) + 90px); pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, var(--bg) 0, var(--bg) calc(100% - 140px), transparent); opacity: 0; transition: opacity .6s; }
body.has-room .scrim { opacity: .92; }
#scene.over { cursor: pointer; }
/* the part of the viewport the building is framed in; office.js measures it */
#stage { position: fixed; top: var(--bar); bottom: 0; left: var(--side); right: 0; pointer-events: none; transition: right .5s var(--ease); }
body.has-room #stage { right: 380px; }

/* header */
.bar { position: fixed; top: 0; left: 0; right: 0; height: var(--bar); display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gut); pointer-events: none; z-index: 5; }
.bar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; }
.brand-mark rect { fill: var(--ink); }
.brand-mark path { fill: none; stroke: var(--bg); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font: 700 22px/1 var(--display); letter-spacing: .01em; }
.brand-name b { font-weight: inherit; color: var(--accent); margin-left: 2px; }
.bar-actions { display: flex; align-items: center; gap: 14px; }
.full { font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.full:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sky { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--rule); background: var(--panel); border-radius: 50%; cursor: pointer; }
.sky svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sky .moon { display: none; }
:root[data-scene="day"] .sky .sun, :root[data-scene="day"] .sky .rays { display: none; }
:root[data-scene="day"] .sky .moon { display: block; }

/* left column: headline and building directory */
.intro { position: fixed; left: var(--gut); top: calc(var(--bar) + 18px); width: calc(var(--side) - var(--gut) - 16px); z-index: 4; }
h1 { font: 700 clamp(34px, 3.4vw, 46px)/1 var(--display); letter-spacing: -.005em; text-wrap: balance; }
.sub { margin-top: 12px; color: var(--ink-2); max-width: 30em; }
.directory { margin-top: 22px; display: grid; gap: 2px; border-left: 2px solid var(--rule); }
.floor { display: grid; grid-template-columns: 52px 1fr; align-items: start; padding: 6px 0 6px 12px; }
.fl { font: 600 13px/28px var(--display); color: var(--ink-2); letter-spacing: .02em; }
.rooms { display: flex; flex-wrap: wrap; gap: 6px; }
.go { --c: var(--ink); display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px 0 8px; border: 1px solid var(--rule);
  background: var(--panel); border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: border-color .2s, transform .2s var(--ease); }
.go::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.go:hover, .go.hot { border-color: var(--c); transform: translateY(-1px); }
.go[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.go[aria-pressed="true"]::before { background: #fff; }

/* access badge on a lanyard, bottom left */
.badge { position: fixed; left: var(--gut); bottom: 22px; width: 340px; z-index: 4; }
.lanyard { position: absolute; left: 50%; top: -26px; width: 46px; height: 30px; transform: translateX(-50%);
  border: 4px solid var(--accent); border-bottom: 0; border-radius: 22px 22px 0 0; }
.card { position: relative; background: var(--card); color: var(--card-ink); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.card::before { content: ""; position: absolute; left: 50%; top: 8px; width: 34px; height: 6px; margin-left: -17px; border-radius: 3px; background: rgba(20, 35, 63, .18); }
.card-band { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 22px 14px 10px; background: #14233f; color: #fff; }
.card-band > span { font: 600 15px/1 var(--display); letter-spacing: .03em; }
.pick { display: flex; gap: 5px; }
.pick button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; background: rgba(255, 255, 255, .14); color: #fff;
  font: 600 11px/1 var(--font); cursor: pointer; padding: 0; transition: transform .2s var(--ease); }
.pick button:hover { transform: translateY(-2px); }
.pick button[aria-checked="true"] { background: var(--c); border-color: #fff; }
.card-body { padding: 12px 14px 12px; display: grid; gap: 6px; }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.av { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; background: var(--c, #14233f); color: #fff; font: 700 15px/1 var(--display); flex: none; }
.who b { display: block; font-weight: 700; font-size: 15px; line-height: 1.25; }
.who small { display: block; font-size: 12px; color: #55657d; line-height: 1.3; }
.kv { display: grid; grid-template-columns: 68px 1fr auto; align-items: center; gap: 8px; border-top: 1px dashed rgba(20, 35, 63, .18); padding-top: 6px; }
.k { font-size: 12px; color: #55657d; }
.v { font: 600 15px/1.2 var(--mono); letter-spacing: .01em; overflow-wrap: anywhere; user-select: all; }
.copy { height: 28px; min-width: 64px; padding: 0 10px; border: 1px solid #14233f; background: transparent; color: #14233f; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.copy:hover { background: #14233f; color: #fff; }
.copy.ok { background: #0f766e; border-color: #0f766e; color: #fff; }
.how { margin-top: 10px; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }

/* room panel, right side */
.room { position: fixed; right: var(--gut); top: 50%; width: 340px; transform: translateY(-50%); z-index: 6; padding: 22px 22px 20px;
  background: var(--panel-solid); border: 1px solid var(--rule); border-top: 6px solid var(--c); border-radius: 12px; box-shadow: var(--shadow);
  display: grid; gap: 10px; animation: room-in .45s var(--ease); }
.room[hidden] { display: none; }
@keyframes room-in { from { opacity: 0; transform: translate(24px, -50%); } }
.close { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.close:hover { background: var(--rule); }
.close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.room-app { font-size: 13px; font-weight: 600; color: var(--c); padding-right: 30px; }
.room h2 { font: 700 34px/1 var(--display); }
.room-what { color: var(--ink-2); font-size: 14px; }
.url { display: block; padding: 9px 11px; border-radius: 8px; background: var(--rule); font: 500 13px/1.35 var(--mono); text-decoration: none; overflow-wrap: anywhere; }
.url:hover { text-decoration: underline; }
.open { display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 8px; background: var(--c); color: #fff;
  font-weight: 700; text-decoration: none; transition: transform .2s var(--ease); }
.open:hover { transform: translateY(-2px); }
.open[hidden], .url[hidden] { display: none; }
.suggest { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding-top: 10px; border-top: 1px solid var(--rule); }
.suggest[hidden] { display: none; }
.use { flex: none; height: 30px; padding: 0 10px; border: 1px solid var(--rule); background: transparent; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.use:hover { border-color: var(--c); }
.use:disabled { opacity: .55; cursor: default; }
.try { font-size: 13px; color: var(--ink-2); }

/* room signs projected over the 3D rooms */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.tag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 5px;
  background: var(--panel-solid); color: var(--ink); font: 600 14px/18px var(--display); letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); transform: translate(-50%, -100%); opacity: 0; transition: opacity .5s, outline-color .2s;
  outline: 2px solid transparent; outline-offset: 1px; will-change: transform; }
.tag i { width: 18px; height: 18px; border-radius: 3px; background: var(--c); display: grid; place-items: center; color: #fff; font: 700 11px/1 var(--font); font-style: normal; }
.tag.on { opacity: 1; }
.tag.hot { outline-color: var(--c); }
body.has-room .tag:not(.sel) { opacity: .25; }

.hint { position: fixed; right: var(--gut); bottom: 20px; font-size: 12px; color: var(--ink-2); z-index: 3; transition: opacity .6s; }
body.has-room .hint, body.moved .hint { opacity: 0; }
.nogl { position: fixed; left: calc(var(--side) + 20px); right: var(--gut); top: 45%; text-align: center; color: var(--ink-2); z-index: 3; }
.nogl[hidden] { display: none; }
body.has-room .nogl { right: 400px; }

/* shorter laptop screens */
@media (max-height: 760px) and (min-width: 761px) {
  .sub { display: none; }
  .directory { margin-top: 16px; }
  .how { display: none; }
}
@media (max-height: 640px) and (min-width: 761px) {
  h1 { font-size: 30px; }
  .floor { padding: 3px 0 3px 12px; }
}
@media (max-width: 1080px) and (min-width: 761px) {
  :root { --side: 360px; --gut: 20px; }
  .badge { width: 320px; }
  .room { width: 310px; }
  body.has-room #stage { right: 330px; }
}

/* phones: building on top, directory and badge below, room panel as a bottom sheet */
@media (max-width: 760px) {
  :root { --bar: 54px; --gut: 14px; }
  body { font-size: 14px; }
  .full { display: none; }
  .brand-name { font-size: 20px; }
  #stage { left: 0; right: 0; top: calc(var(--bar) + 64px); bottom: var(--below, 300px); }
  body.has-room #stage { right: 0; bottom: var(--sheet, 330px); }
  .intro { left: var(--gut); right: var(--gut); width: auto; top: var(--bar); }
  .scrim { right: 0; width: auto; bottom: auto; height: calc(var(--bar) + 76px); opacity: .94;
    background: linear-gradient(180deg, var(--bg) 0, var(--bg) calc(100% - 24px), transparent); }
  body.has-room .scrim { opacity: .94; }
  h1 { font-size: 25px; line-height: 1.05; }
  .sub { display: none; }
  .directory { position: fixed; left: var(--gut); right: var(--gut); bottom: calc(var(--badge-h, 196px) + 12px); margin: 0; border: 0;
    display: flex; flex-wrap: wrap; gap: 6px; }
  .floor { display: contents; }
  .fl { display: none; }
  .rooms { display: contents; }
  .go { height: 30px; font-size: 12.5px; padding: 0 9px 0 7px; flex: 1 1 auto; justify-content: center; }
  .badge { left: var(--gut); right: var(--gut); width: auto; bottom: max(10px, env(safe-area-inset-bottom)); }
  .lanyard { display: none; }
  .card::before { display: none; }
  .card-band { padding: 9px 12px; align-items: center; }
  .pick button { width: 28px; height: 28px; }
  .card-body { padding: 9px 12px; gap: 5px; }
  .who { margin-bottom: 0; }
  .av { width: 32px; height: 32px; font-size: 13px; }
  .kv { grid-template-columns: 62px 1fr auto; padding-top: 5px; }
  .v { font-size: 14px; }
  .how { display: none; }
  .room { left: var(--gut); right: var(--gut); top: auto; bottom: calc(var(--badge-h, 196px) + 20px); width: auto; transform: none; padding: 16px 16px 14px; gap: 8px; animation-name: sheet-in; }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(30px); } }
  .room h2 { font-size: 28px; }
  .room-what { display: none; }
  .open { height: 42px; }
  .try { display: none; }
  body.has-room .directory { visibility: hidden; }
  .tag { font-size: 12px; line-height: 16px; padding: 2px 7px 2px 3px; }
  .tag i { width: 16px; height: 16px; font-size: 10px; }
  .hint { left: var(--gut); right: auto; bottom: auto; top: calc(var(--bar) + 66px); }
  .nogl { left: var(--gut); top: 35%; }
}
@media (max-width: 760px) and (max-height: 640px) {
  h1 { font-size: 21px; }
  #stage { top: calc(var(--bar) + 50px); }
  .who { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
