/* Full Stack edition: an architect's drawing sheet laid over a photographed scale model. */
:root {
  --paper: #f6f3ea;
  --paper-2: #ebe7da;
  --ink: #1f2327;
  --soft: #444b51;
  --mat: #aab6a4;
  --accent: #d9482b;
  --accent-ink: #b0361c;
  --line: rgba(31, 35, 39, .3);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ed-fg: var(--ink);
  --ed-bg: rgba(246, 243, 234, .9);
  --ed-line: var(--line);
  --ed-accent: var(--accent);
  --ed-font: var(--mono);
  --ed-radius: 6px;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; background: var(--mat); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--mat);
  font: 400 1.0625rem/1.5 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
canvas#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; touch-action: pan-y; z-index: 0; cursor: grab; }
canvas#gl.dragging { cursor: grabbing; }
canvas#gl.pick { cursor: pointer; }
.live canvas#gl { opacity: 1; }

/* ---------- document mode (no WebGL / no JS): a readable set of drawing sheets ---------- */
main { position: relative; z-index: 1; padding: 72px 16px 48px; max-width: 760px; margin: 0 auto; }
.beat { padding: 0 0 20px; }
.sheet {
  position: relative;
  max-width: 440px;
  padding: 22px 24px 20px;
  background: rgba(246, 243, 234, .92);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 1px 0 #fff inset, 0 22px 40px -26px rgba(26, 38, 28, .55);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
.sheet.wide { max-width: 520px; }
/* tiny crop marks, like the corner of a drawing sheet */
.sheet::before, .sheet::after { content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--accent); pointer-events: none; }
.sheet::before { left: -1px; top: -1px; border-width: 2px 0 0 2px; }
.sheet::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.label { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font: 500 .8125rem/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--soft); }
h1, h2 { font-weight: 500; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.7rem, 6.4vw, 4.2rem); line-height: .98; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.25rem); line-height: 1.06; }
.role { margin: 10px 0 0; font: 500 .875rem/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.who { margin: 8px 0 12px; font: 500 .875rem/1.4 var(--mono); letter-spacing: .02em; color: var(--accent-ink); }
.who em { font-style: normal; color: var(--soft); }
.lede { margin: 18px 0 14px; font-size: 1.45rem; line-height: 1.25; text-wrap: balance; }
.sheet p { margin: 0 0 10px; }
.sheet ul { margin: 6px 0 12px; padding-left: 1.1em; }
.sheet li { margin: 0 0 4px; }
.sheet li::marker { color: var(--accent); }
.status { display: flex; align-items: baseline; gap: 10px; font-weight: 500; }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); box-shadow: 0 0 0 0 rgba(217, 72, 43, .5); animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(217, 72, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 72, 43, 0); } }
.layer { margin: 12px 0 0 !important; padding-top: 8px; border-top: 1px dashed var(--line); font: 500 .8125rem/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--soft); }
.layer b { color: var(--ink); font-weight: 500; }
.small { font-size: .9375rem; color: var(--soft); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px !important; }
.btn, .tools button {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  font: 500 .875rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: rgba(255, 255, 255, .55); border: 1px solid var(--ink); border-radius: 4px;
  transition: transform .15s, background .15s, color .15s;
}
.btn:hover, .tools button:hover { background: var(--ink); color: var(--paper); }
.btn.primary, .tools button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.btn:active, .tools button:active { transform: translateY(1px); }
.cue { display: inline-flex; align-items: center; gap: 12px; margin-top: 14px; font: 500 .875rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--soft); text-decoration: none; }
.cue i { width: 1px; height: 28px; background: var(--ink); position: relative; overflow: hidden; }
.cue i::after { content: ""; position: absolute; left: 0; top: -12px; width: 1px; height: 12px; background: var(--accent); animation: drip 1.8s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes drip { to { top: 28px; } }
.products { list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.products li { margin: 0; padding: 8px 10px; background: rgba(255, 255, 255, .5); border-left: 3px solid var(--accent); }
.products a { display: block; text-decoration: none; color: var(--ink); }
.products a b { font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.products a span { font: 400 .8125rem var(--mono); color: var(--soft); margin-left: 6px; }
.products em { display: block; font-style: normal; font-size: .9375rem; color: var(--soft); line-height: 1.35; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.tools .slider { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; font: 500 .8125rem var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--soft); min-height: 44px; }
.tools input[type=range] { flex: 1; accent-color: var(--accent); min-height: 44px; }
.reach { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 500; }
.call { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px !important; }
.dial { font: 500 1.5rem/1.2 var(--serif); }
.dial a { font-weight: 600; }
.dial span { font-size: inherit; }
.dial .small { font-size: .9375rem; font-weight: 400; }

/* top bar, legend, stepper, info, tooltips */
.bar { position: fixed; z-index: 20; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 500 .875rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid var(--ink); background: var(--paper); font: 500 .875rem var(--mono); letter-spacing: 0; }
.bar-links { display: flex; align-items: center; gap: 14px; margin-right: 200px; font: 500 .875rem var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.bar-links a { color: var(--ink); text-decoration: none; }
.bar-links a:hover { color: var(--accent-ink); }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1.5px solid var(--ink); background: var(--paper); border-radius: 4px; }
.legend { display: none; }
.stepper { position: fixed; z-index: 15; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--ink); border-radius: 4px; font: 500 .875rem var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.stepper[hidden] { display: none; }
.stepper button { appearance: none; min-width: 44px; min-height: 44px; border: 0; background: transparent; font: inherit; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--ink); color: var(--paper); }
.stepper span { padding: 0 10px; min-width: 150px; text-align: center; }
.tip { position: fixed; z-index: 30; pointer-events: none; padding: 5px 9px; background: var(--ink); color: var(--paper); font: 500 .8125rem/1.2 var(--mono); letter-spacing: .04em; white-space: nowrap; transform: translate(14px, 14px); border-radius: 2px; }
.info { position: fixed; z-index: 25; right: 24px; bottom: 24px; width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 620px); overflow: auto; padding: 20px 22px 18px; background: var(--paper); border: 1px solid var(--ink); border-radius: 3px; box-shadow: 0 30px 60px -28px rgba(10, 20, 12, .7); animation: rise .35s cubic-bezier(.2, .8, .2, 1); }
.info[hidden] { display: none; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.info h3 { margin: 0 0 4px; font: 500 1.5rem/1.1 var(--serif); }
.info .meta { margin: 0 0 8px; font: 500 .8125rem/1.35 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); }
.info p { margin: 0 0 8px; }
.info ul { margin: 0 0 10px; padding-left: 1.1em; }
.info .x { position: absolute; right: 6px; top: 4px; width: 44px; height: 44px; border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--ink); }
.info .x:hover { color: var(--accent); }
.info .go { margin-top: 4px; }
#leaders { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
.leader { position: absolute; left: 0; top: 0; pointer-events: auto; appearance: none; cursor: pointer; padding: 6px 10px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 2px; font: 500 .875rem/1.2 var(--mono); letter-spacing: .03em; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .3s; }
.leader.show { opacity: 1; visibility: visible; }
.leader:hover { background: var(--ink); color: var(--paper); }
.leader small { display: block; font-size: .8125rem; color: var(--soft); letter-spacing: .02em; }
.leader:hover small { color: var(--paper); }

