/* Yalda mood (test1 3.8): a light touch of شب یلدا on the burgundy wedding card.
   The card stays a wedding card; the accents are painted pomegranates, seeds and a Persian floral fabric.
   Loaded only when «حال‌وهوای یلدا» is on in the panel (کادر بخش‌ها). Pictures live in assets/img/yalda/. */

/* ---------- opening photo: a few drifting seeds ---------- */
.yalda-sky { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.yalda-fall {
  position: absolute; top: -30px; left: var(--x);
  width: calc(15px * var(--s)); height: auto; opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(30, 3, 9, .4));
}
body.entered .yalda-fall { animation: yalda-fall var(--t) linear calc(var(--d) + 2.5s) infinite; }
.yalda-line {
  position: relative; z-index: 3;
  display: inline-flex; align-items: center; gap: .55rem;
  margin: .9rem auto 0; padding: .38rem 1rem;
  color: #f6e3b4; font-size: .86rem; letter-spacing: 0;
  background: rgba(40, 8, 16, .32); border: 1px solid rgba(246, 227, 180, .35); border-radius: 999px;
  backdrop-filter: blur(4px);
}
.yalda-line img { width: 11px; height: auto; }

/* ---------- invitation text: the nightingale corner; the ornament becomes a pomegranate and seeds ---------- */
.message-card.has-yalda { overflow: visible; padding-bottom: clamp(5.6rem, 22vw, 8rem); }
.yalda-corner-bird {
  position: absolute; z-index: 3; right: 4px; bottom: 6px;
  width: clamp(140px, 40%, 250px); pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(77, 17, 29, .12));
}
.yalda-corner-bird img { display: block; width: 100%; height: auto; }
.message-card.has-yalda .invitation-copy,
.message-card.has-yalda > strong { position: relative; z-index: 4; }
.yalda-ornament { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: .5rem auto 1rem; }
.yalda-ornament i { display: block; width: clamp(30px, 8vw, 54px); height: 1px; background: linear-gradient(90deg, transparent, var(--gold, #b9924e)); }
.yalda-ornament i:last-child { transform: scaleX(-1); }
.yalda-ornament .yalda-seed { width: 11px; height: auto; }
.yalda-ornament .yalda-seed:nth-of-type(1) { transform: rotate(-25deg); }
.yalda-ornament .yalda-seed:nth-of-type(3) { transform: rotate(25deg); }
.yalda-ornament .yalda-mini { width: 30px; height: auto; filter: drop-shadow(0 2px 3px rgba(77, 17, 29, .2)); }
.yalda-cypress { width: clamp(30px, 8vw, 42px); margin: .1rem auto .9rem; }
.yalda-cypress img { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 5px rgba(40, 50, 20, .18)); }

/* ---------- countdown: an open pomegranate in the free corner ---------- */
.yalda-calendar-fruit { position: absolute; left: clamp(2px, 2vw, 24px); bottom: 18px; width: clamp(74px, 17vw, 120px); pointer-events: none; z-index: 1; }
.yalda-calendar-fruit img { display: block; width: 100%; height: auto; transform: rotate(-12deg); filter: drop-shadow(0 6px 8px rgba(77, 17, 29, .2)); }

/* ---------- programme: faint line drawings, a pomegranate by the bow, seeds on the line ---------- */
.program-paper.has-yalda { position: relative; isolation: isolate; }
.program-paper.has-yalda::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: url("../img/yalda/pattern-lines.webp") center top / 300px auto repeat;
  opacity: .09;
}
.program-section .line-bow.is-yalda-candle { position: relative; width: clamp(96px, 26vw, 124px); margin-bottom: .8rem; filter: none; }
.line-bow.is-yalda-candle::before {
  content: ""; position: absolute; left: 50%; top: 4%; width: 92%; aspect-ratio: 1; transform: translate(-50%, -38%);
  background: radial-gradient(circle, rgba(255, 214, 140, .55), rgba(255, 214, 140, .18) 45%, transparent 70%);
  animation: yalda-glow 3.2s ease-in-out infinite; pointer-events: none;
}
.line-bow.is-yalda-candle img { position: relative; animation: none !important; filter: drop-shadow(0 6px 8px rgba(77, 17, 29, .16)); }
.program-marker:has(.yalda-marker-seed) { background: transparent !important; border-color: transparent !important; box-shadow: none !important; overflow: visible; }
.program-marker .yalda-marker-seed { max-width: none; position: absolute; left: 50%; top: 50%; width: 19px; height: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 1px 2px rgba(77, 17, 29, .3)); }

/* ---------- RSVP (the dark block): the burgundy-and-gold floral fabric ---------- */
.participation.has-yalda {
  background:
    linear-gradient(rgba(92, 22, 35, .82), rgba(58, 12, 22, .93)),
    url("../img/yalda/jacobean.webp") center top / 520px auto repeat;
}
.yalda-heading-fruit { width: clamp(108px, 26vw, 150px); margin: .1rem auto -.4rem; }
.yalda-heading-fruit img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }

/* ---------- motion ---------- */
@keyframes yalda-glow { 0%, 100% { opacity: .75; transform: translate(-50%, -38%) scale(.96); } 50% { opacity: 1; transform: translate(-50%, -38%) scale(1.04); } }
@keyframes yalda-fall {
  0% { opacity: 0; transform: translate(0, 0) rotate(0); }
  8% { opacity: .9; }
  85% { opacity: .75; }
  100% { opacity: 0; transform: translate(-18px, 105svh) rotate(260deg); }
}
@media (prefers-reduced-motion: reduce) {
  .yalda-fall { display: none; }
  .line-bow.is-yalda-candle::before { animation: none; }
}
