/* ============================================================
   globals.css — Nachtausgabe
   Seitenübergreifende Styles: Topbar, Meta-Strip, Footer, Mobile-Nav
   Wird auf allen Seiten geladen (subtexte_enqueue, kein Conditional)
   ============================================================ */

/* ============================================================
   TOPBAR — sticky Navigation
   ============================================================ */
.st-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15,10,8,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.st-topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  padding: 14px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}

/* Brand */
.st-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.st-brand em {
  color: var(--accent);
  font-style: italic;
}

.st-brand-mark {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(200,122,42,0.4);
}

.st-brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.st-brand-mark::before {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 50%;
  height: 1.5px;
  background: var(--ink);
  transform: translateY(-50%);
  border-radius: 2px;
}

/* Primär-Navigation */
.st-nav-primary {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
}

.st-nav-primary a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink2);
  padding: 4px 0;
  position: relative;
  transition: color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.st-nav-primary a:hover {
  color: var(--accent2);
}

.st-nav-primary a[aria-current] {
  color: var(--ink);
}

/* Aktive Unterlinie */
.st-nav-primary a[aria-current]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -17px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* Hover-Ember-Linie (aus interactions.css übernommen) */
.st-nav-primary a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.st-nav-primary a:hover::before {
  transform: scaleX(1);
}

/* 18+ Pill */
.st-top-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.st-age-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink2);
  white-space: nowrap;
}

.st-age-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   BURGER-BUTTON — Mobile only
   Specificity via .st-topbar-Prefix — überschreibt GP-Defaults
   ============================================================ */
.st-topbar .st-burger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  cursor: pointer;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: none;
  line-height: 1;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
}

.st-topbar .st-burger:hover,
.st-topbar .st-burger:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(200,122,42,0.3);
  background: transparent;
  color: var(--accent);
}

.st-topbar .st-burger__bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* Burger → X */
.st-topbar .st-burger.is-open .st-burger__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.st-topbar .st-burger.is-open .st-burger__bar:nth-child(2) {
  opacity: 0;
}

.st-topbar .st-burger.is-open .st-burger__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ============================================================
   MOBILE OVERLAY-NAVIGATION
   Specificity via body-Prefix für robuste GP-Override
   ============================================================ */
body .st-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ink-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}

/* Ambient Glow im Overlay */
.st-mobile-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 20% 15%, rgba(176,48,64,0.18), transparent 55%),
    radial-gradient(ellipse 50% 45% at 85% 85%, rgba(200,122,42,0.12), transparent 60%);
}

.st-mobile-nav.is-open {
  opacity: 1;
  pointer-events: auto;
}

.st-mobile-nav__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 100%;
  box-sizing: border-box;
}

.st-mobile-nav__inner a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.25s ease;
  position: relative;
}

.st-mobile-nav__inner a:hover,
.st-mobile-nav__inner a:focus-visible {
  color: var(--accent);
  padding-left: 8px;
  outline: none;
}

.st-mobile-nav__inner a[aria-current] {
  color: var(--accent);
}

.st-mobile-nav__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  min-width: 32px;
  font-style: normal;
}

.st-mobile-nav__label {
  font-style: italic;
}

/* Untere Sekundärlinks im Overlay */
.st-mobile-nav__foot {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 0;
}

.st-mobile-nav__foot a {
  display: inline-block;
  padding: 0;
  border: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: 1;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--muted);
  transition: color 0.15s;
  text-decoration: none;
  font-style: normal;
}

.st-mobile-nav__foot a:hover {
  color: var(--accent2);
  padding-left: 0;
}

/* Scroll-Lock für Body wenn Overlay offen */
body.st-nav-lock {
  overflow: hidden;
  touch-action: none;
}

/* ============================================================
   META STRIP — reine Laufschrift
   ============================================================ */
.st-meta-strip {
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.st-meta-strip-inner {
  padding: 10px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}

.st-meta-scroller {
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.st-meta-scroller-inner {
  display: inline-flex;
  gap: 48px;
  animation: st-scroll 60s linear infinite;
}

.st-meta-scroller-inner span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.st-meta-scroller-inner span::before {
  content: "◆";
  color: var(--accent);
  font-size: 10px;
}

@keyframes st-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .st-meta-scroller-inner { animation: none; }
}

/* ============================================================
   FOOTER — Nachtausgabe
   ============================================================ */
.st-footer {
  background: #080504;
  border-top: 1px solid var(--rule);
  padding: 72px 0 32px;
}

.st-foot-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) 56px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  border-bottom: 1px solid var(--rule);
}

.st-foot-grid h6 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
  font-weight: 500;
}

.st-foot-brand .big {
  font-family: var(--font-serif);
  font-size: 60px;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 14px;
  display: block;
}

.st-foot-brand .big em {
  font-style: italic;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(200,122,42,0.4);
}

.st-foot-brand p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink2);
  max-width: 34ch;
  margin: 0 0 20px;
}

.st-foot-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.st-foot-grid ul li {
  margin-bottom: 10px;
}

.st-foot-grid ul li a {
  font-size: 14px;
  color: var(--ink2);
  transition: color 0.15s;
  text-decoration: none;
}

.st-foot-grid ul li a:hover {
  color: var(--accent2);
}

/* Kleines Wachssiegel */
.st-brand-seal {
  width: 64px;
  height: 64px;
  margin-top: 18px;
  filter:
    drop-shadow(0 4px 8px rgba(0,0,0,0.6))
    drop-shadow(0 0 16px rgba(200,122,42,0.35));
  display: block;
}

.st-brand-seal svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Footer-Unterkante */
.st-foot-bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--gutter) 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.st-foot-bottom a {
  color: var(--muted);
  transition: color 0.15s;
  text-decoration: none;
}

.st-foot-bottom a:hover {
  color: var(--accent2);
}

/* ============================================================
   RESPONSIVE — Tablet & Mobile
   ============================================================ */
@media (max-width: 980px) {
  /* Desktop-Nav weg, Burger zeigen */
  .st-nav-primary {
    display: none;
  }

  .st-topbar .st-burger {
    display: inline-flex;
  }

  .st-topbar-inner {
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 12px var(--gutter);
  }

  .st-top-cta {
    gap: 8px;
  }

  .st-foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 0 var(--gutter) 40px;
  }

  .st-foot-brand {
    grid-column: 1 / -1;
  }

  .st-foot-brand .big {
    font-size: 44px;
  }
}

@media (max-width: 600px) {
  .st-foot-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .st-foot-brand .big {
    font-size: 38px;
  }

  /* Overlay-Nav Typo etwas kleiner auf engen Screens */
  .st-mobile-nav__inner a {
    font-size: 28px;
    padding: 16px 0;
  }

  .st-mobile-nav__inner {
    padding-top: 88px;
  }
}

/* Auf sehr kleinen Screens 18+-Pill ausblenden, nur Burger */
@media (max-width: 400px) {
  .st-age-pill {
    display: none;
  }
}
