@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Poppins:wght@300;400;500;600&family=Amiri:wght@400;700&display=swap');

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

:root {
  --bg:    #c2d9ea;
  --navy:  #1B3B6F;
  --navy2: #2a5298;
  --gold:  #c9a84c;
  --wa:    #25D366;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #8aaccb;
}

/* ── App shell ─────────────────────────────────── */
#app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  user-select: none;
  -webkit-user-select: none;
}

/* ── Story progress ────────────────────────────── */
#progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  gap: 3px;
  padding: 10px 12px 6px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.25), transparent);
}
.seg  { flex: 1; height: 2px; background: rgba(255,255,255,.35); border-radius: 2px; overflow: hidden; }
.fill { height: 100%; width: 0; background: #fff; border-radius: 2px; }
.seg.done .fill { width: 100%; }

/* ── Music button ──────────────────────────────── */
#music-btn {
  position: absolute;
  top: 22px; right: 14px;
  z-index: 51;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#music-btn:active { background: rgba(255,255,255,.4); }

/* ── Arrow hints ───────────────────────────────── */
.arr {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 36px; height: 64px;
  border-radius: 100px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity .35s, background .2s;
}
.arr:active { background: rgba(255,255,255,.35); }
.arr.hidden { opacity: 0 !important; pointer-events: none; }

.arr-l {
  left: 10px;
  transform: translateY(-50%);
  animation: nudgeL 2s ease-in-out infinite;
}
.arr-r {
  right: 10px;
  transform: translateY(-50%);
  animation: nudgeR 2s ease-in-out infinite;
}

@keyframes nudgeR {
  0%,100% { transform: translateY(-50%) translateX(0);   opacity: .75; }
  50%      { transform: translateY(-50%) translateX(5px); opacity: 1; }
}
@keyframes nudgeL {
  0%,100% { transform: translateY(-50%) translateX(0);    opacity: .75; }
  50%      { transform: translateY(-50%) translateX(-5px); opacity: 1; }
}

/* ── Slides container ──────────────────────────── */
#slides {
  position: absolute;
  inset: 0; /* full height — no nav bar */
}

