/* ==========================================================
   Khaoula & Mohamed — royal Moroccan wedding invitation
   ivory / nude ground · champagne-gold hairlines · burgundy accents
   ========================================================== */
:root {
  --ivory: #f8f3ea;
  --ivory-2: #f2eadc;
  --nude: #eadfcd;
  --sand: #dcc8aa;
  --gold: #c2a062;
  --gold-lt: #e2c98f;
  --gold-hi: #f3e2b4;
  --gold-ink: #85642f;          /* gold for small text on ivory (AA) */
  --gold-deep: #9e7a3a;         /* gold for ornamental glyphs (و, &) on ivory: >= 3:1 */
  --line: rgba(178, 140, 76, .55);
  --line-soft: rgba(178, 140, 76, .28);
  --burgundy: #7a1a2b;
  --burgundy-2: #8e2436;
  --wine: #4f0d19;
  --ink: #3a231a;
  --ink-soft: #664b3c;
  --veil: #f6efe3;

  --f-ar: 'Amiri', 'Times New Roman', serif;
  --f-quran: 'Amiri Quran', 'Amiri', serif;
  --f-ruqaa: 'Aref Ruqaa', 'Amiri', serif;
  --f-caps: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --f-serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);

  /* JS overwrites these with the measured visual viewport */
  --vh: 100dvh;
  --frame-w: 100vw; --frame-h: 100dvh; --frame-x: 0px; --frame-y: 0px;
  --col-w: 100vw; --col-h: 100dvh; --col-x: 0px; --col-y: 0px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ivory); }
