/* ============================================================
   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 {
  /* ===== Roaa's Henna — Palestinian tatreez palette =====
     Warm henna cream paper, embroidery red (the thobe cross-stitch),
     warm thobe brown, olive green, antique gold. Variable NAMES kept
     from the engine so every component re-themes automatically. */
  --ivory:      #f6efe3;   /* warm henna cream */
  --ice:        #f0e2cf;   /* soft sand — panels */
  --dusty:      #b3543f;   /* henna terracotta — surfaces/borders */
  --powder:     #c98a72;   /* light henna */
  --periwinkle: #d9b48f;   /* warm tan */
  --sage:       #6e7f4f;   /* olive green */
  --silver:     #c9bfa9;
  --steel:      #8c2f39;   /* tatreez red (dark) */
  --blue-deep:  #7a1f2b;   /* deep tatreez red — buttons, countdown */
  --gold:       #946c2e;   /* titles, ornaments */
  --gold-soft:  #c2a258;   /* champagne borders */
  --brown:      #3a2417;   /* names, headings — warm thobe brown */
  --ink:        #241710;   /* body text */
  --muted:      #6e5743;   /* 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;
}
/* English mirror inside the hero: tucked right under the Arabic formula */
.phrase-en--hero { margin-top: 0.6rem; }
.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 hierarchy (per the groom): "Olive Farm" is the PRIMARY name,
   «مزرعة الزيتون» an elegant secondary title — not a caption */
.venue-name {
  font-family: var(--font-latin);
  font-size: clamp(1.7rem, 6vw, 2.2rem);
  color: var(--brown);
  letter-spacing: 1.5px;
  line-height: 1.25;
}
.venue-name-ar {
  font-family: var(--font-amiri);
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  color: var(--ink);
  margin-top: 0.2rem;
}
.venue-loc {
  font-family: var(--font-cairo);
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
.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);
  /* explicit size: <button> does NOT inherit text size, and the UA default
     (~13px) made the RSVP buttons small and hard to tap on phones */
  font-size: 1rem;
  line-height: 1.6;
  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;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, transform 0.1s ease;
}
.btn:hover { background: var(--steel); }
.btn:active { transform: translateY(1px); }

/* secondary action (e.g. "نعتذر عن الحضور") — quieter than the primary,
   so the main choice reads instantly on a small screen */
.btn--ghost {
  color: var(--blue-deep);
  background: #fbfcfd;
  border: 1px solid var(--powder);
}
.btn--ghost:hover { background: rgba(122,162,205,0.12); }

/* visible keyboard-focus ring on every interactive control */
.btn:focus-visible,
.scroll-btn:focus-visible,
.gb-walllink:focus-visible,
.wax-seal:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 3px;
}

/* ---------- 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; }
/* status / inline-error line: large + dark enough to actually be noticed
   mid-flow on a phone (was 0.85rem steel-blue — easy to miss) */
.gb-status { font-family: var(--font-cairo); font-size: 0.95rem; font-weight: 600; color: var(--blue-deep); 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%;
  /* warm henna kraft paper, soft sand wash, tatreez stitch riding the edge */
  background-color: #f3e7d3;
  background-image:
    repeating-linear-gradient(45deg, rgba(140,47,57,0.18) 0 7px, transparent 7px 14px),
    linear-gradient(180deg, #f7ecd9, #efe0c8);
  background-size: auto 10px, auto;
  background-repeat: repeat-x, no-repeat;
  background-position: left bottom, center;
  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-size: 1rem;              /* buttons don't inherit text size — keep it tappable */
  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; }
  html { scroll-behavior: auto; }   /* no smooth-scroll animation either */
}

