/* Hephzibah app gift teaser (home page) */
.gift-teaser {
  --g-gold: #e9c46a;
  --g-gold-2: #fbe7b0;
  --g-plum: #3b0f52;
  --g-violet: #7c3aed;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(5rem, 10vw, 8.5rem) 0;
  color: #f7f1ff;
  background:
    radial-gradient(ellipse 60% 70% at 72% 50%, rgba(124, 58, 237, 0.35), transparent 70%),
    radial-gradient(ellipse 50% 60% at 15% 100%, rgba(233, 196, 106, 0.14), transparent 70%),
    linear-gradient(160deg, #071a2b 0%, #160a26 45%, #22093a 100%);
}
.gift-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.gift-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px rgba(251, 231, 176, 0.8); animation: gift-twinkle 3.4s ease-in-out infinite; }
.gift-star.s1 { left: 8%; top: 18%; } .gift-star.s2 { left: 38%; top: 12%; animation-delay: -1.2s; }
.gift-star.s3 { left: 92%; top: 22%; animation-delay: -2s; } .gift-star.s4 { left: 56%; top: 86%; animation-delay: -0.6s; }
.gift-star.s5 { left: 24%; top: 78%; animation-delay: -2.6s; } .gift-star.s6 { left: 80%; top: 80%; animation-delay: -1.8s; }
@keyframes gift-twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.6); } 50% { opacity: 1; transform: scale(1.4); } }

.gift-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.gift-kicker { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 1.4rem; padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid rgba(233, 196, 106, 0.35); background: rgba(255, 255, 255, 0.04); color: var(--g-gold-2); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.gift-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--g-gold); box-shadow: 0 0 0 0 rgba(233, 196, 106, 0.7); animation: gift-ping 2s infinite; }
@keyframes gift-ping { 70% { box-shadow: 0 0 0 9px rgba(233, 196, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(233, 196, 106, 0); } }
.gift-copy h2 { margin: 0; font-family: var(--font-display, Georgia, serif); font-weight: 500; font-size: clamp(2.6rem, 5.4vw, 4.8rem); line-height: 0.98; letter-spacing: -0.03em; }
.gift-copy h2 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--g-gold-2), var(--g-gold) 30%, #fff 50%, #c4a7ff 65%, var(--g-gold) 85%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gift-shine 6s linear infinite;
}
@keyframes gift-shine { to { background-position: -250% 0; } }
.gift-lead { margin: 1.4rem 0 0; max-width: 470px; color: rgba(247, 241, 255, 0.72); font-size: 1.08rem; line-height: 1.6; }
.gift-count { display: flex; align-items: baseline; gap: 0.7rem; margin: 2rem 0 0; color: rgba(247, 241, 255, 0.6); font-size: 0.9rem; letter-spacing: 0.04em; }
.gift-count strong { font-family: var(--font-display, Georgia, serif); font-size: clamp(2.6rem, 4vw, 3.4rem); font-weight: 500; line-height: 1; color: var(--g-gold-2); font-variant-numeric: tabular-nums; }

/* Stage */
.gift-stage { position: relative; display: grid; place-items: center; min-height: 440px; color: inherit; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gift-stage:focus-visible { outline: 2px solid var(--g-gold); outline-offset: 8px; border-radius: 28px; }
.gift-rays {
  position: absolute; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(251, 231, 176, 0.16) 0deg 6deg, transparent 6deg 22deg);
  mask-image: radial-gradient(circle, #000 15%, transparent 65%); -webkit-mask-image: radial-gradient(circle, #000 15%, transparent 65%);
  animation: gift-spin 40s linear infinite;
}
@keyframes gift-spin { to { transform: rotate(360deg); } }
.gift-halo { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(167, 120, 255, 0.55), transparent 65%); filter: blur(24px); animation: gift-breathe 4s ease-in-out infinite; }
@keyframes gift-breathe { 50% { transform: scale(1.15); opacity: 0.75; } }

.gift-box { position: relative; width: 220px; height: 230px; margin-top: 30px; animation: gift-float 4.5s ease-in-out infinite; transform-origin: 50% 100%; transition: transform 0.5s var(--ease, ease); }
@keyframes gift-float { 50% { translate: 0 -14px; } }
.gift-stage:hover .gift-box, .gift-stage:focus-visible .gift-box { animation: gift-float 4.5s ease-in-out infinite, gift-wiggle 0.9s ease-in-out infinite; }
@keyframes gift-wiggle { 0%, 100% { rotate: 0deg; } 20% { rotate: -4deg; } 40% { rotate: 3.5deg; } 60% { rotate: -2deg; } 80% { rotate: 1deg; } }

.gift-body {
  position: absolute; left: 10px; right: 10px; bottom: 0; height: 160px; border-radius: 6px 6px 16px 16px; overflow: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 17px), var(--g-gold) calc(50% - 17px), var(--g-gold-2) 50%, #c99a3b calc(50% + 17px), transparent calc(50% + 17px)),
    linear-gradient(160deg, #6b2a92 0%, #3b0f52 55%, #24083a 100%);
  box-shadow: inset 0 -18px 30px rgba(0, 0, 0, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.1), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}
