/* =========================================================
   Wedding invitation · Syifa & Thaufiq
   Mobile-first. Content column ≤560px; split layout ≥900px.
   Motif: hanging rose vines + bouquets, arched "gate" frames.
   ========================================================= */

:root {
  --night:      #1C1814; /* dark backdrop, cover & closing bg */
  --cream:      #F4EEE2; /* text on dark, form fields */
  --paper:      #FBF7EF; /* cards */
  --sage:       #6F7340; /* olive, headings/accents */
  --olive-deep: #3D4530; /* body text on cream */
  --janur:      #CFCE96; /* pale olive: names & ornaments on dark */
  --janur-dark: #A3A45C; /* mid olive: ornament shading */
  --burgundy:   #7A1E2B; /* primary accent: buttons, names, highlights */
  --wine:       #4E1119; /* burgundy hover/shadow */
  --silver:     #D9D6CE; /* fine lines on dark */
  --brass:      #93753A; /* fine brass lines & ornaments on light (paper) */
  --brass-light:#C9A862; /* the same on dark: the wall, the countdown, the closing */
  --ivory:      #EFE7D6; /* section background after the green wall: warm ivory (dark ink) */

  --font-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-script:  "Great Vibes", "Segoe Script", "Brush Script MT", cursive;
  --font-body:    "Jost", "Segoe UI", system-ui, -apple-system, sans-serif;

  --col: 560px;
  --gutter: 20px;
  --pad-y: clamp(48px, 10vw, 96px);
  --arch: 44px;                                  /* height of the section arches */
  --line: rgba(61, 69, 48, .18);                 /* hairlines on cream */
  --field-line: rgba(61, 69, 48, .26);
  --shadow-card: 0 1px 2px rgba(28, 24, 20, .08), 0 18px 34px -20px rgba(28, 24, 20, .38);   /* cards on the ivory */

  /* janur ornament colours (inherited into <use>) */

  /* soft marbled texture for the light sections (tileable SVG noise, olive-tinted) */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night);
}
html.is-locked,
html.is-locked body { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--olive-deep);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::selection { background: var(--janur); color: var(--olive-deep); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; }
.cover :focus-visible,
.closing :focus-visible { outline-color: var(--janur); }
[tabindex="-1"]:focus { outline: none; }

.script {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid var(--burgundy);
  border-radius: 999px;
  background: var(--burgundy);
  color: var(--cream);
  font: 500 15px/1.2 var(--font-body);
  letter-spacing: .03em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--wine); border-color: var(--wine); }
.btn:active { transform: translateY(1px); }

.btn--outline { background: transparent; color: var(--burgundy); }
.btn--outline:hover { background: var(--burgundy); border-color: var(--burgundy); color: var(--cream); }

.btn--block { width: 100%; }

.btn--cover {
  border-color: rgba(217, 214, 206, .4);
  box-shadow: 0 16px 32px -14px rgba(122, 30, 43, .9);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--burgundy);
  border-radius: 999px;
  background: transparent;
  color: var(--burgundy);
  font: 500 14px/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.copy-btn .icon { width: 18px; height: 18px; }
.copy-btn:hover { background: var(--burgundy); color: var(--cream); }
.copy-btn.is-copied,
.copy-btn.is-copied:hover { background: var(--sage); border-color: var(--sage); color: var(--cream); }

/* ---------- Divider: two brass rules drawing out from a pair of wedding rings ----------
   The rules draw in from the rings when the divider scrolls into view (script.js adds
   .is-drawn); without Motion they are simply there. */
.divider {
  width: min(250px, 74%);
  height: auto;
  margin: 0 auto;
  overflow: visible;
  color: var(--divider, var(--accent));
}
.divider__line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.3s cubic-bezier(.65, 0, .35, 1) .25s;
}
.divider__end { transition: opacity .5s ease 1.35s; }
.motion-ready .divider:not(.is-drawn) .divider__line { stroke-dashoffset: 1; }
.motion-ready .divider:not(.is-drawn) .divider__end { opacity: 0; }

/* ---------- Florals (img/flowers/*.webp) ----------
   spray.webp is a diagonal sprig: a big rose at about 42% across / 60% down,
   buds trailing up-left and down-right. Each placement puts the big rose on the
   corner so the sprig wraps it, leaves outside the frame:
   bl = as drawn, br = mirrored; tr / tl = the same two turned 180° for the
   arch shoulders (the angle is in --rot so the bounce can keep it). */
.flora {
  position: absolute;
  z-index: 2;
  height: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
/* Mirroring uses the `scale` property (not `transform`) so Motion's bounce,
   which writes `transform`, stacks on top instead of replacing it. */
.flora--br,
.flora--tl { scale: -1 1; }

@supports not (scale: -1 1) {
  .flora--br { transform: scaleX(-1); }
}


/* bottom corners of the closing, partly off-screen (small accents) */
.flora--edge {
  z-index: 1;
  width: clamp(100px, 27vw, 165px);
  bottom: -8px;
}
.flora--edge.flora--bl { left: clamp(-42px, -6vw, -20px); }
.flora--edge.flora--br { right: clamp(-42px, -6vw, -20px); }

/* ---------- Envelope (gate page) ----------
   Built from envelope-closed / envelope-open (originals in source/illustrations), cut into
   layers that all share the closed envelope's size (620 x 382). Back to front: the open
   envelope's back, the lace card, its pocket, the flap, the closed envelope (shown until it
   opens), the wax seal. The flap is a 3D flip around its top edge: the closed flap, then
   past 90° its inside face, the raised lace flap. Script.js animates it open. */
.envelope {
  width: clamp(205px, 60vw, 290px);
  margin: auto;                       /* centred between the title and the guest block */
  padding: 26px 0 62px;               /* room for the hanging flowers */
}
.envelope__tilt {
  position: relative;
  transform: rotate(-8deg);           /* the diagonal resting angle */
}
/* Watercolor hanging flowers riding on the envelope (they move and bounce with it) */
.envelope__hang {
  position: absolute;
  z-index: 6;
  width: 30%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35));
}
.envelope__hang--tr { top: -22%; right: -14%; }
.envelope__hang--bl { top: 48%; left: -14%; scale: -1 1; }
.envelope__body {
  position: relative;
  aspect-ratio: 620 / 382;
  perspective: 800px;
}
.envelope__back,
.envelope__pocket,
.envelope__closed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
.envelope__back { z-index: 0; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); }
.envelope__closed { z-index: 5; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); }
/* The card's pocket: the card shows above the envelope (sliding out) but is cut off at the
   envelope's bottom edge, so a card taller than the envelope still looks tucked inside. */