html.is-film { background: var(--veil); }
body {
  margin: 0; min-height: 100%;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--f-serif);
  font-size: 19px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'lnum' 1;   /* survives the font shorthand: Cormorant's old-style 1 reads like I */
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
html.is-end body { background: transparent; }
p, h1, h2, figure { margin: 0; }
img, svg, video, canvas { display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
[lang="ar"] { font-family: var(--f-ar); letter-spacing: 0; text-transform: none; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 4px; border-radius: 4px; }
.hero :focus-visible, .sec-doua :focus-visible, .skip:focus-visible { outline-color: var(--gold-hi); }
.hero-title:focus-visible { outline: none; }

/* ---------------------------------------------------------- film mode */
html.js.is-film { overscroll-behavior: none; }   /* (the viewport takes it from the root element) */
html.js.is-film body { overflow: hidden; overscroll-behavior: none; touch-action: manipulation; }
html.js.is-film main { display: none; }
html:not(.js) .stage, html:not(.js) .veil, html:not(.js) .loader, html:not(.js) .film-ui { display: none; }

/* ---------------------------------------------------------- stage */
.stage {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 50% 45%, rgba(246, 230, 200, .55), transparent 70%),
    linear-gradient(180deg, #6a3d2c 0%, #3e1d17 55%, #24100d 100%);
  contain: strict;
}
.amb-canvas {
  position: absolute; left: -12%; top: -12%; width: 124%; height: 124%;
  filter: blur(44px) saturate(1.15) brightness(.66);
  opacity: 0; transition: opacity 1.4s var(--ease-soft);
}
.stage.has-amb .amb-canvas { opacity: 1; }
.amb-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 95% at 50% 50%, transparent 30%, rgba(18, 6, 4, .55) 100%);
}
[data-stage="cover"] .amb-canvas, [data-stage="cover"] .amb-vignette { display: none; }
.frame {
  position: absolute; left: var(--frame-x); top: var(--frame-y);
  width: var(--frame-w); height: var(--frame-h);
  background: #e9dcc8;
}
[data-stage="contain"] .frame { box-shadow: 0 0 0 1px rgba(243, 226, 180, .1), 0 0 90px 10px rgba(0, 0, 0, .45); }
.layer { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.layer.on { opacity: 1; visibility: visible; }
.layer canvas, .layer video, .layer img { width: 100%; height: 100%; object-fit: cover; }
/* iPhone, Low Power Mode: no play button drawn over a film that waits for the tap */
.layer video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.layer-still { background: radial-gradient(ellipse 80% 55% at 50% 44%, #fbf6ee, #efe3cf 60%, #dcc6a6); }
.layer .still-emblem { position: absolute; left: 14%; top: 30%; width: 72%; height: auto; max-height: 28%; object-fit: contain; }

/* ---------------------------------------------------------- veil + loader */
.veil, .loader {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, #fbf7f0 0%, rgba(251, 247, 240, 0) 70%),
    var(--veil);
}
.veil { opacity: 0; pointer-events: none; transition: opacity 400ms var(--ease-soft); }
.veil.on { opacity: 1; pointer-events: auto; }
.veil-star { width: 18px; height: 18px; color: var(--gold); opacity: 0; transition: opacity .4s; }
.veil.busy .veil-star { opacity: 1; animation: star-breathe 2.6s var(--ease-soft) infinite; }

.loader { z-index: 40; transition: opacity .8s var(--ease-soft), visibility 0s .8s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader-star {
  width: 22px; height: 22px; color: var(--gold);
  animation: star-breathe 2.8s var(--ease-soft) infinite;
  filter: drop-shadow(0 0 6px rgba(194, 160, 98, .35));
}
.loader-text {
  position: absolute; left: 0; right: 0; top: calc(50% + 34px);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  opacity: 0; transition: opacity 1.2s var(--ease-soft);
}
.loader.slow .loader-text { opacity: 1; }
.loader-skip {
  position: absolute; left: 50%; top: calc(50% + 104px); transform: translateX(-50%); white-space: nowrap;
  padding: 10px 20px; border: 1px solid rgba(156, 116, 52, .55); border-radius: 999px;
  background: transparent; color: var(--wine, #6e1424); font: 500 12px/1.2 var(--f-caps); letter-spacing: .16em;
  text-transform: uppercase; cursor: pointer; animation: loaderSkipIn .8s var(--ease-soft) both;
}
.loader-skip span { font-family: 'Amiri', serif; text-transform: none; letter-spacing: 0; font-size: 14px; }
.loader-skip:focus-visible { outline: 2px solid var(--gold-deep, #8a6420); outline-offset: 3px; }
@keyframes loaderSkipIn { from { opacity: 0; } to { opacity: 1; } }
.loader-fr { font: 400 10.5px/1.4 var(--f-caps); letter-spacing: .32em; text-transform: uppercase; color: var(--gold-ink); }
.loader-ar { font-size: 15px; color: var(--gold-ink); }
@keyframes star-breathe {
  0%, 100% { transform: rotate(0deg) scale(.86); opacity: .7; }
  50% { transform: rotate(45deg) scale(1); opacity: 1; }
}

/* Waiting for the film after the tap (slow connection): the veil's star, how far the film is,
   then a way straight to the invitation. Sits above the veil, below the loader. */
.wait { position: fixed; inset: 0; z-index: 31; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease-soft); }
.wait.on { opacity: 1; }
.wait > button { pointer-events: auto; }
.wait-text {
  position: absolute; left: 0; right: 0; top: calc(50% + 34px);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.wait-bar {
  position: absolute; left: 50%; top: calc(50% + 88px); width: 132px; height: 2px; margin-left: -66px;
  background: var(--line-soft); border-radius: 2px; overflow: hidden;
}
.wait-bar i {
  display: block; width: 100%; height: 100%; background: var(--gold);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s linear;
}
.wait .loader-skip { top: calc(50% + 118px); }
/* short landscape phones: keep the way out on screen */
@media (max-height: 360px) {
  .loader-text, .wait-text { top: calc(50% + 20px); }
  .loader-skip { top: calc(50% + 70px); }
  .wait-bar { top: calc(50% + 68px); }
  .wait .loader-skip { top: calc(50% + 82px); }
}

/* ---------------------------------------------------------- film UI (CTA + skip), aligned to the visible column */
.film-ui {
  position: fixed; z-index: 20; pointer-events: none; container-type: inline-size;
  left: var(--col-x); top: var(--col-y); width: var(--col-w); height: var(--col-h);
}
html.is-end .film-ui { display: none; }
.film-ui > * { pointer-events: auto; }

.cta {
  position: absolute; left: 50%; bottom: calc(var(--sab) + clamp(34px, 7.5vh, 76px));
  transform: translate(-50%, 10px);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 30px 12px; border: 0; background: none; cursor: pointer; white-space: nowrap;
  opacity: 0; transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
  color: var(--wine);
}
.cta::before { /* soft ivory halo so the words read over any frame */
  content: ''; position: absolute; inset: -40px -64px -34px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(250, 245, 236, .92), rgba(250, 245, 236, .72) 45%, rgba(250, 245, 236, 0));
}
.cta.show { opacity: 1; transform: translate(-50%, 0); }
.cta.leaving { opacity: 0; transition-duration: .3s; }
.cta:focus-visible { outline-offset: 2px; border-radius: 18px; }
.seal { position: relative; width: 62px; height: 62px; margin-bottom: 4px; }
.seal-disc {
  position: absolute; inset: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 36% 30%, #a3344a 0%, #7a1a2b 46%, #520d1b 100%);
  box-shadow:
    inset 0 0 0 1.5px #d6b673, inset 0 0 0 5px #6d1526, inset 0 0 0 6px rgba(226, 201, 143, .7),
    0 6px 16px -4px rgba(79, 13, 25, .55), 0 1px 2px rgba(79, 13, 25, .4);
}
.seal-disc svg { width: 22px; height: 22px; color: var(--gold-lt); filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .3)); }
.seal-pulse {
  position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid rgba(194, 160, 98, .9);
  animation: seal-pulse 2.8s var(--ease-soft) infinite;
}
.seal-pulse.p2 { animation-delay: 1.4s; }
@keyframes seal-pulse {
  0% { transform: scale(1); opacity: .9; }
  100% { transform: scale(1.9); opacity: 0; }
}
.cta-fr {
  font: 500 12.5px/1.2 var(--f-caps); letter-spacing: .3em; text-transform: uppercase;
  padding-left: .3em; color: var(--wine);
}
.cta-ar { font-size: 18px; line-height: 1.2; color: var(--burgundy); }

.skip {
  position: absolute; top: calc(var(--sat) + 12px); right: calc(var(--sar) + 12px);
  min-height: 44px; min-width: 44px; padding: 0 16px 0 18px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(243, 226, 180, .35); border-radius: 999px;
  background: rgba(36, 14, 10, .45);   /* the riad opens on bright carved stucco: keep the label readable */
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fbf3e2; cursor: pointer; text-shadow: 0 1px 3px rgba(20, 6, 4, .5);
  font: 500 10.5px/1 var(--f-caps); letter-spacing: .22em; text-transform: uppercase;
  opacity: 0; transition: opacity .8s var(--ease-soft), background .3s;
}
.skip span { font: 400 17px/1 var(--f-serif); margin-top: -2px; }
.skip.show { opacity: .92; }
.skip:hover, .skip:focus-visible { opacity: 1; background: rgba(36, 14, 10, .6); }

/* ---------------------------------------------------------- hero (title over the riad's last frame) */
main { position: relative; z-index: 2; }
.hero {
  position: relative;
  width: var(--col-w); margin: 0 auto;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
  text-align: center; color: #fbf4e6;
  container-type: inline-size;   /* title sizes follow the visible column, not the window */
}
.hero-scrim { /* runs 64px past the hero so the card's arch rises out of it */
  position: absolute; inset: 0 0 -64px; pointer-events: none;
  background:
    /* the title sits over the balcony: darken the top, keep the arch and the fountain in full light */
    radial-gradient(ellipse 95% 30% at 50% 17%, rgba(30, 9, 9, .42), rgba(30, 9, 9, 0) 100%),
    linear-gradient(180deg, rgba(30, 9, 9, .84) 0%, rgba(30, 9, 9, .62) 20%, rgba(30, 9, 9, .26) 38%, rgba(30, 9, 9, 0) 52%,
      rgba(30, 9, 9, 0) 80%, rgba(30, 9, 9, .5) 94%, rgba(30, 9, 9, .72) 100%);
  opacity: 0; transition: opacity 2.2s var(--ease-soft);
}
.hero.revealed .hero-scrim { opacity: 1; }
.hero-inner {
  position: relative; width: 100%; padding: calc(var(--sat) + clamp(40px, 8vh, 96px)) 24px 0;
  display: flex; flex-direction: column; align-items: center;
}
.hero-star { width: 16px; height: 16px; color: var(--gold-lt); margin-bottom: 14px; }
.hero-title { display: flex; flex-direction: column; align-items: center; font-weight: 400; }
.hero-ar {
  display: block; font-family: var(--f-ruqaa); font-weight: 400;
  font-size: clamp(52px, 16vw, 78px); font-size: clamp(30px, 16cqi, 78px); line-height: 1.25;
  color: var(--gold-hi);
  text-shadow: 0 2px 18px rgba(30, 9, 9, .55), 0 0 2px rgba(30, 9, 9, .3);
}
.hero-ar .wa { color: var(--gold); }
.couple-ar .wa { color: var(--gold-deep); }
/* The couple's names take their letter shapes from their own lettering (src/ref-names.png),
   traced to SVG by tools/prep_names.py: no font has these shapes. The SVGs are masks painted
   with currentColor, so each spot keeps the colour its text had. Both share one vertical frame,
   so equal heights keep their relative size and baseline. Sized in em of the block's font-size. */
.names-art { display: flex; align-items: flex-end; justify-content: center; line-height: 1; margin-bottom: .16em; }
.names-art .nm {
  display: block; flex: none; height: 1.7em; background-color: currentColor;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}
.names-art .nm-k { aspect-ratio: 418 / 346; -webkit-mask-image: url(../assets/names/khaoula.svg); mask-image: url(../assets/names/khaoula.svg); }
.names-art .nm-m { aspect-ratio: 548 / 346; -webkit-mask-image: url(../assets/names/mohamed.svg); mask-image: url(../assets/names/mohamed.svg); }
.names-art .wa { font-family: var(--f-ruqaa); font-size: .72em; line-height: 1; margin: 0 .1em .5em; }
/* text-shadow does not reach the masked shapes: same shadow as a filter */
.hero-ar.names-art { text-shadow: none; filter: drop-shadow(0 2px 18px rgba(30, 9, 9, .55)) drop-shadow(0 0 2px rgba(30, 9, 9, .3)); }
.hero-lat {
  display: block; margin-top: 6px;
  font: 500 clamp(14px, 4vw, 17px)/1.3 var(--f-caps); font-size: clamp(10px, 4cqi, 17px);
  letter-spacing: .3em; text-transform: uppercase; padding-left: .3em; color: #fbf4e6;
  text-shadow: 0 1px 12px rgba(30, 9, 9, .6);
}
.hero-lat em, .couple-lat em, .sign-lat em {
  font: italic 400 1.45em/1 var(--f-serif); letter-spacing: 0; text-transform: none;
  color: var(--gold-lt); padding: 0 .12em;
}
.hero .rule { margin: 18px auto 14px; }
.hero-date { display: flex; flex-direction: column; gap: 2px; }
.hd-fr { font: italic 400 clamp(19px, 5.4vw, 23px)/1.3 var(--f-serif); font-size: clamp(14px, 5.4cqi, 23px); color: #fbf4e6; text-shadow: 0 1px 10px rgba(30, 9, 9, .6); }
.hd-ar { font-size: clamp(16px, 4.6vw, 19px); font-size: clamp(13px, 4.6cqi, 19px); color: var(--gold-lt); text-shadow: 0 1px 10px rgba(30, 9, 9, .6); }

.scroll-cue {
  position: absolute; left: 50%; bottom: calc(var(--sab) + 18px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 8px 14px; text-decoration: none; white-space: nowrap;
  font: 500 10px/1 var(--f-caps); letter-spacing: .3em; text-transform: uppercase; color: rgba(251, 244, 230, .85);
}
.scroll-cue i { position: relative; width: 1px; height: 38px; background: linear-gradient(rgba(243, 226, 180, .7), rgba(243, 226, 180, 0)); overflow: visible; }
.scroll-cue i::after {
  content: ''; position: absolute; left: -2px; top: 0; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold-hi); box-shadow: 0 0 8px var(--gold-hi);
  animation: cue 2.4s var(--ease-soft) infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(36px); opacity: 0; } }

/* staged reveal */
.hero .rv {
  opacity: 0; transform: translateY(16px); filter: blur(6px);
  transition: opacity 1.5s var(--ease), transform 1.5s var(--ease), filter 1.5s var(--ease);
}
.hero.revealed .rv { opacity: 1; transform: none; filter: blur(0); }
.hero .scroll-cue.rv { transform: translate(-50%, 16px); }
.hero.revealed .scroll-cue.rv { transform: translate(-50%, 0); }
.hero.revealed .hero-star { transition-delay: .25s; }
.hero.revealed .hero-ar { transition-delay: .45s; }
.hero.revealed .hero-lat { transition-delay: .85s; }
.hero.revealed .rule { transition-delay: 1.15s; }
.hero.revealed .hero-date { transition-delay: 1.35s; }
.hero.revealed .scroll-cue { transition-delay: 2.1s; }
.hero.instant .rv, .hero.instant .hero-scrim { transition-duration: .9s; transition-delay: 0s !important; }

/* ---------------------------------------------------------- rule (hairline + star) */
.rule { display: flex; align-items: center; justify-content: center; gap: 12px; width: min(220px, 70%); margin: 26px auto; color: var(--gold); }
.rule::before, .rule::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.rule::after { background: linear-gradient(90deg, var(--line), transparent); }
.rule svg { width: 11px; height: 11px; flex: none; }
.rule-light { color: var(--gold-lt); }
.rule-light::before { background: linear-gradient(90deg, transparent, rgba(243, 226, 180, .7)); }
.rule-light::after { background: linear-gradient(90deg, rgba(243, 226, 180, .7), transparent); }

/* ---------------------------------------------------------- the card */
.card {
  --card-w: min(100vw, max(var(--col-w), 500px));
  --inset: 3.5%;
  position: relative; width: var(--card-w); margin: 64px auto 0;
  background: var(--ivory);
  box-shadow: 0 -30px 60px -30px rgba(30, 9, 9, .35);
}
.card::before { /* the invitation's gold frame: two hairlines running the whole card */
  content: ''; position: absolute; z-index: 1; pointer-events: none;
  left: var(--inset); right: var(--inset); top: 0; bottom: 14px;
  border: 1px solid var(--line); border-top: 0;
}
.card::after {
  content: ''; position: absolute; z-index: 1; pointer-events: none;
  left: calc(var(--inset) + 5px); right: calc(var(--inset) + 5px); top: 0; bottom: 19px;
  border: 1px solid var(--line-soft); border-top: 0;
}
.card-arch { position: absolute; left: 0; right: 0; top: -63px; height: 64px; pointer-events: none; }
.card-arch > svg:first-child { width: 100%; height: 100%; overflow: visible; }
.arch-fill { fill: var(--ivory); }
.arch-line { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.arch-line.soft { stroke: var(--line-soft); }
.arch-finial { position: absolute; left: 50%; top: 27px; width: 12px; height: 12px; margin-left: -6px; color: var(--gold); }

.sec { position: relative; padding: 72px 40px; text-align: center; }
.sec + .sec::before { /* hairline between sections */
  content: ''; position: absolute; top: 0; left: 50%; width: 46px; height: 1px; margin-left: -23px;
  background: var(--line);
}
.sec-doua + .sec::before, .sec-doua::before { display: none; }
.kicker {
  font: 500 11px/1.4 var(--f-caps); letter-spacing: .36em; text-transform: uppercase;
  padding-left: .36em; color: var(--gold-ink); margin-bottom: 18px;
}
.sec-ornament { width: 34px; height: 34px; margin: 0 auto 26px; color: var(--gold); }

/* emblem (assets/site/emblem.webp, a 88 KB WebP made from assets/monogram/logo-cutout.png; rosette if missing) */
.emblem { display: flex; justify-content: center; align-items: center; margin: 0 auto 30px; min-height: 92px; }
.emblem img { width: min(230px, 62%); height: auto; max-height: 150px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(79, 13, 25, .12)); }
.emblem-fallback { display: none; width: 88px; height: 88px; }
.emblem.no-img img { display: none; }
.emblem.no-img .emblem-fallback { display: block; }
.emblem-sm { margin: 34px auto 22px; min-height: 64px; }
.emblem-sm img { width: min(150px, 44%); }
.emblem-sm .emblem-fallback { width: 60px; height: 60px; }

/* verses */
.sec-verse { padding-top: 58px; }
.basmala { font-family: var(--f-quran); font-size: clamp(19px, 5.4vw, 23px); line-height: 2; color: var(--burgundy); margin-bottom: 14px; }
.quran { font-family: var(--f-quran); font-size: clamp(21px, 6vw, 26px); line-height: 2.15; color: var(--ink); text-wrap: balance; }
.quran-fr { max-width: 30em; margin: 0 auto 22px; font: italic 400 clamp(18.5px, 5.1vw, 21px)/1.6 var(--f-serif); color: var(--ink-soft); text-wrap: balance; }
.sura { font-size: 17px; color: var(--gold-ink); }
.sura span { font-family: var(--f-serif); font-size: .95em; }
.sura-fr { margin-top: 4px; font: 500 10.5px/1.4 var(--f-caps); letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; color: var(--gold-ink); }

/* couple */
.couple-names { display: flex; flex-direction: column; align-items: center; font-weight: 400; }
.couple-ar { font-family: var(--f-ruqaa); font-size: clamp(50px, 15vw, 70px); line-height: 1.3; color: var(--burgundy); }
.couple-lat { margin-top: 4px; font: 500 clamp(14px, 4vw, 16.5px)/1.3 var(--f-caps); letter-spacing: .26em; padding-left: .26em; text-transform: uppercase; color: var(--ink); }
.couple-lat em { color: var(--gold-deep); }

/* invitation text */
.sec-invite, .sec-venue, .sec-privacy { background: linear-gradient(180deg, var(--ivory), var(--ivory-2) 90px, var(--ivory-2) calc(100% - 90px), var(--ivory)); }
/* fully vocalized lines are set in Amiri (naskh): Ruqaa scatters the vowel marks */
.invite-ar { font-size: clamp(27px, 7.8vw, 34px); line-height: 1.85; color: var(--ink); }
.invite-ar strong { font-weight: 700; color: var(--burgundy); font-size: 1.12em; }
.invite-fr { font: 400 clamp(21px, 5.8vw, 24px)/1.5 var(--f-serif); color: var(--ink); text-wrap: balance; }

/* date */
.date-block { display: flex; flex-direction: column; align-items: center; }
.d-day, .d-month { font: 500 15px/1.3 var(--f-caps); letter-spacing: .32em; padding-left: .32em; text-transform: uppercase; color: var(--ink); }
.d-num {
  font: 500 clamp(104px, 31vw, 136px)/1 var(--f-serif); margin: 2px 0 0;
  color: var(--burgundy);
  background: linear-gradient(175deg, #a2394c 5%, #7a1a2b 50%, #4f0d19 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-feature-settings: 'lnum' 1, 'tnum' 1;   /* the flagged 1 */
}
.d-month { margin-top: 2px; }
.d-ar { margin-top: 16px; font-size: 19px; color: var(--ink-soft); }
/* French and Arabic on their own lines: side by side they wrapped mid-phrase on 320-360 px phones */
.d-time { margin-top: 10px; display: flex; flex-direction: column; align-items: center; font: italic 400 19px/1.6 var(--f-serif); color: var(--ink-soft); }
.d-time [lang="ar"] { font-style: normal; font-size: 16.5px; line-height: 1.7; }
.dot { color: var(--gold); padding: 0 .2em; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 330px; margin: 0 auto; }
.countdown > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; }
.countdown > div + div { border-left: 1px solid var(--line-soft); }
.countdown b { font: 500 34px/1 var(--f-serif); color: var(--burgundy); font-variant-numeric: tabular-nums lining-nums; }
.countdown span { font: 500 9.5px/1 var(--f-caps); letter-spacing: .2em; padding-left: .2em; text-transform: uppercase; color: var(--gold-ink); }
.cal { margin-top: 38px; }
.cal-label { font: 500 10.5px/1.4 var(--f-caps); letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 14px; }
.cal-btns { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cal-btns .btn { width: min(100%, 250px); padding: 0 18px; }

/* venue */
.venue-name { font: 500 clamp(26px, 7.6vw, 32px)/1.2 var(--f-caps); letter-spacing: .12em; padding-left: .12em; text-transform: uppercase; color: var(--burgundy); }
.venue-ar { font-family: var(--f-ruqaa); font-size: 30px; line-height: 1.5; color: var(--ink); margin-top: 2px; }
.venue-photo {
  position: relative; margin: 26px auto 24px; padding: 7px;
  border: 1px solid var(--line); background: var(--ivory);
  max-width: 460px;
}
.venue-photo::after { content: ''; position: absolute; inset: 3px; border: 1px solid var(--line-soft); pointer-events: none; }
.venue-city { font: 500 15px/1.4 var(--f-caps); letter-spacing: .24em; padding-left: .24em; text-transform: uppercase; color: var(--ink); }
.venue-city [lang="ar"] { font-size: 19px; color: var(--gold-ink); }
.venue-addr { margin: 6px 0 26px; font: italic 400 19px/1.45 var(--f-serif); color: var(--ink-soft); }
/* map: Google's embed inside the photo frame; a transparent link on top opens Google Maps on any tap.
   The pin on the iframe's own background shows while the map loads, or if Google is blocked. */
.venue-map { margin: 0 auto; }
.venue-ar + .venue-city { margin-top: 20px; }
.venue-map iframe {
  display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; pointer-events: none;
  background: var(--ivory-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237a1a2b' d='M12 2C8 2 5 5 5 9c0 5.3 7 13 7 13s7-7.7 7-13c0-4-3-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / 30px no-repeat;
}
.venue-map a { position: absolute; inset: 0; z-index: 1; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; cursor: pointer;
  font: 500 11.5px/1.2 var(--f-caps); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background .3s, color .3s, box-shadow .3s, transform .2s;
}
.btn .ico { width: 17px; height: 17px; flex: none; }
.btn-line {
  border: 1px solid var(--gold); color: var(--burgundy);
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  box-shadow: inset 0 0 0 3px var(--ivory), inset 0 0 0 4px var(--line-soft);
}
.btn-line:hover { background: rgba(194, 160, 98, .12); }
.btn-wine {
  width: 100%; max-width: 330px; min-height: 54px; padding: 0 18px; letter-spacing: .16em;
  border: 1px solid #c9a35a; color: #fbf3e4;
  background: linear-gradient(180deg, #8e2436, #651120);
  box-shadow: inset 0 0 0 3px #7a1a2b, inset 0 0 0 4px rgba(226, 201, 143, .55), 0 12px 26px -12px rgba(79, 13, 25, .6);
}
.btn-wine:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }

/* RSVP */
.rsvp-title { font: 500 clamp(19px, 5.4vw, 23px)/1.35 var(--f-caps); letter-spacing: .14em; padding-left: .14em; text-transform: uppercase; color: var(--ink); }
.rsvp-ar { font-family: var(--f-ruqaa); font-size: 30px; line-height: 1.5; color: var(--burgundy); margin: 4px 0 28px; }
.rsvp-form { display: flex; flex-direction: column; align-items: center; max-width: 340px; margin: 0 auto; }
.field { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.field > span { font: 500 10.5px/1.4 var(--f-caps); letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; color: var(--gold-ink); }
.field input {
  width: 100%; border: 0; border-bottom: 1px solid var(--gold); border-radius: 0;
  background: transparent; color: var(--ink); text-align: center;
  font: 400 22px/1.3 var(--f-serif); padding: 10px 6px 9px;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: rgba(102, 75, 60, .75); font-style: italic; }
.field input:focus { outline: none; border-bottom-color: var(--burgundy); box-shadow: 0 1px 0 var(--burgundy); }
.field input[aria-invalid="true"] { border-bottom-color: #a3243a; }
.form-msg { min-height: 1.5em; margin: 12px 0 14px; font: italic 400 17px/1.4 var(--f-serif); color: var(--burgundy); }
.wa-fallback { margin-top: 16px; font: 500 11px/1.4 var(--f-caps); letter-spacing: .22em; text-transform: uppercase; color: var(--burgundy); text-underline-offset: 5px; text-decoration-color: var(--gold); }

/* verse Al-Furqan: the one burgundy band */
.sec-doua {
  color: var(--gold-hi);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23e2c98f' stroke-opacity='.15' stroke-width='.8'%3E%3Cpath d='M22 22h20v20H22z'/%3E%3Cpath d='M32 17.86L46.14 32 32 46.14 17.86 32z'/%3E%3Cpath d='M32 0v17.86M32 46.14V64M0 32h17.86M46.14 32H64'/%3E%3Ccircle cx='32' cy='32' r='4.5'/%3E%3C/g%3E%3C/svg%3E") center / 64px 64px,
    radial-gradient(ellipse 90% 70% at 50% 40%, #8a2234, #5e0f1e 70%, #470a16);
  padding: 84px 44px;
}
.doua-star { width: 16px; height: 16px; margin: 0 auto 22px; color: var(--gold-lt); }
.sec-doua .quran { color: #fbf1dc; }
.sec-doua .sura { color: var(--gold-lt); }
.sec-doua .quran-fr { color: #f3e6cc; }
.sec-doua .sura-fr { color: var(--gold-lt); }

/* no photos */
.privacy-title { display: flex; flex-direction: column; align-items: center; font-weight: 400; }
.privacy-title [lang="ar"] { font-size: clamp(30px, 8.6vw, 38px); line-height: 1.6; font-weight: 700; color: var(--burgundy); }
.privacy-title span + span { font: 500 clamp(15px, 4.2vw, 17px)/1.3 var(--f-caps); letter-spacing: .2em; padding-left: .2em; text-transform: uppercase; color: var(--ink); }
.nophoto { width: 76px; height: 76px; margin: 0 auto 24px; color: var(--gold); }
.nophoto .cam { fill: var(--burgundy); }
.privacy-ar { font-size: clamp(21px, 6vw, 25px); line-height: 1.9; color: var(--burgundy); text-wrap: balance; }
.privacy-thanks { font: italic 400 17px/1.5 var(--f-serif); color: var(--ink-soft); text-wrap: balance; }

/* closing */
.sec-merci { padding-bottom: 92px; }
.merci-ar { font-size: clamp(30px, 8.6vw, 38px); line-height: 1.7; color: var(--burgundy); }
.merci-fr { font: italic 400 clamp(21px, 5.8vw, 24px)/1.45 var(--f-serif); color: var(--ink); max-width: 320px; margin: 0 auto; text-wrap: balance; }
.merci-title { font: italic 500 clamp(34px, 9.6vw, 42px)/1.2 var(--f-serif); color: var(--burgundy); }
.merci-body-ar { margin-top: 12px; font-size: clamp(20px, 5.6vw, 23px); line-height: 1.9; color: var(--ink); }
.heart { width: 18px; height: 18px; margin: 20px auto 0; color: var(--burgundy); }
.sign-fr { font: 500 11px/1.4 var(--f-caps); letter-spacing: .34em; padding-left: .34em; text-transform: uppercase; color: var(--gold-ink); }
.sign-ar { font-family: var(--f-ruqaa); font-size: 40px; line-height: 1.5; color: var(--ink); margin-top: 6px; }
.sign-lat { font: 500 13px/1.3 var(--f-caps); letter-spacing: .26em; padding-left: .26em; text-transform: uppercase; color: var(--ink-soft); }
.sign-lat em { color: var(--gold-deep); }
.replay { margin-top: 38px; }
.films-link {
  display: inline-block; margin-top: 22px; padding: 8px;
  font: italic 400 16px/1.4 var(--f-serif); color: var(--ink-soft);
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px;
}

/* narrow columns (landscape phones show a ~220px portrait stage) */
@container (max-width: 320px) {
  .hero-inner { padding-left: 12px; padding-right: 12px; }
  .hero-lat { letter-spacing: .16em; padding-left: .16em; }
  .hero .rule { margin: 10px auto 8px; }
  .cta { gap: 6px; padding: 10px 12px; }
  .cta::before { inset: -24px -20px -20px; }
  .cta-fr { font-size: 10px; letter-spacing: .18em; padding-left: .18em; }
  .cta-ar { font-size: 15px; }
  .seal { width: 46px; height: 46px; }
  .seal-disc svg { width: 17px; height: 17px; }
  .skip { padding: 0 12px; }
}
/* landscape phones: the hero is only ~260-340 px tall, and the scroll cue sat on the date */
@media (orientation: landscape) and (max-height: 430px) {
  .hero-inner { padding-top: calc(var(--sat) + 16px); }
  .scroll-cue { bottom: calc(var(--sab) + 4px); gap: 0; padding: 6px 14px; }
  .scroll-cue i { display: none; }
}

/* ---------------------------------------------------------- no-JS: the hero has no film behind it */
html:not(.js) .hero { background: radial-gradient(ellipse 90% 70% at 50% 40%, #8a2234, #4f0d19); }
html:not(.js) .hero .rv { opacity: 1; transform: none; filter: none; }
html:not(.js) .hero .scroll-cue { transform: translateX(-50%); }
/* without JS the countdown would stay at "--" and "Google Agenda" would only fetch the .ics
   ("js-late": the app arrived after index.html's 9 s safety timer and runs without the film) */
html:not(.js):not(.js-late) .countdown, html:not(.js):not(.js-late) #calGoogle { display: none; }

/* ---------------------------------------------------------- wider screens */
@media (max-width: 374px) {
  .sec { padding-left: 30px; padding-right: 30px; }
}
@media (min-width: 700px) {
  .sec { padding-left: 56px; padding-right: 56px; }
}

/* ---------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .hero .rv { filter: none; transform: none; transition-duration: .6s; transition-delay: 0s !important; }
}
html.rm .seal-pulse, html.rm .loader-star, html.rm .scroll-cue i::after { animation: none; }
html.rm .seal-pulse { opacity: 0; }
html.rm .hero .rv { transform: none; filter: none; transition-delay: 0s !important; }
html.rm .hero .scroll-cue.rv { transform: translate(-50%, 0); }   /* stays centred: it only fades in */
html.rm .cta { transform: translate(-50%, 0); }
html.rm .wait-bar i { transition: none; }
