/* Premium-elegant, mobil-first */
:root{
  --bg:#fbf7f3;
  --card:rgba(255,255,255,.78);
  --text:#1f1f1f;
  --muted:rgba(0,0,0,.62);
  --line:rgba(0,0,0,.10);
  --accent:#b07a67;
  --accent2:#9a5f4c;
  --shadow:0 12px 44px rgba(0,0,0,.12);
  --radius:22px;
  --max:980px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 20% 0%, #fff 0%, var(--bg) 62%) fixed;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

.wrap{max-width:var(--max);margin:0 auto;padding:24px}
a{color:inherit}
b{font-weight:600}
.muted{color:var(--muted)}
.tiny{font-size:12px}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}

/* Music gate */
.musicGate{
  position:fixed; inset:0; z-index:999;
  display:grid; place-items:center;
  padding:24px;
  background: linear-gradient(180deg, rgba(251,247,243,.86), rgba(251,247,243,.96));
  backdrop-filter: blur(10px);
}
.musicGate[hidden]{display:none}
.musicGateCard{
  width:min(560px, 100%);
  background:rgba(255,255,255,.85);
  border:1px solid var(--line);
  border-radius:28px;
  padding:22px 18px;
  box-shadow:var(--shadow);
  text-align:center;
  animation: pop .5s ease-out;
}
@keyframes pop{from{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}
.badge{
  width:54px;height:54px;border-radius:18px;
  display:grid;place-items:center;
  margin:0 auto 10px;
  background:rgba(176,122,103,.12);
  border:1px solid rgba(176,122,103,.22);
}
.musicGateCard h2{
  margin:8px 0 6px;
  font-family:"Playfair Display",ui-serif,Georgia,serif;
  font-size:26px;
}
.musicGateCard p{margin:0 0 14px;color:var(--muted)}
.gateBtns{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.gateBtns .btn{min-width: 190px}
.musicGateCard .tiny{margin-top:12px}

/* Topbar */
.topbar{
  position:sticky; top:0; z-index:50;
  background:rgba(251,247,243,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.topbarInner{
  max-width:var(--max);
  margin:0 auto;
  padding:14px 16px;
  display:flex;
  align-items:center;
  gap:12px;
}
.brand{display:flex;flex-direction:column;gap:2px}
.brandOverline{
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:11px;
  color:var(--muted);
}
.brandNames{
  font-family:"Playfair Display",ui-serif,Georgia,serif;
  font-size:18px;
}
.nav{
  margin-left:auto;
  display:flex; gap:8px; flex-wrap:wrap;
}
.nav a{
  text-decoration:none;
  font-size:13px;
  color:var(--muted);
  padding:8px 10px;
  border-radius:999px;
}
.nav a:hover{background:rgba(0,0,0,.05);color:var(--text)}
.musicToggle{
  border:1px solid var(--line);
  background:rgba(255,255,255,.72);
  border-radius:999px;
  width:44px;height:44px;
  display:grid;place-items:center;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(0,0,0,.06);
  position:relative;
}
.musicToggle .dot{
  position:absolute; top:10px; right:10px;
  width:8px;height:8px;border-radius:99px;
  background:rgba(0,0,0,.18);
}
.musicToggle.isOn .dot{background:rgba(176,122,103,.9)}
.musicToggle .note{font-size:16px;color:var(--muted)}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center; justify-content:center;
  padding:12px 16px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.72);
  text-decoration:none;
  cursor:pointer;
  font-size:14px;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn:hover{transform: translateY(-1px)}
.btn.primary{
  border-color:transparent;
  color:#fff;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent2) 100%);
}
.btn.ghost{background:transparent}

/* Hero */
.hero{position:relative; min-height: 92svh; display:grid; align-items:end}
.heroMedia{
  position:absolute; inset:0; overflow:hidden;
}
.heroMedia img{
  width:100%; height:100%;
  object-fit:cover;
  transform: scale(1.04);
  filter:saturate(1.05) contrast(1.02);
}
.heroShade{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.55) 85%);
}
.heroContent{position:relative; z-index:1; padding-bottom: 28px; color:#fff}
.kicker{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22);
  font-size:13px;
  letter-spacing:.03em;
}
.title{
  margin:14px 0 6px;
  font-family:"Playfair Display",ui-serif,Georgia,serif;
  font-size: clamp(40px, 6vw, 74px);
  line-height:1.02;
}
.amp{opacity:.95}
.subtitle{margin:0; color:rgba(255,255,255,.88); max-width: 60ch}
.heroBtns{margin-top:16px; display:flex; gap:10px; flex-wrap:wrap}

.countdown{
  margin-top:18px;
  display:flex; gap:10px; flex-wrap:wrap;
}
.cdItem{
  min-width: 92px;
  padding:12px 12px;
  border-radius:18px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
}
.cdNum{
  font-size:22px;
  font-weight:600;
}
.cdLbl{
  font-size:12px;
  color:rgba(255,255,255,.85);
}

.scrollHint{
  position:absolute; left:50%; bottom:12px;
  transform:translateX(-50%);
  color:rgba(255,255,255,.75);
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  opacity:.85;
  animation: float 1.6s ease-in-out infinite;
}
@keyframes float{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,-6px)}}