.envelope__inside {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* open far above and to the sides (the card flies to the middle of the screen as the
     envelope drops away); cut a little above the bottom edge, where the image fades out */
  clip-path: inset(-300vh -300vw 2.5% -300vw);
}
.envelope__card {
  position: absolute;
  left: 20%;
  top: 1.5%;
  width: 60%;
  aspect-ratio: 600 / 818;            /* inside-envelope.webp */
  container-type: inline-size;        /* text sizes follow the card (cqi), so it scales with every zoom */
  background: url("img/illustrations/inside-envelope.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35));
  text-align: center;
}
.envelope__card-text {                /* cqi here = % of the card's width */
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24cqi 20cqi 18cqi;         /* keep the text on the plain paper inside the lace */
}
.envelope__card-kicker {
  font: italic 400 8.5cqi/1.25 var(--font-display);
  color: var(--olive-deep);
}
.envelope__card-names {
  display: flex;
  flex-direction: column;
  margin: 2cqi 0 3cqi;
  font-size: 15cqi;
  line-height: 1.05;
  color: var(--burgundy);
}
.envelope__card-amp { font-size: .7em; color: var(--sage); }
.envelope__card-date {               /* "Minggu" on one line, "27 Desember 2026" on the next */
  font: 600 7cqi/1.3 var(--font-display);
  letter-spacing: .03em;
  color: var(--olive-deep);
}
.envelope__card-date span { display: block; white-space: nowrap; }
.envelope__pocket { z-index: 3; }
.envelope__flap {
  position: absolute;
  inset: 0;
  z-index: 4;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
}
.envelope__flap-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 3px 4px rgba(42, 6, 11, .45));
}
/* The inside face (the raised lace flap, drawn upright with its base on the bottom edge) is
   turned around its own middle; combined with the flap's turn around the top edge, it ends
   up hinged on the envelope's top edge with its tip pointing up. */
.envelope__flap-face--inside { transform: rotateX(180deg); }
.envelope__seal {
  position: absolute;
  left: 50%;
  top: 69%;                           /* on the tip of the flap */
  z-index: 6;
  width: 25%;                         /* olive wax seal (img/illustrations/wax-seal.webp) */
  height: auto;
  translate: -50% -50%;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .45));
}
/* the photo that flies from the card into the hero (created by script.js) */
.envelope-stage {                    /* the envelope's own layer while the gate scrolls away under it */
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}
/* During the opening: the earlier gate photo, blurred, waiting under the gate (z 60) and above
   the invitation, so the gate scrolls away onto it. It fades out (clearing into the hero photo)
   as the card disappears. The blur is static, only the opacity animates. */
.envelope-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  background: var(--night);
  pointer-events: none;
}
.envelope-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;                 /* same photo and framing as the closing section, no zoom */
  filter: blur(2px) brightness(.50);
}

/* =========================================================
   1. Cover gate
   ========================================================= */
.cover {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 28px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--night);
  color: var(--cream);
  text-align: center;
  isolation: isolate;
}
/* While the curtain and floor part, the gate itself is see-through, so what waits behind it
   (the blurred photo during the envelope opening) shows between them. */
.cover.is-parting { background: transparent; }
/* after the main .cover rule so it wins */
@media (min-width: 600px) {
  .envelope { padding: 14px 0 44px; }
}
/* The gate is a stage built from two layers on one 736 x 1098 canvas: the velvet curtain,
   ending at its hem ~80% down, over the carpet floor. Each layer is the whole canvas, sized
   like background-size: cover and anchored 80% down, which keeps the hem ~80% down the
   screen on phones and wide screens alike (on wide screens the top of the curtain is
   cropped instead of the floor). When the gate opens they part, the curtain up and the floor
   down (script.js); painting the whole canvas means the hem, not a cut edge, rises past
   the screen. The wrapper clips them so they can't add scroll height. */
