/* Website mode (W5) in bO.craft: dark surfaces, orange used sparingly, calm type, square edges (max 4px). */
:root {
  --bg: #0E1014; --surface: #14161B; --panel: #1E222B; --elevated: #262B36;
  --border: #2E3440; --border-strong: #404652;
  --text: #E8EAF0; --text-2: #A8B0C0; --muted: #8A93A6;
  --accent: #FD5D03; --accent-hover: #D35400; --focus: #FF8A3D;
  --font: 'Inter', 'SF Pro Display', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  --header: 60px; --gutter: clamp(16px, 4vw, 56px); --target: 44px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: var(--header); background: var(--bg); }
body { margin: 0; font: 400 16px/1.65 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 50; background: var(--accent); color: #0E1014; padding: 10px 16px; font-weight: 600; }
.skip:focus { top: 8px; }

/* ---- 3D layer: fixed behind the page; static picture until (or instead of) the 3D view ---- */
.scene { position: fixed; inset: 0; z-index: 0; background: var(--bg); pointer-events: none; outline: none; }
/* the still only stands in when there is no 3D at all - never under a live canvas (it shows an older hall) */
.no-3d .scene { background: var(--bg) url('assets/lobby.jpg') center / cover no-repeat; }
.scene canvas { display: block; width: 100% !important; height: 100% !important; opacity: 0.004; transition: opacity 0.8s ease; }   /* not 0: the browser must present (and the GPU really compile) while the intro covers the hall */
.scene-ready .scene canvas { opacity: 1; }
.scene-shade { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(14,16,20,0.78) 0%, rgba(14,16,20,0.35) 46%, rgba(14,16,20,0) 70%),
              linear-gradient(0deg, rgba(14,16,20,0.55) 0%, rgba(14,16,20,0) 30%); transition: opacity 0.4s ease; }
.touch-stick { display: none; }

/* ---- header ---- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--header); display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter); background: rgba(14,16,20,0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: var(--target); }
.brand img { border-radius: 2px; }
.brand-word { font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem; }
.brand-sub { font-weight: 500; color: var(--text-2); margin-left: 2px; letter-spacing: 0; font-size: 0.95rem; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 12px; color: var(--text-2); text-decoration: none; font-size: 0.92rem; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
/* quiet position indicator ("n / 7", hud-position.js): replaces the game-style wayfinding strip */
.hud-pos { display: none; align-items: center; gap: 2px; margin-left: 16px; font: 600 0.78rem/1 var(--mono); color: var(--text-2); letter-spacing: 0.02em; white-space: nowrap; }
.scene-ready .hud-pos { display: inline-flex; }
.hud-pos-n { color: var(--text); font-variant-numeric: tabular-nums; }
.hud-pos-sep { color: var(--muted); }
/* "Zur Seite" (#btn-read, hud.css): on touch it moves in here while walking (site.js adopts the one element) */
@media (max-width: 760px), (pointer: coarse) {
  .site-header #btn-read { display: none; min-height: 44px; padding: 0 14px; font-size: 0.78rem; background: rgba(30,34,43,0.6); border-color: var(--border-strong); box-shadow: none; }
  .walking .site-header #btn-read { display: inline-flex; }
}

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--target); padding: 0 20px; border: 1px solid var(--border-strong);
  border-radius: 0; background: var(--elevated); color: var(--text); font: 600 0.82rem/1 var(--font); letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; box-shadow: inset 2px 2px 0 #454C5C, inset -2px -2px 0 #07080B; transition: background 0.15s ease; }
