/* =========================================================================
   Landing page — page-specific styling (neo-brutalism).
   Consumes tokens + primitives from main.css. NOTHING here redefines the
   core system; it only composes it for the home page.

   Sections: Hero mark · Leistungs-Stapel (SIGNATURE) · Vorher/Nachher ·
   Rezensionen · CTA.
   ========================================================================= */

/* ---- Hero: raw burn highlight on one word of the motto ------------------ *
 * The brand's loud highlight, deployed as a brutalist marker block (not as
 * coloured body text). DESIGN allows burn accents inside the hero headline. */
.hero__title { font-size: clamp(2.75rem, 9vw, 5.75rem); }
.hero__mark {
    background: var(--c-burn);
    color: var(--c-paper);
    padding: 0 .12em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* =========================================================================
   SIGNATURE — „Leistungs-Stapel" (stacked brutalist beams)
   -------------------------------------------------------------------------
   The page's one bold moment. Each service is a hard-bordered block (.block)
   with the core 6px offset shadow. To read as the logo's isometric stack of
   beams we add, per item: a BURN beam-end bar (the exposed cut end of a
   beam) and a horizontal stagger. The bar + stagger ALTERNATE side down the
   stack, so the burn ends zig-zag like alternating stacked timber.
   ========================================================================= */
.svc-stack {
    --beam-stagger: clamp(0.9rem, 3vw, 2rem);
    --beam-bar: clamp(0.7rem, 2vw, 1rem);
    max-width: 62rem;
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
    margin-inline: auto;
}

/* A beam: two-column body (label | detail) so it fills the long block. */
.svc {
    position: relative;
    display: grid;
    grid-template-columns: minmax(11rem, 19rem) 1fr;
    gap: .35rem clamp(1.25rem, 4vw, 2.5rem);
    align-items: start;
    padding: clamp(1.25rem, 3vw, 1.9rem) clamp(1.4rem, 4vw, 2.4rem);
    /* default: beam-end on the LEFT — clear it with extra inline-start padding */
    padding-inline-start: calc(var(--beam-bar) + clamp(1.1rem, 3vw, 1.9rem));
}
.svc::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--beam-bar);
    background: var(--c-burn);
}

/* Alternating beams: shifted right, beam-end flipped to the RIGHT edge. */
.svc-stack > .svc:nth-child(even) {
    margin-inline-start: var(--beam-stagger);
    padding-inline-start: clamp(1.4rem, 4vw, 2.4rem);
    padding-inline-end: calc(var(--beam-bar) + clamp(1.1rem, 3vw, 1.9rem));
}
.svc-stack > .svc:nth-child(even)::before {
    left: auto;
    right: 0;
}

.svc__title {
    margin: 0;
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    color: var(--c-navy);
}
.svc__text {
    margin: 0;
    color: var(--c-steel);
}

/* Each beam links to its Leistung detail page. A stretched link makes the whole
   beam clickable (the .svc is already position:relative for its beam-end bar);
   keep it to a single, accessible link per beam — the title. */
.svc__link { text-decoration: none; color: inherit; }
.svc__link::after { content: ""; position: absolute; inset: 0; }
.svc__link:hover { background: transparent; color: var(--c-burn); }

/* „Alle Leistungen ansehen" button under the stack. */
.svc-stack__more { margin: clamp(1.5rem, 4vw, 2.25rem) 0 0; text-align: center; }

/* Mobile: one beam wide, single-column body, no stagger (keep full width).
   Die Teaser-Beschreibung je Leistung entfällt – nur die (verlinkten) Titel
   bleiben, damit der Stapel kompakt und scanbar bleibt. */
@media (max-width: 640px) {
    .svc { grid-template-columns: 1fr; }
    .svc-stack > .svc:nth-child(even) { margin-inline-start: 0; }
    .svc__text { display: none; }
}

/* =========================================================================
   VORHER / NACHHER — brutalist frame, BURN handle bar
   -------------------------------------------------------------------------
   JS owns `before.style.width` and `handle.style.left` — we never set those.
   We restyle the handle into a full-height burn bar with a centred grip,
   overriding the base square knob (top/height/transform only).
   ========================================================================= */