.cover__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  container-type: size;               /* cqw / cqh = the gate's size */
}
.cover__layer {
  --w: max(100cqw, 100cqh * 736 / 1098);
  --h: max(100cqw * 1098 / 736, 100cqh);
  --x: calc((100cqw - var(--w)) * .5);
  --y: calc((100cqh - var(--h)) * .8);
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  /* Shading over the screen area: darker where the text sits (title at the top, guest block
     at the bottom), and the bottom fades into solid night. Each layer is masked to its own
     pixels, so its share of the shading (the black fade is on the floor) travels with it
     and never darkens what the parting reveals. */
  --shade: linear-gradient(180deg,
    rgba(28, 24, 20, .62) 0%,
    rgba(28, 24, 20, .18) 24%,
    rgba(28, 24, 20, .08) 50%,
    rgba(28, 24, 20, .45) 72%,
    rgba(28, 24, 20, .53) 78%,
    rgba(28, 24, 20, .74) 85%,
    rgba(28, 24, 20, .9) 92%,
    var(--night) 100%);
  background-position: calc(-1 * var(--x)) calc(-1 * var(--y)), 0 0;
  background-size: 100cqw 100cqh, 100% 100%;
  background-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.cover__layer--curtain {
  background-image: var(--shade), url("img/illustrations/curtain.webp");
  -webkit-mask-image: url("img/illustrations/curtain.webp");
  mask-image: url("img/illustrations/curtain.webp");
  will-change: transform;             /* it bobs gently until the gate opens (script.js) */
}
/* The floor sits a little higher than drawn (--lift), still under the curtain (it comes first
   in the markup). The layer grows by the lift at the bottom, where a night band (the second
   mask layer) keeps the bottom of the screen dark; the shading stays fixed to the screen. */
.cover__layer--floor {
  --lift: 4cqh;
  top: calc(var(--y) - var(--lift));
  height: calc(var(--h) + var(--lift));
  background-color: var(--night);
  background-image: var(--shade), url("img/illustrations/floor.webp");
  background-position: calc(-1 * var(--x)) calc(var(--lift) - var(--y)), 0 0;
  background-size: 100cqw 100cqh, 100% var(--h);
  -webkit-mask-image: url("img/illustrations/floor.webp"), linear-gradient(#000, #000);
  mask-image: url("img/illustrations/floor.webp"), linear-gradient(#000, #000);
  -webkit-mask-size: 100% var(--h), 100% calc(var(--lift) + 2px);
  mask-size: 100% var(--h), 100% calc(var(--lift) + 2px);
  -webkit-mask-position: 0 0, 0 100%;
  mask-position: 0 0, 0 100%;
}

/* Gate layout: title pinned to the top, envelope centred in the free space,
   guest name + button at the bottom. */
.cover__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.cover__invited {
  margin-top: 6px;
  font-size: clamp(52px, 15vw, 68px);
  color: var(--janur);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .45);
}

.cover__guest {
  max-width: 320px;
  margin: 0 auto clamp(18px, 3.2vh, 30px);
  padding: 18px 8px;
  border-top: 1px solid rgba(217, 214, 206, .28);
  border-bottom: 1px solid rgba(217, 214, 206, .28);
}
.cover__to {
  font-size: 14px;
  line-height: 1.6;
  color: var(--silver);
}
.cover__guest-name {
  margin: 10px 0 10px;
  font: 500 27px/1.25 var(--font-display);
  color: var(--cream);
  overflow-wrap: anywhere;
}
.cover__note {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(217, 214, 206, .72);
}

/* =========================================================
   Layout: column + desktop photo panel
   ========================================================= */
.invite {
  position: relative;
  max-width: var(--col);
  margin: 0 auto;
  background: var(--ivory);
  overflow-x: hidden;
  overflow-x: clip;
}

.side { display: none; }

@media (min-width: 600px) and (max-width: 899.98px) {
  .invite { box-shadow: 0 0 90px rgba(0, 0, 0, .55); }
}

@media (min-width: 900px) {
  :root { --col-w: clamp(440px, 42vw, 560px); }

  .invite {
    width: var(--col-w);
    max-width: none;
    margin: 0 0 0 auto;
    padding-top: 64px;
    background: var(--night);
    box-shadow: -40px 0 80px -40px rgba(0, 0, 0, .7);
  }

  .side {
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: var(--col-w);
    overflow: hidden;
    background: var(--night);
    color: var(--cream);
    isolation: isolate;
  }
  .side__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    z-index: -2;
  }
  .side::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      linear-gradient(180deg, rgba(28, 24, 20, .45) 0%, rgba(28, 24, 20, 0) 30%, rgba(28, 24, 20, .1) 55%, rgba(28, 24, 20, .88) 100%),
      linear-gradient(90deg, rgba(28, 24, 20, 0) 70%, rgba(28, 24, 20, .45) 100%);
  }
  .side__text {
    position: absolute;
    left: clamp(40px, 6vw, 96px);
    right: 40px;
    bottom: clamp(48px, 10vh, 104px);
  }
  .side__kicker {
    font: italic 400 24px/1.3 var(--font-display);
    color: var(--silver);
  }
  .side__names {
    margin: 4px 0 6px;
    font-size: clamp(64px, 6.4vw, 96px);
    color: var(--janur);
    text-shadow: 0 2px 30px rgba(0, 0, 0, .5);
  }
  .side__date {
    font: 400 22px/1.3 var(--font-display);
    letter-spacing: .06em;
    color: var(--cream);
  }
}

/* =========================================================
   2. Hero
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--night);
  color: var(--cream);
  text-align: center;
}
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  z-index: -2;
}
/* Couple photo (CMZ_4444, edited crop): keep both of them centred when the sides or bottom get cropped. */
.hero__photo,
.side__photo { object-position: 72% 30%; }
/* Top: fades in from solid night (the mirror of the gate's bottom fade), so the photo starts
   softly after the gate. Bottom: darkens for the names, then solid night into the ayah panel. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    var(--night) 0%,
    rgba(28, 24, 20, .55) 10%,
    rgba(28, 24, 20, 0) 22%,
    rgba(28, 24, 20, 0) 44%,
    rgba(28, 24, 20, .72) 72%,
    var(--night) 100%);
}
.hero__text {
  padding: 0 var(--gutter) clamp(64px, 12vh, 112px);
}
.hero__kicker {
  font: italic 400 21px/1.3 var(--font-display);
  color: var(--silver);
}
.hero__names {
  margin: 4px 0 6px;
  font-size: clamp(48px, 13.4vw, 64px);
  color: var(--janur);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .5);
}
.hero__date {
  font: 400 20px/1.3 var(--font-display);
  letter-spacing: .06em;
  color: var(--cream);
}

/* =========================================================
   Light sections
   ========================================================= */
