/* Palace design: ivory envelope, gold Basmala seal, curtains and a chandelier over a Moorish court; gold Arabic type. */
:root {
  --bg: #f6e9d8;
  --paper: #f4ede0;
  --stone: #efe0c8;
  --accent: #c9a35a;
  --accent-soft: #f6ead5;
  --accent-deep: #626c31;
  --ink: #7a5a28;
  --gold: #c9a35a;
  --gold-text: #7e5b1c; /* small gold lettering: ≥ 4.5:1 on the darker sand of the countdown and the court */
  --text: #4e3c26;
  --text-soft: #6b5638;
  --text-mute: #705c3e;
  --shade: 110, 80, 30;
  --line: #e2cfab;
  --line-soft: #f1e5cf;
  --card: #fffaf0;
  --font-script: 'Great Vibes', 'Aref Ruqaa', cursive;
}
html[lang="ar"] { --font-script: 'Aref Ruqaa', 'Amiri', serif; }
html[lang="ar"][data-font-ar="amiri"] { --font-script: 'Amiri', serif; }
body { background: #e8dcc6; }
.title { color: var(--ink); }
.kicker { color: var(--gold-text); }
.pill--fill, .pill--soft { background: var(--accent-deep); }
.sound { background: var(--accent-deep); }

/* ---------- cover: smooth ivory envelope, embossed flourish, gold seal ---------- */
.env__flap i { background: linear-gradient(160deg, #fbf8f1, #efe7d7); }
.env__flap--l i { background: linear-gradient(90deg, #efe7d6, #f8f3e9); }
.env__flap--r i { background: linear-gradient(270deg, #efe7d6, #f8f3e9); }
.env__flap--b i { background: linear-gradient(0deg, #f1e9da, #fbf8f1); }
.env__flap--t i { background: linear-gradient(180deg, #fdfbf6, #f3ecde); }
.env__flap--l, .env__flap--r { filter: drop-shadow(0 0 5px rgba(120, 95, 50, .14)); }
.env__flap--t { filter: drop-shadow(0 4px 7px rgba(120, 95, 50, .2)); }
.pl-flourish { position: absolute; top: 4%; left: 50%; width: min(70vw, 300px); transform: translateX(-50%); }
.env__center { top: 46%; }
.seal { width: 122px; filter: drop-shadow(0 10px 12px rgba(110, 80, 20, .4)); }
.env__hint { color: var(--gold-text); }
.pl-rule { display: block; width: 180px; margin-top: 12px; }

/* ---------- opening view: curtains part onto the court ---------- */
.hero { background: linear-gradient(#efe0c4, #f6ead6 60%, var(--bg)); }
.pl-court { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; background: 50% 60% / cover; -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 85%, transparent); mask-image: linear-gradient(transparent, #000 25%, #000 85%, transparent); }
.pl-palms i { position: absolute; bottom: 30%; width: 70px; height: 210px; background: radial-gradient(60% 30% at 50% 12%, #6d6a3a 40%, transparent 70%), linear-gradient(90deg, transparent 46%, #7c6440 46% 54%, transparent 54%); opacity: .55; }
.pl-palms i:nth-child(1) { left: 6%; height: 240px; }
.pl-palms i:nth-child(2) { left: 22%; height: 200px; opacity: .4; }
.pl-palms i:nth-child(3) { right: 22%; height: 200px; opacity: .4; }
.pl-palms i:nth-child(4) { right: 6%; height: 240px; }
.pl-chandelier { position: absolute; top: -6px; left: 50%; width: 46%; transform: translateX(-50%); filter: drop-shadow(0 6px 10px rgba(110, 80, 30, .25)); animation: sway 6s ease-in-out infinite alternate; transform-origin: 50% 0; }
@keyframes sway { from { transform: translateX(-50%) rotate(-1deg); } to { transform: translateX(-50%) rotate(1deg); } }
.pl-drape { position: absolute; top: 0; width: 44%; height: 100%; transition: transform 2.4s var(--glide) .2s; }
.pl-drape img { width: 100%; height: 100%; }
.pl-drape--l { left: 0; transform: translateX(14%); }
.pl-drape--r { right: 0; transform: translateX(-14%) scaleX(-1); }
.hero.is-in .pl-drape--l { transform: translateX(-8%); }
.hero.is-in .pl-drape--r { transform: translateX(8%) scaleX(-1); }
.hero__text { top: 30%; left: 20%; right: 20%; }
.hero__names { display: flex; flex-direction: column; align-items: center; font-size: 58px; line-height: 1.1; color: var(--ink); white-space: normal; text-shadow: 0 0 16px rgba(255, 248, 232, .95); }
html[lang="ar"] .hero__names { font-size: 60px; line-height: 1.3; }
.hero__names .amp { font-size: .5em; color: #9a7834; }
/* «و»/"&" between the names everywhere (formal text, closing, link card): an antique gold that reads on the sand (3:1) */
.amp { color: #9a7834; }
.hero__date, .hero__time { margin: 4px 0 0; font: 500 17px var(--font-ui); color: var(--text); text-shadow: 0 0 3px #fff8ea, 0 0 10px #fff8ea, 0 0 20px #fff8ea; }
.hero__time { margin: 0; font-size: 15px; }
.hero .scroll-hint { color: var(--ink); }

/* ---------- mihrab-shaped invitation card ---------- */
.pl-letter { padding: 46px 18px; background: linear-gradient(var(--bg), #f2e2c8); }
.pl-card { position: relative; max-width: 400px; margin: 0 auto; padding: 3px; background: linear-gradient(#d6b571, #b8924f); -webkit-mask: var(--mihrab) center / 100% 100%; mask: var(--mihrab) center / 100% 100%; }
.pl-card__in { padding: 100px 24px 40px; background: radial-gradient(90% 60% at 50% 30%, #fffaf0, #f6ead4); text-align: center; -webkit-mask: var(--mihrab) center / 100% 100%; mask: var(--mihrab) center / 100% 100%; }
.pl-letter .opening__lead { font-family: 'Aref Ruqaa', 'Amiri', serif; color: var(--ink); }
.pl-letter .opening__verse { color: var(--ink); } /* the verse stays in Amiri (kit.css): its vowel marks collide in Aref Ruqaa */
.pl-letter .letter__names { color: var(--ink); }
.pl-count { background: #f2e2c8; }
.pl-count .timer__cells { gap: 2px; }
.pl-count .timer__cell { background: transparent; }
.pl-count .timer__num { font-size: 42px; color: var(--ink); }
.line__dot { width: auto; height: auto; background: none; transform: none; box-shadow: none; color: var(--gold); font-size: 16px; font-style: normal; }
.pl-place .place__photo { width: calc(100% - 40px); margin: 0 auto; border-radius: 999px 999px 18px 18px; box-shadow: 0 0 0 4px #fffaf0, 0 0 0 5px var(--gold), 0 22px 36px -20px rgba(var(--shade), .55); }
.reply { background: linear-gradient(var(--bg), #f1e2c9); }
.reply-card .pill--fill { background: var(--accent-deep); }
.pl-chandelier--end { position: static; display: block; width: 120px; margin: 0 auto 10px; transform: none; animation: none; }

/* ---------- link preview ---------- */
.og-mode { background: var(--bg); }
.og__court { position: absolute; inset: 0; background: center / cover; }
.og::after { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 70% at 50% 45%, rgba(255, 248, 232, .85), rgba(255, 248, 232, 0) 75%); }
.og > * { position: absolute; z-index: 1; }
.og > .og__court { z-index: 0; }
.og__drape { top: 0; width: 260px; height: 630px; }
.og__drape img { width: 100%; height: 100%; }
.og__drape--l { left: -30px; }
.og__drape--r { right: -30px; transform: scaleX(-1); }
.og__ch { top: -10px; left: 50%; width: 200px; transform: translateX(-50%); }
.og__ch img { width: 100%; }
.og__text { top: 220px; left: 250px; right: 250px; text-align: center; }
.og__names { margin: 0; white-space: nowrap; font-size: 120px; line-height: 1.3; color: var(--ink); }
.og__date { margin: 6px 0 0; font: 500 28px var(--font-ui); color: var(--ink); }
/* a warm ivory haze lifts the names (and a birthday's age line) off the carved court */
.og__text::before { content: ""; position: absolute; z-index: -1; inset: -30px -70px -10px; background: radial-gradient(closest-side, rgba(255, 248, 232, .92), rgba(255, 248, 232, .7) 62%, rgba(255, 248, 232, 0)); }
.og__names, .og__bday { text-shadow: 0 0 6px #fff8ea, 0 0 18px #fff8ea, 0 0 40px rgba(255, 248, 232, .95); }
@media (prefers-reduced-motion: reduce) { .pl-chandelier { animation: none; } .pl-drape { transition: none; } }
/* curtains frame the court instead of covering it */
.pl-drape { width: 34%; }
.pl-drape--l { transform: translateX(30%); }
.pl-drape--r { transform: translateX(-30%) scaleX(-1); }
.hero.is-in .pl-drape--l { transform: translateX(-22%); }
.hero.is-in .pl-drape--r { transform: translateX(22%) scaleX(-1); }
.pl-chandelier { z-index: 2; width: 40%; }
.hero__text { z-index: 3; top: 33%; left: 14%; right: 14%; }
.pl-court { height: 64%; }
.hero__text { top: 19%; }
.pl-palms { display: none; }
/* short screens (phone browsers with their bars): the names shrink so the date stays on the plain wall, clear of the dark roof tiles */
@media (max-height: 720px) { .hero__names { font-size: 42px; } html[lang="ar"] .hero__names { font-size: 44px; line-height: 1.2; } .hero__text { top: 20%; } }
/* our twist: ivory curtains instead of beige drapes */
.pl-drape img { filter: brightness(1.12) saturate(.6); }
/* Link preview: Arabic script names reach below their line box; give the date room and a soft backing over the photo. */
html[lang="ar"] .og__date { margin-top: 26px; }
.og__date { display: inline-block; padding: 6px 22px; border-radius: 999px; background: rgba(255, 249, 236, .82); }
