/*
 * Augustiner Kloster Theme — Design System
 * Globale CSS-Tokens, Reset, Typografie, Buttons, Utilities
 *
 * @package    AugustinerKloster
 * @author     Webamax Digitalagentur <https://www.webamax.de>
 */

/* ── CSS Custom Properties ─────────────────────────────────────────────────── */
:root {
  /* Lila-Palette */
  --ak-ink:  #14101a;
  --ak-p950: #0f0422;
  --ak-p900: #1e0830;
  --ak-p700: #3a1260;
  --ak-p500: #5c2a8c;
  --ak-p300: #8e5bb8;
  --ak-p100: #ede0f8;

  /* Gold-Palette */
  --ak-g600: #a46e10;
  --ak-g500: #b48641;
  --ak-g400: #c9943a;
  --ak-g200: #e8c98a;
  --ak-g100: #f6ecd6;

  /* Neutrale */
  --ak-cream:     #f5f1eb;
  --ak-cream-200: #ece3d1;   /* cream Hover/Tint */
  --ak-stone:     #e2d9cf;
  --ak-white:     #fff;
  --ak-ink-deep:  #06020e;   /* tiefster Overlay-Ton */

  /* Text */
  --ak-tm: #6b6270;
  --ak-ts: #9a919f;

  /* Semantische State-Farben */
  --ak-success:    #1a7a3e;
  --ak-success-bg: #ecf9f1;
  --ak-error:      #b91c1c;
  --ak-error-bg:   #fef2f2;

  /* Typografie */
  --ak-font-serif: 'Cormorant Garamond', 'AK Serif Fallback', 'Georgia', serif;
  --ak-font-sans:  'DM Sans', 'AK Sans Fallback', 'Helvetica Neue', sans-serif;

  /* ── Typo-Skala ───────────────────────────────────────────────────────────
     Eine einzige, fluide Skala für das ganze Theme. Widgets dürfen KEINE
     freien font-size-Werte mehr setzen, sondern ausschließlich diese Tokens.
     Stufen bauen von Caption → Display fluide auf. */
  --ak-fs-2xs:     0.6875rem;                       /* ~11px – Mikro-Labels      */
  --ak-fs-xs:      0.75rem;                          /* 12px  – Eyebrow/Caption   */
  --ak-fs-sm:      0.875rem;                         /* 14px  – Sekundär/Footer   */
  --ak-fs-base:    1rem;                             /* 16px  – Body/UI-Default   */
  --ak-fs-md:      1.125rem;                         /* 18px  – Lead/Intro        */
  --ak-fs-lg:      clamp(1.25rem, 1.8vw, 1.5rem);    /* kleine Headings           */
  --ak-fs-xl:      clamp(1.5rem, 2.6vw, 1.95rem);    /* h3-Ebene                  */
  --ak-fs-2xl:     clamp(2rem, 4vw, 3.2rem);         /* h2-Ebene                  */
  --ak-fs-3xl:     clamp(2.6rem, 6vw, 5rem);         /* h1-Ebene                  */
  --ak-fs-display: clamp(3.4rem, 8.5vw, 7rem);       /* Hero-Display              */

  /* Zeilenhöhen */
  --ak-lh-tight:   1.1;                              /* Headings                  */
  --ak-lh-snug:    1.3;
  --ak-lh-base:    1.55;                             /* UI/Listen                 */
  --ak-lh-relaxed: 1.65;                             /* Fließtext                 */

  /* Letter-Spacing */
  --ak-ls-tight:   .02em;
  --ak-ls-wide:    .03em;
  --ak-ls-caps:    .18em;                            /* Uppercase-Labels          */

  /* Abstände — Sektionen */
  --ak-section-pad-v:  6em;
  --ak-section-pad-h:  3.75em;
  --ak-container-max:  1480px;

  /* Abstände — Spacing-Skala (Gaps, Paddings, Margins in Widgets) */
  --ak-space-3xs: .25rem;
  --ak-space-2xs: .5rem;
  --ak-space-xs:  .75rem;
  --ak-space-sm:  1rem;
  --ak-space-md:  1.5rem;
  --ak-space-lg:  2rem;
  --ak-space-xl:  3rem;
  --ak-space-2xl: 4rem;
  --ak-space-3xl: 6rem;

  /* Übergänge */
  --ak-transition: 0.2s ease;
  --ak-transition-slow: 0.55s ease;

  /* Radien */
  --ak-radius-none: 0;
  --ak-radius-sm:   4px;
  --ak-radius-md:   8px;
  --ak-radius-pill: 999px;
  --ak-radius-full: 50%;

  /* Schatten */
  --ak-shadow-sm: 0 2px 12px rgba(0,0,0,.06);
  --ak-shadow-md: 0 8px 30px rgba(0,0,0,.10);
  --ak-shadow-lg: 0 20px 60px rgba(0,0,0,.16);

  /* Breakpoints als Referenz (zur Nutzung in JS) */
  --ak-bp-md: 1100px;
  --ak-bp-sm: 640px;
}

