[data-theme="dark"] {
  --bg: #211d1e;
  --surface: #2a2526;
  --surface-strong: #332d2e;
  --text: #f5eeee;
  --muted: #c5babb;
  --border: #493f41;
  --shadow: rgba(0, 0, 0, .28);
}

html,
body {
  overflow-x: hidden;
}

.global-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 16px 50px;
  background: var(--surface, #fff);
  border: 0;
  border-bottom: 1px solid var(--border, #e0e0e0);
  box-shadow: none;
  transition: background-color .3s ease, border-color .3s ease;
}

.global-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--text, #373435);
  text-decoration: none;
}

.global-logo:hover { text-decoration: none; }

.global-logo-icon {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
}

.global-logo-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.global-logo-name {
  color: var(--text, #373435);
  font: 400 1rem/1.6 'Montserrat', system-ui, sans-serif;
  letter-spacing: .03em;
}

.global-logo-tagline {
  color: var(--muted, #5c5556);
  font: 400 .68rem/1.35 'Montserrat', system-ui, sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
  white-space: normal;
}

.global-header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.global-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.global-nav a {
  position: relative;
  color: var(--text, #373435);
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  font: 500 .78rem/1.4 'Montserrat', system-ui, sans-serif;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .3s ease;
}

.global-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--primary, #770111);
  transition: width .3s ease;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] { color: var(--primary, #770111); }
.global-nav a:hover::after,
.global-nav a[aria-current="page"]::after { width: 100%; }

.global-nav .global-contact {
  padding: 10px 22px;
  border-radius: var(--radius, 0);
  background: var(--primary, #770111);
  color: #fff;
  letter-spacing: .06em;
}

.global-nav .global-contact::after { display: none; }
.global-nav .global-contact:hover { background: var(--primary-dark, #5c010d); color: #fff; }

.global-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 50%;
  background: var(--bg, #f0f0f0);
  color: var(--text, #373435);
  cursor: pointer;
}

.global-theme-toggle:hover { background: var(--border, #e0e0e0); }
.global-theme-toggle svg { width: 18px; height: 18px; }
.global-theme-toggle .global-icon-moon { display: none; }
[data-theme="dark"] .global-theme-toggle .global-icon-sun { display: none; }
[data-theme="dark"] .global-theme-toggle .global-icon-moon { display: block; }

.global-menu-toggle {
  display: none;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--text, #373435);
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.global-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform .3s ease, opacity .3s ease;
}

.global-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.global-menu-toggle.active span:nth-child(2) { opacity: 0; }
.global-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.global-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(55, 52, 53, .4);
}

.global-nav-overlay.show { display: block; }

@media (max-width: 980px) {
  .global-header { padding: 16px 24px; }
  .global-menu-toggle { display: flex; }

  .global-nav {
    position: fixed;
    top: 0;
    left: auto;
    right: 0;
    z-index: 200;
    width: min(280px, 82vw);
    height: 100dvh;
    padding: 40px;
    background: var(--surface, #fff);
    box-shadow: -10px 0 40px var(--shadow, rgba(55, 52, 53, .12));
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    transform: translateX(100%);
    transition: transform .35s ease;
    will-change: transform;
  }

  .global-nav.open { transform: translateX(0); }
  .global-nav a { font-size: .95rem; }
}

@media (max-width: 600px) {
  .global-header { padding: 14px 18px; gap: 12px; }
  .global-logo { gap: 14px; }
  .global-logo-icon { width: 34px; height: 34px; }
  .global-logo-name { font-size: 1rem; }
  .global-logo-tagline { display: block; }
  .global-header-actions { gap: 20px; }
}

@media (max-width: 420px) {
  .global-logo { flex: 1 1 auto; min-width: 0; gap: 11px; }
  .global-logo-icon { width: 32px; height: 32px; }
  .global-logo-copy { min-width: 0; }
  .global-logo-tagline { font-size: .58rem; line-height: 1.3; letter-spacing: .17em; }
  .global-header-actions { flex: 0 0 auto; gap: 10px; }
  .global-theme-toggle { width: 38px; height: 38px; }
}
