:root {
  color-scheme: light dark;
  --paper: light-dark(#f5f3ed, #171813);
  --ink: light-dark(#171813, #f5f3ed);
  --muted: light-dark(#515249, #c1bdb0);
  --line: light-dark(#d5d2c8, #444439);
  --line-strong: light-dark(#b7ad9e, #565548);
  --control-line: light-dark(#645749, #818071);
  --rust: light-dark(#a72e17, #ff896e);
  --panel: light-dark(#e9e6dd, #22231c);
  --band-surface: light-dark(#e1dacd, #10110e);
  --service-surface: light-dark(#e8e1d5, #202119);
  --field-focus: light-dark(#fff, #292a21);
  --image-placeholder: light-dark(#ddd9ce, #34352b);
  --contact-surface: light-dark(#f54a24, #29231d);
}
:root[data-appearance='light'] { color-scheme: light; }
:root[data-appearance='dark'] { color-scheme: dark; }

::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: .24s;
  animation-timing-function: ease-out;
}

.header { position: relative; z-index: 2; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.theme-control { position: relative; flex: none; }
.theme-control summary {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  min-height: 48px;
  padding: 8px 11px;
  font-weight: 700;
}
.theme-control summary::-webkit-details-marker { display: none; }
.theme-control summary:hover, .theme-control[open] summary { background: var(--panel); }
.theme-icon {
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.theme-options {
  position: absolute;
  z-index: 1;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  padding: 5px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 8px 24px #0002;
}
.theme-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  background: transparent;
  text-align: left;
}
.theme-options button:hover, .theme-options button[aria-pressed='true'] { background: var(--panel); }
.theme-options button[aria-pressed='true']::after {
  content: '';
  width: 10px;
  height: 6px;
  border-bottom: 2px solid var(--rust);
  border-left: 2px solid var(--rust);
  transform: rotate(-45deg);
}
.theme-options button:focus-visible { outline-offset: -2px; }

.contact .text-link:hover { color: light-dark(#522013, #ff896e); }

@media (max-width: 960px) {
  .nav { gap: clamp(9px, 1.7vw, 21px); }
  .header-inner { gap: 10px; }
  .header-actions .desktop-contact { gap: 9px; padding-inline: 12px; }
}
@media (max-width: 680px) {
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
  .header-inner > .logo { justify-self: start; }
  .header-inner > .menu-toggle { grid-area: 1 / 2; }
  .header-actions { grid-area: 1 / 3; }
  .header-inner > .nav { grid-column: 1 / -1; gap: 10px 19px; }
  .theme-control summary { min-height: 42px; border: 1px solid var(--line); }
}
