:root {
    /* --- Colors --- */
    --color-bg: oklch(0.1496 0 0); /* #0b0b0b */
    --color-fg: oklch(0.95 0 0); /* #f5f5f5 */
    --color-muted: oklch(0.6862 0 0); /* #9a9a9a */
    --color-accent: oklch(0.5597 0.242 268.92); /* Reference accent */
    --color-accent-muted: oklch(0.4 0.18 268.92); /* Reference accent */
    --color-border: oklch(1 0 0 / 8%);

    /* --- Typography system --- */
    --font-sans: system-ui, "Segoe UI", Roboto, Inter, Arial, sans-serif;
    --font-mono: "Orbitron", monospace;

    /* Font size */
    --text-xs: 0.85rem;
    --text-s: 0.95rem;
    --text-m-base: 1rem;
    --text-l: 1.125rem;
    --text-xl: 1.25rem;
    
    /* Fluid font size */
    --text-fluid-h3: clamp(1.1rem, 2.4vw, 1.35rem);
    --text-fluid-h2: clamp(1.4rem, 3.2vw, 2rem);

    /* --- Spacing --- */
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-8: 2rem;
    --space-12: 3rem;

    /* --- Radii --- */
    --radius-s: 6px;
    --radius-m: 8px;
    --radius-l: 18px;
    --radius-full: 999px;

    /* --- Layout --- */
    --layout-header-h: 56px;
    --layout-section: var(--space-8);
    --layout-padding: 1rem;
    --layout-content-width: 820px;
    --layout-site-width: 1200px;

    /* --- Layers --- */
    --layer-below: -1;
    --layer-base: 1;
    --layer-sticky: 100;
    --layer-overlay: 200;
    --layer-modal: 9999;

    /* --- Animation --- */
    --ease-base: 0.3s ease;
}

html,
body {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
    margin: 0; /* By default some browser use 8px */
    background: var(--color-bg);
    color: var(--color-fg);
    font-family: var(--font-sans);
    font-size: var(--text-m-base);
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* ===================================== Top bar ===================================== */
.topbar {
    position: fixed; /* sticky for it to disapear */
    top: 0;
    width: 100%;
    background: rgba(11, 11, 11, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    z-index: var(--layer-sticky);
}

.topbar-content {
    max-width: var(--layout-site-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--layout-padding);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    color: var(--color-fg);
    text-decoration: none;
}

.logo img {
    border-radius: var(--radius-m);
}

nav a {
    color: var(--color-fg);
    text-decoration: none;
    margin-left: var(--space-4);
    font-size: var(--text-s);
    transition: color var(--ease-base);
}

nav a:hover {
    color: var(--color-accent);
}

/* ===================================== animated line ===================================== */
.wavelines {
    position: fixed;
    top: 36px; 
    left: 0;
  /*bottom: 0; */
    width: 100vw; 
    height: 100px; 
    display: block;
    pointer-events: none;
    z-index: 110; /* automatically increment from sticky ? */
}

polyline {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 3;
    transform-box: fill-box;
    transform-origin: center;
}


/* ===================================== Hero ===================================== */
.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 3/1;
    background: black;
    color: white;
    overflow: hidden;
    font-family: var(--font-mono);
    letter-spacing: 0.3em;
    margin-top: 60px; /* Could use var(--layout-header-h) but might need adjustment */
    border-bottom: 1px solid var(--color-border);
}

.left,
.center,
.right {
    position: absolute;
    font-size: 6vw;
    white-space: nowrap;
}

.left {
    top: 5%;
    left: 0%;
    opacity: 0;
    transform: translateX(-5vw);
}

.center {
    top: 50%;
    left: 50%;
    opacity: 0;
    font-size: 8vw;
}

.right {
    bottom: 5%;
    right: 0%;
    opacity: 0;
    transform: translateX(5vw);
}


/* ===================================== Top bar ===================================== */
.scroll-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-8) 0 var(--space-4);
    color: var(--color-muted);
    opacity: 0.7;
    transition: opacity var(--ease-base);
}

.scroll-arrow a,
.scroll-arrow a:visited {
    color: var(--color-muted);
    text-decoration: none;
}

.scroll-arrow:hover {
    opacity: 1;
    color: var(--color-accent);
}

.scroll-arrow svg {
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%,
    100% {transform: translateY(0);}
    50% {transform: translateY(6px);}
}


/* ===================================== About and text ===================================== */
.about {
    display: flex;
    justify-content: center;
    padding: var(--space-8) var(--layout-padding) 2.75rem;
}

.prose {
    max-width: var(--layout-content-width);
}

.prose h2 {
    margin: 0 0 var(--space-3);
    font-size: var(--text-fluid-h2);
}

.prose h3 {
    margin: 1.25rem 0 var(--space-2);
    font-size: var(--text-fluid-h3);
}

.prose p {
    margin: .85rem 0;
    color: var(--color-fg);
    line-height: 1.65;
}

.prose ul {
    margin: var(--space-2) 0 0 1.1rem;
    line-height: 1.6;
}

.prose li {
    margin: .2rem 0;
}

/* ---------------------------- Figure Styles ---------------------------- */
.figure-container {
    position: relative;
    display: flex;
    flex-direction: column; /* Mobile first: stack vertically */
    align-items: center;
    margin: var(--space-12) auto;
    width: fit-content;
    max-width: 100%;
}

.figure-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px; /* Keep or use radius var? */
    border-radius: var(--radius-s);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: block;
    z-index: 2;
}

.figure-subtext,
.figure-annotation {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    color: oklch(30% 0.01 250); /* Keep specific color or map? */
    text-transform: uppercase;
    margin: var(--space-2) 0;
    z-index: 1;
    transition: all 0.4s ease;
    position: relative;
    padding: 0.2rem 0.4rem;
}

