/* ========== DESIGN-VARIABLEN ========== */

:root {
  /* Dark theme (default) – High-Contrast */
  --bg-dark: #000000;
  --bg-dark-alt: #000000;
  --card-dark: #000000;
  --border-dark: #ffffff;

  --text-main-dark: #ffffff;
  --text-soft-dark: #ffffff;   /* keine Grautöne mehr */
  --text-muted-dark: #ffffff;

  /* Light theme – invertiert, ebenfalls High-Contrast */
  --bg-light: #ffffff;
  --bg-light-alt: #ffffff;
  --card-light: #ffffff;
  --border-light: #000000;

  --text-main-light: #000000;
  --text-soft-light: #000000;
  --text-muted-light: #000000;

  /* Accent — the original purple. A fixed value on purpose: links stay visible and
     recognisable in every theme (OS dark/light AND the manual Dark/Light toggle) */
  --accent: #d59b4a;
  --accent-soft: #d59b4a;

  /* follows the active theme (OS or manual) — used by the mobile menu overlay */
  --page-bg: #000000;
}

/* ========== RESET & BASIS ========== */

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

html,
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  font-size: 15.5px;   /* FEINER! */
}

img {
  display: block;
}

/* Standard: Dark Theme */

body {
  background: var(--bg-dark);
  color: var(--text-main-dark);
}

/* Layout helper */

.container {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
}

/* ========== HEADER ========== */

/* chrome immune to page typography: header/footer define their own text metrics */
.site-header, .site-footer {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15.5px;
  line-height: 1.7;
  letter-spacing: normal;
}

.site-header {
  background: #000000;
  border-bottom: 1px solid var(--border-dark);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  padding: 0.8rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.logo-eye-light { display: none; }

/* NAV */

.nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(0.9rem, 2.8vw, 3.5rem);
}

.nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav a:hover,
.nav a:focus-visible {
  text-decoration: underline;
}

.nav-toggle { display: none; }

.nav-burger,
.nav-close {
  display: none;
  cursor: pointer;
  color: var(--accent);
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}

.nav-burger { font-size: 1.7rem; padding: 0 0.2rem; }
.nav-close  { font-size: 1.9rem; }

/* lock page scroll while the overlay menu is open */
body:has(.nav-toggle:checked) { overflow: hidden; }

/* ========== HERO ========== */

.hero {
  padding: 4.5rem 0 3.5rem;
  background: var(--bg-dark); /* tiefschwarz */
}

.hero-inner {
  display: flex;
  align-items: center;
  min-height: 40vh;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.hero-sub {
  font-size: 1rem;
  margin-top: 0.7rem;
  margin-bottom: 1rem;
  color: var(--text-main-dark);
}

.hero-text {
  margin-bottom: 2rem;
  color: var(--text-main-dark);
}

/* ========== BUTTONS ========== */

/* Erster Button: wie Link ohne Kapsel (HC-Look) */
.btn {
  display: inline-block;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #000;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

/* Zweiter Button: Vision Lab / Tools mit Lila-Rahmen */
.btn.ghost {
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  color: var(--accent);
}

/* ========== SECTIONS ========== */

.section {
  padding: 3.2rem 0;
  background: var(--bg-dark);  /* überall schwarz */
}

.section.alt {
  background: var(--bg-dark);  /* kein anderer Ton */
}

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.3rem;
}

.section p {
  margin-bottom: 0.8rem;
}

/* ========== LISTS ========== */

.list {
  margin: 0.8rem 0 1.5rem;
  padding-left: 1.2rem;
}

.list li {
  margin-bottom: 0.35rem;
}

/* ========== CARDS ========== */

.cards {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--card-dark);  /* schwarz */
  border-radius: 14px;
  border: 1px solid var(--border-dark);  /* weißer Rand */
  padding: 1.4rem 1.5rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

/* Hinweis-Karte ohne Grün, nur Weiß/Schwarz */
.card.note {
  background: #000000;
  border-left: 3px solid #ffffff;   /* weiß im Dark Mode */
}

/* ========== EXPERIMENTS NOTE ========== */

.experiments-note {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.experiments-note a {
  color: var(--accent);
  text-decoration: none;
}

.experiments-note a:hover {
  text-decoration: underline;
}

/* ========== VIDEO GRID ========== */

.video-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.video-embed {
  margin-top: 0.8rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  background: #000;
}

.video-embed iframe {
  width: 100%;
  height: 220px;  /* unverändert */
  border: none;
}

/* ========== CONTACT ========== */

.contact-email a {
  color: var(--accent);
  text-decoration: none;
  font-size: 1.05rem;
}

.contact-email a:hover {
  text-decoration: underline;
}

/* ========== FOOTER ========== */

.site-footer {
  border-top: 1px solid var(--border-dark);
  background: #000000;
  padding: 1.4rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-main-dark); /* kein Grau mehr */
}

.footer-social {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-main-dark);
}

