/* Draco Labs Germany — Palette 1:1 aus dem Shop-Theme
   (draco-labs/shop/design/theme/assets/base.css). Website und Shop sollen wie
   ein Auftritt aussehen; der Shop ist der Kanon, hier wird nachgezogen.

   Der Kern des Unterschieds war nicht der Farbton, sondern die TIEFE: der Shop
   hat einen dunklen Grund (#171B20) und ZWEI hellere Ebenen darüber (--surface
   für Karten, --surface2 für Verläufe). Erst dadurch heben sich Karten ab und
   Cyan/Rot leuchten. Die Website hatte nur eine Ebene, dicht am Hintergrund —
   deshalb wirkte alles flach. */
:root {
  --bg: #171B20; --surface: #212932; --panel: #2B343D; --line: #39434d;
  --ink: #E9ECEF; --muted: #9AA3AB; --cyan: #2FB4CC; --red: #E23B33;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.6 system-ui, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Sprungziele der Kopf-Navi: der sticky Header (68px) wuerde sonst den
   Abschnittsanfang verdecken und z. B. #leistungen wie #ratgeber aussehen lassen. */
[id] { scroll-margin-top: 88px; }

/* Kopf */
header.site {
  border-bottom: 1px solid var(--line);
  background: rgba(23, 27, 32, .94); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
/* Typografie des Kopfes 1:1 aus dem Shop-Theme (header.shop/.brand/nav.main),
   sonst wirkt die Navi trotz gleicher Schriftfamilie „anders" als im Shop. */
header.site .wrap {
  display: flex; align-items: center; gap: 12px; height: 68px; padding: 0 24px;
}
header.site img { height: 44px; width: 44px; object-fit: contain; }
header.site .name {
  font-weight: 800; font-size: 1.02rem; letter-spacing: .10em; text-transform: uppercase;
}
header.site .name small {
  display: block; font-size: .58rem; font-weight: 600; letter-spacing: .34em; color: var(--muted);
}
header.site nav { margin-left: auto; display: flex; gap: 22px; font-size: .9rem; }
header.site nav a { color: var(--ink); font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
header.site nav a:hover { border-bottom-color: var(--cyan); text-decoration: none; }

/* Shop-Button — bleibt auf JEDER Breite sichtbar, auch wenn das Menü zuklappt.
   Er ist der einzige Weg von der Website in den Shop. */
.shop-btn {
  background: var(--cyan); color: #0d1418; font-weight: 700; font-size: 14px;
  padding: 9px 16px; border-radius: 4px; letter-spacing: .03em; white-space: nowrap;
}
.shop-btn:hover { filter: brightness(1.1); text-decoration: none; }

/* Burger — Zustand steckt in der Checkbox, kein JavaScript nötig. */
.menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.burger { display: none; cursor: pointer; padding: 8px; }
.burger span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .2s, opacity .2s;
}
.burger span + span { margin-top: 5px; }
.menu-toggle:focus-visible + .burger { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* Hero — Lichtkegel wie im Shop, statt flachem Grund */
.hero {
  text-align: center; padding: 72px 24px 64px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 420px at 50% 34%, #2B343D 0%, #171B20 70%);
}
.hero img { width: min(320px, 70vw); height: auto;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, .55)); }
.hero h1 {
  font-size: clamp(26px, 4.5vw, 40px); letter-spacing: .1em;
  text-transform: uppercase; margin-top: 18px; font-weight: 800;
}
.hero p.tagline { color: var(--muted); font-size: 18px; margin-top: 10px; }
.hero .accent { color: var(--cyan); }

/* Leistungen */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; padding: 8px 0 40px;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  border-top: 3px solid var(--cyan); padding: 24px 22px;
  transition: border-color .15s, transform .15s;
}
.card:nth-child(2) { border-top-color: var(--red); }
.card:hover { transform: translateY(-3px); border-color: #4a5560; }
.card:hover { border-top-color: var(--cyan); }
.card:nth-child(2):hover { border-top-color: var(--red); }
.card h2 { font-size: 18px; margin: 0 0 8px; letter-spacing: .04em; }
.card p { color: var(--muted); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

/* Abschnitte — Überschrift + Trennlinie wie die .sechead im Shop.
   Die Linie kommt aus ::after, damit das HTML unangetastet bleibt. */
section.block { padding: 56px 0; border-top: 1px solid var(--line); }
section.block h2 {
  display: flex; align-items: baseline; gap: 18px; margin-bottom: 24px;
  font-size: 1.45rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink);
}
section.block h2::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.contact-grid { display: flex; flex-wrap: wrap; gap: 28px; }
.contact-grid div { min-width: 220px; }
.contact-grid .label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }

/* Fuß */
footer.site {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 26px 0 34px; color: var(--muted); font-size: 14px;
}
footer.site .links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }

/* Social-Leiste — identisch zum Shop-Theme (shop/design/theme/assets/base.css).
   Monochrom, Markenfarbe erst beim Hover; Inline-SVG, damit keine Grafiken von
   Meta/ByteDance beim Seitenaufruf nachgeladen werden (Drittanbieter-Request). */
footer.site nav.social { display: flex; gap: 12px; margin-bottom: 22px; }
footer.site nav.social a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: #1b2127; border: 1px solid var(--line);
  transition: background .15s, border-color .15s, transform .15s;
}
footer.site nav.social svg { width: 19px; height: 19px; fill: var(--muted); transition: fill .15s; }
footer.site nav.social a:hover { transform: translateY(-2px); border-color: transparent; }
footer.site nav.social a:hover svg { fill: #fff; }
footer.site nav.social a.yt:hover { background: #ff0000; }
footer.site nav.social a.ig:hover { background: linear-gradient(45deg,#f9ce34,#ee2a7b,#6228d7); }
footer.site nav.social a.tt:hover { background: #000; }
@media (prefers-reduced-motion: reduce) { footer.site nav.social a:hover { transform: none; } }

/* ---- Mobil ----------------------------------------------------------------
   Bis hierher hatte die Seite KEINE einzige Media Query: die Navigation lief
   auf schmalen Displays schlicht über. Ab 760px klappt sie deshalb hinter den
   Burger; Logo und Shop-Button bleiben immer stehen. */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  /* height: auto — die feste Kopfhöhe der Desktop-Regel würde das aufgeklappte
     Burger-Menü abschneiden, das hier in eine zweite Zeile umbricht. */
  header.site .wrap { flex-wrap: wrap; gap: 10px; height: auto; padding: 10px 16px; }
  header.site img { height: 36px; width: 36px; }
  header.site .name { font-size: 14px; margin-right: auto; }
  .shop-btn { order: 2; padding: 8px 13px; }
  .burger { display: block; order: 3; }

  /* Zugeklappt = Höhe 0. max-height statt grid-template-rows: 0fr — letzteres
     definiert nur die ERSTE Zeile, die weiteren Links landen in impliziten
     Zeilen und blieben sichtbar (genau der Fehler beim ersten Versuch).
     Der max-height-Wert ist absichtlich großzügig; er begrenzt nur, er setzt
     keine Höhe. */
  header.site nav {
    order: 4; flex-basis: 100%; margin-left: 0;
    flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden;
    transition: max-height .25s ease;
  }
  .menu-toggle:checked ~ nav { max-height: 320px; }
  header.site nav a {
    padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 15px;
  }
  header.site nav a:last-child { border-bottom: 0; }

  /* Burger wird beim Öffnen zum Kreuz. */
  .menu-toggle:checked + .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle:checked + .burger span:nth-child(2) { opacity: 0; }
  .menu-toggle:checked + .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Der Hero lief rechts aus dem Bild: Sperrsatz (letter-spacing) plus clamp()
     ergaben auf 390px eine Zeile, die breiter war als der Bildschirm. */
  .hero { padding: 48px 16px 44px; }
  .hero h1 { font-size: 22px; letter-spacing: .04em; }
  .hero p.tagline { font-size: 16px; }
  .hero img { width: min(240px, 62vw); }
  section.block { padding: 40px 0; }
  section.block h2 { font-size: 1.2rem; letter-spacing: .04em; }
  .contact-grid { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  header.site nav, .burger span { transition: none; }
}

/* Rechtstexte & Ratgeber */
main.legal { padding: 48px 0; }
main.legal .wrap { max-width: 900px; }
main.legal h1 { font-size: 28px; margin-bottom: 18px; line-height: 1.25; }
main.legal h2 {
  font-size: 20px; margin: 56px 0 16px; padding-top: 22px;
  color: var(--cyan); border-top: 1px solid var(--line); line-height: 1.3;
}
main.legal h3 { font-size: 16px; margin: 34px 0 10px; color: var(--cyan); }
main.legal p { color: var(--ink); margin-bottom: 14px; }
main.legal ul, main.legal ol { margin: 0 0 16px; padding-left: 22px; }
main.legal li { color: var(--ink); margin-bottom: 6px; }
main.legal .muted { color: var(--muted); }

/* Tabellen in Ratgeber-Texten — klar abgesetzt, mit Rahmen */
main.legal table {
  width: 100%; border-collapse: collapse; margin: 28px 0;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; font-size: 15px;
}
main.legal thead, main.legal tr:first-child { }
main.legal th {
  background: rgba(47, 180, 204, .14); color: var(--cyan);
  text-align: left; font-weight: 700; letter-spacing: .02em;
  padding: 12px 16px; border-bottom: 2px solid var(--cyan);
}
main.legal td {
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line); color: var(--ink); vertical-align: top;
}
main.legal td:last-child { border-right: 0; }
main.legal tr:last-child td { border-bottom: 0; }
main.legal tbody tr:nth-child(even),
main.legal tr:nth-child(even) { background: rgba(255, 255, 255, .025); }

/* Tabellen auf dem Handy — der alte Word-Trick: die Spaltenköpfe stehen hochkant,
   dadurch dürfen die Spalten schmal werden. Der Fließtext in den Zellen wird
   kleiner, und falls es trotzdem nicht passt, scrollt die Tabelle für sich. */
@media (max-width: 760px) {
  main.legal table { display: block; overflow-x: auto; font-size: 13px; }
  main.legal td { padding: 8px 10px; }
  main.legal th {
    padding: 10px 6px; font-size: 12px; line-height: 1.25;
    writing-mode: vertical-rl; transform: rotate(180deg);
    white-space: nowrap; text-align: left; vertical-align: bottom;
  }
  main.legal th br { display: none; }
  main.legal th .muted { display: none; }
  /* Erste Spalte ist die Zeilenbeschriftung — die bleibt waagerecht lesbar. */
  main.legal th:first-child {
    writing-mode: horizontal-tb; transform: none;
    padding: 10px 12px; vertical-align: middle;
  }
}

/* ---- Baustelle: Der Weg zum eigenen Frame (Baulog, regelmäßig erweitert) -- */
.log { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.log-entry {
  display: grid; grid-template-columns: 280px 1fr; gap: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  border-left: 3px solid var(--cyan); padding: 20px;
}
.log-entry:nth-child(2) { border-left-color: var(--red); }
@media (max-width: 720px) { .log-entry { grid-template-columns: 1fr; } }
.log-meta { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.log-date { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.log-tag { color: var(--cyan); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.log-entry h3 { font-size: 17px; margin: 0 0 8px; }
.log-entry p { color: var(--muted); font-size: 15px; }
.log-media {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 6px;
  overflow: hidden; background: var(--panel);
}
.log-media img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .2s; }
a.log-media:hover img { transform: scale(1.03); }
.log-media .play {
  position: absolute; inset: 0; margin: auto; width: 52px; height: 52px;
  background: rgba(23, 27, 32, .72); border: 2px solid var(--cyan); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.log-media .play::after {
  content: ""; margin-left: 4px; width: 0; height: 0;
  border-top: 10px solid transparent; border-bottom: 10px solid transparent;
  border-left: 16px solid var(--cyan);
}

/* ---- Partner & Empfehlungen (Affiliate) ---------------------------------- */
.partner-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-top: 18px;
}
@media (max-width: 640px) { .partner-grid { grid-template-columns: 1fr; } }
.partner-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  border-left: 3px solid var(--cyan); padding: 16px 18px;
  transition: transform .2s, border-color .2s;
}
.partner-card:hover { transform: translateY(-3px); border-color: #4a5560; text-decoration: none; }
.partner-card img { flex: 0 0 auto; border-radius: 6px; background: #fff; padding: 4px; }
.partner-name { font-weight: 700; letter-spacing: .06em; color: var(--ink); }
.partner-desc { color: var(--muted); font-size: 14px; margin-top: 3px; }
.partner-coupon { margin-top: 10px; font-size: 14px; color: var(--ink); }
.partner-coupon code {
  display: inline-block; margin-left: 6px; padding: 2px 10px;
  font-weight: 800; letter-spacing: .04em; font-size: 15px;
  color: var(--cyan); background: rgba(47,180,204,.12);
  border: 1px solid var(--cyan); border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) { .partner-card:hover { transform: none; } }