/* The sections after the green wall are a warm ivory with dark ink (near-black, burgundy
   accents, brass dividers): a light, restful stretch for the practical part (dates, venue,
   RSVP, gifts) between the dark sections above and the dark closing. The countdown sits on the dark olive wall and
   switches the same variables to light ink (below). The paper cards keep their own dark text. */
.section {
  --ink: var(--night);                     /* text and headings on the section */
  --accent: var(--burgundy);               /* date lines, icons, the couple's "&" */
  --divider: var(--brass);                 /* the ring dividers */
  --pill-line: rgba(28, 24, 20, .5);       /* outline buttons */
  --pill-hover-bg: var(--night);
  --pill-hover-ink: var(--cream);
  position: relative;
  padding: var(--pad-y) var(--gutter);
  background: var(--ivory);
  color: var(--ink);
  text-align: center;
}
.event,
.rsvp,
.bank-card,
.address-card { color: var(--olive-deep); }
.lede,
.salam p,
.person__parents { font-weight: 400; }    /* a touch heavier on the mid-tone background */
.section .btn--outline { border-color: var(--pill-line); color: var(--ink); }
.section .btn--outline:hover { background: var(--pill-hover-bg); border-color: var(--pill-hover-bg); color: var(--pill-hover-ink); }
.section .btn--outline:focus-visible,
.person__ig:focus-visible { outline-color: var(--ink); }
:where(.section > * + *) { margin-top: 24px; }

/* Section titles in spaced serif capitals (tailored, like "AKAD NIKAH"); the padding
   balances the trailing letter-space so they stay centred. The salam greeting keeps its
   mixed case (below). */
.heading {
  padding-left: .24em;
  font: 600 clamp(19px, 5.2vw, 24px)/1.35 var(--font-display);
  text-transform: uppercase;
  letter-spacing: .24em;
  color: var(--ink);
  text-wrap: balance;
}
.subline {
  font: italic 400 20px/1.4 var(--font-display);
  color: var(--accent);
}
.section .heading + .subline { margin-top: 4px; }

.lede {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: pretty;
}
.section .heading + .lede { margin-top: 12px; }

/* Salam, Mempelai and the countdown share one background: the green plaster wall (wall-solo.webp:
   source/illustrations/wall-solo.jpg stacked with its mirror image, so it tiles down without a
   seam), so the texture runs on unbroken. Each section lays its own see-through overlay on it:
   black for the salam and Mempelai, so the light text reads clearly, and a light whitish one
   for the countdown. The wall comes out of black at the top, where the ayah panel above fades
   into black (like the hero into the ayah). The sections use light ink. */
.wall-group {
  position: relative;
  background: #30401F url("img/illustrations/wall-solo.webp") center top / 100% auto repeat-y;
}
/* The fade out of black sits under the sections' 42% black overlay, so it starts from the
   night colour lightened to match (#1C1814 / .58): under the overlay its top comes out exactly
   the night colour the ayah panel above fades into, with no visible edge. */
.wall-group::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: clamp(90px, 22vw, 140px);
  background: linear-gradient(180deg, rgb(48, 41, 34), rgba(48, 41, 34, 0));
  pointer-events: none;
}
.wall-group .section {
  --ink: var(--cream);
  --accent: var(--brass-light);
  --divider: var(--brass-light);
  --pill-line: rgba(201, 168, 98, .7);
  --pill-hover-bg: var(--brass-light);
  --pill-hover-ink: var(--night);
  background: rgba(0, 0, 0, .42);
  color: var(--silver);
}
.wall-group :focus-visible { outline-color: var(--janur); }
.section--verse { padding-top: calc(var(--pad-y) + 42px); }
.section--couple { padding-top: 0;}

/* =========================================================
   3. Ayah: QS. Ar-Rum 21 written on a lace oval
   Two layers cut from source/illustrations/ayah-background.png (same canvas): the rose
   background (ayah-bg.webp, the area under the frame refilled with roses), which stays put,
   and the lace oval with its wax seal (ayah-frame.webp) carrying the verse. Once the panel
   reaches the top of the screen, the frame rises a little faster than the page (script.js),
   leaving the next section room as it comes up. The panel keeps the image's
   proportions, and the text box and sizes are in cqi (% of the panel width), so the verse
   always sits inside the oval.
   ========================================================= */
.ayah {
  position: relative;
  isolation: isolate;                 /* its layers stay under the next section's arch */
  container-type: inline-size;
  aspect-ratio: 675 / 1200;
  overflow: hidden;
  /* 120%: a bigger oval (only rose texture is trimmed at the edges), more room for the verse */
  background: var(--night) url("img/illustrations/ayah-bg.webp") center / 120% auto no-repeat;
}
.ayah__layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("img/illustrations/ayah-frame.webp") center / 120% auto no-repeat;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45));
  will-change: translate;
}
.ayah::before,                        /* soften the seams: into the dark hero above, */
.ayah::after {                        /* and into the black the salam comes out of below */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 14%;
  background: linear-gradient(180deg, var(--night), rgba(28, 24, 20, 0));
  pointer-events: none;
}
.ayah::after {
  inset: auto 0 0;
  background: linear-gradient(0deg, var(--night), rgba(28, 24, 20, 0));
}
/* The plain paper inside the lace is an oval (measured: centre 47% down, half-width 35% of the
   panel, half-height 25.5% at 120%). The card is that oval shrunk to 86% for a margin from the
   lace, set a little low (the lace is wider at the bottom) so the verse looks centred; two
   half-width floats with elliptical shape-outside make every line wrap inside it. */