/* ---------- live mode: sheets pin and release while the house goes up ---------- */
.live main { max-width: none; margin: 0; padding: 0 clamp(16px, 4vw, 56px); pointer-events: none; }
.live .beat { position: relative; min-height: 128vh; padding: 0; display: flex; flex-direction: column; justify-content: flex-start; }
.live .beat.hero { min-height: 125vh; }
.live .beat.explore { min-height: 150vh; }
.live .beat.contact { min-height: 120vh; }
.live .sheet { position: sticky; top: 17vh; pointer-events: auto; width: 100%; }
.live .hero .sheet { top: 20vh; }
.live .bar { padding: 14px clamp(16px, 3vw, 40px); }
.live .legend {
  display: block; position: fixed; z-index: 10; right: clamp(16px, 2.6vw, 40px); top: 50%; transform: translateY(-50%); width: 188px; pointer-events: auto;
  font: 500 .875rem/1.25 var(--mono); letter-spacing: .03em; text-transform: uppercase;
}
.legend ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.legend li { position: relative; padding: 8px 10px 8px 34px; color: var(--soft); background: rgba(246, 243, 234, .62); border: 1px solid transparent; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: color .4s, background .4s, border-color .4s; }
.legend li::before { content: ""; position: absolute; left: 11px; top: 50%; width: 11px; height: 11px; margin-top: -6px; border: 1.5px solid var(--soft); background: transparent; transition: background .4s, border-color .4s, box-shadow .4s; }
.legend li.on { color: var(--ink); background: rgba(246, 243, 234, .9); }
.legend li.on::before { background: var(--accent); border-color: var(--accent); }
.legend li.now { border-color: var(--ink); }
.legend li.now::before { box-shadow: 0 0 0 4px rgba(217, 72, 43, .25); }
.legend .items { display: none; margin-top: 6px; font-size: .8125rem; text-transform: none; letter-spacing: 0; color: var(--soft); line-height: 1.35; }
.legend li.now .items { display: block; }
.dusk .legend li { color: #aab4c4; background: rgba(15, 22, 32, .66); }
.dusk .legend li.on { color: #fff4e0; background: rgba(15, 22, 32, .88); }

@media (min-width: 821px) {
  .live .sheet { max-width: 440px; }
  .live .sheet.wide { max-width: 520px; }
}
@media (max-width: 820px) {
  body { font-size: 1rem; }
  .bar-links { margin-right: 190px; }
  .brand-name { display: none; }
  .bar-links a:not(.pill) { display: none; }
  .live main { padding: 0 12px; }
  .live .beat { justify-content: flex-end; min-height: 120vh; }
  .live .beat.hero { min-height: 112vh; }
  .live .sheet { top: auto; bottom: 12px; max-width: none; padding: 14px 16px 12px; max-height: 52vh; overflow-y: auto; }
  .live .sheet.wide, .live .hero .sheet { max-width: none; top: auto; }
  .live .hero .sheet { bottom: 12px; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.55rem; }
  .lede { font-size: 1.2rem; margin: 10px 0 8px; }
  .label { margin-bottom: 8px; padding-bottom: 6px; font-size: .8125rem; }
  .sheet ul:not(.products):not(.reach) li { font-size: .9375rem; }
  .sheet ul:not(.products):not(.reach) { margin-bottom: 6px; }
  .layer { margin-top: 6px !important; padding-top: 6px; }
  .products li { padding: 6px 8px; }
  .products em { font-size: .875rem; }
  /* legend collapses to a column of lamps on the left of the model */
  .live .legend { right: auto; left: 10px; top: 20vh; transform: none; width: auto; z-index: 1; }
  .live main { position: relative; z-index: 2; } /* sheets pass over the lamps */
  .legend li { padding: 3px 3px 3px 28px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; min-height: 22px; }
  .legend li > .name { display: none; }
  .legend li.now { background: rgba(246, 243, 234, .9); padding-right: 10px; }
  .legend li.now > .name { display: inline; }
  .legend .items { display: none !important; }
  .info { right: 12px; left: 12px; bottom: 12px; width: auto; max-height: 55vh; }
  .tools .slider { order: 5; }
  .stepper { bottom: 8px; }
}
.reduced .dot, .reduced .cue i::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .dot, .cue i::after, .info { animation: none; }
  canvas#gl { transition: none; }
  .btn, .tools button { transition: none; }
}
.live.reduced .beat { min-height: 0; padding: 10px 0; }
.live.reduced .sheet { position: relative; top: auto; bottom: auto; }
.live.reduced main { padding-top: 64px; padding-bottom: 80px; }
@media (max-width: 820px) { .live.reduced .beat { justify-content: flex-start; } .live.reduced .beat.hero { padding-top: 54vh; } }

.live .bar { background: linear-gradient(to bottom, rgba(170, 182, 164, .96), rgba(170, 182, 164, .0)); padding-bottom: 28px; }
.dusk .bar { background: linear-gradient(to bottom, rgba(15, 22, 32, .9), rgba(15, 22, 32, 0)); }
.dusk .brand, .dusk .bar-links a:not(.pill) { color: #fff4e0; }
.dusk .brand .mark { color: var(--ink); }
