:root {
  --paper: #ece6d4;
  --ink: #15120f;
  --ink-soft: rgba(21, 18, 15, 0.62);
  --font: "Helvetica Neue", Helvetica, Arial, "Nimbus Sans", "Liberation Sans", sans-serif;
  --scroll-length: 3300vh;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); }
html.lenis, html.lenis body { height: auto; }
body { font-family: var(--font); color: var(--ink); background: var(--paper); overflow-x: hidden; -webkit-font-smoothing: antialiased; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
.scroller { height: var(--scroll-length); width: 1px; }

/* paper grain over the whole picture, mostly visible on the plan sheet */
.grain {
  position: fixed; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.3  0 0 0 0 0.22  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- the sheet furniture ---------- */
.sheet { position: fixed; inset: 0; pointer-events: none; color: var(--ink); }
.sheet .frame { position: absolute; inset: 14px; border: 2px solid var(--ink); outline: 1px solid var(--ink); outline-offset: -7px; }
.reg { position: absolute; width: 14px; height: 14px; }
.reg::before, .reg::after { content: ""; position: absolute; background: var(--ink); }
.reg::before { left: 6px; top: 0; width: 1px; height: 14px; }
.reg::after { top: 6px; left: 0; height: 1px; width: 14px; }
.reg.tl { left: 0; top: 0; } .reg.tr { right: 0; top: 0; } .reg.bl { left: 0; bottom: 0; } .reg.br { right: 0; bottom: 0; }

.north { position: absolute; left: 34px; top: 34px; }
.notes { padding: 14px 14px 0; font-size: 10.5px; line-height: 1.5; letter-spacing: 0.02em; color: var(--ink-soft); border-top: 1px solid var(--ink); }
.notes p + p { margin-top: 6px; }
.notes b { color: var(--ink); letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; }
.scalebar { position: absolute; left: 34px; bottom: 40px; font-size: 10px; letter-spacing: 0.06em; }
.scalebar .bar { display: flex; height: 7px; border: 1px solid var(--ink); }
.scalebar .bar i { flex: 1; } .scalebar .bar i:first-child { background: var(--ink); }
.scalebar .lab { display: flex; justify-content: space-between; margin-top: 3px; }

.titleblock { position: absolute; right: 34px; top: 34px; bottom: 34px; width: 250px; border: 1.5px solid var(--ink); display: flex; flex-direction: column; }
.titleblock .tb-fill { flex: 1; }
.tb-brand { padding: 12px 14px 10px; border-bottom: 1.5px solid var(--ink); }
.tb-name { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
.tb-sub { margin-top: 6px; font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; }
.tb-grid { display: grid; grid-template-columns: 1fr; border-top: 0; }
.tb-grid > div { padding: 8px 14px 9px; border-top: 1px solid var(--ink); }
.tb-grid > div:first-child { border-top: 0; }
.tb-grid span { display: block; font-size: 8.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.tb-grid b { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }

.scrollhint { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink); pointer-events: none; }
.scrollhint i { display: block; width: 1px; height: 38px; background: var(--ink); transform-origin: top; animation: hint 2.2s ease-in-out infinite; }
@keyframes hint { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- room caption ---------- */
.hud { position: fixed; left: 40px; bottom: 40px; color: #f6f0e2; opacity: 0; pointer-events: none; text-shadow: 0 1px 14px rgba(20, 10, 0, 0.55); }
.hud-n { font-size: 13px; letter-spacing: 0.24em; opacity: 0.85; }
.hud-n b { font-size: 46px; font-weight: 200; letter-spacing: -0.02em; margin-right: 2px; }
.hud-t { margin-top: 2px; font-size: clamp(20px, 3vw, 34px); font-weight: 600; letter-spacing: -0.01em; max-width: 22ch; line-height: 1.08; }
.hud-s { margin-top: 8px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.8; }

.loader { position: fixed; inset: 0; display: grid; place-items: center; background: var(--paper); z-index: 20; font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; transition: opacity 0.6s ease; }
.loader.done { opacity: 0; pointer-events: none; }

@media (max-aspect-ratio: 13/10), (max-width: 900px) {
  .titleblock { top: auto; width: min(380px, calc(100vw - 68px)); flex-direction: column; }
  .titleblock .tb-fill { display: none; }
  .notes { display: none; }
  .tb-grid { grid-template-columns: 1fr 1fr; }
  .tb-grid > div { border-right: 1px solid var(--ink); border-top: 1px solid var(--ink); }
  .tb-grid > div:nth-child(2n) { border-right: 0; }
  .tb-grid > div:nth-child(-n+2) { border-top: 0; }
}
@media (max-width: 720px) {
  .notes { display: none; }
  .north { transform: scale(0.75); transform-origin: top left; left: 26px; top: 26px; }
  .titleblock { right: 26px; bottom: 26px; }
  .tb-name { font-size: 20px; }
  .scalebar { left: 26px; top: 92px; bottom: auto; }
  .hud { left: 26px; bottom: 28px; }
  .scrollhint { top: 88px; bottom: auto; }
}
@media (prefers-reduced-motion: reduce) { .scrollhint i { animation: none; } }

/* link back to the project page on sipalinglogistic.pages.dev */
.back { position: fixed; z-index: 15; left: 110px; top: 44px; padding: 7px 12px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--paper); color: var(--ink); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; }
.back:hover { background: var(--ink); color: var(--paper); }
.back:focus-visible { outline: 3px solid #33526E; outline-offset: 3px; }
@media (max-width: 700px) { .back { left: auto; right: 24px; top: 26px; } }
