/* ============================================================
   HeizWissen Kanal-Homepage
   Brand: Navy #16224a / #24408e, Magenta #e5187d, Off-White
   ============================================================ */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF;
}

:root {
  --bg: #0d1734;
  --bg-tint: #111e42;
  --surface: #182a58;
  --surface-line: #26396c;
  --navy: #24408e;
  --accent: #e5187d;
  --accent-soft: rgba(229, 24, 125, 0.14);
  --text: #f2f5fd;
  --text-dim: #b3c0dd;
  --radius: 16px;
  --wrap: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

h1, h2, h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }

p { max-width: 62ch; }

a { color: inherit; }

/* ---------- Header ---------- */

.nav-sentinel { position: absolute; top: 0; height: 8px; width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 23, 52, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--surface-line);
  background: rgba(13, 23, 52, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; }

.fan {
  transform-origin: 30px 24px;
}
@media (prefers-reduced-motion: no-preference) {
  .fan { animation: fan-spin 14s linear infinite; }
  .brand:hover .fan { animation-duration: 2.5s; }
}
@keyframes fan-spin { to { transform: rotate(360deg); } }

.brand-word {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.brand-word em {
  font-style: normal;
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.site-nav > a:not(.btn) {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.site-nav > a:not(.btn):hover,
.site-nav > a:not(.btn):focus-visible { color: #fff; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.78rem 1.6rem;
  border: 2px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: #f8258c;
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--surface-line);
  color: var(--text);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.btn-nav {
  background: #fff;
  color: #16224a;
  padding: 0.55rem 1.15rem;
  font-size: 0.92rem;
}
.btn-nav:hover, .btn-nav:focus-visible { background: #e9edf8; }
.yt-icon { width: 20px; height: 20px; color: #e5187d; }

.btn-lg { padding: 0.95rem 2.2rem; font-size: 1.08rem; }

/* ---------- Mobile Nav ---------- */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px;
  height: 2.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.2px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.2px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 5rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52rem 30rem at 82% 8%, rgba(36, 64, 142, 0.55), transparent 65%),
    radial-gradient(38rem 26rem at 8% 95%, rgba(229, 24, 125, 0.12), transparent 60%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-title {
  font-size: clamp(2.4rem, 4.6vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.hero-title .accent { color: var(--accent); }

.hero-sub {
  margin-top: 1.25rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-dim);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

/* Einstiegs-Animation nur bei erlaubter Bewegung */
@media (prefers-reduced-motion: no-preference) {
  .hero-title, .hero-sub, .hero-actions, .hero-media {
    animation: rise-in 0.9s var(--ease) both;
  }
  .hero-sub { animation-delay: 0.12s; }
  .hero-actions { animation-delay: 0.22s; }
  .hero-media { animation-delay: 0.18s; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Video-Frame (Hero, Click-to-Load) ---------- */

.video-frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  box-shadow: 0 24px 60px rgba(6, 11, 28, 0.55);
}

.lite-yt-activate {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  aspect-ratio: 16 / 9;
}
.lite-yt-activate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lite-yt iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.play-badge {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(229, 24, 125, 0.45);
  transition: transform 0.25s var(--ease);
}
.play-badge svg { width: 30px; height: 30px; margin-left: 3px; }
.lite-yt-activate:hover .play-badge,
.lite-yt-activate:focus-visible .play-badge,
.video-card:hover .play-badge,
.video-card:focus-visible .play-badge {
  transform: scale(1.12);
}

.video-frame figcaption {
  padding: 1rem 1.25rem 1.15rem;
  display: grid;
  gap: 0.25rem;
}
.video-frame figcaption strong {
  font-size: 1.02rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.video-frame figcaption span {
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-tint { background: var(--bg-tint); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}

.text-link {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.text-link:hover, .text-link:focus-visible { border-bottom-color: var(--accent); }

/* ---------- Video Grid ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 0.62fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: start;
}

.video-card {
  display: grid;
  gap: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease);
}
.video-card:hover { transform: translateY(-5px); }

.video-card .thumb {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--surface-line);
  background: var(--surface);
}
.video-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.video-card:hover .thumb img { transform: scale(1.04); }

.video-card .thumb .play-badge {
  width: 54px;
  height: 54px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.video-card .thumb .play-badge svg { width: 24px; height: 24px; }
.video-card:hover .thumb .play-badge,
.video-card:focus-visible .thumb .play-badge { opacity: 1; }

.thumb.thumb-portrait { aspect-ratio: 9 / 16; }

.video-info { display: grid; gap: 0.3rem; }
.video-info strong {
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}
.video-info .meta {
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* ---------- Themen ---------- */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(200px, auto);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-top: 2.2rem;
}

.topic-tile {
  border-radius: var(--radius);
  border: 1px solid var(--surface-line);
  background: linear-gradient(160deg, var(--surface), #13214a 70%);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.topic-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 24, 125, 0.45);
}

.topic-tile h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
.topic-tile p { font-size: 0.95rem; color: var(--text-dim); }

.topic-tile-photo {
  grid-row: span 2;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(to top, rgba(10, 17, 40, 0.94) 25%, rgba(10, 17, 40, 0.25) 65%),
    var(--bg-img) center / cover no-repeat;
  min-height: 340px;
}
.topic-tile-photo h3 { font-size: 1.35rem; }

.topic-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: auto;
}
.topic-icon svg { width: 26px; height: 26px; }

/* ---------- Über ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-media { display: grid; place-items: center; }

.about-avatar {
  width: min(300px, 70vw);
  border-radius: 999px;
  border: 4px solid var(--surface-line);
  box-shadow: 0 20px 50px rgba(6, 11, 28, 0.5);
}

.about-copy { display: grid; gap: 1rem; }
.about-copy h2 { margin-bottom: 0.3rem; }
.about-copy p { color: var(--text-dim); }

/* ---------- CTA ---------- */

.cta-band {
  background:
    radial-gradient(42rem 22rem at 50% 120%, rgba(229, 24, 125, 0.22), transparent 70%),
    var(--bg-tint);
  border-top: 1px solid var(--surface-line);
}

.cta-inner {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1rem;
}
.cta-inner h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.cta-inner p { color: var(--text-dim); }
.cta-inner .btn { margin-top: 0.5rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--surface-line);
  padding-block: 2.75rem 1.5rem;
  background: #0a1329;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

.footer-nav, .footer-legal {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}
.footer-nav a, .footer-legal a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: color 0.2s;
}
.footer-nav a:hover, .footer-legal a:hover,
.footer-nav a:focus-visible, .footer-legal a:focus-visible { color: #fff; }

.footer-note {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(38, 57, 108, 0.5);
}
.footer-note p {
  font-size: 0.85rem;
  color: #7e8db1;
  max-width: none;
}

/* ---------- Blog ---------- */

.post-list {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-top: 2.2rem;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: center;
  text-decoration: none;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface), #13214a 70%);
  padding: clamp(1rem, 2vw, 1.5rem);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 24, 125, 0.45);
}
.post-card .post-thumb {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.post-card .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card h3 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  color: var(--text);
}
.post-card p {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.post-card .meta {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- Artikel ---------- */

.article-header {
  padding-block: clamp(2.5rem, 5vw, 4rem) 0;
}
.article-header .crumbs {
  font-size: 0.92rem;
  color: var(--text-dim);
}
.article-header .crumbs a {
  color: var(--accent);
  text-decoration: none;
}
.article-header .crumbs a:hover { text-decoration: underline; }
.article-header h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  letter-spacing: -0.025em;
  margin-top: 0.9rem;
  max-width: 22ch;
}
.article-header .article-meta {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}

.article {
  padding-block: clamp(2rem, 4vw, 3rem) clamp(3.5rem, 7vw, 6rem);
}
.article .prose {
  max-width: 720px;
  display: grid;
  gap: 1.1rem;
}
.article .prose h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  margin-top: 1.4rem;
}
.article .prose h3 {
  font-size: 1.12rem;
  margin-top: 0.6rem;
}
.article .prose p { color: var(--text-dim); max-width: none; }
.article .prose strong { color: var(--text); }
.article .prose a { color: var(--accent); }
.article .prose ul, .article .prose ol {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.45rem;
  color: var(--text-dim);
}
.article .prose .video-frame { margin-block: 1rem; }

.info-box {
  border: 1px solid var(--surface-line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
  padding: 1.1rem 1.3rem;
  display: grid;
  gap: 0.4rem;
}
.info-box p { font-size: 0.95rem; }

.fact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.fact-table th, .fact-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
}
.fact-table thead th {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  font-weight: 700;
}
.fact-table tbody td { color: var(--text-dim); }
.fact-table tbody tr:nth-child(even) { background: rgba(24, 42, 88, 0.5); }
.table-scroll { overflow-x: auto; }

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: left; }

  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-card-short { grid-column: span 2; justify-self: center; max-width: 340px; }

  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-tile-photo { grid-row: auto; grid-column: span 2; min-height: 260px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-media { order: -1; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #0f1c40;
    border-bottom: 1px solid var(--surface-line);
    padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
    gap: 1.1rem;
    display: none;
  }
  .site-nav.open { display: flex; }

  /* Unterseiten ohne Menü-Button: Nav bleibt sichtbar */
  .site-nav.always {
    display: flex;
    position: static;
    flex-direction: row;
    background: none;
    border: 0;
    padding: 0;
  }
  .site-nav > a:not(.btn) { font-size: 1.1rem; }
  .btn-nav { justify-content: center; }

  .video-grid { grid-template-columns: 1fr; }
  .video-card-short { grid-column: auto; justify-self: stretch; max-width: none; }
  .thumb.thumb-portrait { aspect-ratio: 16 / 9; }
  .thumb.thumb-portrait img { object-position: center 30%; }

  .topic-grid { grid-template-columns: 1fr; }
  .topic-tile-photo { grid-column: auto; }

  .post-card { grid-template-columns: 1fr; }
  .post-card .post-thumb { max-width: none; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}
