@font-face {
    font-family: 'Sombra';
    src: url('assets/fonts/Sombra-Bold.woff2') format('woff2'),
         url('assets/fonts/Sombra-Bold.woff')  format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Sombra';
    src: url('assets/fonts/Sombra-Black.woff2') format('woff2'),
         url('assets/fonts/Sombra-Black.woff')  format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --pink:   #FF6DBE;
    --orange: #FD5300;
    --green:  #37FF00;
    --ink:    #161616;
    --paper:  #FFFFFF;

    --sp-inset-x: clamp(16px, 3vw, 44px);
    --sp-inset-top: clamp(16px, 3vw, 44px);
    --sp-inset-bottom: clamp(5rem, 11vh, 8rem);   /* subpage content stops above the footer */
    --sp-bg-outset-bottom: clamp(40px, 8vh, 120px); /* bg extends BELOW the viewport */
    --sp-content-top-gap: 1rem;   /* breathing room between wobble bg top edge and the scroll container */
}

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

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--pink);
    color: var(--paper);
    font-family: 'Sombra', system-ui, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }

/* ════════════ LAYER A: page background (mushrooms) ════════════ */
/* script.js fetches the tile SVG and injects a live <svg> as a body child.
   has-mushroom-bg suppresses the hero's static fallback background. */
body.has-mushroom-bg .hero {
    background: transparent !important;
    animation: none !important;
}

.hero-bg-mushrooms {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.hero-bg-mushrooms svg {
    position: absolute;
    top: 0;
    left: 50%;
    width: var(--svg-w, 110vw);
    height: auto;
    animation: hero-mushrooms-drift 75s linear infinite;
}
@keyframes hero-mushrooms-drift {
    from { transform: translate(-50%, 0); }
    to   { transform: translate(-50%, calc(-100% / var(--rows, 3))); }
}

.hero-bg-mushrooms .m-wiggle {
    transform-origin: 0 0;
    animation: hero-m-wiggle var(--wt, 5s) ease-in-out infinite;
    animation-delay: var(--wd, 0s);
    will-change: transform;
}
@keyframes hero-m-wiggle {
    0%, 100% { transform: rotate(0deg)  scale(1);    }
    25%      { transform: rotate(3deg)  scale(0.97); }
    50%      { transform: rotate(0deg)  scale(0.93); }
    75%      { transform: rotate(-3deg) scale(0.97); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg-mushrooms svg,
    .hero-bg-mushrooms .m-wiggle { animation: none; }
}

/* ════════════ LAYER B: hero (home content) ════════════ */
.hero {
    height: 100svh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem) var(--sp-inset-bottom);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "info"
        "wordmark"
        "tickets";
    justify-items: center;
    row-gap: clamp(1rem, 3vw, 2rem);
    background-image: url('assets/mushrooms-bg.svg');
    background-size: 110vw auto;
    background-repeat: repeat;
    background-position: 50% 0;
    background-color: var(--pink);
    position: relative;
    z-index: 1;
    animation: hero-bg-drift-mobile 70s linear infinite;
}

@keyframes hero-bg-drift-mobile {
    from { background-position: 50% 0vw; }
    to   { background-position: 50% -110vw; }
}

@media (min-width: 820px) {
    .hero {
        background-size: 55vw auto;
        animation-name: hero-bg-drift-desktop;
        /* Two equal halves: wordmark centred in the left half, info + tickets
           stacked and centred in the right half. */
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr auto auto 1fr;
        grid-template-areas:
            "wordmark ."
            "wordmark info"
            "wordmark tickets"
            "wordmark .";
        column-gap: 0;
        row-gap: clamp(0.75rem, 1.5vw, 1.25rem);
    }
    .wordmark  { justify-self: center; align-self: center; }
    .hero-info { text-align: center; justify-self: center; align-self: end; }
    .tickets   { justify-self: center; align-self: start; margin-top: clamp(0.75rem, 1.5vw, 1.5rem); }
}
@keyframes hero-bg-drift-desktop {
    from { background-position: 50% 0vw; }
    to   { background-position: 50% 55vw; }
}
@media (prefers-reduced-motion: reduce) {
    .hero { animation: none; }
}

.hero-info, .wordmark, .tickets { position: relative; z-index: 1; }

.hero-info { grid-area: info; }
.wordmark  { grid-area: wordmark; }
.tickets   { grid-area: tickets; }

.hero-info {
    display: flex;
    flex-direction: column;
    gap: clamp(0.4rem, 1.5vw, 1rem);
    text-align: center;
    font-weight: 900;
    line-height: 1;
}
.hero-info p {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.18rem, 0.6vw, 0.4rem);
}
.hero-info__venue { font-size: clamp(1.35rem, 5vw, 2.2rem); line-height: 1.05; }
.hero-info__date  { font-size: clamp(2rem, 7vw, 3.8rem);    line-height: 0.95; }

