/* Block 1 · Header (V8-BLOCKS §1). makro nav: a fixed paper pill on the 1200 container, top 8, radius 16.
   The logo file is used unchanged, only rendered smaller (LOCKED V19, David 2026-10-23 „smaller logo in nav on both
   computer and phone", overrules the 240 px minimum of V12): D/T 176 × 64 in an 80 px pill, P 144 × 52 in a 68 px pill,
   8 px above and below. At these sizes the mark (tooth + Smile4U) carries; the tagline is a texture, not read. Links 14/21 at ink 75 % → 100 % on hover (instant).
   Night: the pill stays paper over the night stretch; the logo is only approved on white or very light grounds
   (LOGO-AUDIT layer 1; the on-dark variant waits for the owner's OK), so no night pill until then.
   D ≥ 1200: logo · links · languages · phone · button. T 810–1199: logo · phone · button · menu. P: logo · menu, and
   the fixed bottom bar „Anrufen · Termin buchen". */
.hd { position: relative; z-index: 50; }
.nav {
  position: fixed; z-index: 50; top: var(--nav-top); left: 50%; transform: translateX(-50%);
  width: min(var(--container), calc(100vw - 16px)); height: var(--nav-h);
  display: flex; align-items: center; gap: 24px; padding: 0 16px;
  border-radius: var(--r-md); background: var(--paper); color: var(--ink);
}
.nav-logo { flex: none; display: block; width: var(--logo-w); }
.nav-logo img { width: var(--logo-w); height: auto; aspect-ratio: 1072.375 / 388.125; }   /* the file's own box */
.nav-links { margin-left: auto; }
.nav-links ul { display: flex; gap: 28px; }
.nav-links a, .nav-langs a, .nav-langs span { font-size: var(--fs-ui); line-height: 21px; color: var(--ink-75); text-decoration: none; }
.nav-links a:hover, .nav-langs a:hover { color: var(--ink); }
.nav-langs { display: flex; gap: 12px; padding-left: 4px; }
.nav-langs [aria-current] { color: var(--ink); font-weight: var(--fw-statement); }
.nav-langs [aria-disabled] { color: var(--ink-64); cursor: default; }
.nav-call { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ink); }
.nav-call svg { width: 22px; height: 22px; }
.nav-call:hover { background: var(--mist); }
.nav-book { flex: none; }

/* menu (T, P): a disclosure in the pill; its panel drops under the pill */
.nav-menu { display: none; position: static; }
.nav-menu summary {
  display: grid; place-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--mist);
  font-size: var(--fs-ui); line-height: 21px; list-style: none; cursor: pointer;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu-close { display: none; }
.nav-menu[open] .nav-menu-open { display: none; }
.nav-menu[open] .nav-menu-close { display: inline; }
.nav-menu-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: 24px; border-radius: var(--r-md); background: var(--paper);
  display: grid; gap: 24px;
}
.nav-menu-links { display: grid; gap: 4px; }
.nav-menu-links a { display: block; padding: 8px 0; font-size: var(--fs-h5); line-height: var(--lh-h5); letter-spacing: var(--ls-h5); text-decoration: none; }
.nav-menu-langs { display: flex; gap: 16px; }
.nav-menu-langs a, .nav-menu-langs span { display: grid; place-items: center; min-width: 44px; min-height: 44px; font-size: var(--fs-ui); text-decoration: none; color: var(--ink-75); }
.nav-menu-langs [aria-current] { color: var(--ink); font-weight: var(--fw-statement); }
.nav-menu-langs [aria-disabled] { color: var(--ink-64); }

/* the bottom bar (P only) */
.bar { display: none; }

@media (max-width: 1199.98px) {
  .nav-links, .nav-langs { display: none; }
  .nav-menu { display: block; }
  .nav-call { margin-left: auto; }
}
@media (max-width: 809.98px) {
  .nav { gap: 12px; padding: 0 8px 0 12px; }
  .nav-call, .nav-book { display: none; }
  .nav-menu { margin-left: auto; }
  .bar {
    position: fixed; z-index: 50; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); height: 56px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--paper);
  }
  .bar a { display: grid; place-items: center; border-radius: 12px; font-size: var(--fs-body); text-decoration: none; }
  .bar-call { background: var(--mist); color: var(--ink); }
  .bar-book { background: var(--ink); color: var(--paper); }
  :root { --bar-h: 64px; }
}

