/* ============================================================
   Engagement invitation — shared design system
   Surfaces: dusty-blue dress palette (#8FAECB/#ADC7DF/#6D85A5/
   #D9E7EE…) over an iris-damask wallpaper; envelope is white
   damask paper. Type: warm ink/brown with antique-gold accents
   (visible colors per the couple's request — no blue lettering).
   ============================================================ */

:root {
  --ivory:      #f2efe6;   /* Soft Ivory */
  --ice:        #d9e7ee;   /* Ice Blue — soft panels */
  /* +30% contrast variants (2026-06-10) — previous values kept in comments
     in case the couple wants to revert */
  --dusty:      #7aa2cd;   /* was #8faecb — Dusty Blue, surfaces/borders */
  --powder:     #9cbcdc;   /* was #adc7df */
  --periwinkle: #b6cde8;
  --sage:       #a9bec4;
  --silver:     #c3ccd6;
  --steel:      #54739c;   /* was #6d85a5 — Steel Blue */
  --blue-deep:  #2c456b;   /* was #3f5571 — buttons, countdown */
  --gold:       #8a6624;   /* was #9c7c3c — titles, ornaments */
  --gold-soft:  #c2a258;   /* was #c9b178 — champagne borders */
  --brown:      #2f2415;   /* was #44392a — names, headings */
  --ink:        #211b11;   /* was #322b21 — body text */
  --muted:      #665940;   /* was #7c7261 — secondary text */

  --font-display: "Aref Ruqaa", serif;     /* names, big Arabic flourish */
  --font-amiri:   "Amiri", serif;          /* Arabic body / phrases */
  --font-cairo:   "Cairo", sans-serif;     /* Arabic UI / labels */
  --font-latin:   "Cormorant Garamond", serif; /* English elegance */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  /* white laid paper: fine ribbing over a soft vertical sheen */
  background-color: #fbfbfa;
  background-image:
    repeating-linear-gradient(0deg, rgba(118,112,96,0.05) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #fefefd, #f2f1ec);
  color: var(--ink);
  font-family: var(--font-cairo);
  line-height: 1.8;
  overflow-x: hidden;            /* guard against accidental horizontal scroll */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.invitation {
  max-width: 680px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) clamp(1.2rem, 5vw, 2.5rem) env(safe-area-inset-bottom);
}

/* ============================================================
   Compact sections — each is only as tall as its content, with
   tidy, even spacing between them (no full-screen gaps). The
   sealed-letter cover is a separate fixed layer and still fills.
   ============================================================ */
.panel {
  margin: 0;
  box-sizing: border-box;
  padding-block: clamp(1.75rem, 6vw, 3rem);   /* even spacing between sections */
}

/* the opening panel fills the first screen; the invitation sits centered
   and breathes across the full height */
.panel--opening {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.panel--opening .hero { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-evenly; }
.panel--opening .divider { margin-block: clamp(1.2rem, 3.5vh, 2.4rem); }
.panel--opening .formula--cols { margin-block: clamp(0.6rem, 2.5vh, 1.8rem); }

/* ---------- Watercolor iris dividers + scattered accents ---------- */
.divider { display: block; margin: 1.2rem auto; width: min(82vw, 440px); height: auto; }
.divider.sm { width: min(62vw, 300px); margin: 0.4rem auto 1rem; }

.iris {
  position: absolute;
  width: clamp(56px, 14vw, 104px);
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.hero { position: relative; }
/* flank the garland divider (decor-on-decor) instead of the formula text */
.iris.hero-start { inset-inline-start: -8px; top: 3.4rem; width: clamp(44px, 10vw, 78px); transform: rotate(-6deg); }
.iris.hero-end   { inset-inline-end: -8px; top: 3.4rem; width: clamp(44px, 10vw, 78px); transform: scaleX(-1) rotate(-4deg); }
.when { position: relative; }
.iris.when-corner {
  top: -30px; inset-inline-start: -10px;
  width: clamp(40px, 9vw, 64px);
  transform: rotate(16deg);
}
.guestbook { position: relative; }
.iris.gb-corner {
  top: -16px; inset-inline-end: -8px;
  width: clamp(36px, 8vw, 58px);
  transform: scaleX(-1) rotate(12deg);
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: 1rem; }

.basmala {
  font-family: var(--font-amiri);
  color: var(--gold);
  font-size: clamp(1rem, 3.5vw, 1.35rem);   /* original size (reverted per the couple) */
  margin-bottom: 0.5rem;
}

.event-label {
  font-family: var(--font-cairo);
  font-weight: 300;
  word-spacing: 6px;          /* airiness without breaking Arabic letter joins */
  color: var(--gold);
  font-size: clamp(1rem, 3vw, 1.2rem);
}
.event-label-en {
  font-family: var(--font-latin);
  font-style: italic;
  color: var(--muted);
  letter-spacing: 3px;
  font-size: 0.95rem;
  margin-bottom: 1.6rem;
}

.names {
  font-family: var(--font-display);
  color: var(--brown);
  font-weight: 700;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: clamp(2rem, 8vw, 3.2rem);
}
.names .amp {
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: 0.6em;
  margin: 0.1rem 0;
}
.names-en {
  font-family: var(--font-latin);
  color: var(--muted);
  font-size: clamp(1rem, 3.2vw, 1.25rem);
  letter-spacing: 1px;
  margin-top: 0.8rem;
}

/* ---------- Classical invitation formula (hero) ---------- */
.formula { margin-top: 0.6rem; }
.formula p { margin: 0; }
.formula .f-line {
  font-family: var(--font-amiri);
  color: var(--ink);
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  line-height: 2.05;
}
.formula .f-host {
  color: var(--brown);
  font-weight: 700;
}
.formula .f-name {
  font-family: var(--font-display);
  color: var(--brown);
  font-weight: 700;
  font-size: clamp(1.6rem, 6.5vw, 2.6rem);
  line-height: 1.7;
  margin: 0.2rem 0 0.45rem;
}

/* two columns: groom right (read first in RTL), bride left, gold hairline between */
.formula--cols {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(0.7rem, 2.6vw, 1.4rem);
  max-width: 560px;
  margin-inline: auto;
}
.formula--cols .f-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.formula--cols .f-col + .f-col {
  border-inline-start: 1px solid rgba(138, 102, 36, 0.35);
  padding-inline-start: clamp(0.7rem, 2.6vw, 1.4rem);
}
.formula--cols .f-line { font-size: clamp(1.05rem, 3.4vw, 1.4rem); line-height: 2.25; }
/* title block sits right above the name; the whole block is pinned to the
   column bottom so both names land on the same line (only the FIRST title
   line carries the auto margin — the bride's side stacks two title lines) */
.formula--cols .f-title { line-height: 1.9; }
.formula--cols .f-title:first-child {
  margin-top: auto;
  padding-top: 0.9rem;
}
.formula--cols .f-name {
  font-size: clamp(3rem, 12.75vw, 4.8rem);   /* +50% per the couple's request */
  line-height: 1.5;
  margin: 0;
}

/* gold shimmer on the couple's names (same treatment as the Da3wati logo) */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.gold-shimmer,
.formula .f-name.gold-shimmer {
  /* Da3wati logo gold: deep -> soft -> deep, brighter than the local --gold */
  background: linear-gradient(100deg, #97743a 20%, #d9c28a 50%, #97743a 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .gold-shimmer { animation: none; }
}

/* ---------- Invitation phrase ---------- */
.phrase { text-align: center; margin: 2.8rem 0; }
.phrase-ar {
  font-family: var(--font-amiri);
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  color: var(--ink);
  line-height: 2.1;
}
.phrase-en {
  font-family: var(--font-latin);
  font-style: italic;
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.2rem);
  margin-top: 1rem;
  line-height: 1.7;
}
.placeholder-note {
  font-family: var(--font-cairo);
  font-size: 0.78rem;
  color: var(--gold);
  opacity: 0.8;
  margin-top: 1rem;
  letter-spacing: 0.5px;
}

/* ---------- When + Countdown ---------- */
.when {
  background: linear-gradient(180deg, rgba(255,255,255,0.93), rgba(235,243,249,0.93));
  border: 1px solid rgba(194,162,88,0.6);
  border-radius: 14px;
  padding: 2rem 1.4rem;
  text-align: center;
  margin: 0;
}
.date-block { margin-bottom: 1.6rem; }
.day-ar  { font-family: var(--font-cairo); color: var(--gold); font-weight:600; font-size: 1.1rem; }
.date-ar { font-family: var(--font-display); color: var(--brown); font-size: clamp(1.6rem, 6vw, 2.2rem); }
.time-ar { font-family: var(--font-amiri); color: var(--ink); font-size: 1.15rem; margin-top: 0.3rem; }
.date-en { font-family: var(--font-latin); font-style: italic; color: var(--muted); margin-top: 0.5rem; letter-spacing: 1px; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  max-width: 420px;
  margin: 0 auto;
  direction: ltr;
}
.cd-box {
  background: var(--blue-deep);
  color: var(--ivory);
  border-radius: 10px;
  padding: 0.9rem 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.cd-num { font-family: var(--font-latin); font-weight: 500; font-size: clamp(1.5rem, 6vw, 2rem); line-height: 1; }
.cd-label { font-family: var(--font-cairo); font-size: 0.8rem; color: var(--gold-soft); display:flex; flex-direction:column; }
.cd-label small { font-family: var(--font-latin); font-style: italic; font-size: 0.7rem; opacity: 0.85; }

/* ---------- Venue ---------- */
.venue { text-align: center; margin: 0; }
.section-title {
  font-family: var(--font-display);
  color: var(--brown);
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin-bottom: 0.8rem;
}
.section-title small {
  display: block;
  font-family: var(--font-latin);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 2px;
}
.venue-name    { font-family: var(--font-amiri); font-size: 1.3rem; color: var(--ink); }
.venue-name-en { font-family: var(--font-latin); font-style: italic; color: var(--muted); font-size: 1.05rem; }
.venue-tbd     { font-family: var(--font-cairo); font-size: 0.85rem; color: var(--gold); margin-top: 0.4rem; opacity: 0.85; }

.map-wrap {
  margin: 1.4rem auto 1.6rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(194,162,88,0.6);
  max-width: 560px;
  aspect-ratio: 16 / 10;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.btn {
  display: inline-block;
  font-family: var(--font-cairo);
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  color: var(--ivory);
  background: var(--blue-deep);
  border: 1px solid var(--blue-deep);
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.1s ease;
}
.btn:hover { background: var(--steel); }
.btn:active { transform: translateY(1px); }

/* ---------- Footer ---------- */
.foot { text-align: center; margin-top: 3rem; color: var(--brown); }
/* keepsake relocated here: counter-rotate + a touch more air before the farewell */
.foot .keepsake { margin: 0.6rem auto 2.4rem; transform: rotate(2.5deg); }
.foot-ar { font-family: var(--font-amiri); font-size: 1.2rem; }
.foot-en { font-family: var(--font-latin); font-style: italic; color: var(--muted); }

@media (max-width: 380px) {
  .countdown { gap: 0.4rem; }
  .cd-box { padding: 0.7rem 0.2rem; }
}

/* Older mobile WebViews without aspect-ratio support: give the
   iframe wrappers an explicit height so they don't collapse. */
@supports not (aspect-ratio: 16 / 10) {
  .map-wrap    { height: 56vw; max-height: 350px; }
  .songs-embed { height: 50vw; max-height: 315px; }
}

/* ============================================================
   Names: his on the RIGHT, hers on the LEFT (RTL order)
   ============================================================ */
.invitation { text-align: center; }

.names-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.5rem, 3vw, 1.6rem);
}
.name-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  max-width: 46%;
}
.name-col .name {
  font-family: var(--font-display);
  color: var(--brown);
  font-weight: 700;
  line-height: 1.4;
  font-size: clamp(1.3rem, 5.5vw, 2.1rem);
}
.name-col .name-en {
  font-family: var(--font-latin);
  font-style: italic;
  color: var(--muted);
  font-size: clamp(0.85rem, 2.8vw, 1.05rem);
  letter-spacing: 0.5px;
  margin-top: 0.35rem;
}
.names-row .amp {
  flex: 0 0 auto;
  color: var(--gold);
  font-family: var(--font-latin);
  font-size: clamp(1.3rem, 5vw, 2.2rem);
}
.name-title {
  font-family: var(--font-amiri);
  color: var(--gold);
  font-size: clamp(0.95rem, 3vw, 1.2rem);
  margin-bottom: 0.15rem;
}

/* ---------- Dress code (compact) ---------- */
.dresscode { text-align: center; }
.dc-groups {
  display: flex;
  justify-content: center;
  align-items: flex-end;            /* align both groups by the hem line */
  flex-wrap: wrap;
  gap: clamp(1.6rem, 8vw, 3.2rem);
}
.dc-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.dc-figs {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.45rem, 2.2vw, 0.9rem);
}
.dc-cap {
  font-family: var(--font-cairo);
  font-size: 0.85rem;
  color: var(--ink);
}
.dc-cap em {
  font-family: var(--font-latin);
  font-style: italic;
  color: var(--muted);
  margin-inline-start: 0.25rem;
}
.dc-dots { display: flex; justify-content: center; gap: 0.45rem; }
.dc-dots i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.dc-fig {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.dc-svg {
  width: clamp(34px, 9vw, 46px);    /* smaller — keeps this section modest */
  height: auto;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.18));
}
.dc-fig small {
  font-family: var(--font-cairo);
  font-size: 0.78rem;
  color: var(--muted);
}
/* smaller heading + tighter padding so dress code is the most modest section */
.section-title.sm { font-size: clamp(1.2rem, 4vw, 1.5rem); margin-bottom: 0.3rem; }
.section-title.sm small { font-size: 0.85rem; }
.panel--tight { padding-block: clamp(1rem, 4vw, 1.75rem); }