.footer-cols {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.2rem 3.5rem;
  text-align: left;
  margin-bottom: 1.3rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 110px;
}

.footer-col h4 {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 600;
}

.footer-col a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  text-decoration: underline;
}

.footer-copy { margin: 0; }

.footer-social a {
  text-decoration: none;
  color: var(--accent);
}

.footer-social a:hover {
  text-decoration: underline;
}

/* ========== GLOBAL LINKS ========== */

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* note-callout links sit mid-sentence — keep them underlined so they read as links without colour */
.card.note a {
  text-decoration: underline;
}

/* ========== LIGHT THEME (System-Preference) ========== */

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) body { background: var(--bg-light);
    color: var(--text-main-light); }
  html:not([data-theme="dark"]) .site-header { background: #ffffff;
    border-bottom-color: var(--border-light); }
  html:not([data-theme="dark"]) .logo { color: var(--accent);       /* auch im Light Mode lila */ }
  html:not([data-theme="dark"]) .nav a { color: var(--accent); }
  html:not([data-theme="dark"]) .hero { background: #ffffff; }
  html:not([data-theme="dark"]) .hero-sub { color: var(--text-main-light); }
  html:not([data-theme="dark"]) .hero-text { color: var(--text-main-light); }
  html:not([data-theme="dark"]) .btn.ghost { border-color: var(--accent);
    color: var(--accent); }
  html:not([data-theme="dark"]) .section { background: var(--bg-light); }
  html:not([data-theme="dark"]) .section.alt { background: var(--bg-light-alt); }
  html:not([data-theme="dark"]) .card { background: var(--card-light);
    border-color: var(--border-light); }
  html:not([data-theme="dark"]) .card.note { background: #ffffff;
    border-left-color: #000000;  /* im Light Mode schwarz */ }
  html:not([data-theme="dark"]) .video-embed { border-color: var(--border-light); }
  html:not([data-theme="dark"]) .site-footer { background: #ffffff;
    border-top-color: var(--border-light);
    color: var(--text-main-light);   /* jetzt schwarz statt grau */ }
  html:not([data-theme="dark"]) .footer-social { color: var(--text-main-light); }
  html:not([data-theme="dark"]) a { color: var(--accent); }
  html:not([data-theme="dark"]) { --page-bg: #ffffff; }
  html:not([data-theme="dark"]) .logo-eye-dark { display: none; }
  html:not([data-theme="dark"]) .logo-eye-light { display: inline-block; }
}

/* manual light theme (Settings) */
html[data-theme="light"] body { background: var(--bg-light);
    color: var(--text-main-light); }
html[data-theme="light"] .site-header { background: #ffffff;
    border-bottom-color: var(--border-light); }
html[data-theme="light"] .logo { color: var(--accent);       /* auch im Light Mode lila */ }
html[data-theme="light"] .nav a { color: var(--accent); }
html[data-theme="light"] .hero { background: #ffffff; }
html[data-theme="light"] .hero-sub { color: var(--text-main-light); }
html[data-theme="light"] .hero-text { color: var(--text-main-light); }
html[data-theme="light"] .btn.ghost { border-color: var(--accent);
    color: var(--accent); }
html[data-theme="light"] .section { background: var(--bg-light); }
html[data-theme="light"] .section.alt { background: var(--bg-light-alt); }
html[data-theme="light"] .card { background: var(--card-light);
    border-color: var(--border-light); }
html[data-theme="light"] .card.note { background: #ffffff;
    border-left-color: #000000;  /* im Light Mode schwarz */ }
html[data-theme="light"] .video-embed { border-color: var(--border-light); }
html[data-theme="light"] .site-footer { background: #ffffff;
    border-top-color: var(--border-light);
    color: var(--text-main-light);   /* jetzt schwarz statt grau */ }
html[data-theme="light"] .footer-social { color: var(--text-main-light); }
html[data-theme="light"] a { color: var(--accent); }
html[data-theme="light"] { --page-bg: #ffffff; }
html[data-theme="light"] .logo-eye-dark { display: none; }
html[data-theme="light"] .logo-eye-light { display: inline-block; }


/* ========== RESPONSIVE ========== */

@media (max-width: 700px) {
  .header-inner {
    justify-content: space-between;
  }

  .nav-burger { display: block; }

  .nav {
    display: none;
    position: fixed;
    inset: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0;
    background: var(--page-bg);
    padding: 4.5rem 1.6rem 2.5rem;
    z-index: 1000;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #nav-toggle:checked ~ .nav { display: flex; }

  .nav-close {
    display: block;
    position: absolute;
    top: 1.1rem;
    right: 1.4rem;
  }

  .nav a {
    display: block;
    width: 100%;
    padding: 0.85rem 0;
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero-inner { min-height: auto;
    padding-top: 1rem; }
  .video-embed iframe { height: 200px; }
}

@media (max-width: 480px) {
  .video-embed iframe {
    height: 180px;
  }
}

/* ========== VIDEO ARCHIVE GRID ========== */
.video-archive {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.video-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s ease;
}
.video-card:hover { opacity: 0.85; }
.video-card .thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}
.video-card .vc-body { padding: 0.9rem 1.1rem 1.1rem; }
.video-card .vc-title { font-weight: 600; line-height: 1.35; }
.video-card .vc-meta { font-size: 0.8rem; opacity: 0.7; margin-top: 0.35rem; }

/* ========== PORTRAIT (SHORTS) EMBEDS ========== */
.video-embed.portrait {
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.video-embed.portrait iframe {
  height: auto;
  aspect-ratio: 9 / 16;
}
/* Side-by-side shelf for featured shorts on the homepage */
.video-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.video-row .card {
  flex: 1 1 300px;
  max-width: 390px;
  margin-top: 0;
}

/* ========== VIDEO LIST (ARCHIVE INDEX) ========== */
.video-list { list-style: none; padding-left: 0; margin-top: 1.5rem; }
.video-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem 1.25rem;
  padding: 0.55rem 0;
}
.video-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.4;
}
.video-list a:hover { text-decoration: underline; }
.video-list .vl-meta {
  opacity: 0.6;
  font-size: 0.85rem;
  white-space: nowrap;
}


/* High-contrast opt-out (Settings): keep the site's own palette under forced colors */
html[data-fc="off"],
html[data-fc="off"] * {
  forced-color-adjust: none;
}

/* Accent presets (Settings) — one value for both themes */
html[data-accent="blue"] { --accent: #4da3ff; --accent-soft: #4da3ff; }
html[data-accent="purple"] { --accent: #8080ff; --accent-soft: #8080ff; }
html[data-accent="green"] { --accent: #4ade80; --accent-soft: #4ade80; }
html[data-accent="mono"] { --accent: #ffffff; --accent-soft: #ffffff; }
/* mono exception: white on white would be invisible */
@media (prefers-color-scheme: light) { html[data-accent="mono"]:not([data-theme="dark"]) { --accent: #000000; --accent-soft: #000000; } }
html[data-theme="light"][data-accent="mono"] { --accent: #000000; --accent-soft: #000000; }

/* filled buttons: black label works on every bright accent; mono-light needs white */
@media (prefers-color-scheme: light) { html[data-accent="mono"]:not([data-theme="dark"]) .btn:not(.ghost) { color: #fff; } }
html[data-theme="light"][data-accent="mono"] .btn:not(.ghost) { color: #fff; }

/* filled buttons: keep the black label against the light theme's generic link color */
@media (prefers-color-scheme: light) { html:not([data-theme="dark"]) .btn:not(.ghost) { color: #000; } }
html[data-theme="light"] .btn:not(.ghost) { color: #000; }

/* adjacent buttons: keep a gap when they wrap on narrow screens */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }


/* ========== TWO-CLICK YOUTUBE EMBED ========== */
.yt-consent { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 220px; color: #fff; background: #000; }
.video-embed.portrait .yt-consent { aspect-ratio: 9 / 16; min-height: 0; }
.yt-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.yt-box { position: relative; padding: .8rem; background: rgba(0,0,0,.88); font-size: .82rem; line-height: 1.45; }
.yt-title { font-weight: 600; margin: 0 0 .4rem; }
.yt-note { margin: 0 0 .7rem; }
.yt-actions { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.yt-note a, .yt-link { color: #fff; text-decoration: underline; }
.yt-btn { font: inherit; font-weight: 600; padding: .5rem .9rem; border-radius: 8px; border: 2px solid #fff; background: #fff; color: #000; cursor: pointer; }
.yt-btn:focus-visible, .yt-link:focus-visible, .yt-note a:focus-visible { outline: 3px solid #ffd54a; outline-offset: 2px; }
@media (forced-colors: active) {
  .yt-consent { background: Canvas; color: CanvasText; }
  .yt-thumb { display: none; }
  .yt-box { background: Canvas; }
  .yt-note a, .yt-link { color: LinkText; }
  .yt-btn { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
  .yt-btn:focus-visible, .yt-link:focus-visible, .yt-note a:focus-visible { outline-color: Highlight; }
}

/* ========== SELF-HOSTED VIDEO ========== */
.video-embed video { display: block; width: 100%; height: auto; background: #000; }
.video-embed.portrait { max-width: 360px; }
.video-embed.portrait video { max-height: 80vh; object-fit: contain; }
.video-embed video:focus-visible { outline: 3px solid #ffd54a; outline-offset: 2px; }