/* ── Metrik-angepasste Fallback-Fonts ─────────────────────────────────────────
   Verhindert sichtbares "Springen" beim Wechsel von System-Font auf Cormorant
   Garamond / DM Sans (FOUT). Werte aus Fontsource / Capsize-Berechnung. */
@font-face {
  font-family: 'AK Serif Fallback';
  src: local('Georgia');
  size-adjust: 99%;
  ascent-override: 92%;
  descent-override: 28%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'AK Sans Fallback';
  src: local('Arial');
  size-adjust: 100%;
  ascent-override: 99%;
  descent-override: 26%;
  line-gap-override: 0%;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* ── Body ──────────────────────────────────────────────────────────────────── */
body {
  font-family: var(--ak-font-sans);
  font-weight: 300;
  font-size: var(--ak-fs-base);
  line-height: var(--ak-lh-base);
  color: var(--ak-ink);
  background: var(--ak-cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typografie ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ak-font-serif);
  font-weight: 600;
  line-height: var(--ak-lh-tight);
  color: var(--ak-ink);
}

h1 { font-size: var(--ak-fs-3xl); }
h2 { font-size: var(--ak-fs-2xl); }
h3 { font-size: var(--ak-fs-xl); }
h4 { font-size: var(--ak-fs-lg); font-family: var(--ak-font-sans); font-weight: 500; }
h5 { font-size: var(--ak-fs-md); }
h6 { font-size: var(--ak-fs-base); }

p { line-height: var(--ak-lh-relaxed); }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ak-transition);
}

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

ul, ol { list-style: none; }

/* ── Italic em (Designelement) ──────────────────────────────────────────────── */
h1 em, h2 em, h3 em { font-style: italic; color: var(--ak-p500); }
.ak-dark h1 em, .ak-dark h2 em, .ak-dark h3 em { color: var(--ak-g200); }

/* ── Container ─────────────────────────────────────────────────────────────── */
.ak-container {
  max-width: var(--ak-container-max);
  margin-inline: auto;
  padding-inline: var(--ak-section-pad-h);
}

.ak-container--narrow {
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: var(--ak-section-pad-h);
}

/* ── Hauptinhalt ────────────────────────────────────────────────────────────── */
.ak-main {
  min-height: 60vh;
  /* Lange URLs/E-Mails in WYSIWYG-Inhalten (Datenschutz, Impressum, AGB, …)
     brechen statt horizontal zu scrollen. `anywhere` greift NUR, wenn ein
     Wort sonst überlaufen würde — normale Texte bleiben unangetastet. */
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.ak-btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .875em 1.75em;
  font-family: var(--ak-font-sans);
  font-size: var(--ak-fs-base);
  font-weight: 500;
  letter-spacing: var(--ak-ls-wide);
  border-radius: var(--ak-radius-none);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--ak-transition), border-color var(--ak-transition), transform var(--ak-transition), color var(--ak-transition);
  white-space: nowrap;
}

