/* =========================================================
   Faizan & Mahnoor — Imperial Emerald & Gold Calligraphy
   Quiet Luxury Stationery & Qalam Ink-Flow System
   ========================================================= */

:root {
  --bg: #0C2C1F;
  --bg-deep: #071D14;
  --bg-card: rgba(8, 32, 22, 0.78);
  --bg-glass: rgba(7, 29, 20, 0.84);
  --ivory: #F4EBD9;
  --champagne: #E4D0AA;
  --gold: #C9A45C;
  --gold-bright: #DFBE78;
  --gold-dim: rgba(201, 164, 92, 0.36);
  --gold-faint: rgba(201, 164, 92, 0.14);
  --ink-ease: cubic-bezier(0.25, 0.85, 0.35, 1);
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-caps: 'Cinzel', Georgia, serif;
  --font-script: 'Pinyon Script', 'Cormorant Garamond', cursive;
  --font-arabic: 'Aref Ruqaa', 'Amiri', serif;
  --font-quran: 'Amiri', Georgia, serif;
  --font-nastaliq: 'Noto Nastaliq Urdu', 'Amiri', serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg);
  color: var(--ivory);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(22, 74, 53, 0.42) 0%, transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(5, 20, 14, 0.85) 0%, transparent 75%),
    var(--bg);
  color: var(--ivory);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.locked {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* Subtle luxury paper grain overlay */
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%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");
}

/* Ambient golden dust canvas */
#gold-dust {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.65;
}

/* =========================================================
   Fixed Viewport Filigree Corner Frame
   ========================================================= */
.page-frame {
  position: fixed;
  inset: 12px;
  z-index: 5;
  pointer-events: none;
  border: 1px solid rgba(201, 164, 92, 0.22);
}

.page-frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(201, 164, 92, 0.1);
}

.corner-ornament {
  position: fixed;
  width: 68px;
  height: 68px;
  z-index: 6;
  pointer-events: none;
  opacity: 0.78;
}

.corner-ornament svg {
  width: 100%;
  height: 100%;
  display: block;
}

.corner-tl { top: 10px; left: 10px; }
.corner-tr { top: 10px; right: 10px; transform: scaleX(-1); }
.corner-bl { bottom: 10px; left: 10px; transform: scaleY(-1); }
.corner-br { bottom: 10px; right: 10px; transform: scale(-1, -1); }

@media (min-width: 640px) {
  .page-frame { inset: 20px; }
  .corner-ornament { width: 88px; height: 88px; }
  .corner-tl { top: 18px; left: 18px; }
  .corner-tr { top: 18px; right: 18px; }
  .corner-bl { bottom: 18px; left: 18px; }
  .corner-br { bottom: 18px; right: 18px; }
}

/* =========================================================
   Cover / Imperial Seal Overlay (Tap to Open)
   ========================================================= */
.cover-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 26px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(21, 70, 50, 0.52) 0%, rgba(12, 44, 31, 0.96) 62%, #071D14 100%),
    var(--bg);
  transition: opacity 1.25s var(--ink-ease), transform 1.35s var(--ink-ease), visibility 1.25s;
}

.cover-overlay.is-open {
  opacity: 0;
  transform: scale(1.045);
  visibility: hidden;
  pointer-events: none;
}

