/* ============ Mavu Studio — Live 3D Warehouse viewer (page-specific) ============ */

.bim-hero { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }

/* ---- offerings chips ---- */
.bim-offerings {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
  margin: 1.6rem auto 0; max-width: 640px;
}
.off-chip {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em;
  padding: 0.4rem 0.95rem; border-radius: 999px;
  color: var(--gold-soft); border: 1px solid rgba(201,162,39,0.45);
  background: rgba(201,162,39,0.08);
}
.off-chip--soft { color: var(--muted); border-color: var(--line); background: var(--glass); }
.bim-offer-note { font-size: 0.85rem; color: var(--muted); max-width: 560px; margin: 1rem auto 0; }

/* ---- model selector tabs ---- */
.bim-tabs {
  width: min(1320px, 96%); margin: 0 auto clamp(1rem, 2.5vw, 1.5rem);
  display: flex; gap: 0.7rem; flex-wrap: nowrap; overflow-x: auto;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch; padding-bottom: 0.3rem;
}
.bim-tabs button {
  flex: 1 1 0; min-width: 190px; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 0.8rem; font: inherit;
  padding: 0.85rem 1.1rem; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--line); color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.bim-tabs button:hover { border-color: var(--gold); transform: translateY(-2px); }
.bim-tabs button.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201,162,39,0.16), rgba(201,162,39,0.04));
  box-shadow: 0 8px 26px rgba(201,162,39,0.16);
}
.bim-tabs .t-ico {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 10px; background: rgba(255,255,255,0.06); color: var(--gold-soft); font-size: 1.2rem;
}
.bim-tabs button.active .t-ico { background: rgba(201,162,39,0.2); color: var(--gold); }
.bim-tabs .t-txt { display: flex; flex-direction: column; line-height: 1.25; }
.bim-tabs .t-txt strong { font-weight: 600; }
.bim-tabs .t-txt em { font-style: normal; color: var(--muted); font-size: 0.78rem; }

/* ---- stage ---- */
.bim-stage {
  position: relative;
  width: min(1320px, 96%);
  margin: 0 auto;
  height: clamp(420px, 74vh, 820px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(201,162,39,0.08), transparent 60%),
    #16181c;
  box-shadow: 0 24px 70px rgba(0,0,0,0.45);
}
.bim-stage:fullscreen { width: 100%; height: 100%; border-radius: 0; border: 0; }

.bim-canvas { position: absolute; inset: 0; }
.bim-canvas canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.bim-canvas canvas:active { cursor: grabbing; }

/* ---- loading / error overlay ---- */
.bim-loading {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: 0.95rem; z-index: 5; background: #16181c;
  transition: opacity 0.5s ease;
}
.bim-loading.hidden { opacity: 0; pointer-events: none; }
.bim-loading.error { color: var(--gold-soft); }
.bim-spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.12); border-top-color: var(--gold);
  animation: bimspin 0.9s linear infinite; margin: 0 auto 1rem;
}
@keyframes bimspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bim-spinner { animation: none; } }

/* ---- floating control chrome ---- */
.bim-overlay {
  position: absolute; z-index: 4; display: flex; gap: 0.5rem;
  pointer-events: none;
}
.bim-overlay > * { pointer-events: auto; }

.bim-modes { top: 1rem; left: 1rem; }
.bim-modes {
  position: absolute; z-index: 4; display: inline-flex; padding: 0.3rem;
  background: rgba(20,21,24,0.72); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 999px;
}
.bim-modes button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.5rem 1rem; border-radius: 999px; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap;
}
.bim-modes button .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.bim-modes button.active {
  color: #16130a; background: linear-gradient(135deg, var(--gold), #a8851b);
  box-shadow: 0 4px 16px rgba(201,162,39,0.3);
}
.bim-modes button.active .dot { opacity: 1; background: #16130a; }

.bim-tools { top: 1rem; right: 1rem; position: absolute; z-index: 4; display: flex; gap: 0.5rem; }
.bim-icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  background: rgba(20,21,24,0.72); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 12px; color: var(--text);
  transition: all 0.2s; font-size: 1.05rem; line-height: 1;
}
.bim-icon-btn:hover { border-color: var(--gold); color: var(--gold-soft); }

