@import url("https://fonts.googleapis.com/css2?family=Pirata+One&display=swap");

/* Upload your licensed Vighty webfont as:
   assets/fonts/Vighty.woff2
*/
@font-face {
  font-family: "Vighty";
  src: url("assets/fonts/Vighty.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root{
  --black:#050505;
  --black-soft:#0b0b0b;
  --gold:#f6ca3c;
  --gold-2:#d89f16;
  --cream:#f8f1df;
  --white:#fffdf5;
  --red:#4d0707;
  --gutter: clamp(18px, 4vw, 42px);
  --title: "Vighty","Pirata One",serif;
  --body: "Pirata One", Georgia, serif;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--black);
  color:var(--cream);
  font-family:var(--body);
  overflow-x:hidden;
}
button,a{font:inherit}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
img,video{display:block;max-width:100%}

.loader{
  position:fixed;inset:0;z-index:100;
  display:grid;place-items:center;
  background:#050505;
  transition:opacity .6s ease, visibility .6s ease;
}
.loader.is-hidden{opacity:0;visibility:hidden}
.loader-mark{
  font-family:var(--title);
  color:var(--gold);
  font-size:clamp(42px,12vw,90px);
  text-shadow:0 0 30px rgba(246,202,60,.15);
}

.site{opacity:0;transition:opacity .8s ease}
.site.ready{opacity:1}

.page-section,.guest-section,.rsvp-section{
  position:relative;
  min-height:100svh;
  padding:clamp(70px,10vw,120px) var(--gutter);
  overflow:hidden;
}

.page-section::before,.guest-section::before{
  content:"";
  position:absolute;inset:0;
  background:
    radial-gradient(circle at 50% 15%, rgba(246,202,60,.12), transparent 28%),
    linear-gradient(180deg,rgba(0,0,0,.35),rgba(0,0,0,.72));
  pointer-events:none;
}

.page-section>*,
.guest-section>*,
.rsvp-section>*{position:relative;z-index:2}

h1,h2,h3,p{margin-top:0}
h1,h2,h3{font-family:var(--title);font-weight:400}
h2{
  color:var(--gold);
  font-size:clamp(50px,12vw,110px);
  line-height:.88;
  text-align:center;
  margin-bottom:42px;
  text-shadow:0 4px 0 #6d4700,0 0 24px rgba(246,202,60,.16);
}
h3{font-size:clamp(28px,6vw,48px);margin-bottom:8px}
p{line-height:1.25}

.gold-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:58px;
  padding:12px 28px;
  border:1px solid rgba(255,236,131,.7);
  border-radius:10px;
  background:linear-gradient(110deg,#f6d449,#d59a0d);
  color:#070707;
  font-family:var(--title);
  font-size:clamp(21px,4vw,32px);
  box-shadow:0 10px 35px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.5);
  transition:transform .25s ease,filter .25s ease;
}
.gold-button:hover{transform:translateY(-3px);filter:brightness(1.07)}
.gold-button:active{transform:translateY(0)}