.cover-inner {
  position: relative;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cover-bismillah {
  font-family: var(--font-arabic);
  font-size: clamp(24px, 6vw, 32px);
  color: var(--champagne);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  opacity: 0;
  animation: gentleReveal 1.6s var(--ink-ease) 0.15s forwards;
}

.cover-presents {
  font-family: var(--font-caps);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  opacity: 0;
  animation: gentleReveal 1.4s var(--ink-ease) 0.35s forwards;
}

.seal-wrap {
  position: relative;
  width: clamp(188px, 46vw, 240px);
  height: clamp(188px, 46vw, 240px);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  opacity: 0;
  animation: gentleReveal 1.6s var(--ink-ease) 0.45s forwards;
}

.seal-medallion {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  mix-blend-mode: lighten;
  opacity: 0.92;
  -webkit-mask-image: radial-gradient(circle, #000 54%, transparent 71%);
  mask-image: radial-gradient(circle, #000 54%, transparent 71%);
  animation: slowRotate 70s linear infinite;
}

.seal-core {
  position: relative;
  z-index: 2;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 38, 27, 0.96) 0%, rgba(7, 29, 20, 0.98) 100%);
  border: 1px solid rgba(201, 164, 92, 0.65);
  box-shadow: 0 0 0 4px rgba(12, 44, 31, 0.85), 0 0 0 5px rgba(201, 164, 92, 0.28), 0 12px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.seal-monogram {
  font-family: var(--font-script);
  font-size: 30px;
  line-height: 1;
  color: var(--champagne);
  transform: translateY(2px);
}

.seal-urdu {
  font-family: var(--font-nastaliq);
  font-size: 10.5px;
  color: var(--gold);
  margin-top: 1px;
  white-space: nowrap;
  direction: rtl;
}

.cover-names {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 8.2vw, 46px);
  line-height: 1.12;
  letter-spacing: 0.04em;
  color: var(--ivory);
  margin-bottom: 10px;
  opacity: 0;
  animation: gentleReveal 1.6s var(--ink-ease) 0.6s forwards;
}

.cover-names .amp {
  font-family: var(--font-script);
  font-size: 1.08em;
  color: var(--gold-bright);
  padding: 0 6px;
}

.cover-date {
  font-family: var(--font-caps);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--champagne);
  opacity: 0;
  margin-bottom: 30px;
  animation: gentleReveal 1.5s var(--ink-ease) 0.78s forwards;
}

.open-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  border: 1px solid rgba(201, 164, 92, 0.7);
  background: linear-gradient(180deg, rgba(201, 164, 92, 0.14), rgba(201, 164, 92, 0.05));
  color: var(--ivory);
  font-family: var(--font-caps);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.25s ease;
  opacity: 0;
  animation: gentleReveal 1.4s var(--ink-ease) 0.95s forwards;
}

.open-btn::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(201, 164, 92, 0.26);
  pointer-events: none;
}

.open-btn:hover, .open-btn:focus-visible {
  background: rgba(201, 164, 92, 0.22);
  border-color: var(--gold-bright);
  outline: none;
}

.open-btn:active {
  transform: scale(0.98);
}

.cover-sound-hint {
  margin-top: 14px;
  font-size: 13px;
  font-style: italic;
  color: rgba(228, 208, 170, 0.65);
  opacity: 0;
  animation: gentleReveal 1.4s var(--ink-ease) 1.1s forwards;
}

/* =========================================================
   Floating Top Bar (Minimal & Translucent)
   ========================================================= */
.top-bar {
  position: fixed;
  top: 16px;
  left: 24px;
  right: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.top-bar.visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 640px) {
  .top-bar {
    top: 28px;
    left: 42px;
    right: 42px;
  }
}

.top-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 164, 92, 0.34);
  font-family: var(--font-caps);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--champagne);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.top-pill:hover {
  border-color: var(--gold-bright);
}

.sound-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.sound-bars span {
  width: 2px;
  background: var(--gold);
  height: 4px;
  border-radius: 1px;
  transition: height 0.25s ease;
}

.top-pill.playing .sound-bars span:nth-child(1) { animation: eq 0.9s ease-in-out infinite 0s; }
.top-pill.playing .sound-bars span:nth-child(2) { animation: eq 0.9s ease-in-out infinite 0.2s; }
.top-pill.playing .sound-bars span:nth-child(3) { animation: eq 0.9s ease-in-out infinite 0.4s; }

/* =========================================================
   Main Editorial Scroll Canvas
   ========================================================= */
.card-scroll {
  position: relative;
  z-index: 3;
  max-width: 680px;
  margin: 0 auto;
  padding: 84px 26px 156px;
  text-align: center;
}

@media (min-width: 640px) {
  .card-scroll {
    padding: 110px 44px 172px;
  }
}

.section {
  position: relative;
  padding: 44px 0;
}