.ak-btn--gold {
  background: var(--ak-g400);
  color: var(--ak-white);
}
.ak-btn--gold:hover {
  background: var(--ak-g600);
  transform: translateY(-2px);
  color: var(--ak-white);
}

.ak-btn--plum {
  background: var(--ak-p700);
  color: var(--ak-white);
}
.ak-btn--plum:hover {
  background: var(--ak-p500);
  transform: translateY(-2px);
  color: var(--ak-white);
}

.ak-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: var(--ak-white);
}
.ak-btn--ghost:hover {
  border-color: var(--ak-white);
  background: rgba(255,255,255,.08);
  color: var(--ak-white);
}

.ak-btn--outline-dark {
  background: transparent;
  border: 1px solid var(--ak-stone);
  color: var(--ak-ink);
}
.ak-btn--outline-dark:hover {
  border-color: var(--ak-p500);
  color: var(--ak-p500);
}

/* ── Eyebrow ────────────────────────────────────────────────────────────────── */
.ak-eyebrow {
  display: flex;
  align-items: center;
  gap: .7em;
  margin-bottom: .875em;
}
.ak-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--ak-g400);
  flex-shrink: 0;
}
.ak-eyebrow span {
  font-size: var(--ak-fs-xs);
  font-weight: 500;
  letter-spacing: var(--ak-ls-caps);
  text-transform: uppercase;
  color: var(--ak-g400);
}

/* Light variant (on dark backgrounds) */
.ak-eyebrow--light::before { background: var(--ak-g200); }
.ak-eyebrow--light span    { color: var(--ak-g200); }

/* Centered variant */
.ak-eyebrow--center {
  justify-content: center;
}
.ak-eyebrow--center::before  { content: none; }
.ak-eyebrow--center::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--ak-g400);
}
.ak-eyebrow--center.ak-eyebrow--light::after { background: var(--ak-g200); }

/* ── Lead-Text ──────────────────────────────────────────────────────────────── */
.ak-lead {
  font-size: var(--ak-fs-md);
  color: var(--ak-tm);
  line-height: var(--ak-lh-relaxed);
  max-width: 540px;
}
.ak-lead--light { color: rgba(255,255,255,.75); }
.ak-lead--center { max-width: 580px; margin-inline: auto; text-align: center; }