.btn:hover { background: #2E3440; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #0E1014; box-shadow: inset 2px 2px 0 rgba(255,255,255,0.28), inset -2px -2px 0 rgba(0,0,0,0.35); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: rgba(30,34,43,0.6); }
.btn-small { min-height: 36px; padding: 0 14px; }
.btn[disabled] { opacity: 0.45; cursor: progress; }
.no-3d .btn[data-explore] { display: none; }

/* ---- sections and panels ---- */
main, .site-footer { position: relative; z-index: 2; }
.section { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--header) + 48px) var(--gutter) 64px; }
.section:nth-of-type(even) .panel { margin-left: auto; }
.panel { width: min(100%, 36rem); padding: 32px; background: rgba(20,22,27,0.88); border: 1px solid var(--border); border-radius: 2px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
/* below-the-fold panels skip layout/style/paint of their text until the browser finds them relevant (near the
   viewport, focused, printed, or :target) - the first layout pass then has only the hero's text to shape instead
   of seven panels' worth (docs/PERFORMANCE_LADEN.md Stueck 14, first layout 150-190 ms). On .panel itself, not its
   .section: hallreal/content (sections.js place()) moves a shown panel into the room with a transform on this same
   element, so the post-transform box - not the .section's untransformed document position - is what the relevance
   check sees. .panel's width is already explicit (unaffected); contain-intrinsic-size only stands in for the
   height before the real one is known, inside a .section that is flex-centered regardless of exact panel height. */
.panel:not(.panel-hero) { content-visibility: auto; contain-intrinsic-size: auto 500px; }
.panel-hero { background: rgba(14,16,20,0.72); width: min(100%, 40rem); padding: 40px; }
.eyebrow { font: 600 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.lead { font-size: 1.12rem; color: var(--text-2); }
.panel p { color: var(--text-2); }
.panel strong { color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hint, .note { font-size: 0.9rem; }
.fine { font-size: 0.78rem; color: var(--muted) !important; }
.link { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.link:hover { color: var(--focus); }
.scroll-cue { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font: 600 0.7rem/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.hero { position: relative; }
.cards { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cards li { padding: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 2px; }
.cards li p { margin: 0; font-size: 0.88rem; }
.cards h3 { margin-bottom: 4px; }
.list { padding-left: 1.1em; color: var(--text-2); }
.steps { padding-left: 1.3em; color: var(--text-2); display: grid; gap: 8px; }
.steps code, .address { font: 500 0.9rem var(--mono); color: var(--text); background: var(--panel); padding: 2px 6px; border: 1px solid var(--border); }
.pending { color: var(--muted); font-style: italic; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 20px; }
.tags li { padding: 6px 12px; background: var(--panel); border: 1px solid var(--border); font: 600 0.72rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.no3d-only { display: none; }
.no-3d .no3d-only { display: block; }

.site-footer { padding: 32px var(--gutter) 40px; background: var(--bg); border-top: 1px solid var(--border); color: var(--text-2); font-size: 0.9rem; }
.site-footer a { color: var(--text-2); display: inline-flex; min-height: var(--target); align-items: center; }

/* ---- explore mode: the page steps back, the room takes over ---- */
.explore-bar { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 18px;
  padding: 10px 10px 10px 20px; background: rgba(14,16,20,0.9); border: 1px solid var(--border); border-radius: 2px; max-width: calc(100% - 32px); }
.explore-bar p { margin: 0; color: var(--text-2); font-size: 0.9rem; }
.explore-bar[hidden] { display: none; }
.exploring main, .exploring .site-footer, .exploring .scene-shade { opacity: 0; visibility: hidden; }
.exploring .site-nav, .exploring .site-header .btn { visibility: hidden; }
.exploring .scene { pointer-events: auto; cursor: crosshair; }
.exploring body { overflow: hidden; }
main, .site-footer { transition: opacity 0.35s ease; }

/* ---- reduced motion: no smooth scrolling, no fades ---- */
.reduce-motion, .reduce-motion * { scroll-behavior: auto !important; transition: none !important; }
@media (prefers-reduced-motion: no-preference) { html:not(.reduce-motion) { scroll-behavior: smooth; } }

/* ---- small screens: scroll-first, text always readable over a calmer scene ---- */
@media (max-width: 760px) {
  :root { --header: 56px; }
  .site-nav { display: none; }
  .site-header .btn { margin-left: auto; }
  .section { min-height: 92svh; justify-content: flex-end; padding-bottom: 32px; }
  .panel, .panel-hero { padding: 22px; background: rgba(14,16,20,0.9); }
  .section:nth-of-type(even) .panel { margin-left: 0; }
  .cards { grid-template-columns: 1fr; }
  .scene-shade { background: linear-gradient(0deg, rgba(14,16,20,0.85) 0%, rgba(14,16,20,0.2) 60%); }
  .explore-bar .keys { display: none; }
}

/* ---- brand details (official binomOne wordmark on its light plate, claim, motto) ---- */
.brand-plate { display: inline-block; margin: 4px 0 18px; padding: 14px 18px; background: #FEFEFF; border-radius: 4px; line-height: 0; }
.brand-plate img { display: block; width: 176px; height: auto; }
.claim { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); margin-bottom: 0.6em; }
.claim::after { content: ''; display: block; width: 40px; height: 2px; margin-top: 10px; background: var(--accent); }
.motto { font: 500 0.78rem/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }

/* ---- footer: further sections of the site ---- */
.site-footer .more { margin: 0 0 12px; }
.site-footer .more-title { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.site-footer .more ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; }
.site-footer .more a { text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.site-footer .more a:hover { color: var(--text); text-decoration-color: var(--accent); }

/* ---- Logo intro (every page view): logo phase on a dark stage, hold with claim, then the ground fades into the hall ---- */
.intro { display: none; }
.intro-on .intro { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(ellipse at 50% 46%, #15171d 0%, #0A0A0A 58%, #050506 100%); transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1); }
.intro-on .intro::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,0.55) 100%); }
.intro-stage { position: relative; display: grid; place-items: center; transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.7s ease, filter 0.9s ease; }
.intro-video, .intro-still { grid-area: 1 / 1; width: min(60vmin, 500px); height: auto; aspect-ratio: 1; mix-blend-mode: lighten; }
.intro-still { display: none; }
.intro-still-only .intro-still { display: block; }
.intro-claim { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); margin: 0; white-space: nowrap; opacity: 0;
  font: 500 clamp(0.8rem, 1.6vmin, 1rem)/1 var(--mono); letter-spacing: 0.32em; text-transform: uppercase; color: #A8B0C0; }
.intro-claim::after { content: ''; display: block; height: 1px; margin: 14px auto 0; width: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.intro-on:not(.intro-still-only) .intro-claim { animation: introClaim 0.9s ease 2.3s forwards; }
.intro-on:not(.intro-still-only) .intro-claim::after { animation: introLine 1.1s cubic-bezier(0.3, 0, 0.2, 1) 2.5s forwards; }
.intro-still-only .intro-claim { opacity: 1; }
.intro-still-only .intro-claim::after { width: 64px; }
.intro-hold .intro-stage { filter: drop-shadow(0 0 28px rgba(253,93,3,0.18)); }
.intro-out .intro { opacity: 0; }
.intro-out .intro-stage { transform: scale(0.94) translateY(-2vh); opacity: 0; filter: blur(2px); }
.intro-fast .intro, .intro-fast .intro-stage { transition-duration: 0.24s; }
@keyframes introClaim { to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes introLine { to { width: 72px; } }

/* ---- W6 hall: starts in the room, WASD walks at once; the page stays scrollable ---- */
.has3d-only { display: none; }
.scene-ready .has3d-only { display: flex; }
.scene-ready .hero { pointer-events: none; }
.scene-ready .hero .panel, .scene-ready .hero a, .scene-ready .hero button { pointer-events: auto; }
.scene-ready:not(.coarse) .scene, .walking .scene { pointer-events: auto; cursor: grab; }
.scene-ready .scene:active { cursor: grabbing; }
.scene-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 58%, rgba(5,6,9,0.42) 100%); }
/* quiet start hint (one line, in the hero panel's own flow - not a floating game box): disappears on the first
   own wheel / key / swipe or after 6 s (hall-ui.js sets html[data-hint="gone"]), never again this page view; a
   returning, already-coached visitor never sees it at all (html[data-coached], hud.css). Desktop and touch share
   the one element, the text swaps by device. */
.hint-line { margin: 18px 0 0; font: 500 0.82rem/1.5 var(--mono); letter-spacing: 0.02em; color: var(--text-2); opacity: 1; transition: opacity 0.5s ease, visibility 0s 0.5s; }
.hint-line .hint-touch { display: none; }
.coarse .hint-line .hint-desktop { display: none; }
.coarse .hint-line .hint-touch { display: inline; }
html[data-hint="gone"] .hint-line { opacity: 0; visibility: hidden; }

/* walking: the static column steps aside; with the room layer (hallreal/content) the section texts live in the room
   as cards. The hero itself (#start) is hidden by the room layer once walking (content.css) - kept visible until the
   room layer's section column holds its first card (html.room-section-shown, set by hallreal/content), so a phone
   visitor sees the hero first, not an empty room (Phone A, decision 2026-10-17). */
html:not(.room-content) .walking main, .walking .site-footer, .walking .scene-shade { opacity: 0; visibility: hidden; }
main, .site-footer, .scene-shade { transition: opacity 0.45s ease, visibility 0s linear 0s; }
html:not(.room-section-shown).room-content.walking #start { opacity: 1; visibility: visible; }
/* hall HUD (wayfinding, fast travel, aim, walking bar, help, action sheet): hud.css */
.hall-panel { position: fixed; right: 24px; top: calc(var(--header) + 20px); z-index: 40; width: min(420px, calc(100% - 32px)); max-height: calc(100% - var(--header) - 40px); overflow: auto;
  padding: 26px 26px 22px; background: rgba(20,22,27,0.94); border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: 10px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 20px 60px rgba(0,0,0,0.45); animation: panelIn 0.28s cubic-bezier(0.2, 0, 0, 1); }
.hall-panel[hidden] { display: none; }
.hall-panel h2 { font-size: 1.4rem; padding-right: 96px; }
.hall-panel p, .hall-panel li { color: var(--text-2); }
.hall-close { position: absolute; top: 14px; right: 14px; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } }
.srv { display: grid; gap: 10px; margin: 0 0 16px; padding: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.srv h3 { margin: 0; font-size: 0.95rem; }
.srv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.srv .address { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 600 0.75rem/1.2 var(--font); background: #262B36; color: var(--text-2); }
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.on { color: #CFF5DC; background: rgba(46,160,90,0.18); } .pill.on::before { background: #3DDC84; box-shadow: 0 0 8px #3DDC84; }
.pill.off { color: #E8EAF0; background: rgba(160,60,60,0.22); } .pill.off::before { background: #E5534B; }
.pill.wait::before { animation: pillWait 1s ease-in-out infinite; }
@keyframes pillWait { 50% { opacity: 0.3; } }
.hall-panel .steps { margin: 0 0 12px; }
.copied { color: #3DDC84 !important; }
@media (max-width: 760px) {
  .hall-panel { right: 16px; left: 16px; width: auto; top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-height: 70svh; }
}

/* hall zones 0-7 as a list on the page (hall expansion) */
.zones-title { margin: 1.4rem 0 0.5rem; font-size: 1rem; }
.zones { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.zone-btn { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 48px; padding: 6px 10px; text-align: left; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px; background: rgba(14,16,20,0.6); color: var(--text); font: inherit; }
.zone-btn:hover, .zone-btn:focus-visible { border-color: var(--accent); }
.zone-btn .zone-n { flex: none; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: var(--accent); color: #16171A; font: 800 0.9rem/1 var(--mono); }
.zone-btn strong { display: block; font-size: 0.92rem; }
.zone-btn small { display: block; color: var(--text-2); font-size: 0.8rem; }
.hall-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- style morph control (core/style/ui.js): "Stil" disclosure with the realism slider ---- */
.style-ctl { position: relative; }
.style-pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); padding: 16px; background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: 6px; box-shadow: 0 12px 32px rgba(0,0,0,0.45); z-index: 30; }
.style-pop[hidden] { display: none; }
.style-pop-title { margin: 0 0 10px; font-weight: 700; color: var(--text); }
.style-label { display: flex; justify-content: space-between; color: var(--text); font-size: 0.95rem; }
.style-label output { color: var(--text-2); font-variant-numeric: tabular-nums; }
.style-pop input[type=range] { width: 100%; min-height: var(--target); accent-color: var(--accent); }
.style-scale { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-2); margin-top: -6px; }
.style-auto { display: flex; align-items: center; gap: 10px; min-height: var(--target); color: var(--text); }
.style-auto input { width: 20px; height: 20px; accent-color: var(--accent); }
.style-hint { margin: 6px 0 0; font-size: 0.8rem; color: var(--text-2); }
@media (max-width: 760px) { .style-ctl { margin-left: auto; } .style-ctl + .btn { margin-left: 8px; } }
/* W9 world portal buttons (key M): adopted into the HUD action sheet, styled in hud.css */