.ayah__card {
  position: absolute;
  top: 28%;
  left: 20.1%;
  width: 59.8%;
  height: 44%;
  margin: 0;
  text-align: center;
}
.ayah__shape {
  width: 50%;
  height: 100%;
  shape-margin: 0;
}
.ayah__shape--l {
  float: left;
  shape-outside: radial-gradient(100% 50% at 100% 50%, transparent 98%, #000 99%);
}
.ayah__shape--r {
  float: right;
  shape-outside: radial-gradient(100% 50% at 0% 50%, transparent 98%, #000 99%);
}
.ayah__text p {
  padding-top: 12cqi;                 /* starts where the oval is wide enough; centres the verse in it */
  font: italic 400 3.6cqi/1.42 var(--font-display);
  color: var(--olive-deep);
}
.ayah__cite {
  margin-top: 2.6cqi;
  font: 500 3.1cqi/1.3 var(--font-body);
  letter-spacing: .04em;
  color: var(--burgundy);
}

/* =========================================================
   4. Salam
   ========================================================= */
.salam .heading {
  padding-left: 0;
  font: 500 clamp(28px, 7.5vw, 36px)/1.2 var(--font-display);
  text-transform: none;
  letter-spacing: .005em;
}
.salam p {
  max-width: 420px;
  margin: 14px auto 0;
  text-wrap: pretty;
}

/* =========================================================
   4. Couple
   ========================================================= */
.couple {
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* the one-line names may not stretch the column */
  justify-items: center;
  margin-top: 44px;
}
.person { width: 100%; max-width: 360px; min-width: 0; }

/* Portrait frames: a carved gilded oval frame (frame-oval.webp, from frame.jpeg in
   source/illustrations, cut out of its baked checkerboard) laid over the photo, which fills
   the oval opening (14.2% / 12.8%, 71.2% x 74.1% of the frame) and runs a little under the
   rim so no edge shows. */
.person__frame {
  position: relative;
  width: min(280px, 82%);
  aspect-ratio: 681 / 947;
  margin: 0 auto 30px;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .45));
}
.person__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("img/illustrations/frame-oval.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}
/* The frame and its photo bob gently, the groom's half a beat after the bride's. */
.person__frame { animation: frame-bob 4.2s ease-in-out infinite; }
.person--groom .person__frame { animation-delay: -2.1s; }
@keyframes frame-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}
/* The oval window: the photo rises up into it from below when it scrolls into view
   (script.js adds .is-in); without Motion it is simply there. */
.person__window {
  position: absolute;
  left: 13.4%;
  top: 12%;
  width: 72.8%;
  height: 75.6%;
  overflow: hidden;
  border-radius: 50%;
  background: #241D16;
}
.person__photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: opacity 1.4s ease .15s;
}
.motion-ready .person__frame:not(.is-in) .person__photo { opacity: 0; }
.person__name {                      /* one line; script.js shrinks both names to fit the longer one */
  font: 500 clamp(28px, 7.5vw, 32px)/1.2 var(--font-display);
  white-space: nowrap;
  color: var(--ink);
}
.person__parents {
  max-width: 330px;
  text-wrap: balance;                 /* long names wrap evenly, not one word alone */
  margin: 10px auto 0;
  font-size: 15px;
  line-height: 1.6;
}
.person__ig {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 16px;
  padding: 0 18px;
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}
.person__ig .icon { width: 18px; height: 18px; color: var(--accent); }
.person__ig:hover { border-color: var(--ink); }

.couple__amp {
  margin: 28px 0 22px;
  font-family: var(--font-script);
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
}

/* =========================================================
   5. Countdown: on the green wall (see .wall-group) under a light whitish overlay (7%), blending
   from the black one above over its first 140px. Cream numbers standing free (no frames).
   Its small text is cream, not brass: on the lighter wall brass would be too faint (cream
   stays near 5:1 even on the wall's lightest patches).
   ========================================================= */
.wall-group .section--countdown {
  --accent: var(--cream);
  isolation: isolate;                 /* its bottom blend (::after) sits under its content */
  padding-top: calc(var(--pad-y) + 40px);
  padding-bottom: calc(var(--pad-y) + 150px);
  background: linear-gradient(180deg, rgba(0, 0, 0, .42) 0, rgba(255, 255, 255, .07) 140px);
  color: var(--cream);
}
/* Into the cream wall below: over the countdown's last 280px the cream plaster fades in on
   top of the green one along an eased curve (no hard start or end), so the texture carries on
   through the whole blend. It is lined up with the cream wall below (anchored at the bottom;
   the tile is its own mirror image there), so it reaches full cream exactly where the gallery
   begins, with no seam. */
