/* Hallmark · shape: app screen · genre: atmospheric · theme: Lumen (deal 1/3, seed star-kiz-mimarl-siyah-1ba2·4dcda789·2026-11-17·r0) · job: try
 * screen: full-bleed 3D viewer with a view group, a section slider and a controls legend · states: loading, error, missing, full · signature: the floor-section slider that lifts storeys away
 * axes: dark/roman-serif/warm · posture: restrained · contrast: pass · brand: Star İkiz (logo-sampled accents) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4 · weakest: P, a viewer is a viewer; the section slider and double-click travel are what make it this firm's tool */
@import url("./tokens.css");
@import url("./base.css");

html, body { height: 100%; }
body.viewer { overflow: hidden; overflow-x: clip; }
h1, label, .chip, .btn, dt { text-transform: lowercase; }

.readout { font: 400 var(--text-xs)/1.5 var(--font-outlier); color: var(--color-ink-2); }

/* sahne */
.stage { position: fixed; inset: 0; }
.stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage__state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--space-md); padding: var(--space-lg); text-align: center; background: var(--color-paper); z-index: var(--z-raised); }
.stage__state p { max-width: 48ch; color: var(--color-ink-2); }
.stage__err-title { font: 400 var(--text-3xl)/1 var(--font-display); color: var(--color-ink) !important; text-transform: lowercase; }
.meter { width: 220px; height: 2px; background: var(--color-rule); border-radius: var(--radius-pill); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--color-accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-short) var(--ease-out); }

/* üst ve alt paneller */
.hud { position: fixed; left: var(--space-md); right: var(--space-md); z-index: var(--z-sticky); display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud--top { top: var(--space-md); }
.hud--bottom { bottom: var(--space-md); justify-content: space-between; align-items: flex-end; }

.hud__brand { flex-shrink: 0; border-radius: 6px; }
.hud__brand img { height: 48px; width: auto; border-radius: 6px; }
.hud__title { font-size: var(--text-2xl); line-height: 1; max-width: 28ch; padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); background: color-mix(in oklab, var(--color-paper) 72%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hud__views { margin-left: auto; display: flex; gap: var(--space-2xs); padding: var(--space-2xs); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); background: color-mix(in oklab, var(--color-paper) 78%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); flex-wrap: wrap; }

.chip { min-height: 36px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink-2); font-size: var(--text-sm); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.chip:hover { background: var(--color-paper-3); color: var(--color-ink); }
.chip[aria-pressed="true"] { background: var(--color-accent); color: var(--color-accent-ink); }
.chip:active { transform: translateY(1px); }
.chip:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.section-ctl, .help { padding: var(--space-sm) var(--space-md); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); background: color-mix(in oklab, var(--color-paper) 80%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.section-ctl { display: grid; grid-template-columns: auto minmax(0, 1fr) 5.5em; align-items: center; gap: var(--space-md); width: min(440px, 100%); }
.section-ctl label { font-size: var(--text-sm); color: var(--color-ink-2); }
.section-ctl output { text-align: right; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--color-rule-2); border-radius: var(--radius-pill); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--color-rule-2); border-radius: var(--radius-pill); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: calc(-1 * var(--space-xs)); border-radius: 50%; background: var(--color-accent); border: 0; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--color-accent); border: 0; }
input[type="range"]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-pill); }

.help { display: flex; gap: var(--space-lg); margin: 0; font-size: var(--text-sm); flex-wrap: wrap; }
.help > div { display: flex; gap: var(--space-xs); }
.help dt { color: var(--color-ink); font-weight: 500; }
.help dd { margin: 0; color: var(--color-muted); }

/* bulunamadı */
.missing { min-height: 100%; display: grid; place-content: center; justify-items: start; gap: var(--space-lg); padding: var(--space-xl) var(--gutter); max-width: 40rem; margin-inline: auto; overflow-y: auto; }
.missing img { height: 88px; width: auto; border-radius: 8px; }
.missing h1 { font-size: var(--text-display-s); line-height: 1; }
.missing p { color: var(--color-ink-2); }
body.viewer:has(.missing) { overflow: auto; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-lg); border-radius: var(--radius-pill); text-decoration: none; font-weight: 500; transition: background-color var(--dur-short) var(--ease-out); }
.btn--quiet { box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2); color: var(--color-ink); }
.btn--quiet:hover { background: var(--color-paper-2); }
.btn:focus-visible, .hud__brand:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

@media (max-width: 40rem) {
  .hud__brand img { height: 40px; }
  .hud__title { font-size: var(--text-xl); }
  .hud__views { margin-left: 0; width: 100%; justify-content: space-between; }
  .help { display: none; }
  .section-ctl { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .meter span, .chip { transition: none; } }