/* Sections */
.section{padding: 22px 0}
.grid{display:grid; grid-template-columns:1.2fr .8fr; gap:16px}
@media (max-width: 920px){
  .grid{grid-template-columns:1fr}
  .nav{display:none} /* mobile: cleaner */
}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:0 10px 26px rgba(0,0,0,.06);
  backdrop-filter: blur(10px);
}
.card.wide{padding:18px}
h2{
  margin:0 0 10px;
  font-family:"Playfair Display",ui-serif,Georgia,serif;
  font-size:26px;
  letter-spacing:.01em;
}
.h2small{font-size:22px}
.pills{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.pill{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.6);
  font-size:13px;
  color:var(--muted);
  text-decoration:none;
}
.pill.link:hover{filter:brightness(1.02);transform:translateY(-1px)}

.divider{height:1px;background:var(--line);margin:16px 0}

/* Details */
.detailsHeader{
  display:flex; gap:12px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap;
}
.detailsActions{display:flex;gap:10px;flex-wrap:wrap}
.detailsGrid{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
}
@media (max-width: 920px){ .detailsGrid{grid-template-columns:1fr 1fr} }
@media (max-width: 520px){ .detailsGrid{grid-template-columns:1fr} }

.infoBox{
  border:1px dashed rgba(0,0,0,.14);
  background:rgba(255,255,255,.55);
  border-radius:18px;
  padding:12px;
}
.infoTitle{font-weight:600;margin-bottom:6px}
.infoText{color:var(--muted)}

/* Timeline */
.timeline{display:grid; gap:10px}
.tItem{
  display:flex; gap:12px; align-items:flex-start;
  padding:12px;
  border-radius:18px;
  border:1px dashed rgba(0,0,0,.14);
  background:rgba(255,255,255,.55);
}
.tTime{min-width:70px;font-weight:600}
.tText{color:var(--text)}
.tText .muted{display:inline-block;margin-top:2px}

/* FAQ */
details{
  border:1px solid var(--line);
  background:rgba(255,255,255,.55);
  border-radius:18px;
  padding:12px 14px;
}
details + details{margin-top:10px}
summary{cursor:pointer;font-weight:600;list-style:none}
summary::-webkit-details-marker{display:none}

/* Gallery */
.galleryHead{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.gallery{display:grid;grid-template-columns:repeat(12,1fr);gap:12px;margin-top:12px}
.g{
  border:none;
  padding:0;
  background:transparent;
  border-radius:18px;
  overflow:hidden;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(0,0,0,.06);
  border:1px solid var(--line);
}
.g img{width:100%;height:100%;object-fit:cover;display:block;transition: transform .35s ease}
.g:hover img{transform: scale(1.03)}
.g1{grid-column:span 7; aspect-ratio: 16/10}
.g2{grid-column:span 5; aspect-ratio: 10/10}
.g3{grid-column:span 5; aspect-ratio: 10/10}
.g4{grid-column:span 7; aspect-ratio: 16/10}
@media (max-width: 920px){
  .g1,.g2,.g3,.g4{grid-column:span 12}
}

/* Form */
form{display:grid;gap:10px}
label{font-size:13px;color:var(--muted)}
input,select,textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.78);
  outline:none;
  font-size:14px;
}
textarea{min-height:110px;resize:vertical}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width: 640px){.two{grid-template-columns:1fr}}
.formMsg{margin-top:6px;font-size:13px;color:var(--muted)}

/* Footer */
.footer{padding: 18px 0 36px}
.footerInner{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.sig{font-family:"Playfair Display",ui-serif,Georgia,serif}

/* Lightbox */
.lightbox{
  position:fixed; inset:0; z-index:200;
  display:none;
  background: rgba(0,0,0,.78);
  padding:18px;
}
.lightbox.isOpen{display:grid;place-items:center}
.lightbox img{
  width:min(1100px, 100%);
  max-height: 84svh;
  object-fit:contain;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.18);
}
.lbClose{
  position:absolute; top:14px; right:14px;
  width:44px;height:44px;border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color:#fff;
  font-size:24px;
  cursor:pointer;
}

/* Reveal animations */
.reveal{
  opacity:0;
  transform: translateY(10px);
  transition: opacity .75s ease, transform .75s ease;
  transition-delay: var(--d, 0ms);
}
.reveal.isVisible{opacity:1;transform: translateY(0)}

/* Anchor offset */
#story,#details,#timeline,#gallery,#rsvp{scroll-margin-top:88px}


/* Map embed */
.mapCard{
  margin-top: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.62);
  border-radius: 20px;
  overflow:hidden;
}
.mapHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding: 12px 12px 0;
}
.mapTitle{font-weight:600}
.mapFrame{
  margin-top:10px;
  width:100%;
  aspect-ratio: 16/9;
  border-top:1px solid var(--line);
}
.mapFrame iframe{
  width:100%;
  height:100%;
  border:0;
}

