/* Depends on: base.css. Shared popup styling used by every modal in the
   site (schedule, organizers, image previews, the S4/S6 pickers, etc.) —
   section-specific modal tweaks live alongside their section's own CSS
   where relevant, but the shared .modal/.modal-close/.modal-body rules
   are all here in one place. */

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: var(--paper);
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.4s ease,
    visibility 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.open {
  visibility: visible;
  opacity: 1;
}
.modal-close {
  position: absolute;
  top: 24px;
  right: clamp(20px, 4vw, 48px);
  width: 44px;
  height: 44px;
  border: none;
  background: none;
}
.modal-close svg {
  width: 100%;
  height: 100%;
}
.modal-body {
  max-width: 640px;
  padding: 0 24px;
  text-align: center;
}
/* Full-screen photo viewer, shared by Sections 6 and 7 (opened from
   their section-*.js files). The backdrop borrows the header's glass
   look — a blur, rather than its literal turbulence-warp filter,
   which is tuned for a thin bar and looks broken full-screen. */
.modal.photo-modal {
  background: rgba(12, 9, 7, 0.82);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
.photo-modal-img {
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.modal-body h2 {
  font-family: var(--display); font-weight:800;
  color: var(--burgundy);
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 0.6em;
}

/* split-screen organizers modal */
.modal.organizers-modal {
  background: var(--ink);
}
.organizers-modal .modal-close {
  z-index: 5;
  width: 64px;
  height: 64px;
}
.organizers-split {
  position: absolute;
  inset: 0;
  display: flex;
}
.organizers-half {
  position: relative;
  flex: 1 1 50%;
  overflow: hidden;
}
.organizers-half .ph {
  width: 100%;
  height: 100%;
  transition: transform 0.5s var(--ease);
  border-radius: 0;
}
.organizers-half:hover .ph {
  transform: scale(1.06);
}
/* The organizer logos are square SVGs — cover the (non-square)
   half-screen box with them rather than letting them shrink to fit,
   so as the viewport narrows they stay full-size and get clipped/
   cropped instead of shrinking down and leaving empty space. */
.organizers-half .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.organizers-icons {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5vh;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 1em;
}
.icon-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex: none;
  background: var(--paper-2);
  color: var(--burgundy);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s var(--ease);
}
.icon-btn svg {
  width: 33px;
  height: 33px;
}
.icon-btn:hover {
  background: var(--burgundy);
  color: var(--paper-2);
  transform: translateY(-3px);
}

@media (max-width: 760px) {
  .organizers-split {
    flex-direction: column;
  }
  .organizers-modal .modal-close {
    width: 84px;
    height: 84px;
  }
  .organizers-modal .modal-close svg {
    stroke: var(--burgundy);
  }
}
.modal-body p {
  font-family: var(--body);
  line-height: 1.6;
  margin-bottom: 0.6em;
}
