/* ═══════════════════════════════════════════════════════
   DESIGN TRANSFORMATION LAYER
   Structural redesign · Signature identity · Scroll narrative
   ═══════════════════════════════════════════════════════ */


/* ─── 1. SIGNATURE IDENTITY: GOLD GRADIENT ACCENT ─── */
/* The defining visual motif of this site — a warm gold-to-teal
   gradient that appears as heading accents, timeline connector,
   section markers, and hero slash. "Die Seite mit dem Goldstrich." */

/* Heading underline signature on all section h2s */
.page-home .section-head h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin-top: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--home-gold), var(--home-teal));
  opacity: 0.72;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.22, 0.68, 0.28, 1);
}

/* Reveal the accent line when heading enters viewport */
.page-home .section-head.is-visible h2::after,
.page-home .is-visible .section-head h2::after,
.page-home .section-head[data-sig-visible] h2::after {
  transform: scaleX(1);
}

/* CTA box heading accent */
.page-home .cta-editorial-head h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(196, 148, 74, 0.8), rgba(136, 206, 217, 0.6));
  opacity: 0.7;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.22, 0.68, 0.28, 1);
}

.page-home .cta-box.is-visible .cta-editorial-head h2::after {
  transform: scaleX(1);
}


/* ─── 2. HERO TRANSFORMATION ─── */

/* Large "90" watermark behind hero content — reinforces the sprint concept */
.page-home .hero-watermark {
  position: absolute;
  right: -2%;
  bottom: -8%;
  font-size: clamp(260px, 28vw, 420px);
  font-weight: 900;
  font-family: "Newsreader", Georgia, serif;
  letter-spacing: -0.06em;
  line-height: 0.82;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.07);
  z-index: 0;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  animation: watermark-fade 1.8s cubic-bezier(0.22, 0.68, 0.28, 1) 0.9s forwards;
}

@keyframes watermark-fade {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Diagonal signature slash in hero — the identity cut */
.page-home .hero-sig {
  position: absolute;
  top: 6%;
  left: 46%;
  width: 2px;
  height: 82%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(196, 148, 74, 0.28) 12%,
    rgba(136, 206, 217, 0.18) 88%,
    transparent 100%);
  transform: rotate(-16deg);
  transform-origin: top center;
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
  clip-path: inset(100% 0 0 0);
  animation: slash-draw 1.3s cubic-bezier(0.22, 0.68, 0.28, 1) 0.5s forwards;
}

@keyframes slash-draw {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0% 0 0 0); }
}

/* Animated underline on hero <em> */
.page-home .hero-title-main em {
  position: relative;
  font-style: normal;
}

.page-home .hero-title-main em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--home-gold), var(--home-cyan));
  opacity: 0.6;
  transform: scaleX(0);
  transform-origin: left;
  animation: em-underline 0.9s cubic-bezier(0.22, 0.68, 0.28, 1) 1.1s forwards;
}

@keyframes em-underline {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}


/* ─── 2b. HERO LAYOUT RESTRUCTURE ─── */
/* From balanced 50/50 grid to headline-dominant asymmetric layout.
   The h1 breaks out of its column to create visual tension.
   Hero-ledger transforms from bordered grid to floating data bar. */

@media (min-width: 981px) {
  /* Asymmetric grid — hero-copy dominates the visual field */
  .page-home .hero-grid {
    grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.68fr);
    gap: clamp(20px, 2.8vw, 36px);
  }

  /* Display-scale h1 — the headline IS the hero */
  .page-home .hero h1 {
    max-width: none;
    font-size: clamp(60px, 7.6vw, 112px);
  }

  /* Title breaks right column boundary — deliberate asymmetric tension */
  .page-home .hero-title-main {
    margin-right: -28%;
    position: relative;
    z-index: 2;
  }

  /* Hero-ledger: from equal 4-column bordered grid to asymmetric data strip */
  .page-home .hero-ledger {
    grid-template-columns: 0.8fr 1.1fr 1fr 1.1fr;
    gap: 0;
    padding: 20px 0 0;
    margin-top: 36px;
    border-top: 2px solid rgba(255, 255, 255, 0.06);
  }

  .page-home .hero-ledger-item {
    padding: 10px 24px 10px 0;
  }

  /* Highlight item: elevated with gold left border */
  .page-home .hero-ledger-item-highlight {
    padding-left: 20px;
    margin-left: 6px;
    border-right: 0;
    border-left: 2px solid rgba(196, 148, 74, 0.36);
    background: linear-gradient(90deg, rgba(196, 148, 74, 0.04), transparent 60%);
    border-radius: 2px 0 0 2px;
  }
}


