/* ════════════════════════════════════════════════════════════════════
   Pastel Dream Wedding — Card "Moonlit Petal"
   The invitation itself: a moonlit pastel dusk, delicate serif type,
   arch-framed couple portraits, love-story chapters and gallery.
   Single-viewport shell: only the active panel scrolls.

   Design tokens
   ─────────────────────────────────────────────────────────────────── */
:root{
  --blush:#f2b9c9;
  --blush-deep:#e896ab;
  --lavender:#c3aee2;
  --lavender-deep:#a98fd2;
  --powder:#b9d7ee;
  --sage:#cfe2d4;
  --gold:#c9a468;
  --ink:#5b4857;
  --ink-soft:#8b7486;
  --cream:#fffdf9;
  --hairline:rgba(157,133,173,.28);
  --card:#ffffff;

  --sky-top:#fdf3f8;
  --sky-mid:#f3e4f5;
  --sky-low:#dccdf0;
  --sky-bottom:#bfd4ee;

  --font-display:"Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-script:"Great Vibes", "Brush Script MT", cursive;
  --font-body:"Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius:24px;
  --ease:cubic-bezier(.22,.61,.36,1);
}

/* ── Reset / base ─────────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--font-body);
  font-weight:300;
  color:var(--ink);
  background:var(--cream);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block;}
a{color:inherit;}
button{font-family:inherit;}
h1,h2,h3,p,blockquote{margin:0;}
[hidden]{display:none !important;}

/* ── No-JS default: panels stack as a normal scrollable page ──────── */
.app{max-width:900px;margin:0 auto;}
.panel{padding:72px 20px 96px;}
.panel-inner{max-width:760px;margin:0 auto;}

/* ── JS shell: single viewport, only the active panel scrolls ─────── */
html.js body{overflow:hidden;height:100vh;height:100dvh;}
html.js .app{
  display:flex;
  flex-direction:column;
  height:100vh;height:100dvh;
  max-width:none;
  margin:0;
  overflow:hidden;
  position:relative;
}
html.js .panel{
  display:none;
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  padding:0;
  scroll-padding-top:76px;
}
html.js .panel.is-active{display:block;}
html.js .panel.is-active .panel-inner{
  min-height:100%;
  padding:clamp(76px, 12vh, 104px) 22px clamp(40px, 9vh, 84px);
  display:flex;
  flex-direction:column;
  justify-content:center;
}

/* ── Section nav (top text bar) ────────────────────────────────────
   The list scrolls sideways when the sections overflow (phones); when
   it does, small prev/next icon buttons appear (main.js toggles them
   from the scroll position) so every section stays reachable without
   hunting for a swipe. */
.topnav{
  position:fixed;
  top:0;left:0;right:0;
  z-index:70;
  display:flex;
  align-items:stretch;
  background:rgba(255,253,249,.82);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid var(--hairline);
  padding-top:env(safe-area-inset-top);
}
.topnav.is-hidden{display:none;}
.topnav-list{
  list-style:none;
  margin:0;
  padding:6px 10px;
  display:flex;
  align-items:center;
  gap:4px;
  height:60px;
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  touch-action:pan-x;
  scrollbar-width:none;
}
.topnav-list::-webkit-scrollbar{display:none;}
.topnav.has-overflow .topnav-list{
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 16px,#000 calc(100% - 16px),transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 16px,#000 calc(100% - 16px),transparent 100%);
}
.topnav-arrow{
  flex:0 0 auto;
  width:34px;
  border:0;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.35rem;
  line-height:1;
  color:var(--ink-soft);
  background:rgba(255,253,249,.92);
  cursor:pointer;
  transition:color .25s ease, background .25s ease;
}
.topnav-arrow:hover{color:var(--ink);background:#fff;}
.topnav-arrow:focus-visible{outline:2px solid var(--gold);outline-offset:-2px;}
.topnav-link{
  flex:0 0 auto;
  white-space:nowrap;
  font-family:inherit;
  font-size:.7rem;
  font-weight:500;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--ink-soft);
  background:transparent;
  border:1px solid transparent;
  border-radius:999px;
  padding:10px 14px;
  cursor:pointer;
  transition:color .25s ease, background .25s ease, box-shadow .25s ease;
}
.topnav-link:hover{color:var(--ink);}
.topnav-link.is-active{
  color:#fff;
  background:linear-gradient(135deg,var(--blush-deep),var(--lavender-deep));
  box-shadow:0 6px 16px -8px rgba(169,143,210,.75);
}
.topnav-link:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:999px;}

/* ── Shared typography ────────────────────────────────────────────── */
.eyebrow-script{
  font-family:var(--font-script);
  font-size:clamp(1.3rem, 4.2vw, 1.9rem);
  color:var(--blush-deep);
  text-align:center;
  margin-bottom:14px;
}
.panel-title{
  font-family:var(--font-display);
  font-weight:500;
  font-size:clamp(1.9rem, 5.8vw, 2.9rem);
  text-align:center;
  line-height:1.15;
}
.panel-lede{
  text-align:center;
  color:var(--ink-soft);
  max-width:52ch;
  margin:10px auto 0;
  font-size:clamp(.98rem,2.6vw,1.08rem);
}
.divider{
  display:flex;align-items:center;justify-content:center;
  gap:14px;margin:20px auto;
}
.divider-line{width:min(90px,18vw);height:1px;background:linear-gradient(90deg,transparent,var(--gold));}
.divider-line:last-child{background:linear-gradient(90deg,var(--gold),transparent);}
.divider-diamond{
  width:9px;height:9px;
  transform:rotate(45deg);
  border:1.5px solid var(--gold);
}

