/* ===========================================================================
   Video-Praesentations-Homepage
   Die Farben werden aus config.js (CONFIG.theme) gesetzt.
   Feintuning von Groessen und Abstaenden erfolgt hier.
   =========================================================================== */

:root {
  --accent: #3b3ef2;
  --background: #0b0b0c;
  --surface: #1a1a1d;
  --text: #f2f2f0;
  --text-muted: #8b9096;
  --border: #26262a;
  --font-display: "Anton", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-text: "Inter", -apple-system, "Segoe UI", sans-serif;
  --page-padding: 48px;
  --app-cursor: auto; /* wird von script.js auf den Kaffeetassen-Cursor gesetzt */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; cursor: var(--app-cursor, auto); }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
button { font-family: inherit; }
section { scroll-margin-top: 90px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.icon { width: 22px; height: 22px; flex-shrink: 0; }
.icon-emoji { flex-shrink: 0; font-size: 26px; line-height: 1; font-style: normal; }
.accent { color: var(--accent); }

/* --- Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 40px;
  height: 72px;
  padding: 0 var(--page-padding);
  background: rgba(8, 8, 9, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 26px; letter-spacing: 0.5px; white-space: nowrap; }
.brand-logo { width: 30px; height: 30px; flex-shrink: 0; display: block; object-fit: contain; }
.main-nav { display: flex; gap: 28px; margin: 0 auto; }
.main-nav a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 23px 0 21px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}
.main-nav a:hover { color: var(--text); }
.main-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header-actions .header-icon { width: 20px; height: 20px; color: var(--text); }
.header-actions .divider { width: 1px; height: 24px; background: #3a3a3f; }
.my-list { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; white-space: nowrap; }
.my-list .header-icon { width: 18px; height: 18px; }
.avatar { display: inline-flex; align-items: center; gap: 6px; }
.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2c2c31;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.avatar-circle .icon { width: 18px; height: 18px; }
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.avatar .chevron { width: 14px; height: 14px; color: var(--text-muted); }

/* --- Hero -------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(340px, 5fr) 7fr;
  gap: 56px;
  align-items: center;
  padding: 56px var(--page-padding) 44px;
}
.kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 5.5vw, 88px);
  line-height: 0.98;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.tagline { font-size: 21px; margin-bottom: 18px; }
.tagline .underline-accent { border-bottom: 3px solid var(--accent); padding-bottom: 2px; }
.description { color: var(--text-muted); max-width: 46ch; font-size: 15.5px; margin-bottom: 22px; }
.meta {
  list-style: none;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 30px;
}
.meta li:not(:first-child)::before { content: "|"; margin-right: 12px; color: #3f4247; }
.meta .badge {
  border: 1px solid #4a4d52;
  border-radius: 3px;
  padding: 1px 7px;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: filter 0.15s, background 0.15s, border-color 0.15s;
}
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-outline { border: 1px solid #4a4d52; color: var(--text); }
.btn-outline:hover { border-color: var(--text-muted); background: rgba(255, 255, 255, 0.04); }

/* --- Video-Player --------------------------------------------------------------- */
.hero-player { min-width: 0; }
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.player video,
.player iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: contain;
  background: #000;
}
.player-overlay {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.45));
}
.play-button {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.play-button .icon { width: 34px; height: 34px; margin-left: 5px; }
.player-overlay:hover .play-button { transform: scale(1.06); background: rgba(0, 0, 0, 0.6); }
.player-note {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  color: var(--text-muted);
  font-size: 14.5px;
}
.player-note strong { color: var(--text); font-size: 16px; }
.player-note code { color: var(--text); background: #26262a; border-radius: 4px; padding: 1px 6px; font-size: 13px; }

/* --- Sektionen allgemein ---------------------------------------------------------- */
.episodes, .features, .team, .cards, .spotlight, .cta { padding: 26px var(--page-padding); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-title { font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.view-all { color: var(--text-muted); font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; }
.view-all:hover { color: var(--text); }
.view-all .icon { width: 16px; height: 16px; }

/* --- Episoden ----------------------------------------------------------------------- */
.episode-row-wrap { position: relative; }
.episode-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(200px, calc((100% - 80px) / 6), 300px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.episode-card {
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.episode-card:hover { transform: translateY(-3px); border-color: #3a3a3f; }
.episode-card.clickable { cursor: pointer; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #111; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.play-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-badge .icon { width: 13px; height: 13px; margin-left: 2px; }
.episode-body { padding: 12px 14px 14px; }
.episode-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.episode-title-row h3 { font-size: 13.5px; font-weight: 600; }
.duration { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.blurb { color: var(--text-muted); font-size: 12.5px; line-height: 1.45; }
.row-arrow {
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1f1f23;
  border: 1px solid #3a3a3f;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.row-arrow:hover { background: #2a2a2f; }
.row-arrow .icon { width: 16px; height: 16px; }

/* --- Merkmal-Karten -------------------------------------------------------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}
.feature-card .icon { width: 34px; height: 34px; color: var(--accent); }
.feature-card .icon-emoji { color: var(--accent); font-size: 30px; }
.feature-card h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.feature-card p { color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }

/* --- Team -------------------------------------------------------------------------------- */
.team .section-title { margin-bottom: 18px; }
/* Spaltenzahl ergibt sich automatisch aus der Mindestbreite pro Karte */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.team-card {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  min-height: 108px;
}
.team-photo { width: 92px; flex-shrink: 0; object-fit: cover; }
.team-body { padding: 12px 14px; min-width: 0; }
.team-body h3 { font-size: 13.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 3px; }
.team-role { font-size: 12.5px; color: #c9ccd0; margin-bottom: 5px; }
.team-quip { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }

/* --- Karten-Carousel (Bild oben, Name, Text, Link) ------------------------------------------ */
.cards .section-title { margin-bottom: 18px; }
.card-row-wrap { position: relative; }
.card-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(240px, calc((100% - 48px) / 4), 360px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
a.card:hover { transform: translateY(-3px); border-color: #3a3a3f; }
.card-thumb { aspect-ratio: 16 / 9; background: #111; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 14px 16px 16px; }
.card-body h3 { font-size: 14.5px; font-weight: 600; }
.card-body p { color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.card-link {
  margin-top: auto;
  padding-top: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link .icon { width: 14px; height: 14px; }

/* --- Spotlight (grosses Bild mit Ueberschrift und Text) ------------------------------------- */
.spotlight-text { color: var(--text-muted); font-size: 14.5px; max-width: 60ch; margin: 10px 0 18px; white-space: pre-line; }
.spotlight-figure { margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #111; }
.spotlight-figure img { width: 100%; display: block; }

/* --- CTA-Banner --------------------------------------------------------------------------- */
.cta { padding-bottom: 56px; }
.cta-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 30px;
}
.cta-banner > .icon { width: 40px; height: 40px; color: var(--accent); }
.cta-banner > .icon-emoji { color: var(--accent); font-size: 34px; }
.cta-text { flex: 1; min-width: 220px; }
.cta-text h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.cta-text p { color: var(--text-muted); font-size: 14px; }

/* --- Footer -------------------------------------------------------------------------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 26px var(--page-padding) 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: var(--text); }

/* --- Responsive ---------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1020px) {
  :root { --page-padding: 28px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; }
  .main-nav { display: none; }
  .episode-row { grid-auto-columns: clamp(200px, 42vw, 280px); }
  .card-row { grid-auto-columns: clamp(220px, 45vw, 320px); }
}
@media (max-width: 680px) {
  :root { --page-padding: 18px; }
  .site-header { gap: 16px; }
  .brand { font-size: 20px; min-width: 0; }
  .brand-name { overflow: hidden; text-overflow: ellipsis; }
  .brand-logo { width: 26px; height: 26px; }
  .header-actions { gap: 12px; }
  .my-list span { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .episode-row { grid-auto-columns: 72vw; }
  .card-row { grid-auto-columns: 78vw; }
  .row-arrow { display: none; }
}
@media (max-width: 480px) {
  .header-actions > .header-icon { display: none; } /* Lupe ausblenden */
  .header-actions .divider { display: none; }
}

/* --- Kaffee-Easter-Egg (Tasse aus dem "Search Coffee"-Button) ------------------------------- */
.coffee-cup {
  position: fixed;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 200;
  /* Grundzustand ist voll sichtbar: die Animation ist reine Zugabe, sodass die
     Tasse auch ohne laufende Animation (z.B. reduced-motion) sofort da ist. */
  opacity: 1;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  animation: coffee-pop-in 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}
.coffee-cup svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.coffee-cup:hover { transform: scale(1.08) rotate(-4deg); }
.coffee-cup--pop { animation: coffee-pop-out 0.3s ease forwards; pointer-events: none; }
@keyframes coffee-pop-in {
  from { transform: scale(0.4); }
  to { transform: scale(1); }
}
@keyframes coffee-pop-out {
  to { transform: scale(1.6) rotate(12deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .coffee-cup { animation-duration: 0.01ms; }
  .coffee-cup:hover { transform: none; }
  .coffee-cup--pop { animation-duration: 0.12s; }
}

/* --- Easter Egg: "Ich erklaer's kurz"-Link + Modal ----------------------------------------- */
.explain-link {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.explain-link:hover { color: var(--text); text-decoration: underline; }
.egg-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.egg-modal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: egg-pop-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.egg-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.egg-modal-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.egg-modal-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.egg-modal-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.egg-modal-box p:not(.egg-modal-kicker) {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.egg-modal-footnote { color: var(--text); font-style: italic; opacity: 0.85; }
@keyframes egg-pop-in {
  from { transform: scale(0.9); }
  to { transform: scale(1); }
}

/* --- Easter Egg: Koffein-Zaehler (HUD unten links) ----------------------------------------- */
.caffeine-hud {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 190;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.caffeine-hud--bump { animation: caffeine-bump 0.35s ease; }
@keyframes caffeine-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* --- Easter Egg: Toast (Koffein-Meilensteine) ---------------------------------------------- */
.egg-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 210;
  padding: 12px 18px;
  background: #000;
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: egg-toast-in 0.3s ease;
}
.egg-toast--out { animation: egg-toast-out 0.4s ease forwards; }
@keyframes egg-toast-in {
  from { transform: translate(-50%, 16px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
@keyframes egg-toast-out {
  to { transform: translate(-50%, 16px); opacity: 0; }
}

/* --- Easter Egg: Kaffee-Regen (Tipp-Code KAFFEE) ------------------------------------------- */
.coffee-drop {
  position: fixed;
  top: -70px;
  z-index: 200;
  width: 44px;
  height: 44px;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  animation-name: coffee-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
.coffee-drop svg { width: 100%; height: 100%; display: block; }
/* Regen-Ausloeser-Karte: sauberes Mehrfach-Tippen ohne Doppeltipp-Zoom/Tap-Blitz */
.feature-card[data-rain] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@keyframes coffee-fall {
  from { transform: translateY(0) rotate(0); }
  to { transform: translateY(calc(100vh + 150px)) rotate(var(--spin, 180deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .egg-modal-box { animation-duration: 0.01ms; }
  .egg-toast, .egg-toast--out { animation-duration: 0.01ms; }
  .caffeine-hud--bump { animation-duration: 0.01ms; }
  .coffee-drop { animation-duration: 1s; }
}
