/**
 * Gemeinsames Stylesheet aller Seiten der KM1-Website: Schriften, Design-Tokens, Layout und Komponenten.
 *
 * @version 0.14.0.27 - 2026-11-04 15:50:53
 */

/* ===== Schriften ===== */
@font-face {
    font-family: 'Lato';
    src: url('lato-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('lato-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('lato-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== Design-Tokens ===== */
:root {
    --color-white: #ffffff;
    --color-neutral-darkest: #0c0c0c;
    --color-flirt-darker: #4b0037;
    --color-flirt-darkest: #380029;

    --radius-button: 6.25rem;
    --radius-card: 0.5rem;
    --radius-image: 0.5rem;

    /* Markenfarben und Oberflächen (Hellmodus) */
    --brand: #4b0037;
    --page: #fcfafb;
    --surface: #f2eaf0;
    --ink: #29212a;
    --muted: #665668;
    --line: #d4c2d0;
    --link: #700252;
    --color-flirt: var(--link);

    /* Typografie, mobile first */
    --text-h1: clamp(2.65rem, 5.3vw, 4.5rem);
    --text-h2: clamp(2rem, 3.6vw, 3.25rem);
    --text-h3: clamp(1.7rem, 3vw, 2.6rem);
    --text-h5: 1.25rem;
    --text-h6: 1.125rem;
    --text-medium: 1rem;
    --text-small: 0.9375rem;

    color-scheme: light;

    @media (min-width: 992px) {
        --text-h6: 1.375rem;
        --text-medium: 1.125rem;
    }
}

/* Dunkelmodus, gesetzt über data-theme am html-Element */
:root[data-theme="dark"] {
    --page: #19131a;
    --surface: #251c26;
    --ink: #f6eef4;
    --muted: #d0bdcc;
    --line: #705b6b;
    --link: #edb8df;

    color-scheme: dark;
}

/* ===== Farbschemata ===== */
.scheme-1 {
    --bg: var(--color-flirt-darkest);
    --fg: var(--color-white);
    --border: #94708b;
    --color-flirt: #f3c6e6;

    background-color: var(--bg);
    color: var(--fg);
}

.scheme-2 {
    --bg: var(--color-flirt-darker);
    --fg: var(--color-white);
    --border: #94708b;
    --color-flirt: #f3c6e6;

    background-color: var(--bg);
    color: var(--fg);
}

.scheme-3 {
    --bg: var(--page);
    --fg: var(--ink);
    --border: var(--line);

    background-color: var(--bg);
    color: var(--fg);
}

.scheme-4 {
    --bg: var(--surface);
    --fg: var(--ink);
    --border: var(--line);

    background-color: var(--bg);
    color: var(--fg);
}

/* ===== Reset und Basis ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    font-size: 1rem;
    letter-spacing: 0.012em;
    background: var(--page);
    color: var(--ink);
}

h1,
h2 {
    font-weight: 300;
    letter-spacing: 0.035em;
    line-height: 1.2;
    text-wrap: balance;
}

h3 {
    font-weight: 400;
    letter-spacing: 0.025em;
    line-height: 1.17;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

section {
    scroll-margin-top: 6rem;
}

/* Hidden-Attribut hat immer Vorrang vor display-Regeln der Komponenten */
[hidden] {
    display: none !important;
}

/* ===== Barrierefreiheit ===== */
body:focus {
    outline: none;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0.5rem;
    background: var(--color-flirt-darker);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-card);
    font-weight: 700;
    z-index: 10000;
    transition: top 0.2s;

    &:focus {
        position: fixed;
        top: 0.5rem;
    }
}

:focus-visible {
    outline: 3px solid var(--link);
    outline-offset: 5px;
    border-radius: 2px;
}

.scheme-1 :focus-visible,
.scheme-2 :focus-visible {
    outline-color: var(--color-white);
}

/* Navigation bleibt trotz scheme-2 beim Link-Fokusring */
#navbar :focus-visible {
    outline-color: var(--link);
}

/* Bildschirmleser-Hilfsklasse */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Layout-Hilfen ===== */
.container {
    width: 100%;
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 5%;
}

.section-pad {
    padding-block: clamp(4rem, 8vw, 7rem);
}

.section-bordered {
    border-top: 1px solid var(--border);
}

.flex-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.flex-btns-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

.eyebrow {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.eyebrow-accent {
    color: var(--color-flirt);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 46px;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-button);
    border: 2px solid transparent;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.9375rem;
    letter-spacing: 0.035em;
    line-height: 1.35;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;

    &:hover {
        opacity: 0.88;
        transform: translateY(-1px);
    }

    &:active {
        transform: translateY(0);
    }
}

.btn-primary {
    background: var(--brand);
    color: var(--color-white);
    border-color: var(--brand);
}

.scheme-1 .btn-primary,
.scheme-2 .btn-primary {
    background: var(--color-white);
    color: var(--color-flirt-darker);
    border-color: var(--color-white);
}

/* Navigation und helle Abschnitte behalten im Hellmodus die Markenfarbe */
#navbar .btn-primary {
    background: var(--color-flirt-darker);
    color: var(--color-white);
    border-color: var(--color-flirt-darker);
}

