/* Hu-dances – Gestaltung angelehnt an die bisherige Website */

@font-face {
    font-family: "Yanone Kaffeesatz";
    src: url("../fonts/yanone-kaffeesatz-latin.woff2") format("woff2");
    font-weight: 200 700;
    font-display: swap;
}
@font-face {
    font-family: "Crushed";
    src: url("../fonts/crushed-latin.woff2") format("woff2");
    font-display: swap;
}
@font-face {
    font-family: "Satisfy";
    src: url("../fonts/satisfy-latin.woff2") format("woff2");
    font-display: swap;
}

:root {
    --bg: #180410;
    --bg-light: #3b0a27;
    --bg-dark: #14030d;
    --accent: #ffcf46;
    --text: #ffffff;
    --line: #795a00;
    --canceled: #a51e28;
    --font-text: "Yanone Kaffeesatz", Helvetica, Arial, sans-serif;
    --font-title: "Crushed", Georgia, serif;
    --font-quote: "Satisfy", Georgia, serif;
    --header-height: 80px;
    --header-height-large: 161px;
}

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

html {
    scroll-padding-top: calc(var(--header-height) + 1rem);
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-text);
    font-weight: 300;
    font-size: 1.5rem;
    line-height: 1.5;
    padding-top: var(--header-height);
}

main {
    background: linear-gradient(to bottom, var(--bg-light) 0%, var(--bg) 15%);
}

h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: normal;
    line-height: 1.2;
    color: var(--accent);
    margin: 0 0 0.5em;
}
h1 { font-size: 1.25em; }
h2 { font-size: 1.125em; }
h3 { font-size: 1em; }

p, ul, dl { margin: 0 0 1.5em; }
strong { font-weight: 700; letter-spacing: 0.03em; }

a { color: var(--text); }
a:hover, a:focus { background: var(--accent); color: var(--bg); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

.wrapper {
    max-width: 44rem;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skiplink {
    position: absolute;
    left: -9999px;
}
.skiplink:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10;
    padding: 0.5rem 1rem;
}

/* Kopf */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    height: var(--header-height);
    background: var(--bg);
    border-bottom: 1px dotted var(--line);
}
.site-header .wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
}
.logo { display: block; flex: none; }
.logo:hover, .logo:focus { background: transparent; }
.logo img { display: block; width: 60px; }

.mainnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 1.125em;
}
.mainnav a { text-decoration: none; }
.mainnav a:hover, .mainnav a:focus { background: transparent; color: var(--accent); }

/* Breite Bildschirme: Logo links neben der Textspalte, Navigation bündig mit dem Text */
@media (min-width: 64rem) {
    .logo { position: absolute; top: 14px; left: -160px; width: 60px; }
    .logo img { width: 100%; }
    .mainnav { gap: 0 3rem; }
}

/* Grosser Kopf, der beim Scrollen schrumpft (nur in Browsern mit scroll-gesteuerten Animationen) */
@supports (animation-timeline: scroll()) {
    @media (min-width: 64rem) {
        /* Grundzustand gross, falls die Seite nicht scrollbar ist (Animation dann inaktiv) */
        body { padding-top: var(--header-height-large); }
        .site-header { height: var(--header-height-large); }
        .site-header .wrapper { padding-bottom: 36px; }
        .logo { width: 121px; top: 32px; }
        .site-header,
        .site-header .wrapper,
        .logo {
            animation-timing-function: linear;
            animation-fill-mode: both;
            animation-timeline: scroll(root);
            animation-range: 0 81px;
        }
        .site-header { animation-name: header-shrink; }
        .site-header .wrapper { animation-name: nav-shift; align-items: flex-end; }
        .logo { animation-name: logo-shrink; }
    }
}
@keyframes header-shrink {
    from { height: var(--header-height-large); }
    to { height: var(--header-height); }
}
@keyframes nav-shift {
    from { padding-bottom: 36px; }
    to { padding-bottom: 20px; }
}
@keyframes logo-shrink {
    from { width: 121px; top: 32px; }
    to { width: 60px; top: 14px; }
}

/* Startseite */

.intro .wrapper { padding-top: 2.5rem; }
.lead { font-size: 1.05em; }

.content-section { padding: 1rem 0; }
.image-section + .content-section {
    background: linear-gradient(to bottom, var(--bg-light) 0%, var(--bg-dark) 100%);
}

.image-section {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 22rem;
    overflow: hidden;
}
.image-section img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quote {
    position: relative;
    max-width: 40rem;
    margin: 0;
    padding: 1.5rem;
    font-family: var(--font-quote);
    font-size: 1.5em;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 1px 4px #000;
}
.quote p { margin: 0; }
.quote cite {
    display: block;
    margin-top: 0.5em;
    font-size: 0.667em;
    font-style: normal;
}
.quote-inline { text-shadow: none; color: var(--accent); }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
}
.gallery img { display: block; width: 100%; border-radius: 4px; }

.location { margin-bottom: 1.5em; }
.location-links { font-size: 0.9em; }

/* Liste der Anlässe */

