/* =============================================
   DATENSCHUTZ PAGE — Premium Legal Document
   Transforms the privacy policy from a wall of
   identical cards into an elegant, navigable
   document with clear hierarchy and personality.
   ============================================= */


/* ─── 0. SCROLL PROGRESS BAR ─── */

.dz-progress {
  position: fixed;
  top: var(--header-offset, 90px);
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-700, #0a4660), rgba(184, 138, 76, 0.8));
  z-index: 999;
  pointer-events: none;
  transition: width 60ms linear;
  border-radius: 0 2px 2px 0;
}

.dz-progress::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(184, 138, 76, 0.4));
  filter: blur(3px);
}


/* ─── 1. HERO ─── */

.dz-hero {
  position: relative;
  padding: 108px 0 68px;
  overflow: hidden;
}

.dz-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 350px at 15% 90%, rgba(184, 138, 76, 0.08), transparent),
    radial-gradient(500px 250px at 85% 30%, rgba(136, 206, 217, 0.06), transparent);
  pointer-events: none;
}

.dz-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 5%,
    rgba(184, 138, 76, 0.2) 30%,
    rgba(27, 109, 132, 0.18) 70%,
    transparent 95%);
}

.dz-hero-inner {
  position: relative;
  max-width: 640px;
}

.dz-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(21, 39, 52, 0.5);
  margin: 0 0 18px;
}

.dz-hero-kicker::before {
  content: '';
  width: 42px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(184, 138, 76, 0.88), rgba(27, 109, 132, 0.3));
}

.dz-hero h1 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin: 0 0 20px;
  color: var(--text);
}

.dz-hero-sub {
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 520px;
}

.dz-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dz-hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(21, 39, 52, 0.5);
  font-weight: 500;
}

.dz-hero-meta-item svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.dz-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(21, 39, 52, 0.2);
  flex-shrink: 0;
}


/* ─── 2. CONTENT LAYOUT ─── */

.dz-content {
  padding: 56px 0 78px;
}

.dz-layout {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}

.dz-main {
  max-width: 780px;
}


/* ─── 3. TABLE OF CONTENTS — Sticky sidebar ─── */

.dz-toc {
  position: sticky;
  top: calc(var(--header-offset, 90px) + 28px);
  align-self: start;
}

.dz-toc-inner {
  padding: 24px 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(249, 243, 233, 0.90));
  border: 1px solid rgba(21, 39, 52, 0.06);
  box-shadow: 0 8px 24px rgba(11, 28, 39, 0.04);
}

.dz-toc-title {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(21, 39, 52, 0.4);
  margin: 0 0 16px;
  padding: 0 10px;
}

.dz-toc nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dz-toc-link {
  display: block;
  padding: 8px 10px 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  text-decoration: none !important;
  transition:
    color 200ms ease,
    background 200ms ease,
    border-color 200ms ease;
  border-left: 2px solid transparent;
  font-weight: 500;
}

.dz-toc-link:hover {
  color: var(--text);
  background: rgba(184, 138, 76, 0.05);
}

.dz-toc-link.active {
  color: var(--brand-800);
  background: rgba(27, 109, 132, 0.05);
  border-left-color: var(--brand-700);
  font-weight: 600;
}


/* ─── 4. SECTIONS ─── */

.dz-section {
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid rgba(21, 39, 52, 0.06);
  position: relative;
  scroll-margin-top: calc(var(--header-offset, 90px) + 24px);
}

.dz-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.dz-section-header {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 28px;
}

.dz-section-num {
  font-family: "Newsreader", Georgia, serif;
  font-size: 52px;
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(180deg, rgba(27, 109, 132, 0.14), rgba(184, 138, 76, 0.08));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  user-select: none;
}

.dz-section h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}

.dz-section h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(21, 39, 52, 0.05);
  color: var(--text);
  line-height: 1.35;
}

.dz-section h3:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.dz-section p {
  margin: 0 0 14px;
  color: rgba(21, 39, 52, 0.76);
  line-height: 1.72;
  font-size: 15px;
}

.dz-section p:last-child {
  margin-bottom: 0;
}

.dz-section p + p {
  margin-top: 0;
}

.dz-section strong {
  color: var(--text);
  font-weight: 600;
}

.dz-section .bullets {
  margin: 14px 0;
  padding-left: 22px;
  color: rgba(21, 39, 52, 0.76);
}