.envelope-screen{
  min-height:100svh;
  position:relative;
  display:grid;
  place-items:center;
  overflow:hidden;
}
.bg-video{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  filter:grayscale(.75) contrast(.9);
}
.video-shade{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.15),rgba(0,0,0,.72));
}
.envelope-wrap{position:relative;z-index:3;text-align:center}
.envelope{
  position:relative;
  width:min(82vw,500px);
  aspect-ratio:1.55;
  filter:drop-shadow(0 25px 35px rgba(0,0,0,.55));
  transition:transform .8s cubic-bezier(.2,.8,.2,1);
}
.seal-button{background:none;border:0;color:inherit;padding:0}
.seal-button:hover .envelope{transform:translateY(-5px) scale(1.015)}
.envelope-back,.envelope-front{
  position:absolute;inset:0;
  background:linear-gradient(145deg,#332c2c,#171414);
  border:1px solid #5b5050;
}
.envelope-front{clip-path:polygon(0 0,50% 50%,100% 0,100% 100%,0 100%);background:#171414}
.envelope-flap{
  position:absolute;inset:0;
  background:linear-gradient(145deg,#453b3b,#1d1818);
  clip-path:polygon(0 0,100% 0,50% 58%);
  transform-origin:top center;
  transition:transform 1s cubic-bezier(.2,.8,.2,1);
  z-index:4;
}
.envelope-paper{
  position:absolute;
  inset:12% 15%;
  display:grid;place-items:center;
  color:white;
  font-size:clamp(17px,4vw,27px);
  z-index:3;
}
.seal{
  position:absolute;
  z-index:6;
  width:clamp(88px,20vw,126px);
  left:50%;top:54%;
  transform:translate(-50%,-50%);
  transition:transform .8s ease,opacity .5s ease;
}
.tap-label{
  color:#fff;
  font-size:22px;
  margin-top:22px;
  text-shadow:0 2px 8px #000;
}
.envelope-screen.opened .envelope-flap{transform:rotateX(180deg)}
.envelope-screen.opened .seal{transform:translate(-50%,-50%) scale(.65);opacity:0}
.envelope-screen.opened .envelope{transform:scale(1.06);opacity:0;transition:transform .8s ease,opacity .5s ease .25s}

.cover{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:28px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.55),rgba(255,255,255,.18)),
    url("assets/images/hall.jpg") center/cover;
}
.cover::after{
  content:"";
  position:absolute;inset:0;
  background:rgba(0,0,0,.52);
}
.cover-card{
  width:min(92vw,650px);
  padding:12px;
  background:#111;
  box-shadow:0 25px 70px rgba(0,0,0,.55);
}
.gold-border{
  border:3px solid var(--gold);
  padding:clamp(42px,8vw,70px) 22px;
  text-align:center;
  background:
    radial-gradient(circle at 50% 50%,rgba(255,255,255,.04),transparent 55%),
    #101010;
}
.eyebrow,.invitation-line,.subtitle{font-size:clamp(18px,3.7vw,27px)}
.invitation-line{margin:24px 0 10px}
.cover h1{
  color:var(--gold);
  font-size:clamp(78px,18vw,150px);
  line-height:.72;
  margin:12px 0 30px;
  text-shadow:0 5px 0 #6d4700;
}
.subtitle{margin-bottom:28px}
.event-meta{
  display:grid;gap:3px;
  color:var(--gold);
  font-size:clamp(25px,5vw,36px);
}

.before-section{
  background:
    linear-gradient(rgba(8,8,8,.52),rgba(8,8,8,.8)),
    url("assets/images/hall.jpg") center/cover fixed;
}
.section-title-wrap{max-width:900px;margin:0 auto}
.gallery{
  max-width:900px;margin:0 auto;
  display:grid;
  gap:28px;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:center;
}
.ornate-frame{
  margin:0;
  padding:13px;
  background:linear-gradient(135deg,#7c4b0b,#ffd95a,#8a570d,#f1c33e,#6b4008);
  box-shadow:0 14px 40px rgba(0,0,0,.5);
  border:4px solid #9c6817;
  position:relative;
}
.ornate-frame::after{
  content:"";
  position:absolute;inset:5px;
  border:2px solid rgba(255,231,120,.75);
  pointer-events:none;
}
.ornate-frame img{
  width:100%;height:100%;object-fit:cover;
  position:relative;z-index:1;
}
.ornate-frame.landscape{aspect-ratio:1.55}
.ornate-frame.portrait{aspect-ratio:.72}
.gallery-before .landscape:first-child{grid-column:1/3;max-width:720px;justify-self:center}

.dress-section{
  background:
    linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.78)),
    url("assets/images/hall.jpg") center/cover fixed;
}
.gold-panel{
  max-width:760px;margin:0 auto;
  background:linear-gradient(110deg,#f7d34d,#d69d12);
  color:#080808;
  border-radius:4px;
  padding:26px 28px;
  box-shadow:0 18px 50px rgba(0,0,0,.4);
}
.gold-panel h3{margin-bottom:5px}
.gold-panel p{font-size:clamp(21px,4.2vw,31px);margin-bottom:0}
.dress-figures{
  min-height:440px;
  max-width:720px;
  margin:20px auto 0;
  position:relative;
  display:flex;
  justify-content:center;
  align-items:end;
}
.figure{
  width:36%;height:390px;
  position:relative;
  filter:drop-shadow(0 15px 20px rgba(0,0,0,.45));
}
.figure::before{
  content:"";
  position:absolute;
  left:50%;top:12%;
  width:80px;height:90px;
  transform:translateX(-50%);
  border-radius:50%;
  background:#cfae8b;
}
.figure-woman{
  background:linear-gradient(90deg,transparent 18%,#171717 19% 81%,transparent 82%);
  clip-path:polygon(32% 26%,68% 26%,76% 42%,95% 100%,5% 100%,24% 42%);
}
.figure-man{
  background:linear-gradient(90deg,transparent 18%,#101010 19% 81%,transparent 82%);
  clip-path:polygon(27% 26%,73% 26%,88% 100%,12% 100%);
}
.dress-copy{
  max-width:760px;margin:0 auto;text-align:center;
}
.dress-copy h3{color:var(--gold)}
.dress-copy p{font-size:clamp(20px,4vw,30px)}

.chronicles-section{
  background:
    linear-gradient(rgba(0,0,0,.42),rgba(0,0,0,.68)),
    url("assets/images/hall.jpg") center/cover fixed;
}
.chronicle-menu{
  max-width:760px;margin:0 auto;
  display:grid;gap:22px;
}
.chronicle-button{
  width:100%;
  border:0;border-radius:10px;
  padding:26px 18px;
  background:linear-gradient(110deg,#f7d34d,#d69d12);
  color:#050505;
  font-family:var(--title);
  font-size:clamp(28px,6vw,46px);
  box-shadow:0 16px 35px rgba(0,0,0,.28);
  transition:transform .25s ease,filter .25s ease;
}
.chronicle-button:hover{transform:translateY(-3px);filter:brightness(1.05)}

.guest-section{
  background:
    linear-gradient(rgba(0,0,0,.66),rgba(0,0,0,.82)),
    url("assets/images/roses-bg.jpg") center/cover;
}
.candles-section,.treasures-section,.fortune-section,.shots-section{
  background:
    radial-gradient(circle at 50% 10%,rgba(246,202,60,.1),transparent 35%),
    linear-gradient(rgba(0,0,0,.72),rgba(0,0,0,.88)),
    url("assets/images/hall.jpg") center/cover;
}
.guest-panel{
  max-width:780px;
  margin:0 auto;
  padding:30px 18px 45px;
  background:rgba(0,0,0,.72);
  border:1px solid rgba(246,202,60,.15);
  box-shadow:0 20px 80px rgba(0,0,0,.45);
}
.guest-panel h2{
  margin-bottom:34px;
  font-size:clamp(52px,11vw,92px);
}
.names{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  color:var(--gold);
  font-size:clamp(23px,4.7vw,37px);
  line-height:1.08;
  text-align:center;
  text-shadow:0 2px 0 #5d3e00;
}

.venue-section{
  background:
    linear-gradient(rgba(255,255,255,.55),rgba(255,255,255,.18)),
    url("assets/images/hall.jpg") center/cover;
  color:#050505;
}
.venue-section h2{color:var(--gold)}
.venue-grid{
  max-width:900px;
  margin:0 auto;
  display:grid;
  gap:30px;
  align-items:center;
}
.venue-frame{max-width:520px;margin:auto}
.map-wrap{
  background:#0b0b0b;
  padding:14px;
  box-shadow:0 18px 50px rgba(0,0,0,.4);
}
.map-wrap img{width:100%;height:auto}
.map-button{margin:18px auto 0;display:flex;width:max-content}
.venue-details{
  max-width:760px;
  margin:30px auto 0;
  text-align:center;
  background:rgba(255,255,255,.85);
  padding:20px;
  border-radius:8px;
  font-size:22px;
}
.venue-details span{display:block;margin-top:5px}

.rsvp-section{
  min-height:75svh;
  display:grid;place-items:center;
  background:
    linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.85)),
    url("assets/images/hall.jpg") center/cover fixed;
}
.rsvp-card{
  width:min(92vw,650px);
  text-align:center;
  padding:55px 25px;
  border:2px solid var(--gold);
  background:rgba(5,5,5,.78);
  box-shadow:0 30px 80px rgba(0,0,0,.6);
}
.rsvp-seal{width:95px;margin:0 auto 20px}
.rsvp-card h2{font-size:clamp(48px,10vw,88px);margin-bottom:32px}

.footer{
  display:flex;justify-content:center;gap:12px;flex-wrap:wrap;
  padding:30px 20px 45px;
  background:#030303;
  color:#9d9d9d;
  font-size:16px;
}

.music-toggle{
  position:fixed;right:18px;bottom:18px;z-index:20;
  width:52px;height:52px;border-radius:50%;
  border:1px solid var(--gold);
  background:#080808;color:var(--gold);
  font-size:26px;
}

.reveal{opacity:0;transform:translateY(24px);transition:opacity .8s ease,transform .8s ease}
.reveal.visible{opacity:1;transform:none}

@media (min-width:760px){
  .gallery-before{grid-template-columns:repeat(2, minmax(240px,1fr))}
  .venue-grid{grid-template-columns:.8fr 1.2fr}
}
@media (max-width:560px){
  .page-section,.guest-section,.rsvp-section{padding-top:64px;padding-bottom:64px}
  h2{margin-bottom:30px}
  .gallery{grid-template-columns:1fr}
  .gallery-before .landscape:first-child{grid-column:auto}
  .dress-figures{min-height:350px}
  .figure{height:310px}
  .figure::before{width:64px;height:72px}
}


/* Updated supplied dress-code artwork */
.dress-art{
  max-width:900px;
  margin:30px auto 12px;
  display:flex;
  justify-content:center;
  align-items:center;
}
.dress-art img{
  width:min(100%, 820px);
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 18px 35px rgba(0,0,0,.5));
}

/* Collapsible Eighteen Chronicles */
.chronicles-toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  width:min(760px,100%);
  margin:0 auto 0;
  min-height:66px;
  padding:14px 22px;
  border:1px solid rgba(255,236,131,.72);
  border-radius:10px;
  background:linear-gradient(110deg,#f6d449,#d59a0d);
  color:#050505;
  font-family:var(--title);
  font-size:clamp(26px,5vw,40px);
  box-shadow:0 16px 35px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.5);
  transition:transform .25s ease,filter .25s ease;
}
.chronicles-toggle:hover{transform:translateY(-3px);filter:brightness(1.05)}
.chronicles-toggle[aria-expanded="true"]{border-radius:10px 10px 0 0}
.toggle-symbol{
  display:inline-grid;
  place-items:center;
  width:34px;height:34px;
  font-family:Arial,sans-serif;
  font-size:30px;
  line-height:1;
}
.chronicle-menu{
  max-height:0;
  opacity:0;
  overflow:hidden;
  width:min(760px,100%);
  margin:0 auto;
  gap:22px;
  display:grid;
  transition:max-height .45s ease,opacity .35s ease,padding .45s ease;
  padding:0;
}
.chronicle-menu.is-open{
  max-height:900px;
  opacity:1;
  padding:22px 0 4px;
}
.chronicle-menu[hidden]{display:grid}
@media (max-width:560px){
  .dress-art{margin-top:18px}
  .dress-art img{width:100%}
  .chronicles-toggle{min-height:58px}
}