/* ---------- Song suggestions (collaborative playlist) ---------- */
.songs { text-align: center; }
.songs-sub {
  font-family: var(--font-amiri);
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
}
.songs-embed {
  max-width: 560px;
  margin: 0 auto 1.4rem;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(194,162,88,0.6);
  background: #000;
}
.songs-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Guestbook ---------- */
.guestbook { text-align: center; }
.gb-sub { font-family: var(--font-amiri); color: var(--muted); font-size: 1.05rem; margin-bottom: 1.1rem; }
.gb-form {
  max-width: 440px;
  margin: 0 auto 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.gb-input {
  font-family: var(--font-cairo);
  font-size: 1rem;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid rgba(122,162,205,0.4);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  width: 100%;
  box-sizing: border-box;
}
.gb-input::placeholder { color: var(--muted); opacity: 0.85; }
.gb-input:focus { outline: none; border-color: var(--steel); box-shadow: 0 0 0 3px rgba(122,162,205,0.18); }
textarea.gb-input { resize: vertical; }
/* honeypot: hidden from humans without pushing the page sideways */
.gb-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.gb-form .btn { align-self: center; cursor: pointer; }
.gb-status { font-family: var(--font-cairo); font-size: 0.85rem; color: var(--steel); min-height: 1.2em; margin: 0; }
.gb-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.gb-item {
  background: #fbfcfd;
  border: 1px solid rgba(122,162,205,0.25);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  text-align: start;
  box-shadow: 0 4px 10px rgba(48,63,80,0.08);
}
.gb-msg { font-family: var(--font-amiri); color: var(--ink); font-size: 1.05rem; line-height: 1.6; }
.gb-name { font-family: var(--font-cairo); color: var(--gold); font-size: 0.85rem; margin-top: 0.3rem; }
.gb-empty { font-family: var(--font-cairo); color: var(--muted); font-size: 0.9rem; }

/* main-page form extras: the صلة القرابة / side select row + the wall link */
.gb-selrow { display: flex; gap: 0.6rem; }
.gb-selrow .gb-select { flex: 1 1 0; min-width: 0; }
.gb-select { cursor: pointer; }
.gb-status a { color: var(--steel); }
/* brief highlight when arriving via the poster's ?write deep-link */
@keyframes gbflash { 0%, 100% { box-shadow: 0 0 0 0 rgba(122,162,205,0); } 30% { box-shadow: 0 0 0 6px rgba(122,162,205,0.4); } }
.gb-form.flash { border-radius: 12px; animation: gbflash 1.6s ease 0.3s 2; }
.gb-walllink {
  display: inline-block;
  margin-top: 1.1rem;
  font-family: var(--font-cairo);
  font-weight: 600;
  text-decoration: none;
  color: var(--blue-deep);
  background: #fbfcfd;
  border: 1px solid var(--powder);
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
}
.gb-walllink:hover { background: rgba(122,162,205,0.1); }

/* ============================================================
   Wishes wall (sub-page /wall) — elegant sticky notes
   ============================================================ */
.wall-page { padding: 0; text-align: center; }
.wall-head { text-align: center; padding: clamp(2rem, 7vw, 3.5rem) 1.2rem 1.2rem; color: var(--gold); }
.wall-head h1 { font-family: var(--font-display); color: var(--brown); font-size: clamp(2rem, 8vw, 3rem); margin: 0.2rem 0; }
.wall-head p { font-family: var(--font-amiri); color: var(--muted); font-size: 1.05rem; }
.wall-btn {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-cairo);
  font-weight: 600;
  text-decoration: none;
  color: var(--blue-deep);
  background: #fbfcfd;
  border: 1px solid var(--powder);
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
}
.wall-btn:hover { background: rgba(122,162,205,0.1); }
.wall-foot { padding: 0.5rem 1rem 3rem; }

