/* =========================================================
   WFB Sittensen
   Hero-Bild: 1693 × 929 Pixel
========================================================= */

:root {
    --fokusfarbe: #ffffff;

    --hintergrund-oben: #4f78ad;
    --hintergrund-mitte: #eca936;
    --hintergrund-unten: #d99227;

    /*
       Position des Inhaltsfensters innerhalb des Hero-Bildes.

       links:
       Abstand von der linken Bildkante.
       Der Wert hält das Fenster rechts neben den Wegweisern.

       rechts:
       Abstand von der rechten Bildkante.
       So bleibt der Hintergrund am rechten Rand sichtbar.

       oben:
       Abstand von der oberen Bildkante.

       unten:
       Abstand von der unteren Bildkante.
       Das Fenster endet oberhalb des Schriftzuges
       „ZUHÖREN – ANPACKEN – GESTALTEN“.
    */

    --fenster-links: 27%;
    --fenster-rechts: 9%;
    --fenster-oben: 4%;
    --fenster-unten: 17%;
}

/* =========================================================
   Grundeinstellungen
========================================================= */

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

html {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
}

body {
    width: 100%;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;

    margin: 0;
    overflow: hidden;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: #17334d;

    background:
        linear-gradient(
            180deg,
            var(--hintergrund-oben) 0%,
            var(--hintergrund-mitte) 52%,
            var(--hintergrund-unten) 100%
        );
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   Bildschirmbereich
========================================================= */

.website {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    display: grid;
    place-items: center;

    padding:
        env(safe-area-inset-top)
        env(safe-area-inset-right)
        env(safe-area-inset-bottom)
        env(safe-area-inset-left);
}

/* =========================================================
   Hero-Container
========================================================= */

.hero {
    position: relative;

    width: min(
        100vw,
        calc(100dvh * 1693 / 929)
    );

    height: min(
        100dvh,
        calc(100vw * 929 / 1693)
    );

    max-width: 100%;
    max-height: 100dvh;

    overflow: hidden;
    isolation: isolate;

    background: #eaa331;

    box-shadow:
        0 10px 35px rgb(0 0 0 / 28%);
}

/* =========================================================
   Hero-Bild
========================================================= */

.hero__bild {
    position: absolute;
    inset: 0;

    z-index: 1;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    pointer-events: none;
    user-select: none;

    -webkit-user-drag: none;
}

/* =========================================================
   Inhaltsfenster
========================================================= */

.inhalt-fenster {
    position: absolute;

    left: var(--fenster-links);
    right: var(--fenster-rechts);
    top: var(--fenster-oben);
    bottom: var(--fenster-unten);

    z-index: 5;

    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 0;

    overflow: hidden;

    border:
        clamp(2px, 0.25vw, 5px)
        solid
        rgb(255 255 255 / 88%);

    border-radius:
        clamp(10px, 1.2vw, 24px);

    background:
        linear-gradient(
            145deg,
            rgb(255 255 255 / 95%),
            rgb(255 249 224 / 92%)
        );

    box-shadow:
        0 15px 40px rgb(0 0 0 / 34%),
        inset 0 0 24px rgb(255 255 255 / 45%);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    opacity: 1;
    visibility: visible;

    transform: translateY(0) scale(1);

    transition:
        opacity 220ms ease,
        visibility 220ms ease,
        transform 220ms ease;
}

/* Zustand bei geschlossenem Fenster */

.inhalt-fenster.is-versteckt {
    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transform:
        translateY(-12px)
        scale(0.985);
}

/* =========================================================
   Kopfzeile des Fensters
========================================================= */

.inhalt-fenster__kopf {
    flex: 0 0 auto;

    min-height:
        clamp(38px, 4vw, 64px);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding:
        clamp(7px, 0.8vw, 14px)
        clamp(12px, 1.4vw, 24px);

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            rgb(12 68 116 / 96%),
            rgb(26 108 156 / 94%)
        );

    border-bottom:
        1px solid
        rgb(255 255 255 / 50%);
}

.inhalt-fenster__titel {
    margin: 0;

    overflow: hidden;

    font-size:
        clamp(13px, 1.5vw, 25px);

    font-weight: 800;

    line-height: 1.15;

    white-space: nowrap;
    text-overflow: ellipsis;
}

