/* ==========================================================================
   Jakob Obleser – style.css
   1. Tokens   2. Base   3. Navigation   4. Hero/Slideshow   5. Sections
   6. Musik    7. Termine   8. Videos   9. Kontakt/Footer   10. Responsive
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
    --font: "Helvetica Neue", Helvetica, Arial, "Nimbus Sans", "Liberation Sans", system-ui, sans-serif;

    --ink: #0a1801;
    --ink-soft: rgba(10, 24, 1, 0.72);
    --ink-line: rgba(10, 24, 1, 0.2);
    --surface: rgba(255, 255, 255, 0.2);
    --surface-hover: rgba(255, 255, 255, 0.5);
    --bg-rgb: 152, 204, 250; /* wird per JS beim Scrollen verändert */

    --gutter: clamp(1.25rem, 7vw, 6rem);
    --edge: clamp(1.25rem, 3vw, 2.5rem); /* Randabstand von Header und Footer (volle Breite) */
    --max: 1120px;
    --nav-h: 4.5rem;
    --radius: 14px;
    --radius-sm: 8px;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --t: 0.25s;
}

@media (min-width: 1600px) {
    :root { --max: 1240px; }
}

/* 2. BASE ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: rgb(var(--bg-rgb));
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, iframe { max-width: 100%; }
ul { padding: 0; list-style: none; }
b { font-weight: 600; }

a { color: inherit; }

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

::selection { background: var(--ink); color: #fff; }

.container {
    width: min(100% - 2 * var(--gutter), var(--max));
    margin-inline: auto;
}

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

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    padding: 0.6rem 1rem;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform var(--t) var(--ease);
}
.skip-link:focus-visible { transform: none; outline-color: #fff; }

/* 3. NAVIGATION ------------------------------------------------------------ */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: rgba(var(--bg-rgb), 0.72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Logo links, Menü mittig, Sprache rechts */
    align-items: center;
    height: var(--nav-h);
    padding-inline: var(--edge);
}

.logo {
    justify-self: start;
    font-size: clamp(1.35rem, 1rem + 1vw, 1.85rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    text-decoration: none;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-menu a {
    position: relative;
    display: block;
    padding: 0.5rem 0.8rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity var(--t) var(--ease);
}

.nav-menu a::after {
    content: "";
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.2rem;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t) var(--ease);
}

.nav-menu a:hover::after,
.nav-menu a[aria-current="true"]::after { transform: scaleX(1); }

/* Sprachumschalter: schlichte Textlinks DE / EN */
.lang-switch {
    display: flex;
    justify-self: end;
    align-items: center;
}

.lang-switch button {
    position: relative;
    padding: 0.3rem 0.1rem;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    opacity: 0.55;
    cursor: pointer;
    transition: opacity var(--t) var(--ease);
}
.lang-switch button + button { margin-left: 0.9rem; }
.lang-switch button + button::before {
    content: "/";
    position: absolute;
    left: -0.6rem;
    opacity: 0.7;
    pointer-events: none;
}
.lang-switch button:hover { opacity: 0.85; }
.lang-switch button.is-active,
.lang-switch button.is-active:hover { opacity: 1; font-weight: 600; }

/* Hamburger (nur mobil, nur mit JS) */
.nav-toggle {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: 0.5rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    place-items: center;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    display: block;
    width: 1.4rem;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--t) var(--ease), background-color var(--t) var(--ease);
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* 4. HERO / SLIDESHOW ------------------------------------------------------ */
.hero { padding-top: calc(var(--nav-h) + clamp(0.75rem, 2.5vw, 1.75rem)); }

.slideshow {
    position: relative;
    height: 480px; /* Fallback ohne clamp() */
    height: clamp(380px, 76vh, 800px); /* Fallback ohne svh */
    height: clamp(380px, 76svh, 800px);
    overflow: hidden;
    border-radius: 5px;
    background: rgba(10, 24, 1, 0.12);
    isolation: isolate;
}

.slideshow::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 55%);
    pointer-events: none;
}