.eventlist { padding-left: 2.2em; }
.eventlist-item { margin-bottom: 2.5em; }
/* Raster: Datum allein auf der ersten Zeile, darunter links die Zeiten, rechts Ort, Untertitel und Mitwirkende */
.eventlist-item > article > a {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-areas:
        "date date"
        "badge badge"
        "times location"
        "times info";
    grid-template-rows: auto auto auto 1fr;
    column-gap: 40px;
    text-decoration: none;
}
.eventlist-item > article > a:hover,
.eventlist-item > article > a:focus { background: transparent; color: var(--text); }
.eventlist-item a:hover .eventlist-location::before,
.eventlist-item a:focus .eventlist-location::before { content: "→ "; }
.eventlist-title { display: contents; }
.eventlist-date { grid-area: date; margin-bottom: 0.25em; color: var(--text); font-family: var(--font-text); font-weight: 300; }
.eventlist-location { grid-area: location; font-size: 1.125em; }
.eventlist-item .badge-canceled { grid-area: badge; justify-self: start; }
.eventlist-times { grid-area: times; }
.eventlist-info { grid-area: info; }
.eventlist-subtitle {
    display: inline-block;
    margin: 0 0 0.25em;
    padding: 0 0.25em;
    background: var(--accent);
    color: #000;
    border-radius: 5px;
    font-family: var(--font-title);
    font-size: 1.125em;
}
.eventlist-times, .eventlist-artists { margin: 0; }

/* Aufklappbare Details: gelber Knopf rechts, darunter Bild und Text */
.eventlist-note summary {
    display: block;
    width: 30px;
    height: 30px;
    margin: 0.25em 0 0 auto;
    background: var(--accent);
    color: #000;
    border-radius: 5px;
    font-weight: 700;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    opacity: 0.8;
}
.eventlist-note summary::-webkit-details-marker { display: none; }
.eventlist-note summary::before { content: "+"; content: "+" / ""; }
.eventlist-note[open] summary::before { content: "−"; content: "−" / ""; }
.eventlist-note summary:hover,
.eventlist-note summary:focus-visible { opacity: 1; color: var(--text); }
.eventlist-note summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Weiches Auf- und Zuklappen (Browser ohne ::details-content ignorieren die Regeln und klappen ohne Übergang) */
.eventlist-note { interpolate-size: allow-keywords; }
.eventlist-note::details-content {
    height: 0;
    opacity: 0;
    overflow: clip;
    transition: height 0.35s ease-in-out, opacity 0.35s ease-in-out, content-visibility 0.35s ease-in-out allow-discrete;
}
.eventlist-note[open]::details-content { height: auto; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .eventlist-note::details-content { transition: none; }
}
.eventlist-note-content {
    margin-top: 0.5em;
    padding: 0.5em;
    border: 1px dotted #9e795b;
    border-radius: 7px;
}
.eventlist-note-content img {
    display: block;
    margin: -0.5em -0.5em 0.5em;
    max-width: calc(100% + 1em);
    border-radius: 7px 7px 0 0;
}
.eventlist-note-text > :last-child { margin-bottom: 0.5em; }
.eventlist-note-more { margin: 0; text-align: right; }

.is-canceled .eventlist-date,
.is-canceled .eventlist-location { text-decoration: line-through; }

.badge-canceled {
    display: inline-block;
    margin: 0.25em 0;
    padding: 0 0.4em;
    background: var(--canceled);
    color: #fff;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Detailseite Anlass */

.event header { margin: 1.5rem 0 1rem; }
.event-date { margin: 0; }
.event h1 { font-size: 1.5em; margin-bottom: 0.25em; }
.event-subtitle { font-family: var(--font-title); color: var(--accent); }
.event-times { display: flex; flex-wrap: wrap; gap: 0 2rem; }
.event-times div { display: flex; gap: 0.4em; }
.event-times dt::after { content: ":"; }
.event-times dd { margin: 0; font-weight: 700; }
.event-image { margin: 1.5em 0; }
.event-image img { display: block; border-radius: 7px; }
.event-location {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px dotted var(--line);
}
.back { margin-top: 2em; }

.button {
    display: inline-block;
    padding: 0.2em 0.8em;
    background: var(--accent);
    color: var(--bg);
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
}

/* Fuss */

.site-footer {
    margin-top: 2rem;
    border-top: 1px dotted var(--line);
    font-size: 0.85em;
    text-align: center;
}
.site-footer p { margin: 0.25em 0; }

/* Sprunglink zum Seitenanfang: runder Knopf mit Winkel nach oben */
.totop {
    position: relative;
    display: block;
    width: 33px;
    height: 33px;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: rotate(45deg) scale(0.8);
    transition: transform 0.25s ease-in-out;
}
.totop::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 12px;
    width: 15px;
    height: 15px;
    border-top: 3px solid var(--bg);
    border-left: 3px solid var(--bg);
}
.totop:hover, .totop:focus { background: rgba(255, 255, 255, 0.4); transform: rotate(45deg) scale(1); }
@media (prefers-reduced-motion: reduce) {
    .totop { transition: none; }
}

@media (max-width: 40rem) {
    .eventlist { padding-left: 1em; }
}

@media (max-width: 30rem) {
    body { font-size: 1.3rem; }
    .wrapper { padding-left: 1rem; padding-right: 1rem; }
    .eventlist-item > article > a {
        grid-template-columns: 1fr;
        grid-template-areas: "date" "location" "badge" "times" "info";
        grid-template-rows: none;
    }
    .site-header .wrapper { gap: 1rem; }
    .image-section { min-height: 16rem; }
    .quote { font-size: 1.25em; }
}

@media print {
    .site-header, .site-footer, .skiplink, .eventlist-note summary { display: none; }
    body { background: #fff; color: #000; padding-top: 0; }
    main { background: none; }
    h1, h2, h3 { color: #000; }
}
