:root {
  --ink: #111827;
  --muted: #5c6677;
  --paper: #f4f6fb;
  --surface: #ffffff;
  --line: #dce2ee;
  --blue: #155ada;
  --purple: #6a0dad;
  --yellow: #ffd000;
  --accent-blue: #0066ff;
  --accent: var(--accent-blue);
  --accent-purple: var(--purple);
  --accent-yellow: var(--yellow);
  --accent-gradient: linear-gradient(90deg, var(--purple) 0%, var(--accent-blue) 50%, var(--yellow) 100%);
  --brand-stripe: var(--accent-gradient);
  --content: 1180px;
  --header-side-space: clamp(40px, calc(100vw - var(--content)), 128px);
  --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 20px); scrollbar-gutter: stable; background: var(--paper); }
body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8f9fc 0%, #eef1f8 48%, #f7fbf8 100%);
  font-family: Inter, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body, button, a { letter-spacing: 0; }
button { font: inherit; }
a { color: inherit; text-underline-offset: 5px; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 6px;
}
::selection { color: #fff; background: var(--purple); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.1; }
img { display: block; max-width: 100%; }

.brand-rule {
  position: sticky;
  top: 0;
  z-index: 11;
  height: 4px;
  background: var(--brand-stripe);
}
.site-header {
  position: sticky;
  top: 4px;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 30px rgba(20, 28, 48, .06);
  backdrop-filter: blur(16px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.wordmark {
  display: inline-flex;
  width: fit-content;
  flex-direction: column;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}
.wordmark span { display: block; font-size: 13px; font-weight: 550; }
.main-nav a:not(.nav-contact)::after,
.admin-view-nav a::after {
  position: absolute;
  height: 2px;
  background: var(--brand-stripe);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .2s ease;
}
.main-nav a:not(.nav-contact)::after { right: 0; bottom: 2px; left: 0; }
.admin-view-nav a::after { right: 13px; bottom: 4px; left: 13px; }
.main-nav a:not(.nav-contact):hover::after,
.admin-view-nav a:hover::after,
.admin-view-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 6px 18px rgba(20, 28, 48, .06);
  cursor: pointer;
}
.menu-toggle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 6px; }
.menu-glyph, .menu-glyph::before, .menu-glyph::after {
  display: block;
  position: relative;
  width: 22px;
  height: 2px;
  background: currentColor;
}
.menu-glyph { transition: background-color .2s ease; }
.menu-glyph::before, .menu-glyph::after {
  position: absolute;
  left: 0;
  content: "";
  transition: top .2s ease, transform .2s ease;
}
.menu-glyph::before { top: -7px; }
.menu-glyph::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-glyph { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-glyph::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-glyph::after { top: 0; transform: rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
