/* Design pass 1, 14 Sep 2026 (Claude). Owner's answers in docs/02-decisions.md, "Design pass 1".
   Phone first screen: headline, festival photo, price card over the photo, buttons, hook line, features.
   Festive motion: marigold petals for the first seconds, a breathing glow behind the price card,
   the price card popping in once with a shine, press-lift on cards. Everything stops under
   html.motion-paused and prefers-reduced-motion (rules in refinement.css already cover animations). */

/* ---------- price card: glow and one-time pop ---------- */
.hero__price { position: relative; z-index: 2; }
.hero__price::before {
  content: ""; position: absolute; inset: -22px -26px; z-index: -1; border-radius: 40px;
  background: radial-gradient(closest-side, rgba(255, 196, 77, 0.55), rgba(255, 196, 77, 0));
  opacity: 0.55; animation: price-glow 4.2s ease-in-out infinite;
}
.hero__price::after {
  /* shine sweep, runs once after the pop */
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 16px;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-120%); pointer-events: none; opacity: 0;
}
html.pass1-motion .hero__price { animation: price-pop 0.75s cubic-bezier(0.2, 1.4, 0.4, 1) 0.35s both; }
html.pass1-motion .hero__price::after { animation: price-shine 1.1s ease-out 1.15s 1 both; }
.hero__price .offer-value b { position: relative; display: inline-block; }
html.pass1-motion .offer-value b::before,
html.pass1-motion .offer-value b::after {
  content: "✦"; position: absolute; font-size: 0.42em; color: #b74426; line-height: 1; opacity: 0;
  animation: price-spark 1.4s ease-out 1.05s 1 both;
}
html.pass1-motion .offer-value b::before { right: -0.55em; top: -0.35em; }
html.pass1-motion .offer-value b::after { left: -0.5em; bottom: -0.1em; animation-delay: 1.25s; }

@keyframes price-glow { 0%, 100% { opacity: 0.35; transform: scale(0.96); } 50% { opacity: 0.75; transform: scale(1.03); } }
@keyframes price-pop { 0% { transform: scale(0.94); } 60% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes price-shine { 0% { transform: translateX(-120%); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateX(380%); opacity: 0; } }
@keyframes price-spark { 0% { opacity: 0; transform: scale(0.4) rotate(0deg); } 40% { opacity: 1; transform: scale(1.15) rotate(20deg); } 100% { opacity: 0; transform: scale(0.6) rotate(45deg); } }

/* ---------- marigold petals (elements added by pass1.js, removed after they fall) ---------- */
.petals { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.petal {
  position: absolute; top: -24px; left: var(--x, 50%); width: 14px; height: 18px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, #ffd66a 0%, #f59e2b 55%, #d8701d 100%);
  opacity: 0; will-change: transform, opacity;
  animation: petal-fall var(--t, 6s) linear var(--d, 0s) 1 both;
}
.petal--small { width: 10px; height: 13px; background: radial-gradient(circle at 35% 30%, #ffe08a 0%, #f5b23b 60%, #d9812a 100%); }
.petal--deep { background: radial-gradient(circle at 35% 30%, #ff9f5a 0%, #e2601b 60%, #a63f12 100%); }
@keyframes petal-fall {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
  8%   { opacity: 0.95; }
  50%  { transform: translate3d(var(--sway, 30px), 55vh, 0) rotate(var(--spin, 200deg)); }
  90%  { opacity: 0.9; }
  100% { opacity: 0; transform: translate3d(calc(var(--sway, 30px) * -0.6), 108vh, 0) rotate(calc(var(--spin, 200deg) * 2)); }
}

/* ---------- press and hover lift on cards ---------- */
.template-choice, #how .step, .fest, .extra { transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.template-choice:hover, .template-choice:focus-visible { transform: translateY(-5px); }
.template-choice:active, .fest:active, #how .step:active, .extra:active { transform: translateY(-2px) scale(0.995); transition-duration: 0.12s; }
.template-choice:active .template-shot img, .fest:active .fest__img { transform: scale(1.02); }
.hero__actions .btn:active { transform: translateY(1px) scale(0.985); }

/* ---------- phone first screen ---------- */
@media (max-width: 700px) {
  .hero { padding-top: 60px; padding-bottom: 34px; }
  /* let the hero pieces sit in one column so the photo can come between the headline and the price */
  .hero__grid { gap: 0; }
  .hero__copy { display: contents; }
  .hero__copy > .eyebrow { order: 1; margin-bottom: 10px; }
  .hero__copy > h1 { order: 2; margin-bottom: 12px; font-size: clamp(2.35rem, 8.9vw, 3.3rem); }
  .celebration { order: 3; max-width: none; width: 100%; justify-self: stretch; padding: 8px; box-shadow: 6px 6px 0 #f7dfaa; border-radius: 140px 140px 16px 16px; }
  .celebration__top { display: none; }
  .celebration__photos { aspect-ratio: 4 / 3.5; border-radius: 132px 132px 10px 10px; }
  .celebration__stamp { bottom: auto; top: 14px; right: 14px; padding: 12px 16px; font-size: 0.9rem; }
  /* the price card covers the caption strip; keep only the photo-switch dots, at the top of the arch */
  .celebration figcaption { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 0; z-index: 3; }
  .celebration figcaption > div:first-child { display: none; }
  .celebration .scene-controls { background: rgba(255, 253, 247, 0.85); border-radius: 22px; }
  .celebration .motion-toggle { position: absolute; left: 16px; top: 16px; margin: 0; background: #fffdf7; z-index: 3; }
  .hero__copy > .hero__price { order: 4; margin: -96px 14px 0; box-shadow: 0 10px 24px -14px rgba(67, 45, 39, 0.55); border-color: #b8842f; }
  .hero__copy > .hero__actions { order: 5; margin-top: 16px; }
  .hero__copy > .hero__lead { order: 6; margin-top: 16px; font-size: 0.92rem; line-height: 1.6; }
  .hero__copy > .hero__lead br { display: none; }
  .hero__copy > .feats { order: 7; margin-top: 18px; }
  .petal { width: 11px; height: 14px; }
}
@media (max-width: 400px) {
  .hero__copy > .hero__price { margin-inline: 8px; padding: 15px 16px; }
  .hero__price b { font-size: 2.3rem; }
}

/* motion off: the rules in refinement.css pause or remove animations; keep the glow steady and hide petals */
html.motion-paused .hero__price::before { opacity: 0.45; }
html.motion-paused .petals, html.motion-paused .hero__price::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  .petals, .hero__price::after, .offer-value b::before, .offer-value b::after { display: none !important; }
  .hero__price::before { opacity: 0.45; }
}