/* ===== RSVP (added 2026-06-12) — reuses the guestbook form styling ===== */
/* same soft card as .when, so the page's ONE action stands out from the flow */
.rsvp {
  text-align: center;
  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: 1.8rem 1.4rem;
}
.rsvp .gb-form { margin-bottom: 0; }
.rsvp-after { text-align: center; }
.rsvp-thanks {
  font-family: "Amiri", serif;
  font-size: 1.15rem;
  margin: 0.4rem 0 1rem;
}
.rsvp-actions {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* footer note — children kindly stay home (small, soft) */
.foot-note {
  font-family: "Amiri", serif;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.7rem;
}

/* ===== Founder directives 2026-06-12: count menu + children notice ===== */
/* compact guest-count menu, revealed below the accept button */
.rsvp-count {
  display: block;
  max-width: 290px;
  margin: 10px auto 0;
  text-align: center;
}

/* children notice — discreet, right under the RSVP card */
.kids-note {
  font-family: "Amiri", serif;
  font-size: 0.88rem;
  opacity: 0.75;
  text-align: center;
  max-width: 420px;
  margin: 14px auto 0;
  line-height: 1.9;
}

/* parents' names must stay on ONE line on any display (Founder):
   nowrap + viewport-scaled size so the line shrinks instead of wrapping */
.en-hosts {
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
  font-size: min(1.2rem, 3.9vw);
  letter-spacing: 0;
}

/* fathers' columns (Founder layout v2): the gold hairline runs the full block
   height between the columns (cols adjacent again), the واو sits as a small
   badge ON the line, names are visibly LARGER than the المهندس title and can
   never wrap (nowrap + viewport-scaled). */
.formula--hosts { position: relative; }
.formula--hosts .f-host {
  white-space: nowrap;
  font-size: min(1.32rem, 4.2vw);
}
.formula--hosts .f-title {
  font-size: clamp(0.64rem, 2.1vw, 0.85rem);
  opacity: 0.85;
}
.f-waw {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Amiri", serif;
  color: var(--gold);
  font-weight: 700;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  background: #fbfbfa;
  padding: 0 0.18em;
  line-height: 1;
  margin: 0;
}

/* RSVP choice buttons: ALWAYS side by side, even on the narrowest phones —
   they shrink (flex + viewport-scaled text) instead of stacking (Founder) */
.rsvp .rsvp-actions {
  flex-wrap: nowrap;
}
.rsvp .rsvp-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  padding-inline: 0.6rem;
  font-size: min(1rem, 3.6vw);
}

/* guest-allowance ribbon (?g=N from the QR) + in-card allowance note */
.allowance-ribbon {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 30;             /* under the fold cover, above the page */
  text-align: center;
  padding: 0.45rem 0.8rem;
  background: #8a6624;
  color: #fdfaf3;
  font-family: "Cairo", sans-serif;
  font-size: 0.85rem;
}
.rsvp-allowance {
  font-family: "Amiri", serif;
  color: #8a6624;
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0.2rem 0 0.6rem;
}

/* ===== Henna additions: tatreez divider, notices, thobe dress-code ===== */
/* embroidered zigzag rule — stands in for the old floral divider images */
.tatreez-rule {
  width: min(72vw, 360px);
  height: 12px;
  margin: 1.1rem auto;
  background:
    repeating-linear-gradient(135deg, var(--steel) 0 5px, transparent 5px 10px),
    repeating-linear-gradient(45deg, var(--steel) 0 5px, transparent 5px 10px);
  background-size: 14px 6px;
  background-position: top center, bottom center;
  background-repeat: repeat-x;
  opacity: 0.75;
}
.tatreez-rule.sm { width: min(52vw, 240px); margin: 0.6rem auto 1rem; }

/* event notices (separate party / no photos / no children) */
.notices { max-width: 460px; margin: 0 auto; }
.notice {
  font-family: "Amiri", serif;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 2;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(148, 108, 46, 0.35);
}
.notice:last-child { border-bottom: 0; }
.notice b { color: var(--steel); }

/* dress code: the embroidered thobe + tatreez swatches */
.thobe-svg { width: clamp(84px, 20vw, 120px); height: auto; display: block; margin: 0.4rem auto; }
.dc-line {
  font-family: "Amiri", serif;
  font-weight: 700;
  color: var(--steel);
  font-size: clamp(1.2rem, 4.4vw, 1.5rem);
}

