/* Donation-unboxing live event popup (home page only, 2026-09-24 → 2026-09-30).
   Loaded from head.html only on resource 1. Remove that one line to retire it. */

.ue-evt {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(10, 8, 6, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.ue-evt.is-open { opacity: 1; }
.ue-evt[hidden] { display: none; }

.ue-evt__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  width: min(880px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  background: var(--ue-ink-2, #201a14);
  color: var(--ue-paper, #f3ead9);
  border: 1px solid rgba(227, 187, 116, 0.28);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.45s cubic-bezier(.2, .7, .2, 1);
}
.ue-evt.is-open .ue-evt__card { transform: none; }
.ue-evt__card:focus { outline: none; }

.ue-evt__photo {
  position: relative;
  min-height: 100%;
  background: #0d0b09;
}
.ue-evt__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}

.ue-evt__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 44px);
  overflow-y: auto;
}

.ue-evt__kicker {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ue-gold, #e3bb74);
}

.ue-evt__title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ue-paper, #f3ead9);
}

.ue-evt__text {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.45;
  color: var(--ue-paper, #f3ead9);
}

.ue-evt__when {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ue-paper, #f3ead9);
}
.ue-evt__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ue-gold, #e3bb74);
}
.ue-evt.is-live .ue-evt__dot {
  background: #e5484d;
  animation: ue-evt-pulse 1.6s ease-in-out infinite;
}
@keyframes ue-evt-pulse { 50% { opacity: 0.35; } }

.ue-evt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.ue-evt__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: filter 0.15s ease, background-color 0.15s ease;
}
.ue-evt__btn--yt { background: var(--ue-gold, #e3bb74); color: var(--ue-ink, #17130f); }
.ue-evt__btn--tw { background: transparent; color: var(--ue-paper, #f3ead9); border: 1px solid rgba(243, 234, 217, 0.35); }
.ue-evt__btn:hover { filter: brightness(1.08); }
.ue-evt__btn--tw:hover { background: rgba(243, 234, 217, 0.08); }
.ue-evt__btn:focus-visible, .ue-evt__close:focus-visible { outline: 2px solid var(--ue-gold, #e3bb74); outline-offset: 3px; }

.ue-evt__close {
  align-self: flex-start;
  margin-top: 2px;
  padding: 6px 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 14px;
  color: var(--ue-paper-dim, #cabfa9);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ue-evt__close:hover { color: var(--ue-paper, #f3ead9); }

html.ue-evt-lock, html.ue-evt-lock body { overflow: hidden; }

/* Phones: photo on top as a banner, text below, everything scrolls inside the card. */
@media (max-width: 700px) {
  .ue-evt { align-items: flex-end; padding: 12px; }
  .ue-evt__card {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }
  .ue-evt__photo { min-height: 0; height: clamp(170px, 34vh, 300px); }
  .ue-evt__photo img { object-position: 50% 40%; }
  .ue-evt__body { justify-content: flex-start; gap: 12px; padding: 22px 20px 20px; }
  .ue-evt__actions .ue-evt__btn { flex: 1 1 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .ue-evt, .ue-evt__card { transition: none; }
  .ue-evt.is-live .ue-evt__dot { animation: none; }
}