/* ── Base slide ────────────────────────────────── */
.slide {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform .42s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.slide[data-state="active"] { transform: translateX(0); }
.slide[data-state="left"]   { transform: translateX(-100%); }
.slide[data-state="right"]  { transform: translateX(100%); }

.slide.scrollable {
  justify-content: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* ── Cover: full-bleed video ───────────────────── */
.cover-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ── Background decoration layer ──────────────── */
.bg-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.deco {
  position: absolute;
  animation: floatEl var(--dur,3s) var(--delay,0s) ease-in-out infinite;
}
@keyframes floatEl {
  0%,100% { transform: translateY(0) rotate(var(--rot,0deg)); }
  50%      { transform: translateY(-11px) rotate(var(--rot,0deg)); }
}

/* ── Slide inner: staggered entrance ───────────── */
.slide-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 52px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.slide-inner.centered {
  height: 100%;
  justify-content: center;
  padding-top: 32px;
}

.slide-inner > * { opacity: 0; }

@keyframes enterUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.slide-inner.entered > *:nth-child(1)  { animation: enterUp .4s .05s both; }
.slide-inner.entered > *:nth-child(2)  { animation: enterUp .4s .14s both; }
.slide-inner.entered > *:nth-child(3)  { animation: enterUp .4s .23s both; }
.slide-inner.entered > *:nth-child(4)  { animation: enterUp .4s .32s both; }
.slide-inner.entered > *:nth-child(5)  { animation: enterUp .4s .41s both; }
.slide-inner.entered > *:nth-child(6)  { animation: enterUp .4s .50s both; }
.slide-inner.entered > *:nth-child(7)  { animation: enterUp .4s .59s both; }
.slide-inner.entered > *:nth-child(8)  { animation: enterUp .4s .68s both; }
.slide-inner.entered > *:nth-child(9)  { animation: enterUp .4s .77s both; }
.slide-inner.entered > *:nth-child(10) { animation: enterUp .4s .86s both; }

/* ── Typography ────────────────────────────────── */
.arabic-lg {
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  line-height: 2.3;
  color: var(--navy);
  direction: rtl;
  margin-bottom: 12px;
}
.arabic-sm {
  font-family: 'Amiri', serif;
  font-size: .95rem;
  color: var(--navy);
  direction: rtl;
  line-height: 1.8;
  margin-bottom: 6px;
}
.arabic-sm.muted { opacity: .75; margin-bottom: 14px; }

.gold-rule { width: 56px; height: 1px; background: var(--gold); margin: 4px auto 10px; }

.verse-src {
  font-family: 'Poppins', sans-serif;
  font-size: .68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--navy);
  opacity: .55;
  margin-bottom: 12px;
}
.verse-tr {
  font-family: 'Poppins', sans-serif;
  font-size: .8rem;
  font-weight: 300;
  line-height: 1.75;
  color: #3a4a5a;
  font-style: italic;
}

.body-text {
  font-family: 'Poppins', sans-serif;
  font-size: .8rem;
  font-weight: 300;
  line-height: 1.7;
  color: #3a4a5a;
  margin-bottom: 12px;
}
.body-text.muted-sm { font-size: .75rem; color: #667; margin-bottom: 10px; }

.eyebrow {
  font-family: 'Poppins', sans-serif;
  font-size: .68rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--navy);
  opacity: .6;
  margin-bottom: 8px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 28px;
  line-height: 1.3;
}

/* ── Invitation ────────────────────────────────── */
.person-block { margin-bottom: 6px; width: 100%; }
.person-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.person-sub {
  font-family: 'Poppins', sans-serif;
  font-size: .72rem;
  font-weight: 300;
  color: #556;
  line-height: 1.5;
  margin-top: 3px;
}
.big-amp {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--gold);
  font-style: italic;
  margin: 6px 0;
}
.event-card {
  width: 100%;
  display: flex;
  border-radius: 14px;
  overflow: hidden;
  margin: 8px 0 12px;
}
.ev-left {
  flex: 1;
  background: var(--navy);
  color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 14px 8px; gap: 3px;
}
.ev-day      { font-family: 'Poppins', sans-serif; font-size: .68rem; letter-spacing: 1px; opacity: .75; }
.ev-date-num { font-family: 'Playfair Display', serif; font-size: .95rem; font-weight: 700; }
.ev-right {
  flex: 1.2;
  background: rgba(255,255,255,.5);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 14px 8px; gap: 3px;
}
.ev-venue { font-family: 'Poppins', sans-serif; font-size: .82rem; font-weight: 600; color: var(--navy); }
.ev-city  { font-family: 'Poppins', sans-serif; font-size: .7rem; color: #556; }
.note-italic {
  font-family: 'Poppins', sans-serif;
  font-size: .72rem;
  font-weight: 300;
  color: #667;
  line-height: 1.6;
  font-style: italic;
  padding-bottom: 80px; /* room for arrows */
}

/* ── Countdown ─────────────────────────────────── */
.cd-grid { display: flex; align-items: center; gap: 6px; margin-bottom: 22px; }
.cd-cell {
  min-width: 56px;
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.5);
  border-radius: 12px;
  padding: 10px 6px 8px;
}
.cd-cell b {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem; font-weight: 700;
  color: var(--navy); line-height: 1;
}
.cd-cell span { font-size: .56rem; letter-spacing: 1.5px; text-transform: uppercase; color: #778; margin-top: 5px; }
.cd-sep { font-size: 1.8rem; color: var(--navy); opacity: .4; margin-bottom: 18px; }
.date-line  { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--navy); font-weight: 700; margin-bottom: 4px; }
.venue-line { font-family: 'Poppins', sans-serif; font-size: .75rem; color: #667; font-weight: 300; }

/* ── Gift ──────────────────────────────────────── */
.bca-card {
  width: 100%;
  background: rgba(255,255,255,.6);
  border-radius: 16px;
  padding: 20px;
  margin: 4px 0 12px;
}
.bca-bank   { font-family: 'Poppins', sans-serif; font-size: .65rem; letter-spacing: 2.5px; font-weight: 600; color: #005a8e; margin-bottom: 6px; }
.bca-num    { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 700; color: var(--navy); letter-spacing: 2px; }
.bca-holder { font-family: 'Poppins', sans-serif; font-size: .7rem; color: #667; margin-top: 4px; letter-spacing: .5px; }
.action-col { display: flex; flex-direction: column; gap: 10px; width: 100%; padding-bottom: 80px; }
.copy-btn {
  background: var(--navy); color: #fff;
  border: none; border-radius: 50px;
  padding: 13px 24px;
  font-family: 'Poppins', sans-serif; font-size: .88rem; font-weight: 500;
  cursor: pointer; transition: background .2s;
}
.copy-btn:active { background: #0f2547; }
.copy-btn.copied { background: #2e7d32; }
.wa-btn {
  display: flex; align-items: center; justify-content: center;
  background: var(--wa); color: #fff;
  text-decoration: none; border-radius: 50px;
  padding: 13px 24px;
  font-family: 'Poppins', sans-serif; font-size: .88rem; font-weight: 500;
  transition: background .2s;
}
.wa-btn:active { background: #1aaa52; }

/* ── Closing ───────────────────────────────────── */
.big-name {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem; font-weight: 700;
  color: var(--navy); line-height: 1.1;
}
.serif-amp {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; color: var(--gold);
  font-style: italic; margin: 4px 0;
}
.rings { position: relative; width: 56px; height: 36px; margin: 20px auto 16px; }
.ring  { position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--gold); }
.r1 { top: 0; left: 0; }
.r2 { top: 0; left: 18px; opacity: .75; }
.closing-thanks {
  font-family: 'Poppins', sans-serif;
  font-size: .85rem; font-weight: 300;
  color: #3a4a5a; line-height: 1.6; margin-bottom: 12px;
}