.wordmark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
}
.wordmark img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}
.wordmark .wordmark-svg {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
}

.wordmark .wm-white {
    stroke: white;
    stroke-width: 0;
    stroke-linejoin: round;
    paint-order: stroke fill;
}
.wordmark .wm-green {
    stroke: rgb(55, 255, 0);
    stroke-width: 0;
    stroke-linejoin: round;
    paint-order: stroke fill;
}
.wordmark.is-bumping            { animation: wm-bump-scale 0.85s linear; }
.wordmark.is-bumping .wm-white  { animation: wm-pulse-white 0.85s linear; }
.wordmark.is-bumping .wm-green  { animation: wm-pulse-green 0.85s linear; }

@keyframes wm-bump-scale {
    0%   { transform: scale(1);     }
    8%   { transform: scale(1.035); }
    20%  { transform: scale(0.985); }
    35%  { transform: scale(1);     }
    100% { transform: scale(1);     }
}
@keyframes wm-pulse-white {
    0%   { stroke-width:  0; }
    8%   { stroke-width: 32; }
    20%  { stroke-width: 12; }
    35%  { stroke-width:  0; }
    100% { stroke-width:  0; }
}
@keyframes wm-pulse-green {
    0%   { stroke-width:  0; }
    8%   { stroke-width: 24; }
    20%  { stroke-width:  9; }
    35%  { stroke-width:  0; }
    100% { stroke-width:  0; }
}

@media (max-width: 819px) {
    .wordmark { margin-inline: calc(-1 * clamp(1rem, 3vw, 2rem)); }
    .wordmark img, .wordmark .wordmark-svg { transform: scale(1.2); }

    /* Subpage content bottom inset is pushed up on mobile (variable override). */
    :root {
        --sp-inset-bottom: clamp(6rem, 14vh, 9rem);
        --sp-inset-top: clamp(8px, 1.5vw, 16px);
    }

    /* Push the venue/date stack below the top-right social icons. */
    .hero-info { margin-top: clamp(3.5rem, 11vw, 5rem); }
}