[data-theme="dark"] .scheme-3 .btn-primary,
[data-theme="dark"] #navbar .btn-primary {
    background: #edb8df;
    color: var(--color-flirt-darkest);
    border-color: #edb8df;
}

.btn-outline {
    background: transparent;
    color: var(--fg, var(--color-neutral-darkest));
    border-color: var(--fg, var(--color-neutral-darkest));
}

.btn-outline-white {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* Textlink im Button-Gewand, doppelte Klasse erhöht die Spezifität gegenüber .btn */
.btn.btn-link {
    background: none;
    color: var(--color-flirt);
    border: none;
    font-weight: 700;

    &.btn-link-flush {
        padding-left: 0;
    }
}

/* ===== Topline (scrollt mit dem Inhalt weg, die Navigation bleibt hängen) ===== */
.topline {
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}

.topline-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    max-width: 80rem;
    margin-inline: auto;
    padding: 0.55rem 5%;

    @media (max-width: 767px) {
        justify-content: center;
        gap: 0.25rem 1.25rem;
    }
}

.topline-item {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--fg);

    & svg {
        flex: none;
        width: 1.125rem;
        height: 1.125rem;
        color: var(--color-flirt);
    }
}

/* Telefonnummer als helle Pille, damit sie als wichtigste Angabe hervortritt */
.topline-phone {
    padding: 0.3rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--color-flirt-darkest);
    background: var(--color-flirt);
    border-radius: var(--radius-button);
    transition: background 0.15s;

    & svg {
        color: inherit;
    }

    &:hover {
        background: var(--color-white);
    }
}

/* Adresse auf schmalen Bildschirmen ausblenden, Öffnungszeiten und Telefon bleiben */
.topline-address {
    @media (max-width: 767px) {
        display: none;
    }
}

/* ===== Navigation ===== */
#navbar {
    position: sticky;
    top: 0;
    z-index: 900;
    width: 100%;
    background: var(--page);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    --border: var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 5.2rem;
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 5%;

    @media (max-width: 991px) {
        gap: 0.65rem;
    }
}

.nav-logo img {
    width: 152px;
    height: auto;

    @media (max-width: 767px) {
        width: 128px;
    }
}

:root[data-theme="dark"] .nav-logo img {
    filter: invert(1);
}

.nav-links {
    display: none;
    align-items: center;
    gap: 0.25rem;

    @media (min-width: 992px) {
        display: flex;
        margin-left: auto;
    }

    & a {
        padding: 0.5rem 1rem;
        font-size: 0.9375rem;
        letter-spacing: 0.025em;
        color: var(--ink);
        border-radius: 0.375rem;
        transition: background 0.15s;

        &:hover {
            background: var(--surface);
        }
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;

    @media (min-width: 992px) {
        margin-left: 0;
    }
}

.nav-cta {
    margin: 0;

    @media (max-width: 991px) {
        display: none;
    }
}

/* Farbschema-Umschalter */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--ink);
    font-size: 0.875rem;

    &:hover {
        background: var(--surface);
    }

    & svg {
        width: 19px;
        height: 19px;
    }

    @media (max-width: 767px) {
        padding: 0.4rem 0.65rem;
    }
}