.wall-group .section--countdown::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 280px;
  background: var(--ivory) url("img/illustrations/wall-cream.webp") center bottom / 100% auto repeat-y;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.028) 10%, rgba(0, 0, 0, 0.104) 20%, rgba(0, 0, 0, 0.216) 30%, rgba(0, 0, 0, 0.352) 40%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.648) 60%, rgba(0, 0, 0, 0.784) 70%, rgba(0, 0, 0, 0.896) 80%, rgba(0, 0, 0, 0.972) 90%, rgba(0, 0, 0, 1.0) 100%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.028) 10%, rgba(0, 0, 0, 0.104) 20%, rgba(0, 0, 0, 0.216) 30%, rgba(0, 0, 0, 0.352) 40%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.648) 60%, rgba(0, 0, 0, 0.784) 70%, rgba(0, 0, 0, 0.896) 80%, rgba(0, 0, 0, 0.972) 90%, rgba(0, 0, 0, 1.0) 100%);
  pointer-events: none;
}
.section--countdown .divider { margin-bottom: 44px; color: var(--brass-light); }
.section--countdown .countdown { margin-top: 46px; }
.section--countdown .countdown__num {
  color: var(--cream);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.section--countdown .countdown__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream);
}
.section--countdown .countdown__done { color: var(--cream); }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 400px;
  margin: 32px auto 0;
}
.countdown__box { padding: 6px 2px; }
.countdown__num {
  display: block;
  font: 500 clamp(36px, 11vw, 50px)/1 var(--font-display);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  color: var(--burgundy);
}
.countdown__label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--olive-deep);
}
.countdown__done {
  margin-top: 28px;
  font: italic 500 30px/1.3 var(--font-display);
  color: var(--burgundy);
}
.section--countdown .btn { margin-top: 52px; }

/* =========================================================
   6. Events: framed arches with a bouquet and corner sprays
   ========================================================= */
.section--events { padding-bottom: calc(var(--pad-y) + 32px); }
.section--events .divider { margin-bottom: 36px; }

/* =========================================================
   Gallery, Waktu & Tempat, RSVP and the gift share one background: the plaster wall texture
   recoloured cream (wall-cream.webp: source/illustrations/wall-solo.jpg mapped onto the ivory,
   stacked with its mirror image so it tiles down without a seam). It arches over the dark
   closing at the bottom. The sections in it are see-through.
   ========================================================= */
.cream-group {
  position: relative;
  z-index: 1;
  border-radius: 0 0 50% 50% / 0 0 var(--arch) var(--arch);
  background: var(--ivory) url("img/illustrations/wall-cream.webp") center top / 100% auto repeat-y;
}
.cream-group .section { background: none; }

/* =========================================================
   Gallery: a scattered collage on the cream wall. Everything sits on a
   100 x 158 canvas: --x, --y, --w, --h are in its units, so the layout holds at any width;
   type is in cqi (% of the collage's width). Each photo is cropped around the couple
   (object-position on the img).
   ========================================================= */
/* The gallery is lifted 110px into the end of the countdown's blend (already mostly cream
   there), so its title sits higher; flow-root keeps the lift from moving the cream wall too. */
.cream-group { display: flow-root; }
.section--gallery {
  margin-top: -110px;
  padding: 4px 14px calc(var(--pad-y) * .5);
}
.collage {
  --H: 158;
  position: relative;
  container-type: inline-size;
  max-width: 520px;
  aspect-ratio: 100 / 158;
  margin: 34px auto 0;
  text-align: left;
}
.collage > * {
  position: absolute;
  left: calc(var(--x, 0) * 1%);
  top: calc(var(--y, 0) / var(--H) * 100%);
  width: calc(var(--w, 0) * 1%);
  height: calc(var(--h, 0) / var(--H) * 100%);
  margin: 0;
}
.collage__photo {
  z-index: 3;
  overflow: hidden;
  border-radius: 2px;
  background: #D9D0BC;
  box-shadow: 0 12px 22px -14px rgba(28, 24, 20, .6), 0 2px 5px rgba(28, 24, 20, .12);
}
/* Black and white until hovered, pressed or focused; the preview shows them in colour. */
.collage__photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: scale .6s cubic-bezier(.22, 1, .36, 1), filter .5s ease;
}
.collage__photo:active img,
.collage__photo:focus-visible img { filter: none; }
@media (hover: hover) {
  .collage__photo:hover img { scale: 1.05; filter: none; }
}
/* the couple's names, very large and faint, behind the photos */
.collage__word {
  z-index: 1;
  width: auto;
  height: auto;
  font: 600 25cqi/1 var(--font-display);
  letter-spacing: .03em;
  text-transform: uppercase;
  color: rgba(147, 117, 58, .26);
  white-space: nowrap;
  pointer-events: none;
}
.collage__word--a { left: -2%; top: calc(22 / var(--H) * 100%); }
.collage__word--b { left: auto; right: -3%; top: calc(100 / var(--H) * 100%); }
/* thin brass outline frames, offset behind two photos, and a brass ring */
.collage__frame {
  z-index: 2;
  border: 1px solid rgba(147, 117, 58, .75);
}
.collage__ring {
  z-index: 4;
  height: auto;
  aspect-ratio: 1;
  border: 1.5px solid rgba(147, 117, 58, .8);
  border-radius: 50%;
}
/* the date, stacked in the gap at the top left */
.collage__date {
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4cqi;
  font: 600 2.4cqi/1.15 var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--night);
}
.collage__day {
  font: 500 13cqi/.9 var(--font-display);
  letter-spacing: 0;
  color: var(--burgundy);
}
.collage__year {
  padding-top: .6cqi;
  border-top: 1px solid var(--brass);
  font: 500 5.2cqi/1 var(--font-display);
  letter-spacing: .02em;
  color: var(--night);
}
/* the couple's names in a gap on the right */
.collage__note {
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font: italic 500 4.6cqi/1.2 var(--font-display);
  color: var(--burgundy);
  text-align: center;
}
.collage__note::before,
.collage__note::after { content: "\00AB\00A0"; color: var(--brass); }
.collage__note::after { content: "\00A0\00BB"; }
.events {
  container-type: inline-size;
  display: grid;
  gap: 88px;
  max-width: 400px;
  margin: 48px auto 0;
}
.event {
  position: relative;
  padding: 26px 28px 64px;
  background: var(--paper);
  border: 4px solid var(--olive-deep);
  border-radius: 50% 50% 40px 40px / 170px 170px 40px 40px;
  box-shadow:
    inset 0 0 0 5px var(--paper),
    inset 0 0 0 6px rgba(111, 115, 64, .6),
    0 26px 46px -30px rgba(61, 69, 48, .55);
}
@supports (width: 1cqi) {
  .event { border-radius: 50cqi 50cqi 40px 40px; }   /* true half-circle top at any width */
}
/* A fine brass double frame inside the card's edge, following the arch (Art Deco). */
.event::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid var(--brass);
  border-radius: 50% 50% 28px 28px / 158px 158px 28px 28px;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(147, 117, 58, .45);
  pointer-events: none;
}
@supports (width: 1cqi) {
  .event::before { border-radius: calc(50cqi - 13px) calc(50cqi - 13px) 28px 28px; }
}
.event > * { position: relative; }
/* The reception card's emblem: brass wedding rings */
.event__emblem {
  display: block;
  width: 84px;
  height: 63px;
  margin: 46px auto 10px;
  color: var(--brass);
}
/* The event's illustration (Akad: the pen-and-ink handshake; its paper is transparent, so
   the card shows through the hands) */
