/* =========================================================
   Y2K26 Loopfest Slovakia
   Minimalist black-on-white, editorial typography.
   ========================================================= */

:root {
    --ink:      #0d0d0d;
    --muted:    #6b6b6b;
    --line:     #e4e1da;
    --paper:    #ffffff;
    --paper-alt:#f5f3ee;
    --accent:   #0d0d0d;
    --maxw:     1080px;
    --serif:    "Cormorant Garamond", Georgia, serif;
    --sans:     "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

/* Offset anchor jumps by the sticky header's height so section headings don't
   land hidden behind it. --header-h is kept in sync with the real header height
   by js/site.js (it grows on mobile, where the nav wraps to its own row); the
   fallback covers the desktop single-row header before the script runs. */
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h, 76px); }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Bilingual visibility ---------- */
.lang { display: none !important; }
.lang-en .lang.en { display: revert !important; }
.lang-sk .lang.sk { display: revert !important; }

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 0.5rem + 1.4vw, 2.2rem);
    padding: clamp(0.6rem, 0.4rem + 0.8vw, 1.1rem) clamp(1.25rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.brand {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: var(--ink);
    margin-right: auto;
}
.nav {
    display: flex;
    gap: clamp(0.9rem, 0.5rem + 1vw, 1.8rem);
    flex-wrap: wrap;
}
.nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: clamp(0.72rem, 0.62rem + 0.5vw, 0.95rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: color 0.2s;
}
.nav a:hover { color: var(--ink); }

.lang-switch { display: flex; gap: 0.25rem; }
.lang-switch button {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: clamp(0.66rem, 0.6rem + 0.3vw, 0.82rem);
    letter-spacing: 0.1em;
    padding: clamp(0.26rem, 0.2rem + 0.2vw, 0.34rem) clamp(0.45rem, 0.35rem + 0.4vw, 0.65rem);
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
}
.lang-switch button.is-active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(4rem, 12vw, 9rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 8vw, 6rem);
    text-align: center;
}
.hero__kicker {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 1.5rem;
}
.hero__heading {
    margin: clamp(1.25rem, 3vw, 2rem) 0 0;
}
.hero__lead {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    color: var(--muted);
    margin: 2rem auto 0;
    max-width: 30ch;
}
.hero__image {
    display: block;
    width: 100%;
    max-width: 1080px;
    height: auto;
    margin: 0 auto;
}

/* Centered accent image inside a section */
.figure {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
    margin: 0 auto clamp(2rem, 5vw, 3rem);
}

/* Statement: image and prose side by side, spanning the content width. */
.statement {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
}
.statement__image {
    flex: 0 0 38%;
    width: 38%;
    max-width: 360px;
    height: auto;
    align-self: stretch;
    object-fit: cover;
}
.statement__prose {
    flex: 1 1 auto;
    max-width: none;
    margin: 0;
    text-align: left;
}
@media (max-width: 720px) {
    .statement { flex-direction: column; }
    .statement__image { flex-basis: auto; width: 100%; max-width: 420px; margin-inline: auto; }
    .statement__prose { text-align: center; }
}

/* ---------- Sections ---------- */
.section {
    padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.25rem, 4vw, 3rem);
}
.section--alt { background: var(--paper-alt); }
.section__title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(1.8rem, 5vw, 3rem);
    text-align: center;
    margin: 0 auto clamp(2rem, 5vw, 3.5rem);
    max-width: var(--maxw);
}

