@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Jost:wght@300;400;500;600&family=Parisienne&display=swap');

:root{
  --ivory:#FBF5F1;
  --blush:#F3DCE3;
  --rose:#C97B93;
  --wine:#6E3049;
  --ink:#2A1B22;
  --gold:#C9A66B;
  --gold-light:#E7D4A8;
  --glass: rgba(255,255,255,0.14);
  --glass-border: rgba(255,255,255,0.35);
}

*{box-sizing:border-box; margin:0; padding:0;}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; scroll-behavior:auto !important;}
}

html{scroll-behavior:smooth;}

body{
  font-family:'Jost', sans-serif;
  font-weight:300;
  background:var(--ivory);
  color:var(--ink);
  overflow-x:hidden;
}

h1,h2,h3{ font-family:'Cormorant Garamond', serif; font-weight:600; letter-spacing:0.01em;}
.script{ font-family:'Parisienne', cursive; font-weight:400; color:var(--rose); }
.eyebrow{
  font-family:'Jost', sans-serif;
  font-size:0.72rem;
  letter-spacing:0.35em;
  text-transform:uppercase;
  color:var(--gold);
}

a{ color:inherit; text-decoration:none; }
:focus-visible{ outline:2px solid var(--gold); outline-offset:3px; }

/* ---------- PETALS (fall, then rewind upward: blush -> gold) ---------- */
.petal{
  position:fixed; top:-4vh; border-radius:50% 0 50% 50%;
  background:var(--rose); opacity:0; pointer-events:none;
  animation:fallRewind linear infinite; z-index:2;
}
@keyframes fallRewind{
  0%{   transform:translateY(0)     rotate(0deg);   background:var(--rose);       opacity:0;   }
  8%{                                                                              opacity:0.55;}
  42%{  transform:translateY(96vh)  rotate(240deg); background:var(--rose);       opacity:0.55;}
  50%{  transform:translateY(104vh) rotate(260deg); background:var(--gold);       opacity:0.65;}
  92%{  transform:translateY(8vh)   rotate(30deg);  background:var(--gold-light); opacity:0.4; }
  100%{ transform:translateY(0)     rotate(0deg);   background:var(--gold-light); opacity:0;   }
}

/* ---------- GLASS ---------- */
.glass{
  background:var(--glass);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border:1px solid var(--glass-border);
  border-radius:18px;
}

/* ---------- LOCKSCREEN ---------- */
#lockscreen{
  position:fixed; inset:0; z-index:999;
  display:flex; align-items:center; justify-content:center;
  background:
    linear-gradient(160deg, rgba(110,48,73,0.88), rgba(201,123,147,0.75)),
    url('https://images.unsplash.com/photo-1519741497674-611481863552?q=80&w=1600&auto=format&fit=crop') center/cover;
  transition:opacity 0.7s ease, visibility 0.7s ease;
}
#lockscreen.hidden{ opacity:0; visibility:hidden; }