.slides { position: absolute; inset: 0; }

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.1s var(--ease);
}
.slide.is-active { opacity: 1; z-index: 1; }
:root:not(.js) .slide:first-child { opacity: 1; }

.slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.slide-caption { display: none; }
.js .slide-caption {
    position: absolute;
    left: clamp(0.5rem, 3vw, 1rem);
    right: 6rem; /* Platz für die Pfeile */
    bottom: calc(clamp(1rem, 3vw, 1.75rem) - 1rem);
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem 0.75rem;
    margin: 0;
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.3;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    opacity: 0.5;
}
.slide-caption span:empty { display: none; }

.slide-nav { display: none; }

.js .slide-nav {
    position: absolute;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 1.75rem);
    z-index: 3;
    display: flex;
    gap: 0.1rem;
    color: #fff;
}
.js .slide-nav[hidden] { display: none; } /* sonst überschreibt display:flex das hidden-Attribut (bei nur einem Bild) */

.slide-btn {
    padding: 0.3rem 0.55rem;
    border: 0;
    background: none;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    line-height: 1;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    opacity: 0.85;
    cursor: pointer;
    transition: opacity var(--t) var(--ease);
}
.slide-btn:hover { opacity: 1; }

.slideshow :focus-visible { outline-color: #fff; }

/* 5. SEKTIONEN ------------------------------------------------------------- */
.section {
    padding-block: clamp(2rem, 5vw, 3.5rem) clamp(4rem, 10vw, 7.5rem);
    scroll-margin-top: calc(var(--nav-h) - 1px);
}

.section-title {
    margin-bottom: 0;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.045em;
}

/* Einklappbare Bereiche. Standardmäßig auf Smartphones eingeklappt:
   Klasse "collapse-mobile-default" am <section> (Breakpoint: MOBILE_QUERY in script.js) */
.section-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
    cursor: pointer;
}
.section-chevron {
    flex: none;
    width: 0.38em;
    height: 0.38em;
    margin-top: 0.12em;
    opacity: 0.45;
    transform: rotate(180deg); /* aufgeklappt: Pfeil nach oben */
    transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}
.section-toggle:hover .section-chevron { opacity: 0.8; }
.section-toggle[aria-expanded="false"] .section-chevron { transform: none; } /* eingeklappt: nach unten */

/* Auf-/Einklappen: Grid-Zeile 1fr -> 0fr, der Platz darunter rückt mit nach */
.collapsible {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.4s var(--ease), visibility 0s;
}
.collapsible-inner {
    min-height: 0;
    overflow: hidden;
    padding-top: clamp(1.5rem, 4vw, 2.5rem);
    transition: padding-top 0.4s var(--ease), opacity 0.3s var(--ease);
}
.collapsible.is-collapsed {
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.4s var(--ease), visibility 0s 0.4s;
}
.collapsible.is-collapsed .collapsible-inner { padding-top: 0; opacity: 0; }
.collapsible:not(.is-ready) { transition: none; } /* kein Animieren beim Seitenstart */
.collapsible:not(.is-ready) .collapsible-inner { transition: none; }

.about-text { max-width: 64rem; }
.about-text p {
    font-size: clamp(1.125rem, 1.02rem + 0.55vw, 1.4rem);
    line-height: 1.6;
    letter-spacing: -0.01em;
}
.about-text p + p { margin-top: 0.6em; }

.about-text a {
    font-style: italic;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(10, 24, 1, 0.35);
    text-underline-offset: 0.2em;
    transition: text-decoration-color var(--t) var(--ease), text-decoration-thickness var(--t) var(--ease);
}
.about-text a:hover {
    text-decoration-color: var(--ink);
    text-decoration-thickness: 2px;
}

