@charset "utf-8";

/* =========================================================================
   Burg Apotheke Alzenau — Stylesheet
   Aufbau: 1 Schriften · 2 Tokens · 3 Reset · 4 Basis-Typografie · 5 Layout
           6 Komponenten · 7 Sektionen · 8 Formular · 9 Modal · 10 Motion
   Alle Werte stammen aus den Tokens in :root. Keine Magic Numbers.
   ========================================================================= */


/* 1 — Schriften (lokal, kein CDN) ======================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-var.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-var.woff2") format("woff2-variations"),
       url("../fonts/source-serif-4-latin-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metrisch angeglichene Rückfallschrift — verhindert CLS beim Schriftwechsel */
@font-face {
  font-family: "Inter Fallback";
  src: local("Helvetica Neue"), local("Arial"), local("Liberation Sans");
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}


/* 2 — Design-Tokens ====================================================== */

:root {
  /* Farben — Grundpalette */
  --color-primary:      #1B2A4A;
  --color-primary-dark: #14203A;
  --color-text-muted:   #5A6B84;
  --color-accent:       #C8952F;
  --color-accent-ink:   #8A6318;
  --color-accent-hover: #B27F1F;   /* dunklere Stufe der Handlungsfarbe */
  --color-accent-lite:  #E0B25A;   /* helle Stufe, nur im Textverlauf */
  --color-surface:      #FFFFFF;
  --color-surface-alt:  #F5F7FA;
  --color-border:       #DCE2EA;
  --color-focus:        #1B2A4A;

  /* Farben — Status */
  --color-error:   #A32020;
  --color-success: #1F6B45;

  /* Farben — abgeleitet */
  --color-on-dark:        #FFFFFF;
  --color-on-dark-muted:  #C3CEDF;
  --color-border-strong:  #7C8AA1;
  --color-brand-blue:     #002E7A;   /* nur Bildmarke */

  /* Tiefenstufen für Verlaufsflächen. Weiße Schrift erreicht auf jeder
     Stufe mindestens 9,9:1 — geprüft. */
  --color-deep:  #0F1B33;
  --color-lift:  #2F4A80;
  --gradient-deep: linear-gradient(135deg, var(--color-deep) 0%, var(--color-primary) 52%, var(--color-lift) 100%);
  /* Hellste Stufe überhaupt. Sie liegt bewusst erst hinter der Navigation:
     Auf #34528C erreicht die goldene Unterlinie des aktiven Eintrags nur
     noch 2,85:1. Im Bereich der Navigation bleibt es bei --color-lift
     (Akzent 3,23:1 — geprüft). */
  --color-lift-hi: #34528C;
  /* Kopfleiste: links dunkel, damit die Marke ruhig steht; nach rechts
     heller, wo Navigation und Schaltfläche sitzen. */
  --gradient-header: linear-gradient(104deg,
      var(--color-deep) 0%,
      var(--color-deep) 14%,
      var(--color-primary) 44%,
      var(--color-lift) 80%,
      var(--color-lift-hi) 100%);
  --gradient-accent: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-lite) 50%, var(--color-accent) 100%);

  /* Öffnungsstatus — nur auf dunklem Grund verwendet */
  --color-open:   #7BE0A0;
  --color-closed: #F5C563;

  /* Schrift */
  --font-body:    "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono:    ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;

  /* Typo-Skala, modularer Faktor 1.25 */
  --fs-100: 0.875rem;
  --fs-200: 1rem;
  --fs-300: 1.25rem;
  --fs-400: 1.563rem;
  --fs-500: 1.953rem;
  --fs-600: 2.441rem;

  /* Fließtextgröße (17 px) und fluide Überschriften */
  --fs-body: 1.0625rem;
  --fs-h1: clamp(1.9rem, 3.5vw, 3.5rem);
  --fs-h2: clamp(1.5rem, 2.4vw, 2.2rem);
  --fs-h3: var(--fs-300);

  --lh-body: 1.6;
  --lh-tight: 1.15;
  --measure: 68ch;

  /* Abstände, Basis 8 px */
  --space-1: 8px;   --space-2: 16px;  --space-3: 24px;  --space-4: 32px;
  --space-5: 40px;  --space-6: 48px;  --space-7: 56px;  --space-8: 64px;
  --space-9: 72px;  --space-10: 80px; --space-11: 88px; --space-12: 96px;

  /* Raster */
  --container: 1200px;
  --container-narrow: 820px;
  --gutter: clamp(16px, 5vw, 40px);
  --section-y: clamp(64px, 8vw, 96px);
  --header-h: 92px;
  --topbar-h: 36px;

  /* Form */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --border-1: 1px solid var(--color-border);
  --shadow-1: 0 2px 8px rgba(27, 42, 74, 0.08);
  --shadow-2: 0 4px 16px rgba(27, 42, 74, 0.12);

  /* Bewegung */
  --dur-fast: 150ms;
  --dur-base: 300ms;
  --dur-slow: 1200ms;
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in:  cubic-bezier(0.4, 0, 1, 1);
  --reveal-y: 16px;

  /* Fokus */
  --focus-ring: 0 0 0 3px rgba(27, 42, 74, 0.35);
  --focus-ring-dark: 0 0 0 3px rgba(255, 255, 255, 0.55);

  /* Zinnen-Motiv (Bezug zum Namen „Burg“) */
  --crenel-h: 6px;
  --crenel-w: 12px;
  --crenel-color: var(--color-border);
}