.ba-grid { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); }
@media (min-width: 820px) { .ba-grid { grid-template-columns: 1fr 1fr; } }
.ba-grid .ba-slider { margin: 0; }

/* Reserve 4:3 space before the lazy images load → no layout shift (CLS). Matches the
   <img width="1200" height="900"> ratio; the base .ba-slider__frame keeps overflow:hidden. */
.ba-slider__frame { aspect-ratio: 4 / 3; }

/* Caption rendered as a blunt navy tag. */
.ba-slider__label {
    display: inline-block;
    margin-bottom: 1rem;
    padding: .4rem .85rem;
    background: var(--c-navy);
    color: var(--c-chalk);
    border: var(--border-w) solid var(--c-navy);
    box-shadow: var(--shadow);
    letter-spacing: .06em;
}

/* Handle = thick, hard-bordered burn BAR spanning the frame height. */
.ba-slider__handle {
    top: 0;
    height: 100%;
    width: .55rem;
    transform: translateX(-50%);
    background: var(--c-burn);
    border: 0;
    border-inline: var(--border-w) solid var(--c-navy);
    box-shadow: none;
}
.ba-slider__handle::before {
    content: "\2194";
    inset: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    background: var(--c-burn);
    border: var(--border-w) solid var(--c-navy);
    box-shadow: var(--shadow-h) var(--shadow-h) 0 var(--c-black);
    color: var(--c-navy);
    font-weight: 700;
    font-size: 1.25rem;
}

/* =========================================================================
   REZENSIONEN — burn quote mark on each block; burn eyebrow on the dark band
   ========================================================================= */
.reviews-banner__eyebrow { color: var(--c-paper); }
.reviews-banner .section__title { margin-bottom: clamp(1.5rem, 4vw, 2.25rem); }
.review-card { position: relative; padding-top: 2.75rem; }
.review-card::before {
    content: "\201C"; /* “ */
    position: absolute;
    top: .35rem;
    left: 1rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 3.5rem;
    line-height: 1;
    color: var(--c-paper);
}

/* ---- Rezensionen als Infinite-Slider (Kartenstil UNVERÄNDERT) ----------- *
 * Nur das Layout wird zum Lauf-Karussell: Titel links, Pfeile rechts; der
 * Track ist eine nicht umbrechende Flex-Reihe. Ohne JS / bei reduzierter
 * Bewegung bleibt es ein nativer horizontaler Scroll (Pfeile bleiben hidden).
 * GSAP (animations.js) ergänzt den nahtlosen Loop + die Pfeilsteuerung. */
.reviews-banner__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}
.reviews-banner__head .reviews-banner__eyebrow { margin-bottom: 1rem; }
.reviews-banner__head .section__title { margin-bottom: 0; }

/* Pfeil-Buttons — brutalistische Blöcke (Paper → Burn beim Hover). */
.reviews-nav { display: flex; gap: .65rem; flex: 0 0 auto; }
.reviews-nav__btn {
    width: 3rem; height: 3rem;
    display: grid; place-items: center;
    font-family: var(--font-display); font-size: 1.35rem; line-height: 1;
    cursor: pointer;
    color: var(--c-navy); background: var(--c-paper);
    border: var(--border-w) solid var(--c-black); border-radius: var(--radius);
    box-shadow: var(--shadow-bk);
    transition: transform .08s ease, box-shadow .08s ease,
                background-color .08s ease, color .08s ease;
}
.reviews-nav__btn:hover {
    background: var(--c-burn); color: var(--c-paper);
    transform: translate(var(--shadow-h), var(--shadow-h)); box-shadow: var(--shadow-h) var(--shadow-h) 0 var(--c-black);
}
.reviews-nav__btn:active {
    transform: translate(var(--shadow-d), var(--shadow-d));
    box-shadow: 0 0 0 var(--c-black);
}

/* Viewport — Basis (ohne JS): nativer Scroll als Fallback. */
.reviews-slider {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: calc(var(--shadow-d) + 4px); /* Platz für den Karten-Schlagschatten */
}
.reviews-slider::-webkit-scrollbar { display: none; }

