/* ============================================================
   Raihan & Peni · V4 — "Playful Modern" (Bold · Fun · Ivory)
   Sticky video + soft black overlay · clip-path photo cutouts
   ============================================================ */
:root {
  --ivory: #f7f1e5;
  --ivory-2: #efe2cd;
  --gold: #d8c293;
  --gold-deep: #c8a96a;
  --dark-brown: #241811;
  --ink: #0c0a07;
  --ink-2: #1a110a;
  --muted: #e9e0d2;
  --col: 520px;
  --stage: 480px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --cg: "Cormorant Garamond", Georgia, serif;
  --mc: "Marcellus", "Cormorant Garamond", serif;
  --arabic: "Amiri", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); color: var(--ivory); background: var(--ink);
  line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; height: 100vh; }
body.is-locked .stage { opacity: 0; }
.music-btn[hidden], .fnav[hidden] { display: none !important; }
img { display: block; max-width: 100%; }

/* ---- background + overlay ---- */
.ambient {
  position: fixed; inset: 0; z-index: 0;
  background: var(--ink) url("assets/poster.jpg") center / cover no-repeat;
  filter: blur(16px) brightness(0.5) saturate(1.05); transform: scale(1.12);
}
.backdrop {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100vw, var(--col)); z-index: 1; overflow: hidden;
}
.backdrop-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.overlay { position: fixed; inset: 0; z-index: 2; pointer-events: none; background: rgba(8, 6, 4, 0.42); }
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 95; background: var(--ivory); }

/* ============================================================
   COVER
   ============================================================ */