/* 3 — Reset ============================================================== */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-2));
}

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg, picture, video { max-width: 100%; }
img, svg, video { height: auto; display: block; }

button, input, select, textarea { font: inherit; color: inherit; }

ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }


/* 4 — Basis-Typografie =================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--color-primary);
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: 0; }
h4 { font-size: var(--fs-200); letter-spacing: 0; }

p { margin: 0 0 var(--space-2); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--color-primary); }

strong, b { font-weight: 600; }

address { font-style: normal; }

.lead {
  font-size: var(--fs-300);
  line-height: 1.5;
  color: var(--color-text-muted);
  max-width: var(--measure);
}

.muted { color: var(--color-text-muted); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-100);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-1);
}

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-2); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* 5 — Layout ============================================================= */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--color-surface-alt); }

.section__head { margin-bottom: var(--space-6); }
.section__head p { max-width: var(--measure); color: var(--color-text-muted); }

.grid { display: grid; gap: var(--space-3); }
/* Verhindert, dass breite Inhalte (Tabellen, lange Wörter) Raster-Spalten
   über die Viewport-Breite hinaus aufziehen. */
.grid > *, .contact-grid > *, .site-footer__grid > * { min-width: 0; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid--split { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-6); }
}

/* Fünf Karten in einem Raster, das sonst drei Spalten führt. Die angebrochene
   letzte Reihe steht mittig, damit unten rechts kein Loch bleibt. Gelöst über
   doppelt so viele Spuren wie Spalten: Jede Karte überspannt zwei Spuren, die
   letzte Reihe beginnt um eine Spur versetzt. Die Kartenbreite bleibt dabei
   rechnerisch exakt dieselbe wie bei .grid--3. */
@media (min-width: 640px) {
  .grid--5 { grid-template-columns: repeat(4, 1fr); }
  .grid--5 > * { grid-column: span 2; }
  .grid--5 > :nth-child(5) { grid-column: 2 / span 2; }
}
@media (min-width: 1024px) {
  .grid--5 { grid-template-columns: repeat(6, 1fr); }
  .grid--5 > :nth-child(4) { grid-column: 2 / span 2; }
  .grid--5 > :nth-child(5) { grid-column: auto / span 2; }
}

/* Zinnen-Kante — das eine wiederkehrende Erkennungsmerkmal */
.crenel {
  height: var(--crenel-h);
  background-image:
    repeating-linear-gradient(90deg,
      var(--crenel-color) 0 var(--crenel-w),
      transparent var(--crenel-w) calc(var(--crenel-w) * 2));
  border-bottom: 1px solid var(--crenel-color);
}


/* 6 — Komponenten ======================================================== */