.wall-form { max-width: 440px; margin: 0 auto 2.2rem; padding: 0 1.2rem; }

.wall {
  column-count: 1;
  column-gap: 1rem;
  max-width: 840px;
  margin: 0 auto;
  padding: 0 1rem 3.5rem;
}
@media (min-width: 520px) { .wall { column-count: 2; } }
@media (min-width: 860px) { .wall { column-count: 3; } }

.note {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  position: relative;
  margin: 0.5rem 0 1.3rem;
  padding: 1.3rem 1.1rem 1.2rem;
  border-radius: 4px;
  background: #fbfcfd;
  box-shadow: 0 9px 20px rgba(48,63,80,0.16), 0 2px 4px rgba(0,0,0,0.08);
}
.note-tape {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 72px;
  height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background: linear-gradient(180deg, rgba(199,211,223,0.7), rgba(173,199,223,0.55));
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  border-left: 1px dashed rgba(255,255,255,0.45);
  border-right: 1px dashed rgba(255,255,255,0.45);
}
.note-title { font-family: var(--font-display); color: var(--brown); font-size: 1.2rem; margin-bottom: 0.25rem; }
.note-meta { font-family: var(--font-cairo); color: var(--gold); font-size: 0.78rem; margin-bottom: 0.5rem; }
.note-body { font-family: var(--font-amiri); color: var(--ink); font-size: 1.05rem; line-height: 1.7; word-wrap: break-word; overflow-wrap: anywhere; }
.note-orn { display: block; text-align: center; color: var(--gold); margin-top: 0.7rem; font-size: 1rem; }