/* Hamburger-Menü-Schalter */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0.25rem;

    @media (min-width: 992px) {
        display: none;
    }

    & span {
        display: block;
        height: 2px;
        background: var(--ink);
        border-radius: 2px;
        transition: transform 0.3s, opacity 0.3s;
    }

    &[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    &[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    &[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* Mobiles Menü: Seitenfläche von links in voller Höhe, höchstens 90vw breit, mit halbtransparentem Overlay */
#mobile-menu {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: min(90vw, 24rem);
    height: 100vh;
    height: 100dvh;
    padding: 1rem 1.5rem 1.5rem;
    overflow-y: auto;
    background: var(--page);
    border-right: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateX(-100%);
    transition: transform 300ms ease, opacity 300ms ease, visibility 0s linear 300ms;

    &.open {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: transform 300ms ease, opacity 300ms ease, visibility 0s;
    }

    & a:not(.btn) {
        padding: 0.75rem 0;
        font-size: 1rem;
        color: var(--ink);
        border-bottom: 1px solid var(--line);
    }

    & .btn {
        margin-top: 0.75rem;
        align-self: flex-start;
    }

    /* !important: überstimmt .open, falls das Fenster bei offenem Menü verbreitert wird */
    @media (min-width: 992px) {
        display: none !important;
    }
}

.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    margin-bottom: 0.75rem;
}

.mobile-menu-title {
    font-size: var(--text-h5);
    letter-spacing: 0.035em;
}

.menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: inherit;
    border-radius: 50%;

    &:hover {
        background: var(--surface);
    }

    & svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
    transition: opacity 300ms ease, visibility 0s linear 300ms;

    #mobile-menu.open + & {
        visibility: visible;
        opacity: 1;
        transition: opacity 300ms ease, visibility 0s;
    }

    @media (min-width: 992px) {
        display: none;
    }
}

/* Bei geöffnetem Menü oder Barrierefreiheit-Fenster scrollt die Seite dahinter nicht; schwebende Elemente weichen dem Menü */
:root.menu-open,
:root:has(.a11y-panel[open]) {
    overflow: hidden;
}

:root.menu-open :is(.a11y-toggle, .scroll-top, .privacy-notice) {
    visibility: hidden;
}

/* ===== Hero ===== */
#hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 76svh;
    padding-bottom: 4rem;

    @media (max-width: 767px) {
        min-height: 72svh;
    }
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(120deg, #380029, #4b0037 60%, #632450);

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Abdeckung über dem Bild */
    &::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, #380029a6, #4b003780 60%, #63245073);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 6rem);
    width: 100%;
    max-width: 80rem;
    margin-inline: auto;
    padding: 4rem 5%;

    @media (min-width: 768px) {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        padding: 6rem 5%;
    }

    @media (max-width: 767px) {
        padding-bottom: 3rem;
    }
}

.hero-eyebrow {
    color: #e7bcd9;
    font-size: 0.8rem;
    margin-bottom: 1.4rem;
}

.hero-headline,
.hero-headline strong {
    font-size: var(--text-h1);
    font-weight: 300;
    color: var(--color-white);
    line-height: 1.15;
    letter-spacing: 0.035em;

    @media (max-width: 767px) {
        letter-spacing: 0.02em;
    }
}

.hero-location {
    display: block;
    margin-top: 1rem;
    font-size: 0.37em;
    letter-spacing: 0.065em;
    line-height: 1.5;

    @media (max-width: 767px) {
        font-size: 0.43em;
        letter-spacing: 0.035em;
    }
}

.hero-sub {
    max-width: 29rem;
    font-size: var(--text-medium);
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.65;

    @media (max-width: 767px) {
        font-size: 1.05rem;
    }
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;

    @media (min-width: 768px) {
        margin-top: 2rem;
    }
}

/* ===== Feature-Akkordeon ===== */
#features {
    padding: 0;
}

.features-header {
    padding: 4rem 5% 3rem;

    @media (min-width: 768px) {
        padding: 6rem 5% 3rem;
    }

    & h2 {
        font-size: var(--text-h2);
        margin-bottom: 0.75rem;
    }

    & p {
        font-size: var(--text-medium);
        color: #f0ddeb;
    }
}

.features-list {
    border-top: 1px solid var(--border);
}

.feature-item {
    border-bottom: 1px solid var(--border);
}

.feature-trigger {
    width: 100%;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    /* Inhalt der Titelzeile bündig zum 80-rem-Inhaltsbereich (Hintergrund und Linien bleiben randlos) */
    padding: 1.5rem max(5%, calc((100% - 80rem) / 2 + 5%));
    font-size: var(--text-h5);
    font-weight: 400;
    letter-spacing: 0.035em;
    color: var(--color-white);
    text-align: left;
    transition: background 0.15s;

    &:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    & > span:nth-child(2) {
        flex: 1;
    }

    @media (max-width: 991px) {
        font-size: 1.2rem;
    }
}

.feature-num {
    min-width: 2rem;
    font-size: 0.875rem;
    color: #dfb7d5;
}

.feature-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.feature-trigger[aria-expanded="true"] .feature-icon {
    transform: rotate(45deg);
}

