/* TOP BUILDING — approved black / turquoise palette, 8 November 2026.
   This layer changes colours only; component layout and media stay intact. */
body.theme-black {
  --theme-base: #090d0e;
  --theme-section: #101718;
  --theme-surface: #1b2525;
  --theme-border: #344140;
  --theme-text: #f4f7f6;
  --theme-muted: #a9b5b2;
  --theme-brand: #17a8a3;
  --theme-accent: #83e2c6;
  --theme-error: #f0b8a8;
  --teal: var(--theme-brand);
  --mint: var(--theme-accent);
  --paper: var(--theme-section);
  --line: var(--theme-border);
  --muted: var(--theme-muted);
  --dark-line: var(--theme-border);
  --dark-muted: var(--theme-muted);
  color-scheme: dark;
  background: var(--theme-base);
  color: var(--theme-text);
}

body.theme-black ::selection {
  background: var(--theme-accent);
  color: var(--theme-base);
}

body.theme-black :focus-visible {
  outline-color: var(--theme-accent);
}

body.theme-black :is(.dark, .deep, .site-header, .mobile-nav, .site-footer) {
  background: var(--theme-base);
  color: var(--theme-text);
}

body.theme-black :is(.white, .tinted, .flow, .software) {
  background: var(--theme-section);
  color: var(--theme-text);
}

body.theme-black :is(.site-header, .mobile-nav, .mobile-nav a, .flow, .subnav,
  .software-inner, .footer-bottom, .engineering .art-foot) {
  border-color: var(--theme-border);
}

/* The transparent source logo remains the accessible, size-defining image. */
body.theme-black .brand {
  position: relative;
}

body.theme-black .brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--theme-brand);
  -webkit-mask: url('/assets/logo.png') center / contain no-repeat;
  mask: url('/assets/logo.png') center / contain no-repeat;
  pointer-events: none;
}

body.theme-black .brand img {
  opacity: 0;
}

body.theme-black :is(.desktop-nav > a:hover, .desktop-nav > a[aria-current=page],
  .mobile-nav a:hover, .mobile-nav a:last-child, .header-phone:hover,
  .breadcrumbs a:hover, .subnav a:hover, .footer-contact a:hover,
  .footer-contact .email, .footer-links a:hover) {
  color: var(--theme-accent);
}

body.theme-black .menu-toggle {
  background: transparent;
  border-color: var(--theme-border);
  color: var(--theme-text);
}

body.theme-black .menu-toggle:hover {
  background: var(--theme-surface);
  border-color: var(--theme-accent);
}

body.theme-black .btn {
  background: var(--theme-brand);
  border-color: transparent;
  color: var(--theme-base);
}

body.theme-black .btn:hover {
  background: var(--theme-accent);
  color: var(--theme-base);
}

body.theme-black .btn.secondary {
  background: transparent;
  border-color: var(--theme-border);
  color: var(--theme-text);
}

body.theme-black .btn.secondary:hover {
  background: var(--theme-surface);
  border-color: var(--theme-accent);
  color: var(--theme-accent);
}

body.theme-black :is(.btn:disabled, .request-form .btn[disabled]) {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-muted);
  opacity: 1;
}

body.theme-black .skip-link {
  background: var(--theme-accent);
  color: var(--theme-base);
}

body.theme-black :is(.muted, .dark .muted, .deep .muted,
  .section-heading > p, .home-hero .lead, .hero-meta, .page-hero > .lead,
  .service-hero .lead, .service-hero .detail, .expert-grid p, .practice ul,
  .case-copy p, .method-item p, .result p, .case-feature p, .service-row p,
  .faq details > p, .summary-item p, .experience p, .contact-info,
  .contact-item .tag, .breadcrumbs, .software-inner, .model-panel p,
  .photo-panel p, .case-detail-gallery figcaption, .footer-contact p,
  .footer-bottom, .engineering .art-label, .engineering .art-foot) {
  color: var(--theme-muted);
}

body.theme-black :is(.accent, .dark .accent, .deep .accent, .text-link,
  .practice .tag, .method-item .tag, .result .tag, .service-row > .tag,
  .lined-list li > span, .flow-item > span, .steps li > span,
  .model-panel .tag),
body.theme-black .faq summary::after {
  color: var(--theme-accent);
}

body.theme-black :is(.practice li > a:hover, .service-row:hover h3,
  .related-link:hover, .contact-item > a:hover, .case-card:hover .case-link) {
  color: var(--theme-accent);
}

body.theme-black .engineering {
  background: transparent;
}

body.theme-black :is(.practice, .steps, .steps li, .method-item, .lined-list li,
  .result, .service-row, .service-row:last-child, .faq details,
  .faq details:last-child, .related-link, .summary-item, .experience,
  .contact-item, .document-list li) {
  border-color: var(--theme-border);
}