/* 6.1 Skip-Link */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: calc(-1 * var(--space-8));
  z-index: 100;
  background: var(--color-primary);
  color: var(--color-on-dark);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--space-1); color: var(--color-on-dark); }

/* 6.2 Fokus */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}
.site-header :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible {
  outline-color: var(--color-on-dark);
  box-shadow: var(--focus-ring-dark);
}

/* 6.3 Schaltflächen — genau ein hervorgehobener Stil (Akzent) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 44px;
  padding: var(--space-1) var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-color: var(--color-accent);
}
.btn--primary:hover,
.btn--primary:focus-visible { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: var(--color-primary-dark); }
.btn--primary[disabled] { background: var(--color-border); border-color: var(--color-border); color: var(--color-text-muted); cursor: progress; }

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border-strong);
}
.btn--secondary:hover,
.btn--secondary:focus-visible { border-color: var(--color-primary); background: var(--color-surface-alt); color: var(--color-primary); }

.btn--on-dark {
  background: transparent;
  color: var(--color-on-dark);
  border-color: rgba(255, 255, 255, 0.5);
}
.btn--on-dark:hover,
.btn--on-dark:focus-visible { border-color: var(--color-on-dark); background: rgba(255, 255, 255, 0.1); color: var(--color-on-dark); }

.btn--block { width: 100%; }

.btn__icon { flex: none; width: 20px; height: 20px; fill: currentColor; }

/* 6.4 Textlink mit Pfeil — sekundäre Brücke zum Formular */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 44px;
  font-weight: 600;
  color: var(--color-accent-ink);
  text-decoration: underline;
}
.link-arrow:hover { color: var(--color-primary); }
.link-arrow svg { width: 16px; height: 16px; fill: currentColor; flex: none; }

.section__bridge {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: var(--border-1);
}
.section__bridge p { color: var(--color-text-muted); margin-bottom: 0; }

/* 6.5 Karten */
.card {
  background: var(--color-surface);
  border: var(--border-1);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.card h3 { margin-bottom: 0; }
.card p { color: var(--color-text-muted); margin-bottom: 0; }
.card__icon {
  width: 32px; height: 32px;
  fill: var(--color-primary);
  margin-bottom: var(--space-1);
}
.card--link { transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.card--raised { box-shadow: var(--shadow-1); }

@media (hover: hover) {
  .card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--color-border-strong); }
}
.card--link:focus-within { border-color: var(--color-primary); box-shadow: var(--shadow-2); }

/* 6.6 Definitionsliste für Fakten */
.facts { display: grid; gap: var(--space-1); }
.facts > div { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); align-items: baseline; }
.facts dt { font-weight: 600; min-width: 12ch; }
.facts dd { margin: 0; color: var(--color-text-muted); }

/* 6.7 Hinweisbox */
.note {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  border: var(--border-1);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
  font-size: var(--fs-100);
  color: var(--color-primary);
}
.note svg { width: 20px; height: 20px; flex: none; fill: var(--color-primary); margin-top: 2px; }
.note p { margin-bottom: 0; }
.note--accent { border-left-color: var(--color-accent); }

