/* ==========================================================================
   Insights with Asya — globales Stylesheet
   Ergänzt Tailwind (CDN) um Typografie-System, Bewegung, Zugänglichkeit
   und die Bausteine für das Consent-/Cookie-System.
   ========================================================================== */

:root {
  --color-primary: #8932e6;
  --color-primary-dark: #6223a6;
  --color-ink: #17101f;
  --color-paper: #faf8fd;
  --color-onair: #f2b705;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background-color: var(--color-paper);
}

/* -------------------------------------------------------------------- */
/* Typografie                                                            */
/* -------------------------------------------------------------------- */

.font-display {
  font-family: "Fraunces", "Georgia", serif;
  font-optical-sizing: auto;
}

.kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* Sichtbarer Fokusring für Tastaturbedienung (Barrierefreiheit) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
label:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------------------------------------------- */
/* "On Air"-Signatur-Badge — das wiederkehrende Markenzeichen der Seite  */
/* -------------------------------------------------------------------- */

.onair-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-ink);
  background: #fff;
  border: 1px solid rgba(23, 16, 31, 0.1);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(23, 16, 31, 0.06);
}

.onair-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-onair);
  box-shadow: 0 0 0 0 rgba(242, 183, 5, 0.6);
  animation: onair-pulse 2.2s ease-out infinite;
}

@keyframes onair-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(242, 183, 5, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(242, 183, 5, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(242, 183, 5, 0);
  }
}

/* -------------------------------------------------------------------- */
/* Scroll-Reveal                                                        */
/* -------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------------- */
/* Consent-Banner & Einstellungen-Dialog                                */
/* -------------------------------------------------------------------- */

.consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 16, 31, 0.45);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

@media (min-width: 768px) {
  .consent-overlay {
    align-items: center;
  }
}

.consent-card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid rgba(23, 16, 31, 0.08);
  box-shadow: 0 20px 45px rgba(23, 16, 31, 0.18);
  width: 100%;
  max-width: 560px;
  padding: 1.75rem;
}

.consent-toggle {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #d1d5db;
  transition: background 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}

.consent-toggle[data-on="true"] {
  background: var(--color-primary);
}

.consent-toggle span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.consent-toggle[data-on="true"] span {
  transform: translateX(20px);
}

.consent-toggle[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

/* -------------------------------------------------------------------- */
/* Video-Platzhalter (externe Inhalte, bis Zustimmung erteilt wurde)     */
/* -------------------------------------------------------------------- */

.video-consent-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  height: 100%;
  min-height: 220px;
  padding: 1.5rem;
  background: linear-gradient(155deg, #f3ecfc, #fdfcff);
  border-radius: 1rem;
}

/* Kompakte Skeleton-Kachel während Videos geladen werden */
.video-skeleton {
  min-height: 220px;
  border-radius: 1rem;
  background: linear-gradient(90deg, #f1eefb 25%, #f8f6fd 37%, #f1eefb 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
