/* Shared header controls. Theme styles are kept separate from the page layout. */
:root { color-scheme: light; }
.header-inner { gap: 22px; }
.site-header nav { margin-left: auto; gap: 24px; }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}
.theme-toggle:hover { background: #eaf0f6; }
.theme-toggle svg {
  grid-area: 1 / 1;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-sun, .brand-mark-dark { display: none !important; }

/* Keep the electric blue for white-text buttons; lighten blue text separately. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b0f14;
  --ink: #f0f5fa;
  --muted: #a8b3c2;
  --line: #2b3a4b;
  --link: #8bb5ff;
}
[data-theme="dark"] .site-header { background: rgba(11, 15, 20, .97); }
[data-theme="dark"] .theme-toggle { border-color: #60758c; }
[data-theme="dark"] .theme-toggle:hover { background: #1b2939; }
[data-theme="dark"] .theme-moon,
[data-theme="dark"] .brand-mark-light { display: none !important; }
[data-theme="dark"] .theme-sun,
[data-theme="dark"] .brand-mark-dark { display: block !important; }
[data-theme="dark"] .brand b,
[data-theme="dark"] .site-header nav > a:hover,
[data-theme="dark"] .text-link:hover,
[data-theme="dark"] .service-link:hover,
[data-theme="dark"] .direct-contact { color: var(--link); }
[data-theme="dark"] :focus-visible { outline-color: #8bb5ff; }
[data-theme="dark"] .skip-link { background: #f0f5fa; color: #0b0f14; }
[data-theme="dark"] .button-outline { border-color: #60758c; }
[data-theme="dark"] .button-outline:hover { background: #1b2939; border-color: #a8b3c2; }
[data-theme="dark"] .intro-label { color: #c6d4e3; }
[data-theme="dark"] .hero-note,
[data-theme="dark"] .expertise > span,
[data-theme="dark"] .section-kicker,
[data-theme="dark"] .brand-signature,
[data-theme="dark"] .contact-note,
[data-theme="dark"] .field label span,
[data-theme="dark"] .form-help,
[data-theme="dark"] .site-footer > span { color: #a8b3c2; }
[data-theme="dark"] .hero-note svg { stroke: #60d9c9; }
[data-theme="dark"] .hero-visual { outline: 1px solid #263547; }
[data-theme="dark"] .service-icon { background: #182b48; color: #a7c7ff; }
[data-theme="dark"] .service-icon.teal { background: #123630; color: #60d9c9; }
[data-theme="dark"] .service ul { color: #c6d4e3; }
[data-theme="dark"] .process { background: #080d14; }
[data-theme="dark"] .step-result span { color: #a8b3c2; }
[data-theme="dark"] .principle-mark { color: #60d9c9; }
[data-theme="dark"] summary > span { color: #b4c4d6; }
[data-theme="dark"] .contact { background: #121b27; border-color: var(--line); }
[data-theme="dark"] .field label { color: #e2eaf4; }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea { background-color: #0b121c; border-color: #60758c; }
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #9baabe; opacity: 1; }
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus { border-color: #8bb5ff; }
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23b4c4d6' stroke-width='1.5'/%3E%3C/svg%3E");
}
[data-theme="dark"] .form-result { background: #0b121c; border-color: #60758c; }
[data-theme="dark"] .form-result p { color: #bdd5fc; }

@media (min-width: 1001px) and (max-width: 1180px) {
  .header-inner { gap: 16px; }
  .site-header nav { gap: 16px; font-size: 14px; }
  .site-header .button-small { gap: 10px; padding-inline: 10px; }
  .header-inner .brand { font-size: 13px; }
}
@media (max-width: 1000px) {
  .header-inner { gap: 12px; }
  .header-tools { margin-left: auto; }
  .site-header nav { margin-left: 0; gap: 10px; }
  .theme-toggle { width: 44px; height: 44px; }
}
@media (max-width: 390px) {
  .header-inner { gap: 8px; }
  .header-tools { gap: 2px; }
  .header-inner .brand { gap: 7px; font-size: 12px; }
  .header-inner .brand img { width: 35px; }
}