/* 6.8 Marker / Chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px var(--space-1);
  border: var(--border-1);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--color-primary);
}
.chip svg { width: 14px; height: 14px; fill: currentColor; }

/* 6.9 Tabelle (Öffnungszeiten) */
.table-wrap { overflow-x: auto; max-width: 100%; }
table.hours {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
table.hours caption {
  text-align: left;
  color: var(--color-text-muted);
  font-size: var(--fs-100);
  padding-bottom: var(--space-1);
}
table.hours th, table.hours td {
  padding: var(--space-1) var(--space-2) var(--space-1) 0;
  border-bottom: var(--border-1);
  vertical-align: top;
}
table.hours th { font-weight: 600; }
table.hours td { color: var(--color-primary); }
table.hours tr:last-child th, table.hours tr:last-child td { border-bottom: 0; }


/* 7 — Kopf, Sektionen, Fuß ============================================== */

/* 7.1 Kopfbereich — dreistufig: Servicezeile, Akzentkante, Hauptleiste ==== */

/* Servicezeile: scrollt weg, damit die klebende Leiste schlank bleibt. */
.topbar {
  background: var(--color-deep);
  color: var(--color-on-dark-muted);
  font-size: var(--fs-100);
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  min-height: var(--topbar-h);
  padding-block: 6px;
}
.topbar ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.topbar li { display: inline-flex; align-items: center; gap: 6px; }
.topbar svg { width: 15px; height: 15px; fill: var(--color-accent); flex: none; }
.topbar a { color: var(--color-on-dark); text-decoration: none; }
.topbar a:hover { color: var(--color-accent); text-decoration: underline; }
.topbar :focus-visible { outline-color: var(--color-on-dark); box-shadow: var(--focus-ring-dark); }
/* Die Begrüßung ist ein freundlicher Zusatz, kein Betriebsdatum. Auf
   schmalen Geräten weicht sie zuerst, danach die Adresse. */
.topbar__gruss { font-weight: 600; color: var(--color-on-dark); }
/* .topbar li setzt display bereits mit höherer Spezifität — die Ausblendung
   muss deshalb ebenfalls über das li greifen. */
@media (max-width: 1080px) { .topbar li.topbar__gruss { display: none; } }
@media (max-width: 640px) { .topbar__inner > ul:first-child li:nth-child(3) { display: none; } }

/* Öffnungsstatus. Nie allein über Farbe: Punkt plus Klartext. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-on-dark);
}
.status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-closed);
  flex: none;
}
.status[data-open="true"]::before { background: var(--color-open); }

/* Akzentkante zwischen Servicezeile und Hauptleiste */
.accent-edge { height: 3px; background-image: var(--gradient-accent); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-primary);
  background-image: var(--gradient-header);
  color: var(--color-on-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--header-h);
  transition: min-height var(--dur-base) var(--ease);
}
.site-header .crenel { --crenel-color: rgba(255, 255, 255, 0.28); }

/* Leiste wird beim Scrollen flacher */
.site-header[data-scrolled="true"] .site-header__inner { min-height: 68px; }
.site-header[data-scrolled="true"] .brand__voll  { height: 48px; }
.site-header[data-scrolled="true"] .brand__marke { height: 38px; }

.brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.brand img { width: auto; flex: none; transition: height var(--dur-base) var(--ease); }
.brand__voll  { height: 66px; }
.brand__marke { display: none; height: 50px; }
/* Unter 560 px trägt der Kopf nur die Bildmarke — die Wortmarke wäre dort
   zu klein, um noch lesbar zu sein. */
@media (max-width: 560px) {
  .brand__voll  { display: none; }
  .brand__marke { display: block; }
}

.nav { display: none; }
.nav ul { list-style: none; display: flex; align-items: center; gap: var(--space-1); }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-1);
  color: var(--color-on-dark-muted);
  text-decoration: none;
  font-size: var(--fs-100);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.nav a:hover { color: var(--color-on-dark); border-bottom-color: rgba(255, 255, 255, 0.4); }
.nav a[aria-current="page"] { color: var(--color-on-dark); border-bottom-color: var(--color-accent); }

.site-header__actions { display: flex; align-items: center; gap: var(--space-1); }
.site-header__actions .btn--primary { font-size: var(--fs-100); }

/* Auf schmalen Geräten übernimmt die feste Aktionsleiste am unteren Rand
   den Kontakt-Einstieg; im Kopf bleibt Platz für Marke und Menü. */