/* =========================================================
   Schließen-Schaltfläche
========================================================= */

.fenster-schliessen {
    flex: 0 0 auto;

    width:
        clamp(27px, 2.7vw, 44px);

    height:
        clamp(27px, 2.7vw, 44px);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    color: #ffffff;
    background: rgb(255 255 255 / 14%);

    border:
        1px solid
        rgb(255 255 255 / 70%);

    border-radius: 50%;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        clamp(21px, 2.2vw, 35px);

    font-weight: 400;

    line-height: 1;

    cursor: pointer;

    transition:
        background-color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.fenster-schliessen:hover {
    background: rgb(255 255 255 / 28%);

    box-shadow:
        0 4px 12px rgb(0 0 0 / 22%);
}

.fenster-schliessen:active {
    transform: scale(0.92);
}

.fenster-schliessen:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

/* =========================================================
   Startinhalt
========================================================= */

.start-inhalt {
    flex: 1 1 auto;

    min-width: 0;
    min-height: 0;

    overflow-x: hidden;
    overflow-y: auto;

    padding:
        clamp(16px, 2.2vw, 42px);

    scrollbar-width: thin;
    scrollbar-color:
        rgb(17 86 132 / 65%)
        transparent;
}

.start-inhalt h1 {
    margin:
        0
        0
        clamp(7px, 0.8vw, 14px);

    color: #0b5184;

    font-size:
        clamp(20px, 3vw, 50px);

    line-height: 1.05;
}

.start-inhalt h2 {
    margin:
        0
        0
        clamp(12px, 1.5vw, 25px);

    color: #c57311;

    font-size:
        clamp(15px, 1.7vw, 29px);

    line-height: 1.2;
}

.start-inhalt p {
    margin:
        0
        0
        clamp(10px, 1.1vw, 18px);

    font-size:
        clamp(12px, 1.2vw, 20px);

    line-height: 1.55;
}

/* Starttext wird ausgeblendet, sobald ein iframe aktiv ist. */

.start-inhalt.is-versteckt {
    display: none;
}

/* =========================================================
   Iframe für die Unterseiten
========================================================= */

.seiten-frame {
    flex: 1 1 auto;

    display: none;

    width: 100%;
    min-width: 0;
    min-height: 0;

    margin: 0;
    padding: 0;

    background: #ffffff;

    border: 0;
}

/* Sichtbarer Zustand */

.seiten-frame.is-aktiv {
    display: block;
}

/* =========================================================
   SVG-Navigation
========================================================= */

.wegweiser-hotspots {
    position: absolute;
    inset: 0;

    z-index: 10;

    display: block;

    width: 100%;
    height: 100%;

    overflow: visible;

    pointer-events: none;
}

.schild-link {
    outline: none;
}

.schild-link polygon {
    fill: transparent;
    stroke: transparent;
    stroke-width: 0;

    pointer-events: all;
    cursor: pointer;

    transition:
        fill 160ms ease,
        stroke 160ms ease,
        filter 160ms ease;
}

.schild-link:hover polygon,
.schild-link:focus-visible polygon,
.schild-link:active polygon,
.schild-link.is-aktiv polygon {

    fill: transparent;
    stroke: transparent;
    stroke-width: 0;

    filter: none;
}

/* =========================================================
   Musikschalter
========================================================= */

.musik-button {
    position: absolute;

    top: 2.1%;
    right: 2%;

    z-index: 20;

    width: 10.5%;
    min-width: 74px;
    max-width: 180px;

    aspect-ratio: 2.8 / 1;

    margin: 0;
    padding: 0;

    appearance: none;
    -webkit-appearance: none;

    color: transparent;
    background: transparent;

    border: 0;
    border-radius: 12px;

    cursor: pointer;

    transition:
        background-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.musik-button:hover {
    background: rgb(255 255 255 / 10%);

    box-shadow:
        0 0 0 2px rgb(255 255 255 / 45%),
        0 5px 14px rgb(0 0 0 / 20%);
}

.musik-button:active {
    transform: scale(0.97);
}

.musik-button:focus-visible {
    outline: 4px solid var(--fokusfarbe);
    outline-offset: 3px;

    background: rgb(255 255 255 / 12%);
}

.musik-button[aria-pressed="true"] {
    background: rgb(255 255 255 / 10%);

    box-shadow:
        0 0 0 3px rgb(255 255 255 / 70%),
        0 5px 15px rgb(0 0 0 / 24%);
}

/* =========================================================
   Barrierefrei versteckter Text
========================================================= */

.visuell-versteckt {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;

    white-space: nowrap !important;

    border: 0 !important;
}

/* =========================================================
   Tablet und kleinere Bildschirme
========================================================= */

@media (max-width: 1000px) {
    :root {
        --fenster-links: 27%;
        --fenster-rechts: 7%;
        --fenster-oben: 4%;
        --fenster-unten: 17%;
    }
}

/* =========================================================
   Hochformat

   Im Hochformat ist das Motiv naturgemäß sehr flach.
   Das Fenster bleibt innerhalb des Bildes, kann aber kleiner
   erscheinen. Der Inhalt erhält eine Scrollleiste.
========================================================= */

@media (orientation: portrait) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .website {
        min-height: 100vh;
        min-height: 100dvh;

        align-items: center;
    }

    .hero {
        width: 100vw;

        height:
            calc(100vw * 929 / 1693);

        max-width: 100%;
        max-height: none;
    }

    :root {
        --fenster-links: 27%;
        --fenster-rechts: 5%;
        --fenster-oben: 3%;
        --fenster-unten: 15%;
    }
}

/* =========================================================
   Kleine Smartphones

   Auf sehr kleinen Geräten wird das Inhaltsfenster als
   größeres, gut lesbares Fenster über dem Motiv dargestellt.
========================================================= */

@media (max-width: 600px) and (orientation: portrait) {
    body {
        overflow-y: auto;
    }

    .website {
        display: block;

        min-height: 100dvh;

        padding: 0;
    }

    .hero {
        width: 100%;
        height: 100dvh;

        max-height: none;

        background:
            linear-gradient(
                180deg,
                var(--hintergrund-oben),
                var(--hintergrund-unten)
            );
    }

    .hero__bild {
        height: auto;
        max-height: 100%;

        object-fit: contain;
        object-position: top center;
    }

    .inhalt-fenster {
        left: 5%;
        right: 5%;
        top: 12%;
        bottom: 8%;

        z-index: 30;
    }

    .wegweiser-hotspots {
        height:
            calc(100vw * 929 / 1693);
    }

    .musik-button {
        top: 1.0%;
        right: 1.0%;

        min-width: 25%;

        border-radius: 7px;
    }

}

/* =========================================================
   Querformat mit geringer Höhe
========================================================= */

@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        width:
            calc(100dvh * 1693 / 929);

        height: 100dvh;
    }

    :root {
        --fenster-oben: 3%;
        --fenster-unten: 15%;
    }

    .inhalt-fenster__kopf {
        min-height: 34px;
    }
}