/* load: the page frame arrives before its content (nav y −80 → 0, entrance spring) */
html.motion:not(.rm) .nav { transform: translate(-50%, -80px); opacity: 0; }
html.motion:not(.rm).is-loaded .nav {
  transform: translate(-50%, 0); opacity: 1;
  transition: transform var(--dur-enter) var(--spring-enter), opacity .4s var(--ease-ui);
}

/* ---- nav glass trial (2026-10-26, David: "glassmorphism or liquid glass, compare both"). Two ports from the studio
   library, switched by ?nav=frost | ?nav=liquid (01-header.js sets html[data-nav-style]); without it the pill stays solid.
   The logo keeps its paper plate in both (it is only approved on white or very light grounds: LOCKED, LOGO-AUDIT layer 1).
   The glass sits on .nav::before, never on .nav itself, so the pill's own box and the menu panel stay as they are. */
html[data-nav-style] .nav { background: transparent; isolation: isolate; }
html[data-nav-style] .nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--nav-glass); -webkit-backdrop-filter: var(--nav-blur); backdrop-filter: var(--nav-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 0 0 1px rgba(26, 26, 24, .08), 0 10px 30px rgba(0, 0, 0, .08);
}
/* frost (schluesseldienst v7 glass.css): frosted paper at .86, blur 20 + saturate 1.7, a lit top edge and a hairline */
html[data-nav-style="frost"] { --nav-glass: rgba(255, 255, 255, .86); --nav-blur: blur(20px) saturate(1.7); }
/* liquid (liquid-glass-js lens maps, 01-header.js): a clear lens over the page, tint .5 and a 3 px blur: at 1.5 px the
   phone bar's text showed sharp behind „Menü“; where the engine refracts (Chromium) the backdrop runs through #nav-lg, elsewhere a frost at .72 */
html[data-nav-style="liquid"] { --nav-glass: rgba(255, 255, 255, .72); --nav-blur: blur(16px) saturate(1.6); }
html[data-nav-style="liquid"][data-refract="on"] { --nav-glass: rgba(255, 255, 255, .5); }
html[data-nav-style="liquid"][data-refract="on"] .nav::before { backdrop-filter: blur(3px) url(#nav-lg) saturate(1.4); box-shadow: 0 10px 30px rgba(0, 0, 0, .1); }
/* the logo sits on the glass itself, no plate (David 2026-10-26: "on transparent, with enough space around, the nav not
   bigger"): 156 × 56 on desktop and 128 × 46 on the phone, so 12 and 11 px stay clear above and below in the same 80 / 68
   px pill (overrules the V19 sizes). The glass is denser behind it and thins out after it: the logo is approved on white
   or very light grounds only, so that end of the pill stays light whatever passes under it, day or night. */
html[data-nav-style] { --logo-w: 156px; --nav-glass-logo: rgba(255, 255, 255, .95); }
@media (max-width: 809.98px) { html[data-nav-style] { --logo-w: 128px; } }
html[data-nav-style] .nav::before { background: linear-gradient(to right, var(--nav-glass-logo) calc(var(--logo-w) + 24px), var(--nav-glass) calc(var(--logo-w) + 160px)); }
/* night: the glass stays light (the logo cannot sit on navy) and denser than by day, links stay ink */
html[data-nav-style][data-theme="night"] { --nav-glass: rgba(255, 255, 255, .78); --nav-glass-logo: rgba(255, 255, 255, .96); }
html[data-nav-style][data-theme="night"] .nav::before { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 10px 30px rgba(0, 0, 0, .25); }
html[data-nav-style] .bar { background: var(--nav-glass); -webkit-backdrop-filter: var(--nav-blur); backdrop-filter: var(--nav-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 0 0 1px rgba(26, 26, 24, .08), 0 10px 30px rgba(0, 0, 0, .1); }
html[data-nav-style] .nav-call:hover { background: rgba(26, 26, 24, .06); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-nav-style] .nav::before, html[data-nav-style] .bar { background: var(--paper); }
}
.nav-fx { position: absolute; width: 0; height: 0; overflow: hidden; }