@media (max-width: 560px) {
  .site-header__actions .btn--primary { display: none; }
  .brand svg { width: 140px; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 44px;
  padding: 0 var(--space-1);
  background: transparent;
  /* 0.55 statt 0.45: Auf der hellsten Verlaufsstufe erreicht der Rahmen
     sonst nur 2,91:1 — zu wenig für ein Bedienelement. */
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  color: var(--color-on-dark);
  font-size: var(--fs-100);
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.nav-toggle .nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

.nav-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-block: var(--space-1) var(--space-2);
}
.nav-panel ul { list-style: none; display: grid; }
.nav-panel a {
  display: block;
  padding: var(--space-1) 0;
  min-height: 44px;
  color: var(--color-on-dark);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.nav-panel a:hover { color: var(--color-accent); }

/* Ohne JavaScript bleibt die Liste ausgeklappt und damit bedienbar.
   Erst mit aktivem Skript wird daraus ein Klappmenü. */
html.js .nav-panel { display: none; }
html.js .nav-panel.is-open { display: block; }

@media (min-width: 1080px) {
  .nav { display: block; }
  .nav-toggle { display: none; }
  .nav-panel, html.js .nav-panel, html.js .nav-panel.is-open { display: none; }
}


/* 7.2 Hero und Seitenköpfe =============================================== */

/* Ein einziger, ruhiger Verlauf — kein Lichtfleck, keine zweite Lage.
   Links tief, damit der Text sauber steht; nach rechts unten eine Spur
   heller, in derselben Richtung wie die Kopfleiste darüber. */
.hero, .page-head {
  position: relative;
  overflow: hidden;
  background-color: var(--color-primary);
  background-image: linear-gradient(115deg,
    var(--color-deep) 0%,
    var(--color-primary) 54%,
    var(--color-lift) 100%);
  color: var(--color-on-dark);
}
.hero { padding-block: clamp(48px, 6vw, 80px); }
.page-head { padding-block: clamp(36px, 4.5vw, 60px); }

/* Zweispaltig: Text links, Marke rechts. Darunter einspaltig, Marke zuerst. */
.hero__grid, .page-head__grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid      { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--space-8); }
  .page-head__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: var(--space-6); }
}

/* Die Marke steht frei — ohne Kreis, Ring oder Schein. Nur groß, weiß und
   sauber auf der Spalte ausgerichtet. */
.hero__brand, .page-head__brand {
  display: flex;
  /* Rechtsbündig zur Rasterkante — dieselbe Kante wie die Schaltfläche
     in der Kopfleiste darüber. Das verankert die Marke im Layout,
     statt sie in der Spalte schweben zu lassen. */
  justify-content: flex-end;
  width: 100%;
}
.hero__logo {
  width: clamp(190px, 26vw, 360px);
  height: auto;
}
.page-head__logo {
  width: clamp(130px, 15vw, 210px);
  height: auto;
}

/* Auf schmalen Geräten steht das Siegel als kurzer Markenauftakt über der
   Überschrift — klein genug, dass die Schaltfläche über der Falz bleibt. */
/* Auf schmalen Geräten steht die Marke als kurzer Auftakt über der
   Überschrift, linksbündig zur Textspalte. */
@media (max-width: 899px) {
  .hero__brand, .page-head__brand { order: -1; justify-content: flex-start; }
  .hero__grid, .page-head__grid { gap: var(--space-2); }
  .hero__logo      { width: clamp(104px, 26vw, 160px); }
  .page-head__logo { width: clamp(84px, 20vw, 130px); }
  .hero { padding-block: var(--space-4) var(--space-5); }
}