/* =========================================================
   Reduzierte Bewegung
========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   Druckansicht
========================================================= */

@media print {
    body {
        overflow: visible;
        background: #ffffff;
    }

    .website {
        min-height: auto;
        padding: 0;
    }

    .hero {
        width: 100%;
        height: auto;

        aspect-ratio: 1693 / 929;

        box-shadow: none;
    }

    .wegweiser-hotspots,
    .musik-button,
    audio,
    .fenster-schliessen {
        display: none;
    }

    .inhalt-fenster {
        position: static;

        width: 100%;
        height: auto;

        border: 0;
        box-shadow: none;
    }
}

/* =========================================================
   Wegweiser: vollständig unsichtbare Klickflächen

   Es erscheinen weder beim Überfahren noch nach dem Anklicken
   Rahmen, Flächen, Schatten oder Browser-Fokusringe.
========================================================= */

.schild-link,
.schild-link:link,
.schild-link:visited,
.schild-link:hover,
.schild-link:active,
.schild-link:focus,
.schild-link:focus-visible,
.schild-link.is-aktiv {
    outline: none !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.schild-link polygon,
.schild-link:link polygon,
.schild-link:visited polygon,
.schild-link:hover polygon,
.schild-link:active polygon,
.schild-link:focus polygon,
.schild-link:focus-visible polygon,
.schild-link.is-aktiv polygon {
    fill: transparent !important;
    stroke: transparent !important;
    stroke-width: 0 !important;
    filter: none !important;
    outline: none !important;
}