/* Panel klappt über die Zeilenhöhe (0fr zu 1fr) in 300 ms auf und zu; Sichtbarkeit zieht nach, damit Geschlossenes nicht fokussierbar ist */
.feature-panel {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 300ms ease, visibility 0s linear 300ms;
}

.feature-trigger[aria-expanded="true"] + .feature-panel {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 300ms ease, visibility 0s;
}

.feature-panel-inner {
    min-height: 0;
    overflow: hidden;

    /* Inhaltsfläche etwas heller als die Kopfzeile */
    background: rgba(255, 255, 255, 0.07);
}

.feature-panel-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 5% 2.5rem;

    @media (min-width: 768px) {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
        align-items: center;
    }

    & h3 {
        font-size: var(--text-h3);
        margin-bottom: 1rem;
    }

    & p {
        font-size: var(--text-medium);
        line-height: 1.7;
        color: #f0ddeb;
    }
}

.feature-panel-img {
    display: block;
    border-radius: var(--radius-image);
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* ===== Über uns ===== */
#ueber-uns {
    & .inner {
        display: grid;
        grid-template-columns: 1fr;
        gap: 3rem;

        @media (min-width: 992px) {
            grid-template-columns: 1fr 1fr;
            align-items: center;
            gap: 5rem;
        }
    }

    & h2 {
        font-size: var(--text-h2);
        margin-bottom: 1.25rem;
    }

    & p {
        font-size: var(--text-medium);
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }

    & ul {
        margin: 1.25rem 0 2rem;
        padding-left: 1.5rem;
        list-style: disc;
    }

    & ul li {
        margin-bottom: 0.5rem;
        font-size: var(--text-medium);
    }
}

.ueber-img {
    display: block;
    border-radius: var(--radius-image);
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

/* ===== Leistungen ===== */
#leistungen {
    text-align: center;

    & h2 {
        font-size: var(--text-h2);
        margin-bottom: 1rem;
    }

    & .intro {
        max-width: 38rem;
        margin: 0 auto 3.5rem;
        font-size: var(--text-medium);
        line-height: 1.7;
    }

    & .services-grid {
        max-width: 64rem;
        margin-inline: auto;

        @media (min-width: 768px) {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 3rem;
        }

        @media (min-width: 1100px) {
            max-width: none;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 3rem 1.5rem;
        }
    }

    & .service-card {
        @media (min-width: 1100px) {
            grid-column: span 2;
            padding: 0.7rem 0.5rem;

            &:last-child {
                grid-column: 3 / 5;
                max-width: none;
            }
        }
    }
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.service-card {
    padding: 1rem 1.4rem;

    /* ungerade letzte Karte mittig über beide Spalten */
    @media (min-width: 768px) {
        &:last-child:nth-child(odd) {
            grid-column: 1 / -1;
            max-width: 29rem;
            justify-self: center;
        }
    }

    @media (max-width: 767px) {
        padding: 0.5rem 0;
    }

    & h3 {
        font-size: 1.55rem;
        margin-bottom: 0.75rem;
    }

    & p {
        font-size: var(--text-medium);
        line-height: 1.7;
        color: var(--muted);
    }
}

.service-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1.25rem;
    color: var(--link);
    stroke-width: 1.25;
}

/* ===== Salon ===== */
#salon {
    & .salon-text {
        max-width: 42rem;
        margin: 0 auto;
        padding: 4rem 5%;
        text-align: center;

        @media (min-width: 768px) {
            padding: 6rem 5%;
        }
    }

    & h2 {
        font-size: var(--text-h2);
        margin-bottom: 1rem;
    }

    & p {
        font-size: var(--text-medium);
        line-height: 1.7;
        margin-bottom: 2rem;
        opacity: 0.85;
    }
}

/* ===== Galerie ===== */
#galerie {
    & h2 {
        font-size: var(--text-h2);
        margin-bottom: 0.75rem;
    }

    & .intro {
        font-size: var(--text-medium);
        margin-bottom: 2.5rem;
        opacity: 0.8;
    }
}

.carousel-wrapper {
    position: relative;
}

/* Scrollbalken ausgeblendet, die Navigation übernehmen Zähler, Fortschrittslinie, Pfeile und Ziehen mit der Maus */
.carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    cursor: grab;

    &::-webkit-scrollbar {
        display: none;
    }

    /* beim Ziehen kein Einrasten und keine Textauswahl */
    &.is-dragging {
        scroll-snap-type: none;
        cursor: grabbing;
        user-select: none;
    }
}