.dz-section .bullets li {
  margin: 8px 0;
  line-height: 1.7;
  font-size: 15px;
}

.dz-section a {
  color: var(--brand-700);
}


/* ─── 4b. COMPACT SECTION VARIANT (short sections like Hosting) ─── */

.dz-section--compact {
  background: linear-gradient(135deg, rgba(249, 245, 239, 0.95), rgba(255, 252, 247, 0.8));
  border: 1px solid rgba(21, 39, 52, 0.05);
  border-radius: 18px;
  padding: 36px 32px 32px;
  margin-bottom: 48px;
  border-bottom: none;
  box-shadow: 0 2px 12px rgba(11, 28, 39, 0.025);
}

.dz-section--compact .dz-section-header {
  margin-bottom: 18px;
}

.dz-section--compact .dz-contact-card {
  background: rgba(255, 255, 255, 0.7);
}


/* ─── 5. HIGHLIGHTED SECTION (Analytics) ─── */

.dz-section--highlight {
  background: linear-gradient(180deg, rgba(27, 109, 132, 0.035), rgba(184, 138, 76, 0.02));
  margin-left: -32px;
  margin-right: -32px;
  padding-left: 32px;
  padding-right: 32px;
  padding-top: 40px;
  border-radius: 20px;
  border-bottom: none;
}


/* ─── 6. CONTACT CARD (inside section 3) ─── */

.dz-contact-card {
  margin: 16px 0 20px;
  padding: 20px 24px;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.95), rgba(249, 243, 233, 0.85));
  border: 1px solid rgba(21, 39, 52, 0.06);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(11, 28, 39, 0.03);
}

.dz-contact-card p {
  margin: 0;
}

.dz-contact-card a {
  color: var(--brand-700);
}


/* ─── 7. NOTICE BOX ─── */

.dz-notice {
  margin-top: 56px;
  padding: 24px 28px;
  background: rgba(255, 166, 0, 0.05);
  border: 1px solid rgba(255, 166, 0, 0.12);
  border-radius: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.dz-notice-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: rgba(255, 140, 0, 0.75);
}

.dz-notice-text {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(21, 39, 52, 0.68);
  margin: 0;
}

.dz-notice-text strong {
  color: rgba(255, 140, 0, 0.85);
}


/* ─── 8. FOOTER AREA ─── */

