/* Pure black foundation, with neutral surfaces for clear visual hierarchy. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #000000;
  --page: #000000;
  --surface: #101010;
  --surface-raised: #191919;
  --surface-soft: #262626;
  --surface-warm: #151412;
  --ink: #f1f2f0;
  --gray: #d4d4d4;
  --muted: #bdbdbd;
  --ice: #222222;
  --cloud: #090909;
  --line: #343434;
  --control-border: #727272;
  --bronze: #c78a2a;
  --gold-text: #edb94f;
  --gold-hover: #f5cb72;
  --gold-soft: #33240c;
  --gold-border: #6b4718;
  --gold-face-light: #f2c05c;
  --gold-face-deep: #cb8b29;
  --gold-chart-low: #a66d23;
  --gold-chart-mid: #c38c38;
  --action-bg: #eeb64c;
  --action-hover: #f5c86d;
  --action-ink: #211a0e;
  --nav-surface: rgba(16, 16, 16, .96);
  --shadow: rgba(0, 0, 0, .32);
  --scroll-track: #090909;
  --scroll-thumb: #686868;
  --scroll-hover: #969696;
  --scroll-active: #bfbfbf;
}

:where(html[data-theme="dark"]) body { background: var(--canvas); }
:where(html[data-theme="dark"]) .page-shell, :where(html[data-theme="dark"]) .hero { background: var(--page); }
:where(html[data-theme="dark"]) ::selection { background: var(--action-bg); color: var(--action-ink); }
:where(html[data-theme="dark"]) a:focus-visible, :where(html[data-theme="dark"]) button:focus-visible, :where(html[data-theme="dark"]) summary:focus-visible {
  outline-color: var(--gold-text);
}

/* One clear primary action, supported by quiet outlined actions. */
:where(html[data-theme="dark"]) .button-dark, :where(html[data-theme="dark"]) .button-gold, :where(html[data-theme="dark"]) .skip-link {
  background: var(--action-bg);
  color: var(--action-ink);
  border-color: var(--action-bg);
  box-shadow: 0 5px 14px -9px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .24);
}
:where(html[data-theme="dark"]) .button-dark:hover, :where(html[data-theme="dark"]) .button-gold:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
  box-shadow: 0 9px 20px -10px var(--shadow);
}
:where(html[data-theme="dark"]) .button-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--control-border);
}
:where(html[data-theme="dark"]) .button-outline:hover {
  background: var(--surface-raised);
  border-color: var(--gold-text);
}
:where(html[data-theme="dark"]) .service-link:hover { color: var(--gold-hover); }

/* Transparent at the top, readable over content after scrolling. */
:where(html[data-theme="dark"]) .header.is-scrolled .nav-shell {
  background: var(--nav-surface);
  border-color: var(--line);
  box-shadow: 0 10px 30px -16px var(--shadow);
}
:where(html[data-theme="dark"]) .mobile-nav { background: var(--surface); }
:where(html[data-theme="dark"]) .menu-toggle {
  background: transparent;
  border-color: var(--control-border);
}
:where(html[data-theme="dark"]) .menu-toggle span { background: var(--ink); }
:where(html[data-theme="dark"]) .menu-toggle:hover { background: var(--surface-raised); }

/* Connected services: neutral dark tiles, with a single gold focal point. */
:where(html[data-theme="dark"]) .network-lines { stroke: var(--line); }
:where(html[data-theme="dark"]) .network-lines circle { stroke: var(--page); }
:where(html[data-theme="dark"]) .soft-tile, :where(html[data-theme="dark"]) .small-tile, :where(html[data-theme="dark"]) .people-tile, :where(html[data-theme="dark"]) .business-stage > span {
  background: linear-gradient(145deg, var(--surface-raised), var(--surface));
  border-color: var(--line);
  color: var(--gray);
  box-shadow: 0 14px 25px -15px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .035);
}
:where(html[data-theme="dark"]) .gold-tile, :where(html[data-theme="dark"]) .opening-visual .visual-stamp {
  background: linear-gradient(145deg, var(--gold-soft), var(--surface-warm));
  color: var(--gold-text);
  border-color: var(--gold-border);
  box-shadow: 0 12px 25px -17px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .035);
}
:where(html[data-theme="dark"]) .main-tile {
  background: linear-gradient(145deg, var(--gold-face-light), var(--gold-face-deep));
  color: var(--action-ink);
  border-color: var(--gold-face-light);
  box-shadow: 0 20px 32px -17px var(--shadow), inset 1px 2px 3px rgba(255, 255, 255, .23);
}
:where(html[data-theme="dark"]) .node-label, :where(html[data-theme="dark"]) .node-center .node-label { color: var(--muted); }
:where(html[data-theme="dark"]) .hero-bottom { border-color: var(--line); }
:where(html[data-theme="dark"]) .scroll-mark { border-color: var(--muted); }