.carousel-slide {
    flex: 0 0 calc(50% - 0.75rem);
    scroll-snap-align: start;

    @media (min-width: 768px) {
        flex-basis: calc(25% - 1.125rem);
    }

    @media (max-width: 767px) {
        flex-basis: 80%;
    }

    & img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        object-fit: cover;
        border-radius: var(--radius-image);
    }
}

.carousel-controls {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem 2rem;
    margin-top: 2.5rem;

    @media (max-width: 767px) {
        grid-template-columns: 1fr auto;

        & .carousel-progress {
            grid-row: 2;
            grid-column: 1 / -1;
        }
    }
}

/* Zähler in Ziffern, aktuelle Position hervorgehoben */
.carousel-count {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-variant-numeric: tabular-nums;

    & strong {
        font-size: 2.1rem;
        font-weight: 300;
        color: var(--ink);
        letter-spacing: 0.04em;
    }
}

/* Haarfeine Fortschrittslinie, anklickbar; der Pseudo-Bereich vergrößert die Klickfläche */
.carousel-progress {
    position: relative;
    height: 1px;
    background: var(--line);
    cursor: pointer;

    &::before {
        content: '';
        position: absolute;
        inset: -14px 0;
    }
}

.carousel-progress-thumb {
    position: absolute;
    top: -1px;
    left: 0;
    width: 25%;
    height: 3px;
    border-radius: 3px;
    background: var(--link);
}

.carousel-btns {
    display: flex;
    gap: 0.75rem;
}

.carousel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid var(--ink);
    border-radius: 50%;
    background: none;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s;

    & svg {
        width: 1.35rem;
        height: 1.35rem;
        transition: transform 0.25s;
    }

    &:hover:not(:disabled) {
        background: var(--ink);
        color: var(--page);
    }

    &:hover:not(:disabled) svg {
        transform: translateX(3px);
    }

    &.carousel-btn-prev:hover:not(:disabled) svg {
        transform: translateX(-3px);
    }

    &:disabled {
        border-color: var(--line);
        color: var(--line);
        cursor: default;
    }
}

/* ===== Testimonial ===== */
#testimonial {
    background: var(--surface);

    & .inner {
        max-width: 42rem;
        margin: 0 auto;
        text-align: center;
    }

    & h2 {
        font-size: var(--text-h2);
        margin-bottom: 1rem;
    }

    & p {
        color: var(--muted);
        margin-bottom: 1.5rem;
    }
}

/* ===== Call-to-Action ===== */
#cta {
    & .cta-text {
        max-width: 38rem;
        margin: 0 auto 3rem;
        text-align: center;
    }

    & h2 {
        font-size: var(--text-h2);
        margin-bottom: 1rem;
    }

    & p {
        font-size: var(--text-medium);
        margin-bottom: 2rem;
        opacity: 0.85;
    }
}

.cta-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.cta-img {
    display: block;
    border-radius: var(--radius-image);
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* ===== Kontakt ===== */
#kontakt {
    /* 2x2-Gitter: Telefon und Öffnungszeiten oben, Adresse und E-Mail unten; mobil untereinander in der Reihenfolge Telefon, Adresse, Öffnungszeiten, E-Mail */
    & .kontakt-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 3rem;

        @media (min-width: 768px) {
            grid-template-columns: 1fr 1fr;
            grid-template-areas:
                "phone hours"
                "address mail";
            gap: 4.5rem;
        }
    }

    & h2 {
        font-size: var(--text-h2);
        margin-bottom: 1rem;
    }

    & .intro {
        font-size: var(--text-medium);
        margin-bottom: 2.5rem;
        opacity: 0.8;
    }
}

.contact-item {
    /* dezente, flächige Kachel in neutralem Grau ohne Rahmen und Schatten; negativer Außenabstand gleicht den Innenabstand aus, damit Icon und Text bündig zur Überschrift stehen (mobil nur 0,75 rem, damit auch bei vergrößerter Schrift kein Überlauf entsteht) */
    margin: -0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.025);
    border-radius: var(--radius-card);

    @media (min-width: 768px) {
        margin: -1.5rem;
        padding: 1.5rem;
    }

    & h3 {
        font-size: var(--text-h6);
        margin-bottom: 0.25rem;
    }

    & p,
    & a {
        font-size: var(--text-medium);
        line-height: 1.6;
    }

    & a {
        text-decoration: underline;
    }

    /* Inline-Block, damit die Einblend-Verschiebung auch bei Telefon und E-Mail wirkt (Transform greift nicht bei Inline-Elementen) */
    & a:not(.map-link) {
        display: inline-block;
    }
}

