/* ══════════════════════════════════════════════════════════════
   XXL ART — Croptool-Teaser
   /css/crop_teaser.css

   Markup: content_inc/section/crop_teaser.php · JS: js/crop_teaser.js
   Aufbau + Farben wie .room-teaser (content_inc/section/room_preview_teaser.php):
   Handy Bild oben + Text darunter, breit Bild rechts + Verlauf von links.
   ══════════════════════════════════════════════════════════════ */

.crop-teaser {
    --teaser-bg:     #0c0d0e;
    --teaser-fg:     #f2f2ef;
    --teaser-muted:  rgba(242, 242, 239, 0.62);
    --teaser-accent: #c9a45c;
    --teaser-gutter: clamp(20px, 5vw, 64px);
    --teaser-ease:   cubic-bezier(.34, 1.2, .64, 1);   /* gleicher Morph wie Croptool/Raumvorschau */

    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: var(--teaser-bg);
    color: var(--teaser-fg);
}

.crop-teaser *,
.crop-teaser *::before,
.crop-teaser *::after { box-sizing: border-box; }

/* ── Bildbereich: Handy oben, breit rechts über die volle Höhe ── */
.crop-teaser-image {
    position: relative;
    flex: 0 0 auto;
    height: 60vh;
    height: 60svh;
    margin: 0;
    overflow: hidden;
}

.crop-teaser-view {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    transition: opacity 0.8s ease;
}
.crop-teaser[data-mode="simulation"] .crop-teaser-view--room,
.crop-teaser[data-mode="room"] .crop-teaser-view--simulation {
    opacity: 0;
    pointer-events: none;
}

.crop-teaser-ratio { display: block; width: 100%; }   /* Höhe per padding-top (Seitenverhältnis) */

/* ── A: das ganze Original, mittig, so groß wie es passt ── */
.crop-teaser-view--simulation {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 24px 84px;
}
.crop-teaser-paint {
    position: relative;
    width: 100%;
    max-width: calc((60vh - 112px) * var(--paint-ratio));
    max-width: calc((60svh - 112px) * var(--paint-ratio));
    overflow: hidden;              /* Abdunklung bleibt im Bild */
}
.crop-teaser-paint > img,
.crop-teaser-mini-paint > img {
    position: absolute;
    top: 0; left: 0;
    display: block;
    width: 100%;
    height: 100%;
}