/* Service cards retain their hierarchy, including every small visual. */
:where(html[data-theme="dark"]) .service-card {
  background: var(--surface);
  border-color: var(--line);
}
:where(html[data-theme="dark"]) .service-visual { background: var(--surface); }
:where(html[data-theme="dark"]) .service-visual::after {
  background: linear-gradient(0deg, var(--surface), transparent);
}
:where(html[data-theme="dark"]) .mini-document, :where(html[data-theme="dark"]) .routine-sheet, :where(html[data-theme="dark"]) .tax-sheet, :where(html[data-theme="dark"]) .people-sheet {
  background: var(--surface-raised);
  border-color: var(--line);
  box-shadow: 0 12px 26px -16px var(--shadow);
}
:where(html[data-theme="dark"]) .doc-heading, :where(html[data-theme="dark"]) .document-item, :where(html[data-theme="dark"]) .mini-heading, :where(html[data-theme="dark"]) .routine-row, :where(html[data-theme="dark"]) .tax-labels, :where(html[data-theme="dark"]) .people-chip, :where(html[data-theme="dark"]) .mei-caption { color: var(--muted); }
:where(html[data-theme="dark"]) .doc-line { background: var(--line); }
:where(html[data-theme="dark"]) .tiny-check {
  background: var(--gold-soft);
  color: var(--gold-text);
}
:where(html[data-theme="dark"]) .visual-stamp {
  background: var(--surface-raised);
  border-color: var(--line);
  color: var(--gold-text);
  box-shadow: 0 12px 22px -13px var(--shadow);
}
:where(html[data-theme="dark"]) .routine-row { border-color: var(--line); }
:where(html[data-theme="dark"]) .row-icon, :where(html[data-theme="dark"]) .people-chip { background: var(--surface-soft); }
:where(html[data-theme="dark"]) .routine-check, :where(html[data-theme="dark"]) .mini-heading .icon { color: var(--gold-text); }
:where(html[data-theme="dark"]) .tax-bars {
  border-color: var(--line);
  background: repeating-linear-gradient(to top, transparent, transparent 28px,
    var(--line) 29px, var(--line) 30px);
}
:where(html[data-theme="dark"]) .tax-bars span { background: var(--gold-chart-low); }
:where(html[data-theme="dark"]) .tax-bars span:nth-child(2) { background: var(--gold-chart-mid); }
:where(html[data-theme="dark"]) .tax-bars span:nth-child(4) { background: var(--gold-text); }
:where(html[data-theme="dark"]) .stage-connector i { background: var(--line); }
:where(html[data-theme="dark"]) .stage-connector i:last-child { background: var(--gold-text); }
:where(html[data-theme="dark"]) .business-stage .stage-company {
  background: linear-gradient(145deg, var(--gold-soft), var(--surface-warm));
  border-color: var(--gold-border);
  color: var(--gold-text);
}

/* The daylight photograph keeps the experience human and welcoming. */
:where(html[data-theme="dark"]) .about-image { background: var(--surface); }
:where(html[data-theme="dark"]) .image-caption {
  background: var(--nav-surface);
  border-color: var(--line);
  color: var(--muted);
  box-shadow: 0 12px 22px -15px var(--shadow);
}
:where(html[data-theme="dark"]) .image-caption strong { color: var(--ink); }
:where(html[data-theme="dark"]) .caption-icon, :where(html[data-theme="dark"]) .value-icon {
  border-color: var(--line);
  color: var(--gold-text);
}

/* Process, answers, and final invitation stay clearly separated. */
:where(html[data-theme="dark"]) .step-top { border-color: var(--line); }
:where(html[data-theme="dark"]) .step-number { color: var(--gold-text); }
:where(html[data-theme="dark"]) .step-top > .icon { color: var(--muted); }
:where(html[data-theme="dark"]) .switch-banner {
  background: var(--surface);
  border-color: var(--line);
}
:where(html[data-theme="dark"]) .switch-icon {
  background: var(--gold-soft);
  color: var(--gold-text);
}
:where(html[data-theme="dark"]) .faq-list summary > .icon { color: var(--gray); }
:where(html[data-theme="dark"]) .faq-list details[open] summary > .icon { color: var(--gold-text); }
:where(html[data-theme="dark"]) .final-cta {
  background: var(--surface-warm);
  border-color: var(--line);
}
:where(html[data-theme="dark"]) .cta-emblem {
  background: linear-gradient(145deg, var(--gold-soft), var(--surface-warm));
  border-color: var(--gold-border);
  color: var(--gold-text);
  box-shadow: 0 14px 24px -17px var(--shadow);
}
:where(html[data-theme="dark"]) .cta-note { color: var(--muted); }
:where(html[data-theme="dark"]) .footer-contact .icon { color: var(--gold-text); }
:where(html[data-theme="dark"]) .floating-whatsapp {
  background: var(--surface-raised);
  border-color: var(--control-border);
  color: var(--ink);
  box-shadow: 0 8px 24px -10px var(--shadow);
}
:where(html[data-theme="dark"]) .floating-whatsapp:hover {
  background: var(--surface-soft);
  border-color: var(--gold-text);
}

@media (forced-colors: active) {
  :where(html[data-theme="dark"]) .button, :where(html[data-theme="dark"]) .menu-toggle, :where(html[data-theme="dark"]) .floating-whatsapp { border-color: ButtonText; }
}