/* Karten (Musik + Videos) */
.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); align-items: start; }
.grid-music { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.grid-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
    padding: 0.75rem;
    border-radius: var(--radius);
    background: var(--surface);
    transition: background-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.card:hover {
    background: var(--surface-hover);
    box-shadow: 0 12px 32px -16px rgba(10, 24, 1, 0.35);
}

.card-media { overflow: hidden; border-radius: var(--radius-sm); }
.player { display: block; width: 100%; height: 600px; border: 0; }

.card-text {
    padding: 1rem 0.5rem 0.4rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 7. TERMINE --------------------------------------------------------------- */
.event-list { border-top: 1px solid var(--ink-line); }
.event-list li { border-bottom: 1px solid var(--ink-line); }

.event {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr) minmax(0, 20rem) 1.5rem;
    grid-template-areas: "date title place arrow";
    gap: 0.4rem 1.5rem;
    align-items: center;
    padding: 1.15rem 0.75rem;
    color: var(--ink);
    text-decoration: none;
}

.event-date { grid-area: date; font-weight: 600; font-variant-numeric: tabular-nums; }
.event-title { grid-area: title; line-height: 1.5; }
.event-place { grid-area: place; text-align: right; }
.event-arrow { grid-area: arrow; justify-self: end; }

/* nicht verlinkt: ruhiger, ohne Pfeil */
.event:not(.is-link) { cursor: default; }
.event:not(.is-link) b { font-weight: 500; }

/* verlinkt: unterstrichen, Pfeil, Hover-Fläche */
.event.is-link {
    border-radius: var(--radius-sm);
    transition: background-color var(--t) var(--ease);
}
.event.is-link .event-title {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(10, 24, 1, 0.35);
    text-underline-offset: 0.25em;
    transition: text-decoration-color var(--t) var(--ease);
}
.event-arrow { opacity: 0.55; transition: transform var(--t) var(--ease), opacity var(--t) var(--ease); }

.event.is-link:hover,
.event.is-link:focus-visible { background: var(--surface); }
.event.is-link:hover .event-title { text-decoration-color: currentColor; }
.event.is-link:hover .event-arrow { opacity: 1; transform: translate(2px, -2px); }

/* 8. VIDEOS ---------------------------------------------------------------- */
.video-frame {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: #000;
}
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* 9. KONTAKT / FOOTER ------------------------------------------------------ */
.contact-section { padding-top: 0; }
.contact-section .container {
    padding-top: clamp(2rem, 5vw, 3.5rem);
    border-top: 1px solid var(--ink-line);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    column-gap: clamp(2rem, 6vw, 4.5rem);
    margin-top: clamp(1.5rem, 4vw, 3rem);
}

.contact-item { display: flex; flex-direction: column; align-items: flex-start; }

.contact-label {
    font-size: 0.875rem;
    color: var(--ink-soft);
}

.contact-link {
    display: inline-block;
    margin-bottom: clamp(1rem, 3vw, 2rem);
    margin-top: clamp(0rem, 4vw, 0.5rem);
    padding-bottom: 0.2rem;
    font-size: clamp(1.5rem, 5.5vw, 2rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) left bottom / 100% 2px no-repeat;
    transition: background-size var(--t) var(--ease), opacity var(--t) var(--ease);
}
.contact-link:hover { background-size: 0% 2px; background-position: right bottom; opacity: 0.8; }

.site-footer {
    padding-block: 2rem;
    font-size: 0.875rem;
    color: var(--ink-soft);
}
.footer-inner { padding-inline: var(--edge); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }

/* 10. RESPONSIVE ----------------------------------------------------------- */

/* Tablet quer / kleiner Laptop */
@media (max-width: 1024px) {
    .event { grid-template-columns: 7rem minmax(0, 1fr) minmax(0, 12rem) 1.5rem; gap: 0.4rem 1rem; }
}

/* Mobile Navigation */
@media (max-width: 860px) {
    .nav { display: flex; }
    .logo { margin-right: auto; }

    .js .nav-toggle { display: grid; }

    .js .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem var(--edge) 1.25rem;
        background: rgba(var(--bg-rgb), 0.97);
        border-bottom: 1px solid var(--ink-line);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t);
    }
    .js .nav-menu.is-open { opacity: 1; visibility: visible; transform: none; }

    .js .nav-menu li + li { border-top: 1px solid var(--ink-line); }
    .js .nav-menu a { padding: 0.95rem 0; font-size: 1.25rem; }
    .js .nav-menu a::after { left: 0; right: auto; width: 2rem; bottom: 0.55rem; }

    /* ohne JS: Menü einfach unter dem Logo umbrechen */
    :root:not(.js) .nav { flex-wrap: wrap; height: auto; padding-block: 0.75rem; }
    :root:not(.js) .nav-menu { order: 3; width: 100%; flex-wrap: wrap; }

    .section-title { letter-spacing: -0.04em; }
}

