/* Peony design: white paper cover with a gold seal; deep maroon pages with red and white peonies, torn cream bands. */
:root {
  --bg: #5e1424;
  --paper: #f7f5f1;
  --stone: #efe6dc;
  --accent: #c9a66e;
  --accent-soft: rgba(255, 245, 235, .1);
  --accent-deep: #fbf6ef;
  --ink: #fbf3ea;
  --gold: #d6b67c;
  --gold-text: #e6c99a;
  --text: #f8ece2;
  --text-soft: #ead9cc;
  --text-mute: #d9c3b4;
  --shade: 30, 0, 8;
  --line: rgba(255, 235, 220, .35);
  --line-soft: rgba(255, 235, 220, .2);
  --card: #fbf6ef;
  --font-script: 'Cormorant Garamond', 'Amiri', serif;
}
html[lang="ar"] { --font-script: 'Amiri', serif; }
html[lang="ar"][data-font-ar="ruqaa"] { --font-script: 'Aref Ruqaa', 'Amiri', serif; }
body { background: #3d0c16; }
.title { color: var(--ink); font-weight: 500; }
.ornament { opacity: .9; }
.pill--fill, .pill--soft { background: #fbf6ef; color: #5e1424; }
.pill--line { background: transparent; border-color: rgba(255, 240, 225, .6); color: var(--ink); }
.textlink, .place__map { color: var(--ink); }
.sound { background: #fbf6ef; color: #5e1424; }

/* ---------- cover: white paper envelope with a gold seal ---------- */
.env__flap i { background: radial-gradient(120% 90% at 50% 50%, #ffffff, #efedea); }
.env__flap--l i, .env__flap--r i { background: linear-gradient(90deg, #ecebe8, #f8f7f5); }
.env__flap--l, .env__flap--r { filter: drop-shadow(0 0 6px rgba(0, 0, 0, .14)); }
.env__flap--t { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .18)); }
.env__center { top: 44%; }
.seal { width: 118px; filter: drop-shadow(0 8px 10px rgba(100, 70, 20, .35)); }
.env__hint, .env__to { color: #6e1a2c; }
.gate.is-open .env__flap--t, .gate.is-open .env__flap--b { background: #6e1a2c; }

/* ---------- opening view ---------- */
.hero { display: flex; flex-direction: column; align-items: center; padding: 70px 22px 0; background: radial-gradient(90% 60% at 50% 25%, #7a1d30, #5e1424); text-align: center; }
.pn-occ { margin: 0; font: 600 34px var(--font-serif); color: var(--ink); }
.pn-date { margin: 4px 0 30px; font: 500 22px var(--font-serif); color: var(--text-soft); }
.hero__names { display: flex; flex-direction: column; align-items: center; margin: 0; font: 600 70px/1.1 var(--font-serif); color: var(--ink); opacity: 0; transform: translateY(16px); transition: opacity 1.2s ease .5s, transform 1.4s var(--soft) .5s; }
html[lang="ar"] .hero__names { font-size: 78px; line-height: 1.25; }
.hero.is-in .hero__names { opacity: 1; transform: none; }
.hero__names .amp { font-size: .45em; color: var(--gold); text-shadow: none; } /* no white halo around the gold on maroon */
.pn-flowers { position: relative; display: flex; justify-content: center; align-items: flex-end; pointer-events: none; }
.pn-flowers img { width: 42%; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .4)); }
.pn-flowers img:nth-child(1) { width: 40%; transform: rotate(-12deg); margin-inline-end: -12%; }
.pn-flowers img:nth-child(2) { z-index: 1; }
.pn-flowers img:nth-child(3) { transform: rotate(10deg); margin-inline-start: -14%; }
.pn-flowers--hero { position: absolute; left: -6%; right: -6%; bottom: -30px; transform: translateY(40px); opacity: 0; transition: transform 1.6s var(--soft) .3s, opacity 1s ease .3s; }
.hero.is-in .pn-flowers--hero { transform: none; opacity: 1; }
.hero .scroll-hint { bottom: auto; top: 58%; }

/* ---------- maroon sections, torn cream bands ---------- */
.pn-letter { background: #5e1424; }
.pn-letter .letter__family, .pn-letter .letter__names { color: #fff; }
.pn-letter .letter__dear { color: var(--ink); }
.opening__lead, .letter__close { color: var(--gold-text); }
/* on the cream bands the gold of the kickers turns bronze (pale gold on cream can't be read) */
.pn-band { --text: #4a2a2a; --text-soft: #6a4a48; --text-mute: #7a5a56; --ink: #5e1424; --line: #e4d4c8; --line-soft: #f1e6dd; --accent-deep: #5e1424; --accent-soft: #f6ece4; --gold-text: #85662f; display: flow-root; position: relative; background: #fbf6ef; color: var(--text); } /* flow-root: the torn edge's negative margin lifts the edge, not the whole band */
.pn-band .pill--fill { background: #5e1424; color: #fff; }
.pn-band .pill--line { border-color: #c8a99a; color: #5e1424; }
.pn-band .textlink { color: #5e1424; }
.pn-torn { display: block; width: 100%; height: 32px; margin-top: -31px; position: relative; z-index: 1; }
.pn-torn--end { margin: 0 0 -1px; }
.pn-band .timer__cell { background: transparent; }
.pn-band .timer__num { font-size: 38px; color: #5e1424; }
.pn-band .line::before { background: #c8a99a; }
.pn-band .line__dot { width: 18px; height: 18px; border-radius: 50%; transform: none; background: radial-gradient(#fff 30%, #e8dcd0 31%); box-shadow: 0 0 0 1px #d8c6b8; }
.pn-place .place__photo { width: calc(100% - 40px); margin: 0 auto; border-radius: 12px; box-shadow: 0 0 0 6px #fbf6ef; }
.pn-place .place__img { filter: sepia(.2); }
.looks__item, .album__item { border-radius: 2px; box-shadow: 0 0 0 5px #caa564, 0 0 0 9px #8e6b33, 0 0 0 10px #e9cf96, 0 20px 30px -16px rgba(0, 0, 0, .6); }
.swatches span { box-shadow: 0 0 0 3px #fbf6ef; }
.reply-card { color: #4a2a2a; }
/* the voice and photo cards are cream, like the bands: the same dark tones on them (the page's cream buttons, icon and notes vanished on cream) */
.tile { --text-soft: #6a4a48; --text-mute: #7a5a56; --ink: #5e1424; --accent-deep: #5e1424; --accent-soft: #f1e6dd; --line-soft: #f1e6dd; background: #fbf6ef; color: #4a2a2a; }
.tile .pill--fill { background: #5e1424; color: #fff; }
.tile .pill--line { border-color: #c8a99a; color: #5e1424; }
.tile__head p, .mic__status { color: #6a4a48; }
.mic { background: radial-gradient(circle at 35% 30%, #a2384c, #5e1424); }
.field__label { color: inherit; opacity: .8; }
.book-name input { color: var(--ink); border-bottom-color: rgba(255, 240, 225, .5); }
.book-name input::placeholder { color: rgba(251, 243, 234, .72); }
.farewell { display: flow-root; background: linear-gradient(#5e1424, #4a0f1c); } /* flow-root: the room under the framed photo stays in the section (it cut the frame's lower edge off) */
.farewell__heart { stroke: var(--gold); }
.pn-flowers--end { margin: 0 -30px 10px; }

/* ---------- link preview ---------- */
.og-mode { background: #5e1424; }
.og { background: radial-gradient(70% 90% at 50% 30%, #7a1d30, #5e1424); }
.og > * { position: absolute; }
.og__text { top: 60px; left: 150px; right: 150px; text-align: center; }
.og__kicker { margin: 0; font: 600 40px var(--font-serif); color: var(--ink); }
.og__names { margin: 6px 0; white-space: nowrap; font: 600 120px/1.2 var(--font-serif); color: var(--ink); text-shadow: 0 4px 18px rgba(30, 0, 8, .4); } /* not the shared white glow: it washed out the cream names and the gold «و»/"&" on maroon */
.og__date { margin: 0; font: 500 26px var(--font-serif); color: var(--text-soft); }
.og__flowers { left: 260px; right: 260px; bottom: -120px; }
.lang-switch { color: #5e1424; }
.pn-band .reply, .pn-band .panel { background: none; }
.pn-band .reply .title, .pn-band .reply__lead { color: #5e1424; }
/* our twist: gold arched frame for the closing photo instead of a full-bleed one */
.farewell__photo { margin: 30px auto 50px; width: 74%; aspect-ratio: 3 / 4; border-radius: 999px 999px 8px 8px; box-shadow: 0 0 0 5px #caa564, 0 0 0 9px #8e6b33; }
.hero .scroll-hint { color: #5e1424; background: #fbf6ef; }
/* Link preview: Arabic names reach below their line box; keep the date clear of them. */
html[lang="ar"] .og__date { margin-top: 22px; }
.og__text { z-index: 1; }

/* the scroll hint pill: cream with maroon lettering (maroon on this maroon page could hardly be seen) */
#main .hero .scroll-hint { background: #fbf6ef; color: #5e1424; }
/* short screens (phone browsers with their bars): everything above the flowers shrinks, so they (and the scroll hint)
   don't cover the second name */
@media (max-height: 820px) {
  .hero { padding-top: 62px; }
  .pn-date { margin-bottom: 14px; }
  .hero__names { font-size: 60px; }
  html[lang="ar"] .hero__names { font-size: 64px; line-height: 1.2; }
}
@media (max-height: 720px) {
  .hero { padding-top: 58px; }
  .pn-occ { font-size: 28px; }
  .pn-date { margin-bottom: 12px; font-size: 19px; }
  .hero__names { font-size: 52px; }
  html[lang="ar"] .hero__names { font-size: 54px; line-height: 1.15; }
}