/* varied tints + slight tilts for a hand-pinned look */
.note:nth-child(5n+1) { background: #fdfdfa; transform: rotate(-2deg); }
.note:nth-child(5n+2) { background: #e9f1f7; transform: rotate(1.5deg); }
.note:nth-child(5n+3) { background: #f2efe6; transform: rotate(-1deg); }
.note:nth-child(5n+4) { background: #dce8f3; transform: rotate(2deg); }
.note:nth-child(5n+5) { background: #e3e8ed; transform: rotate(-1.5deg); }

.wall-empty { column-span: all; width: 100%; text-align: center; color: var(--muted); font-family: var(--font-cairo); font-size: 0.95rem; }

/* ---------- Keepsake polaroid (childhood photo) ---------- */
.keepsake {
  position: relative;
  width: min(64vw, 230px);
  margin: 0.4rem auto 1.8rem;
  padding: 11px 11px 0;
  background: #fbfcfd;
  border: 1px solid rgba(90,112,137,0.15);
  border-radius: 2px;
  box-shadow: 0 12px 24px rgba(48,63,80,0.22), 0 2px 5px rgba(0,0,0,0.12);
  transform: rotate(-3deg);
}
.keepsake img {
  display: block;
  width: 100%;
  height: auto;                    /* natural ratio — full photo, no crop */
  border-radius: 1px;
  filter: saturate(0.9) contrast(1.02) sepia(0.07);
}
.keepsake figcaption {
  font-family: var(--font-amiri);
  color: var(--brown);
  text-align: center;
  padding: 0.45rem 0 0.7rem;
  font-size: 1.1rem;
  line-height: 1.25;
}
.keepsake figcaption small {
  display: block;
  font-family: var(--font-latin);
  font-style: italic;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}
/* a strip of "washi" tape holding it to the page */
.keepsake .tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 88px;
  height: 26px;
  transform: translateX(-50%) rotate(-4deg);
  background: linear-gradient(180deg, rgba(199,211,223,0.7), rgba(173,199,223,0.6));
  box-shadow: 0 1px 3px rgba(0,0,0,0.14);
  border-left: 1px dashed rgba(255,255,255,0.45);
  border-right: 1px dashed rgba(255,255,255,0.45);
}

/* ============================================================
   Rustic fold COVER over the invitation (scroll to open)
   Two kraft folds fill the viewport and swing away to reveal
   the real invitation underneath — top fold first, then bottom.
   ============================================================ */
body.locked { overflow: hidden; }

.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  perspective: 1800px;          /* applies to the folds (direct children) */
}

/* the two kraft folds, each covering half the viewport */
.fold {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  /* iris damask envelope paper under a light blue wash */
  background-color: #e9f0f6;
  background-image:
    linear-gradient(rgba(217,231,238,0.45), rgba(217,231,238,0.45)),
    url("assets/bg-tile.jpg");
  background-size: auto, 460px;
  box-shadow: 0 0 60px rgba(0,0,0,0.25);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}
.fold-top {
  top: 0;
  z-index: 2;                   /* top fold (with seal) sits above the bottom one */
  transform-origin: top center;
  transform: rotateX(0deg);
  border-bottom: 1px solid rgba(150,143,125,0.4);
  box-shadow: inset 0 -14px 22px rgba(135,135,128,0.18);
  transition: transform 0.9s cubic-bezier(0.62, 0.04, 0.3, 1);
}
.fold-bottom {
  bottom: 0;
  z-index: 1;
  transform-origin: bottom center;
  transform: rotateX(0deg);
  border-top: 1px solid rgba(150,143,125,0.4);
  box-shadow: inset 0 14px 22px rgba(135,135,128,0.18);
  transition: transform 0.9s cubic-bezier(0.62, 0.04, 0.3, 1);
}
.cover.opening .fold-top    { transform: rotateX(-180deg); }
.cover.bottom  .fold-bottom { transform: rotateX(180deg); }

/* once both folds are open, fade the (now empty) cover away */
.cover.done { opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }

/* wax seal image straddling the seam, riding on the top fold */
.wax-seal {
  position: absolute;
  bottom: 0;                      /* sit on the seam... */
  left: 50%;
  transform: translate(-50%, 50%); /* ...centered vertically on the fold edge */
  width: clamp(144px, 39vw, 198px);
  z-index: 3;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.wax-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,0.4));
}
.cover.opening .wax-seal { opacity: 0; transform: translate(-50%, 50%) scale(0.7); }

/* scroll hint, centered on the seam */
.hint {
  position: absolute;
  top: 67%;                       /* nudged down, clear of the wax seal */
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--font-cairo);
  color: #57452c;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.hint small { font-family: var(--font-latin); font-style: italic; opacity: 0.85; }

/* elegant SVG chevron, inherits color via currentColor */
.chev { display: inline-flex; line-height: 0; }
.chev svg { display: block; width: 26px; height: auto; }
.hint .chev { color: var(--gold); animation: bob 1.8s ease-in-out infinite; }
.cover.opening .hint { opacity: 0; transition: opacity 0.3s ease; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* "scroll to the details" button inside the invitation */
.scroll-btn {
  font-family: var(--font-cairo);
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--ivory);
  background: var(--blue-deep);
  border: 1px solid var(--gold-soft);
  padding: 0.8rem 1.9rem;
  margin: 1.8rem auto 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease, transform 0.1s ease;
}
.scroll-btn:hover { background: var(--steel); }
.scroll-btn:active { transform: translateY(1px); }
.scroll-btn .chev { color: var(--gold-soft); }
.scroll-btn .chev svg { width: 20px; }

/* Respect reduced-motion / no-JS: don't trap the page behind the cover */
@media (prefers-reduced-motion: reduce) {
  .cover { display: none; }
  body.locked { overflow: auto; }
}
