/* Events page + shared flyer / Polaroid / photo-viewer styles (also used by the Gallery) */
:root {
  --hand: "Segoe Print", "Bradley Hand", "Marker Felt", "Comic Sans MS", cursive;
  --poster: Impact, Haettenschweiler, "Arial Narrow Bold", "Inter", "Arial Black", sans-serif;
}

/* ---------- Event flyer (drawn with code, no image file) ---------- */
.flyer {
  container-type: inline-size; position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  background:
    radial-gradient(circle, rgba(0,0,0,.18) 1.2px, transparent 1.6px) 0 0 / 9px 9px,
    var(--fbg, #222);
  color: var(--fink, #fff); text-align: center; font-family: var(--poster);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.fl-rays {
  position: absolute; inset: -40%; opacity: .22;
  background: repeating-conic-gradient(from 0deg at 50% 45%, var(--fac) 0 6deg, transparent 6deg 18deg);
}
.fl-badge {
  position: absolute; top: 5cqw; right: 4cqw; width: 34cqw; aspect-ratio: 1; z-index: 2;
  display: flex; align-items: center; justify-content: center; padding: 4cqw;
  background: var(--fac); color: var(--fbg); font: 900 var(--bs, 6cqw)/1 var(--poster); transform: rotate(12deg);
  clip-path: polygon(50% 0, 61% 14%, 79% 9%, 81% 27%, 98% 33%, 89% 50%, 98% 67%, 81% 73%, 79% 91%, 61% 86%, 50% 100%, 39% 86%, 21% 91%, 19% 73%, 2% 67%, 11% 50%, 2% 33%, 19% 27%, 21% 9%, 39% 14%);
}
.fl-icon { position: relative; font-size: 30cqw; line-height: 1; filter: drop-shadow(1.2cqw 1.2cqw 0 rgba(0,0,0,.45)); margin-top: 6cqw; }
.fl-words { position: relative; display: flex; flex-direction: column; line-height: .88; margin-top: 3cqw; }
.fl-l1 { font-size: var(--fs, 21cqw); letter-spacing: .5cqw; text-shadow: 1.4cqw 1.4cqw 0 #000; }
.fl-l2 { font-size: var(--fs, 21cqw); color: var(--fac); text-shadow: 1.4cqw 1.4cqw 0 #000; font-style: italic; }
.fl-when {
  position: relative; margin-top: 5cqw; width: 100%; padding: 2.4cqw 3cqw; background: #000; color: #fff;
  font: 800 5.4cqw/1.15 "Arial Black", Arial, sans-serif; letter-spacing: .3cqw; transform: rotate(-3deg) scale(1.06);
}
.fl-foot { position: relative; margin-top: 4cqw; font: 700 3.8cqw/1 Arial, sans-serif; letter-spacing: .6cqw; opacity: .9; }

/* ---------- Polaroid ---------- */
.polaroid {
  position: relative; margin: 0; background: #fdfdf8; padding: 7% 7% 0; color: #222;
  box-shadow: 0 2px 2px rgba(0,0,0,.25), 4px 8px 14px rgba(0,0,0,.35);
  transform: rotate(var(--r, 0deg)); transition: transform .2s ease, box-shadow .2s ease; cursor: zoom-in;
}
.polaroid:hover, .polaroid:focus { transform: rotate(0deg) scale(1.05); z-index: 3; outline: none;
  box-shadow: 0 4px 4px rgba(0,0,0,.25), 8px 18px 28px rgba(0,0,0,.45); }
.pol-img { position: relative; aspect-ratio: 1; overflow: hidden; background: #222; }
.polaroid.is-flyer .pol-img { aspect-ratio: 3 / 4; }
.pol-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pol-img .pol-empty { display: none; }
.pol-img.empty { background: repeating-linear-gradient(45deg, #ececec 0 10px, #e2e2e2 10px 20px); cursor: default; }
.pol-img.empty .pol-empty {
  display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; text-align: center;
  font: 700 13px/1.3 "Courier New", monospace; color: #888;
}
.polaroid:has(.pol-img.empty) { cursor: default; }
.polaroid figcaption { font: 700 17px/1.15 var(--hand); text-align: center; padding: 9% 4% 9%; min-height: 3.2em; }
.tape {
  position: absolute; z-index: 2; top: -11px; left: 50%; width: 38%; height: 24px; transform: translateX(-50%) rotate(-4deg);
  background: rgba(255, 244, 196, .75); box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* Full-size viewer */
.viewer {
  position: fixed; inset: 0; z-index: 100; background: rgba(5, 3, 15, .88);
  display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out;
}
.polaroid.big { width: min(560px, 92vw); cursor: default; transform: rotate(-1.5deg); }
.polaroid.big:hover { transform: rotate(-1.5deg); }
.polaroid.big .pol-img { aspect-ratio: auto; max-height: 72vh; }
.polaroid.big.is-flyer .pol-img, .polaroid.big .flyer { aspect-ratio: 3 / 4; }
.polaroid.big .pol-img img { width: 100%; height: auto; max-height: 72vh; object-fit: contain; background: #111; }
.polaroid.big figcaption { font-size: 24px; }
.developing .pol-img > * { animation: develop 3s ease-out both; }
@keyframes develop {
  0% { filter: brightness(.15) sepia(1) contrast(.4) blur(3px); opacity: .6; }
  40% { filter: brightness(.7) sepia(.8) contrast(.6) blur(1px); opacity: 1; }
  100% { filter: none; }
}
.viewer-close { position: fixed; top: 14px; right: 14px; font-size: 22px; }

/* ---------- Events page ---------- */
.events-page { background: #f3edcf; }
.events-intro { text-align: center; font-size: 17px; }
.week {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 18px 0 26px;
  background: #111; border: 4px ridge #6644ff; padding: 8px;
}
.week-title { text-align: center; color: #e22; margin: 22px 0 0; font-size: 22px; }
.wk-day { background: #1b1b22; border: 2px outset #555; padding: 8px 6px; min-height: 92px; color: #fff; font-size: 12px; }
.wk-day b { display: block; text-align: center; color: #ffdf2d; font-size: 16px; border-bottom: 2px dashed #444; padding-bottom: 4px; margin-bottom: 6px; }
.wk-day a { display: block; color: #9fe8ff; text-decoration: none; font-weight: bold; line-height: 1.2; margin: 4px 0; }
.wk-day a span { display: block; text-align: center; font-size: 22px; }
.wk-day a:hover { color: #fff; text-decoration: underline; }
.wk-day small { display: block; color: #aaa; font-size: 10px; margin-top: 4px; }
.wk-day em { color: #888; }

.event {
  display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start;
  margin: 26px 0; padding: 22px; background: #050505; color: #eee; border: 4px ridge #5b3cff;
  box-shadow: 5px 5px 0 #111; scroll-margin-top: 10px;
}
.event.flip { grid-template-columns: 1fr 250px; }
.event.flip .event-flyer { order: 2; }
.event-flyer .polaroid { padding: 6% 6% 0; }
.event h3 { margin: 0 0 6px; color: #ffe23b; font: 30px/1.05 var(--poster); letter-spacing: 1px; }
.event-tagline { color: #39eaff; font-weight: bold; font-style: italic; }
.event-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0; padding: 10px 12px; background: #15131f; border: 2px dashed #6644ff; }
.event-facts dt { color: #ffdf2d; font-weight: bold; }
.event-facts dd { margin: 0; }
.event-member { color: #ff8fd0; font-weight: bold; font-size: 13px; }
.event-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 18px; padding: 8px 4px 0; }
.event-photos .polaroid figcaption { font-size: 13px; }
.more-events { text-align: center; margin-top: 24px; padding: 18px; border: 3px dashed #e52d2d; background: #fffdf2; }
.more-events h3 { color: #e52d2d; }

@media (max-width: 800px) {
  .week { grid-template-columns: repeat(2, 1fr); }
  .wk-day { min-height: 0; }
  .event, .event.flip { grid-template-columns: 1fr; padding: 14px; }
  .event.flip .event-flyer { order: 0; }
  .event-flyer { width: 100%; max-width: 280px; margin: 0 auto; }
  .event-photos { gap: 12px; }
  .event-photos .polaroid figcaption { font-size: 11px; }
}