/* ---------- PERSONALIZED WELCOME TRANSITION ---------- */
#welcomeOverlay{
  position:fixed; inset:0; z-index:998;
  display:flex; align-items:center; justify-content:center;
  background:
    linear-gradient(160deg, rgba(110,48,73,0.92), rgba(201,123,147,0.82)),
    url('https://images.unsplash.com/photo-1519741497674-611481863552?q=80&w=1600&auto=format&fit=crop') center/cover;
  opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity 0.6s ease, visibility 0.6s ease;
}
#welcomeOverlay.show{ opacity:1; visibility:visible; }
.welcome-overlay-card{ text-align:center; color:#fff; padding:20px; }
.welcome-overlay-card h2{
  font-family:'Cormorant Garamond', serif; font-weight:600; color:var(--gold-light);
  font-size:clamp(2rem, 6vw, 3.2rem); margin:6px 0 14px;
}
.welcome-overlay-card p{ font-size:0.95rem; letter-spacing:0.08em; opacity:0.9; }

.lock-card{
  padding:48px 40px;
  width:min(90vw, 380px);
  text-align:center;
  color:#fff;
}
.monogram{
  font-family:'Parisienne', cursive;
  font-size:2.6rem;
  color:var(--gold-light);
  margin-bottom:6px;
}
.lock-card p{ font-size:0.95rem; opacity:0.9; margin:14px 0 22px; line-height:1.6;}
.lock-card input{
  width:100%; padding:13px 16px; border-radius:30px;
  border:1px solid rgba(255,255,255,0.5); background:rgba(255,255,255,0.12);
  color:#fff; font-family:'Jost'; letter-spacing:0.15em; text-align:center;
}
.lock-card input::placeholder{ color:rgba(255,255,255,0.7); }
.lock-card input:focus{ outline:2px solid var(--gold-light); background:rgba(255,255,255,0.2); }

#error{ min-height:20px; font-size:0.8rem; color:#FFD9E0; margin-top:10px; }

/* ---------- BUTTONS ---------- */
.btn{
  display:inline-block;
  padding:14px 34px;
  border:none; border-radius:30px;
  background:var(--wine);
  color:#fff;
  font-family:'Jost'; font-size:0.85rem; letter-spacing:0.12em; text-transform:uppercase;
  cursor:pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}
.btn:hover{ background:var(--rose); transform:translateY(-2px); }
.btn-outline{
  background:transparent; border:1px solid var(--gold); color:var(--wine);
}
.btn-outline:hover{ background:var(--gold); color:#fff; }

/* ---------- NAV ---------- */
nav{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 6vw;
  background:rgba(251,245,241,0.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(201,166,107,0.25);
}
nav .brand{ font-family:'Parisienne'; font-size:1.6rem; color:var(--wine); }
nav ul{ list-style:none; display:flex; gap:28px; }
nav ul a{
  font-size:0.78rem; letter-spacing:0.15em; text-transform:uppercase; color:var(--ink);
  position:relative; padding-bottom:4px;
}
nav ul a::after{
  content:''; position:absolute; right:0; bottom:0; width:0; height:1px; background:var(--gold);
  transition:width 0.3s ease;
}
nav ul a:hover::after{ width:100%; }
.nav-toggle{ display:none; background:none; border:none; font-size:1.4rem; color:var(--wine); cursor:pointer; }

@media (max-width:820px){
  nav ul{
    position:fixed; top:66px; right:0; height:calc(100vh - 66px); width:70vw;
    background:var(--ivory); flex-direction:column; padding:40px 30px; gap:26px;
    transform:translateX(100%); transition:transform 0.4s ease; box-shadow:-6px 0 30px rgba(0,0,0,0.08);
  }
  nav ul.open{ transform:translateX(0); }
  .nav-toggle{ display:block; }
}

/* ---------- HERO ---------- */
.hero{
  position:relative; height:100vh; min-height:600px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; color:#fff; padding:0 6vw;
}
.hero::before{
  content:''; position:absolute; inset:0; z-index:-1;
  background:
    linear-gradient(180deg, rgba(42,27,34,0.35), rgba(42,27,34,0.55) 70%, var(--ivory) 100%),
    url('images/image1.jpeg') center 30%/cover;
}
.hero .eyebrow{ color:var(--gold-light); }
.hero h1{
  font-size:clamp(2.6rem, 7vw, 5.2rem);
  line-height:1;
  margin:10px 0 6px;
}
.hero .tagline{ font-family:'Parisienne'; font-size:clamp(1.2rem,3vw,1.7rem); color:var(--blush); margin-bottom:30px; }
.guest-welcome{
  font-family:'Parisienne', cursive; color:var(--gold-light);
  font-size:clamp(1.1rem,2.6vw,1.5rem); margin:6px 0 4px; min-height:1.5rem;
}

.countdown{
  display:flex; gap:14px; padding:22px 26px; margin-bottom:26px;
}
.countdown div{ text-align:center; min-width:56px; }
.countdown .num{ font-family:'Cormorant Garamond'; font-size:1.9rem; font-weight:600; display:block; }
.countdown .label{ font-size:0.62rem; letter-spacing:0.2em; text-transform:uppercase; opacity:0.85; }

.hero .datepin{ font-size:0.85rem; letter-spacing:0.1em; opacity:0.92; }

/* ---------- HERO VENUE CARD ---------- */
.hero-venue{
  padding:22px 30px 26px;
  margin-bottom:22px;
  max-width:min(90vw, 560px);
}
.hero-venue-date{
  font-family:'Cormorant Garamond', serif; font-weight:600;
  font-size:1.15rem; letter-spacing:0.06em; color:var(--gold-light);
  margin-bottom:14px;
}
.hero-venue-row{
  display:flex; align-items:flex-start; justify-content:center; gap:26px;
}
.hero-venue-item{
  display:flex; flex-direction:column; gap:4px; text-align:left; max-width:220px;
}
.hero-venue-item .eyebrow{ color:var(--gold-light); font-size:0.65rem; }
.hero-venue-item strong{
  font-family:'Cormorant Garamond', serif; font-size:1.15rem; font-weight:600; color:#fff;
}
.hero-venue-item span:last-child{ font-size:0.8rem; opacity:0.85; line-height:1.4; }
.hero-venue-divider{ width:1px; align-self:stretch; background:rgba(255,255,255,0.3); }

@media (max-width:600px){
  .hero-venue-row{ flex-direction:column; align-items:center; gap:18px; }
  .hero-venue-item{ text-align:center; align-items:center; }
  .hero-venue-divider{ width:60%; height:1px; }
}
.scroll-cue{
  position:absolute; bottom:28px; font-size:0.7rem; letter-spacing:0.2em; text-transform:uppercase;
  display:flex; flex-direction:column; align-items:center; gap:6px; opacity:0.85;
}
.scroll-cue span{ width:1px; height:26px; background:rgba(255,255,255,0.7); animation:pulse 1.8s infinite; }
@keyframes pulse{ 50%{ opacity:0.3; } }

/* ---------- SECTIONS ---------- */
section{ padding:100px 6vw; position:relative; }
.section-head{ text-align:center; max-width:640px; margin:0 auto 50px; }
.section-head h2{ font-size:clamp(2rem,4vw,2.8rem); color:var(--wine); margin:6px 0 14px; }
.section-head p{ line-height:1.75; color:#4a3540; }

.fade{ opacity:0; transform:translateY(36px); transition:opacity 0.9s ease, transform 0.9s ease; }
.fade.show{ opacity:1; transform:translateY(0); }

/* Welcome */
.welcome-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:center; max-width:1100px; margin:0 auto;
}
.welcome-grid img{ width:100%; border-radius:6px 60px 6px 60px; box-shadow:0 20px 50px rgba(110,48,73,0.18); }
.welcome-grid .script{ font-size:2.4rem; display:block; margin-bottom:10px; }
.welcome-grid p{ line-height:1.85; color:#4a3540; margin-bottom:22px; }

@media (max-width:820px){ .welcome-grid{ grid-template-columns:1fr; gap:34px; } }

/* Gallery / story */
.gallery{
  display:grid; grid-template-columns:repeat(3,1fr); gap:18px; max-width:1100px; margin:0 auto;
}
.gallery img{ width:100%; height:320px; object-fit:cover; border-radius:8px; }
.gallery img:nth-child(2){ height:360px; margin-top:-40px; }
@media (max-width:820px){
  .gallery{ grid-template-columns:1fr; }
  .gallery img:nth-child(2){ margin-top:0; }
}

/* Quick link cards */
.card-row{
  display:grid; grid-template-columns:repeat(4,1fr); gap:20px; max-width:1100px; margin:60px auto 0;
}
.card{
  padding:34px 20px; text-align:center; border:1px solid rgba(201,166,107,0.3); border-radius:14px;
  background:#fff; transition:transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover{ transform:translateY(-6px); box-shadow:0 18px 34px rgba(110,48,73,0.12); }
.card .icon{ font-size:1.6rem; color:var(--gold); margin-bottom:14px; }
.card h3{ font-size:1.2rem; color:var(--wine); margin-bottom:6px; }
.card p{ font-size:0.85rem; color:#6b5860; }
@media (max-width:820px){ .card-row{ grid-template-columns:1fr 1fr; } }
@media (max-width:480px){ .card-row{ grid-template-columns:1fr; } }

/* ---------- REGISTRY: subtle cash note ---------- */
.cash-note{
  max-width:520px; margin:50px auto 0; text-align:center;
  padding:24px 28px; border:1px dashed rgba(201,166,107,0.4); border-radius:14px;
  color:#6b5860; font-size:0.85rem; line-height:1.7;
}
.cash-note p{ margin-bottom:14px; }
.cash-methods{ display:flex; flex-wrap:wrap; justify-content:center; gap:12px; font-size:0.8rem; }
.cash-methods span{
  background:var(--ivory); color:var(--wine); padding:6px 14px; border-radius:20px;
  border:1px solid rgba(201,166,107,0.3);
}

/* Details */
.details-wrap{
  background:linear-gradient(160deg, var(--wine), #4a2033);
  color:#fff; border-radius:26px; max-width:1100px; margin:0 auto;
  padding:70px 6vw; display:grid; grid-template-columns:repeat(3,1fr); gap:40px; text-align:center;
}
.details-wrap .eyebrow{ color:var(--gold-light); }
.details-wrap h3{ font-size:1.6rem; margin:8px 0 10px; }
.details-wrap p{ font-size:0.9rem; line-height:1.7; opacity:0.9; }
@media (max-width:820px){ .details-wrap{ grid-template-columns:1fr; } }

/* Terms */
.terms-list{ max-width:640px; margin:0 auto; }
.terms-list li{
  list-style:none; display:flex; gap:14px; padding:18px 0; border-bottom:1px solid rgba(201,166,107,0.25);
  line-height:1.6; color:#4a3540;
}
.terms-list li::before{ content:'✦'; color:var(--gold); flex-shrink:0; }

/* RSVP */
.rsvp-wrap{
  max-width:520px; margin:0 auto; padding:56px 40px; text-align:center;
  border:1px solid rgba(201,166,107,0.35); border-radius:20px; background:#fff;
}
.rsvp-wrap form{ display:flex; flex-direction:column; gap:16px; margin-top:26px; text-align:left; }
.rsvp-wrap label{ font-size:0.72rem; letter-spacing:0.15em; text-transform:uppercase; color:var(--wine); margin-bottom:6px; display:block; }
.rsvp-wrap input, .rsvp-wrap select{
  width:100%; padding:12px 14px; border:1px solid rgba(201,166,107,0.4); border-radius:8px;
  font-family:'Jost'; background:var(--ivory);
}
.rsvp-wrap input:focus, .rsvp-wrap select:focus{ outline:2px solid var(--gold); background:#fff; }
#rsvp-status{ margin-top:16px; font-size:0.85rem; color:var(--wine); min-height:20px; }

/* Wax seal */
.seal{
  width:74px; height:74px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #d98ca5, var(--wine) 70%);
  display:flex; align-items:center; justify-content:center;
  font-family:'Parisienne'; color:var(--gold-light); font-size:1.5rem;
  margin:0 auto 18px; box-shadow:0 8px 20px rgba(110,48,73,0.3);
  transform:scale(0.4) rotate(-20deg); opacity:0;
  transition:transform 0.6s cubic-bezier(.2,1.4,.4,1), opacity 0.6s ease;
}
.seal.show{ transform:scale(1) rotate(0deg); opacity:1; }

footer{
  text-align:center; padding:60px 6vw; color:#8a7079; font-size:0.8rem;
}
footer .script{ font-size:1.6rem; display:block; margin-bottom:10px; }

/* ---------- MUSIC PLAYER ---------- */
.music-toggle{
  position:fixed; right:20px; bottom:20px; z-index:60;
  width:56px; height:56px; border-radius:50%; border:none; cursor:pointer;
  background:radial-gradient(circle at 35% 30%, #d98ca5, var(--wine) 70%);
  box-shadow:0 8px 22px rgba(110,48,73,0.35);
  display:flex; align-items:center; justify-content:center;
  color:var(--gold-light); font-size:1.3rem;
  transition:transform 0.3s ease, box-shadow 0.3s ease;
}
.music-toggle:hover{ transform:scale(1.06); }
.music-toggle.playing .disc{ animation:spin 3.5s linear infinite; }
.music-toggle .disc{ display:flex; align-items:center; justify-content:center; }
@keyframes spin{ to{ transform:rotate(360deg); } }
@media (max-width:820px){ .music-toggle{ right:16px; bottom:16px; width:50px; height:50px; } }

/* ---------- STORY: CASSETTE TAPE REWINDING ---------- */
.tape-deck{
  display:flex; align-items:center; justify-content:center; gap:28px;
  max-width:420px; margin:0 auto 60px;
}
.rewind-label{
  display:flex; align-items:center; gap:5px;
  font-size:0.68rem; letter-spacing:0.3em; text-transform:uppercase; color:var(--wine); white-space:nowrap;
}
.rewind-label span{ animation:chevronPulse 1.2s infinite; color:var(--gold); }
.rewind-label span:nth-child(2){ animation-delay:0.15s; }
.rewind-label span:nth-child(3){ animation-delay:0.3s; }
@keyframes chevronPulse{ 0%,100%{ opacity:0.2; } 50%{ opacity:1; } }

.reel{
  border-radius:50%;
  background:
    radial-gradient(circle, var(--ivory) 0 20%, var(--wine) 20% 24%, transparent 24%),
    repeating-conic-gradient(var(--wine) 0deg 12deg, transparent 12deg 90deg);
  border:3px solid var(--wine);
  flex-shrink:0;
}
.reel.large{ width:60px; height:60px; animation:spinReel 5s linear infinite reverse; }
.reel.small{
  width:32px; height:32px;
  animation:spinReel 3.2s linear infinite reverse;
  animation-play-state:paused;
}
.reel.small.spin{ animation-play-state:running; }
@keyframes spinReel{ to{ transform:rotate(360deg); } }

.tape-tracks{
  position:relative; max-width:640px; margin:0 auto;
  display:flex; flex-direction:column; gap:46px;
}

/* ---------- STORY STAGE (word-by-word slideshow) ---------- */
.story-stage{
  position:relative; max-width:640px; margin:0 auto;
  min-height:260px; overflow:hidden;
  background:linear-gradient(160deg, var(--wine), #4a2033);
  border-radius:22px; color:#fff;
  padding:56px 34px 40px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
  cursor:pointer;
}
.story-count{
  font-family:'Courier New', monospace; background:rgba(255,255,255,0.14); color:var(--gold-light);
  padding:4px 10px; border-radius:4px; font-size:0.8rem; letter-spacing:0.12em; display:inline-block; margin-bottom:16px;
}
.story-text{
  font-family:'Cormorant Garamond', serif; font-weight:600;
  font-size:clamp(1.25rem, 3.2vw, 1.85rem); line-height:1.65; min-height:3.4em;
  position:relative; z-index:2;
}
.story-word{
  display:inline-block; opacity:0; transform:translateY(8px) scale(0.9);
  animation:wordPop 0.35s ease forwards;
}
@keyframes wordPop{ to{ opacity:1; transform:translateY(0) scale(1); } }

.story-controls{
  display:flex; align-items:center; gap:16px; margin-top:26px; position:relative; z-index:2;
}
.story-controls button{
  background:rgba(255,255,255,0.12); border:1px solid rgba(255,255,255,0.3); color:#fff;
  width:32px; height:32px; border-radius:50%; font-size:1rem; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:background 0.2s ease;
}
.story-controls button:hover{ background:rgba(255,255,255,0.24); }
.story-dots{ display:flex; gap:8px; }
.story-dot{
  width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,0.3); cursor:pointer;
  transition:background 0.2s ease, transform 0.2s ease;
}
.story-dot.active{ background:var(--gold-light); transform:scale(1.3); }

/* Sparkles */
.story-sparkles{ position:absolute; inset:0; pointer-events:none; z-index:1; }
.sparkle{
  position:absolute; color:var(--gold-light); font-size:0.9rem; pointer-events:none;
}
.sparkle.ambient{ animation:twinkle 2.4s ease-in-out forwards; }
.sparkle.burst{ animation:burstPop 0.8s ease-out forwards; font-size:0.7rem; }
@keyframes twinkle{
  0%{ opacity:0; transform:scale(0.4) rotate(0deg); }
  50%{ opacity:0.9; transform:scale(1) rotate(15deg); }
  100%{ opacity:0; transform:scale(0.4) rotate(30deg); }
}
@keyframes burstPop{
  0%{ opacity:1; transform:scale(0.3) translateY(0); }
  100%{ opacity:0; transform:scale(1.1) translateY(-18px); }
}

@media (max-width:600px){
  .story-stage{ padding:44px 22px 32px; min-height:230px; }
}