/* ─── 3. PROCESS TIMELINE TRANSFORMATION ─── */
/* From 2×2 glass card grid to vertical connected timeline on desktop.
   Steps flow downward along a gold connecting line, creating
   a visual journey from Woche 0 → Woche 12.
   Must fully override the 2×2 grid from home-redesign.css. */

@media (min-width: 981px) {
  .page-home .timeline-shell {
    position: relative;
  }

  .page-home .timeline.timeline-compact {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    max-width: 740px;
    margin: 36px auto 0;
    padding-left: 60px;
    /* Reset the glass card from home-redesign */
    border-radius: 0;
    border: none;
    background: none;
    box-shadow: none;
    overflow: visible;
  }

  /* Replace the grid pattern overlay with the timeline gold line */
  .page-home .timeline.timeline-compact::before {
    content: "";
    /* Reset inherited positioning first */
    inset: auto;
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg,
      var(--home-gold) 0%,
      var(--home-teal) 45%,
      var(--home-gold) 100%);
    background-size: auto;
    border-radius: 999px;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transform: scaleY(0);
    transform-origin: top;
    transition: opacity 0.5s ease, transform 1.2s cubic-bezier(0.22, 0.68, 0.28, 1);
  }

  /* Remove the top gradient border from home-redesign */
  .page-home .timeline.timeline-compact::after {
    display: none;
  }

  /* Draw the line when the timeline becomes visible */
  .page-home .is-visible .timeline.timeline-compact::before,
  .page-home .timeline.timeline-compact.tl-drawn::before {
    opacity: 0.38;
    transform: scaleY(1);
  }

  /* Reset step borders from the 2×2 grid layout */
  .page-home .step:nth-child(odd) {
    border-right: none;
    margin-right: 0;
  }

  .page-home .step:nth-child(even) {
    margin-left: 0;
  }

  .page-home .step:nth-child(-n + 2) {
    border-bottom: none;
  }

  /* Timeline node dots */
  .page-home .timeline.timeline-compact .step {
    position: relative;
    margin-bottom: 22px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: visible;
    min-height: auto;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
      radial-gradient(circle at 80% 20%, rgba(136, 206, 217, 0.06), transparent 40%),
      rgba(10, 36, 49, 0.8);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 12px 32px rgba(4, 18, 27, 0.12);
    backdrop-filter: blur(12px);
    transition:
      transform 0.32s cubic-bezier(0.22, 0.68, 0.28, 1),
      box-shadow 0.32s cubic-bezier(0.22, 0.68, 0.28, 1),
      border-color 0.32s ease,
      background 0.32s ease;
  }

  .page-home .timeline.timeline-compact .step:hover {
    transform: translateX(4px);
    border-color: rgba(196, 148, 74, 0.24);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
      radial-gradient(circle at 80% 20%, rgba(136, 206, 217, 0.08), transparent 40%),
      rgba(10, 36, 49, 0.85);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 18px 44px rgba(4, 18, 27, 0.16);
  }

  /* Gold dot on timeline line — re-enable ::before */
  .page-home .timeline.timeline-compact .step::before {
    display: block;
    content: "";
    /* Reset inherited positioning first */
    inset: auto;
    position: absolute;
    left: -48px;
    top: 26px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--home-gold), var(--home-teal));
    border: 3px solid rgba(10, 36, 49, 0.92);
    box-shadow:
      0 0 0 5px rgba(196, 148, 74, 0.1),
      0 4px 12px rgba(10, 25, 34, 0.1);
    z-index: 2;
    transition: box-shadow 0.32s ease, transform 0.32s ease;
    pointer-events: none;
    opacity: 1;
    height: 12px;
  }

  .page-home .timeline.timeline-compact .step:hover::before {
    box-shadow:
      0 0 0 8px rgba(196, 148, 74, 0.16),
      0 4px 16px rgba(10, 25, 34, 0.14);
    transform: scale(1.2);
  }

  /* Connecting arm from dot to card */
  .page-home .timeline.timeline-compact .step::after {
    content: "";
    /* Reset inherited positioning first */
    inset: auto;
    position: absolute;
    left: -36px;
    top: 31px;
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, rgba(196, 148, 74, 0.22), rgba(196, 148, 74, 0.06));
    z-index: 1;
    border-radius: 0;
    pointer-events: none;
    opacity: 1;
  }

  .page-home .timeline.timeline-compact .step:hover::after {
    opacity: 1;
  }

  .page-home .timeline.timeline-compact .step:last-child {
    margin-bottom: 0;
  }

  /* Highlight step: stronger node */
  .page-home .timeline.timeline-compact .step-highlight::before {
    width: 14px;
    height: 14px;
    left: -49px;
    top: 25px;
    box-shadow:
      0 0 0 6px rgba(196, 148, 74, 0.14),
      0 0 18px rgba(196, 148, 74, 0.12),
      0 4px 12px rgba(10, 25, 34, 0.1);
  }

  /* Dark step: adjusted for vertical layout */
  .page-home .timeline.timeline-compact .step-dark::before {
    border-color: rgba(10, 36, 49, 0.95);
  }
}