/* ── Panel 1 · cover ──────────────────────────────────────────────── */
.cover{
  position:relative;
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(255,255,255,.75), transparent 55%),
    linear-gradient(180deg,var(--sky-top) 0%,var(--sky-mid) 34%,var(--sky-low) 68%,var(--sky-bottom) 100%);
}
html.js .cover.is-active .panel-inner{justify-content:center;}
.cover-inner{position:relative;z-index:2;}

/* optional full-bleed photo backdrop behind the invitation */
.cover-photo-bg{
  position:absolute;inset:0;
  margin:0;
  overflow:hidden;
  z-index:0;
}
.cover-photo-bg img{
  width:100%;height:100%;
  object-fit:cover;
  object-position:center 40%;
  opacity:.4;
  transition:opacity .5s ease;
}
.cover-photo-bg .bg-trigger:hover img{opacity:.52;}
.cover-photo-bg::after{
  content:"";
  position:absolute;inset:0;
  pointer-events:none;
  background:linear-gradient(180deg,
    rgba(253,243,248,.74),
    rgba(243,228,245,.56) 38%,
    rgba(220,205,240,.62) 72%,
    rgba(191,212,238,.8));
}
.cover-photo-bg img.img-missing{opacity:0;}
.bg-trigger{width:100%;height:100%;}
.bg-trigger:focus-visible{outline:none;}

/* pale moon */
.moon{
  position:absolute;
  top:calc(10% + 42px);right:10%;
  width:74px;height:74px;
  border-radius:50%;
  background:radial-gradient(circle at 35% 35%, #ffffff, #f6ecfa 65%, #e6d5f2);
  box-shadow:0 0 60px 18px rgba(255,255,255,.55), 0 0 120px 40px rgba(226,211,244,.4);
  z-index:1;
  pointer-events:none;
}
@media (prefers-reduced-motion:no-preference){
  .moon{animation:moonGlow 6s ease-in-out infinite;}
}
@keyframes moonGlow{
  0%,100%{box-shadow:0 0 50px 14px rgba(255,255,255,.5), 0 0 110px 36px rgba(226,211,244,.38);}
  50%{box-shadow:0 0 70px 22px rgba(255,255,255,.62), 0 0 130px 48px rgba(226,211,244,.48);}
}

.sparkle{
  position:absolute;
  width:clamp(15px,4vw,24px);height:clamp(15px,4vw,24px);
  fill:rgba(201,164,104,.55);
  pointer-events:none;
  z-index:2;
}
.sparkle-a{top:14%;left:12%;}
.sparkle-b{top:34%;right:6%;width:clamp(11px,3vw,17px);fill:rgba(242,185,201,.8);}
.sparkle-c{bottom:26%;left:9%;width:clamp(11px,3vw,17px);fill:rgba(185,215,238,.85);}
@media (prefers-reduced-motion:no-preference){
  .sparkle{animation:twinkle 3.2s ease-in-out infinite;}
  .sparkle-b{animation-delay:.8s;}
  .sparkle-c{animation-delay:1.6s;}
}
@keyframes twinkle{
  0%,100%{opacity:.35;transform:scale(.8) rotate(0deg);}
  50%{opacity:1;transform:scale(1.12) rotate(12deg);}
}

.guest-greeting{
  font-family:var(--font-display);
  font-style:italic;
  font-size:clamp(1rem,3vw,1.2rem);
  color:var(--ink-soft);
  text-align:center;
  margin-bottom:clamp(10px,2.6vh,24px);
}
.cover-names{
  font-family:var(--font-display);
  font-weight:400;
  font-size:clamp(2.6rem, 10vw, 5.2rem);
  line-height:1.08;
  text-align:center;
  letter-spacing:.01em;
  color:var(--ink);
  text-wrap:balance;
}
.cover-names .ampersand{
  font-family:var(--font-script);
  font-size:.92em;
  color:var(--gold);
  margin:0 .12em;
  vertical-align:-.04em;
}
.cover-line{
  text-align:center;
  font-family:var(--font-display);
  font-style:italic;
  font-size:clamp(1.02rem,3vw,1.22rem);
  color:var(--ink-soft);
  margin-top:2px;
}
.cover-date{
  font-family:var(--font-body);
  font-weight:400;
  letter-spacing:.26em;
  text-transform:uppercase;
  font-size:clamp(.78rem, 2.7vw, .98rem);
  color:var(--ink);
  text-align:center;
  margin-top:16px;
}
.cover-venue{
  text-align:center;
  color:var(--ink-soft);
  font-size:clamp(.92rem,2.5vw,1.05rem);
  font-family:var(--font-display);
  font-style:italic;
  margin-top:4px;
}

/* optional announcement banner / flyer at the top of the cover */
.announce-banner{
  margin:0 auto clamp(14px,2.6vh,22px);
  width:min(560px,92vw);
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 18px 44px -26px rgba(157,133,173,.55);
  background:linear-gradient(180deg,var(--sky-mid),var(--sky-low));
}
.announce-banner img{
  width:100%;
  height:auto;
  aspect-ratio:8/3;
  object-fit:cover;
}
.announce-banner img.img-missing{opacity:0;}

/* cover photo figure(s) — one serene arch by default; a second arch can
   be revealed (remove `hidden` on .cover-figure-extra) for couples who
   want two photos on the cover. */
.cover-figures{
  display:flex;
  justify-content:center;
  align-items:flex-end;
  gap:clamp(12px,3vw,22px);
  margin:clamp(20px,4vh,34px) auto 0;
}
.cover-figure{
  width:min(300px,64vw);
  position:relative;
  border-radius:50% 50% 16px 16px / 34% 34% 12px 12px;
  overflow:hidden;
  background:
    radial-gradient(120% 90% at 30% 20%, var(--sky-mid), var(--sky-low) 70%, var(--sky-bottom));
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 24px 60px -28px rgba(157,133,173,.55);
  margin:0;
}
.cover-figure::after{
  content:"";
  position:absolute;inset:0;
  background:
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.85) 0 3px, transparent 4px),
    radial-gradient(circle at 20% 70%, rgba(242,185,201,.55) 0 2px, transparent 3px),
    radial-gradient(circle at 62% 80%, rgba(185,215,238,.6) 0 2px, transparent 3px);
  pointer-events:none;
  opacity:.65;
}
.cover-figure img{
  width:100%;
  height:min(380px,52vh);
  object-fit:cover;
  object-position:center 30%;
}
.cover-figure img.img-missing{opacity:0;}
.cover-figure-extra{width:min(220px,38vw);}
.cover-figure-extra img{height:min(280px,38vh);}
.cover-figures.has-two .cover-figure{width:min(240px,42vw);}
.cover-figures.has-two .cover-figure img{height:min(310px,42vh);}

