/* ==========================================================================
   CARD — the invitation itself. Portrait 866:1115 (the ivory design),
   starts lying sideways inside the envelope.
   Text sizes and gaps are in cqw (1% of the card's width), copied from the
   design canvas (866px wide), so the card scales as one piece.
   The frame picture is in src/ivory/ivory.css.
   ========================================================================== */
.card {
  position: absolute;
  z-index: 3;
  top: 50%; left: 50%;
  height: 122%;                       /* sideways, this is its width inside the envelope */
  aspect-ratio: 866 / 1115;
  box-sizing: border-box;
  translate: -50% -50%;
  transform: rotate(-90deg) scale(1);
  transform-origin: center;
  transition: translate 1.45s ease-in-out, transform 1.4s ease-in-out, box-shadow 1.4s, filter 1.4s;
  background: var(--noise), var(--card);
  color: var(--green);
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  filter: brightness(.93);            /* slightly dim while inside the envelope */
  border-radius: 2px;
  container-type: inline-size;
  font-family: var(--body);
}

.card .parents {
  position: absolute;
  top: 14%; left: 13.9cqw; right: 13.9cqw;
  display: flex;
  justify-content: space-between;
  gap: 1em;
  font-family: var(--caps);
  font-weight: 500;
  font-size: 3.35cqw;
  line-height: 1.3;
  letter-spacing: .02em;
}
.card .parents span { text-align: center; }   /* bride's parents: left in LTR, right in Hebrew */

.card .card-body {
  position: absolute; inset: 0;
  padding: 30.95cqw 8cqw 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.card .line { font-size: 3.35cqw; line-height: 1.15; text-wrap: balance; }
.card .names {
  margin: 6.35cqw 0 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: 14.1cqw;
  line-height: 1;
  white-space: nowrap;
}
.card .names em { font-family: var(--body); font-style: normal; font-size: .49em; vertical-align: .3em; margin: 0 .4em; }
.card .divider { display: block; margin-top: 2.8cqw; width: 12.7cqw; color: var(--gold); }
.card .divider svg { display: block; width: 100%; height: auto; }
.card .weekday { margin-top: 4.2cqw; font-family: var(--caps); font-weight: 500; font-size: 3.8cqw; line-height: 1; letter-spacing: .12em; }
.card .date { margin-top: 1cqw; font-family: var(--caps); font-weight: 500; font-size: 3.46cqw; line-height: 1; letter-spacing: .04em; }
.card .date-second { margin-top: 1.85cqw; font-family: var(--caps); font-weight: 500; font-size: 2.9cqw; line-height: 1; letter-spacing: .04em; }
.card .venue { margin-top: 8.8cqw; font-size: 5.2cqw; line-height: 1; }
.card .schedule { margin-top: 7.4cqw; display: flex; flex-direction: column; align-items: center; gap: 2.3cqw; font-size: 3.7cqw; line-height: 1; }
.card .schedule b { font-weight: 500; color: var(--olive); margin-inline-end: .3em; }

/* ---- animation states ---- */
.st-rise .card { translate: -50% calc(-50% - var(--env-h) * 1.05); filter: none; box-shadow: 0 12px 24px -10px rgba(0,0,0,.35); }
.st-turn .card { z-index: 6; translate: -50% calc(-50% - var(--env-h) * .25); transform: rotate(0deg) scale(1.3); box-shadow: 0 30px 60px -20px rgba(40,50,30,.5); }
.st-settle .card { translate: calc(-50% + var(--env-w) * var(--final-dx)) calc(-50% + var(--env-h) * var(--final-dy)); transform: rotate(0deg) scale(var(--final-scale)); }