/* Track — nicht umbrechende Flex-Reihe (überschreibt das Core-Grid). */
.reviews-banner .reviews-banner__list {
    display: flex;
    flex-wrap: nowrap;
    grid-template-columns: none;
    gap: var(--gap);
    margin: 0;
}
.reviews-banner .reviews-banner__list > .review-card {
    flex: 0 0 calc((100% - 2 * var(--gap)) / 3); /* 3 sichtbar (Desktop) */
    scroll-snap-align: start;
}
@media (max-width: 820px) {
    .reviews-banner .reviews-banner__list > .review-card { flex-basis: calc((100% - var(--gap)) / 2); }
}
@media (max-width: 560px) {
    /* Nächste Karte ~14% anschneiden → klarer Hinweis, dass es weitergeht. */
    .reviews-banner .reviews-banner__list > .review-card { flex-basis: 86%; }
}

/* JS aktiv: GSAP bewegt die Karten per Transform → nativen Scroll abschalten,
   Overflow clippen, damit die umlaufenden Karten an den Rändern verschwinden. */
/* Wechsel = sanfter Opacity-Crossfade (siehe animations.js): Kartenreihe aus-,
   sofort umschalten, wieder einblenden. Kein Sliden, keine Randmaske. */
.reviews-slider.is-ready {
    overflow: hidden;
    scroll-snap-type: none;
}

/* =========================================================================
   CTA — burn eyebrow + button row; fix ghost button contrast on the navy band
   ========================================================================= */
.cta__eyebrow { color: var(--c-paper); }
/* Landing-CTA: Eyebrow/Titel/Text linksbündig (wie der Rest der Startseite),
   die Button-Reihe darunter jedoch zentriert. Desktop UND Mobile. */
.cta { text-align: left; }
.cta__text { margin-inline: 0; }
.cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
/* Ghost button on the dark CTA band needs paper outline/text (mirrors hero). */
.cta .btn--ghost {
    color: var(--c-paper);
    border-color: var(--c-paper);
    box-shadow: var(--shadow-bk);
}
.cta .btn--ghost:hover {
    background: var(--c-paper);
    color: var(--c-navy);
}

/* =========================================================================
   STRÖER-GRADE LAYER — scroll motion + staggered reveal.
   Layered on top of the brutalist base; tokens/primitives unchanged.
   (Hero kept at its original, compact proportions — per feedback.)
   ========================================================================= */

/* ---- Home headings: a touch more massive (Ströer scale) ---------------- */
.section__title { font-size: clamp(2.2rem, 6vw, 3.9rem); }
.cta__title { font-size: clamp(2.2rem, 6vw, 3.9rem); }

/* ---- Staggered reveal of the Leistungs-Stapel beams -------------------- *
 * Gated behind .has-reveal (JS adds it only when the observer is armed), so
 * with JS off or under reduced motion the beams are simply visible. */
.has-reveal .svc-stack > .svc {
    opacity: 0; transform: translateY(1.5rem);
    transition: opacity .35s ease, transform .45s ease;
}
.has-reveal .reveal.is-visible .svc-stack > .svc { opacity: 1; transform: none; }
.has-reveal .reveal.is-visible .svc-stack > .svc:nth-child(2) { transition-delay: .07s; }
.has-reveal .reveal.is-visible .svc-stack > .svc:nth-child(3) { transition-delay: .14s; }
.has-reveal .reveal.is-visible .svc-stack > .svc:nth-child(4) { transition-delay: .21s; }
.has-reveal .reveal.is-visible .svc-stack > .svc:nth-child(5) { transition-delay: .28s; }
.has-reveal .reveal.is-visible .svc-stack > .svc:nth-child(6) { transition-delay: .35s; }

/* ---- Reduced motion: silence the autonomous animations ----------------- */
@media (prefers-reduced-motion: reduce) {
    .has-reveal .svc-stack > .svc { opacity: 1 !important; transform: none !important; transition: none; }
}