/* ---- layer panel ---- */
.bim-layers {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 4; width: 210px;
  background: rgba(20,21,24,0.78); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.bim-layers-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.9rem; cursor: pointer; user-select: none;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
}
.bim-layers-head .chev { transition: transform 0.25s; }
.bim-layers.collapsed .chev { transform: rotate(-90deg); }
.bim-layers-body { padding: 0 0.9rem 0.8rem; display: grid; gap: 0.5rem; }
.bim-layers.collapsed .bim-layers-body { display: none; }
.bim-layers label {
  display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem;
  color: var(--text); cursor: pointer;
}
.bim-layers input { accent-color: var(--gold); width: 15px; height: 15px; }

/* ---- system legend (BIM mode) ---- */
.bim-legend {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 4;
  background: rgba(20,21,24,0.78); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 14px; padding: 0.75rem 0.95rem;
  display: none; gap: 0.4rem; grid-template-columns: 1fr;
  font-size: 0.78rem; color: var(--muted); max-width: 200px;
}
.bim-legend.show { display: grid; }
.bim-legend b { color: var(--gold); font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.68rem; margin-bottom: 0.15rem; }
.bim-legend span { display: flex; align-items: center; gap: 0.55rem; }
.bim-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.bim-hint {
  text-align: center; color: var(--muted); font-size: 0.82rem;
  margin: 1rem auto 0; max-width: 640px;
}
.bim-hint kbd {
  background: var(--glass); border: 1px solid var(--line); border-radius: 5px;
  padding: 0.1rem 0.4rem; font-size: 0.78rem; color: var(--text);
}

/* ---- project library below the stage ---- */
.bim-projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
  margin-top: 2rem; }
.bim-proj { padding: 1.6rem; display: flex; flex-direction: column; }
.bim-proj h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.bim-proj p { color: var(--muted); font-size: 0.9rem; flex: 1; margin-bottom: 1.2rem; }
.bim-proj .proj-band {
  height: 92px; border-radius: 12px; margin-bottom: 1.1rem;
  display: grid; place-items: center;
}
.bim-proj .proj-band span { font-size: 2.4rem; color: rgba(255,255,255,0.9); }
.bim-proj .btn { align-self: flex-start; }

@media (max-width: 900px) {
  .bim-projects { grid-template-columns: 1fr; }
  .bim-layers { width: 178px; }
}
@media (max-width: 620px) {
  .bim-modes button { padding: 0.45rem 0.7rem; font-size: 0.76rem; }
  .bim-legend { display: none !important; }
  .bim-tabs button { min-width: 160px; }
}

/* ---- featured tab (showpiece) ---- */
.bim-tabs button.t-featured { border-color: rgba(201,162,39,0.5); background: linear-gradient(135deg, rgba(201,162,39,0.14), rgba(201,162,39,0.03)); }
.bim-tabs .t-star { color: var(--gold); font-style: normal; font-size: 0.8em; margin-left: 0.25rem; }

/* ---- copy-link toast ---- */
.bim-toast {
  position: absolute; left: 50
/* ---- featured tab (showpiece) ---- */
.bim-tabs button.t-featured { border-color: rgba(201,162,39,0.5); background: linear-gradient(135deg, rgba(201,162,39,0.14), rgba(201,162,39,0.03)); }
.bim-tabs .t-star { color: var(--gold); font-style: normal; font-size: 0.8em; margin-left: 0.25rem; }

/* ---- copy-link toast ---- */
.bim-toast {
  position: absolute; left: 50%; bottom: 1rem; transform: translate(-50%, 12px);
  z-index: 6; padding: 0.6rem 1.1rem; border-radius: 999px;
  background: rgba(20,21,24,0.92); border: 1px solid var(--gold);
  color: var(--gold-soft); font-size: 0.85rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.bim-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- featured project card ---- */
.bim-proj--feature {
  display: grid; grid-template-columns: 300px 1fr; gap: 0; padding: 0; overflow: hidden;
  margin-bottom: 1.4rem; border-color: rgba(201,162,39,0.4);
}
.proj-band--tall { height: auto; min-height: 220px; border-radius: 0; margin: 0; }
.bim-proj--feature .feature-body { padding: clamp(1.4rem, 3vw, 2.2rem); }
.bim-proj--feature .feature-body h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.bim-proj--feature .feature-body p { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.2rem; }
.feature-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
@media (max-width: 720px) {
  .bim-proj--feature { grid-template-columns: 1fr; }
  .proj-band--tall { min-height: 130px; }
}
