/*
 * Bimer Unified Architectural & 3D Digital Twin Design System Tokens
 * Supports dark (#08090a / #f2f1ec) and light (#f2f1ec / #111213) themes via [data-theme].
 */

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="dark"] {
  color-scheme: dark;

  --font: "Geist", "Pretendard", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: "Geist Serif", "Noto Serif KR", ui-serif, Georgia, serif;
  --pixel: "Geist Pixel", "Geist Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.8, 0.64, 1);

  --gutter: clamp(16px, 4vw, 48px);
  --max-width: 1320px;
  --radius-sm: 3px;
  --radius-md: 8px;
  --radius-lg: 11px;
  --radius-xl: 18px;
  --radius-full: 999px;
  --bimer-nav-h: 56px;

  /* Core surfaces & ink (Dark) */
  --bg: #08090a;
  --bg-2: #0d0e10;
  --bg-3: #131518;
  --ink: #f2f1ec;
  --ink-2: #a3a49f;
  --ink-3: #62645f;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --card: rgba(255, 255, 255, 0.024);
  --accent: #ffffff;
  --accent-ink: #000000;
  --accent-soft: rgba(255, 255, 255, 0.12);
  --glow: rgba(255, 255, 255, 0.35);

  /* Editor / 3D Canvas tokens (Dark) */
  --ed-bg: #0c0d0f;
  --ed-panel: rgba(16, 17, 19, 0.86);
  --ed-panel-ink: #ecebe6;
  --ed-panel-line: rgba(255, 255, 255, 0.09);
  --ed-paper: #16181b;
  --ed-grid: rgba(255, 255, 255, 0.05);
  --ed-vp: radial-gradient(80% 70% at 50% 40%, #131518, #08090a 75%);

  /* Elevation */
  --shadow-panel: 0 4px 18px 0 rgba(8, 9, 10, 0.45);
  --shadow-card: 0 30px 80px -30px rgba(0, 0, 0, 0.8);

  /* MEP & Semantic Disciplines (Dark) */
  --mep-electrical: #ffb547;
  --mep-hvac: #3ff0d2;
  --mep-rooftop: #5ce1c6;
  --mep-cold-water: #4fb3ff;
  --mep-life-safety: #ff4fa3;
  --mep-controls: #b892ff;
  --mep-canopy: #9aa3b0;
  --mep-fit-out: #ece8dc;
  --mep-alert: #ff6a52;
  --mep-foliage: #9fd8a8;
}

[data-theme="light"] {
  color-scheme: light;

  /* Core surfaces & ink (Light) */
  --bg: #f2f1ec;
  --bg-2: #eae8e1;
  --bg-3: #e1dfd7;
  --ink: #111213;
  --ink-2: #55575a;
  --ink-3: #8e8f8a;
  --line: rgba(0, 0, 0, 0.09);
  --line-2: rgba(0, 0, 0, 0.16);
  --card: rgba(255, 255, 255, 0.55);
  --accent: #000000;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 0, 0, 0.10);
  --glow: rgba(0, 0, 0, 0.25);

  /* Editor / 3D Canvas tokens (Light) */
  --ed-bg: #fbfaf7;
  --ed-panel: rgba(255, 255, 255, 0.90);
  --ed-panel-ink: #141516;
  --ed-panel-line: rgba(0, 0, 0, 0.08);
  --ed-paper: #f6f5f1;
  --ed-grid: rgba(0, 0, 0, 0.06);
  --ed-vp: radial-gradient(120% 90% at 60% 40%, #c3c9ce 0%, #b1b8be 70%, #a8afb5 100%);

  /* Elevation */
  --shadow-panel: 0 4px 18px 0 rgba(242, 241, 236, 0.45);
  --shadow-card: 0 30px 70px -35px rgba(40, 35, 20, 0.35);

  /* MEP & Semantic Disciplines (Light) */
  --mep-electrical: #c27400;
  --mep-hvac: #008f7a;
  --mep-rooftop: #008f7a;
  --mep-cold-water: #0f6fc4;
  --mep-life-safety: #c4136a;
  --mep-controls: #6a3fd1;
  --mep-canopy: #55606e;
  --mep-fit-out: #3d3a34;
  --mep-alert: #cc3218;
  --mep-foliage: #3c8a4a;
}

.bimer-tag3d {
  font-family: var(--font);
  background: var(--ed-panel);
  color: var(--ed-panel-ink);
  border: 1px solid var(--ed-panel-line);
  border-radius: var(--radius-md);
  padding: 7px 11px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-panel);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
  white-space: nowrap;
}

.bimer-tag3d__label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}

.bimer-tag3d__detail {
  font-family: var(--font);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
}

.bimer-tour-panel {
  font-family: var(--font);
  background: var(--ed-panel);
  color: var(--ed-panel-ink);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-panel);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.bimer-theme-toggle {
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 30px;
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.bimer-theme-toggle:hover {
  border-color: var(--ink-2);
}

.bimer-theme-toggle__thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
  line-height: 1;
  transform: translateX(0px);
  transition: transform 0.3s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

[data-theme="light"] .bimer-theme-toggle__thumb {
  transform: translateX(22px);
}