body.theme-black :is(.case-card, .model-panel, .case-feature > figure,
  .case-detail-gallery figure) {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

body.theme-black .case-card:hover {
  border-color: var(--theme-accent);
}

body.theme-black .case-photo {
  background: var(--theme-surface);
}

body.theme-black .case-stamp {
  background: var(--theme-base);
  color: var(--theme-text);
}

body.theme-black .case-filters label {
  color: var(--theme-muted);
}

body.theme-black :is(.case-filters select, .chip) {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
}

body.theme-black :is(.case-filters select:hover, .chip:hover) {
  border-color: var(--theme-accent);
}

body.theme-black .chip[aria-pressed=true] {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  color: var(--theme-base);
}

body.theme-black :is(.intake .lead, .intake .help, .form-field, .file-field,
  .file-note, .consent, .form-note) {
  color: var(--theme-muted);
}

body.theme-black .intake .lined-list li {
  border-color: var(--theme-border);
}

body.theme-black .form-field > :is(input, select, textarea) {
  background: transparent;
  border-bottom-color: var(--theme-muted);
  color: var(--theme-text);
  caret-color: var(--theme-accent);
}

body.theme-black .form-field > select {
  background: var(--theme-base);
}

body.theme-black :is(.form-field option, .case-filters option) {
  background: var(--theme-surface);
  color: var(--theme-text);
}

body.theme-black .form-field input::placeholder,
body.theme-black .form-field textarea::placeholder {
  color: var(--theme-muted);
  opacity: 1;
}

body.theme-black .file-field {
  background: var(--theme-surface);
  border-color: var(--theme-muted);
}

body.theme-black :is(.file-field > span:first-child, .file-field input) {
  color: var(--theme-text);
}

body.theme-black .file-field:focus-within {
  outline-color: var(--theme-accent);
}

body.theme-black .consent input {
  accent-color: var(--theme-brand);
}

body.theme-black :is(.consent a, .mail-ready a) {
  color: var(--theme-accent);
}

body.theme-black .form-message {
  background: var(--theme-surface);
  border-color: var(--theme-brand);
  color: var(--theme-text);
}

body.theme-black .form-message.error {
  border-color: var(--theme-error);
  color: var(--theme-error);
}

body.theme-black .request-form [aria-invalid=true] {
  border-bottom-color: var(--theme-error);
}

body.theme-black .cookie-banner {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text);
  box-shadow: 0 8px 40px #0006;
}

body.theme-black .cookie-banner a {
  color: var(--theme-accent);
}

body.theme-black .cookie-settings {
  background: var(--theme-base);
  border-color: var(--theme-border);
  color: var(--theme-muted);
}

body.theme-black .cookie-settings:hover {
  color: var(--theme-accent);
}

body.theme-black .draft-note {
  background: var(--theme-surface);
  color: var(--theme-muted);
}

/* The interactive hero has its own token scope in hero-services-v1.css. */
body.theme-black #topbuilding-services-hero-v1 {
  --tb-base: var(--theme-base);
  --tb-panel: var(--theme-surface);
  --tb-text: var(--theme-text);
  --tb-soft: var(--theme-muted);
  --tb-accent: var(--theme-accent);
  --tb-line: var(--theme-border);
  --tb-ink: var(--theme-base);
}

body.theme-black #topbuilding-services-hero-v1 .tb-pin-dot {
  box-shadow: 0 0 0 5px #090d0e66;
}

body.theme-black #topbuilding-services-hero-v1 .tb-pin[aria-pressed="true"] .tb-pin-dot {
  box-shadow: 0 0 0 7px #090d0e66;
}

body.theme-black #topbuilding-services-hero-v1 .tb-tab {
  background: var(--theme-surface);
}

body.theme-black #topbuilding-services-hero-v1 .tb-tab[aria-pressed="true"] {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  color: var(--theme-base);
}

body.theme-black #topbuilding-services-hero-v1 .tb-primary-link {
  background: var(--theme-brand);
  border-color: var(--theme-brand);
  color: var(--theme-base);
}

body.theme-black #topbuilding-services-hero-v1 .tb-primary-link:hover {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  color: var(--theme-base);
}

body.theme-black #topbuilding-services-hero-v1 .tb-detail-link:hover {
  background: var(--theme-surface);
  border-color: var(--theme-accent);
  color: var(--theme-accent);
}

body.theme-black #topbuilding-services-hero-v1 .tb-service-title-link:hover {
  color: var(--theme-text);
}

body.theme-black #topbuilding-services-hero-v1 .tb-all-link {
  color: var(--theme-accent);
}