.hero h1, .page-head h1 { color: var(--color-on-dark); }
.hero h1 { max-width: 16ch; }
.page-head h1 { max-width: 20ch; }
.hero__sub, .page-head__sub {
  font-size: var(--fs-300);
  line-height: 1.5;
  color: var(--color-on-dark-muted);
  max-width: 46ch;
  margin-top: var(--space-2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.hero__micro { margin-top: var(--space-2); font-size: var(--fs-100); color: var(--color-on-dark-muted); max-width: 48ch; }
.hero__facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.hero__facts li { display: flex; align-items: center; gap: var(--space-1); }
.hero__facts svg { width: 20px; height: 20px; fill: var(--color-accent); flex: none; }
.hero__facts a { color: var(--color-on-dark); text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.hero__facts a:hover { color: var(--color-accent); }
.hero .eyebrow, .page-head .eyebrow { color: var(--color-accent); }

/* Brotkrumen im Seitenkopf */
.breadcrumb { margin-bottom: var(--space-2); font-size: var(--fs-100); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; color: var(--color-on-dark-muted); }
.breadcrumb li + li::before { content: "/"; color: rgba(255, 255, 255, .45); }
.breadcrumb a { color: var(--color-on-dark-muted); text-decoration: underline; }
.breadcrumb a:hover { color: var(--color-on-dark); }
.breadcrumb [aria-current="page"] { color: var(--color-on-dark); font-weight: 600; }

/* Verlaufs-Schrift — bewusst nur an zwei Stellen der Website */
.grad { color: var(--color-accent); }
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .grad {
    background-image: linear-gradient(96deg, var(--color-accent) 0%, var(--color-accent-lite) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
  .grad--dark {
    background-image: linear-gradient(96deg, var(--color-accent-ink) 0%, var(--color-primary) 100%);
  }
}


/* 7.3 Vertrauenszeile */
.trustbar { background: var(--color-surface-alt); border-bottom: var(--border-1); }
.trustbar ul {
  list-style: none;
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-3);
}
.trustbar li { display: flex; gap: var(--space-2); align-items: flex-start; }
.trustbar svg { width: 24px; height: 24px; fill: var(--color-primary); flex: none; }
.trustbar strong { display: block; }
.trustbar span { color: var(--color-text-muted); font-size: var(--fs-100); }
@media (min-width: 768px) { .trustbar ul { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); } }

/* 7.5 Ablauf-Schritte */
.steps { list-style: none; counter-reset: step; display: grid; gap: var(--space-3); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  counter-increment: step;
  border: var(--border-1);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  background: var(--color-surface);
}
.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  margin-bottom: var(--space-1);
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-on-dark);
  font-weight: 600;
  font-size: var(--fs-100);
}
.steps h3 { margin-bottom: var(--space-1); }
.steps p { color: var(--color-text-muted); margin-bottom: 0; }

/* 7.6 Sortimentsraster */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1); }
.tags li {
  border: var(--border-1);
  border-radius: var(--radius-sm);
  padding: 6px var(--space-1);
  background: var(--color-surface);
  font-size: var(--fs-100);
}

/* 7.6b Teaser-Karten der Startseite ====================================== */

.teasers { display: grid; gap: var(--space-3); }
@media (min-width: 720px) { .teasers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .teasers { grid-template-columns: repeat(3, 1fr); } }

.teaser {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--border-1);
  border-radius: var(--radius-lg);
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.teaser__icon { width: 32px; height: 32px; fill: var(--color-primary); margin-bottom: var(--space-1); }
.teaser h3 { margin-bottom: 0; }
.teaser h3 a { color: var(--color-primary); text-decoration: none; }
/* Ganze Karte klickbar, Fokusring bleibt am Link sichtbar */
.teaser h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.teaser p { color: var(--color-text-muted); margin-bottom: 0; }
.teaser__more {
  margin-top: auto;
  padding-top: var(--space-2);
  font-weight: 600;
  color: var(--color-accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.teaser__more svg { width: 16px; height: 16px; fill: currentColor; }
@media (hover: hover) {
  .teaser:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--color-border-strong); }
  .teaser:hover h3 a { color: var(--color-accent-ink); }
}
.teaser:focus-within { border-color: var(--color-primary); box-shadow: var(--shadow-2); }

/* Hervorgehobene Karte für den Notdienst-Einstieg */
.teaser--dark {
  background: var(--color-primary);
  background-image: var(--gradient-deep);
  border-color: transparent;
  color: var(--color-on-dark);
}
.teaser--dark h3, .teaser--dark h3 a { color: var(--color-on-dark); }
.teaser--dark p { color: var(--color-on-dark-muted); }
.teaser--dark .teaser__icon { fill: var(--color-accent); }
.teaser--dark .teaser__more { color: var(--color-accent); }
.teaser--dark :focus-visible { outline-color: var(--color-on-dark); box-shadow: var(--focus-ring-dark); }
@media (hover: hover) { .teaser--dark:hover h3 a { color: var(--color-accent); } }


/* 7.6c Öffnungsstatus als Karte ========================================== */

.now {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  background-image: var(--gradient-deep);
  color: var(--color-on-dark);
}
.now h2, .now h3 { color: var(--color-on-dark); }
.now p { color: var(--color-on-dark-muted); margin-bottom: 0; }
.now .status { font-size: var(--fs-300); }
.now .status::before { width: 12px; height: 12px; }
.now a { color: var(--color-on-dark); }
.now :focus-visible { outline-color: var(--color-on-dark); box-shadow: var(--focus-ring-dark); }
.now .btn--primary { justify-self: start; }