.dz-footer-actions {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.dz-date {
  font-size: 12.5px;
  color: rgba(21, 39, 52, 0.4);
  margin: 0;
}


/* ─── 9. SCROLL-REVEAL ANIMATION ─── */

.dz-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dz-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Alternate reveal from right for even sections */
.dz-reveal:nth-child(even) {
  transform: translateY(24px) translateX(10px);
}
.dz-reveal:nth-child(even).is-visible {
  transform: translateY(0) translateX(0);
}

/* Stagger child reveals */
.dz-reveal:nth-child(2) { transition-delay: 60ms; }
.dz-reveal:nth-child(3) { transition-delay: 120ms; }
.dz-reveal:nth-child(4) { transition-delay: 180ms; }
.dz-reveal:nth-child(5) { transition-delay: 100ms; }
.dz-reveal:nth-child(6) { transition-delay: 140ms; }


/* ─── 9b. HERO ENTRANCE CHOREOGRAPHY ─── */

.dz-hero-inner .dz-hero-kicker,
.dz-hero-inner h1,
.dz-hero-inner .dz-hero-sub,
.dz-hero-inner .dz-hero-meta {
  opacity: 0;
  transform: translateY(18px);
  animation: dzHeroIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.dz-hero-inner .dz-hero-kicker { animation-delay: 0.1s; }
.dz-hero-inner h1             { animation-delay: 0.22s; }
.dz-hero-inner .dz-hero-sub   { animation-delay: 0.36s; }
.dz-hero-inner .dz-hero-meta  { animation-delay: 0.5s; }

@keyframes dzHeroIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ─── 10. MOBILE TOC ─── */

.dz-toc-toggle {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  align-items: center;
  justify-content: space-between;
}

.dz-toc-toggle svg {
  transition: transform 200ms ease;
  flex-shrink: 0;
}

.dz-toc-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}


/* ─── 11. RESPONSIVE ─── */

/* Tablet: TOC becomes horizontal sticky bar */
@media (max-width: 1023px) {
  .dz-hero {
    padding: 88px 0 52px;
  }

  .dz-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .dz-toc {
    position: sticky;
    top: var(--header-offset, 90px);
    z-index: 50;
    margin: 0 calc(-1 * var(--pad));
    padding: 0 var(--pad);
    background: rgba(249, 245, 239, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(21, 39, 52, 0.06);
  }

  .dz-toc-inner {
    padding: 12px 0;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .dz-toc-title {
    display: none;
  }

  .dz-toc nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px 2px;
  }

  .dz-toc nav::-webkit-scrollbar {
    display: none;
  }

  .dz-toc-link {
    white-space: nowrap;
    padding: 7px 14px;
    font-size: 12.5px;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
  }

  .dz-toc-link.active {
    border-left: none;
    border-bottom-color: var(--brand-700);
    border-radius: 8px 8px 0 0;
  }

  .dz-section--highlight {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .dz-section--compact {
    margin-left: 0;
    margin-right: 0;
  }

  .dz-section {
    scroll-margin-top: calc(var(--header-offset, 90px) + 56px);
  }

  .dz-main {
    padding-top: 12px;
  }
}

/* Mobile: Compact layout */
@media (max-width: 767px) {
  .dz-hero {
    padding: 68px 0 40px;
  }

  .dz-hero h1 {
    font-size: clamp(30px, 8vw, 38px);
  }

  .dz-hero-sub {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .dz-hero-meta {
    gap: 10px;
  }

  .dz-hero-meta-item {
    font-size: 12px;
  }

  .dz-content {
    padding: 40px 0 56px;
  }

  .dz-section {
    padding-bottom: 36px;
    margin-bottom: 36px;
    /* On mobile, TOC is collapsible — only header offset + small gap */
    scroll-margin-top: calc(var(--header-offset, 76px) + 60px);
  }

  .dz-section-header {
    flex-direction: column;
    gap: 2px;
    margin-bottom: 22px;
  }

  .dz-section-num {
    font-size: 38px;
  }

  .dz-section h2 {
    font-size: 21px;
  }

  .dz-section h3 {
    margin-top: 24px;
    padding-top: 16px;
  }

  .dz-section p {
    font-size: 14.5px;
  }

  .dz-section .bullets li {
    font-size: 14.5px;
  }

  .dz-section--compact {
    padding: 24px 18px 22px;
    margin-left: 0;
    margin-right: 0;
    border-radius: 14px;
  }

  .dz-section--highlight {
    margin-left: calc(-1 * var(--pad, 18px));
    margin-right: calc(-1 * var(--pad, 18px));
    padding-left: var(--pad, 18px);
    padding-right: var(--pad, 18px);
    border-radius: 14px;
  }

  .dz-contact-card {
    padding: 16px 18px;
  }

  .dz-notice {
    padding: 18px 20px;
    flex-direction: column;
    gap: 10px;
  }

  .dz-footer-actions {
    margin-top: 44px;
  }

  /* Prevent horizontal overflow from reveal animations */
  .dz-main {
    overflow-x: hidden;
  }

  /* Reduce lateral reveal distance on mobile */
  .dz-reveal:nth-child(even) {
    transform: translateY(24px) translateX(0);
  }

  /* Mobile TOC as collapsible */
  .dz-toc-toggle {
    display: flex;
  }

  .dz-toc nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
    flex-direction: column;
    padding-bottom: 0;
  }

  .dz-toc nav.is-open {
    max-height: 400px;
    padding-bottom: 8px;
  }

  .dz-toc-link {
    white-space: normal;
    border-bottom: none;
    border-left: 2px solid transparent;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .dz-toc-link.active {
    border-left-color: var(--brand-700);
    border-bottom: none;
  }
}

@media (max-width: 420px) {
  .dz-section-num {
    font-size: 32px;
  }

  .dz-hero h1 {
    font-size: 28px;
  }
}


/* ─── 12. REDUCED MOTION ─── */

@media (prefers-reduced-motion: reduce) {
  .dz-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .dz-hero-inner .dz-hero-kicker,
  .dz-hero-inner h1,
  .dz-hero-inner .dz-hero-sub,
  .dz-hero-inner .dz-hero-meta {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .dz-toc-link,
  .dz-toc-toggle svg {
    transition: none;
  }

  .dz-progress {
    display: none;
  }
}
