/* Shared frame. The same geometry applies to every page and menu state. */
:root {
  --rail: clamp(12rem, 16.6667vw, 20rem);
  --bar: clamp(3.5rem, 4.6vw, 5.5rem);
  --pad: clamp(1rem, 3.8vw, 4rem);
  --nav-inset: clamp(.625rem, 1.2vw, 1.5rem);
  --logo-h: var(--bar);
  --line: var(--wulf-line);
  font-family: var(--wulf-font);
  color: var(--wulf-graphite);
  background: var(--wulf-white);
  font-synthesis: none;
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--bar) + var(--wp-admin--admin-bar--height, 0px) + 1rem);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  --admin-offset: 0px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--wulf-font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar { --admin-offset: var(--wp-admin--admin-bar--height, 32px); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.14; }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
button { color: inherit; }
button, a, summary, input, textarea, select { touch-action: manipulation; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: calc(100% - 2 * var(--pad)); margin-inline: auto; }
.icon { display: inline-block; vertical-align: middle; width: 1.2em; height: 1.2em; flex-shrink: 0; }
.skip {
  position: fixed;
  top: calc(var(--admin-offset) + .25rem);
  left: 1rem;
  z-index: 100;
  transform: translateY(-250%);
  padding: .55rem 1rem;
  color: var(--wulf-black);
  background: var(--wulf-white);
}
.skip:focus { transform: none; }
main, .site-footer { margin-inline-start: var(--rail); }

.site-header {
  position: sticky;
  top: var(--admin-offset);
  z-index: 90;
  flex: none;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  align-items: center;
  height: var(--bar);
  color: var(--wulf-white);
  background: var(--wulf-charcoal);
  border-bottom: 1px solid var(--wulf-graphite);
}
.brandmark {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  padding-inline: calc(var(--nav-inset) * 2);
}
.brandmark img { display: block; width: 100%; height: auto; max-height: calc(var(--bar) - 1rem); object-fit: contain; object-position: left; }
.contact-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(.85rem, 2.9vw, 3.25rem);
  padding-inline: var(--nav-inset) calc(var(--nav-inset) * 2);
  font-size: clamp(.73rem, .9vw, 1rem);
  line-height: 1.25;
}
.contact-bar a { display: inline-flex; align-items: center; gap: .55em; }
.contact-bar .icon { width: 1.28em; height: 1.28em; }
.contact-bar a:hover, .footer-line a:hover { text-decoration: underline; text-underline-offset: .2em; }
.menu-toggle, .menu-checkbox, .menu-fallback { display: none; }

#hauptnavigation {
  position: fixed;
  inset: calc(var(--bar) + var(--admin-offset)) auto 0 0;
  width: var(--rail);
  overflow: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--wulf-silver) var(--wulf-charcoal);
  color: var(--wulf-white);
  background: var(--wulf-charcoal);
}
.nav-list, .nav-children { list-style: none; margin: 0; padding: 0; }
.nav-list { padding: clamp(1rem, 2.55vw, 3rem) var(--nav-inset) 2rem; }
.nav-item { position: relative; }
.nav-list > .nav-item + .nav-item { border-top: 1px solid var(--wulf-graphite); }
.rail-link, .family-link, .leaf-link, .nav-subtoggle {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  min-height: 2.75rem;
  padding: .65rem .75rem;
  border-inline-start: 3px solid transparent;
  border-radius: 2px;
  color: inherit;
  font-size: clamp(.86rem, .99vw, 1.1rem);
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.rail-link:hover, .family-link:hover, .leaf-link:hover, .nav-subtoggle:hover { background: var(--wulf-graphite); }
.nav-list [aria-current="page"], .nav-disclosure.current-branch:not([open]) > summary {
  background: var(--wulf-graphite);
  border-inline-start-color: var(--wulf-silver);
}
.nav-list summary { list-style: none; cursor: pointer; }
.nav-list summary::-webkit-details-marker { display: none; }
.nav-list summary .icon { margin-left: auto; width: .85rem; height: .85rem; }
.nav-disclosure[open] > summary .icon { transform: rotate(180deg); }
.nav-children {
  margin: .25rem 0 .55rem .55rem;
  padding-inline-start: .25rem;
  border-inline-start: 1px solid var(--wulf-graphite);
}
.family-link, .leaf-link { min-height: 2.4rem; padding: .52rem .4rem; font-size: clamp(.8rem, .91vw, 1.02rem); }
.nav-split > a { width: calc(100% - 2.35rem); }
.nav-subtoggle { position: absolute; inset: 0 0 auto auto; justify-content: center; width: 2.35rem; min-height: 2.35rem; padding: .5rem; }
.nav-subtoggle .icon { margin: 0; }
.nav-list :focus-visible { outline-offset: -2px; }

.site-footer { margin-top: auto; color: var(--wulf-white); background: var(--wulf-charcoal); font-size: .78rem; }
.footer-line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; padding: .82rem var(--pad); border-top: 1px solid var(--wulf-graphite); }
.footer-line nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .9em; min-height: 2.4rem; padding: .65em 1.3em; border: 1px solid transparent; border-radius: 4px; font-size: .94rem; font-weight: 500; line-height: 1.2; }
.btn-primary { color: var(--wulf-white); background: var(--wulf-charcoal); border-color: var(--wulf-charcoal); }
.btn-primary:hover { background: var(--wulf-black); }
.btn-outline { border-color: currentColor; }
.btn-outline:hover { text-decoration: underline; }
.kicker { color: var(--wulf-graphite); font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .015em; line-height: 1.3; }

@media (max-width: 800px) {
  :root { --rail: 0px; --bar: 5.5rem; --pad: clamp(1rem, 4.65vw, 2rem); }
  .site-header { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 3.2rem auto; }
  .brandmark { grid-row: 1; grid-column: 1; padding-inline: var(--pad); }
  .brandmark img { width: 9.35rem; max-height: 2.4rem; }
  .menu-toggle, .menu-fallback {
    grid-row: 1;
    grid-column: 2;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    min-width: 7rem;
    height: 2.25rem;
    margin-inline-end: var(--pad);
    padding: 0 .65rem;
    color: var(--wulf-white);
    background: transparent;
    border: 1px solid var(--wulf-silver);
    border-radius: 3px;
    font-size: .84rem;
  }
  .menu-fallback { display: none; }
  .contact-bar {
    grid-row: 2;
    grid-column: 1 / -1;
    align-self: stretch;
    justify-content: space-between;
    padding: .35rem var(--pad);
    border-top: 1px solid var(--wulf-graphite);
    font-size: .75rem;
  }
  #hauptnavigation {
    display: none;
    position: absolute;
    inset: 100% auto auto 0;
    width: min(23rem, 100%);
    max-height: calc(100vh - var(--bar) - var(--admin-offset));
    max-height: calc(100dvh - var(--bar) - var(--admin-offset));
    border: 1px solid var(--wulf-graphite);
  }
  #hauptnavigation.open { display: block; }
  .nav-list { padding: .5rem .75rem 1rem; }
  .rail-link, .family-link, .leaf-link, .nav-subtoggle { min-height: 2.75rem; font-size: .92rem; }
  .nav-subtoggle { width: 2.75rem; }
  .nav-split > a { width: calc(100% - 2.75rem); }
  .footer-line { padding-block: 1rem; }
}

@media (max-width: 600px) {
  :root { --bar: 6.4rem; }
  .admin-bar #wpadminbar { position: fixed; top: 0; }
  .contact-bar { display: grid; grid-template-columns: auto auto; justify-content: space-between; align-content: center; gap: .25rem .4rem; }
  .contact-bar .contact-address { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
