/* ==========================================================================
   WABI SABI (侘寂) - WABISABI.CAT - ZENTRALE STYLE.CSS
   - Sauber getrennte Architektur (wie bei Yuki)
   - SVG-Schärfe-Filter (#wabisabi-sharpen) + Kontrast/Sättigung für das Video
   - Intelligenter Bildausschnitt für Tablet/Hochformat (Bank & Baum sichtbar!)
   - Schmale schwarze Kopfleiste & Fußleiste (#080808)
   - 84px Prüfsiegel unten rechts über der Kante zwischen Schwarz & Weiß
   - Alle 9 Willkommens-Wolken komplett gleich (keine gelbe/dunkle Hervorhebung!)
   - Stilisierte Wölkchen per SVG-Hintergrund für die 9 schwebenden Einladungen
   - WCAG 2.2 AA / EN 301 549 (V4.1.1): 44x44px Klickflächen, klare Fokus-Ringe
   Development: Confirmation Bias – CEO & Founder: Angelika Keussen
   ========================================================================== */

:root {
  --font-scale: 1;
  --gold: #FFAF33;
  --bar-bg: #080808;
  --bar-border: #222222;

  /* Stilisierte, sanft geschwungene Wolken-Form als SVG für alle 9 Sprach-Wölkchen */
  --wabisabi-cloud-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 88' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='cGrad' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23222832' stop-opacity='0.46'/%3E%3Cstop offset='100%25' stop-color='%230c0f14' stop-opacity='0.54'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M 44,76 C 18,76 6,62 11,45 C 14,32 27,25 41,28 C 49,13 70,6 92,13 C 107,4 136,4 152,14 C 171,6 198,11 208,27 C 228,24 248,35 250,51 C 252,66 237,76 214,76 Z' fill='url(%23cGrad)' stroke='%23ffffff' stroke-opacity='0.62' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  font-family: 'Segoe UI', 'Arial', sans-serif;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  background-color: #111111;
  color: #ffffff;
  text-align: center;
  overflow: hidden;
  user-select: none;
}

/* ==========================================================================
   WCAG AAA SKIP-LINK
   ========================================================================== */
.skip-link,
#skip-link {
  position: fixed;
  top: -120px;
  left: 1.5rem;
  z-index: 9999;
  background: #080808 !important;
  color: #F3FF33 !important;
  border: 2px solid #F3FF33 !important;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible,
#skip-link:focus,
#skip-link:focus-visible {
  top: 0.5rem;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ==========================================================================
   SCHMALE SCHWARZE KOPFLEISTE OBEN (INKL. A11Y & 9-SPRACHEN-DROPDOWN)
   ========================================================================== */