.contact-item-phone {
    @media (min-width: 768px) {
        grid-area: phone;
    }
}

.contact-item-address {
    @media (min-width: 768px) {
        grid-area: address;
    }
}

.contact-item-hours {
    @media (min-width: 768px) {
        grid-area: hours;
    }
}

.contact-item-mail {
    @media (min-width: 768px) {
        grid-area: mail;
    }
}

:root[data-theme="dark"] .contact-item {
    background: rgba(255, 255, 255, 0.03);
}

.contact-item-icon {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.85;
}

.address-plain {
    font-style: normal;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    font-size: var(--text-medium);
    font-weight: 700;
    text-decoration: underline;
}

/* ===== Seitenfuß ===== */
footer {
    padding: 3rem 5% 1.5rem;

    &.scheme-2 {
        color: #f8ebf4;
    }
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);

    @media (min-width: 992px) {
        grid-template-columns: 1.5fr 1fr;
    }
}

.footer-logo {
    width: 152px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: invert(1);
}

.footer-addr {
    margin-bottom: 0.25rem;
    font-size: var(--text-small);

    & strong {
        display: block;
        margin-bottom: 0.25rem;
    }

    & a {
        text-decoration: underline;
    }
}

.footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;

    & ul li a {
        display: block;
        min-height: 44px;
        padding: 0.4rem 0;
        font-size: var(--text-small);
        font-weight: 400;
        letter-spacing: 0.035em;
        transition: opacity 0.15s;

        &:hover {
            text-decoration: underline;
        }
    }
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    font-size: var(--text-small);
    color: #dfc4d7;

    @media (min-width: 768px) {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;

    & a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        text-decoration: underline;
    }
}

/* ===== Datenschutz-Hinweis ===== */
.privacy-notice {
    position: fixed;
    inset: auto auto 1.5rem 1.5rem;
    z-index: 1000;
    width: min(32rem, calc(100% - 3rem));
    max-height: calc(100vh - 3rem);
    margin: 0;
    padding: 1.5rem;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.18);
    animation: privacy-notice-in 300ms ease-out;

    @media (max-width: 767px) {
        inset: auto 4.25rem 0.75rem 0.75rem;
        width: auto;
        max-height: calc(100vh - 2rem);
        padding: 1rem;
    }

    &:focus-visible {
        outline-offset: 3px;
    }

    & .privacy-notice-title {
        margin-bottom: 0.75rem;
        font-size: var(--text-h5);
        line-height: 1.3;
    }

    & p {
        margin-bottom: 0.75rem;
        font-size: var(--text-small);
        line-height: 1.6;

        @media (max-width: 767px) {
            margin-bottom: 0.5rem;
            font-size: 0.8125rem;
            line-height: 1.5;
        }
    }
}

.privacy-notice-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
    margin-top: 1rem;

    & a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        font-size: var(--text-small);
        text-decoration: underline;
    }
}

@keyframes privacy-notice-in {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
}

/* Menüpunkt "Datenschutzeinstellungen" im Seitenfuß: Button im Erscheinungsbild eines Links */
.footer-link-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.4rem 0;
    font-size: var(--text-small);
    letter-spacing: 0.035em;
    text-align: left;
    color: inherit;
    transition: opacity 0.15s;

    &:hover {
        opacity: 0.75;
    }

    .footer-legal & {
        padding: 0;
        letter-spacing: normal;
        text-decoration: underline;
    }
}

/* ===== Barrierefreiheit-Einstellungen ===== */
/* Dezente runde Schaltflächen unten rechts: Barrierefreiheit oberhalb, Nach-oben darunter */
.a11y-toggle,
.scroll-top {
    position: fixed;
    right: 1.25rem;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--color-white);
    background: var(--color-flirt-darker);
    border: 1px solid #94708b;
    border-radius: 50%;
    opacity: 0.85;
    transition: opacity 0.15s, background 0.15s;

    &:hover {
        opacity: 1;
        background: var(--color-flirt-darkest);
    }

    & svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    @media (max-width: 767px) {
        right: 0.75rem;
    }
}

/* Sitzt unten in der Ecke und rückt sanft nach oben, sobald der Nach-oben-Button erscheint */
.a11y-toggle {
    bottom: 1.25rem;
    transition: opacity 0.15s, background 0.15s, bottom 300ms ease;

    @media (max-width: 767px) {
        bottom: 0.75rem;
    }

    :root:has(.scroll-top.is-visible) & {
        bottom: 4.75rem;

        @media (max-width: 767px) {
            bottom: 4.25rem;
        }
    }
}

