/* Swans design: ivory embossed paper, cream seal, pale castle watercolour over a lake with swans, gold lace. */
:root {
  --bg: #f8eee2;
  --paper: #efdfc5;
  --stone: #efe2cd;
  --accent: #c9a76a;
  --accent-soft: #f6ead7;
  --accent-deep: #7a5c2c; /* deep enough for the verse and the closing line on ivory */
  --ink: #6b5233;
  --gold: #a07f45;
  --gold-text: #7c5e2c;
  --text: #4e4030;
  --text-soft: #6b5b48;
  --text-mute: #7a6a56;
  --shade: 110, 80, 40;
  --line: #e4d4bb;
  --line-soft: #f1e6d4;
  --card: #fffaf2;
  --cal-bg: #fffaf2;
  --font-script: 'Pinyon Script', 'Amiri', cursive;
}
html[lang="ar"] { --font-script: 'Amiri', serif; }
html[lang="ar"][data-font-ar="ruqaa"] { --font-script: 'Aref Ruqaa', 'Amiri', serif; }
body { background: #eadcc7; }
.title, .kicker { color: var(--ink); }
.kicker { color: var(--gold-text); }
.pill--fill, .pill--soft { background: linear-gradient(90deg, #7d5e2c, #8f6e38); }
.sound { background: #8a7a52; }

/* ---------- cover: ivory embossed paper ---------- */
.env__flap i { background: url("../assets/swans/emboss.jpg") 50% 40% / 90% auto, #eedfc4; }
.env__flap--t i { background: url("../assets/swans/emboss.jpg") 50% 0 / 80% auto, #f2e5cc; }
.env__flap--b i { background: url("../assets/swans/emboss.jpg") 50% 100% / 80% auto, #ebdbbe; }
.env__flap--l, .env__flap--r { filter: drop-shadow(0 0 5px rgba(120, 90, 40, .25)); }
.env__flap--t { filter: drop-shadow(0 4px 6px rgba(120, 90, 40, .3)); }
.env__center { top: 42%; }
.seal { width: 120px; filter: drop-shadow(0 8px 10px rgba(120, 90, 40, .35)); }
.cal__head { opacity: .9; }
.env__hint { color: #6a4e24; text-shadow: 0 0 6px rgba(250, 242, 228, .95), 0 0 14px rgba(250, 242, 228, .8); }

/* ---------- opening view: castle, gold arch, the lake with two swans ---------- */
.hero { background: linear-gradient(#fbf5ec, var(--bg)); }
.sw-castle { position: absolute; inset: 0 0 36%; background: center 30% / cover; -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 80%, transparent); mask-image: linear-gradient(transparent, #000 12%, #000 80%, transparent); transform: scale(1.08); transition: transform 6s var(--soft); }
.hero.is-in .sw-castle { transform: none; }
.sw-arch { position: absolute; top: 5%; left: 7%; width: 86%; height: 78%; }
.hero__text { top: 26%; }
.hero__names { display: flex; flex-direction: column; align-items: center; font-size: 66px; line-height: 1; color: var(--ink); white-space: normal; text-shadow: 0 0 14px rgba(255, 250, 240, .95); }
html[lang="ar"] .hero__names { font-size: 54px; line-height: 1.35; }
.hero__names .amp { font-size: .45em; color: #6e5022; }
.hero__date { margin: 12px 0 0; font: 500 20px var(--font-serif); letter-spacing: .14em; color: #4e3b22; text-shadow: 0 0 4px #fff, 0 0 10px #fff, 0 0 18px rgba(255, 250, 240, .9); }
.sw-lake { position: absolute; left: 0; right: 0; bottom: 22px; height: 38%; overflow: hidden; background: linear-gradient(#e3eaec 0%, #dde6e9 50%, var(--bg)); }
.sw-lake::before { content: ""; position: absolute; inset: 0; background: var(--castle) center 30% / cover; transform: scaleY(-1); opacity: .45; filter: blur(1.5px) saturate(.7); -webkit-mask-image: linear-gradient(#000 10%, transparent 85%); mask-image: linear-gradient(#000 10%, transparent 85%); }
.sw-lake::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, rgba(255,255,255,.18) 0 2px, transparent 2px 9px); }
.sw-swan { position: absolute; z-index: 1; bottom: 14%; width: 36%; animation: glide 7s ease-in-out infinite alternate; }
.sw-swan--a { left: 12%; }
.sw-swan--b { right: 12%; animation-delay: -3.5s; }
@keyframes glide { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-5px) rotate(1deg); } }
.sw-lace { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: var(--lace) repeat-x; }
.hero .scroll-hint { bottom: 40px; color: var(--ink); }

/* ---------- lace frame for the verse ---------- */
.sw-verse { padding: 46px 18px; }
.lace-frame { max-width: 420px; margin: 0 auto; padding: 16px; background: #f0e2c7; border-radius: 10px; box-shadow: 0 0 0 2px #e2cda3, 0 0 0 6px #f7ecd8, 0 0 0 7px #d7bf93, 0 22px 36px -22px rgba(var(--shade), .55); background-image: radial-gradient(circle at 8px 8px, #d7bf93 2px, transparent 2.5px); background-size: 16px 16px; }
.lace-frame__in { padding: 26px 18px; text-align: center; background: #fffaf1; border-radius: 4px; box-shadow: inset 0 0 0 1px #e6d4b2; }
.sw-date { background: linear-gradient(var(--bg), #f4e5d0); }
.sw-card { background: #fffaf2; box-shadow: 0 0 0 1px #ead9bd, 0 22px 40px -24px rgba(var(--shade), .5); }
.sw-card .when-row b { border-color: var(--gold); color: var(--ink); }
.sw-card .timer__cell { background: transparent; }
.sw-card .timer__num { color: var(--gold-text); font-size: 34px; }
.cal__month { color: var(--ink); }
.cal__day.is-day b { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--gold); }
.sw-letter { background: #f4e5d0; }
.sw-story { margin: 0 0 4px; font-size: 44px; color: var(--ink); }
html[lang="ar"] .sw-story { font-size: 34px; }
.families__col { padding: 12px 10px; background: #fffaf2; border-radius: 4px; box-shadow: 0 6px 14px -8px rgba(var(--shade), .4); }
.families { border: 0; }
.letter__names { color: var(--ink); }
.album__item { border-radius: 10px; box-shadow: 0 0 0 5px #fffaf2, 0 18px 30px -18px rgba(var(--shade), .6); }
.sw-place .place__photo { width: calc(100% - 40px); margin: 0 auto; border-radius: 10px; box-shadow: 0 0 0 5px #fffaf2, 0 22px 36px -22px rgba(var(--shade), .55); }
.reply { background: linear-gradient(var(--bg), #f2e2cb); }
.reply-card .pill--fill { background: linear-gradient(90deg, #7d5e2c, #93723c); }
.sw-end { display: block; width: 130px; margin: 6px auto; }

/* ---------- link preview ---------- */
.og-mode { background: var(--bg); }
.og__castle { position: absolute; inset: 0; background: center / cover; }
.og::after { content: ""; position: absolute; inset: 0; background: radial-gradient(55% 70% at 50% 45%, rgba(255, 250, 240, .78), rgba(255, 250, 240, 0) 75%); }
.og > * { position: absolute; z-index: 1; }
.og > .og__castle { z-index: 0; }
.og__swan { bottom: 10px; width: 300px; }
.og__swan--a { left: 60px; }
.og__swan--b { right: 60px; }
.og__text { top: 120px; left: 150px; right: 150px; text-align: center; }
.og__kicker { margin: 0; font: 500 28px var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
html[lang="ar"] .og__kicker { font-size: 34px; letter-spacing: 0; }
.og__names { margin: 0; white-space: nowrap; font-size: 130px; line-height: 1.2; color: var(--ink); }
html[lang="ar"] .og__names { font-size: 104px; line-height: 1.45; }
.og__date { margin: 0; font: 500 30px var(--font-serif); letter-spacing: .16em; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .sw-swan { animation: none; } }
/* softer seam between castle and lake */
.sw-lake { background: linear-gradient(rgba(227, 234, 236, 0) 0%, #e3eaec 18%, #dde6e9 55%, var(--bg)); }
.sw-lake::before { opacity: .6; -webkit-mask-image: linear-gradient(transparent, #000 15%, transparent 90%); mask-image: linear-gradient(transparent, #000 15%, transparent 90%); }
.sw-lake::after { background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .1) 0 1px, transparent 1px 11px); }
.sw-castle { -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 86%, transparent 100%); mask-image: linear-gradient(transparent, #000 12%, #000 86%, transparent 100%); }
/* our twist: a crescent moon over the castle, gold names */
.hero::before { content: ""; position: absolute; z-index: 1; top: 13%; right: 18%; width: 34px; height: 34px; border-radius: 50%; box-shadow: -9px 4px 0 0 #d9bb84; opacity: .9; }
/* deep gold with a soft ivory halo so the names read over the castle */
.hero__names { color: #6e5022; text-shadow: 0 0 3px rgba(255, 250, 240, .95), 0 0 10px rgba(255, 250, 240, .95), 0 0 22px rgba(255, 250, 240, .85); }
/* Keep the guest's name readable over the drawing on the cover: darker ink and a soft paper-coloured halo. */
.env__to { color: var(--ink); text-shadow: 0 0 4px var(--bg), 0 0 12px var(--bg), 0 0 26px var(--bg), 0 0 40px var(--bg); }