/* 7.7 Team */
.team { list-style: none; display: grid; gap: var(--space-2); }
@media (min-width: 560px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .team { grid-template-columns: repeat(3, 1fr); } }
/* Die Leitung zählt vier Personen. Ein eigenes Raster verhindert, dass in der
   zweiten Reihe eine einzelne Karte allein stehen bleibt: unter 1024 px zwei
   mal zwei, darüber eine Reihe zu viert. */
@media (min-width: 560px) { .team--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .team--4 { grid-template-columns: repeat(4, 1fr); } }
.team li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: var(--border-1);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  background: var(--color-surface);
}
.team__initials {
  flex: none;
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-on-dark);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-200);
  letter-spacing: 0.02em;
}
.team__name { font-weight: 600; display: block; }
.team__role { color: var(--color-text-muted); font-size: var(--fs-100); }

.team-group + .team-group { margin-top: var(--space-5); }
.team-group h3 { margin-bottom: var(--space-2); }

/* 7.8 FAQ */
.faq { max-width: var(--measure); }
.faq details {
  border: var(--border-1);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  margin-bottom: var(--space-1);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--fs-300);
  font-weight: 600;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 200ms var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details > div { padding: 0 var(--space-2) var(--space-2); color: var(--color-text-muted); }
.faq details > div > p { max-width: 62ch; }

/* 7.9 Standort */
.map-card {
  border: var(--border-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-alt);
  display: block;
  text-decoration: none;
  color: inherit;
}
.map-card__figure {
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  background: var(--color-surface-alt);
  border-bottom: var(--border-1);
}
.map-card__body { padding: var(--space-2); display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.map-card__body span { font-weight: 600; color: var(--color-accent-ink); text-decoration: underline; }
@media (hover: hover) { .map-card:hover .map-card__body span { color: var(--color-primary); } }

/* 7.10 Fußbereich */
.site-footer {
  background: var(--color-primary-dark);
  color: var(--color-on-dark-muted);
  padding-block: var(--space-8) var(--space-4);
  font-size: var(--fs-100);
}
.site-footer .crenel { --crenel-color: rgba(255, 255, 255, 0.2); }
.site-footer h2, .site-footer h3 { color: var(--color-on-dark); font-size: var(--fs-200); margin-bottom: var(--space-2); }
.site-footer a { color: var(--color-on-dark); text-decoration: underline; }
.site-footer a:hover { color: var(--color-accent); }
.site-footer__grid { display: grid; gap: var(--space-5); }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer ul { list-style: none; display: grid; gap: 2px; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 32px; }
.site-footer__brand img { width: 218px; height: auto; margin-bottom: var(--space-3); }
.site-footer__legal {
  margin-top: var(--space-6);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  align-items: center;
  justify-content: space-between;
}
.site-footer__legal ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }

/* 7.11 Mobile Aktionsleiste */
.actionbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 45;
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--color-surface);
  border-top: var(--border-1);
  box-shadow: 0 -2px 8px rgba(27, 42, 74, 0.08);
}
.actionbar .btn { flex: 1; }
@media (min-width: 1080px) { .actionbar { display: none; } }
@media (max-width: 1079px) { body { padding-bottom: 68px; } }


/* 8 — Kontaktformular ==================================================== */

.contact-grid { display: grid; gap: var(--space-6); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.15fr 0.85fr; } }

.form { display: grid; gap: var(--space-3); }
.field { display: grid; gap: 6px; }
.field > label { font-weight: 600; }
.field__hint { font-size: var(--fs-100); color: var(--color-text-muted); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-1) 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  transition: border-color var(--dur-fast) var(--ease);
}
.field textarea { min-height: 148px; resize: vertical; line-height: var(--lh-body); }
.field select { appearance: none; background-image: none; padding-right: var(--space-4); }
.field :is(input, select, textarea):hover { border-color: var(--color-primary); }
.field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--color-error); border-width: 2px; }