#sec-bismillah {
  min-height: calc(100vh - 210px);
  min-height: calc(100dvh - 210px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section + .section {
  margin-top: 12px;
}

/* =========================================================
   Qalam Ink-Write Animation System
   ========================================================= */
.write-ltr,
.write-rtl {
  display: block;
  will-change: clip-path, opacity;
}

/* Smooth directional ink sweep with subtle fade */
.write-ltr {
  opacity: 0;
  clip-path: inset(-12% 100% -12% -2%);
  transition:
    clip-path var(--write-dur, 1.75s) var(--ink-ease) var(--write-delay, 0s),
    opacity 0.55s ease var(--write-delay, 0s);
}

.write-rtl {
  opacity: 0;
  clip-path: inset(-12% -2% -12% 100%);
  transition:
    clip-path var(--write-dur, 1.9s) var(--ink-ease) var(--write-delay, 0s),
    opacity 0.55s ease var(--write-delay, 0s);
}

.is-written .write-ltr,
.is-written .write-rtl {
  opacity: 1;
  clip-path: inset(-12% -2% -12% -2%);
}

.fade-soft {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 1.15s var(--ink-ease) var(--write-delay, 0s),
    transform 1.15s var(--ink-ease) var(--write-delay, 0s);
}

.is-written .fade-soft {
  opacity: 1;
  transform: none;
}

/* SVG stroke-dashoffset drawing for arches, dividers & flourishes */
.draw-svg path,
.draw-svg line,
.draw-svg circle,
.draw-svg polyline {
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-dashoffset var(--draw-dur, 2.2s) var(--ink-ease) var(--write-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .write-ltr, .write-rtl, .fade-soft {
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
    transition: none !important;
  }
  .draw-svg * {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
}

/* =========================================================
   Calligraphic Dividers & Persian Arch Motifs
   ========================================================= */
.arch-crown {
  width: min(260px, 72vw);
  margin: 0 auto 24px;
}

.arch-crown svg {
  width: 100%;
  height: auto;
  display: block;
}

.divider-ornament {
  width: min(240px, 68vw);
  margin: 26px auto;
}

.divider-ornament svg {
  width: 100%;
  height: auto;
  display: block;
}

.eyebrow {
  font-family: var(--font-caps);
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

/* =========================================================
   Section 1: Bismillah & Qur'anic Verse
   ========================================================= */
.bismillah-arabic {
  font-family: var(--font-arabic);
  font-size: clamp(28px, 7.5vw, 42px);
  line-height: 1.7;
  color: var(--champagne);
  margin-bottom: 10px;
}

.persian-blessing {
  font-family: var(--font-nastaliq);
  font-size: clamp(16px, 4vw, 20px);
  line-height: 2.1;
  color: var(--gold);
  margin-bottom: 18px;
}

.quran-arabic {
  font-family: var(--font-quran);
  font-size: clamp(20px, 5vw, 27px);
  line-height: 2;
  color: var(--ivory);
  margin: 0 auto 14px;
  max-width: 540px;
  direction: rtl;
}

.quran-translation {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(16px, 3.8vw, 19px);
  line-height: 1.75;
  color: var(--champagne);
  max-width: 500px;
  margin: 0 auto;
}

.quran-ref {
  font-family: var(--font-caps);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--gold);
  margin-top: 12px;
}

/* =========================================================
   Section 2: The Royal Invitation & Couple Names
   ========================================================= */
.hosts-block {
  font-family: var(--font-caps);
  font-size: clamp(12.5px, 3.3vw, 15px);
  letter-spacing: 0.18em;
  line-height: 1.9;
  color: var(--ivory);
  margin-bottom: 14px;
}

.invite-prose {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(17px, 4.1vw, 20px);
  line-height: 1.75;
  color: var(--champagne);
  max-width: 490px;
  margin: 0 auto 28px;
}

.couple-lockup {
  padding: 20px 10px;
}

.couple-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 8.2vw, 50px);
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: var(--ivory);
}

.couple-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: rgba(228, 208, 170, 0.82);
  margin-top: 4px;
}

.couple-with {
  font-family: var(--font-script);
  font-size: clamp(34px, 8vw, 44px);
  color: var(--gold-bright);
  line-height: 1.25;
  margin: 10px 0;
}

.family-message {
  max-width: 500px;
  margin: 26px auto 0;
  font-size: clamp(16.5px, 3.9vw, 18.5px);
  line-height: 1.85;
  color: rgba(244, 235, 217, 0.9);
}

/* =========================================================
   Section 3: Countdown Ribbon
   ========================================================= */
.countdown-panel {
  margin: 8px auto;
  padding: 26px 18px;
  border-top: 1px solid var(--gold-dim);
  border-bottom: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, rgba(201, 164, 92, 0.045), transparent, rgba(201, 164, 92, 0.045));
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 420px;
  margin: 14px auto 0;
}

.cd-cell {
  position: relative;
  padding: 8px 4px;
}

.cd-cell + .cd-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: rgba(201, 164, 92, 0.22);
}

.cd-num {
  font-family: var(--font-serif);
  font-size: clamp(28px, 7.5vw, 40px);
  font-weight: 400;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--ivory);
}