.cover {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 40px 28px calc(40px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(20,12,7,0.35) 0%, rgba(20,12,7,0.2) 40%, rgba(20,12,7,0.86) 100%);
  transition: opacity 1s var(--ease), visibility 1s var(--ease);
}
.cover.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.cover-inner { position: relative; z-index: 2; max-width: var(--stage); width: 100%; }
.cover-overline { font-family: var(--mc); letter-spacing: 7px; text-transform: uppercase; font-size: 0.82rem; color: var(--muted); }
.ornament-divider { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); font-size: 0.7rem; letter-spacing: 4px; margin: 16px 0; }
.ornament-divider span { display: block; width: 46px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament-divider span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.cover-names { font-family: var(--cg); font-weight: 600; font-size: clamp(3.4rem, 16vw, 5.4rem); line-height: 0.98; color: var(--ivory); text-shadow: 0 6px 30px rgba(0,0,0,0.55); margin: 4px 0 10px; }
.cover-names em { display: block; font-style: italic; font-size: 0.42em; color: var(--gold); margin: 4px 0; }
.cover-date { font-family: var(--mc); letter-spacing: 3px; font-size: 1rem; color: var(--muted); }
.cover-guest { margin: 30px auto 26px; display: flex; flex-direction: column; gap: 3px; }
.cover-guest .kepada { font-size: 0.82rem; color: var(--muted); letter-spacing: 1px; }
.cover-guest .kepada-sub { font-size: 0.78rem; color: var(--muted); opacity: 0.8; }
.cover-guest strong { font-family: var(--cg); font-weight: 600; font-size: 1.6rem; color: var(--gold); margin-top: 8px; }
.cover-fade { position: absolute; inset: 0; pointer-events: none; }
.btn-open { background: linear-gradient(135deg, var(--gold-deep), var(--gold)) !important; color: var(--dark-brown) !important; box-shadow: 0 12px 30px rgba(200,169,106,0.35); }
.btn-ico { color: var(--dark-brown); font-size: 0.7rem; margin-right: 4px; }
.huge {
  font-family: var(--display); font-weight: 800; font-optical-sizing: auto;
  font-size: clamp(4rem, 22vw, 7rem); line-height: 0.86; letter-spacing: -2px;
  color: var(--ivory); margin: 16px 0; text-shadow: 0 10px 40px rgba(0,0,0,0.55);
}
.huge .amp { color: var(--gold); font-weight: 700; }
.huge.mid { font-size: clamp(3rem, 15vw, 4.6rem); }

/* ============================================================
   BUTTONS (chunky, bold)
   ============================================================ */
.btn {
  font-family: var(--sans); font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 0.92rem; color: var(--ink-2); background: var(--ivory);
  border: none; border-radius: 999px; padding: 16px 34px; cursor: pointer;
  box-shadow: 0 14px 34px rgba(0,0,0,0.4); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent; text-decoration: none; display: inline-block;
}
.btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 20px 44px rgba(0,0,0,0.5); }
.btn:active { transform: scale(0.97); }
.btn.sm { font-size: 0.82rem; padding: 13px 26px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.stage { position: relative; z-index: 3; max-width: var(--col); margin: 0 auto; transition: opacity 0.9s var(--ease) 0.2s; }
.sec {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 14vh 32px;
}
.wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.kicker { font-family: var(--sans); font-weight: 800; text-transform: uppercase; letter-spacing: 3px; font-size: 0.92rem; color: var(--gold); }
.arabic { font-family: var(--arabic); font-weight: 700; font-size: 1.9rem; color: var(--gold); line-height: 2; }
.salam { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.2; color: var(--ivory); }
.body { font-family: var(--sans); font-weight: 500; font-size: 1.06rem; color: var(--muted); max-width: 32ch; }
.muted { color: var(--muted); opacity: 0.85; }

/* verse */
.big-quote { font-family: var(--display); font-weight: 800; font-size: 4.5rem; line-height: 0.2; height: 34px; color: var(--gold); }
.verse { font-family: var(--display); font-weight: 500; font-size: 1.6rem; line-height: 1.45; color: var(--ivory); max-width: 22ch; }
.verse-ref { font-family: var(--sans); font-weight: 800; letter-spacing: 3px; font-size: 0.86rem; color: var(--gold); }

/* ---- couple ---- */
.profile { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ptag { font-family: var(--sans); font-weight: 800; text-transform: uppercase; letter-spacing: 4px; font-size: 0.84rem; color: var(--gold); }
.name { font-family: var(--display); font-weight: 800; font-size: 1.65rem; line-height: 1.12; color: var(--ivory); letter-spacing: -0.3px; }
.sub { font-family: var(--sans); font-weight: 500; font-size: 0.94rem; color: var(--muted); max-width: 26ch; }
.amp-big { font-family: var(--display); font-weight: 800; font-size: 4rem; color: var(--gold); line-height: 0.8; }

/* ---- CLIP-PATH PHOTO CUTOUTS (ivory sticker backing) ---- */
.clip { position: relative; width: min(70%, 280px); aspect-ratio: 4/5; margin: 0 auto 16px; }
.clip img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; box-shadow: 0 26px 54px rgba(0,0,0,0.5); }
.clip-bg { position: absolute; inset: 0; z-index: 0; background: var(--ivory); transform: translate(13px, 15px); }
.clip-arch img, .clip-arch .clip-bg { border-radius: 999px 999px 22px 22px; }
.clip-blob img, .clip-blob .clip-bg { border-radius: 42% 58% 63% 37% / 47% 42% 58% 53%; }
.clip-circle img, .clip-circle .clip-bg { border-radius: 50%; }
.tilt-l { transform: rotate(-3deg); }
.tilt-r { transform: rotate(3deg); }

/* ---- ticker ---- */
.ticker { overflow: hidden; padding: 24px 0; border-top: 2px solid rgba(216,194,147,0.3); border-bottom: 2px solid rgba(216,194,147,0.3); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker-row { display: flex; align-items: center; gap: 24px; width: max-content; animation: slideL 22s linear infinite; }
.ticker-row span { font-family: var(--display); font-weight: 800; font-size: 1.7rem; color: var(--ivory); white-space: nowrap; text-transform: uppercase; }
.ticker-row i { color: var(--gold); font-style: normal; font-size: 0.8rem; }
@keyframes slideL { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- event ---- */
.events { display: flex; flex-direction: column; gap: 14px; margin: 6px 0; width: 100%; align-items: center; }
.ev { background: rgba(247,241,229,0.08); border: 2px solid rgba(216,194,147,0.32); border-radius: 22px; padding: 18px 24px; min-width: 220px; }
.ev h3 { font-family: var(--display); font-weight: 800; font-size: 1.35rem; color: var(--ivory); }
.ev p { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; color: var(--gold); margin-top: 4px; }
.ev p.muted { font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.venue { font-family: var(--sans); font-weight: 700; font-size: 1.06rem; color: var(--ivory); }

/* ---- countdown ---- */
.countdown { display: flex; justify-content: center; gap: 12px; }
.cd-box { background: rgba(247,241,229,0.08); border: 2px solid rgba(216,194,147,0.3); border-radius: 20px; padding: 16px 10px; min-width: 70px; }
.cd-box strong { display: block; font-family: var(--display); font-weight: 800; font-size: 2.4rem; color: var(--ivory); line-height: 1; }
.cd-box span { font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.62rem; color: var(--gold); }
.countdown.is-done { font-family: var(--display); font-weight: 800; font-size: 2rem; color: var(--gold); }
.countdown-note { font-family: var(--sans); font-weight: 600; font-size: 0.84rem; color: var(--muted); }

/* ---- moments (single taped paper photo) ---- */
.collage { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 22px; margin-top: 18px; }
.collage.collage-single { display: block; }
.collage figure {
  position: relative;
  background: var(--ivory);
  padding: 12px 12px 34px;
  border-radius: 3px;
  box-shadow: 0 18px 34px rgba(0,0,0,0.5);
}
.collage .c-single {
  width: 100%;
  transform: rotate(-1.5deg);
}
.collage figure img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}
.collage .c-single img {
  aspect-ratio: 3 / 2;
}
/* the tape strip */
.collage figure::before {
  content: ""; position: absolute; z-index: 2;
  width: 78px; height: 26px; top: -12px; left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  background: linear-gradient(135deg, rgba(255,255,255,0.5), rgba(216,194,147,0.32));
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
.moment-heart {
  position: absolute;
  left: 50%;
  bottom: 5px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 38px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(26,17,10,0.28);
  transform: translateX(-50%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.moment-heart svg {
  width: 18px;
  height: 18px;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linejoin: round;
  fill: transparent;
  transition: color 0.2s ease, fill 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}
.moment-heart.is-liked {
  color: #ff3040;
}
.moment-heart.is-liked svg {
  fill: currentColor;
  filter: drop-shadow(0 3px 8px rgba(255,48,64,0.35));
}
.moment-heart.is-popping svg {
  animation: heartPop 0.34s cubic-bezier(.2, 1.45, .45, 1);
}
.moment-heart::before {
  content: "";
  position: absolute;
  inset: 4px 8px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
}
.moment-heart.is-popping::before {
  border: 1px solid rgba(255,48,64,0.45);
  animation: heartRing 0.42s ease-out;
}
@keyframes heartPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); }
  78% { transform: scale(0.94); }
  100% { transform: scale(1); }
}
@keyframes heartRing {
  0% { opacity: 0.7; transform: scale(0.45); }
  100% { opacity: 0; transform: scale(1.9); }
}
.collage figure:nth-child(3n+1) { transform: rotate(-3deg); }
.collage figure:nth-child(3n+2) { transform: rotate(2.5deg); }
.collage figure:nth-child(3n+3) { transform: rotate(-1deg); }
.collage figure:nth-child(even)::before { top: -10px; left: auto; right: 10px; width: 58px; transform: rotate(9deg); }

.strip { overflow: hidden; padding: 6px 0 30px; display: flex; flex-direction: column; gap: 14px; }
.strip[hidden] { display: none !important; }
.strip-row { display: flex; gap: 14px; width: max-content; animation: slideL 36s linear infinite; }
.strip-rev { animation: slideR 44s linear infinite; }
.strip-row img { height: 132px; width: 124px; object-fit: cover; border: 7px solid var(--ivory); border-bottom-width: 18px; border-radius: 3px; box-shadow: 0 12px 26px rgba(0,0,0,0.45); }
.strip-row img:nth-child(odd) { transform: rotate(-3deg); }
.strip-row img:nth-child(even) { transform: rotate(3deg); }
@keyframes slideR { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---- gift ---- */
.gift { background: linear-gradient(135deg, var(--ivory), var(--ivory-2)); border: none; border-left: 5px solid var(--gold-deep); border-radius: 18px; padding: 24px 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; box-shadow: 0 22px 46px rgba(0,0,0,0.45); position: relative; overflow: hidden; min-width: 260px; }
.gift::after { content: "BANK TRANSFER"; position: absolute; top: 14px; right: 16px; font-family: var(--sans); font-weight: 700; font-size: 0.58rem; letter-spacing: 2px; color: rgba(26,17,10,0.32); }
.gift-bank { font-family: var(--sans); font-weight: 800; text-transform: uppercase; letter-spacing: 3px; font-size: 1rem; color: #9a7322; }
.gift-no { font-family: var(--display); font-weight: 800; font-size: 2.3rem; letter-spacing: 3px; color: var(--ink-2); -webkit-text-fill-color: var(--ink-2); text-decoration: none; }
.gift-no a, .gift-no a:link, .gift-no a:visited { color: var(--ink-2) !important; -webkit-text-fill-color: var(--ink-2) !important; text-decoration: none !important; }
.gift-holder { font-family: var(--sans); font-weight: 600; font-size: 0.88rem; color: rgba(26,17,10,0.6); }
.copy-note { font-size: 0.84rem; font-weight: 700; color: var(--gold); min-height: 1.2em; }

/* ---- wishes ---- */
.wish-form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.wish-form input, .wish-form textarea {
  width: 100%; font-family: var(--sans); font-weight: 500; font-size: 0.96rem; color: var(--ink-2);
  background: rgba(247,241,229,0.92); border: none; border-radius: 16px; padding: 14px 16px; resize: vertical;
}
.wish-form input::placeholder, .wish-form textarea::placeholder { color: rgba(26,17,10,0.5); }
.wish-form input:focus, .wish-form textarea:focus { outline: 2px solid var(--gold); }
.form-error { color: #ffcdbd; font-weight: 600; font-size: 0.82rem; min-height: 1em; }
.wish-list { width: 100%; max-width: 360px; margin-top: 18px; display: flex; flex-direction: column; gap: 12px; max-height: 320px; overflow-y: auto; text-align: left; }
.wish-empty { font-size: 0.9rem; color: var(--muted); opacity: 0.85; text-align: center; }
.wish-item { background: rgba(247,241,229,0.08); border-radius: 16px; padding: 14px 16px; }
.wish-item h4 { font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--gold); }
.wish-item time { font-size: 0.66rem; color: var(--muted); opacity: 0.7; }
.wish-item p { font-family: var(--sans); font-weight: 500; font-size: 0.92rem; color: var(--muted); margin-top: 4px; }

.credit { margin-top: 22px; font-size: 0.74rem; font-weight: 600; letter-spacing: 1px; color: var(--muted); opacity: 0.75; }
.credit strong { color: var(--gold); }

/* ---- music + nav ---- */
.music-btn {
  position: fixed; z-index: 85; right: max(20px, calc(50vw - var(--col)/2 + 20px)); bottom: 82px;
  width: 48px; height: 48px; border: 2px solid rgba(216,194,147,0.5); border-radius: 50%;
  background: rgba(12,10,7,0.55); color: var(--ivory); font-size: 1.3rem; cursor: pointer; display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.music-btn.is-playing { animation: spin 5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fnav {
  position: fixed; z-index: 85; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: min(92vw, 380px); display: flex; justify-content: space-around;
  background: rgba(12,10,7,0.5); border: 1px solid rgba(216,194,147,0.3); border-radius: 999px; padding: 10px 8px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.fnav a { font-family: var(--sans); font-weight: 700; letter-spacing: 0.5px; font-size: 0.72rem; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color 0.25s ease; }
.fnav a:hover, .fnav a.active { color: var(--ivory); }

/* ---- motion ---- */
.reveal { opacity: 0; transform: translateY(26px); animation: rise 0.9s var(--ease) forwards; }
.reveal[data-d="1"] { animation-delay: 0.2s; }
.reveal[data-d="2"] { animation-delay: 0.4s; }
.reveal[data-d="3"] { animation-delay: 0.6s; }
.reveal[data-d="4"] { animation-delay: 0.85s; }
.reveal[data-d="5"] { animation-delay: 1.1s; }
.reveal[data-d="6"] { animation-delay: 1.35s; }
.reveal[data-d="7"] { animation-delay: 1.55s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
[data-rv] { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
[data-rv].is-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, [data-rv] { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
  .ticker-row, .strip-row { animation: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 380px) {
  .events { flex-direction: column; }
  .countdown { gap: 8px; }
  .cd-box { min-width: 62px; }
}

/* ---- v5 additions ---- */
/* framed boxes for Quran verse + event address */
.framed {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  border: 1.5px solid rgba(216,194,147,0.6);
  border-radius: 20px;
  padding: 32px 26px;
  background: rgba(12,10,7,0.3);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  position: relative;
}
.framed::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(216,194,147,0.28); border-radius: 14px; pointer-events: none; }

/* ghost button to Our Moments */
.moments-btn { background: transparent !important; color: var(--ivory) !important; border: 2px solid var(--gold) !important; box-shadow: none !important; }
.moments-btn:hover { background: rgba(216,194,147,0.16) !important; }

/* closing (v2 borderless style) */
.closing5 .cl-para { font-family: var(--sans); font-weight: 400; font-size: 1rem; color: var(--muted); max-width: 36ch; }
.closing5 .cl-salam { font-family: var(--cg); font-style: italic; font-weight: 500; font-size: 1.5rem; color: #fff; margin-top: 4px; }
.closing5 .cl-from { font-family: var(--sans); font-weight: 400; font-size: 0.9rem; color: var(--muted); margin-top: 8px; }
.closing5 .cl-names { font-family: var(--cg); font-weight: 600; font-size: clamp(2.8rem, 13vw, 4.2rem); line-height: 1.02; color: #fff; letter-spacing: 0.5px; margin-top: 2px; }
.closing5 .cl-names span { font-style: italic; font-weight: 500; color: var(--gold); padding: 0 4px; }
.closing5 .cl-credit { margin-top: 64px; font-size: 0.74rem; letter-spacing: 1px; color: var(--muted); opacity: 0.75; }
.closing5 .cl-credit strong { color: var(--gold); font-weight: 500; }
.ig-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--gold); text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.5px; transition: color 0.25s ease; }
.ig-link:hover { color: var(--ivory); }

/* ---- lightbox (tap to enlarge) ---- */
.clip img, .collage img, .strip-row img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(8,6,4,0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox.is-open { display: flex; animation: lbfade 0.3s var(--ease); }
@keyframes lbfade { from { opacity: 0; } to { opacity: 1; } }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,0.7); object-fit: contain; cursor: zoom-out; }
.lightbox-close { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(216,194,147,0.5); background: rgba(12,10,7,0.6); color: var(--ivory); font-size: 1.7rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