/* Carousel (Foto-Rondell) */
.carousel{
  position:relative;
  margin-top: 12px;
  display:flex;
  align-items:center;
  gap:10px;
}
.carBtn{
  width:42px;height:42px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.72);
  box-shadow:0 8px 18px rgba(0,0,0,.06);
  cursor:pointer;
  display:grid; place-items:center;
  font-size:26px;
  line-height:1;
  user-select:none;
}
@media (max-width: 920px){
  .carBtn{display:none} /* mobile: swipe */
}

.carTrack{
  flex:1;
  display:grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72%, 520px);
  gap: 12px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-padding: 18px;
  padding: 4px 8px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carTrack::-webkit-scrollbar{display:none}

.carItem{
  border:none;
  padding:0;
  background:transparent;
  border-radius: 20px;
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  scroll-snap-align: center;
  transform: scale(.94);
  transition: transform .25s ease, filter .25s ease;
}
.carItem img{width:100%;height:100%;object-fit:cover;aspect-ratio: 16/10;display:block}
.carItem.isCenter{transform: scale(1.00); filter:saturate(1.03) contrast(1.02)}
.dots{display:flex;gap:8px;justify-content:center;margin-top:8px}
.dotBtn{
  width:8px;height:8px;border-radius:99px;
  border:1px solid rgba(0,0,0,.18);
  background: rgba(0,0,0,.08);
}
.dotBtn.isOn{background: rgba(176,122,103,.85); border-color: rgba(176,122,103,.85)}


/* Auto-running rondell */
.carousel.auto{
  overflow:hidden;
  margin-top:14px;
}
.carTrack.auto{
  display:flex;
  gap:14px;
  animation: scrollLoop 35s linear infinite;
}
.carItem{
  flex:0 0 60%;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 12px 30px rgba(0,0,0,.12);
}
.carItem img{
  width:100%;
  height:100%;
  object-fit:cover;
  aspect-ratio:16/10;
}

@keyframes scrollLoop{
  0%{transform:translateX(0)}
  100%{transform:translateX(-50%)}
}


/* Cinematic Crossfade Rondell (autoplay, no interaction) */
.carouselX{
  margin-top: 12px;
}
.carouselXStage{
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0,0,0,.14);
  background: rgba(255,255,255,.55);
}

/* Each slide overlays the stage */
.cxSlide{
  position:absolute; inset:0;
  opacity:0;
  animation: cxFade 35s infinite;
}
.cxSlide img{
  width:100%; height:100%;
  object-fit: cover;
  transform-origin: 50% 50%;
  animation: kenBurns 14s ease-in-out infinite;
  filter: saturate(1.03) contrast(1.02);
}

/* Stagger starts so only one is visible at a time */
.cxSlide.s1{animation-delay: 0s}
.cxSlide.s2{animation-delay: 7s}
.cxSlide.s3{animation-delay: 14s}
.cxSlide.s4{animation-delay: 21s}
.cxSlide.s5{animation-delay: 28s}

/* Smooth fade with gentle hold */
@keyframes cxFade{
  0%   {opacity:0}
  6%   {opacity:1}
  18%  {opacity:1}
  26%  {opacity:0}
  100% {opacity:0}
}

/* Cinematic subtle zoom/pan (Ken Burns) */
@keyframes kenBurns{
  0%   {transform: scale(1.04) translate3d(-1.2%, -1.2%, 0)}
  50%  {transform: scale(1.08) translate3d(1.2%, 1.0%, 0)}
  100% {transform: scale(1.04) translate3d(-1.2%, -1.2%, 0)}
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .cxSlide, .cxSlide img{ animation: none !important; opacity:1 }
  .cxSlide{ position:relative; }
  .carouselXStage{ aspect-ratio: auto; }
}


/* Password Gate */
.pwdGate{
  position:fixed; inset:0; z-index:1000;
  display:grid; place-items:center;
  padding:24px;
  background: linear-gradient(180deg, rgba(251,247,243,.86), rgba(251,247,243,.96));
  backdrop-filter: blur(10px);
}
.pwdGate[hidden]{display:none}
.pwdGateCard{
  width:min(560px, 100%);
  background:rgba(255,255,255,.88);
  border:1px solid var(--line);
  border-radius:28px;
  padding:22px 18px;
  box-shadow:var(--shadow);
  text-align:center;
  animation: pop .5s ease-out;
}
.pwdGateCard h2{
  margin:8px 0 6px;
  font-family:"Playfair Display",ui-serif,Georgia,serif;
  font-size:26px;
}
.pwdGateCard p{margin:0 0 14px;color:var(--muted)}
#pwdForm{display:grid;gap:10px;margin-top:6px}
#pwdInput{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.80);
  outline:none;
  font-size:14px;
}
