:root {
  color-scheme: light;
  --muted: #56657d;
  --page-scroll-track: #e4ecf7;
  --page-scroll-thumb: #668ac0;
  --page-scroll-hover: #3f73bc;
  --page-scroll-active: #075bc8;
}
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.theme-toggle { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--navy); cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.theme-toggle:hover { background: var(--ice); border-color: var(--blue); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 21px; height: 21px; }
.theme-toggle .theme-sun { display: none; }
html[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
html[data-theme="dark"] .theme-toggle .theme-sun { display: block; }

/* Brand settings remain intact; semantic surfaces change with the visitor's mode. */
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c1321;
  --navy: #e7eefb;
  --muted: #a7b6cd;
  --line: #2a3a51;
  --ice: #1a2b43;
  --white: #142035;
  --blue: #85b6ff;
  --blue: color-mix(in srgb, var(--brand-primary, #076cf0) 48%, #deebff);
  --blue-dark: #0a59bd;
  --surface: #142035;
  --surface-raised: #1a2a43;
  --page-scroll-track: #1b2b43;
  --page-scroll-thumb: #7aa7e8;
  --page-scroll-hover: #a8caff;
  --page-scroll-active: #c2dcff;
}

/* Match the page scrollbar to the carousel while retaining native scrolling. */
html { scrollbar-width: thin; scrollbar-color: var(--page-scroll-thumb) var(--page-scroll-track); }
@supports selector(::-webkit-scrollbar) {
  html { scrollbar-width: auto; scrollbar-color: auto; }
  html::-webkit-scrollbar { width: 14px; height: 14px; background: var(--paper); }
  html::-webkit-scrollbar-track {
    border: 4px solid transparent;
    border-radius: 999px;
    background: var(--page-scroll-track);
    background-clip: padding-box;
  }
  html::-webkit-scrollbar-thumb {
    min-height: 48px;
    border: 4px solid transparent;
    border-radius: 999px;
    background: var(--page-scroll-thumb);
    background-clip: padding-box;
  }
  html::-webkit-scrollbar-thumb:hover { background-color: var(--page-scroll-hover); }
  html::-webkit-scrollbar-thumb:active { background-color: var(--page-scroll-active); }
  html::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
  html::-webkit-scrollbar-corner { background: var(--paper); }
}
@media (forced-colors: active) {
  :root, html[data-theme="dark"] {
    scrollbar-width: auto;
    scrollbar-color: auto;
    --page-scroll-track: Canvas;
    --page-scroll-thumb: ButtonText;
    --page-scroll-hover: ButtonText;
    --page-scroll-active: ButtonText;
  }
  html::-webkit-scrollbar, html::-webkit-scrollbar-corner { background: Canvas; }
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-header.is-scrolled { background: #0c1321f5; border-color: var(--line); box-shadow: 0 8px 32px #0002; }
html[data-theme="dark"] .mobile-menu { background: #101b2d; border-color: var(--line); }
html[data-theme="dark"] .brand img[src$="assets/profile-1.png"] { filter: brightness(0) invert(1); }
html[data-theme="dark"] .menu-toggle { background: var(--surface); }
html[data-theme="dark"] .button-dark { background: #243b5b; color: #fff; }
html[data-theme="dark"] .button-dark:hover { background: #304d73; }
html[data-theme="dark"] .button-blue { background: var(--brand-primary, #076cf0); color: #fff; }
html[data-theme="dark"] .button-blue:hover { background: var(--blue-dark); }
html[data-theme="dark"] .button-outline { border-color: #3a516f; }
html[data-theme="dark"] .skip-link { background: #203956; color: #fff; }
html[data-theme="dark"] .status-dot { box-shadow: 0 0 0 5px #1a2c47; }
html[data-theme="dark"] .word-mark::after { background: #23436a; }
html[data-theme="dark"] .hero-art { background: #172b47; }
html[data-theme="dark"] .art-orbit { border-color: #345274; }
html[data-theme="dark"] .art-word { color: #2b466a; }
html[data-theme="dark"] .art-kicker { color: #a3bcdf; }
html[data-theme="dark"] .poster { border-color: #d7e5f6; }
html[data-theme="dark"] .art-stamp,
html[data-theme="dark"] .art-caption { background: #1b2d47; border-color: #38506e; box-shadow: 0 9px 30px #0003; }
html[data-theme="dark"] .hero-gallery-button:hover,
html[data-theme="dark"] .text-link:hover .circle-arrow { background: #2a4160; }
html[data-theme="dark"] .expertise-band { background: #142137; }
html[data-theme="dark"] .clients-section { background: var(--paper); }
html[data-theme="dark"] .approach-section { background: #101e33; }
html[data-theme="dark"] .service:hover { background: #14233a; }
html[data-theme="dark"] .service-top > span { color: #a1b2cb; }
html[data-theme="dark"] .work-section { background: #101c2e; }
html[data-theme="dark"] .filter { border-color: #3c516c; }
html[data-theme="dark"] .filter.active { background: #294b78; border-color: #678fca; color: #fff; }
html[data-theme="dark"] .filter:hover:not(.active) { background: #1c304c; }
html[data-theme="dark"] .work-image { background: #1b2a41; }
html[data-theme="dark"] .work-tag { background: #142035f2; color: #e7eefb; }
html[data-theme="dark"] .work-open { background: #15243def; color: #e7eefb; }
html[data-theme="dark"] .work-card:hover .work-open { background: #076cf0; color: #fff; }
html[data-theme="dark"] .work-gallery-toolbar { border-color: var(--line); }
html[data-theme="dark"] .work-page-controls > button { background: var(--surface); border-color: #3c516c; }
html[data-theme="dark"] .work-page-controls > button:hover { background: #294b78; color: #fff; }
html[data-theme="dark"] .work-empty { background: var(--surface); border-color: #476080; }
html[data-theme="dark"] .work-empty-icon { background: #243d60; }
html[data-theme="dark"] .results-board,
html[data-theme="dark"] .package { background: var(--surface); box-shadow: 0 18px 55px #0002; }
html[data-theme="dark"] .metrics,
html[data-theme="dark"] .metrics > div { border-color: var(--line); }
html[data-theme="dark"] .youtube-icon { background: #482c32; color: #ffa29e; }
html[data-theme="dark"] .package-featured { background: #182e4b; border-color: #5279a9; }
html[data-theme="dark"] .platforms-section { background: #0d1727; }
html[data-theme="dark"] .platform-card { background: var(--surface); }
html[data-theme="dark"] .platform-art { background: radial-gradient(circle at 65% 40%,#243f64,#13243c); }
html[data-theme="dark"] .studio-panel { border: 1px solid var(--line); }
html[data-theme="dark"] .contact-section { background: #13243b; }
html[data-theme="dark"] .contact-number > svg { border-color: #476489; }
html[data-theme="dark"] .contact-form { background: #142035; border-color: #344966; }
html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form select,
html[data-theme="dark"] .contact-form textarea { background: #0e192b; border-color: #3b4f6b; color: #e7eefb; }
html[data-theme="dark"] .contact-form input::placeholder,
html[data-theme="dark"] .contact-form textarea::placeholder { color: #9fadc4; }
html[data-theme="dark"] .contact-form > .privacy-note { color: #a7b6cd; }
html[data-theme="dark"] .site-footer.mada-footer { background: #0d192b; border-color: #304765; color: #c4d5ee; }
html[data-theme="dark"] .mada-footer .footer-wordmark,
html[data-theme="dark"] .mada-footer h2 { color: #e7eefb; }
html[data-theme="dark"] .mada-footer .footer-about > p,
html[data-theme="dark"] .mada-footer .footer-column a,
html[data-theme="dark"] .mada-footer .footer-slogan,
html[data-theme="dark"] .mada-footer .footer-legal,
html[data-theme="dark"] .mada-footer .footer-language { color: #b1c4e0; }
html[data-theme="dark"] .mada-footer .footer-column a:hover { color: var(--blue); }
html[data-theme="dark"] .mada-footer .footer-legal { border-color: #304765; }
html[data-theme="dark"] .mada-footer .footer-social a { background: #223b5b; color: #deebff; }
html[data-theme="dark"] .mada-footer .footer-social a:hover { background: #355883; color: #fff; }
html[data-theme="dark"] .floating-social-label { background: #294568; }
html[data-theme="dark"] .dialog-inner > img { background: #0b1220; }
html[data-theme="dark"] .dialog-close { background: #22344e; color: #fff; }
html[data-theme="dark"] .dialog-close:hover { background: #314c70; }
html[data-theme="dark"] .noscript-note { background: var(--surface); }

@media (max-width: 1100px) { .nav-actions { margin-inline-start: auto; } }
@media (max-width: 650px) {
  .nav-actions { gap: 8px; }
  .nav-actions .nav-cta { width: 40px; min-height: 40px; padding: 0; border-radius: 8px; margin: 0; }
  .nav-cta [data-cms] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .theme-toggle { width: 40px; height: 40px; }
}
