/* Loom Solutions — shared light / dark theme tokens */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-2: #121212;
  --surface: #0d0d0d;
  --surface-2: #121212;
  --line: #1f1f1f;
  --line-strong: #1a1a1a;
  --line-2: #2a2a2a;
  --ink: #edeae4;
  --ink-2: #a6a29a;
  --mute: #6a6760;
  --ember: #ff4a1c;
  --ember-2: #ff7a4c;
  --nav-bg: rgba(10, 10, 10, 0.72);
  --grain-opacity: 0.04;
  --shadow-deep: rgba(0, 0, 0, 0.78);
  --contact-divider: rgba(0, 0, 0, 0.2);
  --fixbar-track: rgba(255, 255, 255, 0.04);
  --cta-on-ember: #0a0a0a;
  --cta-bar-bg: #000;
  --cta-bar-hover: #111;
  --mobile-drawer-bg: #0a0a0a;
  --corridor-grad: radial-gradient(120% 80% at 50% 45%, #141414 0%, #000 80%);
  --scene-floor-a: rgba(255, 255, 255, 0.05);
  --scene-nav-pill-bg: rgba(10, 10, 10, 0.5);
  --monitor-shell: #1a1a1a;
  --monitor-face: #0d0d0d;
  --monitor-inner: #000;
  --monitor-chrome: #0a0a0a;
  --monitor-text-muted: #6a6760;
  --phone-shell: #1a1a1a;
  --phone-face: #000;
  --phone-row: #111;
  --brandgrid-bg: #000;
  --brandgrid-cell: #0d0d0d;
  --brandgrid-mark-inner: #0d0d0d;
  --dash-kpi: #121212;
  --pc-dark: #000;
  --ops-node: #0d0d0d;
  --ops-em-bg: #1a0a05;
  --work-img-a: #121212;
  --work-img-b: #0d0d0d;
  --scene-nav-border: var(--line);
  --disc-hover-active: #121212;
  --theme-toggle-bg: var(--bg-2);
  --theme-toggle-border: var(--line-2);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4ef;
  --bg-2: #edeae4;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --line: #d9d4ca;
  --line-strong: #c9c4ba;
  --line-2: #c4bfb5;
  --ink: #151311;
  --ink-2: #4f4b44;
  --mute: #7a756c;
  --ember: #d9380e;
  --ember-2: #e85528;
  --nav-bg: rgba(246, 244, 239, 0.9);
  --grain-opacity: 0.03;
  --shadow-deep: rgba(20, 18, 14, 0.14);
  --contact-divider: rgba(0, 0, 0, 0.12);
  --fixbar-track: rgba(0, 0, 0, 0.08);
  --cta-on-ember: #0a0a0a;
  --cta-bar-bg: #0f0e0c;
  --cta-bar-hover: #1a1815;
  --mobile-drawer-bg: #f6f4ef;
  --corridor-grad: radial-gradient(120% 80% at 50% 45%, #e8e6e0 0%, #dcd9d2 80%);
  --scene-floor-a: rgba(0, 0, 0, 0.07);
  --scene-nav-pill-bg: rgba(255, 255, 255, 0.72);
  --monitor-shell: #c9c4ba;
  --monitor-face: #fafaf8;
  --monitor-inner: #f2f0ec;
  --monitor-chrome: #e8e6e0;
  --monitor-text-muted: #7a756c;
  --phone-shell: #c9c4ba;
  --phone-face: #f2f0ec;
  --phone-row: #e8e6e0;
  --brandgrid-bg: #e0dcd4;
  --brandgrid-cell: #ffffff;
  --brandgrid-mark-inner: #f6f4ef;
  --dash-kpi: #f0ede6;
  --pc-dark: #3a3835;
  --ops-node: #ffffff;
  --ops-em-bg: #ffe8e0;
  --work-img-a: #e8e6e0;
  --work-img-b: #f0ede6;
  --scene-nav-border: var(--line);
  --disc-hover-active: var(--surface-2);
  --theme-toggle-bg: var(--surface);
  --theme-toggle-border: var(--line);
}

.theme-toggle {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--theme-toggle-border);
  background: var(--theme-toggle-bg);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
[data-theme="light"] .theme-toggle {
  box-shadow: 0 1px 2px rgba(15, 14, 12, 0.06), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
.theme-toggle:hover {
  border-color: var(--ember);
  color: var(--ember);
  transform: scale(1.05);
}
.theme-toggle:active {
  transform: scale(0.97);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}
.theme-toggle .icon-sun {
  display: none;
}
[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}
[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle:hover,
  .theme-toggle:active {
    transform: none;
  }
}

.cta .cta-field-label {
  color: var(--cta-on-ember);
  opacity: 0.55;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 960px) {
  .nav-actions {
    gap: 6px;
  }
}

/* —— Brand logo (replace CSS “mark” square in nav) */
.brand .mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
}

.footer-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  margin-bottom: 22px;
}

.footer-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
}

.mobile-drawer .drawer-brand {
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.mobile-drawer .drawer-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}
