/* =========================================================================
 * Announcement Pop-up — matches the 70y70m theme tone (maroon #7E001D).
 * Rendered hidden in the footer; JS adds .is-open to reveal.
 * ========================================================================= */

.y70-popup{
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* hidden until JS opens it; [hidden] also keeps it out before paint */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}
.y70-popup[hidden]{ display: none; }

.y70-popup.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.y70-popup__overlay{
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--dark) 62%, transparent);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.y70-popup__dialog{
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(42, 44, 47, .32);
  transform: translateY(16px) scale(.98);
  opacity: 0;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), opacity .3s ease;
  overscroll-behavior: contain;
}
.y70-popup.is-open .y70-popup__dialog{
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Close button */
.y70-popup__close{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: var(--dark);
  background: color-mix(in srgb, var(--card) 78%, transparent);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  box-shadow: 0 2px 8px rgba(42,44,47,.18);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.y70-popup__close:hover{
  background: var(--primary);
  color: #fff;
  transform: rotate(90deg);
}

/* Media */
.y70-popup__media{
  margin: 0;
  line-height: 0;
  background: var(--bg);
}
.y70-popup__media img{
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
}

/* Body */
.y70-popup__body{
  padding: 26px 26px 28px;
  text-align: center;
}

.y70-popup__eyebrow{
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.y70-popup__title{
  margin: 0 0 10px;
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.3;
  font-weight: 800;
  color: var(--primary);
}

.y70-popup__text{
  margin: 0 auto;
  max-width: 36ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.y70-popup__text p{ margin: 0 0 .6em; }
.y70-popup__text p:last-child{ margin-bottom: 0; }

/* CTA */
.y70-popup__cta{
  display: inline-block;
  margin-top: 20px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  box-shadow: 0 8px 20px rgba(126, 0, 29, .28);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.y70-popup__cta:hover{
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(126, 0, 29, .36);
  filter: brightness(1.03);
}
.y70-popup__cta:active{ transform: translateY(0); }

/* =========================================================================
 * Full-image mode — the uploaded graphic IS the pop-up (shrink-wraps to it).
 * ========================================================================= */
.y70-popup--image .y70-popup__dialog{
  width: auto;
  max-width: 100%;
  max-height: none;
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.y70-popup--image .y70-popup__imagelink,
.y70-popup--image .y70-popup__imagefull{
  display: block;
  line-height: 0;
}
.y70-popup--image .y70-popup__imagelink{
  transition: transform .18s ease;
}
.y70-popup--image .y70-popup__imagelink:hover{
  transform: translateY(-2px);
}
.y70-popup--image img{
  display: block;
  width: auto;
  height: auto;
  max-width: min(460px, 92vw);
  max-height: 86vh;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(42, 44, 47, .34);
}
/* keep the close button clear of the image corner + always legible over art */
.y70-popup--image .y70-popup__close{
  top: -14px;
  right: -14px;
  background: var(--card);
  box-shadow: 0 4px 14px rgba(42,44,47,.34);
}
@media (max-width: 480px){
  .y70-popup--image .y70-popup__close{ top: 6px; right: 6px; }
}

/* Small screens */
@media (max-width: 480px){
  .y70-popup{ padding: 14px; }
  .y70-popup__dialog{ width: 100%; border-radius: 16px; }
  .y70-popup__body{ padding: 22px 20px 24px; }
  .y70-popup__media img{ max-height: 200px; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce){
  .y70-popup,
  .y70-popup__dialog,
  .y70-popup__close,
  .y70-popup__cta{
    transition: none;
  }
  .y70-popup__dialog{ transform: none; }
}