/* ─── 4. CTA FINAL TRANSFORMATION ─── */
/* From centered gradient banner to asymmetric editorial layout
   with floating decorative elements and visual depth. */

.page-home .cta-final {
  overflow: hidden;
  position: relative;
}

/* Decorative gold glow accent */
.page-home .cta-bg-accent {
  position: absolute;
  top: -16%;
  right: -6%;
  width: clamp(280px, 36vw, 480px);
  height: clamp(280px, 36vw, 480px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 148, 74, 0.1), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

/* Second accent: teal bottom-left */
.page-home .cta-bg-accent-2 {
  position: absolute;
  bottom: -20%;
  left: -8%;
  width: clamp(200px, 28vw, 380px);
  height: clamp(200px, 28vw, 380px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(136, 206, 217, 0.06), transparent 58%);
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 981px) {
  /* CTA-shell: stacked → side-by-side editorial + action card */
  .page-home .cta-shell {
    grid-template-columns: minmax(0, 1.06fr) minmax(340px, 0.94fr);
    align-items: start;
  }

  /* CTA-box: 2-column internal grid → single editorial column */
  .page-home .cta-box {
    grid-template-columns: 1fr;
    gap: 22px;
    text-align: left;
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0;
    padding-right: 32px;
  }

  .page-home .cta-box h2 {
    text-align: left;
    max-width: none;
  }

  .page-home .cta-box p {
    text-align: left;
  }

  /* Sidecard: stacks internally for the narrower column */
  .page-home .cta-sidecard {
    grid-template-columns: 1fr;
    margin-top: -12px;
    align-self: start;
  }

  .page-home .cta-sidecard-head {
    padding-bottom: 4px;
  }
}


/* ─── 5. GUARANTEE SECTION ENHANCEMENT ─── */
/* Visual gold accent on the success tier to create visual hierarchy,
   making the "Top-3 reached" outcome visually dominant. */

.page-home .guarantee-lane-success {
  position: relative;
  overflow: visible;
}

/* Gold left-edge marker on success tier */
.page-home .guarantee-lane-success::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, var(--home-gold), var(--home-teal));
  opacity: 0.62;
}

/* Subtle scale hierarchy between guarantee tiers */
@media (min-width: 981px) {
  .page-home .guarantee-lane-success {
    transform: scale(1.015);
    z-index: 2;
    box-shadow: 0 18px 48px rgba(10, 25, 34, 0.1);
  }

  .page-home .guarantee-lane-partial {
    z-index: 1;
  }

  .page-home .guarantee-lane-full {
    transform: scale(0.985);
    opacity: 0.92;
  }
}


/* ─── 6. SCROLL-DRIVEN COUNTER ANIMATION ─── */

[data-counter] {
  font-variant-numeric: tabular-nums;
  display: inline-block;
}


/* ─── 7. FAQ HOVER ENHANCEMENT ─── */

.page-home .faq-item {
  transition:
    background 0.26s ease,
    border-color 0.26s ease,
    transform 0.26s cubic-bezier(0.22, 0.68, 0.28, 1),
    box-shadow 0.26s ease;
}

.page-home .faq-item:hover {
  transform: translateX(3px);
  box-shadow: -3px 0 0 0 rgba(196, 148, 74, 0.4);
}

.page-home .faq-item[open]:hover {
  transform: translateX(3px);
  box-shadow: -3px 0 0 0 rgba(27, 109, 132, 0.4);
}


/* ─── 8. SECTION SIGNATURE DIVIDER ─── */
/* A subtle diagonal gold/teal slash between sections,
   reinforcing the signature motif throughout the scroll. */

.page-home .sig-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: 72px;
  position: relative;
  overflow: visible;
  pointer-events: none;
}

.page-home .sig-divider::before {
  content: "";
  width: 2px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg,
    transparent,
    rgba(196, 148, 74, 0.36) 25%,
    rgba(136, 206, 217, 0.24) 75%,
    transparent);
  transform: rotate(-12deg);
}