.cd-lbl {
  font-family: var(--font-caps);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--gold);
  margin-top: 6px;
}

/* =========================================================
   Section 4: Palace Etching & Event Plaques
   ========================================================= */
.palace-showcase {
  position: relative;
  width: min(600px, 100%);
  margin: 12px auto 34px;
}

.palace-showcase img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 84%, transparent 100%);
}

.events-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.event-plaque {
  position: relative;
  padding: 34px 22px 30px;
  background: linear-gradient(180deg, rgba(10, 39, 27, 0.86), rgba(7, 29, 20, 0.92));
  border: 1px solid rgba(201, 164, 92, 0.42);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.32), inset 0 0 0 5px rgba(12, 44, 31, 0.9), inset 0 0 0 6px rgba(201, 164, 92, 0.16);
}

@media (min-width: 640px) {
  .event-plaque {
    padding: 42px 38px 36px;
  }
}

.event-numeral {
  font-family: var(--font-caps);
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--gold);
  margin-bottom: 6px;
}

.event-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(30px, 7.5vw, 40px);
  letter-spacing: 0.04em;
  color: var(--ivory);
  line-height: 1.15;
}

.event-urdu {
  font-family: var(--font-nastaliq);
  font-size: 17px;
  color: var(--gold);
  line-height: 1.9;
  margin-top: 2px;
}

.event-date {
  font-family: var(--font-caps);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--champagne);
  margin-top: 14px;
}

.event-rule {
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 18px auto;
}

.event-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.event-slot {
  font-size: 17px;
  color: var(--ivory);
}

.event-slot strong {
  font-weight: 500;
  color: var(--champagne);
}

.sub-point {
  margin: 16px auto 18px;
  padding: 14px 16px;
  border-top: 1px solid rgba(201, 164, 92, 0.22);
  border-bottom: 1px solid rgba(201, 164, 92, 0.22);
  background: rgba(201, 164, 92, 0.04);
}

.sub-point-label {
  font-family: var(--font-caps);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--gold);
  margin-bottom: 4px;
}

.sub-point-addr {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--champagne);
  margin-bottom: 10px;
}

.venue-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(20px, 4.8vw, 24px);
  color: var(--ivory);
  letter-spacing: 0.02em;
}

.venue-addr {
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(228, 208, 170, 0.85);
  max-width: 420px;
  margin: 4px auto 0;
}

