/* PC Bati Bati, Theme 1.0.0. Mobile first, ab 900px Desktop-Layout. */

@font-face {
    font-family: 'Tablet Gothic';
    src: url('../fonts/TabletGothic-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Tablet Gothic';
    src: url('../fonts/TabletGothic-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #000;
    --paper: #fff;
    --band: #d9d9d9;
    --gutter: 1.25rem;
    --header-h: 4.5rem;
    --font: 'Tablet Gothic', 'Helvetica Neue', Arial, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
html.menu-open { overflow: hidden; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.4;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; }

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px var(--paper);
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip {
    position: absolute;
    left: var(--gutter);
    top: -4rem;
    z-index: 100;
    padding: .5rem .75rem;
    background: var(--paper);
    color: var(--ink);
}
.skip:focus { top: .75rem; }

/* ---------- Link mit geneigter Unterstreichung ---------- */

/* Dicker Balken mit Abstand zum Text, wie im Design. Neigung pro Link über --tilt. */
.tl {
    --ul: .3em;
    position: relative;
    display: inline-block;
    padding-bottom: .38em;
    line-height: 1.1;
    color: inherit;
    text-decoration: none;
}
.tl::after {
    content: "";
    position: absolute;
    left: 0;
    right: -.03em;
    bottom: 0;
    height: var(--ul);
    background: currentColor;
    transform: rotate(var(--tilt, 0deg));
    transform-origin: 50% 50%;
}
.tl--thin { --ul: .16em; padding-bottom: .3em; font-weight: 700; }

/* ---------- Kopfbereich / Navigation (Mobile) ---------- */

.site-header__brand { display: none; }

.cochonette {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + .875rem);
    right: calc(env(safe-area-inset-right, 0px) + .875rem);
    z-index: 60;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.cochonette img {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 .15rem .3rem rgba(0, 0, 0, .3));
    transition: filter .25s;
}
.menu-open .cochonette img { filter: brightness(0) drop-shadow(0 .15rem .3rem rgba(0, 0, 0, .3)); }

.nav {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
    padding: calc(env(safe-area-inset-top, 0px) + 6rem) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 6rem);
    overflow-y: auto;
    background: var(--paper);
    visibility: hidden;
    opacity: 0;
    transition: opacity .2s, visibility 0s linear .2s;
}
.menu-open .nav {
    visibility: visible;
    opacity: 1;
    transition: opacity .2s;
}

.nav__list {
    display: grid;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav__list .tl {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
}
.nav__list .tl:not(.is-current)::after { opacity: 0; }

.nav__name {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 1.875rem);
    left: var(--gutter);
    font-size: 1.125rem;
    line-height: 1.5;
    text-decoration: none;
}

.nav__join {
    max-width: 22rem;
    hyphens: auto;
    -webkit-hyphens: auto;
}
.nav__join p { margin: 0; white-space: pre-line; }
.nav__join-title { margin-bottom: .25rem !important; font-weight: 700; }

/* Ohne JavaScript: Navigation als normale Liste unter dem Inhalt */
.no-js .cochonette { display: none; }
.no-js .nav {
    position: static;
    visibility: visible;
    opacity: 1;
    padding: var(--gutter);
    gap: 1.5rem;
}
.no-js .nav__list .tl { font-size: 1.5rem; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 28rem;
    max-height: 100vh;
    max-height: 100svh;
    aspect-ratio: 9 / 16;
    background: #fff url('../images/hero-hintergrund.png') 40% 50% / cover no-repeat;
}
.hero__title { margin: 0; width: 100%; }
.hero__logo {
    display: block;
    width: min(90%, 38rem);
    height: auto;
    aspect-ratio: 1150.47 / 417.89;
    margin: 12% auto 0;
}

/* Logo-Varianten: Handy zeigt die reduzierte Version, Desktop die volle Wortmarke */
.hero__logo--desktop { display: none; }
.hero__logo--mobile { aspect-ratio: 236 / 68; }

/* ---------- Aktuelles ---------- */

.stage { padding-top: 2.5rem; }
.stage__title {
    margin: 0 var(--gutter) .75rem;
    font-size: 1rem;
    font-weight: 700;
}

.band {
    padding: var(--gutter);
    background: var(--band);
}

.band--text { padding: 1rem var(--gutter); }
.stage__fallback {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.35;
    white-space: pre-line;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.flyers {
    display: grid;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.flyer { margin: 0; }
.flyer__link {
    display: block;
    transform: rotate(var(--tilt, 0deg));
    transform-origin: 50% 50%;
    transition: transform .2s;
}
.flyer__link:hover { transform: rotate(var(--tilt, 0deg)) scale(1.015); }
.flyer__img {
    display: block;
    width: 100%;
    height: auto;
}
.flyer__caption {
    margin: .75rem 0 0;
    font-size: .875rem;
    line-height: 1.3;
}

/* ---------- Statuten ---------- */

.statuten {
    max-width: 44rem;
    padding: 3rem var(--gutter) 2rem;
}
.statuten__label {
    margin: 0 0 .5rem;
    font-size: .8125rem;
}
.statuten h2 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.1;
}
.statuten h2 + p {
    margin: .25rem 0 2rem;
    font-size: .875rem;
}
.statuten h3 {
    margin: 2rem 0 .5rem;
    font-size: .875rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.statuten p {
    margin: 0 0 .75rem;
    white-space: pre-line;
}
.statuten ul {
    margin: .5rem 0 1rem;
    padding-left: 1.1rem;
}

.page-end { margin: 0; padding: 2rem var(--gutter) 3.5rem; }
.page-end .tl { font-size: 1.25rem; font-weight: 700; }

/* ---------- Vergangenes ---------- */

.past { padding: 0 0 3.5rem; }
.year { margin-top: 1.5rem; }
.year:first-of-type { margin-top: 0; }
.year__title {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 1.25rem) var(--gutter) .75rem;
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--paper);
}
.empty { margin: 0; padding: 0 var(--gutter); }

/* ---------- Detail / Standardseiten ---------- */

.detail {
    max-width: 44rem;
    padding: calc(env(safe-area-inset-top, 0px) + 5rem) var(--gutter) 3rem;
}
.detail__title { margin: 0 0 1.5rem; font-size: 1.75rem; line-height: 1.1; }
.detail__img { display: block; width: 100%; height: auto; margin-bottom: 1.5rem; }

/* ---------- Footer ---------- */

.site-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.75rem;
    padding: 1.5rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 2.5rem);
    font-size: .875rem;
}
.site-footer .tl { font-weight: 400; }