/* ── Content-Sections ───────────────────────────────────────────────────────── */
.ak-content-section {
  padding: var(--ak-section-pad-v) var(--ak-section-pad-h);
}
.ak-content-section--cream  { background: var(--ak-cream); }
.ak-content-section--light  { background: var(--ak-white); }
.ak-content-section--dark   { background: var(--ak-p900); }
.ak-content-section--ink    { background: var(--ak-ink); }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.ak-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0 2em;
  padding: 0 var(--ak-section-pad-h);
  height: 96px;
  transition: background .3s ease, box-shadow .3s ease;
}
.ak-header.is-scrolled {
  background: rgba(18, 8, 26, .97);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

/* Brand-Wrapper: Logo */
.ak-header__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Logo — WordPress custom_logo kompatibel */
.ak-header__logo {
  line-height: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.ak-header__logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
/* Force logo image to a fixed height — ignore any WP inline width/height */
.ak-header__logo .custom-logo,
.ak-header__logo img {
  display: block !important;
  height: 52px !important;
  width: auto !important;
  max-width: none !important;
  max-height: 52px !important;
  object-fit: contain !important;
}
.ak-header__logo-text {
  font-family: var(--ak-font-serif);
  font-size: var(--ak-fs-md);
  font-weight: 600;
  color: var(--ak-white);
  letter-spacing: .02em;
}

/* Nav — zentriert, nimmt verfügbaren Platz */
.ak-header__nav {
  justify-self: center;
  display: flex;
  align-items: center;
}

/* CTA-Bereich rechts */
.ak-header__right {
  flex-shrink: 0;
}

/* Nav Menu */
.ak-nav__menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.ak-nav__menu li a {
  display: block;
  color: rgba(255,255,255,.78);
  font-size: var(--ak-fs-base);
  font-weight: 400;
  padding: .45em .8em;
  transition: color var(--ak-transition);
  white-space: nowrap;
}
.ak-nav__menu li a:hover,
.ak-nav__menu li.current-menu-item > a {
  color: var(--ak-g200);
}

/* CTA im Header */
.ak-header__cta {
  padding: .75em 1.375em !important;
  font-size: var(--ak-fs-sm) !important;
  white-space: nowrap;
}
/* Mobile-CTA nur innerhalb des Overlays sichtbar */
.ak-header__cta-mobile { display: none; }

/* Burger */
.ak-burger {
  display: none;
  background: transparent;
  border: none;
  color: var(--ak-white);
  cursor: pointer;
  padding: .25em;
  line-height: 0;
}
.ak-burger i { font-size: 1.5rem; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.ak-footer {
  background: var(--ak-p900);
  padding: 3.25em var(--ak-section-pad-h);
  border-top: 1px solid rgba(255,255,255,.07);
}
.ak-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3em;
}
.ak-footer__brand-name {
  font-family: var(--ak-font-serif);
  font-size: var(--ak-fs-md);
  font-weight: 600;
  color: var(--ak-white);
  margin-bottom: .75em;
}
.ak-footer__brand p {
  font-size: var(--ak-fs-sm);
  color: rgba(255,255,255,.7);
  line-height: 1.55;
  max-width: 290px;
}
.ak-footer__social {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-size: var(--ak-fs-sm);
  color: rgba(255,255,255,.6);
  margin-top: .875em;
}
.ak-footer__social:hover { color: var(--ak-g200); }
.ak-footer__socials {
  display: flex;
  align-items: center;
  gap: .5em;
  margin-top: 1em;
}
.ak-footer__social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.72);
  transition: background .2s ease, color .2s ease;
}
.ak-footer__social-icon i { font-size: 1rem; }
.ak-footer__social-icon:hover {
  background: var(--ak-g200);
  color: var(--ak-p900);
}
.ak-footer__nav h4,
.ak-footer__contact h4 {
  font-family: var(--ak-font-sans);
  font-size: var(--ak-fs-xs);
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.42);
  margin-bottom: .875em;
}
.ak-footer__menu { list-style: none; }
.ak-footer__menu li a,
.ak-footer__contact a,
.ak-footer__contact p {
  display: block;
  font-size: var(--ak-fs-sm);
  color: rgba(255,255,255,.78);
  margin-bottom: .45em;
  line-height: 1.5;
}
.ak-footer__menu li a:hover,
.ak-footer__contact a:hover { color: var(--ak-g200); text-decoration: underline; text-underline-offset: 3px; }
.ak-footer__hours { font-size: var(--ak-fs-sm); color: rgba(255,255,255,.5); margin-top: .625em; }

/* Footer Bottom */
.ak-fbot {
  background: var(--ak-p950);
  padding: .875em var(--ak-section-pad-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5em;
}
.ak-fbot__copy { font-size: var(--ak-fs-sm); color: var(--ak-white); }
.ak-fbot__menu { display: flex; gap: 1.125em; list-style: none; }
.ak-fbot__menu li a { font-size: var(--ak-fs-sm); color: var(--ak-white); }
.ak-fbot__menu li a:hover { color: var(--ak-g200); }

/* ── Scroll Reveal ───────────────────────────────────────────────────────────── */
.ak-rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.ak-rv.is-visible { opacity: 1; transform: none; }
.ak-rv.ak-d1 { transition-delay: .1s; }
.ak-rv.ak-d2 { transition-delay: .2s; }
.ak-rv.ak-d3 { transition-delay: .3s; }

/* ── Hilfeklassen ────────────────────────────────────────────────────────────── */
.ak-dark      { color: var(--ak-white); }
.ak-text-gold { color: var(--ak-g200); }
.ak-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Skip-Link (Bypass Blocks, WCAG 2.4.1) ──────────────────────────────────── */
.ak-skip-link {
  position: absolute;
  top: var(--ak-space-2xs);
  left: var(--ak-space-2xs);
  z-index: 1000;
  padding: var(--ak-space-xs) var(--ak-space-md);
  background: var(--ak-p900);
  color: var(--ak-white);
  font-size: var(--ak-fs-sm);
  font-weight: 500;
  letter-spacing: var(--ak-ls-wide);
  border-radius: var(--ak-radius-sm);
  transform: translateY(-150%);
  transition: transform var(--ak-transition);
}
.ak-skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--ak-g200);
  outline-offset: 2px;
  color: var(--ak-white);
}