.prose {
    max-width: 60ch;
    margin: 0 auto;
}
.prose--centered { text-align: center; }
.prose--small { font-size: 0.92rem; color: var(--muted); margin-top: 2.5rem; }
.prose p { margin: 0 0 1.1rem; }
.prose__sign {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

/* ---------- Program ---------- */
.program {
    list-style: none;
    counter-reset: none;
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
}
.program__item {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
}
.program__item:last-child { border-bottom: 1px solid var(--line); }
.program__date {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}
.program__detail h3 {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    font-weight: 500;
}
.program__detail p { margin: 0; color: var(--muted); }

/* Program — expandable lineup/program section */
.program__ectb-wrap { margin-top: 0.8rem; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.program__ectb {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    font: inherit;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.program__ectb:hover { color: var(--ink); border-color: var(--ink); }
.program__ectb--tickets { text-decoration: none; }
/* One Tickets button at a time: under the Program button when collapsed,
   under the expanded content when open. The in-expand copy is clipped while
   collapsed; here we hide the top copy once the item opens. */
.program__item.is-open > .program__detail > .program__ectb-wrap .program__ectb--tickets { display: none; }
.program__ectb-icon {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.25s ease;
}
.program__item.is-open .program__ectb-icon { transform: translateY(1px) rotate(225deg); }

.program__expand { overflow: hidden; max-height: 0; transition: max-height 0.35s ease; }
.program__expand-inner { padding-top: 1.3rem; }

/* Intro: text + small image at the right */
.program__intro { display: flex; gap: 1.2rem; align-items: flex-start; margin-bottom: 1.4rem; }
.program__intro-text { flex: 1 1 auto; min-width: 0; }
.program__intro-img {
    flex: 0 0 auto;
    width: clamp(96px, 26%, 150px);
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}
.program__intro-text p:first-child,
.program__outro-text p:first-child { margin-top: 0; }
.program__intro-text p:last-child,
.program__outro-text p:last-child { margin-bottom: 0; }

/* Lineup list */
.lineup { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.lineup__row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--line);
}
.lineup__row:first-child { border-top: 0; }
.lineup__avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--paper-alt) center / cover no-repeat;
    border: 1px solid var(--line);
}
.lineup__when {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    width: 3.6rem;
    line-height: 1.15;
}
.lineup__date { font-size: 0.85rem; font-weight: 600; }
.lineup__time { font-size: 0.72rem; color: var(--muted); }
.lineup__name { flex: 1 1 auto; min-width: 0; font-weight: 500; }
.lineup__country {
    flex: 0 0 auto;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
}

/* Outro: image at the left + text */
.program__outro { display: flex; gap: 1.2rem; align-items: flex-start; }
.program__outro-img {
    flex: 0 0 auto;
    width: clamp(96px, 30%, 170px);
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}
.program__outro-text { flex: 1 1 auto; min-width: 0; }

@media (max-width: 640px) {
    .program__intro { flex-direction: column; }
    .program__outro { flex-direction: column-reverse; }
    .program__intro-img, .program__outro-img { width: 55%; max-width: 200px; align-self: flex-start; }
}

/* ---------- Artists ---------- */
.artists {
    max-width: var(--maxw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 4vw, 3rem);
}
.artist { display: flex; flex-direction: column; }
.artist__photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: #e9e6df;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.artist__photo-img {
    position: absolute;
    inset: 0;
    background: center/cover no-repeat;
    transition: transform 0.6s ease;
}
.artist:hover .artist__photo-img { transform: scale(1.045); }
.artist__placeholder {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    color: #b3ad9f;
}
.artist__name {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.35rem;
    margin: 0 0 0.5rem;
}
.artist__country {
    font-family: var(--sans);
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--muted);
    vertical-align: middle;
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 0.1rem 0.4rem;
    margin-left: 0.4rem;
}
.artist__body { display: flex; flex-direction: column; }
.artist__body p { margin: 0; color: #333; font-size: 0.96rem; }

/* Bio is clamped to a uniform height; the toggle expands it. */
.artist__bio {
    position: relative;
    overflow: hidden;
    max-height: 9rem; /* ~5 lines; keeps every card the same height */
    transition: max-height 0.45s ease;
}
.artist__bio p + p { margin-top: 0.6rem; }
/* Fade-out hint at the bottom while collapsed. */
.artist__bio::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.25rem;
    background: linear-gradient(rgba(245, 243, 238, 0), var(--paper-alt));
    pointer-events: none;
    transition: opacity 0.2s ease;
}
/* Expanded height is driven by JS (a pixel value) so the change animates;
   max-height:none can't transition. */
