/* Velvet design: maroon lace envelope, gold heart seal, the invitation on one cream card rising from the pocket. */
:root {
  --bg: #f7efe6;
  --paper: #5a1824;
  --stone: #efe2d6;
  --accent: #b3846f;
  --accent-soft: #f4e6df;
  --accent-deep: #6d2433;
  --ink: #6d2433;
  --gold: #c39a55;
  --gold-text: #8f5e48;
  --text: #4a2e2c;
  --text-soft: #6a4c48;
  --text-mute: #7a5c57;
  --shade: 70, 20, 30;
  --line: #e4d2c8;
  --line-soft: #f1e5de;
  --card: #fffaf5;
  --font-script: 'Great Vibes', 'Aref Ruqaa', cursive;
  --lace: url("../assets/velvet/lace.jpg");
}
html[lang="ar"] { --font-script: 'Aref Ruqaa', 'Amiri', serif; }
html[lang="ar"][data-font-ar="amiri"] { --font-script: 'Amiri', serif; }
/* velvet backdrop around the card */
body { background: radial-gradient(80% 60% at 50% 30%, #6a2030, #3a0d16); }
.page { max-width: min(var(--col), calc(100vw - 28px)); margin: 18px auto 0; padding-bottom: 150px; border-radius: 4px 4px 0 0; background: linear-gradient(#fffaf4, var(--bg)); box-shadow: 0 0 0 1px rgba(255, 240, 230, .15), 0 30px 60px rgba(0, 0, 0, .45); }
.title, .kicker { color: var(--ink); }
.kicker { color: var(--gold-text); }
.pill--fill, .pill--soft { background: var(--accent-deep); }
.sound { background: #fffaf4; color: var(--ink); }

/* the lace pocket stays at the bottom of the screen; the card scrolls behind it */
.vv-pocket { position: fixed; z-index: 35; left: 50%; bottom: 0; width: min(100vw, calc(var(--col) + 40px)); height: 130px; transform: translateX(-50%); pointer-events: none; background: var(--lace) center / 300px auto, #5a1824; clip-path: polygon(0 0, 50% 46%, 100% 0, 100% 100%, 0 100%); filter: drop-shadow(0 -6px 10px rgba(0, 0, 0, .35)); }
.vv-pocket::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .25)); }

/* ---------- cover ---------- */
.gate { background: radial-gradient(80% 60% at 50% 40%, #7a2737, #3a0d16); }
.vv-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.vv-env { --w: min(84vw, 360px); position: relative; width: var(--w); height: calc(var(--w) * .66); }
.vv-env__back, .vv-env__pocket, .vv-env__flap { position: absolute; inset: 0; background: var(--lace) center / 220px auto, #5a1824; }
.vv-env__back { border-radius: 4px; filter: brightness(.75); }
.vv-env__card { position: absolute; left: 7%; right: 7%; top: 8%; height: 88%; display: grid; grid-template-columns: minmax(0, 1fr); place-items: start center; padding-top: 10%; background: #fbf4ea; transition: transform 1.2s var(--soft) .45s; }
.vv-env__card .script { display: block; max-width: 100%; font-size: 40px; line-height: 1.25; white-space: nowrap; color: var(--ink); opacity: .9; }
.vv-env__pocket { clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); filter: drop-shadow(0 -2px 3px rgba(0, 0, 0, .4)); box-shadow: inset 0 0 0 1px rgba(255, 220, 200, .15); }
.vv-env__flap { z-index: 2; height: 58%; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; transition: transform .7s var(--glide); filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .45)); }
/* `translate` (not transform) so the shared seal animations, which set transform, don't knock it off centre */
.vv-env .seal { position: absolute; z-index: 3; top: 58%; left: 50%; width: 30%; translate: -50% -50%; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
.vv-cover .env__to { margin: 0; text-align: center; color: #e6c99d; font: 500 15px var(--font-ui); }
.vv-cover .env__to bdi { color: #fff3df; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.vv-hint { margin: 0; color: rgba(255, 236, 210, .72); font: 500 14px var(--font-ui); letter-spacing: .02em; animation: hintPulse 2.4s ease-in-out infinite; }
html[lang="ar"] .vv-hint { font-size: 15px; }
.gate.is-opening .vv-hint, .gate.is-opening .env__to { opacity: 0; transition: opacity .3s; }
.gate.is-open .vv-env__flap { transform: scaleY(-1); z-index: 0; }
.gate.is-open .vv-env__card { transform: translateY(-62%); }
.gate.is-open .vv-env { animation: fadeAway .7s ease 1.3s forwards; }
@keyframes fadeAway { to { opacity: 0; transform: scale(1.06); } }
.gate.is-open .env__flap { display: none; }

/* ---------- the card ---------- */
.hero { height: auto; min-height: 0; padding: 70px 22px 40px; text-align: center; background: none; }
.hero__names { display: flex; flex-direction: column; align-items: center; margin: 0; font-size: 72px; line-height: 1.05; color: var(--ink); }
html[lang="ar"] .hero__names { font-size: 76px; line-height: 1.25; }
.hero__names .amp { font-size: .4em; color: #a87964; }
/* «و»/"&" between the names in the formal text, the closing and the link card: an antique gold that reads (3:1) */
.amp { color: #9e7636; }
.hero .when-row { max-width: 300px; color: var(--ink); }
.hero .when-row b { border-color: var(--accent); }
.hero .when-time { color: var(--text-soft); }
.hero .scroll-hint { position: static; transform: none; margin: 26px auto 0; }
.hero .scroll-hint.is-off { transform: translateY(12px); }
.vv-verse .opening__lead { font-family: 'Aref Ruqaa', 'Amiri', serif; color: var(--ink); }
.vv-verse .opening__verse { color: var(--ink); } /* the verse stays in Amiri (kit.css): its vowel marks collide in Aref Ruqaa */
.timer__cell { background: #fff; border-radius: 999px 999px 999px 999px / 60% 60% 40% 40%; box-shadow: inset 0 0 0 1px #ead7cd; }
.timer__num { color: var(--ink); }
.letter__names { color: var(--ink); }
.reply-card, .tile { box-shadow: 0 0 0 1px #ead7cd, 0 20px 36px -24px rgba(var(--shade), .5); }

.place { padding-bottom: 30px; } /* no venue photo: room under the map link */
.place, .reply, .farewell { margin-inline: 7px; } /* inside the card's gold hairline, which their backgrounds covered */

/* ---------- link preview ---------- */
.og-mode { background: #3a0d16; }
.og { background: var(--lace) center / 300px auto, #5a1824; }
.og > * { position: absolute; }
.og__card { top: 40px; left: 300px; right: 300px; bottom: 0; padding: 50px 30px 0; background: #fbf4ea; text-align: center; box-shadow: 0 20px 40px rgba(0, 0, 0, .45); }
.og__kicker { margin: 0; font: 500 24px var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
html[lang="ar"] .og__kicker { font-size: 32px; letter-spacing: 0; }
.og__names { margin: 10px 0; white-space: nowrap; font-size: 110px; line-height: 1.3; color: var(--ink); }
.og__date { margin: 0; font: 500 24px var(--font-ui); color: var(--text-soft); }
.og__seal { bottom: 40px; left: 50%; width: 120px; transform: translateX(-50%); }
@media (prefers-reduced-motion: reduce) { .vv-env__card, .vv-env__flap { transition: none; } }
.gate.is-open .vv-env__flap { opacity: 0; transition: transform .7s var(--glide), opacity .4s ease .3s; }
/* our twist: gold hairline around the card, rose-embossed lace */
.page { box-shadow: 0 0 0 1px rgba(255, 240, 230, .15), inset 0 0 0 6px #fffaf4, inset 0 0 0 7px #d4b07a, 0 30px 60px rgba(0, 0, 0, .45); }
/* Link preview: drop the shared top offset so the seal sits at the bottom of the card, clear of the title. */
.og__seal { top: auto; }
.gate.is-opening .vv-hint, .gate.is-open .vv-hint { animation: none; opacity: 0; }
/* the "made with" badge sits above the fixed pocket at the bottom of the screen */
.made-with { position: relative; z-index: 36; }
