/* ============================================================
   festival.css — Festival home layout, nav, panels
   ============================================================ */

/* ── Page background ─────────────────────────────────────── */
.page--festival {
  background-color: var(--color-yellow);
}

/* The page-scroll wrapper is a flex column filling the full scroll area */
.page--festival > .page-scroll {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* ── Top bar ─────────────────────────────────────────────── */
.festival-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 18px 10px;
  width: 100%;
  flex-shrink: 0;
}

/* Fixed-size header images — never scale, never shrink */
.topbar-img {
  display: block;
  height: auto;
  flex-shrink: 0;
}

.topbar-img--left  { width: 220px; }
.topbar-img--right { width: 100px; }

/* Topbar right: date info or back button */
.topbar-right-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-shrink: 0;
}

.topbar-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.topbar-back-arrow {
  height: 48px;
  width: auto;
  display: block;
  transform: scaleX(-1);
  mix-blend-mode: multiply;
}

/* ── Two-column layout ───────────────────────────────────── */
.festival-main {
  display: flex;
  flex: 1;
  padding: 0 0 20px;
  min-height: 0;
}

/* ── Left column ─────────────────────────────────────────── */
.festival-left {
  width: 45%;
  flex-shrink: 0;
  padding: 0 8px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Illustration ────────────────────────────────────────── */
.illustration-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Navigation ──────────────────────────────────────────── */
.festival-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  width: 100%;
}

.festival-nav a {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

/* ── Stars icon ──────────────────────────────────────────── */
.stars-icon-container {
  display: flex;
  justify-content: flex-end;
  padding-right: 4px;
}

.stars-icon-stack {
  width: 88px;
  height: 88px;
  position: relative;
}

.stars-icon-stack img {
  width: 88px;
  height: auto;
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
}

.stars-icon-stack img:first-child {
  position: relative;
  opacity: 1;
}

/* ── Right column: panels ────────────────────────────────── */
.festival-right {
  width: 55%;
  padding: 6px 18px 20px 6px;
  position: relative;
  overflow-y: auto;
}

.festival-panel {
  display: none;
  opacity: 0;
  width: 100%;
}

.festival-panel.is-active {
  display: block;
  /* opacity stays 0 on desktop until panel-visible is added (see below);
     on mobile, overridden to 1 immediately */
}

/* Mobile: panels show at full opacity immediately */
@media (max-width: 768px) {
  .festival-panel.is-active { opacity: 1; }
}

/* Desktop: fade in after slide completes */
@media (min-width: 769px) {
  .festival-panel.is-active {
    opacity: 0;
    transition: opacity 200ms ease;
  }
  .festival-panel.is-active.panel-visible {
    opacity: 1;
  }
}

/* ── Always-on squiggly underline ────────────────────────── */
.always-underline {
  position: relative;
  display: inline-block;
}

/* panel-section-head is display:block by default — make it inline-block
   so the underline SVG only spans the text width, not the full column */
.panel-section-head.always-underline {
  display: inline-block;
}

.always-underline .underline-svg {
  opacity: 1 !important;
}

/* ── Panel headings ──────────────────────────────────────── */
.panel-heading {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--color-blue);
  line-height: 1;
  margin-bottom: 6px;
  text-transform: lowercase;
  text-align: center;
}

/* ── Panel body copy ─────────────────────────────────────── */
.panel-body {
  font-family: var(--font-body);
  font-size: var(--size-panel-body);
  color: var(--color-blue);
  line-height: 1.7;
}

.panel-body p { margin-bottom: 1.3em; }
.panel-body p:last-child { margin-bottom: 0; }

.panel-section-head {
  font-family: var(--font-display);
  font-size: var(--size-panel-head);
  color: var(--color-blue);
  display: block;
  margin-bottom: 6px;
  margin-top: 20px;
  text-align: center;
}

.panel-section-head:first-child { margin-top: 0; }

/* ── Nav: rsvp sits alone on its row with a gap above ────── */
.nav-rsvp-item {
  grid-column: 1 / -1;
  margin-top: 10px;
}