.awaiting-note {
  margin-top: 16px;
  font-style: italic;
  font-size: 16px;
  color: var(--gold-bright);
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

/* =========================================================
   Refined Buttons
   ========================================================= */
.btn-royal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 20px;
  border: 1px solid rgba(201, 164, 92, 0.56);
  background: rgba(201, 164, 92, 0.08);
  color: var(--ivory);
  font-family: var(--font-caps);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.btn-royal:hover, .btn-royal:focus-visible {
  background: rgba(201, 164, 92, 0.2);
  border-color: var(--gold-bright);
  outline: none;
}

.btn-royal:active {
  transform: scale(0.98);
}

.btn-royal.subtle {
  border-color: rgba(201, 164, 92, 0.32);
  background: transparent;
  color: var(--champagne);
}

.btn-royal.subtle:hover {
  background: rgba(201, 164, 92, 0.12);
}

/* =========================================================
   Section 5: R.S.V.P. & Looking Forward
   ========================================================= */
.rsvp-list {
  list-style: none;
  max-width: 460px;
  margin: 14px auto 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsvp-list li {
  font-size: clamp(16.5px, 4vw, 19px);
  color: var(--ivory);
  letter-spacing: 0.015em;
}

.rsvp-all {
  margin-top: 12px;
  font-style: italic;
  font-size: 17px;
  color: var(--champagne);
}

.looking-forward-card {
  margin-top: 34px;
  padding: 28px 20px;
  border: 1px solid rgba(201, 164, 92, 0.3);
  background: rgba(7, 29, 20, 0.65);
}

.lf-names {
  font-size: clamp(19px, 4.5vw, 23px);
  color: var(--ivory);
  line-height: 1.65;
  white-space: pre-line;
}

.lf-phone {
  font-family: var(--font-caps);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--gold-bright);
  margin: 10px 0 18px;
}

/* =========================================================
   Section 6: Scannable Venue QR Codes & Closing
   ========================================================= */
.qr-toggle-wrap {
  margin-top: 12px;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.qr-card {
  padding: 18px 14px;
  border: 1px solid rgba(201, 164, 92, 0.3);
  background: rgba(7, 29, 20, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-card-label {
  font-family: var(--font-caps);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--gold);
  margin-bottom: 4px;
}

.qr-card-venue {
  font-size: 16px;
  color: var(--ivory);
  margin-bottom: 12px;
}

.qr-box {
  padding: 8px;
  background: #F4EBD9;
  border: 1px solid var(--gold);
  margin-bottom: 10px;
}

.qr-box img,
.qr-box svg {
  display: block;
  width: 112px;
  height: 112px;
}

.closing-seal {
  margin-top: 44px;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing-etching {
  width: min(560px, 100%);
  margin: 14px auto 18px;
  position: relative;
}

.closing-etching img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: lighten;
  filter: brightness(0.88) contrast(1.18);
  -webkit-mask-image:
    radial-gradient(ellipse 88% 82% at 50% 50%, #000 62%, transparent 98%);
  mask-image:
    radial-gradient(ellipse 88% 82% at 50% 50%, #000 62%, transparent 98%);
}

.closing-medallion {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  mix-blend-mode: lighten;
  opacity: 0.85;
  -webkit-mask-image: radial-gradient(circle, #000 54%, transparent 72%);
  mask-image: radial-gradient(circle, #000 54%, transparent 72%);
  margin-bottom: 14px;
}

/* =========================================================
   Constant Travelling Couple Story Ribbon
   ========================================================= */
.story-ribbon {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  pointer-events: none;
  padding: 26px 22px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(
    to top,
    rgba(7, 29, 20, 0.96) 52%,
    rgba(7, 29, 20, 0.76) 80%,
    transparent 100%
  );
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ink-ease), transform 0.9s var(--ink-ease);
}

.story-ribbon.visible {
  opacity: 1;
  transform: none;
}

.story-caption {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  color: var(--champagne);
  text-align: center;
  margin-bottom: 4px;
  min-height: 20px;
  transition: opacity 0.35s ease;
}

.story-caption.switching {
  opacity: 0;
}

.story-stage {
  position: relative;
  max-width: 500px;
  width: 100%;
  height: 68px;
  margin: 0 auto;
}

.story-track {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 4px;
  height: 1px;
  background: rgba(201, 164, 92, 0.22);
}

.story-fill-left,
.story-fill-right {
  position: absolute;
  top: 0;
  height: 1px;
  width: 50%;
  background: linear-gradient(90deg, rgba(201, 164, 92, 0.25), var(--gold-bright));
  transform: scaleX(0);
}

.story-fill-left {
  left: 0;
  transform-origin: left center;
}

.story-fill-right {
  right: 0;
  transform-origin: right center;
  background: linear-gradient(270deg, rgba(201, 164, 92, 0.25), var(--gold-bright));
}

.story-spark {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 12px rgba(223, 190, 120, 0.9);
  transform: translate(-50%, 50%) scale(0);
  opacity: 0;
  transition: transform 0.6s var(--ink-ease), opacity 0.6s ease;
}

.story-ribbon.united .story-spark {
  transform: translate(-50%, 50%) scale(1);
  opacity: 1;
}

.story-walker {
  position: absolute;
  bottom: 4px;
  width: 62px;
  height: 62px;
  will-change: transform;
}

.story-walker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  mix-blend-mode: lighten;
  filter: brightness(0.84) contrast(1.26);
  -webkit-mask-image: radial-gradient(circle, #000 54%, transparent 74%);
  mask-image: radial-gradient(circle, #000 54%, transparent 74%);
}

.story-groom {
  left: 0;
}

.story-bride {
  right: 0;
}

@media (min-width: 640px) {
  .story-ribbon {
    padding: 28px 40px calc(18px + env(safe-area-inset-bottom));
  }
  .story-stage {
    height: 76px;
  }
  .story-walker {
    width: 70px;
    height: 70px;
  }
}

.closing-quote {
  font-style: italic;
  font-size: 18px;
  color: var(--champagne);
  margin-bottom: 10px;
}

.closing-names {
  font-family: var(--font-script);
  font-size: clamp(38px, 9vw, 52px);
  color: var(--ivory);
  line-height: 1.2;
}

.replay-link {
  margin-top: 22px;
  font-family: var(--font-caps);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--gold);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.replay-link:hover {
  opacity: 1;
}

/* =========================================================
   Keyframes
   ========================================================= */
@keyframes gentleReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slowRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes eq {
  0%, 100% { height: 4px; }
  50% { height: 11px; }
}