.event__art {
  width: min(236px, 70%);
  margin: 40px auto 4px;
}
.event__art-front {
  display: block;
  width: 100%;
  height: auto;
  /* let the sleeves fade out instead of ending at the edge of the drawing */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.event__name {
  font: 500 30px/1.15 var(--font-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.event__date {
  margin-top: 12px;
  font: 600 22px/1.3 var(--font-display);
  color: var(--olive-deep);
}
.event__time {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 400;
}
.event__pin {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 220px;
  margin: 18px auto 14px;
  color: var(--burgundy);
}
.event__pin::before,
.event__pin::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(61, 69, 48, .45);
}
.event__pin .icon { width: 22px; height: 22px; }
.event__venue {
  font: 600 21px/1.3 var(--font-display);
  color: var(--olive-deep);
}
.event__address {
  max-width: 280px;
  margin: 4px auto 0;
  font-size: 15px;
  line-height: 1.6;
}
.event .btn {
  position: relative;
  z-index: 3;
  margin-top: 22px;
}

/* =========================================================
   7. RSVP
   ========================================================= */
.section--rsvp .divider { margin-bottom: 36px; }
.rsvp {
  max-width: 440px;
  margin: 32px auto 0;
  padding: 28px 20px 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  text-align: left;
}
.field {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}
.field__label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--olive-deep);
}
.field__input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  background: var(--cream);
  font-size: 16px;            /* ≥16px prevents iOS zoom */
  font-weight: 400;
  line-height: 1.5;
  color: var(--olive-deep);
  appearance: none;
  transition: border-color .2s ease;
}
.field__input:focus { border-color: var(--burgundy); }
.field__input:focus-visible { outline-offset: 2px; }
textarea.field__input { min-height: 116px; resize: vertical; }
.field__input[aria-invalid="true"] { border-color: var(--burgundy); background: #F8EDEA; }

.field__error {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--burgundy);
}
.field__error:empty { display: none; }

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.choices--count { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; display: block; }
.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--cream);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.choice:hover span { border-color: var(--burgundy); }
.choice input:checked + span {
  border-color: var(--burgundy);
  background: var(--burgundy);
  color: var(--cream);
}
.choice input:focus-visible + span { outline: 2px solid var(--burgundy); outline-offset: 3px; }
.field[aria-invalid="true"] .choice span { border-color: var(--burgundy); }

.rsvp .btn { margin-top: 8px; }
.rsvp__status {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 400;
  text-align: center;
  color: var(--sage);
}
.rsvp__status:empty { display: none; }

/* =========================================================
   8. Gift
   ========================================================= */
.section--gift { padding-bottom: calc(var(--pad-y) + 12px); }
.section--gift .btn { margin-top: 28px; }
.icon--chevron { width: 18px; height: 18px; transition: transform .3s ease; }
[aria-expanded="true"] .icon--chevron { transform: rotate(180deg); }

.gift-panel {
  display: grid;
  gap: 16px;
  max-width: 400px;
  margin: 28px auto 0;
}
.bank-card {
  position: relative;
  padding: 22px 20px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(140deg, var(--paper) 0%, var(--cream) 100%);
  box-shadow: var(--shadow-card);
  text-align: left;
  overflow: hidden;
}
.bank-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bank-card__bank {
  font: 600 25px/1 var(--font-display);
  letter-spacing: .02em;
  color: var(--burgundy);
}
.bank-card__mark { width: 22px; height: 30px; }
.bank-card__number {
  margin-top: 26px;
  font: 400 clamp(19px, 5.6vw, 22px)/1.2 var(--font-body);
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
  color: var(--olive-deep);
  overflow-wrap: anywhere;
}
.bank-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.bank-card__holder { font-size: 14px; line-height: 1.4; }

.address-card {
  max-width: 400px;
  margin: 28px auto 0;
  padding: 28px 22px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}