/* ── Menu title images — fixed size, never scale ─────────── */
.menu-title-img {
  display: block;
  height: 34px;
  width: auto;
  flex-shrink: 0;
}

.menu-title-img--heading {
  height: 46px;
  margin: 0 auto 4px;   /* centers the block-level img inside panel-heading */
  flex-shrink: 0;
}

/* ── Lineup: day sections ────────────────────────────────── */
.lineup-day {
  margin-bottom: 28px;
}

.lineup-day:last-child { margin-bottom: 0; }

.lineup-day-name {
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--color-blue);
  display: block;
  line-height: 1;
  text-transform: lowercase;
}

.lineup-day-time {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-blue);
  display: block;
  margin-bottom: 8px;
  opacity: 0.65;
}

.lineup-artists {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}

/* ── Artist list (shared: music, lights, art) ────────────── */
.artist-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.artist-list li {
  line-height: 1;
}

/* Lineup panel: single column, centered */
#panel-music .artist-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  align-items: center;
}

/* Lineup heading centered */
#panel-music .panel-heading {
  text-align: center;
}

.artist-name {
  font-family: var(--font-display);
  font-size: var(--size-artist);
  color: var(--color-blue);
  cursor: pointer;
  display: inline-block;
  line-height: 1.35;
  transition: color 120ms ease;
  user-select: none;
}

.artist-name:hover { color: var(--color-blue-hover); }

/* Hand-drawn artist name images inside lineup */
.artist-name-img {
  display: block;
  height: 32px;   /* base; JS overrides with calculated value */
  width: auto;
  mix-blend-mode: multiply;
  pointer-events: none;
}


/* Hint below artist list */
.artist-list-hint {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-blue);
  opacity: 0.55;
  margin-top: 8px;
  font-style: italic;
}

/* ── Artist bio view (inline in right panel) ─────────────── */
.bio-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bio-name {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--color-red);
  line-height: 1.1;
  flex: 1;
}

/* Hand-drawn name image in bio header */
.bio-name-img {
  display: block;
  height: 52px;
  width: auto;
}

.bio-back {
  display: none; /* topbar back button handles navigation */
}

.bio-text {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--color-blue);
  line-height: 1.72;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.bio-attribution {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 13px;
  color: var(--color-blue);
  opacity: 0.7;
  margin-bottom: 12px;
}

.bio-listen {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--color-blue);
  display: inline-block;
  transition: color var(--t-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bio-listen:hover { color: var(--color-blue-hover); }

/* ── Panel illustrations ─────────────────────────────────── */
.panel-illustration {
  width: 100%;
  height: auto;
  display: block;
  margin: 20px auto 0;
  max-width: 420px;
}

/* ── Location: illustration ──────────────────────────────── */
.location-illustration-placeholder {
  width: 100%;
  max-width: 320px;
  height: 200px;
  border: 2px dashed var(--color-blue);
  border-radius: 2px 4px 3px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--color-blue);
  opacity: 0.45;
  margin-top: 20px;
}

/* ── Accommodation: Camping GIF ──────────────────────────── */
.camping-gif {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 20px auto 0;
}

/* ── Hotel entries ───────────────────────────────────────── */
.hotel-entry {
  margin-bottom: 16px;
  text-align: center;
}

.hotel-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--color-blue);
  transition: color var(--t-hover);
}

.hotel-name:hover { color: var(--color-blue-hover); }

/* ── RSVP panel ──────────────────────────────────────────── */
.rsvp-panel-intro {
  font-family: var(--font-body);
  font-size: var(--size-panel-body);
  color: var(--color-blue);
  line-height: 1.7;
  margin-bottom: 24px;
}

.rsvp-panel-intro p { margin-bottom: 1.2em; }
.rsvp-panel-intro p:last-child { margin-bottom: 0; }

.rsvp-pay-label {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--color-blue);
  margin-bottom: 12px;
  display: block;
}

.rsvp-account {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--color-blue);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

/* ── QR code section (label + images, centered) ─────────── */
.rsvp-qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 32px;
  margin-bottom: 32px;
}