/* ============================================================
   HENNA THEME v2 — Founder art direction (2026-06-12)
   Tatreez-tiled envelope, A&R medallion, framed ivory card,
   olive branches, henna mandala, candle-warm glow.
   ============================================================ */

/* --- the envelope: tileable tatreez paper (overrides the base fold) --- */
.fold {
  background-color: #f6eedd;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 8 L48 28 L28 48 L8 28 Z' fill='none' stroke='%236d1b26' stroke-width='1.5' opacity='0.42'/%3E%3Ccircle cx='28' cy='28' r='2.2' fill='%23c2a258' opacity='0.8'/%3E%3Ccircle cx='4' cy='4' r='1.3' fill='%236d1b26' opacity='0.4'/%3E%3Ccircle cx='52' cy='4' r='1.3' fill='%236d1b26' opacity='0.4'/%3E%3Ccircle cx='4' cy='52' r='1.3' fill='%236d1b26' opacity='0.4'/%3E%3Ccircle cx='52' cy='52' r='1.3' fill='%236d1b26' opacity='0.4'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #f8f0df, #efe2cb);
  background-size: 56px 56px, auto;
  background-repeat: repeat, no-repeat;
}
/* bold stitch band where the folds meet */
.fold-top::after, .fold-bottom::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 9px;
  background:
    repeating-linear-gradient(135deg, rgba(109,27,38,0.55) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(45deg, rgba(109,27,38,0.55) 0 6px, transparent 6px 12px);
  background-size: 15px 9px;
  background-repeat: repeat-x;
}
.fold-top::after { bottom: 0; }
.fold-bottom::before { top: 0; }

/* medallion seal shadow + gentle presence */
.wax-img { filter: drop-shadow(0 12px 20px rgba(46, 22, 12, 0.38)); }

/* --- framed ivory card: a fixed gold/tatreez frame around the page --- */
body::after {
  content: "";
  position: fixed;
  inset: 9px;
  border: 1.5px solid rgba(194, 162, 88, 0.75);
  border-radius: 10px;
  box-shadow: inset 0 0 0 4px rgba(246, 239, 227, 0.9), inset 0 0 0 5px rgba(109, 27, 38, 0.30);
  pointer-events: none;
  z-index: 40; /* under the cover (50), over the page */
}

/* --- candle-warm glow + scattered gold/henna dots on the opening panel --- */
.panel--opening {
  background:
    radial-gradient(58% 36% at 50% 10%, rgba(231, 200, 120, 0.30), transparent 70%),
    radial-gradient(circle 2px at 12% 30%, rgba(194,162,88,0.55) 98%, transparent),
    radial-gradient(circle 2px at 88% 26%, rgba(194,162,88,0.5) 98%, transparent),
    radial-gradient(circle 1.6px at 17% 66%, rgba(109,27,38,0.4) 98%, transparent),
    radial-gradient(circle 1.6px at 85% 60%, rgba(109,27,38,0.38) 98%, transparent),
    radial-gradient(circle 2px at 50% 78%, rgba(194,162,88,0.4) 98%, transparent);
}

/* --- olive branches flanking the hero --- */
.hero--henna { position: relative; }
.olive {
  position: absolute;
  width: clamp(44px, 11vw, 72px);
  height: auto;
  top: 2.4rem;
  opacity: 0.92;
  pointer-events: none;
}
.olive-start { inset-inline-start: -6px; }
.olive-end { inset-inline-end: -6px; }