/* Rahmen = heller Ausschnitt, alles drumherum abgedunkelt (Schatten nach außen) */
.crop-teaser-frame {
    position: absolute;
    outline: 2px solid var(--teaser-fg);
    box-shadow: 0 0 0 2000px rgba(12, 13, 14, 0.62);
    transition: left 0.9s var(--teaser-ease), top 0.9s var(--teaser-ease),
                width 0.9s var(--teaser-ease), height 0.9s var(--teaser-ease);
}
.crop-teaser-frame-label {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    padding: 3px 10px;
    background: rgba(12, 13, 14, 0.75);
    color: var(--teaser-fg);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* ── B: Raumbilder der fertigen Drucke ── */
.crop-teaser-room {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    transition: opacity 1.2s ease;
}
.crop-teaser-room:not(.is-on) { opacity: 0; }
.crop-teaser-room img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mini-Karte: wo im Original der Druck herkommt */
.crop-teaser-mini {
    position: absolute;
    top: 16px; left: 16px;
    z-index: 2;
    width: 120px;
}
.crop-teaser-mini-paint {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(242, 242, 239, 0.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.crop-teaser-frame--mini {
    outline-width: 1.5px;
    box-shadow: 0 0 0 2000px rgba(12, 13, 14, 0.55);
}
.crop-teaser-mini-label {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--teaser-fg);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.crop-teaser-image::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 35%;
    background: linear-gradient(0deg, var(--teaser-bg) 0%, rgba(12, 13, 14, 0.6) 45%, rgba(12, 13, 14, 0) 100%);
    pointer-events: none;
}

/* ── Chips + Umschalter (unten rechts) ── */
.crop-teaser-chips {
    position: absolute;
    bottom: 52px; right: 16px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin: 0; padding: 0;
    list-style: none;
}
.crop-teaser-chips li { margin: 0; padding: 0; }
.crop-teaser-chips li::before { content: none; }
.crop-teaser[data-mode="simulation"] [data-crop-teaser-chips="room"],
.crop-teaser[data-mode="room"] [data-crop-teaser-chips="simulation"] { display: none; }

.crop-teaser .crop-teaser-chip,
.crop-teaser .crop-teaser-switch-btn {
    display: inline-flex;
    align-items: center;
    height: 30px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid rgba(242, 242, 239, 0.35);
    border-radius: 0;
    background: rgba(12, 13, 14, 0.55);
    color: var(--teaser-fg);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.crop-teaser .crop-teaser-chip.is-on {
    border-color: var(--teaser-accent);
    background: var(--teaser-accent);
    color: var(--teaser-bg);
}

.crop-teaser-switch {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 3;
    display: flex;
}
.crop-teaser .crop-teaser-switch-btn + .crop-teaser-switch-btn { border-left: 0; }
.crop-teaser[data-mode="simulation"] [data-crop-teaser-mode="simulation"],
.crop-teaser[data-mode="room"] [data-crop-teaser-mode="room"] {
    border-color: var(--teaser-fg);
    background: var(--teaser-fg);
    color: var(--teaser-bg);
}

/* ── Text ── */
.crop-teaser-content {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: -30px;
    padding: 0 var(--teaser-gutter) 56px;
}

/* h2 = Zeile + Überschrift. Globale h2-Styles von xxl-art hier zurücksetzen */
.crop-teaser .crop-teaser-heading {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    background: none;
}

.crop-teaser-eyebrow {
    display: block;
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--teaser-accent);
}

.crop-teaser-title {
    display: block;
    margin: 0 0 20px;
    font-size: clamp(44px, 11vw, 96px);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--teaser-fg);
}
.crop-teaser-title > span { display: block; }
.crop-teaser-title-accent { color: var(--teaser-accent); }

.crop-teaser-text {
    max-width: 40ch;
    margin: 0 0 28px;
    font-size: 17px;
    line-height: 1.55;
    color: var(--teaser-muted);
}

.crop-teaser-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.crop-teaser .crop-teaser-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 28px;
    border: 1px solid var(--teaser-accent);
    border-radius: 0;
    background: var(--teaser-accent);
    color: var(--teaser-bg);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.crop-teaser .crop-teaser-button:hover {
    border-color: var(--teaser-fg);
    background: var(--teaser-fg);
    color: var(--teaser-bg);
}
.crop-teaser .crop-teaser-button:focus-visible,
.crop-teaser button:focus-visible {
    outline: 2px solid var(--teaser-fg);
    outline-offset: 3px;
}
.crop-teaser-button svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.crop-teaser-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--teaser-muted);
}
.crop-teaser-steps li { margin: 0; padding: 0; }
.crop-teaser-steps li::before { content: none; }
.crop-teaser-steps b {
    margin-right: 8px;
    color: var(--teaser-accent);
    font-weight: 700;
}

/* ── Breit: Bild rechts über die volle Höhe ── */
@media (min-width: 900px) {
    .crop-teaser {
        flex-direction: row;
        align-items: center;
    }

    .crop-teaser-image {
        position: absolute;
        top: 0; bottom: 0; right: 0;
        left: 38%;
        height: auto;
    }
    .crop-teaser-image::after { display: none; }

    .crop-teaser-view--simulation { padding: 60px 48px 110px; }
    .crop-teaser-paint {
        max-width: calc((100vh - 170px) * var(--paint-ratio));
        max-width: calc((100svh - 170px) * var(--paint-ratio));
    }

    /* Verlauf nur über das Raumbild — beim Original bleibt das Bild klar */
    .crop-teaser-view--room::before {
        content: "";
        position: absolute;
        top: 0; bottom: 0; left: 0;
        z-index: 1;
        width: 30%;
        background: linear-gradient(90deg, var(--teaser-bg) 0%, rgba(12, 13, 14, 0) 100%);
        pointer-events: none;
    }

    .crop-teaser-mini {
        top: 32px;
        left: auto;
        right: 40px;
        width: 160px;
        margin-top: 46px;   /* unter dem Umschalter */
    }
    .crop-teaser-switch { top: 32px; right: 40px; }
    .crop-teaser-chips  { bottom: 40px; right: 40px; }

    .crop-teaser-content {
        max-width: 640px;
        margin-top: 0;
        padding: 80px var(--teaser-gutter);
    }
    .crop-teaser-title { font-size: clamp(56px, 5.2vw, 96px); }
    .crop-teaser-text  { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .crop-teaser-view,
    .crop-teaser-room,
    .crop-teaser-frame { transition: none; }
}
