/* ============================================================
   Partner One & Partner Two — Wedding Invitation
   Aesthetic: white ground · dark navy ink · gold + eucalyptus accents
   (matched to the navy-anemone & white-magnolia florals)
   ============================================================ */

/* Self-hosted fonts — no Google Fonts dependency, so Arabic renders
   correctly even in WhatsApp/in-app browsers and restricted networks. */
@font-face {
  font-family: 'Reem Kufi'; font-style: normal; font-weight: normal; font-display: swap;
  src: url('fonts/reem-kufi-arabic.woff2') format('woff2'), url('fonts/reem-kufi.woff') format('woff');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF, U+1EE00-1EEFF;
}
@font-face {
  font-family: 'Reem Kufi'; font-style: normal; font-weight: normal; font-display: swap;
  src: url('fonts/reem-kufi-latin.woff2') format('woff2'), url('fonts/reem-kufi.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Marcellus'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/marcellus-latin.woff2') format('woff2'), url('fonts/marcellus.woff') format('woff');
}
@font-face {
  font-family: 'Parisienne'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/parisienne-latin.woff2') format('woff2'), url('fonts/parisienne.woff') format('woff');
}

:root {
  /* palette — "Delft Garden": monochrome blue toile on ivory paper + gold jewel.
     ~70% paper/cream · ~25% blues · ~5% gold. Never pure #FBF9F2 / #000. */
  --ink:      #1E2B4D;   /* darkest navy — primary line art, couple's names */
  --indigo:   #28395E;   /* deep fill, headings */
  --royal:    #3B5A8C;   /* mid-blue — secondary botanical detail */
  --delft:    #5C7CB2;   /* body-weight blue */
  --sky:      #94AECE;   /* soft highlight blue */
  --wash:     #C8D5E6;   /* palest blue — tint / watermark */
  --paper:    #F8F5EC;   /* ivory paper ground */
  --cream:    #FBF9F2;   /* lighter card / liner */

  /* existing token names remapped onto the Delft palette so every var() shifts */
  --royal-900: #1E2B4D;   /* deepest navy — dark bands, footer, headings */
  --royal-800: #28395E;   /* indigo */
  --royal-700: #3B5A8C;   /* royal blue accent */
  --royal-600: #5C7CB2;   /* delft */
  --ivory:       #F0ECDD;  /* tinted ivory panel */
  --ivory-soft:  #E8E2CF;  /* deeper ivory tint */
  --parchment:   #F8F5EC;  /* ivory paper ground */
  /* gold — a jewel, used sparingly (rules, monogram, seal) */
  --gold:        #C0A15C;
  --gold-bright: #D4BB7E;
  --gold-deep:   #8A6D2E;

  /* blue accents kept under the old names some rules still reference */
  --sage:        #5C7CB2;
  --sage-soft:   #94AECE;
  --green-deep:  #3B5A8C;
  --blush:       #94AECE;

  /* roles */
  --bg:          var(--parchment);
  --bg-dark:     var(--royal-900);
  --text:        #1E2B4D;   /* deep navy ink */
  --text-dark:   #F1ECDA;   /* warm ivory on dark bands */
  --text-muted:  #5C7CB2;   /* delft */

  /* type — EB Garamond body · Cormorant Garamond display/names · Katibeh (Arabic) */
  --serif:  "EB Garamond", Georgia, serif;
  --display-en: "Cormorant Garamond", "EB Garamond", Georgia, serif;   /* names + titles */
  --label:  "EB Garamond", Georgia, serif;
  --font-script: "Pinyon Script", cursive;      /* single tiny accent only */
  --arabic: "Katibeh", "Reem Kufi", sans-serif;
  --arabic-display: "Katibeh", "Reem Kufi", sans-serif;
  --arabic-quran: "Katibeh", "Reem Kufi", sans-serif;

  /* metrics */
  --maxw: 1180px;
  --gut: clamp(1.25rem, 5vw, 5rem);
  /* horizontal safe-zone so centred text/content clears the floral side columns
     (the columns are ~21% of the width; scales with the viewport like the art) */
  --safe: max(var(--gut), 21vw);
  --r: 2px;
  --shadow-card: 0 24px 60px -30px rgba(5, 12, 28, 0.55);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  position: relative;   /* anchors the floral .frame to the whole document */
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.2rem);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--gold); color: #FBF9F2; }
/* keep the HTML `hidden` attribute authoritative over component display rules */
[hidden] { display: none !important; }

/* film grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ============================================================
   Typography helpers
   ============================================================ */
.eyebrow {
  font-family: var(--label);
  font-variant: small-caps; text-transform: none;
  letter-spacing: 0.18em;
  font-size: clamp(0.9rem, 0.5vw + 0.75rem, 1.1rem);
  color: var(--indigo);
  margin: 0 0 1.4rem;
}
body[data-lang="ar"] .eyebrow { font-variant: normal; letter-spacing: .04em; }
.eyebrow--center { text-align: center; }
.section--dark .eyebrow { color: var(--gold-bright); }

.section__title {
  font-family: var(--display-en);
  font-weight: 500;
  font-variant: small-caps;
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: 0.05em;
  text-align: center;
}
body[data-lang="ar"] .section__title { font-family: var(--arabic-display); font-size: clamp(2.2rem, 5vw, 4rem); }
.section--dark .section__title { color: var(--ivory); }

.section__head { max-width: 760px; margin: 0 auto clamp(2.5rem, 6vw, 4.5rem); }