.tickets {
    justify-self: center;
    display: inline-block;
    padding: 1.1rem 2.6rem;
    background: var(--ink);
    color: var(--paper);
    font-weight: 900;
    font-size: clamp(1.3rem, 2.4vw, 1.85rem);
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
    /* Reuse the animated subpage-bg wobble clip — same id, so the button
       wobbles in sync with the rest of the site. */
    clip-path: url(#overlay-wobble-clip);
    -webkit-clip-path: url(#overlay-wobble-clip);
}
.tickets:hover { transform: translateY(-2px); background: var(--green); color: var(--ink); }

/* Social links — sit just inside the wobble area so the subpage-bg slides
   up and over them when a subpage opens (z-index < .subpage-bg). */
.hero-socials {
    position: fixed;
    top:   calc(var(--sp-inset-top) + clamp(0.5rem, 1.5vw, 1rem));
    right: calc(var(--sp-inset-x) + clamp(1rem, 3vw, 2rem));
    z-index: 2;
    display: flex;
    gap: clamp(0.6rem, 1.5vw, 1rem);
    color: var(--paper);
}
.hero-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width:  clamp(2rem, 4.5vw, 2.5rem);
    height: clamp(2rem, 4.5vw, 2.5rem);
    transition: color 0.15s ease, transform 0.15s ease;
}
.hero-socials a:hover { color: var(--ink); transform: scale(1.12); }
.hero-socials svg { width: 100%; height: 100%; display: block; }

/* ════════════ LAYER C: shared black wobbly subpage bg ════════════ */
.subpage-bg {
    position: fixed;
    top:    var(--sp-inset-top);
    left:   var(--sp-inset-x);
    right:  var(--sp-inset-x);
    bottom: calc(-1 * var(--sp-bg-outset-bottom));   /* outset past the viewport bottom */
    background: var(--ink);
    z-index: 5;
    pointer-events: none;          /* decorative; clicks fall through */
    transform: translateY(110%);
    transition: transform 0.42s cubic-bezier(0.2, 0.75, 0.25, 1);
    clip-path: url(#overlay-wobble-clip);
    -webkit-clip-path: url(#overlay-wobble-clip);
    will-change: transform;
}
.subpage-bg.is-open { transform: translateY(0); }

/* ════════════ LAYER D: subpage containers ════════════ */
.subpage {
    position: fixed;
    /* shrunk on top by --sp-content-top-gap so scrolled content gets cleanly
       clipped *below* the wobble's deepest valley, mirroring the left/right
       breathing room between bg and content. */
    top:    calc(var(--sp-inset-top) + var(--sp-content-top-gap));
    left:   var(--sp-inset-x);
    right:  var(--sp-inset-x);
    bottom: var(--sp-inset-bottom);
    z-index: 6;
    opacity: 0;
    pointer-events: none;
    /* fast fade-out on close; bg slide-down handles the rest. */
    transition: opacity 0.15s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1.75rem, 5vw, 3rem);
    color: var(--paper);
}
.subpage.is-open {
    opacity: 1;
    pointer-events: auto;
    /* wait for the bg to slide up before fading the content in. */
    transition: opacity 0.22s ease 0.32s;
}
.subpage {
    user-select: none;
    -webkit-user-select: none;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* legacy Edge / IE */
}
.subpage::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* Centre text-heavy content. */
.subpage > * { max-width: 960px; margin-left: auto; margin-right: auto; }

.subpage p {
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    line-height: 1.4;
    margin: 0 0 0.8rem;
}
.subpage a {
    color: var(--pink);
    text-decoration: underline;
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.2em;
}
.subpage a:hover { color: var(--green); }
.subpage strong { color: var(--green); }
.subpage .placeholder { opacity: 0.85; }

/* Lageplan: full-bleed image, no scroll. */
.subpage--bleed {
    padding: clamp(1rem, 2.5vw, 2rem);
    overflow: hidden;
}
.subpage--bleed > * { max-width: none; }
.lageplan-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* ════════════ LAYER E: footer (always on top) ════════════ */
.hero-nav {
    position: fixed;
    bottom: clamp(0.75rem, 2vw, 1.5rem);
    /* match the subpage's content edge: outer inset + the subpage's own horizontal padding */
    left:  calc(var(--sp-inset-x) + clamp(1.75rem, 5vw, 3rem));
    right: calc(var(--sp-inset-x) + clamp(1.75rem, 5vw, 3rem));
    z-index: 20;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: clamp(0.15rem, 0.6vw, 0.4rem);
    font-size: clamp(1.2rem, 4.5vw, 1.8rem);
    font-weight: 900;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;          /* let the links themselves take clicks */
}
.hero-nav a, .hero-nav .dot { pointer-events: auto; }

.hero-nav a {
    display: inline-block;
    position: relative;
    z-index: 0;
    padding: 0.1em 0.45em;
    transform-origin: center;
    transition: transform 0.18s ease, color 0.18s ease;
}
.hero-nav a:hover,
.hero-nav a:focus-visible {
    color: var(--ink);
    transform: scale(1.18);
}
/* When a subpage is open, the footer sits over the black wobble — invert hover. */
body[data-route]:not([data-route="home"]) .hero-nav a:not(.is-active):hover,
body[data-route]:not([data-route="home"]) .hero-nav a:not(.is-active):focus-visible {
    color: var(--green);
}

.hero-nav .nav-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: visible;
}
.hero-nav .nav-bg path {
    fill: transparent;
    stroke: transparent;
    transition: fill 0.18s ease, stroke 0.18s ease;
    vector-effect: non-scaling-stroke;
}
.hero-nav a.is-active {
    color: var(--ink);
    transform: scale(1.18);
}
.hero-nav a.is-active .nav-bg path {
    fill: var(--green);
    stroke: var(--paper);
    stroke-width: 4;
}
.hero-nav .dot { opacity: 0.7; }

/* ════════════ LINEUP ════════════ */

.lineup {
    display: grid;
    /* `min(100%, 320px)` lets the track shrink below 320px when the container
       is narrower than that, preventing horizontal overflow on small phones. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: clamp(1.5rem, 4vw, 3rem);
}
.lineup-day h3 {
    font-weight: 900;
    font-size: 5rem;            /* JS shrinks this to fit one column on one line */
    line-height: 1;
    margin: 0 0 1.25rem;
    white-space: nowrap;
    -webkit-text-stroke: 0.5px currentColor;
}

.lineup-act {
    display: block;
    padding: 0.7rem 0;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    border-bottom: 1px solid rgba(255,255,255,0.18);
}
.lineup-act--plain,
.lineup-act > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
    align-items: center;
}
.lineup-act > summary { padding: 0; border: 0; cursor: pointer; list-style: none; }
.lineup-act > summary::-webkit-details-marker { display: none; }