.figure-subtext::before,
.figure-annotation::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: oklch(20% 0.01 250);
    z-index: -1;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scaleY(0);
    transform-origin: top;
}

.figure-container:hover .figure-subtext,
.figure-container:hover .figure-annotation {
    color: oklch(80% 0.01 250);
}

.figure-container:hover .figure-subtext::before,
.figure-container:hover .figure-annotation::before {
    transform: scaleY(1);
}

/* ---------------------------- Cards (Events) ---------------------------- */
.events {
    max-width: var(--layout-site-width);
    margin: var(--space-8) auto;
    padding: 0 var(--layout-padding);
}

.events h2 {
    text-align: center;
    font-size: var(--text-fluid-h2);
    margin-bottom: 1.5rem;
}

.event-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
}

.event-card {
    width: 100%;
    background: #181818; /* Maybe map to a surface color? */
    border-radius: var(--radius-s);
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    padding: 1.5rem;
    color: var(--color-fg);
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    transition: box-shadow 0.2s, opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
    position: relative;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    filter: blur(4px);
    box-sizing: border-box;
}

.event-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.event-card:hover {
/*transform: scale(1.01);*/
    box-shadow: 0 4px 24px rgba(96, 96, 96, 0.479);
}

.event-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: var(--space-2);
    gap: var(--space-2);
}

.event-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: var(--space-4);
}

.event-index {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-muted);
    margin-right: var(--space-2);
}

.event-location {
    color: var(--color-muted);
    font-size: 1.1rem;
    margin-left: var(--space-2);
    font-weight: 400;
}

.event-tags {
    display: flex;
    gap: 0.4em;
  flex-wrap: wrap; /* remove it in desktop ? */
}

.event-tag {
    background: var(--color-accent-muted);
    color: #181818;
    border-radius: var(--radius-s);
    padding: 0.2em 0.7em;
    font-size: 0.95em;
    font-weight: 600;
}

.event-meta {
    margin-bottom: 0.7rem;
    color: var(--color-muted);
    font-size: var(--text-m-base);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.event-date {
    font-weight: 600;
    color: var(--color-accent-muted);
}

.event-artists {
    font-style: italic;
}

.event-desc {
    margin-bottom: var(--space-4);
    color: var(--color-fg);
    font-size: 1.05rem;
    max-height: 5.5em;
    overflow: hidden;
    position: relative;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--color-accent-muted);
    font-weight: 600;
    cursor: pointer;
    margin-left: 0.5em;
    font-size: 1em;
    padding: 0;
}

.event-carousel {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.carousel-img {
    max-width: 120px;
    max-height: 80px;
    border-radius: var(--radius-m);
    box-shadow: 0 1px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.2s;
    object-fit: cover;
}

.carousel-img:hover {
    transform: scale(1.08);
  /*box-shadow: 0 2px 16px rgba(96, 96, 96, 0.479);*/
}

.img-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--layer-modal);
}

.img-expanded {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
  /*box-shadow: 0 4px 32px rgba(96, 96, 96, 0.479);*/
}

.close-overlay {
    position: absolute;
    top: 2vw;
    right: 4vw;
    font-size: 2.5rem;
    color: var(--color-fg);
    cursor: pointer;
    font-weight: bold;
    z-index: 10000;
}

/* Spinner */
.spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--space-8) auto;
}

.loader {
    border: 6px solid #222;
    border-top: 6px solid var(--color-accent);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}


/* ===================================== Footer ===================================== */
.footer {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
    max-width: var(--layout-site-width);
    margin: 0 auto;
    padding: var(--space-8) var(--layout-padding) 2.5rem;
    color: var(--color-muted);
    font-size: var(--text-s);
    border-top: 1px solid var(--color-border);
}

.footer-message {
    position: absolute;
    top: -0.7em;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg);
    padding: 0 0.5rem;
    color: var(--color-border);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.footer .legal {
    margin: 0;
    font-size: var(--text-xs);
}

.footer .links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer .links a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-fg);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    font-size: var(--text-xs);
}

.footer .links a:hover {
    opacity: 1;
}

/* Legal Notice */
.legal-notice {
    text-align: center;
    font-size: var(--text-xs);
    color: var(--color-muted);
    margin-top: var(--space-4);
}

/* ===================================== Desktop mode ===================================== */

@media (min-width: 900px) {
  
  /* === Hero === */
  .hero {
    height: 50vh;
    min-height: 60vh;
    aspect-ratio: auto;
  }
  
  .left,
  .right {
    font-size: 5rem;
  }
  
  .center {
    font-size: 6rem;
  }
  
  .left {
    transform: translateX(-100px);
  }
  
  .right {
    transform: translateX(100px);
  }
  
  .figure-container {
      flex-direction: row;
      margin: 5rem auto;
  }

  .figure-subtext,
  .figure-annotation {
      position: absolute;
      margin: 0;
      white-space: nowrap;
  }

  .figure-subtext {
      writing-mode: vertical-rl;
      transform: rotate(180deg);
      bottom: 0;
      left: -3rem;
      text-align: left;
  }

  .figure-annotation {
      writing-mode: vertical-rl;
      text-orientation: upright;
      top: 0;
      right: -3rem;
      letter-spacing: -0.15em;
      font-weight: bold;
  }

  /* === Cards === */
  .event-card {
    width: 80%;
    padding: 2rem 2.5rem;
    }

    .event-card-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
        gap: 1rem;
    }

    .event-tags {
        flex-wrap: nowrap;
    }

    .event-meta {
        gap: 1.5rem;
        flex-wrap: nowrap;
    }
    
    /* === Footer === */
    .footer {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        gap: 0;
    }

    .footer .legal {
        max-width: 40%;
    }
}