.address-card__icon { width: 28px; height: 28px; margin: 0 auto 6px; color: var(--sage); }
.address-card__title {
  font: 500 25px/1.2 var(--font-display);
  color: var(--burgundy);
}
.address-card__text {
  max-width: 280px;
  margin: 8px auto 18px;
  font-size: 15px;
  line-height: 1.6;
}

/* =========================================================
   9. Closing
   ========================================================= */
.closing {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin-top: calc(var(--arch) * -1);
  padding: calc(var(--arch) + var(--pad-y) + 48px) 40px calc(28px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--night);
  color: var(--silver);
  text-align: center;
}
.closing__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  z-index: -2;
  opacity: .32;
  filter: saturate(.7);
}
.closing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--night) 0%, rgba(28, 24, 20, .55) 35%, rgba(28, 24, 20, .7) 70%, var(--night) 100%);
}

.closing__content {
  position: relative;
  z-index: 3;
  max-width: 420px;
  margin: auto;
}
/* Monogram crest: the couple's initials in a brass double ring */
.crest {
  position: relative;
  width: 108px;
  aspect-ratio: 1;
  margin: 0 auto 28px;
  color: var(--brass-light);
}
.crest svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.crest__letters {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 40px/1 var(--font-display);
  letter-spacing: .02em;
}
.crest__amp {
  margin: 8px 3px 0;
  font: italic 400 22px/1 var(--font-display);
  opacity: .85;
}
.closing__title {
  margin-bottom: 18px;
  font: 500 clamp(30px, 8vw, 38px)/1.2 var(--font-display);
  color: var(--cream);
}
.closing__content p { text-wrap: pretty; }
.closing__salam {
  margin-top: 28px;
  font: italic 500 22px/1.4 var(--font-display);
  color: var(--cream);
}
.closing__from { margin-top: 32px; font-size: 15px; }
.closing__names {
  margin-top: 2px;
  font-size: clamp(48px, 13.4vw, 64px);
  color: var(--janur);
}
.closing__foot {
  position: relative;
  margin-top: 56px;
  font-size: 13px;
  color: rgba(217, 214, 206, .6);
}

/* =========================================================
   10. Music toggle
   ========================================================= */
.music {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(244, 238, 226, .28);
  border-radius: 50%;
  background: var(--burgundy);
  color: var(--cream);
  box-shadow: 0 12px 26px -10px rgba(78, 17, 25, .85);
  cursor: pointer;
  transition: background-color .2s ease;
}
.music:hover { background: var(--wine); }
.music:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; box-shadow: 0 0 0 3px var(--cream); }
.music__disc { display: block; width: 26px; height: 26px; }
.music__disc svg { width: 100%; height: 100%; }
.music.is-paused::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 30px;
  height: 2px;
  margin: auto;
  border-radius: 2px;
  background: var(--cream);
  box-shadow: 0 0 0 2px var(--burgundy);
  transform: rotate(-45deg);
}
.music.is-paused:hover::after { box-shadow: 0 0 0 2px var(--wine); }

/* =========================================================
   Desktop overrides (kept last so they win over the section rules)
   ========================================================= */
@media (min-width: 900px) {
  /* The photo panel is the hero on desktop; the column opens with the ayah panel. */
  .hero { display: none; }
}

/* =========================================================
   Motion states — only hidden once Motion has actually loaded
   ========================================================= */
.motion-ready .reveal,
.motion-ready .stagger > *,
.motion-ready .hero-anim { opacity: 0; }

/* =========================================================
   Bird guide (script.js): after the gate opens, a bird keeps visiting: in from a random
   side, 3 s at a corner of something worth reading, then on; it darts away from taps
   near it and flies off when the guest scrolls down.
   ========================================================= */
.bird-layer {
  position: fixed;
  inset: 0;                           /* script.js fits its sides to the invitation column */
  z-index: 30;                        /* over the page, under the music button (40) */
  overflow: hidden;                   /* it can leave the screen without adding scroll */
  pointer-events: none;
}
.bird {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(54px, 15vw, 76px);
  aspect-ratio: 330 / 300;            /* the bird's crop of bird.json */
  visibility: hidden;
  will-change: transform;
}
.bird.is-flying { visibility: visible; }

/* ---------- Gallery preview (script.js) ----------
   A photo opened large over a dark, blurred backdrop. .is-peek: opened by tap-and-hold, it
   closes on release, so it has no close button. */
html.lightbox-open,
html.lightbox-open body { overflow: hidden; }
.collage__photo {
  cursor: zoom-in;
  -webkit-touch-callout: none;        /* no long-press menu on the photos (the hold peeks) */
  -webkit-user-select: none;
  user-select: none;
}
.collage__photo img { -webkit-user-drag: none; pointer-events: none; }
.collage__photo:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 56px 16px calc(28px + env(safe-area-inset-bottom));
  background: rgba(20, 17, 14, .88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .25s ease;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__img {
  max-width: min(100%, 560px);
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
  scale: .94;
  transition: scale .3s cubic-bezier(.22, 1, .36, 1);
  cursor: default;
}
.lightbox.is-open .lightbox__img { scale: 1; }
.lightbox__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(244, 238, 226, .35);
  border-radius: 50%;
  background: rgba(28, 24, 20, .5);
  color: var(--cream);
  font: 300 28px/1 var(--font-body);
  cursor: pointer;
}
.lightbox__close:focus-visible { outline: 2px solid var(--janur); outline-offset: 2px; }
.lightbox.is-peek .lightbox__close { display: none; }

@media (prefers-reduced-motion: reduce) {
  .person__frame { animation: none; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