.field__error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--color-error);
}
.field__error svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.field__error:not(:empty) { display: flex; }

.field--check { grid-template-columns: auto 1fr; gap: var(--space-1) 12px; align-items: start; }
.field--check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--color-primary); }
.field--check label { font-weight: 400; font-size: var(--fs-100); }
.field--check .field__error { grid-column: 1 / -1; }

.form__status { margin: 0; }
.form__status:empty { display: none; }
.form__status p {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  border: 1px solid var(--color-error);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  color: var(--color-error);
  font-weight: 600;
  margin: 0;
}
.form__status p svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.form__note { font-size: var(--fs-100); color: var(--color-text-muted); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.success {
  border: 1px solid var(--color-success);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--color-surface);
}
.success :is(h2, h3) { color: var(--color-success); font-size: var(--fs-300); display: flex; align-items: center; gap: var(--space-1); }
.success :is(h2, h3) svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.success:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.contact-aside { display: grid; gap: var(--space-3); align-content: start; }
.contact-aside .card { box-shadow: var(--shadow-1); }
.contact-aside a { display: inline-flex; align-items: center; min-height: 44px; }


/* 9 — Modal (gesund.de-Weiterleitung) ==================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: var(--space-2);
  background: rgba(20, 32, 58, 0.6);
}
.modal[hidden] { display: none; }
.modal__box {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: var(--space-4) var(--space-3) var(--space-3);
}
.modal__box h2 { font-size: var(--fs-400); }
.modal__box ul { list-style: none; display: grid; gap: var(--space-1); margin-block: var(--space-2); }
.modal__box li { display: flex; gap: var(--space-1); align-items: flex-start; color: var(--color-text-muted); font-size: var(--fs-100); }
.modal__box li svg { width: 18px; height: 18px; fill: var(--color-success); flex: none; margin-top: 2px; }
.modal__actions { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-3); }
.modal__actions .btn { flex: 1 1 200px; }

/* Statischer Hinweis, wenn kein JavaScript verfügbar ist */
.nojs-note { display: none; }
html:not(.js) .nojs-note { display: flex; }


/* 10 — Rechtstexte ====================================================== */

.legal { max-width: 74ch; }
.legal h2 { margin-top: var(--space-6); scroll-margin-top: calc(var(--header-h) + var(--space-3)); }
.legal h3 { margin-top: var(--space-4); }
.legal p, .legal li { color: var(--color-primary); }
.legal ul { padding-left: var(--space-3); margin-bottom: var(--space-2); }
.legal li { margin-bottom: 4px; }
.legal dl { display: grid; gap: var(--space-1); margin: 0 0 var(--space-3); }
.legal dl > div { display: grid; gap: 2px; padding-bottom: var(--space-1); border-bottom: var(--border-1); }
@media (min-width: 640px) { .legal dl > div { grid-template-columns: 22ch 1fr; gap: var(--space-2); } }
.legal dt { font-weight: 600; }
.legal dd { margin: 0; color: var(--color-text-muted); }

.toc {
  border: var(--border-1);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  background: var(--color-surface-alt);
  margin-bottom: var(--space-5);
}
.toc h2 { font-size: var(--fs-200); margin: 0 0 var(--space-1); }
.toc ol { padding-left: var(--space-3); columns: 2; column-gap: var(--space-4); font-size: var(--fs-100); }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.toc li { margin-bottom: 2px; }


/* 11 — Bewegung ========================================================= */

/* Ausgangszustand wird nur gesetzt, wenn JavaScript aktiv ist. */
html.js .reveal { opacity: 0; transform: translateY(var(--reveal-y)); }
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: var(--dur-base); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .reveal.is-visible { transition: none; }
  .card--link, .skip-link, .btn, .faq summary::after { transition-duration: 0.01ms; }
  @media (hover: hover) {
    .card--link:hover { transform: none; }
  }
}


/* 12 — Druck ============================================================ */

@media print {
  .site-header, .actionbar, .modal, .section__bridge, .toc { display: none !important; }
  body { color: #000; font-size: 11pt; padding-bottom: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