/* click-to-enlarge photo triggers (open the lightbox) */
.photo-trigger{
  display:block;
  width:100%;
  padding:0;border:0;background:none;
  cursor:zoom-in;
  font:inherit;color:inherit;
}
.photo-trigger:focus-visible{outline:2px solid var(--gold);outline-offset:-4px;border-radius:14px;}

.btn-next{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin:clamp(22px,4.5vh,40px) auto 0;
  padding:14px 30px;
  border-radius:999px;
  border:1px solid rgba(201,164,104,.55);
  background:rgba(255,253,249,.82);
  color:var(--ink);
  font-weight:400;
  letter-spacing:.16em;
  text-transform:uppercase;
  font-size:.8rem;
  text-decoration:none;
  transition:transform .3s var(--ease), box-shadow .3s ease, background .3s ease;
  box-shadow:0 10px 30px -14px rgba(157,133,173,.5);
}
.btn-next::after{
  content:"";
  width:16px;height:16px;
  border-right:1px solid var(--gold);
  border-bottom:1px solid var(--gold);
  transform:rotate(45deg) translateY(-2px);
  transition:transform .3s var(--ease);
}
.btn-next:hover{background:#fff;transform:translateY(-2px);box-shadow:0 16px 36px -16px rgba(157,133,173,.6);}
.btn-next:hover::after{transform:rotate(45deg) translateY(-1px) translateX(2px);}
.btn-next:focus-visible{outline:2px solid var(--gold);outline-offset:3px;}

.cover-cue{
  position:absolute;
  left:50%;bottom:calc(16px + env(safe-area-inset-bottom));
  transform:translateX(-50%);
  display:flex;flex-direction:column;align-items:center;gap:6px;
  color:var(--ink-soft);
  opacity:.85;
  transition:opacity .5s ease;
  z-index:5;
  pointer-events:none;
}
.cover-cue .cue-text{font-size:.68rem;letter-spacing:.3em;text-transform:uppercase;}
.cue-line{
  width:1px;height:32px;
  background:linear-gradient(180deg,var(--blush-deep),transparent);
  position:relative;overflow:hidden;
}
.cue-line::after{
  content:"";
  position:absolute;left:0;top:-12px;
  width:100%;height:12px;
  background:linear-gradient(180deg,transparent,var(--gold));
}
@media (prefers-reduced-motion:no-preference){
  .cue-line::after{animation:cuedrop 1.8s ease-in-out infinite;}
}
@keyframes cuedrop{
  0%{transform:translateY(0);opacity:0;}
  40%{opacity:1;}
  100%{transform:translateY(44px);opacity:0;}
}
body.is-switched .cover-cue{opacity:0;}

/* ── Panel 2 · couple ─────────────────────────────────────────────── */
.couple{
  background:
    radial-gradient(110% 80% at 85% 6%, rgba(201,182,228,.32), transparent 55%),
    linear-gradient(180deg,#fdfbf8, #faf5fb 60%, #f4edfa);
}
.quote{
  max-width:34ch;
  margin:22px auto 0;
  text-align:center;
  font-family:var(--font-display);
  font-style:italic;
  font-size:clamp(1.1rem,3.2vw,1.3rem);
  color:var(--lavender-deep);
  position:relative;
  padding:0 10px;
}
.quote::before,.quote::after{
  content:"";
  display:block;
  width:34px;height:1px;
  background:var(--gold);
  margin:10px auto;
  opacity:.7;
}
.couple-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  margin-top:28px;
}
.couple-card{
  background:var(--card);
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  padding:26px 22px 24px;
  text-align:center;
  box-shadow:0 18px 44px -30px rgba(157,133,173,.55);
}
.couple-photo{
  margin:0 auto 16px;
  width:min(150px,60%);
  border-radius:50% 50% 14px 14px / 34% 34% 10px 10px;
  overflow:hidden;
  background:linear-gradient(180deg,var(--sky-mid),var(--sky-low));
  border:1px solid rgba(255,255,255,.9);
}
.couple-photo img{
  width:100%;height:190px;
  object-fit:cover;
  object-position:center 25%;
  transition:transform .6s var(--ease);
}
.couple-photo:hover img{transform:scale(1.05);}
.couple-photo img.img-missing{opacity:0;}
.couple-name{
  font-family:var(--font-display);
  font-weight:600;
  font-size:1.5rem;
}
.couple-role{
  font-size:.72rem;
  letter-spacing:.26em;
  text-transform:uppercase;
  color:var(--gold);
  margin-top:2px;
}
.couple-parents{
  color:var(--ink-soft);
  font-size:.92rem;
  margin-top:8px;
}
.couple-ig{margin-top:12px;}
/* empty Instagram wrapper (host left the handle blank) must not leave a gap */
.couple-ig:not(:has(.link)){display:none;}
.couple-ig .link{
  display:inline-block;
  font-size:.8rem;
  letter-spacing:.1em;
  color:var(--lavender-deep);
  text-decoration:none;
  border-bottom:1px solid rgba(169,143,210,.5);
  padding-bottom:2px;
  transition:color .25s ease,border-color .25s ease;
}
.couple-ig .link:hover{color:var(--blush-deep);border-color:var(--blush-deep);}

/* ── Panel 3 · events ─────────────────────────────────────────────── */
.events-panel{
  background:
    radial-gradient(110% 80% at 8% 10%, rgba(185,215,238,.32), transparent 55%),
    linear-gradient(180deg,#fbfdfc,#f4f8fb 60%,#edf3f9);
}
.events{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:34px;
}
.event-item{
  position:relative;
  background:var(--card);
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  padding:26px 24px 24px;
  box-shadow:0 18px 44px -30px rgba(157,133,173,.55);
  overflow:hidden;
}
.event-item::before{
  content:"";
  position:absolute;top:0;left:0;right:0;height:4px;
  background:linear-gradient(90deg,var(--lavender),var(--powder));
  opacity:.85;
}
.event-item:nth-child(2)::before{background:linear-gradient(90deg,var(--powder),var(--blush));}
.event-icon{
  display:inline-flex;
  width:44px;height:44px;
  align-items:center;justify-content:center;
  border-radius:50%;
  color:var(--lavender-deep);
  background:rgba(201,182,228,.18);
  margin-bottom:14px;
}
.event-item:nth-child(2) .event-icon{color:var(--blush-deep);background:rgba(242,185,201,.2);}
.event-icon svg{width:22px;height:22px;}
.event-title{font-family:var(--font-display);font-weight:600;font-size:1.45rem;margin-bottom:4px;}
.event-date{
  font-weight:500;letter-spacing:.12em;text-transform:uppercase;
  font-size:.76rem;color:var(--ink);margin-top:8px;
}
.event-time{font-family:var(--font-display);font-style:italic;font-size:1.08rem;color:var(--ink-soft);margin-top:2px;}
.event-venue{font-weight:500;font-size:1.02rem;margin-top:12px;}
.event-address{color:var(--ink-soft);font-size:.95rem;margin-top:2px;overflow-wrap:break-word;}
.map-link{
  display:inline-block;margin-top:14px;
  font-size:.8rem;letter-spacing:.14em;text-transform:uppercase;
  color:var(--lavender-deep);text-decoration:none;
  border-bottom:1px solid rgba(169,143,210,.5);padding-bottom:2px;
  transition:color .25s ease,border-color .25s ease;
}
.map-link:hover{color:var(--blush-deep);border-color:var(--blush-deep);}

/* ── Panel 4 · love story ─────────────────────────────────────────── */
.story{
  background:
    radial-gradient(110% 80% at 90% 8%, rgba(242,185,201,.28), transparent 55%),
    linear-gradient(180deg,#fdfaf7,#faf3f0 60%,#f6ebef);
}
.love-story{
  margin-top:34px;
  display:flex;
  flex-direction:column;
  gap:26px;
}
.love-story-item{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:20px;
  align-items:center;
  background:rgba(255,253,249,.82);
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:0 14px 38px -30px rgba(157,133,173,.55);
}
.ls-figure{
  margin:0;
  border-radius:14px;
  overflow:hidden;
  background:linear-gradient(180deg,var(--sky-mid),var(--sky-low));
  aspect-ratio:1/1;
}
.ls-figure img{width:100%;height:100%;object-fit:cover;transition:transform .6s var(--ease);}
.ls-figure:hover img{transform:scale(1.05);}
.ls-figure img.img-missing{opacity:0;}
.ls-chapter{
  font-size:.68rem;letter-spacing:.28em;text-transform:uppercase;
  color:var(--gold);
}
.ls-title{font-family:var(--font-display);font-weight:600;font-size:1.4rem;margin-top:2px;}
.ls-text{color:var(--ink-soft);font-size:.97rem;margin-top:6px;}

/* ── Panel 5 · gallery ────────────────────────────────────────────── */
.gallery-panel{
  background:
    radial-gradient(110% 80% at 10% 90%, rgba(207,226,212,.4), transparent 55%),
    linear-gradient(180deg,#fbfdfa,#f3f9f3 60%,#ecf5ec);
}
.gallery{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-top:32px;
}
.gallery-item{
  margin:0;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--hairline);
  background:linear-gradient(180deg,var(--sky-mid),var(--sky-low));
  aspect-ratio:1/1;
  box-shadow:0 14px 34px -26px rgba(157,133,173,.6);
}
.gallery-item img{width:100%;height:100%;object-fit:cover;transition:transform .6s var(--ease);}
.gallery-item:hover img{transform:scale(1.05);}
.gallery-item .photo-trigger{height:100%;}
.gallery-item img.img-missing{opacity:0;}
@media (prefers-reduced-motion:reduce){.gallery-item img,.couple-photo img,.ls-figure img{transition:none;}}

/* ── Panel 5b · our film (optional video) ────────────────────────── */
.film-panel{
  background:
    radial-gradient(110% 80% at 90% 8%, rgba(185,215,238,.3), transparent 55%),
    linear-gradient(180deg,#fbfcfd,#f2f6fa 60%,#e9eff6);
}
.video-trigger{
  position:relative;
  display:block;
  width:min(760px,92vw);
  margin:32px auto 0;
  border-radius:22px;
  overflow:hidden;
  cursor:pointer;
  background:linear-gradient(180deg,var(--sky-mid),var(--sky-low));
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 26px 60px -30px rgba(157,133,173,.6);
}
.video-trigger::after{
  content:"";
  position:absolute;inset:0;
  border:1px solid rgba(255,255,255,.4);
  border-radius:22px;
  pointer-events:none;
}
.video-poster{display:block;}
.video-poster img{
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  transition:transform .6s var(--ease);
}
.video-trigger:hover .video-poster img{transform:scale(1.03);}
.video-poster img.img-missing{opacity:0;}
.video-poster::after{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(243,228,245,.14),rgba(220,205,240,.3));
  pointer-events:none;
}
.play-badge{
  position:absolute;left:50%;top:50%;
  transform:translate(-50%,-50%);
  width:74px;height:74px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:#fff;
  background:linear-gradient(135deg,var(--blush-deep),var(--lavender-deep));
  box-shadow:0 14px 36px -10px rgba(169,143,210,.85), 0 0 0 8px rgba(255,255,255,.35);
  transition:transform .3s var(--ease), box-shadow .3s ease;
}
.play-badge svg{width:30px;height:30px;margin-left:3px;}
.video-trigger:hover .play-badge{transform:translate(-50%,-50%) scale(1.08);}
.video-trigger:focus-visible{outline:2px solid var(--gold);outline-offset:3px;}
@media (prefers-reduced-motion:reduce){.video-poster img{transition:none;}}

/* ── Photo lightbox (opened from any [data-lightbox] photo) ───────── */
.lightbox{
  position:fixed;inset:0;z-index:100;
  display:flex;align-items:center;justify-content:center;
  padding:clamp(16px,4vw,40px);
  background:rgba(41,31,49,.9);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .3s ease, visibility .3s ease;
}
.lightbox.is-open{opacity:1;visibility:visible;pointer-events:auto;}
.lightbox-figure{
  margin:0;
  display:flex;flex-direction:column;align-items:center;
  gap:16px;
  max-width:min(1080px,94vw);
  max-height:88vh;
}
.lightbox-stage{
  max-width:94vw;
  max-height:72vh;
  overflow:hidden;
  touch-action:none;
  cursor:zoom-in;
  border-radius:18px;
  position:relative;
  background:#241a2e;
}
.lightbox-stage.is-zoomed{cursor:grab;}
.lightbox-stage.is-panning{cursor:grabbing;}
.lightbox-stage img{
  max-width:94vw;
  max-height:72vh;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.28);
  box-shadow:0 34px 90px -24px rgba(18,10,24,.75);
  will-change:transform;
  user-select:none;
  -webkit-user-drag:none;
  transform-origin:center center;
}
.lightbox-stage img.img-missing{opacity:.3;}
.lightbox-video{
  width:min(960px,94vw);
  aspect-ratio:16/9;
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.28);
  box-shadow:0 34px 90px -24px rgba(18,10,24,.75);
  background:#1a1220;
}
.lightbox-video iframe,.lightbox-video video{
  width:100%;height:100%;
  display:block;border:0;
}
.lightbox-video-fail{
  display:flex;align-items:center;justify-content:center;
  height:100%;margin:0;
  color:rgba(249,239,251,.75);
  font-size:.95rem;letter-spacing:.06em;text-align:center;
  padding:0 24px;
}
.lightbox-hint{
  display:block;
  margin-top:10px;
  font-size:.66rem;
  letter-spacing:.24em;
  text-transform:uppercase;
  color:rgba(249,239,251,.5);
}
.lightbox-hint.is-hidden{display:none;}
.lightbox-caption{
  font-family:var(--font-display);
  font-style:italic;
  font-size:clamp(1.05rem,3vw,1.35rem);
  color:#f9effb;
  text-align:center;
}
.lightbox-counter{
  display:block;
  margin-top:4px;
  font-size:.7rem;letter-spacing:.3em;text-transform:uppercase;
  color:rgba(249,239,251,.55);
}
.lightbox-close,.lightbox-prev,.lightbox-next{
  position:fixed;z-index:1;
  display:flex;align-items:center;justify-content:center;
  width:46px;height:46px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,253,249,.12);
  color:#fdf6ff;
  font-size:1.7rem;line-height:1;
  cursor:pointer;
  transition:background .25s ease, transform .25s ease;
}
.lightbox-close:hover,.lightbox-prev:hover,.lightbox-next:hover{background:rgba(255,253,249,.28);}
.lightbox-close:hover{transform:scale(1.06);}
.lightbox-prev:hover,.lightbox-next:hover{transform:scale(1.06);}
.lightbox-close:focus-visible,.lightbox-prev:focus-visible,.lightbox-next:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
.lightbox-close{top:calc(14px + env(safe-area-inset-top));right:calc(14px + env(safe-area-inset-right));}
.lightbox-prev{left:calc(12px + env(safe-area-inset-left));top:50%;transform:translateY(-50%);}
.lightbox-next{right:calc(12px + env(safe-area-inset-right));top:50%;transform:translateY(-50%);}