header.top-bar {
  position: relative;
  z-index: 30;
  width: 100%;
  min-height: 50px;
  padding: 4px 20px;
  background-color: var(--bar-bg);
  border-bottom: 1px solid var(--bar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  flex-shrink: 0;
}

.controls-left {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.a11y-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: #121212;
}

.a11y-bar button,
.a11y-bar a.a11y-skip-btn {
  background: none;
  border: none;
  color: #e5e5e5;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.a11y-bar a.a11y-skip-btn {
  color: #33FFF3;
  border-right: 1px solid #333;
  padding-right: 10px;
}

.a11y-bar button:hover,
.a11y-bar button.active,
.a11y-bar a.a11y-skip-btn:hover {
  color: #F3FF33;
  transform: scale(1.06);
}

.a11y-bar button.stop-btn {
  color: #FF5733;
  border-left: 1px solid #333;
  padding-left: 10px;
}

/* ==========================================================================
   ECHTES VERTIKALES SPRACH-DROPDOWN (NACH UNTEN!) - 9 SPRACHEN
   ========================================================================== */
.lang-switcher {
  position: relative;
  width: 82px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 100;
}

.lang-switcher > button {
  background: #121212;
  border: 1px solid #333333;
  color: #e5e5e5;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  width: 82px;
  min-width: 82px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switcher > button.active {
  display: inline-flex;
  color: #F3FF33;
  border-color: #FFAF33;
}

.lang-switcher > button.active::after {
  content: "▾";
  font-size: 0.75rem;
  color: #FFAF33;
}

.lang-switcher.open,
.lang-switcher:hover {
  display: block !important;
  position: relative !important;
  width: 82px !important;
  height: 44px !important;
  overflow: visible !important;
}

.lang-switcher.open > button,
.lang-switcher:hover > button {
  display: flex !important;
  width: 82px !important;
  min-width: 82px !important;
  height: 38px !important;
  min-height: 38px !important;
  background: #0b0b0b !important;
  border-left: 1.5px solid #FFAF33 !important;
  border-right: 1.5px solid #FFAF33 !important;
  border-top: none !important;
  border-bottom: 1px solid #222222 !important;
  border-radius: 0 !important;
  position: relative !important;
  z-index: 120 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.95) !important;
}

.lang-switcher.open > button:first-child,
.lang-switcher:hover > button:first-child {
  border-top: 1.5px solid #FFAF33 !important;
  border-radius: 12px 12px 0 0 !important;
}

.lang-switcher.open > button:last-child,
.lang-switcher:hover > button:last-child {
  border-bottom: 1.5px solid #FFAF33 !important;
  border-radius: 0 0 12px 12px !important;
}

.lang-switcher.open > button:hover,
.lang-switcher:hover > button:hover {
  background: #FFAF33 !important;
  color: #080808 !important;
}

/* Fokus-Ringe für Tastaturbedienung (WCAG 2.2) */
button:focus-visible,
a:focus-visible {
  outline: 3px solid #F3FF33 !important;
  outline-offset: 4px !important;
}

/* ==========================================================================
   HAUPTBÜHNE: GESCHÄRFTES HINTERGRUNDVIDEO & 100 % DURCHSICHTIGE PORTAL-BOX
   ========================================================================== */
main.hero-section {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 2.2vh 20px 10px 20px;
  overflow: hidden;
}

/* ECHTER ECHTZEIT-SCHÄRFE-FILTER FÜR DIE ZEICHNUNG & DIE BANK */
.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
  filter: url(#wabisabi-sharpen) contrast(1.07) saturate(1.12);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 2;
  pointer-events: none;
}

/* KOMPLETT DURCHSICHTIGE PORTAL-BOX */
a.portal-box {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 780px;
  width: 100%;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 22px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  text-decoration: none;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.3s ease;
}

a.portal-box:hover,
a.portal-box:focus-visible {
  transform: translateY(-2px);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.high-contrast a.portal-box {
  background: rgba(0, 0, 0, 0.92) !important;
  border: 3px solid #F3FF33 !important;
}

.bunter-text {
  font-family: 'Arial Black', 'Segoe UI Black', 'Arial', sans-serif;
  font-size: calc(3.1rem * var(--font-scale));
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1.05;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.95);
}

/* Deine 8 Original-Farben für WABI SABI */
.bunter-text span:nth-child(1) { color: #FF5733; } /* W */
.bunter-text span:nth-child(2) { color: #33FF57; } /* A */
.bunter-text span:nth-child(3) { color: #3357FF; } /* B */
.bunter-text span:nth-child(4) { color: #F3FF33; } /* I */
.bunter-text span:nth-child(5) { color: #FF33F3; } /* S */
.bunter-text span:nth-child(6) { color: #33FFF3; } /* A */
.bunter-text span:nth-child(7) { color: #FFAF33; } /* B */
.bunter-text span:nth-child(8) { color: #AF33FF; } /* I */

/* ==========================================================================
   STILISIERTE WÖLKCHEN (ALLE 9 KOMPLETT GLEICH – KEINS GELB ODER DUNKLER!)
   ========================================================================== */
.wabern-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem 0.95rem;
  width: 100%;
}

.wabern-word {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  font-size: calc(0.98rem * var(--font-scale));
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  padding: 0.62rem 1.35rem 0.56rem 1.35rem;
  background-color: transparent !important;
  background-image: var(--wabisabi-cloud-svg);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center center;
  border: none !important;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.32));
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 4px rgba(0, 0, 0, 0.9);
  animation: cloud-drift var(--dur, 6.5s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
  transition: transform 0.3s ease, filter 0.3s ease;
}

a.portal-box:hover .wabern-word {
  filter: drop-shadow(0 5px 14px rgba(255, 255, 255, 0.35));
}

body.high-contrast .wabern-word {
  background-image: none !important;
  background-color: #000000 !important;
  border: 2px solid #ffffff !important;
  border-radius: 999px;
}

@keyframes cloud-drift {
  0% {
    transform: translate(0px, 0px) rotate(0deg);
  }
  33% {
    transform: translate(var(--dx, 6px), var(--dy, -4px)) rotate(var(--rot, 0.5deg));
  }
  66% {
    transform: translate(calc(var(--dx, 6px) * -0.75), calc(var(--dy, -4px) * -0.65)) rotate(calc(var(--rot, 0.5deg) * -1));
  }
  100% {
    transform: translate(calc(var(--dx, 6px) * 0.45), var(--dy, -4px)) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wabern-word {
    animation: none !important;
  }
}

/* ==========================================================================
   SCHMALE SCHWARZE FUSSLEISTE UNTEN + PRÜFSIEGEL ÜBER SCHWARZ & WEISS RECHTS UNTEN
   ========================================================================== */
footer.bottom-bar {
  position: relative;
  z-index: 20;
  padding: 4px 130px 4px 20px;
  min-height: 50px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: calc(0.92rem * var(--font-scale));
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  background-color: var(--bar-bg);
  border-top: 1px solid var(--bar-border);
  flex-shrink: 0;
}

.footer-left {
  color: #999999;
  font-size: calc(0.84rem * var(--font-scale));
  font-weight: 600;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 auto;
}

footer button.legal-trigger {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  transition: opacity 0.2s ease;
}

footer button.legal-trigger:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.link-legal { color: #FF5733; }
.link-priv  { color: #33FF57; }
.link-a11y  { color: #33FFF3; }

.divider {
  color: #444444;
  user-select: none;
}

/* PRÜFSIEGEL UNTEN RECHTS IN DER ECKE: RAGEND ÜBER SCHWARZ UND WEISS */
.seal-link {
  position: fixed;
  bottom: 8px;
  right: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.seal-link:hover,
.seal-link:focus-visible {
  transform: translateY(-3px) scale(1.06);
  filter: drop-shadow(0 0 14px rgba(255, 175, 51, 0.65));
}

.seal-img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background-color: #080808;
  border: 2px solid #FFAF33;
  object-fit: contain;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   BARRIEREFREIES RECHTSTEXT- & A11Y-MODAL
   ========================================================================== */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: left;
  user-select: text;
}

.legal-modal.active {
  display: flex;
}

.legal-box {
  background: #0e0e0e;
  border: 2px solid #FFAF33;
  border-radius: 18px;
  max-width: 720px;
  width: 100%;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.95);
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid #2a2a2a;
}

.legal-title {
  color: #FFAF33;
  font-size: 1.25rem;
  font-weight: 700;
}

.legal-close {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid #FFAF33;
  background: #161616;
  color: #FFAF33;
  font-weight: 700;
  cursor: pointer;
}

.legal-close:hover {
  background: #FFAF33;
  color: #080808;
}

.legal-body {
  padding: 20px 24px;
  overflow-y: auto;
  line-height: 1.65;
  color: #e0e0e0;
  font-size: calc(0.95rem * var(--font-scale));
}

.legal-body h2 {
  color: #33FFF3;
  font-size: 1.05rem;
  margin: 14px 0 6px 0;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p {
  margin-bottom: 10px;
}

.legal-body a {
  color: #FFAF33;
}

/* ==========================================================================
   TABLET HOCHFORMAT & SMARTPHONE: BILDAUSSCHNITT SANFT NACH RECHTS (66%)
   - Zeigt im Hochformat links den Rand des Vogelschwarms UND rechts die Bank,
     damit die Dohle auf dem iPad nicht ins Leere fliegt!
   ========================================================================== */
@media (orientation: portrait), (max-width: 900px) {
  .bg-video {
    object-position: 64% center;
  }
}

@media (max-width: 680px) {
  main.hero-section { padding-top: 1.5vh; }
  a.portal-box { padding: 0.4rem 0.6rem; }
  .bunter-text { font-size: calc(2.15rem * var(--font-scale)); margin-bottom: 0.45rem; }
  .wabern-word { font-size: calc(0.86rem * var(--font-scale)); padding: 0.48rem 1rem; }
  .footer-left { display: none; }
  header.top-bar { padding: 4px 10px; }
  footer.bottom-bar { padding-right: 84px; }
  .seal-link { right: 10px; bottom: 6px; }
  .seal-img { width: 64px; height: 64px; }
}