/* ── Home: seasonal promo coupon ──────────────────────────────────────
   One design, two placements (see $promoTicket in index.php):
   - .promo-ticket--photo   floats over the hero photo below lg
   - .promo-ticket-wrap     foot of the hero copy column from lg up       */

.promo-ticket {
  --ticket-edge:   rgba(117, 120, 109, 0.2);
  --ticket-spring: cubic-bezier(0.22, 1.2, 0.36, 1);

  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 12px;
  border: 1px solid var(--ticket-edge);
  /* Lightly frosted: translucent cream over a blurred backdrop */
  background: rgba(253, 252, 248, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(27, 28, 25, 0.05),
    0 8px 20px -10px rgba(33, 44, 20, 0.22),
    0 22px 44px -26px rgba(139, 74, 44, 0.28);
  color: #1b1c19;
  text-decoration: none;
  /* backwards, not both — a held end-state would override the hover transform */
  animation: promo-ticket-in 0.9s var(--ticket-spring) 0.45s backwards;
  transition: transform 0.45s var(--ticket-spring);
}

.promo-ticket:hover { transform: translateY(-2px); }
.promo-ticket:active { transform: translateY(0) scale(0.99); transition-duration: 0.15s; }
.promo-ticket:focus-visible {
  outline: 2px solid #8b4a2c;
  outline-offset: 4px;
}

.promo-ticket__stub {
  position: relative;
  flex: 0 0 auto;                  /* sized by its label below lg; fixed width from lg */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  padding: 0.7rem 0.85rem;
  border-radius: 11px 0 0 11px;
  overflow: hidden;
  color: #faf9f4;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(220, 172, 68, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(51, 68, 31, 0.35) 0%, transparent 65%),
    rgba(139, 74, 44, 0.86);
}
/* Fine grain on the stub */
.promo-ticket__stub::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.promo-ticket__label {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  margin-right: -0.16em;           /* cancel trailing tracking so it centres truly */
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.85;
}
.promo-ticket__highlight {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

/* Copy on the left; call to action in its own column, vertically centred */
.promo-ticket__body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  align-items: center;
  gap: 0.15rem 1rem;
  padding: 0.7rem 1rem;
  border-left: 1.5px dashed rgba(139, 74, 44, 0.3);
}
.promo-ticket__heading {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  grid-column: 1;
  color: #33441f;
  text-wrap: balance;
}
.promo-ticket__details {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  grid-column: 1;
  line-height: 1.45;
  color: #45483e;
}
.promo-ticket__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  line-height: 1.4;
}
.promo-ticket__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
  color: #33441f;
  white-space: nowrap;
}
.promo-ticket__cta-text { text-decoration: none; }
.promo-ticket__cta .material-symbols-outlined {
  font-size: 15px;
  transition: transform 0.45s var(--ticket-spring);
}
.promo-ticket:hover .promo-ticket__cta .material-symbols-outlined { transform: translateX(4px); }

@keyframes promo-ticket-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ── Over the photo (below lg) ── */
.promo-ticket--photo {
  position: absolute;
  z-index: 5;
  /* full width with equal side margins (no transform, so hover/entrance transforms stay free) */
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(10, 16, 5, 0.12),
    0 10px 24px -10px rgba(10, 16, 5, 0.45),
    0 26px 50px -24px rgba(10, 16, 5, 0.5);
}
.promo-ticket--photo .promo-ticket__stub { gap: 0.2rem; padding: 0.5rem 0.7rem; border-radius: 9px 0 0 9px; }
.promo-ticket--photo .promo-ticket__label { font-size: 8px; }
.promo-ticket--photo .promo-ticket__highlight { font-size: 1.2rem; }
.promo-ticket--photo .promo-ticket__body { gap: 0.1rem 0.75rem; padding: 0.5rem 0.8rem; }
.promo-ticket--photo .promo-ticket__heading { font-size: 0.9rem; }
.promo-ticket--photo .promo-ticket__details { font-size: 11.5px; line-height: 1.4; }
.promo-ticket--photo .promo-ticket__foot { font-size: 11.5px; }
.promo-ticket--photo .promo-ticket__cta .material-symbols-outlined { font-size: 13px; }