/* ── Panel 6 · dress code ─────────────────────────────────────────── */
.dresscode{
  background:
    radial-gradient(110% 80% at 85% 10%, rgba(201,182,228,.35), transparent 55%),
    linear-gradient(180deg,#fbf9fd,#f3edfa 60%,#ece3f6);
}
.dresscode-inner{align-items:center;text-align:center;}
.dresscode-card{
  max-width:520px;
  margin-top:28px;
  background:rgba(255,253,249,.9);
  border:1px dashed rgba(201,164,104,.55);
  border-radius:var(--radius);
  padding:34px 30px;
}
.dresscode-text{font-family:var(--font-display);font-size:clamp(1.15rem,3.4vw,1.35rem);line-height:1.5;color:var(--ink);}
.dresscode-foot{color:var(--ink-soft);font-size:.92rem;margin-top:22px;}

/* ── Panel 7 · RSVP ───────────────────────────────────────────────── */
.rsvp-wrap{
  background:
    radial-gradient(120% 90% at 8% 12%, rgba(201,182,228,.3), transparent 55%),
    radial-gradient(120% 90% at 92% 88%, rgba(185,215,238,.35), transparent 55%),
    linear-gradient(180deg,#fbf6fc,#f6f0fb 70%,#f1e9f8);
}
.rsvp-head{text-align:center;}
.rsvp-title{font-family:var(--font-display);font-weight:500;font-size:clamp(1.9rem, 5.6vw, 2.7rem);}
.rsvp-description{
  color:var(--ink-soft);max-width:46ch;margin:8px auto 0;
  font-size:clamp(.98rem,2.6vw,1.08rem);
}

.rsvp-deadline{
  margin:26px auto 0;max-width:420px;text-align:center;
  border-top:1px dashed var(--hairline);border-bottom:1px dashed var(--hairline);
  padding:18px 10px;
}
.rsvp-deadline.is-hidden{display:none;}
.rsvp-deadline-label{
  font-size:.72rem;letter-spacing:.28em;text-transform:uppercase;
  color:var(--ink-soft);margin-bottom:12px;
}
.rsvp-countdown{display:flex;justify-content:center;gap:clamp(10px,3vw,22px);}
.count-block{display:flex;flex-direction:column;align-items:center;gap:2px;}
.count-block span{font-family:var(--font-display);font-weight:500;font-size:clamp(1.7rem,5vw,2.3rem);line-height:1;color:var(--ink);}
.count-block small{font-size:.66rem;letter-spacing:.2em;text-transform:uppercase;color:var(--ink-soft);}

#rsvp-form{max-width:520px;margin:30px auto 0;}
.form-group{margin-bottom:16px;}
.form-group label{
  display:block;font-size:.76rem;font-weight:500;
  letter-spacing:.16em;text-transform:uppercase;
  color:var(--ink-soft);margin-bottom:7px;
}
.form-control{
  width:100%;
  font-family:inherit;font-size:1rem;font-weight:300;color:var(--ink);
  background:rgba(255,253,249,.92);
  border:1px solid rgba(157,133,173,.32);
  border-radius:14px;
  padding:12px 16px;
  transition:border-color .25s ease, box-shadow .25s ease, background .25s ease;
  appearance:none;
}
select.form-control{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23a98fd2' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 16px center;
  padding-right:42px;
  cursor:pointer;
}
textarea.form-control{resize:vertical;min-height:76px;}
.form-control::placeholder{color:rgba(139,116,134,.55);}
.form-control:focus{
  outline:none;
  border-color:var(--gold);
  box-shadow:0 0 0 4px rgba(201,164,104,.18);
  background:#fff;
}
.error{display:block;color:var(--blush-deep);font-size:.82rem;margin-top:5px;min-height:1.1em;}
.form-actions{display:flex;flex-direction:column;align-items:center;gap:12px;margin-top:24px;}
.btn-primary{
  font-family:inherit;font-weight:400;font-size:.82rem;
  letter-spacing:.18em;text-transform:uppercase;
  color:#fff;
  background:linear-gradient(135deg,var(--blush-deep),var(--lavender-deep));
  border:0;border-radius:999px;padding:15px 44px;cursor:pointer;
  box-shadow:0 14px 34px -14px rgba(169,143,210,.75);
  transition:transform .3s var(--ease), box-shadow .3s ease, filter .3s ease;
}
.btn-primary:hover{transform:translateY(-2px);filter:brightness(1.04);box-shadow:0 18px 40px -16px rgba(169,143,210,.85);}
.btn-primary:focus-visible{outline:2px solid var(--gold);outline-offset:3px;}
.btn-primary:disabled{opacity:.6;cursor:default;transform:none;}
.loading{color:var(--ink-soft);font-size:.9rem;letter-spacing:.1em;display:none;}
.form-hint{margin-top:14px;text-align:center;font-size:.85rem;color:var(--ink-soft);}
.thank-you-message{text-align:center;margin-top:40px;}
.thank-you-message h3{font-family:var(--font-display);font-weight:500;font-size:1.8rem;}
.thank-you-message p{color:var(--ink-soft);margin-top:6px;}

/* ── Panel 8 · guestbook ──────────────────────────────────────────── */
.guestbook-section{
  background:
    radial-gradient(120% 90% at 90% 10%, rgba(242,185,201,.3), transparent 55%),
    linear-gradient(180deg,#fdf7fa,#f9f0f7 65%,#f5e9f3);
}
.guestbook-head{text-align:center;}
.guestbook-title{font-family:var(--font-display);font-weight:500;font-size:clamp(1.9rem, 5.6vw, 2.7rem);}
.guestbook-description{
  color:var(--ink-soft);max-width:48ch;margin:8px auto 0;
  font-size:clamp(.98rem,2.6vw,1.08rem);
}
.guestbook-body{max-width:560px;margin:30px auto 0;}

#guestbookForm{
  background:rgba(255,253,249,.9);
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  padding:24px;
  margin-bottom:22px;
  box-shadow:0 18px 44px -30px rgba(157,133,173,.5);
}
#guestbookForm .form-control{margin-bottom:12px;}
#guestbookForm button[type="submit"]{
  font-family:inherit;font-weight:400;font-size:.8rem;
  letter-spacing:.18em;text-transform:uppercase;
  color:#fff;
  background:linear-gradient(135deg,var(--blush-deep),var(--lavender-deep));
  border:0;border-radius:999px;padding:13px 36px;cursor:pointer;margin-top:6px;
}
#guestbookForm .error{font-size:.8rem;margin:-6px 0 10px;}
.guestbook-chapta{margin:10px 0;}
.loading-guestbook{color:var(--ink-soft);font-size:.9rem;display:none;text-align:center;padding:8px 0;}

.guestbook-wrap{
  background:rgba(255,253,249,.66);
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  padding:8px 22px;
  max-height:420px;
  overflow:auto;
}
.guestbook-entry{padding:16px 0;border-bottom:1px dashed var(--hairline);}
.guestbook-entry:last-child{border-bottom:0;}
.guestbook-entry h5{font-family:var(--font-display);font-weight:600;font-size:1.12rem;margin:0 0 3px;}
.guestbook-entry p{margin:0 0 3px;font-size:.97rem;color:var(--ink);}
.guestbook-entry small{color:var(--ink-soft);font-size:.78rem;}
.more-guestbook-wrap{text-align:center;margin-top:16px;}
.more-guestbook-wrap button{
  font-family:inherit;font-size:.78rem;letter-spacing:.16em;text-transform:uppercase;
  color:var(--lavender-deep);background:transparent;
  border:1px solid rgba(169,143,210,.5);border-radius:999px;
  padding:10px 26px;cursor:pointer;
  transition:background .25s ease,color .25s ease;
}
.more-guestbook-wrap button:hover{background:var(--lavender-deep);color:#fff;}

/* ── Panel 8b · free page (optional, host-defined) ────────────────
   A free-text page of repeatable blocks: each block has a free title,
   free text and an OPTIONAL photo (a block renders as title + text
   without its photo — the figure collapses via :empty). Leave the
   whole group empty — or toggle the Free Page category off in the
   cockpit — and the platform removes the whole .panel-free section;
   the top text nav rebuilds itself, so the navigation entry
   disappears with it. Move the <section class="panel panel-free">
   block in index.html to re-position the page among the panels (the
   nav follows the DOM order). Every free image is clickable and opens
   the full-screen viewer with zoom (main.js), like every other photo. */
.panel-free{
  background:
    radial-gradient(120% 90% at 90% 12%, rgba(242,185,201,.3), transparent 55%),
    linear-gradient(180deg,#fdf9fc,#f7f0fa 60%,#f0e8f7);
}
.free-blocks{
  display:flex;
  flex-direction:column;
  gap:24px;
  margin-top:32px;
}
.free-block{
  background:rgba(255,253,249,.88);
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  padding:clamp(22px,4.5vw,32px);
  box-shadow:0 18px 44px -30px rgba(157,133,173,.55);
}
.free-title{
  font-family:var(--font-display);
  font-weight:600;
  font-size:clamp(1.25rem,4.4vw,1.6rem);
  color:var(--ink);
  margin-bottom:10px;
}
.free-content{
  color:var(--ink-soft);
  font-size:clamp(.97rem,2.6vw,1.05rem);
  line-height:1.7;
  white-space:pre-line;
  overflow-wrap:anywhere;
}
.free-figure{
  margin:16px 0 0;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--hairline);
  background:linear-gradient(180deg,var(--sky-mid),var(--sky-low));
  box-shadow:0 14px 34px -26px rgba(157,133,173,.6);
}
.free-figure:empty{display:none;}   /* text-only block: no photo, no gap */
.free-img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  cursor:zoom-in;
  transition:transform .6s var(--ease);
}
.free-figure:hover .free-img{transform:scale(1.03);}
.free-img.img-missing{opacity:0;}
.free-img:focus-visible{outline:2px solid var(--gold);outline-offset:-4px;}
@media (prefers-reduced-motion:reduce){.free-img{transition:none;}}

/* ── Panel 9 · wedding gift ───────────────────────────────────────── */
.gift{
  background:
    radial-gradient(120% 90% at 10% 10%, rgba(201,164,104,.16), transparent 55%),
    linear-gradient(180deg,#fdfbf6,#f8f4ea 60%,#f3edde);
}
.wedding-gift{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:32px;
}
.bank-item{
  background:rgba(255,253,249,.9);
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  padding:24px 20px;
  text-align:center;
  box-shadow:0 18px 44px -30px rgba(157,133,173,.5);
}
.bank-name{
  font-family:var(--font-display);
  font-weight:600;
  font-size:1.25rem;
  color:var(--ink);
}
.bank-account{color:var(--ink-soft);font-size:.92rem;margin-top:4px;}
.bank-number{
  font-weight:500;
  letter-spacing:.14em;
  font-size:1.02rem;
  margin-top:8px;
  color:var(--ink);
}
.bank-qr{
  margin:16px auto 0;
  width:110px;height:110px;
  border-radius:14px;
  overflow:hidden;
  background:linear-gradient(180deg,#fff,#f4edfa);
  border:1px solid var(--hairline);
}
.bank-qr img{width:100%;height:100%;object-fit:contain;}
.bank-qr img.img-missing{opacity:0;}
/* When the engine drops an empty Bank QR image from a gift row, hide the
   empty .bank-qr frame instead of leaving a blank 110px box. */
.bank-qr:not(:has(img)){display:none;}
.gift-note{
  margin-top:24px;
  text-align:center;
  color:var(--ink-soft);
  font-size:.92rem;
  font-family:var(--font-display);
  font-style:italic;
}

/* ── Panel 10 · footnote ──────────────────────────────────────────── */
.footnote{
  background:
    radial-gradient(120% 100% at 50% 120%, rgba(201,182,228,.5), transparent 60%),
    linear-gradient(180deg,#f4edfa,#e9e2f6 70%,#e0d9f0);
}
html.js .footnote.is-active .panel-inner{justify-content:center;}
.footnote-inner{align-items:center;text-align:center;}
.heart-mark{width:30px;height:30px;color:var(--blush-deep);margin-bottom:14px;}
.footnote-words{font-family:var(--font-display);font-size:clamp(1.5rem,4.6vw,2.1rem);line-height:1.45;color:var(--ink);}
.footnote-app{margin-top:16px;font-size:.78rem;letter-spacing:.22em;text-transform:uppercase;color:var(--ink-soft);}
.footer-brand{
  color:var(--gold);
  border-bottom:1px solid rgba(201,164,104,.5);
  padding-bottom:1px;
}

/* ── Powered-by brand strip (full width) ───────────────────────────
   A slim, full-width "Powered by Kundangi" line under the panels in
   the app shell (and at the end of the stacked document without JS).
   The engine swaps the Kundangi token inside .link-footer for the
   platform name at render; the cockpit's Free Powered By field can
   override the whole line. It is not part of the free page and stays
   visible even when the free page is hidden. */
html:not(.js) .powered-by{
  width:100vw;
  max-width:100vw;
  margin-left:calc(50% - 50vw);
  text-align:center;
  padding:14px 16px 22px;
  border-top:1px solid var(--hairline);
  font-size:.62rem;
  font-weight:500;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--ink-soft);
}
html.js .powered-by{
  flex:0 0 auto;
  width:100%;
  text-align:center;
  padding:9px 14px calc(9px + env(safe-area-inset-bottom));
  border-top:1px solid var(--hairline);
  background:rgba(255,253,249,.85);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  font-size:.6rem;
  font-weight:500;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--ink-soft);
  position:relative;
  z-index:29;
}
.powered-by .link-footer{color:var(--gold);}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width:700px){
  html.js .panel.is-active .panel-inner{padding-top:clamp(76px,12vh,96px);}
  .couple-grid,.events,.wedding-gift{grid-template-columns:1fr;}
  .gallery{grid-template-columns:repeat(2,1fr);}
  .love-story-item{grid-template-columns:1fr;gap:14px;}
  .ls-figure{max-width:220px;}
  .cover-figure img{height:min(330px,44vh);}
  .topnav-link{font-size:.68rem;padding:10px 12px;}
  .play-badge{width:62px;height:62px;}
  .play-badge svg{width:26px;height:26px;}
}

@media (min-width:1200px){
  .cover-names{font-size:clamp(3.2rem,7vw,5.6rem);}
}

/* ── Reduced motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}

/* ── Print: show every panel, hide the shell chrome ───────────────── */
@media print{
  html.js body{overflow:visible;height:auto;}
  html.js .app{height:auto;overflow:visible;display:block;}
  html.js .panel{display:block !important;height:auto !important;overflow:visible !important;padding:28px 12px;}
  html.js .panel.is-active .panel-inner{min-height:0;padding:24px 6px;}
  .cover-cue,.btn-next,.sparkle,.moon,.cover-photo-bg,.lightbox,.topnav,.powered-by{display:none !important;}
  .panel{page-break-inside:avoid;}
  body{background:#fff;}
  .cover-figure img,.couple-photo img{height:auto;max-height:320px;opacity:1 !important;}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
}