/* --- hierarchy: «حنة العروس» strong, «رؤى» dominant --- */
.henna-title {
  font-family: var(--font-amiri);
  font-weight: 700;
  color: var(--steel);
  font-size: clamp(1.55rem, 5.6vw, 2.1rem);
  line-height: 1.9;
  margin-top: 0.3rem;
}
.formula .f-name.bride-name {
  font-size: clamp(4rem, 17vw, 6.2rem);
  line-height: 1.35;
}
/* henna mandala halo behind the bride's name */
.name-halo { position: relative; display: inline-block; padding: 0.4rem 2.2rem; }
.name-halo::before {
  content: "";
  position: absolute;
  inset: -10% -2%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, rgba(140, 47, 57, 0.16) 0 1.6px, transparent 1.6px 11px);
  -webkit-mask: radial-gradient(closest-side, #000 50%, transparent 98%);
          mask: radial-gradient(closest-side, #000 50%, transparent 98%);
  z-index: -1;
}

/* --- rich section dividers: gold thread, tatreez diamonds, olive sprig --- */
.sep {
  width: min(78vw, 430px);
  height: 30px;
  margin: 1.1rem auto;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='30' viewBox='0 0 150 30'%3E%3Cpath d='M45 17 C 60 8 90 8 105 17' fill='none' stroke='%236e7f4f' stroke-width='2' stroke-linecap='round'/%3E%3Cg fill='%237e8f5d'%3E%3Cellipse cx='58' cy='11.5' rx='7' ry='2.8' transform='rotate(-18 58 11.5)'/%3E%3Cellipse cx='75' cy='9.5' rx='7' ry='2.8'/%3E%3Cellipse cx='92' cy='11.5' rx='7' ry='2.8' transform='rotate(18 92 11.5)'/%3E%3C/g%3E%3Cg fill='%234a5634'%3E%3Ccircle cx='66' cy='15.5' r='2.6'/%3E%3Ccircle cx='84' cy='15.5' r='2.6'/%3E%3C/g%3E%3Cg fill='%236d1b26'%3E%3Cpath d='M28 15 l5.5 -4.5 5.5 4.5 -5.5 4.5z'/%3E%3Cpath d='M111 15 l5.5 -4.5 5.5 4.5 -5.5 4.5z'/%3E%3C/g%3E%3C/svg%3E") center / auto 30px no-repeat,
    linear-gradient(to right, transparent 4%, rgba(194, 162, 88, 0.8) 30%, rgba(194, 162, 88, 0.8) 70%, transparent 96%) center / 100% 1px no-repeat;
}
.sep--wide { width: min(88vw, 560px); margin: 0.2rem auto; }

/* --- bigger, warmer date --- */
.date-block .date-ar {
  font-family: var(--font-amiri);
  font-weight: 700;
  color: var(--steel);
  font-size: clamp(2.6rem, 10vw, 3.6rem);
  line-height: 1.3;
}
.date-sub {
  font-family: var(--font-amiri);
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: -0.2rem;
}

/* notices centered, with gold stars */
.notices { text-align: center; margin-top: 1.1rem; }
.notice { border-bottom: 0; padding: 0.18rem 0; }

/* parchment ivory page (overrides the base white laid paper) */
body {
  background-color: #f6efe3;
  background-image:
    repeating-linear-gradient(0deg, rgba(126, 100, 60, 0.045) 0 2px, transparent 2px 5px),
    radial-gradient(120% 90% at 50% 0%, #faf3e4, #efe3cc);
}

/* ============================================================
   HENNA v3 — the Founder's own art (assets/henna/*)
   Favorite tatreez wallpaper, engraved A&R medallion seal,
   watercolor olives, candlelight, coins, henna cones, plaque.
   ============================================================ */

/* the page wears the Founder's favorite wallpaper, softened by an ivory
   veil so the text always reads; cards sit on top */
body {
  background-color: #f6efe3;
  background-image:
    linear-gradient(rgba(248, 241, 228, 0.86), rgba(246, 238, 224, 0.86)),
    url("assets/henna/bg-tile.jpg");
  background-size: auto, clamp(300px, 60vw, 430px);
}

/* the envelope folds wear the wallpaper at FULL strength (the reveal:
   the page inside is the same fabric, veiled) */
.fold {
  background-color: #f6efe3;
  background-image: url("assets/henna/bg-tile.jpg");
  background-size: clamp(330px, 70vw, 460px);
  background-repeat: repeat;
}

/* engraved medallion seal: round shadow, soft candle glow */
.wax-seal { background: transparent; border: 0; }
.wax-img {
  border-radius: 50%;
  filter: drop-shadow(0 14px 26px rgba(46, 22, 12, 0.45)) drop-shadow(0 0 22px rgba(231, 200, 120, 0.5));
}

/* medallion crowning the opened hero */
.hero-medallion {
  display: block;
  width: clamp(72px, 17vw, 104px);
  height: auto;
  margin: 0 auto 0.5rem;
  filter: drop-shadow(0 6px 14px rgba(46, 22, 12, 0.3));
}

/* watercolor olive branches (Founder art) flanking the hero */
img.olive {
  width: clamp(54px, 13vw, 86px);
  top: 5.2rem;
  transform: rotate(-8deg);
}
img.olive-end { transform: scaleX(-1) rotate(-8deg); }

/* --- scatter pieces: ambient, never blocking, gently placed --- */
.scatter {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 1;
}
.when, .rsvp, .venue, .guestbook { position: relative; }
.sc-candle-a {
  width: clamp(58px, 13vw, 84px);
  inset-inline-start: -4px;
  top: -16px;
  filter: drop-shadow(0 0 18px rgba(231, 190, 110, 0.65));
}
.sc-candle-b {
  width: clamp(38px, 9vw, 56px);
  inset-inline-end: 2px;
  bottom: -8px;
  filter: drop-shadow(0 0 14px rgba(231, 190, 110, 0.6));
}
.sc-cone {
  width: clamp(40px, 9vw, 58px);
  inset-inline-end: -6px;
  top: -22px;
  transform: rotate(22deg);
  opacity: 0.95;
}
.sc-chandelier {
  width: clamp(54px, 12vw, 80px);
  inset-inline-start: -8px;
  top: -34px;
  opacity: 0.95;
}
.sc-coins {
  width: clamp(64px, 14vw, 92px);
  inset-inline-end: -10px;
  bottom: -14px;
  transform: rotate(-10deg);
  opacity: 0.95;
}

/* --- the notices plaque: the Founder's framed tatreez box --- */
.plaque {
  position: relative;
  max-width: 470px;
  margin: 1.3rem auto 0;
}
.plaque > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(70, 40, 20, 0.16);
}
.plaque .plaque-text {
  position: absolute;
  inset: 14% 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
}
.plaque .notice { font-size: clamp(0.82rem, 2.9vw, 1rem); line-height: 1.95; padding: 0.12rem 0; }

/* ===== HENNA v4 — the Founder's own dividers & motifs ===== */
/* real watercolor dividers replace the CSS zigzag */
.sep {
  width: min(86vw, 520px);
  height: 52px;
  margin: 1.1rem auto;
  background: url("assets/henna/sep-a.png") center / contain no-repeat;
  opacity: 1;
}
.sep--wide {
  width: min(92vw, 600px);
  height: 56px;
  margin: 0.4rem auto;
  background-image: url("assets/henna/sep-b.png");
}
/* a stitched tatreez diamond under every section title */
.section-title::after {
  content: "";
  display: block;
  width: 26px;
  height: 26px;
  margin: 8px auto 0;
  background: url("assets/henna/tatreez-motif.png") center / contain no-repeat;
}
/* pomegranate by the dress code */
.dresscode { position: relative; }
.sc-pomegranate {
  width: clamp(64px, 15vw, 96px);
  inset-inline-start: -6px;
  bottom: -10px;
  transform: rotate(-6deg);
}

/* ============================================================
   HENNA v5 — readability + iPhone robustness (UX pass)
   Fixes the three Founder bugs systematically:
   1) text never sits on raw wallpaper — every content section
      becomes a soft ivory "card" (the .when pattern), wallpaper
      stays visible BETWEEN cards;
   2) geometric centering at 320–430px — the .sep--wide elements
      were wider than the padded column (min(92vw,…) > inner
      width), and in RTL an overflowing auto-margin box anchors
      to the inline-start (right) edge and spills LEFT, so every
      separator sat visibly off-center and widened the layout;
   3) the fixed full-viewport frame (body::after) fought iOS
      Safari's collapsing URL bar — removed; the gold/burgundy
      double-frame look now lives on each content card instead.
   ============================================================ */

/* --- (3) kill the fixed frame: position:fixed full-height chrome
       slides around when the iOS toolbar collapses --- */
body::after { content: none; }

/* --- (2) centering: clip stray horizontal overflow at the ROOT
       (body-only overflow-x:hidden doesn't stop html-level
       overflow from widening the layout viewport on iOS) --- */
html { overflow-x: hidden; }
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}
/* decorative separators may never exceed the padded column */
.sep, .sep--wide, .tatreez-rule, .divider { max-width: 100%; }
/* symmetric inline padding, never under a notch in landscape */
.invitation {
  width: 100%;
  padding-inline: max(clamp(1.2rem, 5vw, 2.5rem), env(safe-area-inset-left), env(safe-area-inset-right));
}