.lineup-act__name {
    font-weight: 900;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    line-height: 1.05;
    min-width: 0;
    overflow-wrap: anywhere;
    transition: color 0.18s ease;
}
/* Expanded state: highlight the name green on every device. */
.lineup-act[open] > summary .lineup-act__name { color: var(--green); }

/* Hover affordance: only on devices with a real hover (touch taps would
   otherwise leave the name stuck green after collapse). */
@media (hover: hover) {
    .lineup-act:not(.lineup-act--plain) > summary:hover .lineup-act__name {
        color: var(--green);
    }
}

.lineup-act__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    line-height: 1.1;
    white-space: nowrap;
}
.lineup-act__time {
    font-weight: 700;
    font-size: 0.9em;
}
.lineup-act__stage {
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0.75;
}
.lineup-act__stage[data-stage="wiese"]   { color: var(--green); opacity: 1; }
.lineup-act__stage[data-stage="bruecke"] { color: var(--pink);  opacity: 1; }

/* details rows are still clickable; the bio simply expands below. */
.lineup-act > summary { cursor: pointer; }

.lineup-act__body {
    padding: 0.7rem 0 0.3rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.45;
}
.lineup-act__bio   { margin: 0 0 0.7rem; }
.lineup-act__image {
    display: block;
    width: 100%;
    max-height: 20rem;
    object-fit: cover;
    border-radius: 0.5rem;
    margin: 0.2rem 0 0.8rem;
}
.lineup-act__links { margin: 0; font-weight: 700; }
.lineup-act__links a {
    text-decoration: underline;
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.2em;
}
.lineup-act__links a:hover { color: var(--green); }

@media (max-width: 600px) {
    .lineup-act__name {
        font-size: clamp(1.2rem, 5vw, 1.6rem);
    }
    .lineup-act--plain,
    .lineup-act > summary {
        column-gap: 0.75rem;
    }
    .lineup {
        row-gap: clamp(3rem, 9vw, 5rem);
    }
}

/* ════════════ INFO CONTENT (markdown) ════════════ */

.info-content {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.5;
}
.info-content h2 {
    font-family: inherit;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    margin: 2rem 0 0.5rem;
    line-height: 1.1;
    color: var(--paper);
}
.info-content h2:first-child { margin-top: 0; }
.info-content p { margin: 0 0 0.9rem; }
.info-content a {
    text-decoration: underline;
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.2em;
    font-weight: 700;
}
.info-content a:hover { color: var(--green); }
.info-content strong { font-weight: 900; }

/* ════════════ SPONSORS ════════════ */

.sponsors {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--paper);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
    align-items: center;
    justify-items: center;
}
.sponsor {
    display: grid;
    place-items: center;
    background: var(--paper);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    width: 100%;
    aspect-ratio: 5 / 3;
    transition: transform 0.15s ease;
}
.sponsor:hover { transform: translateY(-2px); }
.sponsor img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* ════════════ GALLERY ════════════ */

.gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
@media (min-width: 820px) {
    .gallery { grid-template-columns: repeat(2, 1fr); }
}
.gallery__tile {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.35rem;
    background: rgba(255,255,255,0.06);
}


/* Mobile footer breathing room — placed AFTER the .hero-nav rule so it wins. */
@media (max-width: 819px) {
    .hero-nav {
        bottom: clamp(1.5rem, 4vh, 2.5rem);
    }
}
