/* Seasonal popup (built by assets/js/popup-banner.js).
 * Computers/tablets: photo left, text right. Phones: compact card, photo on top.
 * Opens with a rise-and-fade, staggered text, slow photo zoom and swinging baubles;
 * closes with a fade (.is-closing). All motion is off for "reduce motion" users. */
html.seasonal-popup-open { overflow: hidden; }
.seasonal-popup {
  width: min(760px, calc(100vw - 48px)); max-height: calc(100dvh - 24px);
  padding: 0; margin: auto; overflow: hidden auto;
  border: 1px solid #d8bf94; border-radius: 20px;
  background: #fbf8f2; color: #010f1c;
  box-shadow: 0 30px 90px #000a; font-family: var(--body-font, sans-serif);
}
.seasonal-popup[open] { display: grid; grid-template-columns: 42% 1fr; }
.seasonal-popup:not(:has(.seasonal-popup-image))[open] { grid-template-columns: 1fr; }
.seasonal-popup::backdrop { background: #010f1cc4; backdrop-filter: blur(5px); }

/* ---------- Animation ---------- */
.seasonal-popup[open] { animation: sp-rise .6s cubic-bezier(.2, .9, .25, 1) both; }
.seasonal-popup[open]::backdrop { animation: sp-fade .45s ease both; }
.seasonal-popup[open] .seasonal-popup-image { animation: sp-zoom 1.6s cubic-bezier(.2, .8, .2, 1) both; }
.seasonal-popup[open] .seasonal-popup-content > * { animation: sp-up .55s cubic-bezier(.2, .8, .2, 1) both; }
.seasonal-popup[open] .seasonal-popup-content > :nth-child(1) { animation-delay: .18s; }
.seasonal-popup[open] .seasonal-popup-content > :nth-child(2) { animation-delay: .26s; }
.seasonal-popup[open] .seasonal-popup-content > :nth-child(3) { animation-delay: .34s; }
.seasonal-popup[open] .seasonal-popup-content > :nth-child(4) { animation-delay: .42s; }
.seasonal-popup[open] .seasonal-popup-content > :nth-child(5) { animation-delay: .5s; }
.seasonal-popup[open] .seasonal-popup-close { animation: sp-pop .4s .45s cubic-bezier(.3, 1.4, .5, 1) both; }
.seasonal-popup.is-closing { animation: sp-out .26s ease-in both; }
.seasonal-popup.is-closing::backdrop { animation: sp-fade-out .26s ease-in both; }

@keyframes sp-rise { from { opacity: 0; transform: translateY(28px) scale(.95); } }
@keyframes sp-fade { from { opacity: 0; } }
@keyframes sp-fade-out { to { opacity: 0; } }
@keyframes sp-out { to { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes sp-zoom { from { transform: scale(1.12); } }
@keyframes sp-up { from { opacity: 0; transform: translateY(12px); } }
@keyframes sp-pop { from { opacity: 0; transform: scale(.6); } }
@keyframes sp-swing { from { rotate: -2deg; } to { rotate: 2deg; } }
@keyframes sp-shine { from { left: -60%; } to { left: 130%; } }

@media (prefers-reduced-motion: reduce) {
  .seasonal-popup[open], .seasonal-popup[open]::backdrop, .seasonal-popup *,
  .seasonal-popup *::before, .seasonal-popup *::after { animation: none !important; }
}

/* ---------- Layout ---------- */
.seasonal-popup-image { display: block; width: 100%; height: 100%; min-height: 360px; object-fit: cover; object-position: 22% center; }
.seasonal-popup-close {
  position: absolute; top: 16px; right: 16px; z-index: 2; display: grid; place-items: center;
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: #ffffffb8; color: #7a6f63; cursor: pointer;
  box-shadow: 0 1px 6px #010f1c1f; backdrop-filter: blur(4px);
  transition: background-color .2s, color .2s, rotate .3s;
}
.seasonal-popup-close svg { display: block; }
.seasonal-popup-close:hover { background: #fff; color: #010f1c; rotate: 90deg; }

.seasonal-popup-content {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  padding: 44px 44px 42px; text-align: left;
}
.seasonal-popup .seasonal-popup-eyebrow { margin: 0 0 10px; color: #94703e; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.seasonal-popup .seasonal-popup-title { margin: 0 0 12px; color: #010f1c; font-size: 32px; font-weight: 700; line-height: 1.15; text-transform: none; }
.seasonal-popup .seasonal-popup-description { margin: 0; font-family: "Roboto", sans-serif; font-size: 15px; line-height: 1.7; color: #5c6574; }
.seasonal-popup .seasonal-popup-detail {
  align-self: flex-start; margin: 18px 0 0; padding: 7px 15px; border-radius: 12px;
  background: #f1e5cf; color: #6f5024; font-size: 13px; font-weight: 700; line-height: 1.4;
}
.seasonal-popup-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.seasonal-popup-actions a {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px; border-radius: 12px;
  font-size: 14.5px; line-height: 1.3; font-weight: 700; text-decoration: none;
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.seasonal-popup-primary { background: #c59d5f; color: #010f1c; border: 1px solid #c59d5f; box-shadow: 0 8px 22px #c59d5f55; }
.seasonal-popup-primary::after { content: '→'; font-size: 17px; transition: transform .2s; }
.seasonal-popup-primary:hover { background: #b78e50; color: #010f1c !important; transform: translateY(-2px); box-shadow: 0 12px 26px #c59d5f66; }
.seasonal-popup-primary:hover::after { transform: translateX(4px); }
/* One soft light sweep across the button after the popup opens. */
.seasonal-popup-primary::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, #ffffff80, transparent);
  animation: sp-shine 1.1s 1.1s ease-in-out both;
}
.seasonal-popup-secondary { border: 1px solid #cdb994; color: #010f1c; background: transparent; }
.seasonal-popup-secondary:hover { background: #efe5d3; color: #010f1c !important; }
.seasonal-popup :focus-visible { outline: 3px solid #c59d5f; outline-offset: 3px; }

/* ---------- Christmas theme: swinging baubles and a thin inset frame ---------- */
.seasonal-popup--christmas .seasonal-popup-content { padding-top: 100px; }
.seasonal-popup--christmas .seasonal-popup-content::before {
  content: ''; position: absolute; top: 8px; left: 38px; width: 160px; aspect-ratio: 200 / 96;
  background: url('../img/christmas/hanging-baubles.svg') left top / contain no-repeat;
  transform-origin: 50% 0; animation: sp-swing 6s ease-in-out infinite alternate;
}
/* Little waving Santa (santa.svg animates itself); peeks up from the bottom-right corner. */
.seasonal-popup--christmas .seasonal-popup-content::after {
  content: ''; position: absolute; right: 18px; bottom: 0; width: 112px; aspect-ratio: 200 / 220;
  background: url('../img/christmas/santa.svg') center bottom / contain no-repeat;
  animation: sp-peek 1.4s 1s cubic-bezier(.25, 1.2, .4, 1) both; pointer-events: none;
}
@keyframes sp-peek { from { transform: translateY(105%); } }
@keyframes sp-drop { from { opacity: 0; transform: translateY(-18px) scale(.85); } }
.seasonal-popup--christmas::after {
  content: ''; position: absolute; inset: 8px; border: 1px solid #c59d5f40; border-radius: 14px; pointer-events: none;
}

/* Short laptop screens: tighten so it still fits without scrolling. */
@media (min-width: 641px) and (max-height: 600px) {
  .seasonal-popup-image { min-height: 0; }
  .seasonal-popup-content { padding: 28px 36px 28px; }
  .seasonal-popup--christmas .seasonal-popup-content { padding-top: 80px; }
  .seasonal-popup--christmas .seasonal-popup-content::before { width: 124px; left: 32px; }
  .seasonal-popup .seasonal-popup-title { font-size: 26px; }
  .seasonal-popup .seasonal-popup-description { font-size: 14px; line-height: 1.6; }
  .seasonal-popup-actions { margin-top: 18px; }
}

/* ---------- Phones: compact stacked card ---------- */
@media (max-width: 640px) {
  .seasonal-popup { width: calc(100vw - 32px); max-width: 400px; border-radius: 18px; }
  .seasonal-popup[open] { grid-template-columns: 1fr; }
  .seasonal-popup-image { height: 150px; min-height: 0; }
  .seasonal-popup-close { top: 10px; right: 10px; width: 30px; height: 30px; }
  /* Phones: Santa gets his own row, centred at the top; baubles hang to his left. */
  .seasonal-popup--christmas .seasonal-popup-content::after {
    top: 8px; left: calc(50% - 36px); right: auto; bottom: auto; width: 72px;
    animation-name: sp-drop;
  }
  .seasonal-popup-content { padding: 16px 20px 22px; text-align: center; }
  .seasonal-popup--christmas .seasonal-popup-content { padding-top: 98px; }
  .seasonal-popup--christmas .seasonal-popup-content::before { top: 0; left: 14px; width: 88px; }
  .seasonal-popup .seasonal-popup-eyebrow { margin-bottom: 6px; font-size: 10px; letter-spacing: 1.5px; }
  .seasonal-popup .seasonal-popup-title { margin-bottom: 8px; font-size: 23px; line-height: 1.2; }
  .seasonal-popup .seasonal-popup-description { font-size: 13.5px; line-height: 1.55; }
  .seasonal-popup .seasonal-popup-detail { align-self: center; margin-top: 12px; padding: 6px 13px; font-size: 12.5px; }
  .seasonal-popup-actions { margin-top: 16px; }
  .seasonal-popup-actions a { flex: 1 1 100%; min-height: 46px; padding: 11px 16px; font-size: 14px; }
}
/* Short phone screens: smaller photo, then no photo, so the card still fits. */
@media (max-width: 640px) and (max-height: 700px) { .seasonal-popup-image { height: 110px; } }
@media (max-width: 640px) and (max-height: 560px) {
  .seasonal-popup-image { display: none; }
  .seasonal-popup--christmas .seasonal-popup-content { padding-top: 84px; }
  .seasonal-popup--christmas .seasonal-popup-content::after { width: 60px; left: calc(50% - 30px); }
  .seasonal-popup .seasonal-popup-title { font-size: 21px; }
  .seasonal-popup .seasonal-popup-description { font-size: 13px; }
}
.seasonal-popup:focus { outline: none; }