/* Smartphones */
@media (max-width: 700px) {
    :root { --nav-h: 4rem; }

    .grid-videos { grid-template-columns: 1fr; }

    .event {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "date arrow"
            "title title"
            "place place";
        padding: 1rem 0.5rem;
    }
    .event-place { text-align: left; }

    .player { height: 560px; }
}

@media (max-width: 600px) {
    .slideshow {
        height: clamp(360px, 70vh, 560px); /* Fallback ohne svh */
        height: clamp(360px, 70svh, 560px);
    }

    .slideshow::after { background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 60%); }
}

/* Sehr große Bildschirme */
@media (min-width: 1600px) {
    body { font-size: 1.0625rem; }
}

/* Bewegung reduzieren */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   RECHTLICHES (rechtliches.html) – Ergänzungen, Präfix legal-
   ========================================================================== */
.legal-footer-link {
    margin-left: auto;
    text-decoration: none;
    transition: color var(--t) var(--ease);
}
.legal-footer-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.25em; }

.legal-main {
    padding-top: calc(var(--nav-h) + clamp(2rem, 6vw, 4rem));
    padding-bottom: clamp(3rem, 8vw, 6rem);
}

.legal-intro { margin-bottom: clamp(2rem, 5vw, 3rem); }
.legal-intro .section-title { margin-bottom: 1.25rem; }

.legal-jump { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.legal-jump a {
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--ink-line);
    border-radius: 999px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.legal-jump a:hover { background: var(--surface); border-color: var(--ink); }

.legal-panel {
    padding: clamp(1.5rem, 4vw, 3.25rem);
    border-radius: var(--radius);
    background: var(--surface);
    scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.legal-panel + .legal-panel { margin-top: clamp(1.5rem, 4vw, 3rem); }

.legal-heading {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--ink-line);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.04em;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.legal-prose { max-width: 46rem; }
.legal-prose h3 {
    margin: 2.25rem 0 0.6rem;
    font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}
.legal-prose h3:first-child { margin-top: 0; }
.legal-prose p,
.legal-prose li { font-size: 1rem; line-height: 1.7; }
.legal-prose p + p,
.legal-prose p + ul,
.legal-prose ul + p { margin-top: 0.85rem; }
.legal-prose ul { padding-left: 1.25rem; list-style: disc; }
.legal-prose li + li { margin-top: 0.3rem; }
.legal-prose a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(10, 24, 1, 0.4);
    text-underline-offset: 0.2em;
    overflow-wrap: anywhere;
    transition: text-decoration-color var(--t) var(--ease);
}
.legal-prose a:hover { text-decoration-color: var(--ink); }

.legal-facts {
    display: grid;
    grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr);
    gap: 0.35rem 1.5rem;
    max-width: 46rem;
}
.legal-facts dt { font-weight: 600; }
.legal-facts dd { margin: 0 0 0.9rem; }

/* Platzhalter und Prüfhinweise – vor Veröffentlichung entfernen */
.legal-todo {
    padding: 0.05em 0.35em;
    border-radius: 4px;
    background: rgba(255, 238, 120, 0.85);
    font-weight: 500;
}
.legal-note {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-left: 4px solid var(--ink);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgba(255, 238, 120, 0.6);
    font-size: 0.92rem;
    line-height: 1.55;
}

@media (max-width: 700px) {
    .legal-facts { grid-template-columns: 1fr; gap: 0; }
    .legal-facts dt { margin-top: 0.4rem; }
    .legal-prose h3 { margin-top: 1.9rem; }
}