.artist.is-expanded .artist__bio::after {
    opacity: 0;
}

/* Row holding the Read more / less toggle and the social links. */
.artist__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.artist__toggle {
    margin-top: 0.6rem;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.artist__toggle:hover { color: var(--ink); border-bottom-color: var(--ink); }
.artist__toggle::after { content: attr(data-more-en); }
.lang-sk .artist__toggle::after { content: attr(data-more-sk); }
.artist__toggle[aria-expanded="true"]::after { content: attr(data-less-en); }
.lang-sk .artist__toggle[aria-expanded="true"]::after { content: attr(data-less-sk); }

/* Social links sit at the right of the actions row. */
.artist__socials {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.6rem;
    margin-left: auto;
}
.artist__social {
    display: inline-flex;
    color: var(--muted);
    transition: color 0.2s ease, transform 0.2s ease;
}
.artist__social:hover { color: var(--ink); transform: translateY(-1px); }
.artist__social svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
    fill: currentColor;
}

/* ---------- Prices ---------- */
.prices {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1.5rem, 5vw, 4rem);
    margin-bottom: 2.5rem;
}
.price { text-align: center; }
.price__amount {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 500;
    line-height: 1;
}
.price__label {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.6rem;
}

/* Ticket links — one button per program item that has a Tickets link. */
.ticket-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    max-width: 720px;
    margin: 0 auto 2.5rem;
}
.ticket-link {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    min-width: 12rem;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s, border-color 0.2s, transform 0.3s ease;
}
.ticket-link:hover { border-color: var(--ink); transform: translateY(-2px); }
.ticket-link__date {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: var(--muted);
    white-space: nowrap;
}
.ticket-link__venue { font-weight: 500; }

/* ---------- Partners ---------- */
.partners {
    margin: 0 auto;
    max-width: 860px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 3rem);
}
.partner {
    display: flex;
    align-items: center;
    justify-content: center;
}
.partner a { display: inline-flex; }
.partner__logo {
    height: calc(clamp(64px, 10vw, 104px) * var(--logo-scale, 1));
    width: auto;
    max-width: calc(240px * var(--logo-scale, 1));
    object-fit: contain;
}
.partner__name {
    color: var(--muted);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}
.partner a { text-decoration: none; }
.partner a .partner__name:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--ink);
    color: #cfcabd;
    padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 4vw, 3rem);
    text-align: center;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-tagline {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.3rem, 4vw, 2rem);
    color: #fff;
    margin: 0 0 2rem;
}
.socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.socials a {
    color: #cfcabd;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    transition: color 0.2s;
}
.socials a:hover { color: #fff; }
.footer-credit { font-size: 0.8rem; color: #8d877a; margin: 0; }

/* ---------- Motion / entrance animations ---------- */
/* Brand and link micro-interactions. */
.brand { transition: opacity 0.2s ease; }
.brand:hover { opacity: 0.65; }
.price { transition: transform 0.3s ease; }
.price:hover { transform: translateY(-4px); }

/* Scroll-reveal: elements fade and rise into place the first time they enter
   the viewport. Only active when JS adds .reveal-ready (and the user hasn't
   asked for reduced motion), so content is always visible without JS. */
.reveal-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}
.reveal-ready .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Hero entrance on first load (staggered). */
.reveal-ready .hero__kicker,
.reveal-ready .hero__heading,
.reveal-ready .hero__lead {
    opacity: 0;
    animation: hero-in 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.reveal-ready .hero__kicker  { animation-delay: 0.05s; }
.reveal-ready .hero__heading { animation-delay: 0.18s; }
.reveal-ready .hero__lead    { animation-delay: 0.36s; }
@keyframes hero-in {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .site-header { flex-wrap: wrap; gap: 1rem; }
    .nav { order: 3; width: 100%; gap: 1rem; }
    .program__item { grid-template-columns: 3.5rem 1fr; gap: 1rem; }
}