/* Nach-oben-Button erscheint erst nach dem Hinunterscrollen */
.scroll-top {
    bottom: 1.25rem;
    visibility: hidden;
    opacity: 0;

    @media (max-width: 767px) {
        bottom: 0.75rem;
    }

    &.is-visible {
        visibility: visible;
        opacity: 0.85;

        &:hover {
            opacity: 1;
        }
    }
}
.a11y-panel {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1001;
    width: min(26rem, 90vw);
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    border: 0;
    border-left: 1px solid var(--border);
    animation: a11y-panel-in 300ms ease-out;

    /* halbtransparentes Overlay hinter dem Fenster */
    &::backdrop {
        background: rgba(0, 0, 0, 0.5);
        animation: a11y-backdrop-in 300ms ease-out;
    }

    &.is-closing {
        animation: a11y-panel-out 300ms ease-in forwards;

        &::backdrop {
            animation: a11y-backdrop-out 300ms ease-in forwards;
        }
    }

    &:focus-visible {
        outline-offset: -4px;
    }

    & p {
        font-size: var(--text-small);
        line-height: 1.5;
    }
}

@keyframes a11y-panel-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes a11y-panel-out {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes a11y-backdrop-in {
    from {
        opacity: 0;
    }
}

@keyframes a11y-backdrop-out {
    to {
        opacity: 0;
    }
}

.a11y-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;

    & .a11y-panel-title {
        margin: 0;
        font-size: var(--text-h5);
        line-height: 1.3;
    }
}

.a11y-close {
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;

    &:hover {
        background: color-mix(in srgb, var(--ink) 14%, var(--surface));
    }

    & svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

.a11y-options {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0;
}

.a11y-option {
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    min-height: 48px;
    padding: 0.5rem 0.9rem;
    font-size: var(--text-small);
    text-align: left;
    background: var(--surface);
    border-radius: var(--radius-card);
    transition: background 0.15s;

    &:hover {
        background: color-mix(in srgb, var(--ink) 14%, var(--surface));
    }
}

/* Schalter-Optik: der Zustand kommt aus aria-pressed */
.a11y-switch {
    position: relative;
    flex: none;
    width: 2.5rem;
    height: 1.5rem;
    background: var(--muted);
    border-radius: 100px;
    transition: background 0.15s;

    &::after {
        content: '';
        position: absolute;
        top: 0.2rem;
        left: 0.2rem;
        width: 1.1rem;
        height: 1.1rem;
        background: var(--page);
        border-radius: 50%;
        transition: transform 0.15s;
    }

    .a11y-option[aria-pressed="true"] & {
        background: var(--link);

        &::after {
            transform: translateX(1rem);
        }
    }
}

.a11y-panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;

    & a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        font-size: var(--text-small);
        text-decoration: underline;
    }
}

/* ===== Darstellungshilfen (per data-a11y am html-Element gesetzt) ===== */
:root[data-a11y~="zoom"] {
    font-size: 125%;
}

/* Lange Wörter dürfen bei größerer Schrift und größeren Abständen umbrechen, damit nichts über den Rand läuft */
:root:is([data-a11y~="zoom"], [data-a11y~="font"], [data-a11y~="spacing"]) :is(h1, h2, h3, h4, h5, h6, p, li, a, td, th) {
    overflow-wrap: anywhere;
}

:root[data-a11y~="contrast"] {
    --page: #000;
    --surface: #000;
    --ink: #fff;
    --muted: #fff;
    --line: #fff;
    --link: #ffea00;
    --brand: #ffea00;
    --color-flirt: #ffea00;

    & :is(.scheme-1, .scheme-2, .scheme-3, .scheme-4) {
        --bg: #000;
        --fg: #fff;
        --border: #fff;
        --color-flirt: #ffea00;
        --link: #ffea00;
        background-color: #000;
        color: #fff;
    }

    & :is(main, footer, .privacy-notice, .a11y-panel) a:not(.btn) {
        color: #ffea00;
        text-decoration: underline;
    }

    & .btn-primary,
    & #navbar .btn-primary {
        background: #ffea00;
        color: #000;
        border-color: #ffea00;
    }

    & .nav-logo img {
        filter: invert(1);
    }

    & .a11y-toggle,
    & .scroll-top {
        border-color: #fff;
    }

    & .hero-bg {
        background: #000;
    }

    & .hero-bg img {
        display: none;
    }

    & .hero-bg::after {
        display: none;
    }
}

:root[data-a11y~="nobg"] .hero-bg img {
    display: none;
}