/* ---------- dividers & sprigs ---------- */
.divider { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 2rem auto; max-width: 420px; }
.divider__line { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.sprig { width: 120px; height: 26px; color: var(--gold); flex: none; }
.sprig--lg { width: 150px; height: 30px; margin: 0 auto 1.6rem; display: block; }
.divider--footer { margin: 1.8rem auto; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--label);
  letter-spacing: 0.18em;
  text-transform: none; font-variant: small-caps;
  font-size: 0.78rem;
  padding: 1.05em 2.2em;
  border-radius: var(--r);
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s, background .35s, color .35s;
  position: relative;
  will-change: transform;
}
.btn--gold, .btn--gold * {
  color: #F1ECDA !important;   /* deep brown text on the antique-gold fill */
}
.btn--gold {
  background: linear-gradient(135deg, var(--royal-700), var(--royal-800) 55%, var(--royal-900));
  border: 1px solid var(--gold);
  box-shadow: 0 14px 30px -14px rgba(18,35,63,.55);
}
.btn--gold:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -16px rgba(18,35,63,.7); }
.btn--ghost {
  border: 1px solid currentColor;
  color: var(--gold-deep);
  background: transparent;
}
.section--dark .btn--ghost { color: var(--gold-bright); }
.btn--ghost:hover { background: var(--gold); color: var(--parchment); border-color: var(--gold); transform: translateY(-3px); }
.btn--block { width: 100%; padding: 1.2em; font-size: 0.85rem; }
/* Location / map buttons — more visible than ghost, still elegant */
.btn--map {
  background: linear-gradient(180deg, #FBF9F2, #eef1f7);
  border: 1.5px solid var(--royal-700);
  color: var(--royal-800);
  box-shadow: 0 12px 26px -14px rgba(18,35,63,.5);
  font-size: 0.82rem;
  white-space: nowrap;   /* keep the label on one line */
}
.btn--map::before {
  content: ""; width: 1.05em; height: 1.05em; flex: none;
  background-color: currentColor;   /* navy normally, light on the navy hover */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.1 2 5 5.1 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.9-3.1-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 / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.1 2 5 5.1 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.9-3.1-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 / contain no-repeat;
}
.btn--map:hover {
  background: linear-gradient(135deg, var(--royal-700), var(--royal-800) 58%, var(--royal-900));
  color: var(--parchment);
  border-color: var(--royal-800);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -16px rgba(18,35,63,.65);
}
.btn--map:hover, .btn--map:hover * { color: var(--parchment) !important; }

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  /* 3 columns so the monogram sits dead-centre; toggle left, nav/CTA right */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 1.1rem clamp(2rem, 7vw, 3.8rem);   /* keep controls clear of the corner florals */
  transition: background .4s, box-shadow .4s, padding .4s;
}
.topbar > .lang-toggle { grid-column: 1; grid-row: 1; justify-self: start; }
.topbar > .monogram    { grid-column: 2; grid-row: 1; justify-self: center; }
.topbar > .nav         { grid-column: 3; grid-row: 1; justify-self: end; }
.topbar.is-scrolled {
  background: rgba(248, 245, 236, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 1px 0 rgba(193,160,74,.18), 0 10px 30px -22px rgba(18,32,58,.5);
  padding-top: .75rem; padding-bottom: .75rem;
}
.monogram {
  font-family: var(--display-en);
  font-size: 1.9rem; letter-spacing: 0; color: var(--royal-800);
  display: inline-flex; align-items: baseline; line-height: 1;
  padding: .12em .55em; border-radius: 999px;
  background: rgba(248,245,236,.78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.topbar.is-scrolled .monogram { color: var(--royal-800); }
.monogram__amp { color: var(--gold); font-size: .8em; margin: 0 .12em; font-style: italic; }

.nav { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.9rem); }
.nav a {
  font-family: var(--label);
  font-size: .76rem; letter-spacing: .16em; text-transform: none; font-variant: small-caps;
  color: var(--royal-700); opacity: .9; transition: opacity .3s, color .3s; position: relative;
}
.nav a::after {
  content:""; position:absolute; left:0; right:0; bottom:-6px; height:1px;
  background: var(--gold); transform: scaleX(0); transform-origin: center; transition: transform .35s;
}
.nav a:hover { opacity: 1; color: var(--gold-deep); }
.nav a:hover::after { transform: scaleX(1); }
.nav__cta {
  border: 1px solid var(--gold); color: var(--royal-700) !important;
  padding: .55em 1.25em; border-radius: var(--r); opacity: 1 !important;
  background: rgba(248,245,236,.82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--royal-700); color: #F1ECDA !important; border-color: var(--royal-700); }

.lang-toggle {
  font-family: var(--label); letter-spacing: .1em; font-size: .82rem;
  color: var(--royal-800); display: inline-flex; gap: .35em; align-items: center;
  padding: .4em .7em; border: 1px solid rgba(193,160,74,.4); border-radius: 999px;
  background: rgba(248,245,236,.78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: border-color .3s, background .3s;
}
.lang-toggle:hover { border-color: var(--gold); }
.lang-toggle__sep { opacity: .5; }
.lang-toggle .lang-toggle__ar { font-family: var(--arabic); }
body[data-lang="en"] .lang-toggle__en, body[data-lang="ar"] .lang-toggle__ar { color: var(--gold-deep); }
body[data-lang="en"] .lang-toggle__ar, body[data-lang="ar"] .lang-toggle__en { opacity: .55; }

/* The bar sits on the cream hero with dark text; once scrolled it gains a navy
   panel, so flip text back to light for contrast. */
.topbar.is-scrolled .nav a { color: var(--text-dark); }
.topbar.is-scrolled .nav__cta { color: var(--royal-700) !important; }
/* On hover the CTA fills navy, so its text must stay light even while scrolled
   (the .is-scrolled rule above is more specific than .nav__cta:hover). */
.topbar.is-scrolled .nav__cta:hover { color: #F1ECDA !important; }
.topbar.is-scrolled .lang-toggle { color: var(--royal-800); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: clamp(4.5rem, 8vh, 6rem) var(--safe) clamp(5rem, 13vh, 8.5rem);
  color: var(--text);
  background:
    radial-gradient(120% 90% at 50% 8%, #FBF9F2 0%, var(--parchment) 45%, var(--ivory-soft) 100%);
  overflow: hidden;
  isolation: isolate;
}
.hero__glow {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(45% 38% at 50% 35%, rgba(193,160,74,.16), transparent 70%),
    radial-gradient(80% 60% at 50% 122%, rgba(206,218,238,.55), transparent);
  animation: glowPulse 7s ease-in-out infinite alternate;
}
@keyframes glowPulse { from { opacity:.75; } to { opacity:1; transform: scale(1.04); } }

.hero__inner { max-width: 760px; position: relative; z-index: 1; }

.eyebrow.reveal { color: var(--gold-deep); }

.hero__names {
  font-family: var(--display-en);
  font-weight: 400;
  color: var(--gold-deep);
  font-size: clamp(1.5rem, 6.6vw, 4.8rem);   /* shrink-to-fit so the pair stays on one line */
  line-height: 1.1; letter-spacing: .01em; direction: ltr;   /* keep groom-first order regardless of page language */
  display: flex; flex-direction: row; align-items: center; justify-content: center; flex-wrap: nowrap; white-space: nowrap; gap: .3em;
}
.hero__name { display: inline-block; }
.hero__amp {
  font-style: italic; color: var(--gold-deep);
  font-size: .75em; font-weight: 400;
}
.hero__names-ar {
  font-family: var(--arabic-display);
  color: var(--gold-deep);
  font-size: clamp(1.7rem, 6vw, 3rem);
  margin-top: .4rem; line-height: 1.35;
}
.hero__photo {
  position: relative; z-index: 2;
  margin: clamp(.3rem, 1vh, .8rem) auto 0;
  max-width: min(290px, 76vw);
  border-radius: 0; overflow: hidden;
  border: 1px solid rgba(193,160,74,.5);
  box-shadow: 0 30px 64px -16px rgba(18,32,58,.72);
}
.hero__photo img { display: block; width: 100%; height: auto; }
.hero__date {
  display: flex; flex-direction: column; gap: .55rem; align-items: center;
  font-family: var(--label); text-transform: none; font-variant: small-caps;
  letter-spacing: .3em; font-size: clamp(.72rem, .5vw + .6rem, .9rem);
  color: var(--royal-700);
}
.hero__date-num {
  font-family: var(--serif); font-size: 1.5em; letter-spacing: .12em;
  color: var(--gold-deep); text-transform: none; font-weight: 500;
}
.hero .btn--gold { margin-top: clamp(1.4rem, 3vh, 2rem); }
.hero .divider { margin: clamp(1rem, 2.5vh, 1.6rem) auto; }


/* scroll cue */
.scroll-cue {
  margin-top: clamp(1.5rem, 3.5vh, 2.6rem);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  font-family: var(--label); text-transform: none; font-variant: small-caps; letter-spacing: .25em;
  font-size: .65rem; color: var(--royal-700); opacity: .75;
}
.scroll-cue__line { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: cueDrop 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cueDrop { 0%,100%{ transform: scaleY(.4); opacity:.4 } 50%{ transform: scaleY(1); opacity:1 } }
/* on very short screens, drop the cue rather than crowd the button */
@media (max-height: 640px) { .scroll-cue { display: none; } }

/* ============================================================
   Generic sections
   ============================================================ */
.section { padding: clamp(4.5rem, 11vw, 9rem) var(--safe); position: relative; }
.section--dark {
  background:
    radial-gradient(90% 120% at 50% 0%, var(--royal-700), var(--royal-800) 55%, var(--royal-900));
  color: var(--text-dark);
}
.section--dark::before, .section--dark::after {
  content:""; position:absolute; left:0; right:0; height:1px;
  background: linear-gradient(90deg, transparent, rgba(193,160,74,.45), transparent);
}
.section--dark::before { top: 0; }
.section--dark::after { bottom: 0; }

/* Venue photo backdrop — the photo sits beneath a royal-blue scrim so gold/ivory
   text stays legible. Each section sets its own --bg-photo (see index.html).
   With no photo it falls back to solid navy, so nothing ever looks broken. */
.section--photo {
  background:
    linear-gradient(180deg, rgba(248,245,236,.62), rgba(248,245,236,.5)),
    var(--bg-photo, none) center / cover no-repeat fixed,
    var(--ivory);
  color: var(--text);
}
@media (max-width: 768px) {
  .section--photo { background-attachment: scroll; } /* smoother on iOS/Android */
}

/* ============================================================
   VERSE
   ============================================================ */
.verse {
  background: linear-gradient(180deg, var(--parchment), var(--ivory-soft));
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
.verse__inner { max-width: 880px; margin: 0 auto; text-align: center; }
.verse__ar {
  font-family: var(--arabic); font-weight: 400;
  font-size: clamp(1.55rem, 4.2vw, 2.7rem); line-height: 1.9;
  color: var(--royal-700); margin: 1rem 0 2rem;
}
.verse__en {
  font-style: italic; font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  color: var(--text); max-width: 620px; margin: 0 auto 1.4rem; line-height: 1.6;
}
.verse__ref { font-family: var(--label); letter-spacing: .2em; text-transform: none; font-variant: small-caps; font-size: .8rem; color: var(--gold-deep); }

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown { text-align: center; }
.countdown__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(.7rem, 2.5vw, 2rem); max-width: 760px; margin: 0 auto; }
.count-cell {
  flex: 1 1 110px; max-width: 160px;
  padding: clamp(1.1rem, 3vw, 1.9rem) .5rem;
  border: 1px solid rgba(193,160,74,.5);
  border-radius: var(--r);
  background: linear-gradient(160deg, rgba(248,245,236,.82), rgba(248,245,236,.62));
  box-shadow: 0 18px 40px -28px rgba(18,32,58,.45);
  position: relative;
}
.count-cell::before {
  content:""; position:absolute; inset:6px; border:1px solid rgba(193,160,74,.3); border-radius: 1px; pointer-events:none;
}
.count-cell__num {
  display: block; font-size: clamp(2.4rem, 7vw, 4.2rem); font-weight: 300; line-height: 1;
  color: var(--royal-800); font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.count-cell__label { display: block; margin-top: .7rem; font-family: var(--label); text-transform: none; font-variant: small-caps; letter-spacing: .24em; font-size: .68rem; color: var(--gold-deep); }
.countdown__done { font-size: 1.6rem; font-style: italic; color: var(--royal-700); max-width: 600px; margin: 0 auto; }

/* ============================================================
   NOTE
   ============================================================ */
.note { background: var(--parchment); text-align: center; }
.note__inner { max-width: 760px; margin: 0 auto; color: var(--royal-700); }
.note__lead { font-size: clamp(1.5rem, 3.2vw, 2.4rem); font-weight: 400; line-height: 1.4; margin-bottom: 1.3rem; }
.note__body { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text); max-width: 600px; margin: 0 auto; }

/* ============================================================
   DETAILS cards
   ============================================================ */
.details__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.5vw, 2rem); max-width: 820px; margin: 0 auto; align-items: stretch; }
.card {
  text-align: center; padding: clamp(2rem, 4vw, 3rem) clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid rgba(193,160,74,.4);
  background: rgba(248,245,236,.74);
  box-shadow: 0 18px 44px -30px rgba(18,32,58,.45);
  color: var(--text);
  border-radius: var(--r); position: relative;
  display: flex; flex-direction: column; align-items: center; gap: .65rem;
  transition: transform .4s cubic-bezier(.2,.7,.3,1), border-color .4s, box-shadow .4s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(193,160,74,.75); box-shadow: 0 34px 64px -34px rgba(18,32,58,.45); }
.card--center { background: rgba(248,245,236,.88); border-color: rgba(193,160,74,.7); }
.card__icon { width: 36px; height: 36px; color: var(--gold-deep); margin-bottom: .4rem; }
.card__title { font-family: var(--label); text-transform: none; font-variant: small-caps; letter-spacing: .22em; font-size: .78rem; color: var(--gold-deep); font-weight: 400; }
.card__lead { font-size: 1.05rem; color: var(--text); line-height: 1.45; }
.card__big { font-size: 1.5rem; font-weight: 500; color: var(--royal-800); letter-spacing: .01em; }
.card__sub { color: var(--text); opacity: .8; font-size: 1rem; }

/* Venue/details over the venue photo: darker veil, NO boxes, clear light text */
/* Unified info card (eyebrow + title + date + venue all in one box) */
.details__card {
  max-width: 520px; margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 1.9rem) clamp(1.2rem, 3vw, 1.8rem);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  background: rgba(248,245,236,.55);
  border: 1px solid rgba(193,160,74,.45);
  border-radius: 10px;
  box-shadow: 0 18px 44px -30px rgba(18,32,58,.45);
  text-align: center;
}
.details__card .section__title,
body[data-lang="ar"] .details__card .section__title { margin: 0 0 .25rem; font-size: clamp(1.5rem, 4.4vw, 2.2rem); }
.details__card .eyebrow { margin-bottom: 0; }
.details__block { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.details__block + .details__block { padding-top: .55rem; border-top: 1px solid rgba(193,160,74,.3); margin-top: .1rem; width: 100%; }

/* Photo box below the card */
.details__photo {
  max-width: 520px; margin: clamp(1rem, 2.5vw, 1.6rem) auto 0;
  aspect-ratio: 786 / 590;   /* match the photo → whole building shown, no distortion */
  background-position: center; background-size: cover; background-repeat: no-repeat;
  border: 1px solid rgba(193,160,74,.4);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 18px 44px -30px rgba(18,32,58,.45);
}
.details__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Map button centered under the photo */
.details__map-wrap {
  display: flex; justify-content: center;
  margin: clamp(1.2rem, 3vw, 2rem) auto 0;
  max-width: 680px;
}
.card .btn { margin-top: .8rem; }

/* ============================================================
   PROGRAMME timeline
   ============================================================ */
.timeline { list-style: none; padding: 0; max-width: 620px; margin: 0 auto; position: relative; }
.timeline::before { content:""; position:absolute; left: 96px; top: 8px; bottom: 8px; width:1px; background: linear-gradient(var(--gold), rgba(193,160,74,.15)); }
.tl { display: grid; grid-template-columns: 84px 28px 1fr; align-items: center; gap: 0; padding: .95rem 0; }
.tl__time { font-family: var(--serif); font-size: 1.45rem; color: var(--royal-700); font-weight: 500; text-align: right; padding-right: 6px; letter-spacing: .02em; white-space: nowrap; }
.tl__mer { font-family: var(--label); font-size: .6rem; letter-spacing: .12em; margin-left: .25em; vertical-align: super; color: var(--gold-deep); }
.tl__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--gold); margin: 0 auto; box-shadow: 0 0 0 4px rgba(193,160,74,.18); position: relative; z-index: 1; }
.tl__label { font-size: 1.25rem; color: var(--text); padding-left: 6px; }

/* Groom's / Bride's house map buttons below the timeline */
.prog-locs {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 1.5rem 2.5rem; margin: 2.8rem auto 0; max-width: 620px;
}
.prog-loc { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.prog-loc__label {
  margin: 0; font-size: .95rem; letter-spacing: .18em;
  text-transform: none; font-variant: small-caps; color: var(--gold-deep);
}
body[data-lang="ar"] .prog-loc__label { letter-spacing: 0; text-transform: none; font-size: 1.2rem; }
.prog-loc__btn { min-width: 210px; }
.prog-loc__label { font-size: 1rem; }
body[data-lang="ar"] .prog-loc__label { font-size: 1.25rem; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery__grid {
  display: grid; gap: clamp(.7rem, 1.6vw, 1.2rem);
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--maxw); margin: 0 auto;
}
.frame { position: relative; overflow: hidden; border-radius: var(--r); border: 1px solid rgba(193,160,74,.3); margin: 0; aspect-ratio: 2 / 3; }
.frame--tall { grid-row: span 2; }
.frame--wide { grid-column: span 2; }
.frame__ph, .frame__img { width: 100%; height: 100%; object-fit: cover; }
.frame__ph {
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(193,160,74,.18), transparent 60%),
    linear-gradient(150deg, var(--royal-600), var(--royal-800));
}
.frame__mono { font-family: var(--serif); font-size: 2rem; letter-spacing: .08em; color: rgba(110,143,125,.55); }
.frame figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.4rem 1rem .8rem; text-align: center;
  font-family: var(--label); letter-spacing: .15em; text-transform: none; font-variant: small-caps; font-size: .7rem; color: var(--ivory);
  background: linear-gradient(transparent, rgba(14,26,48,.82));
  opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s;
}
.frame:hover figcaption { opacity: 1; transform: none; }
.frame .frame__ph, .frame .frame__img { transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.frame:hover .frame__ph, .frame:hover .frame__img { transform: scale(1.06); }

/* ============================================================
   RSVP
   ============================================================ */
.rsvp { background: linear-gradient(180deg, var(--ivory-soft), var(--parchment)); overflow: hidden; }
.rsvp__deadline { text-align: center; color: var(--text-muted); font-style: italic; margin-top: 1rem; font-size: 1.1rem; }
/* Match the RSVP section title to the deadline-line size */
#rsvp .section__title,
body[data-lang="ar"] #rsvp .section__title {
  font-size: 1.1rem;
  font-style: normal;
  margin: 0 0 .8rem;
}
.rsvp__invite {
  margin: 1.2rem auto 0; max-width: 560px;
  font-family: var(--serif), var(--arabic); font-size: 1.25rem; color: var(--royal-800);
  background: linear-gradient(180deg, rgba(248,245,236,.7), rgba(248,245,236,.45));
  border: 1px solid rgba(193,160,74,.45); border-radius: 14px;
  padding: .9rem 1.4rem; box-shadow: 0 6px 18px -12px rgba(18,32,58,.4);
  display: flex; flex-direction: column; gap: .25rem; text-align: center;
}
.rsvp__invite-line { font-size: 1.15em; }
.rsvp__invite-tag {
  font-size: .7em; letter-spacing: .2em; text-transform: none; font-variant: small-caps;
  color: var(--gold-deep); opacity: .82; text-align: center; margin-top: .1rem;
}
body[data-lang="ar"] .rsvp__invite-tag { letter-spacing: 0; text-transform: none; font-size: .85em; }
.rsvp__invite-count { font-size: .9em; color: var(--gold-deep); text-align: center; }

.rsvp__form {
  max-width: 680px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 1.4rem;
  background: rgba(248,245,236,.4);
  border: 1px solid rgba(193,160,74,.35);
  border-radius: var(--r);
  padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: var(--shadow-card);
  position: relative;
}
.field { display: flex; flex-direction: column; gap: .5rem; }
.field--full { grid-column: 1 / -1; }
.field label, .field__label {
  font-family: var(--label); letter-spacing: .14em; text-transform: none; font-variant: small-caps;
  font-size: .72rem; color: var(--gold-deep);
}
.field__opt { text-transform: none; letter-spacing: 0; font-style: italic; color: var(--text-muted); font-family: var(--serif); }
.field input, .field select, .field textarea {
  font-family: var(--serif); font-size: 1.1rem; color: var(--ink);
  background: rgba(248,245,236,.7);
  border: 1px solid rgba(18,32,58,.3);
  border-radius: var(--r); padding: .8em .9em;
  transition: border-color .3s, box-shadow .3s, background .3s;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 3.2em; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(193,160,74,.18); background: #FBF9F2;
}
.field__err { color: #9c3a2e; font-size: .85rem; font-style: italic; display: none; }
.field.is-invalid .field__err { display: block; }
.field.is-invalid input, .field.is-invalid select { border-color: #b5483a; }

/* Guests number picker: plain legible figures — the serif made "1" look like "I" */
#guests { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: .04em; }
#guests option { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 1rem; color: var(--ink); background: #FBF9F2; }

/* ---------- Fancy custom dropdown (replaces the native guests <select> UI) ---------- */
.cselect { position: relative; }
.cselect__native {                                   /* keep the real <select> for the form value, visually hidden */
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.cselect__trigger {
  position: relative; width: 100%; display: block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.1rem; letter-spacing: .04em; color: var(--ink); text-align: center;
  background: linear-gradient(180deg, rgba(248,245,236,.85), rgba(248,245,236,.7));
  border: 1px solid rgba(193,160,74,.5); border-radius: var(--r);
  padding: .8em 2.5em; cursor: pointer;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.cselect__value { display: inline-block; }
.cselect__trigger .cselect__chev { position: absolute; inset-inline-end: .95em; top: 50%; transform: translateY(-50%); }
.cselect.is-open .cselect__trigger .cselect__chev { transform: translateY(-50%) rotate(180deg); }
.cselect__trigger:hover { border-color: var(--gold); }
.cselect.is-open .cselect__trigger,
.cselect__trigger:focus-visible {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(193,160,74,.2); background: #FBF9F2; outline: none;
}
.cselect__chev { width: .85em; height: .85em; flex: none; color: var(--gold-deep); transition: transform .28s ease; }
.cselect.is-open .cselect__chev { transform: rotate(180deg); }

.cselect__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 7px); z-index: 40;
  margin: 0; padding: .35rem; list-style: none;
  background: linear-gradient(180deg, #fffdf7, var(--parchment));
  border: 1px solid rgba(193,160,74,.55); border-radius: 10px;
  box-shadow: 0 22px 48px -20px rgba(18,32,58,.5), inset 0 0 0 1px rgba(248,245,236,.5);
  max-height: 260px; overflow: auto;
  opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top center; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.cselect.is-open .cselect__list { opacity: 1; transform: none; pointer-events: auto; }
.cselect__opt {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.05rem; letter-spacing: .04em; color: var(--ink);
  padding: .62em .85em; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .15s ease, color .15s ease;
}
.cselect__opt:hover, .cselect__opt.is-active {
  background: linear-gradient(90deg, rgba(193,160,74,.22), rgba(193,160,74,.08));
  color: var(--royal-800);
}
.cselect__opt[aria-selected="true"] { color: var(--royal-800); }
.cselect__opt[aria-selected="true"]::after { content: "✓"; color: var(--gold-deep); font-size: .95em; margin-left: .6em; }

/* attendance choice */
.choice { display: flex; gap: 1rem; flex-wrap: wrap; }
.choice__opt { flex: 1 1 180px; cursor: pointer; }
.choice__opt input { position: absolute; opacity: 0; pointer-events: none; }
.choice__box {
  display: block; text-align: center; padding: .95em 1em;
  border: 1px solid rgba(18,32,58,.35); border-radius: var(--r);
  font-family: var(--label); letter-spacing: .08em; font-size: .82rem; text-transform: none; font-variant: small-caps;
  color: var(--text); background: rgba(248,245,236,.5);
  transition: all .3s;
}
.choice__opt:hover .choice__box { border-color: var(--gold); }
.choice__opt input:checked + .choice__box {
  background: linear-gradient(135deg, var(--royal-700), var(--royal-800)); color: #F1ECDA !important;
  border-color: var(--royal-700); box-shadow: 0 10px 22px -12px rgba(18,35,63,.55);
}
.choice__opt input:focus-visible + .choice__box { box-shadow: 0 0 0 3px rgba(193,160,74,.3); }

/* confirmation */
.rsvp__thanks { max-width: 600px; margin: 0 auto; text-align: center; padding: clamp(2rem,5vw,3.5rem) 1rem; }
.rsvp__check { width: 84px; height: 84px; color: var(--gold-deep); margin: 0 auto 1.5rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rsvp__check circle { stroke-dasharray: 233; stroke-dashoffset: 233; animation: drawCircle .7s ease forwards; }
.rsvp__check path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: drawCheck .5s ease .55s forwards; }
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.rsvp__thanks-title { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 400; color: var(--royal-700); line-height: 1.25; margin-bottom: .8rem; }
.rsvp__thanks-sub { color: var(--text); font-size: 1.15rem; margin-bottom: 2rem; }
.rsvp__thanks-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* "Adults only" note — a gracious line above the RSVP form */
.note-adults {
  max-width: 42ch; margin: 0 auto clamp(1.6rem, 4vw, 2.4rem);
  text-align: center; font-style: italic; line-height: 1.65;
  color: var(--gold-deep) !important; font-size: 1.05rem;
  padding-top: 1.2rem;
}
.note-adults::before {
  content: "❧"; display: block; font-style: normal;
  color: var(--gold) !important; font-size: 1.2rem; margin-bottom: .5rem; opacity: .95;
}
body[data-lang="ar"] .note-adults { font-style: normal; font-size: 1.2rem; line-height: 1.9; max-width: 40ch; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--royal-900); color: var(--text-dark);
  text-align: center; padding: clamp(3.5rem, 8vw, 6rem) var(--gut) 3rem;
  /* Sit above the floral frame (z-index:4) so the navy band cuts the side
     border off cleanly at the footer's top edge — florals don't run onto it. */
  position: relative; z-index: 5;
}
.footer__mono { font-family: var(--display-en); font-size: 3.6rem; color: var(--ivory); margin-bottom: 1.2rem; display: inline-flex; align-items: baseline; }
.footer__sep { color: var(--gold-bright); opacity: .85; margin: 0 .5em; }
.footer__names { font-family: var(--display-en); color: var(--ivory-soft); letter-spacing: 0; font-size: 1.55rem; }
.footer__names[lang="ar"] { font-family: var(--arabic); font-size: 1.4rem; letter-spacing: .02em; }
.footer__names[lang="ar"] { font-family: var(--arabic); font-size: 1.4rem; margin-top: .3rem; color: var(--gold-bright); }
.footer__tag { font-family: var(--label); text-transform: none; font-variant: small-caps; letter-spacing: .25em; font-size: .78rem; color: var(--gold); margin-top: .4rem; }
.footer__hash { font-family: var(--label); letter-spacing: .12em; color: var(--text-muted); margin-top: .6rem; font-size: .9rem; }

/* Simple footer (just the names) — navy background */
.footer--simple {
  background: var(--royal-900);
  padding: clamp(2.5rem, 6vw, 4rem) var(--safe);
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
}
.footer--simple .footer__names { color: var(--ivory); font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
.footer--simple .footer__names[lang="ar"] { color: var(--sage-soft); }
.footer--simple .footer__names[lang="ar"] { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-top: 0; }

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal-on-scroll { opacity: 0; transform: translateY(26px); }
/* Hero reveals stay hidden only while the JS intro is in play; they animate in
   once the envelope is dismissed (body.go is added). No-JS => visible at once. */
html.js .reveal { opacity: 0; transform: translateY(26px); }
body.go .reveal { animation: rise .9s cubic-bezier(.2,.7,.3,1) forwards; animation-delay: .15s; }
body.go .reveal[data-delay="1"] { animation-delay: .35s; }
body.go .reveal[data-delay="2"] { animation-delay: .55s; }
body.go .reveal[data-delay="3"] { animation-delay: .75s; }
body.go .reveal[data-delay="4"] { animation-delay: .95s; }
body.go .reveal[data-delay="5"] { animation-delay: 1.2s; }
.reveal-on-scroll.is-visible { animation: rise .9s cubic-bezier(.2,.7,.3,1) forwards; }
.reveal-on-scroll.is-visible[data-delay="1"] { animation-delay: .12s; }
.reveal-on-scroll.is-visible[data-delay="2"] { animation-delay: .24s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ============================================================
   RTL / Arabic mode
   ============================================================ */
body[data-lang="ar"] { font-family: var(--arabic); font-weight: 400; }
/* Aref Ruqaa only ships 400 & 700 — keep all Arabic at the regular weight so it
   never renders heavy/chunky (default-bold headings would otherwise jump to 700). */
body[data-lang="ar"] h1, body[data-lang="ar"] h2, body[data-lang="ar"] h3, body[data-lang="ar"] h4,
body[data-lang="ar"] .section__title, body[data-lang="ar"] .note__lead, body[data-lang="ar"] .rsvp__thanks-title,
body[data-lang="ar"] strong, body[data-lang="ar"] b, body[data-lang="ar"] .frame__mono {
  font-weight: 400;
}
.intro__welcome-ar, .footer__names[lang="ar"], .rsvp__invite { font-weight: 400; }
body[data-lang="ar"] .eyebrow,
body[data-lang="ar"] .btn,
body[data-lang="ar"] .nav a,
body[data-lang="ar"] .card__title,
body[data-lang="ar"] .field label,
body[data-lang="ar"] .field__label,
body[data-lang="ar"] .choice__box,
body[data-lang="ar"] .count-cell__label,
body[data-lang="ar"] .footer__tag,
body[data-lang="ar"] .verse__ref { font-family: var(--arabic); letter-spacing: 0; text-transform: none; }
body[data-lang="ar"] .verse__en { display: none; }   /* AR mode: verse is complete; no English line */
body[data-lang="ar"] .section__title,
body[data-lang="ar"] .note__lead,
body[data-lang="ar"] .rsvp__thanks-title { font-family: var(--arabic-display); }
body[data-lang="ar"] .eyebrow {
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--arabic);
  font-size: clamp(1rem, 2vw + .6rem, 1.45rem);
}
html[dir="rtl"] .timeline::before { left: auto; right: 96px; }
html[dir="rtl"] .tl { grid-template-columns: 84px 28px 1fr; }
html[dir="rtl"] .tl__time  { grid-column: 1; text-align: left; padding-right: 0; padding-left: 6px; }
html[dir="rtl"] .tl__dot   { grid-column: 2; }
html[dir="rtl"] .tl__label { grid-column: 3; text-align: right; padding-left: 0; padding-right: 6px; }
html[dir="rtl"] .tl__mer { margin-left: 0; margin-right: .25em; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .nav a:not(.nav__cta) { display: none; }
  .details__grid { grid-template-columns: 1fr; max-width: 460px; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .rsvp__form { grid-template-columns: 1fr; }
  .count-cell { flex-basis: 38%; }
  /* corner branches — sized to frame the photo without being cut off */
  .timeline::before { left: 78px; }
  .tl { grid-template-columns: 66px 24px 1fr; }
  .tl__time { font-size: 1.2rem; }
  html[dir="rtl"] .timeline::before { right: 78px; }
  html[dir="rtl"] .tl { grid-template-columns: 66px 24px 1fr; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-on-scroll { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   Intro — tap-to-open envelope (flap opens, card slides out)
   ============================================================ */
#intro { display: none; }
html.intro-lock { overflow: hidden; }
html.js #intro {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 9999; cursor: pointer;
  background: var(--parchment); overflow: hidden;
  transition: opacity .9s ease;
}
#intro.is-gone { opacity: 0; pointer-events: none; }

/* full-bleed intro video (first 4s only — capped in script.js) */
.intro__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; background: transparent;
  transition: opacity .5s ease; will-change: opacity, transform;
  animation: introDrift 7s ease-in-out infinite;   /* gentle floating */
}
.intro__video.vidB { opacity: 0; }                  /* second crossfade layer starts hidden */
@keyframes introDrift {
  0%, 100% { transform: scale(1.02) translateY(0); }
  50%      { transform: scale(1.05) translateY(-1.1%); }
}

/* personalized welcome on the intro — EN then AR, both dark navy, same size */
.intro__welcome {
  display: none;   /* greeting overlay removed — keep the video clean */
  position: absolute; left: 0; right: 0; top: auto; bottom: clamp(8%, 11vh, 13%);
  z-index: 2; text-align: center; padding: 0 1.4rem; pointer-events: none;
  flex-direction: column; align-items: center; gap: .3rem;
  transition: opacity .4s ease;
}
.intro__welcome-en, .intro__welcome-ar {
  margin: 0; color: var(--royal-900);
  font-size: clamp(1rem, 2.7vw, 1.5rem); line-height: 1.3; max-width: min(92vw, 42ch);
  text-shadow: 0 1px 18px rgba(248,245,236,.6), 0 0 2px rgba(248,245,236,.55);
}
.intro__welcome-en { font-family: var(--serif); font-weight: 600; }
.intro__welcome-ar { font-family: var(--arabic); font-weight: 400; line-height: 1.55; }

/* soft white botanical backdrop */
.intro__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 110% at 22% 18%, #FBF9F2 0%, rgba(248,245,236,0) 55%),
    radial-gradient(90% 80% at 82% 92%, rgba(111,143,125,.10) 0%, rgba(248,245,236,0) 60%),
    linear-gradient(160deg, #FBF9F2 0%, var(--parchment) 45%, var(--ivory) 100%);
}
/* flowing gold contour lines — gently pulsing glow */
.intro__waves {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
  pointer-events: none;
  animation: wavePulse 4.5s ease-in-out infinite;
}
@keyframes wavePulse {
  0%, 100% { opacity: .5;  filter: drop-shadow(0 0 0 rgba(227,198,132,0)); }
  50%      { opacity: 1;   filter: drop-shadow(0 0 5px rgba(227,198,132,.6)); }
}

/* the envelope */
.intro__stage { position: relative; z-index: 1; perspective: 1500px; padding: 1.5rem; transform: translateY(-7%); }
.env {
  position: relative; width: min(92vw, 710px); aspect-ratio: 1.5 / 1;
  transform-style: preserve-3d; transform: rotateX(4deg);
  filter: drop-shadow(0 40px 64px rgba(18,32,58,.26));
  animation: envIn 1s cubic-bezier(.2,.7,.3,1) both, envFloat 4.5s ease-in-out 1s infinite;
}
@keyframes envIn { from { opacity: 0; transform: translateY(22px) rotateX(4deg) scale(.94); } to { opacity: 1; transform: rotateX(4deg); } }
@keyframes envFloat { 0%,100% { transform: rotateX(4deg) translateY(0); } 50% { transform: rotateX(4deg) translateY(-9px); } }
.env > * { position: absolute; }

/* back panel of the envelope */
.env__back {
  inset: 0; border-radius: 9px; z-index: 0;
  background: linear-gradient(158deg, #FBF9F2, #f2e8d5);
  box-shadow: inset 0 0 0 1px rgba(193,160,74,.5), inset 0 0 18px rgba(18,32,58,.06);
}
.env__back::after { content: ""; position: absolute; inset: 9px; border-radius: 5px; border: 1px solid rgba(193,160,74,.45); }

/* the card that slides out */
.env__letter {
  left: 7%; right: 7%; top: 9%; height: 82%; border-radius: 6px; z-index: 1;
  background: linear-gradient(180deg, #FBF9F2, #faf4e9); border: 1px solid rgba(193,160,74,.4);
  box-shadow: 0 8px 20px -12px rgba(18,32,58,.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  transition: transform 1.05s cubic-bezier(.45,0,.15,1) .5s, box-shadow .6s ease .5s;
}
.env__letter-mono { font-family: var(--serif); font-size: clamp(2rem, 8vw, 3rem); color: var(--royal-800); letter-spacing: .03em; line-height: 1; }
.env__letter-mono .amp { color: var(--gold-deep); font-style: italic; }
.env__letter-sub { font-family: var(--label); text-transform: none; font-variant: small-caps; letter-spacing: .34em; font-size: .62rem; color: var(--gold-deep); }

/* front pocket (hides the card until it lifts out) */
.env__pocket {
  left: 0; right: 0; bottom: 0; height: 64%; border-radius: 0 0 9px 9px; z-index: 3;
  background: linear-gradient(158deg, #f2e8d5, #e9d9bf);
  box-shadow: inset 0 2px 6px rgba(248,245,236,.5), inset 0 -10px 22px rgba(18,32,58,.07), 0 -1px 0 rgba(193,160,74,.3);
}
.env__pocket::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 100' preserveAspectRatio='none'%3E%3Cpath d='M1 100 L75 30 L149 100' fill='none' stroke='%23000' stroke-opacity='0.06' stroke-width='0.8'/%3E%3Cpath d='M1 99 L75 29' stroke='%23fff' stroke-opacity='0.4' stroke-width='0.5'/%3E%3Cpath d='M149 99 L75 29' stroke='%23fff' stroke-opacity='0.4' stroke-width='0.5'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}

/* top flap */
.env__flap {
  top: 0; left: 0; right: 0; height: 50%; z-index: 4;
  background: linear-gradient(168deg, #fffdf8, #efe2c9);
  box-shadow: inset 0 3px 5px rgba(248,245,236,.4), inset 0 -4px 9px rgba(18,32,58,.08);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center; transform: rotateX(0deg);
  transition: transform .85s cubic-bezier(.6,.02,.2,1);
  filter: drop-shadow(0 7px 8px rgba(18,32,58,.16));
}

/* wax seal on the flap tip — circular, monogram pressed into the wax */
.env__seal {
  left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 5;
  width: clamp(58px, 17%, 132px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; white-space: nowrap; line-height: 1;
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.05rem, 2.6vw, 2.15rem); letter-spacing: .02em;
  color: rgba(238,241,248,.92) !important;          /* light initials embossed on the navy wax */
  text-shadow: 0 1px 1px rgba(0,0,0,.5), 0 -1px 1px rgba(248,245,236,.15); /* pressed-in relief */
  background: radial-gradient(circle at 40% 34%, #e3c684 0%, #c1a04a 46%, #8a6a1f 100%);
  box-shadow: inset 0 3px 6px rgba(248,245,236,.18), inset 0 -6px 12px rgba(0,0,0,.45), 0 6px 14px rgba(18,32,58,.4);
  transition: transform .5s cubic-bezier(.4,0,.2,1), opacity .45s ease;
}
.env__seal .amp { color: rgba(238,241,248,.92) !important; font-style: italic; }
.env__seal::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.25); box-shadow: inset 0 1px 2px rgba(0,0,0,.45), inset 0 -1px 1px rgba(248,245,236,.12); }

/* tagline + hint */
.intro__copy { position: absolute; left: 0; right: 0; bottom: clamp(2%, 3vh, 4%); z-index: 2; text-align: center; padding: 0 1.5rem; }
.intro__tagline {
  font-family: "Pinyon Script", "Cormorant Garamond", cursive; font-weight: 400;
  font-size: clamp(2.1rem, 6.6vw, 3.7rem); line-height: 1.02; color: var(--royal-800);
  max-width: 18ch; margin: 0 auto; text-shadow: 0 1px 1px rgba(248,245,236,.6);
}
.intro__tagline-ar { font-family: var(--arabic); font-size: clamp(1rem, 2.8vw, 1.35rem); color: var(--gold-deep); margin-top: .4rem; }
.intro__hint {
  display: none;   /* "tap to open" hint removed per user — intro plays clean */
  font-family: var(--label); text-transform: none; font-variant: small-caps; letter-spacing: .32em;
  font-size: clamp(.85rem, 2.2vw, 1.05rem); color: var(--royal-700);
  margin: 0;
  text-shadow: 0 1px 8px rgba(248,245,236,.7);
  animation: hintPulse 1.9s ease-in-out infinite;
}
@keyframes hintPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* opening: flap lifts, seal fades, card slides up out of the pocket, then flash to page */
.intro__flash { position: absolute; inset: 0; background: #FBF9F2; opacity: 0; pointer-events: none; transition: opacity .7s ease; z-index: 10; }
#intro.is-opening { cursor: default; }
#intro.is-opening .env { animation: none; }
#intro.is-opening .env__flap { transform: rotateX(172deg); z-index: 0; }   /* drop behind the card so it can't clip the monogram */
#intro.is-opening .env__seal { transform: translate(-50%,-50%) scale(.35); opacity: 0; }
#intro.is-opening .env__letter { transform: translateY(-66%) scale(1.03); box-shadow: 0 38px 60px -24px rgba(18,32,58,.4); }
#intro.is-opening .intro__copy,
#intro.is-playing .intro__copy,
#intro.is-opening .intro__welcome,
#intro.is-playing .intro__welcome { opacity: 0; transition: opacity .4s ease; }
#intro.is-playing { cursor: default; }
#intro.is-opening .intro__waves { opacity: 0; transition: opacity .5s ease; animation: none; }
#intro.is-flashing .intro__flash { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .env, .intro__waves, .intro__video { animation: none !important; }
}

/* ============================================================
   LOCKED FONTS (Delft Garden)
   - English body: EB Garamond  ·  names + titles: Cormorant Garamond
   - Arabic: Reem Kufi everywhere
   - Deep navy ink on all text
   ============================================================ */
body, body *,
input, select, textarea, button, option {
  color: var(--ink) !important;
  font-family: "EB Garamond", Georgia, serif !important;
}
/* couple names, families, verse & section titles in deep navy */
body .hero__names, body .hero__names *,
body .hero__families,
body .verse__ar, body .verse__en, body .verse__ref,
body .section__title { color: var(--royal-800) !important; }
/* Couple's names + footer names — Cormorant Garamond display serif */
.hero__names, .hero__names *,
.footer--simple .footer__names,
.footer--simple .footer__names * {
  font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif !important;
  font-weight: 500;
}
/* All Arabic uses Katibeh (Reem Kufi as fallback; overrides the Marcellus default) */
body[data-lang="ar"], body[data-lang="ar"] *,
[lang="ar"], [lang="ar"] *,
.footer--simple [lang="ar"], .footer--simple [lang="ar"] * {
  font-family: "Katibeh", "Reem Kufi", sans-serif !important;
}
/* Couple's names + monogram: ALWAYS Cormorant Garamond, regardless of UI language.
   Higher specificity than the AR body override above, so it wins in Arabic mode too. */
body .hero__names, body .hero__names *,
html .monogram, html .monogram *,
body .footer--simple .footer__names:not([lang]),
body .footer--simple .footer__names:not([lang]) * {
  font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif !important;
  font-weight: 500;
}
/* Footer sits on a navy band → names must be light to read */
body .footer--simple .footer__names,
body .footer--simple .footer__names * { color: var(--ivory) !important; }
body .footer--simple .footer__names[lang="ar"],
body .footer--simple .footer__names[lang="ar"] * { color: #EFE7D2 !important; }

/* Hero intro: three stacked lines (بمشيئة الله / تتشرّف العائلتان / بدعوتكم) */
.hero__intro {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  margin: 0 auto 1.4rem; max-width: 60ch;
}
.hero__intro .eyebrow { margin: 0; line-height: 1.5; }
/* Family names — same display presence as the couple names (Parisienne in EN, Reem Kufi in AR) */
.hero__families {
  font-family: var(--display-en) !important;
  color: var(--gold-deep);
  line-height: 1.3; margin: .5rem 0 .6rem;
  font-size: clamp(1.7rem, 7.4vw, 4.2rem);   /* the two family names — larger, one line */
  word-spacing: .14em; white-space: nowrap;
}
body[data-lang="ar"] .hero__families { font-size: clamp(2rem, 9.5vw, 3.6rem); margin: .45rem 0 .55rem; word-spacing: .3em; }
/* Countdown heading fits on one line in Arabic */
body[data-lang="ar"] #countdown .section__title { font-size: clamp(1.4rem, 6.4vw, 4rem); white-space: nowrap; }
/* Reset color on decorative graphics so backgrounds/icons stay intact */
svg, .frame__ph, .intro__video, .intro__waves, .intro__bg { color: revert !important; }
/* The verse keeps gold */
.verse__ar, .verse__en, .verse__ref { color: var(--gold-deep) !important; }
input::placeholder, textarea::placeholder { color: var(--gold) !important; opacity: .6; }

/* Floating music mute/play button */
.music-toggle {
  position: fixed; z-index: 60; bottom: 18px; inset-inline-end: 18px;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(248,245,236,.9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(193,160,74,.55);
  box-shadow: 0 8px 20px -10px rgba(18,32,58,.45);
  cursor: pointer; transition: transform .3s, box-shadow .3s, opacity .3s;
}
.music-toggle[hidden] { display: none; }
.music-toggle svg { width: 22px; height: 22px; display: block; }
.music-toggle:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(18,32,58,.55); }
.music-toggle.is-off { opacity: .6; }
.music-toggle.is-off::after {
  content: ""; position: absolute; width: 30px; height: 2px;
  background: #9c7b30; transform: rotate(-45deg); border-radius: 2px; opacity: .95;
}

/* ============================================================
   Image placeholders — each slot shows what photo belongs there
   ============================================================ */
.img-ph {
  display: grid; place-items: center; text-align: center; gap: .5rem;
  padding: 1.6rem; width: 100%; min-height: 220px;
  color: var(--royal-700);
  background:
    repeating-linear-gradient(45deg, rgba(193,160,74,.035) 0 13px, rgba(193,160,74,.07) 13px 26px),
    var(--ivory);
  border: 1.5px dashed rgba(193,160,74,.45);
  border-radius: var(--r);
}
.img-ph__icon  { font-size: 1.8rem; line-height: 1; opacity: .6; }
.img-ph__label { font-family: var(--label); text-transform: none; font-variant: small-caps; letter-spacing: .2em; font-size: .74rem; }
.img-ph__hint  { font-family: var(--label); font-size: .72rem; color: var(--text-muted); max-width: 30ch; line-height: 1.55; }
.hero__photo--placeholder { border: none; box-shadow: none; max-width: min(320px, 82vw); }
.hero__photo--placeholder .img-ph { aspect-ratio: 4 / 5; min-height: 0; }

/* countdown optional-photo note */
.count-ph {
  margin: 2rem auto 0; max-width: 460px;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .7rem 1.3rem; border: 1.5px dashed rgba(193,160,74,.4); border-radius: 999px;
  font-family: var(--label); font-size: .72rem; letter-spacing: .14em; text-transform: none; font-variant: small-caps;
  color: var(--text-muted); background: rgba(248,245,236,.5);
}
.details__photo--placeholder { border: none; box-shadow: none; background: none; }
.details__photo--placeholder .img-ph { width: 100%; height: 100%; min-height: 0; }

/* ============================================================
   Floral frame — real painted assets (transparent PNG):
   navy anemones · white magnolias · eucalyptus · gold gilding.
   A fixed border around the whole invite: four corners + filled sides.
   ============================================================ */
/* anchored to the whole invitation (scrolls with the page, not the screen).
   NB: named .pageframe to avoid the gallery's .frame (aspect-ratio:2/3). */
.pageframe { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.pageframe span { position: absolute; display: block; }

/* ===== TOP arch (TOP.png) — anchored to the top of the first page ===== */
.deco-top {
  top: 0; left: 0; width: 100%;
  aspect-ratio: 1143 / 1572;
  background-image: url("images/deco-top.png?v=2");
  background-size: 100% auto; background-position: top center; background-repeat: no-repeat;
  opacity: .98;
}
/* ===== SIDE columns (deco-sides.png) — from within TOP down to the very bottom ===== */
.deco-sides {
  left: 0; right: 0;
  top: 92vw;               /* overlaps TOP's lower half so the sides connect with no gap */
  bottom: 0;
  /* seamless tile: the strip's bottom is cross-faded into its top, so it
     repeats with no hard line and no mirror-symmetry artifacts */
  background-image: url("images/deco-sides-seamless.png?v=2");
  background-size: 100% auto; background-position: top center;
  background-repeat: repeat-y;
  opacity: .96;
}