/* ---------- Textseiten (Impressum, Datenschutz) ---------- */

.detail h2 { margin: 2rem 0 .5rem; font-size: 1.125rem; line-height: 1.2; }
.detail p { margin: 0 0 .75rem; }
.detail a:not(.tl) {
    text-decoration: underline;
    text-decoration-thickness: .12em;
    text-underline-offset: .2em;
}

/* ---------- Lightbox (PhotoSwipe) ---------- */

.pswp { --pswp-bg: #000; font-family: var(--font); }
.pswp :focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: none; }
.pswp__custom-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    padding: 2.5rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 1rem);
    color: #fff;
    font-size: 1rem;
    line-height: 1.3;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0));
    pointer-events: none;
}
.pswp__custom-caption[hidden] { display: none; }

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
    .cochonette { display: none; }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 30;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: var(--header-h);
        padding: 0 2rem;
        background: var(--paper);
    }
    .site-header__brand {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        text-decoration: none;
    }
    .site-header__logo { display: block; width: 2.75rem; height: 2.75rem; }
    .site-header__name { font-size: 1.25rem; }

    .nav,
    .menu-open .nav {
        position: static;
        display: block;
        padding: 0;
        overflow: visible;
        background: none;
        visibility: visible;
        opacity: 1;
    }
    .nav__list { display: flex; gap: 2.5rem; }
    .nav__list .tl { font-size: 1.25rem; }
    .nav__list .tl:not(.is-current)::after { transition: opacity .15s; }
    .nav__list .tl:not(.is-current):hover::after,
    .nav__list .tl:not(.is-current):focus-visible::after { opacity: .35; }
    .nav__join, .nav__name { display: none; }
    html.menu-open { overflow: auto; }

    .hero {
        aspect-ratio: auto;
        max-height: none;
        min-height: 30rem;
        height: calc(100vh - var(--header-h));
        height: calc(100dvh - var(--header-h));
    }
    .hero__logo { width: min(70vw, 60rem); margin: 0 auto; }
    .hero__logo--mobile { display: none; }
    .hero__logo--desktop { display: block; }

    .stage { padding-top: 4rem; }
    .stage__title { margin: 0 2rem .75rem; font-size: 1.25rem; text-align: center; }

    .band { padding: 2.5rem 2rem; }
    .band--text { padding: 1.25rem 2rem; }
    /* Vergangenes: Flyer laufen bis zum Rand des Browsers, der Abstand liegt im Scrollbereich */
    .band--row { padding: 2.5rem 0; }
    .stage__fallback { font-size: 1.25rem; text-align: center; }
    .flyers--stack { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem; align-items: flex-start; }
    .flyers--row {
        display: flex;
        gap: 2.5rem;
        align-items: flex-start;
        overflow-x: auto;
        padding: .5rem 2rem 1rem;
        scroll-snap-type: x proximity;
        scroll-padding-left: 2rem;
        scroll-padding-right: 2rem;
    }
    .flyers--row .flyer { flex: 0 0 auto; scroll-snap-align: start; }
    .flyers--row .flyer__caption { width: 0; min-width: 100%; }

    .flyers--stack .flyer__img,
    .flyers--row .flyer__img {
        width: auto;
        max-width: none;
        height: clamp(15rem, 52vh, 32rem);
    }

    .statuten { margin: 0 auto; padding: 6rem 2rem 3rem; }
    .page-end { display: none; }

    .past { padding: 3rem 0 6rem; }
    .year { margin-top: 3rem; }
    .year__title { position: static; margin: 0 2rem .75rem; padding: 0; font-size: 1.75rem; background: none; }
    .empty { padding: 0 2rem; }

    .detail { margin: 0 auto; padding-top: 5rem; }
    .site-footer { padding-left: 2rem; padding-right: 2rem; }
}

@media (hover: hover) and (pointer: fine) {
    html, body, a, button, summary, label, [role="button"] {
        cursor: url('../images/cursor.png') 16 16, auto;
        cursor: -webkit-image-set(url('../images/cursor.png') 1x, url('../images/cursor@2x.png') 2x) 16 16, auto;
        cursor: image-set(url('../images/cursor.png') 1x, url('../images/cursor@2x.png') 2x) 16 16, auto;
    }
}

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