/* ── Empty State — gemeinsame Komponente für „nichts gefunden" ───────────────
   Wird von allen Archiv-Templates (Veranstaltungen, Nachrichten, …) genutzt,
   damit Empty-States überall identisch aussehen. */
.ak-empty-state {
  text-align: center;
  max-width: 540px;
  margin-inline: auto;
  padding-block: var(--ak-space-2xl);
}
.ak-empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0 auto var(--ak-space-md);
  border-radius: var(--ak-radius-none);
  background: var(--ak-cream);
  color: var(--ak-g400);
}
.ak-empty-state__icon i { font-size: 2.25rem; line-height: 1; }
.ak-empty-state__title {
  font-family: var(--ak-font-serif);
  font-size: var(--ak-fs-xl);
  font-weight: 600;
  color: var(--ak-ink);
  margin-bottom: var(--ak-space-xs);
  line-height: var(--ak-lh-tight);
}
.ak-empty-state__text {
  font-size: var(--ak-fs-md);
  color: var(--ak-tm);
  line-height: var(--ak-lh-relaxed);
  margin-bottom: var(--ak-space-md);
}
.ak-empty-state__actions {
  display: flex;
  gap: var(--ak-space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Page Hero (Unterseiten) ──────────────────────────────────────────────────── */
.ak-page-hero {
  position: relative;
  height: 52vh;
  min-height: 380px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.ak-page-hero__bg {
  position: absolute;
  inset: 0;
}
.ak-page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.ak-page-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6,2,14,.70)  0%,
    rgba(6,2,14,.52)  40%,
    rgba(6,2,14,.92)  100%
  );
}
.ak-page-hero__content {
  position: relative;
  z-index: 2;
  padding: 0 var(--ak-section-pad-h) 3.5em;
  width: 100%;
}
.ak-page-hero__content h1 {
  color: var(--ak-white);
  margin-bottom: .75rem;
}
.ak-page-hero__content h1 em { color: var(--ak-g200); }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root {
    --ak-section-pad-v: 4em;
    --ak-section-pad-h: 1em;
  }

  .ak-header {
    padding: 0 1em;
    grid-template-columns: 1fr auto;
    height: 72px;
    background: rgba(18, 8, 26, .97);
    backdrop-filter: blur(20px);
  }
  .ak-header__logo .custom-logo,
  .ak-header__logo img {
    height: 44px !important;
    max-height: 44px !important;
  }
  /* ── Modern Mobile Menu Overlay ─────────────────────────────────────── */
  .ak-header__nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    max-height: none;
    overflow-y: auto;
    background: linear-gradient(160deg,
      rgba(18, 8, 26, .985) 0%,
      rgba(28, 12, 42, .985) 55%,
      rgba(12, 4, 22, .985) 100%);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    padding: 3.5em 2em 3em;
    padding-bottom: max(3em, env(safe-area-inset-bottom, 1em));
    z-index: 180;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2em;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity .35s ease, transform .4s cubic-bezier(.16,1,.3,1), visibility 0s linear .35s;
  }
  .ak-header__nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity .35s ease, transform .4s cubic-bezier(.16,1,.3,1), visibility 0s linear 0s;
  }
  .ak-nav__menu {
    flex-direction: column;
    gap: 0;
    white-space: normal;
    width: 100%;
    max-width: 420px;
    text-align: center;
  }
  .ak-nav__menu li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.06);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease, transform .5s cubic-bezier(.16,1,.3,1);
  }
  .ak-nav__menu li:last-child { border-bottom: 0; }
  .ak-header__nav.is-open .ak-nav__menu li {
    opacity: 1;
    transform: translateY(0);
  }
  .ak-header__nav.is-open .ak-nav__menu li:nth-child(1) { transition-delay: .12s; }
  .ak-header__nav.is-open .ak-nav__menu li:nth-child(2) { transition-delay: .18s; }
  .ak-header__nav.is-open .ak-nav__menu li:nth-child(3) { transition-delay: .24s; }
  .ak-header__nav.is-open .ak-nav__menu li:nth-child(4) { transition-delay: .30s; }
  .ak-header__nav.is-open .ak-nav__menu li:nth-child(5) { transition-delay: .36s; }
  .ak-header__nav.is-open .ak-nav__menu li:nth-child(6) { transition-delay: .42s; }
  .ak-header__nav.is-open .ak-nav__menu li:nth-child(n+7) { transition-delay: .48s; }

  .ak-nav__menu li a {
    display: block;
    padding: 1.4em .25em;
    font-size: var(--ak-fs-xl);
    font-family: var(--ak-font-serif);
    font-weight: 400;
    letter-spacing: .02em;
    color: rgba(255,255,255,.92);
    text-align: center;
    transition: color .25s ease, letter-spacing .3s ease;
  }
  .ak-nav__menu li a:hover,
  .ak-nav__menu li.current-menu-item > a {
    color: var(--ak-g200);
    letter-spacing: .04em;
  }
  /* Header CTA visible inside overlay too */
  .ak-header__right {
    display: none;
  }
  .ak-header__nav.is-open + .ak-header__right,
  .ak-header.is-menu-open .ak-header__right { display: none; }

  /* Mobile-CTA im Overlay */
  .ak-header__cta-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    padding: 1.1em 1.75em !important;
    font-size: 1rem !important;
    letter-spacing: .08em;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease .42s, transform .5s cubic-bezier(.16,1,.3,1) .42s;
  }
  .ak-header__nav.is-open .ak-header__cta-mobile {
    opacity: 1;
    transform: translateY(0);
  }
  /* Burger icon styling stays; z-index above overlay */
  .ak-burger {
    position: relative;
    z-index: 310;
  }
  .ak-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }
  /* Prevent body scroll when mobile menu open */
  body.ak-menu-open { overflow: hidden; }

  .ak-footer__grid { grid-template-columns: 1fr; }
  .ak-fbot { padding: .875em 1em; }

  .ak-container,
  .ak-container--narrow { padding-inline: 1em; }
}

@media (max-width: 640px) {
  /* Legal-Links bleiben nebeneinander (kleineres Gap, ggf. flex-wrap). */
  .ak-fbot__menu { flex-direction: row; gap: .75em; flex-wrap: wrap; }
}

/* ── ≤480px : kleine Smartphones — Header/Footer Feinschliff ────────────── */
@media (max-width: 480px) {
  :root {
    --ak-section-pad-h: .75em;
  }

  .ak-header {
    height: 64px;
    padding: 0 .875em;
  }
  .ak-header__logo .custom-logo,
  .ak-header__logo img {
    height: 38px !important;
    max-height: 38px !important;
  }
  .ak-header__nav {
    top: 64px;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    max-height: none;
    padding: 2.5em 1.125em 2em;
    padding-bottom: max(2em, env(safe-area-inset-bottom, 1em));
  }
  .ak-nav__menu li a {
    padding: 1.1em .25em;
    font-size: var(--ak-fs-lg);
  }
  .ak-burger {
    width: 40px;
    height: 40px;
  }
  .ak-burger i { font-size: 1.35rem; }

  .ak-page-hero {
    height: auto;
    min-height: 280px;
  }
  .ak-page-hero__content {
    padding: 0 1.125em 2.25em;
  }
}