/* Eighteen Chronicles: one collapsible section with nested guest-list panels */
.chronicles-toggle{display:flex;align-items:center;justify-content:center;gap:12px;width:min(760px,100%);margin:0 auto;min-height:66px;padding:14px 22px;border:1px solid rgba(255,236,131,.72);border-radius:10px;background:linear-gradient(110deg,#f6d449,#d59a0d);color:#050505;font-family:var(--title);font-size:clamp(26px,5vw,40px);box-shadow:0 16px 35px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.5);transition:transform .25s ease,filter .25s ease,border-radius .25s ease}
.chronicles-toggle:hover{transform:translateY(-3px);filter:brightness(1.05)}
.chronicles-toggle[aria-expanded="true"]{border-radius:10px 10px 0 0}
.toggle-symbol,.item-symbol{display:inline-grid;place-items:center;width:34px;height:34px;font-family:Arial,sans-serif;font-size:30px;line-height:1}
.chronicle-menu{width:min(760px,100%);margin:0 auto;display:grid;gap:12px;max-height:0;opacity:0;overflow:hidden;transition:max-height .5s ease,opacity .35s ease,padding .45s ease;padding:0}
.chronicle-menu.is-open{max-height:2200px;opacity:1;padding:18px 0 4px}
.chronicle-menu[hidden]{display:grid}
.chronicle-item{overflow:hidden;border:1px solid rgba(205,161,49,.45);background:rgba(10,8,6,.76);box-shadow:0 10px 28px rgba(0,0,0,.22)}
.chronicle-item-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 20px;border:0;background:linear-gradient(110deg,#f6d449,#d59a0d);color:#080706;font-family:var(--title);font-size:clamp(23px,4.5vw,34px);text-align:left;cursor:pointer}
.chronicle-item-toggle:hover{filter:brightness(1.06)}
.chronicle-item-content{max-height:0;opacity:0;overflow:hidden;transition:max-height .35s ease,opacity .25s ease,padding .35s ease;padding:0 20px}
.chronicle-item-content.is-open{max-height:900px;opacity:1;padding:18px 20px 22px}
.chronicle-item-content[hidden]{display:block}
.chronicle-item-content .names{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 22px;font-family:var(--body);color:#f4ead2;text-align:center;font-size:clamp(16px,2.5vw,21px);line-height:1.25}
.chronicle-item-content .names span{display:block}
@media (max-width:560px){.chronicles-toggle{min-height:58px}.chronicle-item-content .names{grid-template-columns:1fr;gap:7px}.chronicle-item-toggle{padding:13px 16px}}


/* Final invitation opening: aligned transparent PNG layers */
.intro-scene{
  min-height:100svh;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(18px,4vw,50px);
  background:#050505;
  overflow:hidden;
}

.intro-stage{
  position:relative;
  width:min(94vw, 720px);
  aspect-ratio:1200 / 1000;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}

.intro-layer{
  position:absolute;
  display:block;
  width:auto;
  height:auto;
  max-width:none;
  user-select:none;
  -webkit-user-drag:none;
  pointer-events:none;
  object-fit:contain;
}

.intro-envelope{
  z-index:10;
  width:100%;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
}

.intro-title-holder{
  z-index:20;
  width:62%;
  left:50%;
  top:47%;
  transform:translate(-50%,-50%) translateY(4%);
  opacity:0;
  transition:opacity .8s ease, transform .9s cubic-bezier(.2,.8,.2,1);
}

.intro-card{
  z-index:30;
  width:54%;
  left:50%;
  top:48%;
  transform:translate(-50%,-50%) translateY(24px) scale(.96);
  opacity:0;
  transition:opacity .9s ease .2s, transform 1s cubic-bezier(.2,.8,.2,1) .2s;
}

.seal-trigger{
  z-index:40;
  position:absolute;
  width:24%;
  aspect-ratio:1;
  left:50%;
  top:69%;
  transform:translate(-50%,-50%);
  border:0;
  background:transparent;
  cursor:pointer;
  border-radius:50%;
}

.seal-hint{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:max-content;
  font-family:var(--body);
  font-size:clamp(15px,2.2vw,23px);
  color:#fff;
  text-shadow:0 2px 8px #000;
  pointer-events:none;
  transition:opacity .3s ease;
}

.intro-scene.is-open .intro-envelope{
  opacity:0;
  transform:translate(-50%,-50%) scale(1.04);
  transition:opacity .7s ease, transform .9s ease;
}

.intro-scene.is-open .intro-title-holder{
  opacity:1;
  transform:translate(-50%,-50%) translateY(0);
}

.intro-scene.is-open .intro-card{
  opacity:1;
  transform:translate(-50%,-50%) translateY(0) scale(1);
}

.intro-scene.is-open .seal-trigger{
  pointer-events:none;
}

.intro-scene.is-open .seal-hint{
  opacity:0;
}

.uncover-details{
  position:absolute;
  z-index:50;
  left:50%;
  bottom:clamp(24px,5vh,65px);
  transform:translateX(-50%);
  padding:14px 30px;
  border:1px solid rgba(255,236,131,.8);
  border-radius:8px;
  background:linear-gradient(110deg,#f6d449,#d59a0d);
  color:#080706;
  font-family:var(--title);
  font-size:clamp(20px,3vw,30px);
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transition:opacity .5s ease, transform .25s ease, filter .25s ease;
}
.intro-scene.is-open .uncover-details{
  opacity:1;
  pointer-events:auto;
}
.uncover-details:hover{
  transform:translateX(-50%) translateY(-3px);
  filter:brightness(1.06);
}

@media (max-width:600px){
  .intro-scene{padding:10px}
  .intro-stage{width:100vw; aspect-ratio:1200/1000}
  .intro-title-holder{width:72%; top:47%}
  .intro-card{width:64%; top:48%}
  .seal-trigger{width:30%; top:69%}
  .uncover-details{bottom:18px; padding:11px 22px}
}


/* V4 responsive gallery */
.gallery-before{
  width:min(1180px,100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:clamp(12px,2vw,24px);
  align-items:start;
}

.gallery-card{
  position:relative;
  margin:0;
  overflow:hidden;
  border:1px solid rgba(246,202,60,.48);
  background:#0b0b0b;
  box-shadow:0 16px 38px rgba(0,0,0,.42);
  border-radius:2px;
}

.gallery-card img{
  width:100%;
  height:auto;
  display:block;
  transition:transform .65s cubic-bezier(.2,.8,.2,1),filter .4s ease;
}

.gallery-card:hover img{
  transform:scale(1.025);
  filter:brightness(1.04);
}

.gallery-hero{grid-column:span 7}
.gallery-tall{grid-column:span 5}
.gallery-wide{grid-column:span 7}

.gallery-card:nth-child(4){grid-column:span 5}
.gallery-card:nth-child(5){grid-column:span 7}
.gallery-card:nth-child(6){grid-column:span 5}
.gallery-card:nth-child(7){grid-column:span 7}
.gallery-card:nth-child(8){grid-column:span 5}
.gallery-card:nth-child(9){grid-column:span 7}
.gallery-card:nth-child(10){grid-column:span 5}

/* No artificial cropping: every original photo ratio is preserved. */
.gallery-card img{object-fit:contain}

/* Correct hidden behavior for nested Chronicles. */
.chronicle-menu[hidden],
.chronicle-item-content[hidden]{display:none}
.chronicle-menu.is-open{display:grid}

/* Music control */
.audio-toggle{
  position:fixed;
  right:max(14px,env(safe-area-inset-right));
  bottom:max(14px,env(safe-area-inset-bottom));
  z-index:95;
  min-width:112px;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:8px 14px;
  border:1px solid rgba(246,202,60,.7);
  border-radius:999px;
  background:rgba(5,5,5,.84);
  color:var(--gold);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:0 8px 24px rgba(0,0,0,.4);
  font-family:var(--body);
  font-size:17px;
}
.audio-toggle.is-playing{
  background:rgba(246,202,60,.94);
  color:#080706;
}
.audio-icon{font-family:Georgia,serif;font-size:20px;line-height:1}
.audio-label{white-space:nowrap}

@media (max-width:760px){
  .page-section,.guest-section,.rsvp-section{
    min-height:auto;
    padding:72px 16px 88px;
  }

  h2{
    font-size:clamp(44px,14vw,78px);
    margin-bottom:28px;
  }

  .gallery-before{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }

  .gallery-card,
  .gallery-card:nth-child(n){
    grid-column:span 1;
  }

  /* Keep the gallery visually varied on phones without cropping. */
  .gallery-card:nth-child(1),
  .gallery-card:nth-child(3),
  .gallery-card:nth-child(5),
  .gallery-card:nth-child(7),
  .gallery-card:nth-child(9){
    grid-column:1 / -1;
  }

  .audio-toggle{
    right:12px;
    bottom:12px;
    min-width:48px;
    width:48px;
    height:48px;
    padding:0;
  }
  .audio-label{display:none}
  .audio-icon{font-size:22px}
}

@media (max-width:430px){
  .gallery-before{gap:9px}
  .gallery-card{border-color:rgba(246,202,60,.38)}
}


/* V5: PDF-faithful invitation opening flow */
.intro-flow{
  position:relative;
  min-height:100svh;
  width:100%;
  overflow:hidden;
  background:#050505;
  display:grid;
  place-items:center;
  isolation:isolate;
}
.intro-backdrop{
  position:absolute;
  inset:0;
  z-index:0;
  background:#050505 url("assets/images/website-background.png") center/cover no-repeat;
  filter:saturate(.72) brightness(.72);
}
.intro-backdrop::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.12),rgba(0,0,0,.38))}
.intro-step{position:absolute;inset:0;display:grid;place-items:center;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .55s ease,visibility .55s ease}
.intro-step.is-active{opacity:1;visibility:visible;pointer-events:auto}
.intro-art{position:absolute;width:min(92vw,760px);height:auto;max-height:88svh;object-fit:contain;user-select:none;-webkit-user-drag:none;filter:drop-shadow(0 24px 28px rgba(0,0,0,.36))}
.intro-step-1 .intro-art{transform:translateY(0) scale(1)}
.intro-step-2 .intro-art{transform:translateY(18px) scale(.97);transition:transform .75s cubic-bezier(.2,.8,.2,1)}
.intro-step-2.is-active .intro-art{transform:translateY(0) scale(1)}
.intro-step-3 .intro-art{transform:translateY(28px) scale(.96);transition:transform .8s cubic-bezier(.2,.8,.2,1)}
.intro-step-3.is-active .intro-art{transform:translateY(0) scale(1)}
.hotspot{position:absolute;z-index:5;border:0;background:transparent;cursor:pointer;padding:0;border-radius:50%;-webkit-tap-highlight-color:transparent}
.hotspot:focus-visible{outline:2px solid #f6d449;outline-offset:5px}
/* The actual seal positions in the supplied transparent PNGs. */
.hotspot-closed-seal{width:15%;aspect-ratio:1;left:50%;top:56%;transform:translate(-50%,-50%)}
.hotspot-open-seal{width:15%;aspect-ratio:1;left:17.1%;top:88.4%;transform:translate(-50%,-50%)}
/* The invitation artwork already contains the Uncover the Details button. */
.hotspot-details{width:30%;height:8%;left:50%;top:89%;transform:translate(-50%,-50%);border-radius:12px}

/* Direct category buttons, matching the PDF: no Open the Chronicles control. */
.chronicle-menu-direct{width:min(760px,100%);margin:0 auto;display:grid;gap:22px;opacity:1;max-height:none;padding:0;overflow:visible}
.chronicle-menu-direct .chronicle-item{border:0;background:transparent;box-shadow:none;overflow:visible}
.chronicle-menu-direct .chronicle-item-toggle{
  width:100%;min-height:96px;padding:18px 28px;border:1px solid rgba(255,236,131,.65);border-radius:12px;
  background:linear-gradient(110deg,#f6d449,#d59a0d);color:#070606;font-family:"Pirata One","Vighty",serif;font-size:clamp(28px,5vw,44px);font-weight:400;text-align:center;justify-content:center;position:relative;
  box-shadow:0 15px 30px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.35);transition:transform .25s ease,filter .25s ease,border-radius .25s ease
}
.chronicle-menu-direct .chronicle-item-toggle .item-symbol{position:absolute;right:22px;font-family:Arial,sans-serif;font-size:27px}
.chronicle-menu-direct .chronicle-item-toggle:hover{transform:translateY(-2px);filter:brightness(1.05)}
.chronicle-menu-direct .chronicle-item-content{border:1px solid rgba(205,161,49,.45);border-top:0;background:rgba(8,7,6,.82);border-radius:0 0 12px 12px;margin-top:-22px;padding:0 24px;max-height:0;opacity:0;overflow:hidden;transition:max-height .42s ease,opacity .3s ease,padding .35s ease}
.chronicle-menu-direct .chronicle-item-content.is-open{max-height:1100px;opacity:1;padding:24px}
.chronicle-menu-direct .chronicle-item-content[hidden]{display:none}
.chronicle-menu-direct .names{font-family:"Pirata One",serif;font-size:clamp(18px,2.8vw,24px);line-height:1.35;color:#f7ecd5}

.gold-button{font-family:"Pirata One",serif !important;font-weight:400}

@media(max-width:760px){
  .intro-art{width:96vw;max-height:82svh}
  .hotspot-closed-seal{width:19%;top:61%}
  .hotspot-open-seal{width:19%;left:16%;top:70%}
  .hotspot-details{width:38%;height:9%;top:89%}
  .chronicle-menu-direct{gap:14px}
  .chronicle-menu-direct .chronicle-item-toggle{min-height:72px;padding:14px 42px 14px 18px;font-size:clamp(25px,8vw,36px)}
  .chronicle-menu-direct .chronicle-item-toggle .item-symbol{right:14px}
}
@media(max-width:430px){
  .intro-art{width:103vw;max-height:78svh}
  .hotspot-closed-seal{width:22%;top:61%}
  .hotspot-open-seal{width:22%;left:16%;top:70%}
  .hotspot-details{width:44%;height:10%;top:89%}
}


#site{visibility:hidden;opacity:0;pointer-events:none;}
#site.is-revealed{visibility:visible;opacity:1;pointer-events:auto;transition:opacity .65s ease .15s}
.intro-flow.is-complete{opacity:0;pointer-events:none;transition:opacity .65s ease;}

.audio-toggle{opacity:0;pointer-events:none;transition:opacity .35s ease}
#site.is-revealed ~ .audio-toggle{opacity:1;pointer-events:auto}





/* V7: glowing second seal on the slightly-open envelope */
.intro-step-2 .hotspot-open-seal::before{
  content:"";
  position:absolute;
  inset:-30%;
  border-radius:50%;
  background:radial-gradient(
    circle,
    rgba(255,244,163,.95) 0 5%,
    rgba(246,202,60,.75) 13%,
    rgba(246,202,60,.34) 30%,
    rgba(246,202,60,.10) 47%,
    transparent 70%
  );
  filter:blur(2px);
  pointer-events:none;
  animation:openSealGlow 1.25s ease-in-out infinite;
}
.intro-step-2 .hotspot-open-seal::after{
  content:"";
  position:absolute;
  inset:-14%;
  border:2px solid rgba(246,202,60,.78);
  border-radius:50%;
  box-shadow:
    0 0 10px rgba(246,202,60,.9),
    0 0 25px rgba(246,202,60,.65),
    0 0 50px rgba(246,202,60,.35);
  animation:openSealRing 1.25s ease-in-out infinite;
  pointer-events:none;
}
@keyframes openSealGlow{
  0%,100%{transform:scale(.88);opacity:.55}
  50%{transform:scale(1.12);opacity:1}
}
@keyframes openSealRing{
  0%,100%{transform:scale(.92);opacity:.55}
  50%{transform:scale(1.08);opacity:1}
}

/* Make the second-step hit area easy to tap without visually changing the art. */
.intro-step-2 .hotspot-open-seal{
  z-index:20;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

/* Keep the actual step transitions deliberate. */
.intro-step-1,
.intro-step-2,
.intro-step-3{
  transition:opacity .65s ease, visibility .65s ease;
}
.intro-step-2.is-active .intro-art{
  animation:step2Settle .75s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes step2Settle{
  from{transform:translateY(18px) scale(.97);opacity:.65}
  to{transform:translateY(0) scale(1);opacity:1}
}

@media(max-width:760px){
  .hotspot-closed-seal{width:19%;top:56%}
  .hotspot-open-seal{width:19%;left:17.1%;top:88.4%}
}
@media(max-width:430px){
  .hotspot-closed-seal{width:22%;top:56%}
  .hotspot-open-seal{width:23%;left:17.1%;top:88.4%}
}


/* FINAL FLOW OVERRIDES */
.intro-scene{
  position:relative;
  min-height:100svh;
  width:100%;
  display:grid;
  place-items:center;
  background:#050505;
  overflow:hidden;
}

.intro-stage{
  position:relative;
  width:min(100vw, 900px);
  height:min(100svh, 900px);
  min-height:620px;
  display:grid;
  place-items:center;
  margin:0 auto;
}

.intro-step{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .7s ease, visibility 0s linear .7s;
}

.intro-step.is-active{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:opacity .7s ease, visibility 0s linear 0s;
}

.intro-art{
  position:absolute;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  user-select:none;
  -webkit-user-drag:none;
  pointer-events:none;
}

.seal-hotspot{
  position:absolute;
  z-index:10;
  border:0;
  background:transparent;
  border-radius:50%;
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

/* Step 1 seal location */
.closed-seal{
  width:clamp(80px,14vw,140px);
  height:clamp(80px,14vw,140px);
  left:50%;
  top:56%;
  transform:translate(-50%,-50%);
}

/* Step 2: target the actual lower-left seal in envelope-open.png */
.open-seal{
  width:clamp(72px,12vw,120px);
  height:clamp(72px,12vw,120px);
  left:17.1%;
  top:88.4%;
  transform:translate(-50%,-50%);
}

/* The actual seal hotspot glows, not a separate fake seal. */
.glowing-seal::before{
  content:"";
  position:absolute;
  inset:-25%;
  border-radius:50%;
  background:radial-gradient(
    circle,
    rgba(255,248,190,.98) 0 5%,
    rgba(246,202,60,.85) 14%,
    rgba(246,202,60,.42) 32%,
    rgba(246,202,60,.12) 52%,
    transparent 72%
  );
  filter:blur(3px);
  animation:sealGlow 1.25s ease-in-out infinite;
  pointer-events:none;
}

.glowing-seal::after{
  content:"";
  position:absolute;
  inset:-10%;
  border:2px solid rgba(255,220,76,.88);
  border-radius:50%;
  box-shadow:
    0 0 12px rgba(246,202,60,.95),
    0 0 28px rgba(246,202,60,.7),
    0 0 52px rgba(246,202,60,.38);
  animation:sealRing 1.25s ease-in-out infinite;
  pointer-events:none;
}

@keyframes sealGlow{
  0%,100%{transform:scale(.88);opacity:.55}
  50%{transform:scale(1.14);opacity:1}
}

@keyframes sealRing{
  0%,100%{transform:scale(.9);opacity:.55}
  50%{transform:scale(1.1);opacity:1}
}

.step-hint{
  position:absolute;
  z-index:12;
  bottom:8%;
  left:50%;
  transform:translateX(-50%);
  margin:0;
  color:#fff;
  font-family:var(--body);
  font-size:clamp(17px,3vw,27px);
  text-shadow:0 2px 12px #000;
  pointer-events:none;
}

.intro-scene.is-complete{
  opacity:0;
  pointer-events:none;
  visibility:hidden;
  transition:opacity .75s ease, visibility 0s linear .75s;
}

/* Mobile: scale the artwork without changing the seal positions. */
@media(max-width:760px){
  .intro-stage{
    width:100vw;
    height:100svh;
    min-height:560px;
  }

  .closed-seal{
    width:22vw;
    height:22vw;
    min-width:76px;
    min-height:76px;
    top:56%;
  }

  .open-seal{
    width:22vw;
    height:22vw;
    min-width:72px;
    min-height:72px;
    left:17.1%;
    top:88.4%;
  }

  .step-hint{
    bottom:7%;
  }
}

@media(max-width:430px){
  .intro-stage{min-height:520px}
  .closed-seal{top:56%}
  .open-seal{left:17.1%;top:88.4%}
}

.site:not(.is-revealed){
  opacity:0;
  visibility:hidden;
}
.site.is-revealed{
  opacity:1;
  visibility:visible;
}


/* RSVP: seal-new.png is now tightly cropped, so this size is the actual seal size. */
.rsvp-seal{
  display:block;
  width:180px;
  max-width:48vw;
  height:auto;
  margin:0 auto 24px;
  object-fit:contain;
  filter:
    drop-shadow(0 0 8px rgba(246,202,60,.38))
    drop-shadow(0 12px 24px rgba(0,0,0,.55));
}

@media(max-width:560px){
  .rsvp-seal{
    width:155px;
    max-width:55vw;
    margin-bottom:22px;
  }

  .details-image-hotspot{
    width:35%;
    height:9%;
    top:91.2%;
  }
}

@media(max-width:430px){
  .rsvp-seal{
    width:145px;
  }

  .details-image-hotspot{
    width:38%;
    height:9.5%;
    top:91.2%;
  }
}


/* V10: real HTML button over the button printed in invitation-clear.png.
   The PNG button is intentionally covered, so visitors see and interact with
   one clean HTML button only. */
.details-image-button{
  position:absolute;
  z-index:40;
  left:50%;
  top:91.2%;
  transform:translate(-50%,-50%);
  width:32%;
  min-height:54px;
  padding:10px 18px;
  border:1px solid rgba(255,236,131,.9);
  border-radius:8px;
  background:linear-gradient(110deg,#f6d449,#d59a0d);
  color:#080808;
  font-family:"Pirata One", Georgia, serif;
  font-size:clamp(20px,3.6vw,30px);
  line-height:1.05;
  letter-spacing:.02em;
  text-align:center;
  box-shadow:
    0 0 12px rgba(246,202,60,.35),
    0 7px 20px rgba(0,0,0,.42);
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

.details-image-button:hover{
  filter:brightness(1.07);
  box-shadow:
    0 0 24px rgba(246,202,60,.55),
    0 10px 26px rgba(0,0,0,.48);
}

.details-image-button:active{
  transform:translate(-50%,-50%) scale(.98);
}

.details-image-button:focus-visible{
  outline:2px solid rgba(255,240,145,.95);
  outline-offset:4px;
}

@media(max-width:760px){
  .details-image-button{
    width:35%;
    min-height:50px;
    top:91.2%;
    font-size:clamp(18px,4.5vw,25px);
    padding:9px 12px;
  }
}

@media(max-width:430px){
  .details-image-button{
    width:38%;
    min-height:46px;
    top:91.2%;
    font-size:18px;
    padding:8px 9px;
  }
}


/* V11 mobile gallery alignment:
   Portrait images (.gallery-tall) are centered as individual cards.
   Their original aspect ratio is preserved; no cropping. */
@media (max-width:560px){
  .gallery-before{
    display:grid;
    grid-template-columns:1fr;
    justify-items:center;
  }

  .gallery-before .gallery-card.gallery-tall{
    grid-column:1 / -1 !important;
    width:min(88vw, 430px);
    justify-self:center;
  }

  .gallery-before .gallery-card.gallery-tall img{
    width:100%;
    height:auto;
    object-fit:contain;
  }

  /* Wide/landscape images stay centered too, but can use more screen width. */
  .gallery-before .gallery-card.gallery-wide,
  .gallery-before .gallery-card.gallery-hero{
    grid-column:1 / -1 !important;
    width:min(94vw, 760px);
    justify-self:center;
  }
}