/* ─── 9. HERO LEDGER SIGNATURE TREATMENT ─── */

.page-home .hero-ledger-item-highlight {
  position: relative;
}

/* Mobile/tablet only — on desktop the structural border-left from 2b takes over */
@media (max-width: 981px) {
  .page-home .hero-ledger-item-highlight::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18%;
    bottom: 18%;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--home-gold), var(--home-teal));
    opacity: 0.52;
  }
}


/* ─── 10. OFFER CARDS — STAGGERED REVEAL ─── */

.page-home .cards-offer .card {
  transition:
    opacity 0.5s cubic-bezier(0.22, 0.68, 0.28, 1),
    transform 0.5s cubic-bezier(0.22, 0.68, 0.28, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.page-home .is-visible .cards-offer .card:nth-child(1) { transition-delay: 0ms; }
.page-home .is-visible .cards-offer .card:nth-child(2) { transition-delay: 100ms; }
.page-home .is-visible .cards-offer .card:nth-child(3) { transition-delay: 200ms; }


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

@media (max-width: 981px) {
  .page-home .hero-watermark {
    font-size: clamp(180px, 42vw, 280px);
    right: -5%;
    bottom: -4%;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.06);
  }

  .page-home .hero-sig {
    left: 82%;
    height: 58%;
    top: 16%;
  }

  .page-home .section-head h2::after {
    width: 44px;
    margin-top: 16px;
  }

  .page-home .sig-divider {
    height: 56px;
  }

  .page-home .sig-divider::before {
    height: 36px;
  }

  .page-home .cta-editorial-head h2::after {
    width: 40px;
    margin-top: 14px;
  }

  /* Guarantee: no scale transform on tablet/mobile */
  .page-home .guarantee-lane-success {
    transform: none;
    overflow: hidden;
  }
  .page-home .guarantee-lane-full {
    transform: none;
    opacity: 1;
  }

  /* CTA: revert desktop side-by-side border back to bottom separator */
  .page-home .cta-box {
    border-right: 0;
    padding-right: 0;
  }

  /* FAQ: disable full-item shift on touch devices — too much combined movement */
  .page-home .faq-item:hover {
    transform: none;
    box-shadow: none;
  }
  .page-home .faq-item[open]:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 600px) {
  .page-home .hero-watermark {
    font-size: clamp(140px, 36vw, 200px);
    -webkit-text-stroke: 0.8px rgba(255, 255, 255, 0.055);
    right: -4%;
    bottom: -2%;
  }

  .page-home .hero-sig {
    display: none;
  }

  .page-home .section-head h2::after {
    width: 36px;
    margin-top: 14px;
  }

  /* Em underline: tighter on mobile where em is display:block full-width */
  .page-home .hero-title-main em::after {
    max-width: 120px;
  }

  /* Sig-divider: slightly smaller on phones */
  .page-home .sig-divider {
    height: 48px;
  }

  .page-home .sig-divider::before {
    height: 30px;
  }

  /* Gold accent bar: thinner on cramped mobile */
  .page-home .guarantee-lane-success::before {
    width: 3px;
    opacity: 0.5;
  }
}

@media (max-width: 420px) {
  .page-home .hero-watermark {
    font-size: clamp(120px, 32vw, 160px);
    right: -3%;
    bottom: -1%;
  }

  /* Sig-divider: compact on very small screens */
  .page-home .sig-divider {
    height: 40px;
  }

  .page-home .sig-divider::before {
    height: 24px;
  }

  .page-home .hero-title-main em::after {
    max-width: 80px;
  }
}


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

@media (prefers-reduced-motion: reduce) {
  .page-home .hero-watermark {
    animation: none;
    opacity: 1;
  }

  .page-home .hero-sig {
    animation: none;
    clip-path: none;
  }

  .page-home .hero-title-main em::after {
    animation: none;
    transform: scaleX(1);
  }

  .page-home .section-head h2::after,
  .page-home .cta-editorial-head h2::after {
    transform: scaleX(1);
    transition: none;
  }

  .page-home .faq-item:hover {
    transform: none;
    box-shadow: none;
  }

  .page-home .timeline.timeline-compact::before {
    opacity: 0.38;
    transform: scaleY(1);
  }
}


/* ─── 13. PRINT ─── */

@media print {
  .page-home .hero-watermark,
  .page-home .hero-sig,
  .page-home .cta-bg-accent,
  .page-home .cta-bg-accent-2,
  .page-home .sig-divider {
    display: none !important;
  }
}
