/* ============================================================================
   LEGAL PAGES
   • .legal-wrap   — simple layout (Impressum / AGB, backward compatible)
   • .legal-page   — premium layout (Datenschutz): hero, sticky TOC,
                     reading progress, primary section chips, inverted borders
   ============================================================================ */

/* ── Backward-compatible simple layout ── */
.legal-wrap { max-width: 860px; margin: 0 auto; padding: 160px 24px 100px; }
.legal-wrap h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: #fff; margin-bottom: 12px; }
.legal-updated { color: rgba(255,255,255,.4); font-size: 14px; margin-bottom: 40px; }
.legal-wrap h2 { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.02em; margin: 44px 0 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.legal-wrap h3 { font-size: 17px; font-weight: 600; color: #fff; margin: 28px 0 8px; }
.legal-wrap p, .legal-wrap li { font-size: 15px; line-height: 1.75; color: rgba(255,255,255,.7); }
.legal-wrap p { margin-bottom: 16px; }
.legal-wrap ul { margin: 0 0 16px; padding-left: 22px; }
.legal-wrap li { margin-bottom: 8px; }
.legal-wrap a { color: var(--primary); text-decoration: none; }
.legal-wrap a:hover { text-decoration: underline; }
.legal-wrap strong { color: #fff; font-weight: 600; }
.legal-fill { display: inline-block; background: rgba(249,77,53,.12); border: 1px dashed rgba(249,77,53,.55); color: #ffb3a8; padding: 1px 8px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.legal-note { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 18px 22px; margin-bottom: 44px; font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,.55); }
.legal-note strong { color: rgba(255,255,255,.85); }

/* ══════════════════════════════════════════════════════════════════════════
   PREMIUM LAYOUT (.legal-page)
   ══════════════════════════════════════════════════════════════════════════ */

/* reading progress */
.legal-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,.05); z-index: 1200; }
.legal-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #ff8158); box-shadow: 0 0 14px rgba(230,42,16,.7); transition: width .08s linear; }

.legal-page { max-width: 1180px; margin: 0 auto; padding: 196px 24px 110px; position: relative; }

/* soft ambient glow behind the whole page */
.legal-page::before { content: ""; position: absolute; top: 60px; left: 50%; transform: translateX(-50%); width: 900px; height: 500px; background: radial-gradient(circle at 50% 0%, rgba(230,42,16,.10), transparent 60%); pointer-events: none; z-index: 0; }

/* ══ ONE ROUNDED PANEL: hero + content share it (connected); black TOC nests inside ══ */
.legal-super {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-areas: "hero hero" "toc content";
  --block: #151515;
  /* TRANSPARENT = the gap shows the REAL page background, exactly like the bot's
     .hollow-cell. So the TOC region can never drift from the page colour — it IS the
     page (including the red glow from .legal-page::before). */
  background: transparent;
  /* NO outer border: it would frame the transparent gap too and break the
     "separate panels" look. Like the bot's panels, the grey areas define themselves. */
  border: none;
  border-radius: 32px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 40px 90px -30px rgba(0,0,0,.7);
}
/* PROMINENT primary inverted-border corner (top-left of the whole panel) */
.legal-super::before { content: ""; position: absolute; top: -1px; left: -1px; width: 185px; height: 185px; border-top-left-radius: 32px;
  border-top: 2px solid var(--primary); border-left: 2px solid var(--primary);
  -webkit-mask-image: linear-gradient(135deg, #000 3%, transparent 50%); mask-image: linear-gradient(135deg, #000 3%, transparent 50%);
  pointer-events: none; z-index: 4; }
/* balancing white inverted corner (bottom-right) */
.legal-super::after { content: ""; position: absolute; bottom: -1px; right: -1px; width: 130px; height: 130px; border-bottom-right-radius: 32px;
  border-bottom: 1.5px solid rgba(255,255,255,.28); border-right: 1.5px solid rgba(255,255,255,.28);
  -webkit-mask-image: linear-gradient(315deg, #000 6%, transparent 55%); mask-image: linear-gradient(315deg, #000 6%, transparent 55%);
  pointer-events: none; }

/* ── HERO — the top grey panel; 1:1 the bot's .bot-s-scraper
   (border-radius: 0 0 0 40px → bottom-left rounded, curving away from the black TOC) ── */
.legal-hero { grid-area: hero; position: relative; z-index: 1; padding: 54px 52px 30px;
  background: radial-gradient(70% 280px at 100% 0%, rgba(230,42,16,.14), transparent 55%), var(--block);
  border-radius: 31px 31px 0 40px; }
.legal-eyebrow { display: inline-flex; align-items: center; gap: 10px; position: relative; z-index: 2; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase; margin-bottom: 18px; }
.legal-eyebrow-line { width: 26px; height: 1px; background: var(--primary); display: inline-block; }
.legal-hero h1 { position: relative; z-index: 2; font-size: clamp(34px, 5.2vw, 56px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; color: #fff; margin: 0 0 22px; hyphens: auto; }
.legal-badges { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.legal-badge { font-size: 12px; font-weight: 700; padding: 7px 15px; border-radius: 100px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.72); backdrop-filter: blur(6px); }
.legal-badge--primary { background: rgba(230,42,16,.15); border-color: rgba(230,42,16,.45); color: #ffb3a8; box-shadow: 0 0 22px -8px rgba(230,42,16,.7); }
.legal-lead { position: relative; z-index: 2; max-width: 640px; font-size: 16px; line-height: 1.65; color: rgba(255,255,255,.55); margin: 0; }

/* ── TOC — the BLACK gap between the grey panels (like the dark gap between the bot's
   panels). No own corners: the surrounding grey panels do the rounding. ── */
.legal-toc { grid-area: toc; position: relative; align-self: stretch; background: transparent; }
.legal-toc-inner { position: sticky; top: 122px; z-index: 4; max-height: calc(100vh - 156px); overflow-y: auto; padding: 34px 26px 34px 34px; scrollbar-width: none; -ms-overflow-style: none; }
.legal-toc-inner::-webkit-scrollbar { width: 0; height: 0; display: none; }
.legal-toc-title { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.35); margin-bottom: 16px; }
.legal-toc-link { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; color: rgba(255,255,255,.48); font-size: 13px; line-height: 1.35; text-decoration: none; transition: color .2s ease, transform .2s ease; border: none; }
.legal-toc-link:hover { color: #fff; transform: translateX(2px); }
.legal-toc-num { color: rgba(255,255,255,.3); font-weight: 700; font-size: 11px; min-width: 17px; transition: color .2s ease; }
.legal-toc-link.is-active { color: #fff; font-weight: 600; }
.legal-toc-link.is-active .legal-toc-num { color: var(--primary); }

/* ── CONTENT — on the panel bg (seamlessly connected to the hero) ── */
/* ── CONTENT — the grey text panel; 1:1 the bot's .bot-s-outreach
   (top-left sharp to connect to the curve, bottom-left rounded) ── */
.legal-content { grid-area: content; position: relative; z-index: 1; min-width: 0; padding: 6px 52px 54px 22px;
  background: var(--block);
  border-radius: 0 0 31px 40px; }
/* 1:1 the bot's .bot-corner-left — extends the grey 40px left with a concave curve,
   forming the S together with the hero's bottom-left radius */
.legal-content::before { content: ""; position: absolute; left: -40px; top: 0; width: 40px; height: 40px; z-index: 3; pointer-events: none;
  background-image: radial-gradient(circle at bottom left, transparent 40px, var(--block) 40px); }
.legal-content h2 { position: relative; display: flex; align-items: center; gap: 15px; font-size: 25px; font-weight: 800; letter-spacing: -0.025em; color: #fff; margin: 60px 0 22px; padding-top: 24px; scroll-margin-top: 96px; border-top: 1px solid rgba(255,255,255,.07); }
.legal-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.legal-num { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 9px; border-radius: 13px; background: linear-gradient(160deg, rgba(230,42,16,.20), rgba(230,42,16,.08)); border: 1px solid rgba(230,42,16,.35); color: var(--primary); font-size: 17px; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 16px -6px rgba(230,42,16,.5); }
.legal-h2-text { flex: 1 1 auto; }

.legal-content h3 { font-size: 17.5px; font-weight: 700; color: #fff; margin: 34px 0 10px; padding-left: 15px; border-left: 2.5px solid var(--primary); line-height: 1.35; }
.legal-content h4 { font-size: 15.5px; font-weight: 700; color: rgba(255,255,255,.9); margin: 24px 0 8px; }

.legal-content p, .legal-content li { font-size: 15.5px; line-height: 1.8; color: rgba(255,255,255,.72); }
.legal-content p { margin-bottom: 16px; }
.legal-content ul, .legal-content ol { margin: 0 0 18px; padding-left: 22px; }
.legal-content li { margin-bottom: 8px; }
.legal-content li::marker { color: var(--primary); }
.legal-content a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(230,42,16,.35); transition: border-color .2s ease; }
.legal-content a:hover { border-bottom-color: var(--primary); }
.legal-content strong { color: #fff; font-weight: 700; }

/* responsive */
@media (max-width: 900px) {
  .legal-page { padding: 150px 20px 72px; }
  .legal-super { grid-template-columns: 1fr; grid-template-areas: "hero" "content"; border-radius: 24px; }
  .legal-toc { display: none; }
  .legal-hero { padding: 34px 24px 22px; }
  .legal-super::before { width: 100px; height: 100px; }
  .legal-content { padding: 6px 24px 42px; }
  .legal-content h2 { font-size: 22px; margin: 44px 0 18px; }
  .legal-num { min-width: 34px; height: 34px; font-size: 15px; border-radius: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .legal-toc-link, .legal-progress span { transition: none; }
}


/* ── Mobil: ein durchgehender Block ──────────────────────────────────────────
   Die inverted-border-Geometrie (Hero bottom-left 40px, .legal-content::before
   als konkave Woelbung bei left:-40px) existiert nur, um die schwarze TOC-Spalte
   auszusparen. Unter 900px ist die .legal-toc ausgeblendet und das Grid
   einspaltig — die Rundungen haengen dann sinnlos in der Luft und die Woelbung
   ragt sogar aus dem Panel heraus. Also: Hero + Content = ein Block. */
@media (max-width: 900px) {
  .legal-hero {
    border-radius: 24px 24px 0 0;
  }

  .legal-content {
    border-radius: 0 0 24px 24px;
  }

  /* die .bot-corner-left-Kopie ergibt ohne TOC-Spalte keinen Sinn */
  .legal-content::before {
    display: none;
  }

  /* weisser Eck-Akzent auf den Mobil-Radius (24px) statt 32px */
  .legal-super::after {
    width: 100px;
    height: 100px;
    border-bottom-right-radius: 24px;
  }
}