/* !important in den folgenden Regeln: Darstellungshilfen müssen die Schrift-, Abstands- und Fokusangaben aller Komponenten unabhängig von deren Spezifität überschreiben */
:root[data-a11y~="font"] {
    & *,
    & *::before,
    & *::after {
        font-family: Verdana, Arial, Helvetica, sans-serif !important;
    }

    & :is(h1, h2, h3, h4, h5, h6, .hero-headline) {
        font-weight: 400 !important;
    }
}

:root[data-a11y~="spacing"] :is(p, li, td, th, address, label, span, a, button, h1, h2, h3, h4, h5, h6) {
    line-height: 1.8 !important;
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

:root[data-a11y~="links"] {
    & a:not(.btn):not(.nav-logo) {
        font-weight: 700 !important;
        text-decoration: underline !important;
        text-decoration-thickness: 0.12em !important;
        text-underline-offset: 0.2em !important;
    }

    /* alle per Tastatur ansteuerbaren Bedienelemente erhalten einen sichtbaren Rahmen; der Fokusring behält Vorrang */
    & :is(a, button, summary, input, select, textarea, [role="button"], [tabindex]:not([tabindex="-1"])):not(:focus-visible) {
        outline: 2px solid currentColor !important;
        outline-offset: 3px !important;
    }
}

:root[data-a11y~="focus"] :focus-visible {
    outline: 4px solid #ffea00 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 7px #000 !important;
}

/* Leselinie: hellt einen Streifen auf und dunkelt den Rest ab; die Position setzt das Skript */
.a11y-ruler {
    display: none;
}

:root[data-a11y~="ruler"] .a11y-ruler {
    position: fixed;
    inset-inline: 0;
    top: calc(var(--ruler-y, 50vh) - 1.75rem);
    z-index: 999;
    display: block;
    height: 3.5rem;
    border-block: 2px solid #ffea00;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

:root[data-a11y~="motion"] {
    scroll-behavior: auto;

    & *,
    & *::before,
    & *::after {
        animation: none !important;
        transition: none !important;
    }

    & .is-pending {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===== Fehlerseite ===== */
.error-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    & .error-lead {
        max-width: 38rem;
        margin-bottom: 2rem;
        font-size: var(--text-medium);
        line-height: 1.7;
    }

    & .error-links {
        max-width: 38rem;
        margin-top: 2rem;
        font-size: var(--text-small);
        line-height: 1.7;

        & a {
            text-decoration: underline;
        }
    }
}

/* ===== Rechtstexte ===== */
.legal-main {
    max-width: 54rem;
    min-height: 70vh;
    margin: 0 auto;
    padding: 4rem 5% 6rem;

    & h1 {
        font-size: clamp(2.3rem, 5vw, 3.5rem);
        margin-bottom: 1.5rem;
    }

    & h2 {
        font-size: 1.4rem;
        margin: 2.3rem 0 0.7rem;
    }

    & p,
    & ul {
        margin-bottom: 1rem;
    }

    & ul {
        padding-left: 1.3rem;
        list-style: disc;
    }

    & a {
        text-decoration: underline;
    }

    & address {
        font-style: normal;
    }
}

/* ===== Einblend-Animation (FadeInUp beim Hineinscrollen) ===== */
.is-pending {
    opacity: 0;
    transform: translateY(30px);
}

/* Übergang mit gestaffelter Verzögerung; die Klasse wird nach dem Einblenden wieder entfernt */
.is-visible {
    transition: opacity 600ms ease-out var(--reveal-delay, 0s), transform 600ms ease-out var(--reveal-delay, 0s);
}

/* ===== Anpassungen für Nutzereinstellungen und Druck ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    /* !important: schaltet alle Animationen unabhängig von der Spezifität ab */
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .is-pending {
        opacity: 1;
        transform: none;
    }
}

@media (forced-colors: active) {
    .btn,
    .theme-toggle {
        border: 1px solid ButtonText;
    }
}

@media print {
    #navbar,
    .topline,
    .privacy-notice,
    .a11y-toggle,
    .a11y-panel,
    .a11y-ruler,
    .scroll-top,
    .hero-btns,
    .theme-toggle,
    .carousel-controls {
        display: none;
    }

    .is-pending {
        opacity: 1;
        transform: none;
    }

    body,
    .scheme-1,
    .scheme-2,
    .scheme-3,
    .scheme-4 {
        background: white;
        color: black;
    }

    .hero-bg {
        display: none;
    }

    img {
        break-inside: avoid;
    }
}