.gift-body::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 45%, transparent 60%);
  transform: translateX(-120%); animation: gift-sweep 4.5s ease-in-out infinite;
}
@keyframes gift-sweep { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.gift-tag { position: absolute; right: 16px; bottom: 16px; padding: 3px 8px; border-radius: 4px; background: #fbf3dc; color: #3b0f52; font: 700 0.62rem/1.4 var(--font-body, sans-serif); letter-spacing: 0.12em; rotate: -8deg; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); }

.gift-lid {
  position: absolute; left: 0; right: 0; top: 34px; height: 46px; z-index: 3; border-radius: 10px; overflow: visible;
  background:
    linear-gradient(90deg, transparent calc(50% - 19px), var(--g-gold) calc(50% - 19px), var(--g-gold-2) 50%, #c99a3b calc(50% + 19px), transparent calc(50% + 19px)),
    linear-gradient(170deg, #7e37a8, #4a1468);
  box-shadow: 0 10px 18px -6px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.18);
  transform-origin: 20% 100%;
}
.gift-bow { position: absolute; left: 50%; top: -38px; width: 0; height: 0; }
.gift-bow i { position: absolute; display: block; }
.gift-bow .loop { top: 0; width: 62px; height: 42px; border: 12px solid var(--g-gold); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 4px 10px rgba(0, 0, 0, 0.3); border-color: var(--g-gold-2) var(--g-gold) #b8862e var(--g-gold); }
.gift-bow .loop.l { right: 4px; rotate: -18deg; transform-origin: right bottom; }
.gift-bow .loop.r { left: 4px; rotate: 18deg; transform-origin: left bottom; }
.gift-bow .knot { left: -13px; top: 18px; width: 26px; height: 24px; border-radius: 8px; background: linear-gradient(135deg, var(--g-gold-2), #c99a3b); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); }
.gift-bow .tail { top: 34px; width: 14px; height: 34px; background: linear-gradient(var(--g-gold), #b8862e); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }
.gift-bow .tail.l { left: -22px; rotate: 24deg; }
.gift-bow .tail.r { left: 8px; rotate: -24deg; }

.gift-glow-inside { position: absolute; left: 20px; right: 20px; top: 70px; height: 20px; z-index: 2; border-radius: 50%; background: radial-gradient(ellipse, #fff8dc, rgba(233, 196, 106, 0.6) 40%, transparent 70%); opacity: 0; filter: blur(4px); }
.gift-shadow { position: absolute; bottom: calc(50% - 150px); width: 200px; height: 24px; border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%); animation: gift-shadow 4.5s ease-in-out infinite; }
@keyframes gift-shadow { 50% { transform: scale(0.85); opacity: 0.7; } }

.gift-cta { position: absolute; bottom: 8px; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.3rem; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(233, 196, 106, 0.4); color: var(--g-gold-2); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 0.3s, transform 0.3s; }
.gift-cta b { transition: transform 0.3s; }
.gift-stage:hover .gift-cta { background: rgba(233, 196, 106, 0.16); }
.gift-stage:hover .gift-cta b { transform: translateX(4px); }

/* Sparkle particles (spawned by JS) */
.gift-spark { position: absolute; left: 50%; top: 50%; width: var(--s, 8px); height: var(--s, 8px); pointer-events: none; z-index: 6; background: var(--c, #fbe7b0); border-radius: var(--r, 2px); opacity: 0; }
.gift-stage .gift-spark.idle { animation: gift-idle 2.6s ease-out forwards; }
@keyframes gift-idle { 0% { opacity: 0; transform: translate(var(--x0), var(--y0)) scale(0.3); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x1), var(--y1)) scale(1) rotate(180deg); } }
.gift-spark.pop { animation: gift-pop 1.2s cubic-bezier(0.15, 0.7, 0.3, 1) forwards; }
@keyframes gift-pop { 0% { opacity: 1; transform: translate(0, -40px) scale(1); } 100% { opacity: 0; transform: translate(var(--x1), var(--y1)) scale(0.6) rotate(var(--rot, 360deg)); } }

/* Opening sequence */
.gift-stage.is-opening .gift-box { animation: gift-shake 0.5s ease-in-out; }
@keyframes gift-shake { 0%, 100% { rotate: 0deg; } 20% { rotate: -7deg; } 40% { rotate: 7deg; } 60% { rotate: -5deg; } 80% { rotate: 4deg; } }
.gift-stage.is-open .gift-box { animation: none; }
.gift-stage.is-open .gift-lid { animation: gift-lid-off 0.9s cubic-bezier(0.3, 0.6, 0.3, 1) forwards; }
@keyframes gift-lid-off { to { transform: translate(-110px, -220px) rotate(-38deg); opacity: 0; } }
.gift-stage.is-open .gift-glow-inside { animation: gift-light 0.9s ease-out forwards; }
@keyframes gift-light { to { opacity: 1; transform: scaleX(1.2) scaleY(14) translateY(-6px); } }
.gift-stage.is-open .gift-cta { opacity: 0; transform: translateY(10px); }
.gift-stage.is-open .gift-rays { animation-duration: 3s; }

.gift-veil { position: fixed; inset: 0; z-index: 9999; pointer-events: none; background: radial-gradient(circle at var(--vx, 50%) var(--vy, 50%), #fff8e1 0%, #e9c46a 18%, #3b0f52 55%, #08060d 80%); clip-path: circle(0 at var(--vx, 50%) var(--vy, 50%)); transition: clip-path 0.9s cubic-bezier(0.7, 0, 0.3, 1); }
.gift-veil.is-on { clip-path: circle(150vmax at var(--vx, 50%) var(--vy, 50%)); }

@media (max-width: 860px) {
  .gift-grid { grid-template-columns: 1fr; text-align: center; }
  .gift-copy { display: flex; flex-direction: column; align-items: center; }
  .gift-lead { margin-inline: auto; }
  .gift-count { justify-content: center; }
  .gift-stage { min-height: 400px; }
  .gift-rays { width: 400px; height: 400px; }
}

@media (prefers-reduced-motion: reduce) {
  .gift-teaser *, .gift-teaser *::before, .gift-teaser *::after { animation: none !important; transition: none !important; }
  .gift-veil { display: none; }
}
