/*
========================================
home.css
Startseite / Hero-Slideshow

Struktur:
1. Basis
2. Desktop / größere Ansichten
3. Tablet Hochformat
4. Smartphone Hochformat
5. Smartphone / Tablet Querformat
6. Barrierefreiheit
========================================
*/


/* =====================================================
   1. Basis
===================================================== */

.page-home {
    background: var(--piero-black, #0b0b0b);
    color: rgba(255, 255, 255, 0.82);
}

.page-home main {
    min-height: 100svh;
}

.page-home .hero.hero-slideshow {
    background: var(--piero-black, #0b0b0b);
}

.page-home .hero-slideshow + .section {
    background: var(--piero-ivory, #f6f1e7);
}

.page-home .hero-slideshow + .section h2 {
    color: var(--piero-gold-700, #7a5a1d);
}

.page-home .site-footer {
    background: var(--piero-black, #0b0b0b);
    color: rgba(255, 255, 255, 0.72);
    border-top: 1px solid rgba(247, 227, 170, 0.14);
}

.page-home .site-footer a {
    color: rgba(255, 255, 255, 0.72);
}

.page-home .site-footer a:hover {
    color: var(--piero-gold-300, #f7e3aa);
}

.page-home .hero-slideshow {
    position: relative;

    min-height: 100vh;
    min-height: 100svh;

    overflow: hidden;
    cursor: pointer;
}

.page-home .hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;

    width: 100%;
    height: 100%;
}

.page-home .hero-slide {
    position: absolute;
    inset: 0;
    z-index: 0;

    background-position:
        var(--hero-position-desktop, center center);
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #0b0b0b;

    opacity: 0;

    transition: opacity 1.2s ease-in-out;
    will-change: opacity;
    pointer-events: none;
}

.page-home .hero-slide.is-active {
    z-index: 1;
    opacity: 1;
}

.page-home .hero.hero-slideshow::after {
    content: none;
    background: transparent;
}

.page-home .hero-content {
    position: relative;
    z-index: 2;

    width: min(100%, 900px);
    margin-top: 0;
}

.page-home .hero-content,
.page-home .hero-content * {
    pointer-events: auto;
}

.page-home .hero-content h1 {
    text-wrap: balance;
}

.page-home .hero-content h1 span {
    display: block;
    margin-top: 0;
}

.page-home .hero-content h1 span + span {
    margin-top: 0.02em;
}


/* =====================================================
   2. Desktop / größere Ansichten
===================================================== */

@media (min-width: 701px) {

    .page-home .hero-content {
        top: -190px;

        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}


/* =====================================================
   3. Tablet Hochformat
===================================================== */

@media
    (min-width: 701px)
    and (max-width: 900px)
    and (orientation: portrait) {

    .page-home .hero-slideshow {
        min-height: 100svh;
    }

    .page-home .hero-slide {
        background-position:
            var(--hero-position-mobile, 58% center);
    }

    .page-home .hero-content {
        width: 100%;
        max-width: none;

        padding-left: clamp(24px, 6vw, 48px);
        padding-right: clamp(24px, 6vw, 48px);
    }

    .page-home .hero-content h1 {
        max-width: 12ch;

        font-size: clamp(48px, 12.4vw, 76px);
        line-height: 0.95;
        letter-spacing: -0.055em;
    }
}


/* =====================================================
   4. Smartphone Hochformat
===================================================== */

@media
    (max-width: 700px)
    and (orientation: portrait) {

    .page-home main {
        min-height: 0;
    }

    .page-home .hero.hero-slideshow {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;

        min-height: 0;
        height: auto;
        aspect-ratio: auto;
        padding: 0;
        background: var(--piero-black, #0b0b0b);
    }

    .page-home .hero-slides {
        position: relative;
        inset: auto;
        order: 2;

        width: 100%;
        height: auto;
        aspect-ratio: 1672 / 941;
        flex-shrink: 0;
        margin-top: clamp(24px, 5vw, 40px);
    }

    .page-home .hero-slide {
		background-size: cover;
		background-position: center 78% !important;
	}

    .page-home .hero-content {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        order: 1;
        z-index: 2;

        width: 100%;
        max-width: none;

        margin: 0;
        padding: clamp(88px, 16vw, 112px) 20px 0;

        transform: none;

        text-align: center;
        pointer-events: none;
    }

    .page-home .hero-content h1 {
        max-width: 11.5ch;
        margin: 0 auto;

        font-size: clamp(39px, 10.8vw, 54px);
        line-height: 1;
        letter-spacing: -0.045em;

        text-align: center;
        text-wrap: balance;

        overflow-wrap: normal;
        word-break: normal;

        color: var(--piero-gold-300, #f7e3aa);
        text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
    }

    .page-home .hero-content h1 span + span {
        margin-top: 0.20em;
    }

    .page-home .hero-slideshow + .section {
        padding-top: 12px;
        padding-bottom: 28px;
        background: var(--piero-ivory, #f6f1e7);
    }

    .page-home .hero-slideshow + .section h2 {
        font-size: clamp(22px, 6vw, 32px);
        line-height: 1.25;
        margin: 0;
        color: var(--piero-gold-700, #7a5a1d);
    }

    .page-home .nav-toggle {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(247, 227, 170, 0.28);
    }

    .page-home .nav-toggle span {
        background: #ffffff;
    }
}


/* Kleine Smartphones */

@media
    (max-width: 430px)
    and (orientation: portrait) {

    .page-home .hero-content h1 {
        max-width: 11ch;

        font-size: clamp(37px, 10.5vw, 47px);
        line-height: 1;
        letter-spacing: -0.04em;
    }
}


@media
    (max-width: 360px)
    and (orientation: portrait) {

    .page-home .hero-content h1 {
        font-size: 36px;
    }
}


/* =====================================================
   5. Smartphone / Tablet Querformat
   Logo → Text → Hero-Bild (volle Breite), wie Hochformat
===================================================== */

@media
    (orientation: landscape)
    and (max-width: 1180px)
    and (max-height: 900px) {

    .page-home main {
        min-height: 0;
    }

    .page-home .hero,
    .page-home .hero.hero-slideshow {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;

        height: auto;
        min-height: 0;
        margin-top: 0;
        padding: 0;
        overflow: visible;
        background: var(--piero-black, #0b0b0b);
    }

    .page-home .hero-slides {
        position: relative;
        inset: auto;
        order: 2;

        width: 100%;
        height: auto;
        aspect-ratio: 1672 / 941;
        flex-shrink: 0;
        margin-top: clamp(16px, 3vw, 28px);
    }

    .page-home .hero-slide {
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-color: #0b0b0b;
    }

    .page-home .hero-content {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        order: 1;
        z-index: 2;
        align-self: stretch;

        width: 100%;
        max-width: none;

        margin: 0;
        padding: clamp(72px, 12vw, 96px) 24px 0;

        transform: none !important;

        text-align: center;
        pointer-events: none;
    }

    .page-home .hero-content h1 {
        max-width: 16ch;
        margin: 0 auto;

        font-size: clamp(28px, 4.2vw, 44px);
        line-height: 1;
        letter-spacing: -0.04em;

        text-align: center;
        text-wrap: balance;

        color: var(--piero-gold-300, #f7e3aa);
        text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
    }

    .page-home .hero-content h1 span + span {
        margin-top: 0.16em;
    }
}


/* =====================================================
   6. Barrierefreiheit / reduzierte Bewegung
===================================================== */

@media (prefers-reduced-motion: reduce) {

    .page-home .hero-slide {
        transition: none;
    }
}