/* ── QR code images ──────────────────────────────────────── */
.rsvp-qr-images {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
  align-items: flex-start;
  justify-content: center;
}

.rsvp-qr-img {
  width: 150px;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
}

.rsvp-qr-label {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-blue);
  opacity: 0.7;
  margin-top: 4px;
}

.rsvp-paypal {
  font-family: var(--font-body);
  font-size: var(--size-panel-body);
  color: var(--color-blue);
  margin-bottom: 8px;
}

.rsvp-reference {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: var(--color-blue);
  opacity: 0.65;
  margin-bottom: 32px;
  text-align: center;
}

.rsvp-panel-link {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--color-blue);
  display: block;
  text-align: center;
  transition: color var(--t-hover);
  margin-top: 32px;
  margin-bottom: 10px;
}

.rsvp-panel-link:hover { color: var(--color-blue-hover); }

.rsvp-deadline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: var(--color-blue);
  opacity: 0.6;
  margin-top: 8px;
}

/* ── Placeholder panels ──────────────────────────────────── */
.panel-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  border: 2px dashed var(--color-blue);
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--color-blue);
  opacity: 0.45;
  border-radius: 2px 4px 2px 3px;
  text-align: center;
  padding: 20px;
}

/* ── Art panel: centered heading and artist list ─────────── */
.art-artist-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  align-items: center;
}

/* ── Art panel: artist list sizing ──────────────────────── */
.art-artist-list .artist-name-img {
  height: 38px;
}

/* ── Art panel: "more tba" image ─────────────────────────── */
.art-more-tba {
  display: block;
  height: 38px;
  width: auto;
  mix-blend-mode: multiply;
  margin: 10px auto 0;
}

/* ── Art panel: footer note ──────────────────────────────── */
.art-panel-note {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-red);
  margin-top: 20px;
  text-align: right;
  font-style: italic;
  line-height: 1.5;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .festival-main { flex-direction: column; }

  /* Default: left column visible, right hidden */
  .festival-left {
    width: 100%;
    padding: 0 16px 8px;
  }

  .festival-right {
    display: none;
    width: 100%;
    padding: 8px 16px 40px;
    overflow-y: auto;
    /* Full-screen height minus topbar */
    height: calc(100vh - 60px);
    box-sizing: border-box;
    /* Explicit transparent background so multiply works */
    background: transparent;
  }

  /* When a panel is open: hide nav, show panel full-screen */
  .festival--panel-open .festival-left {
    display: none;
  }

  .festival--panel-open .festival-right {
    display: block;
  }

  /* Logo becomes a back button — show a subtle pointer */
  .festival--panel-open .topbar-img--left {
    cursor: pointer;
  }

  /* Nav always visible on mobile — 2-column grid */
  .festival-nav {
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
  }

  /* Prevent menu title images from overflowing their grid column */
  .festival-nav .menu-title-img {
    max-width: 100%;
    height: auto;
    max-height: 34px;
  }

  /* Lineup: 2-column grid on mobile */
  #panel-music .artist-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    align-items: center;
    justify-items: center;
  }

  #panel-music .artist-name-img {
    max-width: 100%;
  }

  .bio-name { font-size: 28px; }

  .rsvp-qr-img { width: 120px; }
}

/* ── Desktop: centered menu → slide-left on panel open ───── */
@media (min-width: 769px) {
  /* Left column slides from center to normal position */
  .festival-left {
    transition: transform 420ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Topbar padding animates with the slide so logo/date track the illustration */
  .festival-topbar {
    transition: padding-left 420ms cubic-bezier(0.4, 0, 0.2, 1),
                padding-right 420ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Centered state: right panel hidden INSTANTLY (no width animation = no scrollbar) */
  .festival--menu-centered .festival-right {
    width: 0 !important;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
  }
}

/* Ensure no background on panel chain — needed for multiply blend */
.festival-right,
.festival-panel,
.artist-list,
.artist-list li,
.artist-name {
  background: transparent;
}