/* --- (1) every reading surface is an ivory card; the engraved
       gold + burgundy hairline frame replaces the lost page frame.
       (.when/.rsvp also lose their leftover BLUE engagement tint) --- */
.when, .rsvp, .venue, .dresscode, .guestbook, .hero--henna, .foot {
  background: linear-gradient(180deg, rgba(253, 248, 238, 0.96), rgba(246, 237, 221, 0.96));
  border: 1px solid rgba(194, 162, 88, 0.65);
  border-radius: 16px;
  box-shadow:
    inset 0 0 0 3px rgba(253, 248, 238, 0.9),
    inset 0 0 0 4px rgba(109, 27, 38, 0.22),
    0 10px 28px rgba(70, 40, 20, 0.10);
}
.venue, .dresscode, .guestbook { padding: 1.8rem 1.2rem; }
.hero--henna { padding: 1.6rem 1rem 1.8rem; }
.foot { margin-top: 2rem; padding: 1.4rem 1rem 1.8rem; }
/* the hero card must be its own stacking context, or the bride-name
   mandala halo (z-index:-1) would paint BEHIND the new card bg */
.hero--henna { z-index: 0; }
/* tighter air around the "details" button now that the hero is a card */
.panel--opening .phrase { margin: 1.6rem 0 0.6rem; }