/* Narrow phones: drop the CTA so the copy gets the full width (the whole ticket is still the link) */
@media (max-width: 399.98px) {
  .promo-ticket--photo .promo-ticket__body { grid-template-columns: 1fr; }
  .promo-ticket--photo .promo-ticket__foot { display: none; }
}

@media (min-width: 640px) {
  .promo-ticket--photo { left: 1.25rem; right: 1.25rem; bottom: 1.25rem; }
  .promo-ticket--photo .promo-ticket__body { column-gap: 1.5rem; padding-inline: 1rem 1.25rem; }
  .promo-ticket--photo .promo-ticket__foot { font-size: 13px; }
  .promo-ticket--photo .promo-ticket__cta .material-symbols-outlined { font-size: 15px; }
}

/* ── Under the copy (lg and up) ── */
.promo-ticket-wrap { display: none; }

@media (min-width: 1024px) {
  .promo-ticket--photo { display: none; }

  /* Clear the fixed nav when the taller copy column hits the top on short laptops */
  .hero-copy { padding-top: calc(76px + 1.25rem); }

  /* Stack the column: copy stays centred in the space above, coupon sits at the foot */
  .hero-copy:has(.promo-ticket-wrap) { flex-direction: column; padding-bottom: 2.8rem; } /* coupon sits lower: margin-desktop less 30% */
  .hero-copy:has(.promo-ticket-wrap) > .max-w-xl { margin-block: auto; }
  .promo-ticket-wrap {
    display: block;
    width: 100%;
    max-width: 36rem;              /* matches the copy's max-w-xl so left edges align */
    margin-top: 2rem;
  }

  /* Glass pane: on the plain cream column there is nothing to blur, so the
     frost comes from a cool tint, a diagonal sheen and bright inner edges */
  .promo-ticket-wrap .promo-ticket {
    border-color: rgba(255, 255, 255, 0.8);
    background:
      linear-gradient(115deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 42%),
      linear-gradient(295deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 30%),
      rgba(226, 231, 218, 0.55);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.95),
      inset 0 -1px 0 rgba(75, 94, 52, 0.1),
      inset 0 0 28px rgba(255, 255, 255, 0.45),
      0 0 0 1px rgba(117, 120, 109, 0.12),
      0 1px 2px rgba(27, 28, 25, 0.05),
      0 8px 20px -10px rgba(33, 44, 20, 0.22),
      0 22px 44px -26px rgba(139, 74, 44, 0.28);
  }

  .promo-ticket-wrap .promo-ticket__stub { flex-basis: 8.75rem; gap: 0.4rem; padding: 0.85rem 1.15rem; }
  .promo-ticket-wrap .promo-ticket__label { font-size: 10.5px; letter-spacing: 0.2em; margin-right: -0.2em; }
  .promo-ticket-wrap .promo-ticket__highlight { font-size: 1.9rem; }
  .promo-ticket-wrap .promo-ticket__body { gap: 0.25rem 1.25rem; padding: 0.85rem 1.4rem; }
  .promo-ticket-wrap .promo-ticket__heading { font-size: 1.2rem; }
  .promo-ticket-wrap .promo-ticket__details { font-size: 13.5px; line-height: 1.5; }
  .promo-ticket-wrap .promo-ticket__foot { font-size: 13px; }
  .promo-ticket-wrap .promo-ticket__cta .material-symbols-outlined { font-size: 17px; }
  .promo-ticket-wrap { container-type: inline-size; }
}

/* Narrow laptops: too tight for a third column, so the call to action drops back under the copy */
@container (max-width: 31rem) {
  .promo-ticket-wrap .promo-ticket__foot {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
    margin-top: 0.35rem;
  }
}

/* Smallest laptops: drop the CTA entirely so the copy gets the full width (the whole ticket is still the link) */
@media (min-width: 1024px) and (max-width: 1105.98px) {
  .promo-ticket-wrap .promo-ticket__body { grid-template-columns: 1fr; }
  .promo-ticket-wrap .promo-ticket__foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .promo-ticket { animation: none; }
  .promo-ticket,
  .promo-ticket__cta .material-symbols-outlined { transition: none; }
}
