/* Theme controls share the existing navigation and leave light mode unchanged. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.75rem;
  min-height: 2.75rem;
  padding: .625rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  line-height: 1;
  transition: background-color .15s, border-color .15s;
}
.theme-toggle:hover { background: #e8edf5; border-color: #a8b9d5; }
.theme-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.theme-toggle svg { width: 1.125rem; height: 1.125rem; flex: 0 0 auto; }
.theme-toggle .theme-icon--sun { display: none; }
.theme-toggle--mobile { display: none; }

/* A navy surface, warm light artwork, and a brighter blue for readable links. */
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111820;
  --ink: #f1f3f5;
  --muted: #b0bdcc;
  --blue: #94b7ff;
  --line: #354458;
  --dark: #172331;
  --theme-surface: #1a2635;
  --theme-hover: #23344a;
  --theme-button-ink: #102039;
  --theme-logo-paper: #eeede7;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .booking-section {
  background-color: var(--paper);
  background-image: none;
}
html[data-theme="dark"] ::selection { color: var(--theme-button-ink); background: #a8c6ff; }
html[data-theme="dark"] .site-header {
  background: #111820;
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .site-header.is-scrolled {
  box-shadow: 0 5px 20px #0003;
  border-bottom-color: var(--line);
}
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  html[data-theme="dark"] .site-header { background: #111820f0; }
}
html[data-theme="dark"] .brand-symbol {
  padding: .125rem;
  border-radius: 50%;
  background: #eeede7;
}
html[data-theme="dark"] .skip-link {
  background: var(--theme-surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
html[data-theme="dark"] .site-header nav .language-switch a[aria-current="page"] {
  background: var(--blue);
  color: var(--theme-button-ink);
}
html[data-theme="dark"] .site-header nav .language-switch a:hover {
  background: var(--theme-hover);
  color: var(--ink);
}
html[data-theme="dark"] .site-header nav .language-switch a[aria-current="page"]:hover {
  background: #aac8ff;
  color: var(--theme-button-ink);
}
html[data-theme="dark"] .site-nav-menu-links {
  background: var(--theme-surface);
  box-shadow: 0 14px 36px #0006;
}
html[data-theme="dark"] .button-primary,
html[data-theme="dark"] .contact-links .booking-contact,
html[data-theme="dark"] .site-header .site-nav .nav-contact,
html[data-theme="dark"] .site-header nav .nav-booking {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--theme-button-ink);
}
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .contact-links .button-primary:not(.booking-contact) {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .button:hover,
html[data-theme="dark"] .contact-links .button:hover,
html[data-theme="dark"] .site-header .site-nav .nav-contact:hover,
html[data-theme="dark"] .site-header nav .nav-booking:hover,
html[data-theme="dark"] .site-header nav .nav-booking:active {
  background: #aac8ff;
  border-color: #aac8ff;
  color: var(--theme-button-ink);
}
html[data-theme="dark"] .arrow-circle { border-color: var(--line); }
html[data-theme="dark"] .text-link:hover .arrow-circle {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--theme-button-ink);
}
html[data-theme="dark"] .art-grid {
  background-image: linear-gradient(#859cc51c 1px, transparent 1px), linear-gradient(90deg, #859cc51c 1px, transparent 1px);
}
html[data-theme="dark"] .about { color: var(--ink); }
html[data-theme="dark"] .contact-person-card,
html[data-theme="dark"] .work-current-project { background: var(--theme-surface); }

/* A narrow dark mount softens the transition into the warm studio artwork. */
html[data-theme="dark"] .validation-visual,
html[data-theme="dark"] .process-visual,
html[data-theme="dark"] .project-visual {
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--theme-surface);
}
html[data-theme="dark"] .validation-visual img,
html[data-theme="dark"] .process-visual img,
html[data-theme="dark"] .project-visual img { border-radius: 10px; }

/* Logo artwork keeps its established colours on a small light canvas. */
html[data-theme="dark"] .logo-tile {
  background: var(--theme-surface);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .logo-tile:hover { background: var(--theme-hover); border-color: #6e91bf; }
html[data-theme="dark"] .logo-art {
  padding: .625rem;
  border-radius: .5rem;
  background: var(--theme-logo-paper);
}
html[data-theme="dark"] .logo-art .work-logo { max-height: 100%; }
html[data-theme="dark"] .logo-caption { color: var(--muted); }
html[data-theme="dark"] .work-case-clients {
  width: fit-content;
  max-width: 100%;
  min-height: 4.5rem;
  height: auto;
  padding: 1rem;
  border-radius: .625rem;
  background: var(--theme-logo-paper);
  color: #17202b;
}
html[data-theme="dark"] .work-current-brand > img {
  box-sizing: content-box;
  max-width: calc(100% - 2rem);
  padding: 1rem;
  border-radius: .625rem;
  background: var(--theme-logo-paper);
}

/* Booking choices and dialog chrome follow the theme; embedded content is native. */
html[data-theme="dark"] .booking-option,
html[data-theme="dark"] .booking-option[data-minutes="15"] {
  --card-background: #1b2d49;
  --card-border: #47628a;
  background: var(--card-background);
  border-color: var(--card-border);
  color: var(--ink);
}
html[data-theme="dark"] .booking-option:hover,
html[data-theme="dark"] .booking-option[data-minutes="15"]:hover,
html[data-theme="dark"] .booking-option:active,
html[data-theme="dark"] .booking-option[data-minutes="15"]:active {
  background: #243c5f;
  border-color: #94b7ff;
  box-shadow: 0 12px 26px #0003;
}
html[data-theme="dark"] .booking-option-footer { border-top-color: #47628a; }
html[data-theme="dark"] .booking-option-arrow,
html[data-theme="dark"] .booking-option:hover .booking-option-arrow,
html[data-theme="dark"] .booking-option:focus-visible .booking-option-arrow {
  background: var(--blue);
  color: var(--theme-button-ink);
}
html[data-theme="dark"] .booking-alternatives .booking-option.booking-shortcut {
  --card-background: #1a2635;
  --card-border: #354458;
  background: var(--card-background);
  border-color: var(--card-border);
}
html[data-theme="dark"] .booking-alternatives .booking-option.booking-shortcut:hover,
html[data-theme="dark"] .booking-alternatives .booking-option.booking-shortcut:active {
  background: var(--theme-hover);
  border-color: #6e91bf;
}
html[data-theme="dark"] .booking-linkedin,
html[data-theme="dark"] .booking-dialog-close { background: var(--theme-surface); color: var(--ink); }
html[data-theme="dark"] .booking-linkedin:hover,
html[data-theme="dark"] .booking-dialog-close:hover { background: var(--theme-hover); color: var(--ink); }
html[data-theme="dark"] .booking-dialog { box-shadow: 0 30px 100px #0008; }
html[data-theme="dark"] .booking-dialog::backdrop { background: #050b13b8; }
html[data-theme="dark"] .booking-dialog-content,
html[data-theme="dark"] .booking-dialog-frame { background: var(--paper); }
/* Calendly supplies its own colours; matching its document scheme keeps the
   transparent space below the calendar from becoming an opaque white canvas. */
html[data-theme="dark"] .booking-dialog-frame { color-scheme: light; }

html[data-theme="dark"] .theme-toggle:hover { background: var(--theme-hover); border-color: #6e91bf; }
html[data-theme="dark"] .theme-toggle .theme-icon--moon { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon--sun { display: block; }

@media (max-width: 760px) {
  html[data-theme="dark"] .site-nav-menu > summary {
    border-color: var(--line);
    background: transparent;
    color: var(--ink);
  }
  html[data-theme="dark"] .site-nav-menu > summary:hover,
  html[data-theme="dark"] .site-nav-menu[open] > summary {
    background: var(--theme-hover);
    border-color: #6e829e;
  }
  html[data-theme="dark"] .site-header .site-nav .language-switch a[aria-current="page"] {
    background: #263447;
    color: var(--ink);
  }
  html[data-theme="dark"] .site-header .site-nav .language-switch a[aria-current="page"]:hover {
    background: #31445c;
    color: var(--ink);
  }
  html[data-theme="dark"] .logo-art { padding: .5rem; }
  .site-nav > .theme-toggle { display: none; }
  .site-nav-menu-links .theme-toggle--mobile {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    min-height: 3rem;
    margin-top: .375rem;
    padding: .75rem .625rem;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    font-size: 1rem;
    line-height: 1.4;
    text-align: left;
  }
  .theme-toggle--mobile span { order: -1; }
  html[data-theme="dark"] .hero-art { border-color: var(--line); }
  html[data-theme="dark"] .booking-dialog { box-shadow: none; }
}
@media (hover: none) {
  html[data-theme="dark"] .booking-option:hover,
  html[data-theme="dark"] .booking-option[data-minutes="15"]:hover,
  html[data-theme="dark"] .booking-alternatives .booking-option.booking-shortcut:hover {
    background: var(--card-background);
    border-color: var(--card-border);
    box-shadow: none;
  }
  html[data-theme="dark"] .booking-option:hover:not(:focus-visible) .booking-option-arrow {
    background: var(--blue);
    color: var(--theme-button-ink);
  }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
}