/* «فندق الرئام» is Arabic — the engine styled .venue-name with the
   LATIN display font, so it fell back to a plain default serif */
.venue-name {
  font-family: var(--font-amiri);
  font-weight: 700;
  letter-spacing: 0;
}

/* countdown: champagne labels were gold-on-burgundy (~3:1) — lift them */
.cd-box {
  background: linear-gradient(180deg, #7e2230, #6d1b26);
  border: 1px solid rgba(194, 162, 88, 0.55);
}
.cd-label { color: #eedfb6; }
.cd-label small { opacity: 0.95; }

/* cover hint: a soft ivory chip so the line reads on the FULL-strength
   tatreez tile (it sat bare on the busiest surface of the page) */
.hint {
  width: max-content;
  max-width: min(86vw, 340px);
  padding: 0.6rem 1.4rem 0.7rem;
  gap: 0.4rem;
  background: rgba(248, 241, 228, 0.93);
  border: 1px solid rgba(148, 108, 46, 0.45);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(46, 22, 12, 0.22);
  color: #4a3417;
}

/* notices plaque: the frame image now STRETCHES to the text instead of
   the text being trapped in a fixed % box — nothing can ever clip at
   320px; at normal sizes the 41:31 ratio keeps the art undistorted */
.plaque { display: flex; aspect-ratio: 41 / 31; }
.plaque > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.plaque .plaque-text {
  position: static;
  flex: 1 1 auto;
  padding: 11% 13%;
}

/* pomegranate: at ≤360px it overlapped the «تطريز فلسطيني» caption at the
   card bottom — moved to the top corner, beside the short section title */
.sc-pomegranate { bottom: auto; top: -16px; }

/* RSVP pair buttons: keep the Founder's side-by-side rule but give the
   type a floor — min(1rem, 3.6vw) rendered ~11.5px at 320px */
.rsvp .rsvp-actions .btn { font-size: clamp(0.82rem, 3.6vw, 1rem); }

/* allowance ribbon must clear the iPhone notch / dynamic island */
.allowance-ribbon { padding-top: calc(0.45rem + env(safe-area-inset-top)); }

/* form fields & quiet buttons: warm the leftover steel-BLUE accents */
.gb-input { background: #fffdf8; border-color: rgba(148, 108, 46, 0.4); }
.gb-input:focus { border-color: var(--steel); box-shadow: 0 0 0 3px rgba(140, 47, 57, 0.14); }
.btn--ghost { background: #fffdf8; border-color: rgba(148, 108, 46, 0.5); }
.btn--ghost:hover { background: rgba(194, 162, 88, 0.16); }
.gb-walllink { background: #fffdf8; border-color: rgba(148, 108, 46, 0.5); }
.gb-walllink:hover { background: rgba(194, 162, 88, 0.14); }
.wall-btn { background: #fffdf8; border-color: rgba(148, 108, 46, 0.5); }
.wall-btn:hover { background: rgba(194, 162, 88, 0.14); }
@keyframes gbflash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 162, 88, 0); }
  30%      { box-shadow: 0 0 0 6px rgba(194, 162, 88, 0.45); }
}

/* --- wishes wall: same medicine — header on a card, notes warmed
       from the engagement blues to henna creams --- */
.wall-head {
  width: min(680px, calc(100% - 1.6rem));
  margin: 0.9rem auto 0;
  background: linear-gradient(180deg, rgba(253, 248, 238, 0.96), rgba(246, 237, 221, 0.96));
  border: 1px solid rgba(194, 162, 88, 0.65);
  border-radius: 16px;
  box-shadow:
    inset 0 0 0 3px rgba(253, 248, 238, 0.9),
    inset 0 0 0 4px rgba(109, 27, 38, 0.22);
}
.note:nth-child(5n+2) { background: #f7eedd; }
.note:nth-child(5n+4) { background: #f3e7d0; }
.note:nth-child(5n+5) { background: #f0e8d8; }
.note-tape, .keepsake .tape {
  background: linear-gradient(180deg, rgba(222, 203, 161, 0.75), rgba(206, 181, 132, 0.6));
}
.wall-empty {
  background: rgba(253, 248, 238, 0.94);
  border: 1px solid rgba(194, 162, 88, 0.5);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}

/* v5 hotfix: the RSVP henna cone poked past the viewport edge (overflow) */
.sc-cone { inset-inline-end: 6px; }

/* ===== HENNA v6: notices typeset cleanly (framed-image plaque retired) ===== */
.rsvp .notices {
  max-width: 430px;
  margin: 1.5rem auto 0;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(194, 162, 88, 0.45);
  text-align: center;
}
.rsvp .notice {
  font-family: "Amiri", serif;
  font-size: clamp(0.92rem, 3.2vw, 1.04rem);
  color: var(--ink);
  line-height: 2.1;
  padding: 0.18rem 0;
  border-bottom: 0;
}
.rsvp .notice b { color: var(--steel); }

/* "made with Da3wati" signature — the very last line of the page */
.made-by {
  display: block;
  text-align: center;
  margin-top: 1.6rem;
  font-family: "Amiri", serif;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.85;
}
.made-by b { color: var(--gold); font-weight: 700; }
.made-by:hover { opacity: 1; }

/* swipe-up hint: kill pull-to-refresh so an upward-from-anywhere gesture can
   never reload the page; the chevron now points up above the words */
html, body { overscroll-behavior-y: none; }
.hint .chev { display: block; margin: 0 auto 0.3rem; }
