/* ============================================================
   Magda & René Wedding Website — Stylesheet
   Sections: Variables, Base, Nav, Hero, Story, Schedule,
             Travel, RSVP, Gifts, Footer, Responsive
   ============================================================ */

:root{
  --sage: #8a9a80;
  --sage-dark: #66755d;
  --sage-light: #dbe4d3;
  --gold: #c8a24d;
  --gold-light: #e9d9a8;
  --ivory: #fdfbf6;
  --ivory-dark: #f4efe4;
  --charcoal: #3a3630;
  --font-script: 'Allura', 'Great Vibes', 'Segoe Script', 'Bradley Hand', cursive;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Poppins', 'Segoe UI', Tahoma, sans-serif;
}

*,*::before,*::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-sans);
  color: var(--charcoal);
  background: var(--ivory);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3{
  font-family: var(--font-serif);
  margin: 0 0 .5em;
  color: var(--sage-dark);
  letter-spacing: .5px;
}

a{ color: var(--gold); }

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section{
  padding: 90px 0;
}

.section-title{
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  position: relative;
  margin-bottom: .3em;
}

.section-kicker{
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: .75rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.divider{
  width: 80px;
  height: 3px;
  background: var(--gold);
  margin: 0 auto 50px;
  border-radius: 2px;
}

/* ---------- NAV ---------- */
.navbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(253,251,246,0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: padding .3s ease;
}

.nav-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding .3s ease;
}

/* Navbar condenses + gains a stronger shadow once the page is scrolled. */
.navbar.scrolled{
  background: rgba(253,251,246,0.98);
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.navbar.scrolled .nav-inner{
  padding-top: 9px;
  padding-bottom: 9px;
}

.nav-logo{
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--sage-dark);
  text-decoration: none;
}

.nav-links{
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0; padding: 0;
}

.nav-links a{
  position: relative;
  text-decoration: none;
  color: var(--charcoal);
  font-size: .9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color .2s;
}

.nav-links a:hover{ color: var(--gold); }

/* Gold underline slides in under nav links on hover. */
.nav-links a::after{
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease;
}
.nav-links a:hover::after{ transform: scaleX(1); }

.nav-toggle{
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--sage-dark);
  cursor: pointer;
}

/* ---------- LANGUAGE SWITCHER ---------- */
.lang-switcher{
  display: flex;
  gap: 6px;
  margin-left: 10px;
}

.lang-btn{
  background: transparent;
  border: 1px solid var(--sage-light);
  color: var(--sage-dark);
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 6px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.lang-btn:hover{
  border-color: var(--gold);
  color: var(--gold);
}

.lang-btn.active{
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* ---------- HERO ---------- */
.hero{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background:
    linear-gradient(rgba(58,54,48,0.42), rgba(58,54,48,0.42)),
    url('https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  color: #fff;
  padding: 140px 20px 60px;
}

.hero-content{ max-width: 760px; }

.hero-kicker{
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gold-light);
  display: block;
  margin-bottom: 18px;
}

.hero-names{
  font-family: var(--font-script);
  font-size: clamp(3.6rem, 11vw, 7.5rem);
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.2;
}

.hero-amp{
  color: var(--gold-light);
}

.hero-sub{
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  margin-bottom: 8px;
}

.hero-venue{
  font-size: 1rem;
  font-weight: 300;
  opacity: .9;
  margin-bottom: 40px;
}

.personal-invitation{
  max-width: 620px;
  margin: -16px auto 34px;
  padding: 18px 22px;
  border-top: 1px solid rgba(233,217,168,0.6);
  border-bottom: 1px solid rgba(233,217,168,0.6);
}

.personal-invitation[hidden]{
  display: none;
}

.personal-invitation-name{
  color: var(--gold-light);
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  margin: 0 0 8px;
}

.personal-invitation-message{
  color: rgba(255,255,255,0.92);
  font-size: .98rem;
  line-height: 1.65;
  margin: 0;
}

.hero-invite-required{
  max-width: 560px;
  margin: -12px auto 34px;
  padding: 14px 18px;
  border: 1px solid rgba(233,217,168,0.75);
  border-radius: 10px;
  background: rgba(58,54,48,0.38);
}

.hero-invite-required[hidden]{
  display: none;
}

.hero-invite-required p{
  color: #fff;
  margin: 0;
  font-size: .94rem;
}

/* Countdown */
.countdown{
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.countdown-item{
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 12px;
  padding: 18px 14px;
  min-width: 88px;
  backdrop-filter: blur(4px);
}

.countdown-number{
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  display: block;
  color: var(--gold-light);
}

.countdown-label{
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: .85;
}

.btn{
  display: inline-block;
  padding: 14px 36px;
  background: var(--gold);
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: .85rem;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover{
  background: var(--sage-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn-outline{
  background: transparent;
  border: 2px solid #fff;
}
.btn-outline:hover{
  background: #fff;
  color: var(--sage-dark);
}

/* ---------- OUR STORY ---------- */
.story{
  background: var(--ivory);
}

.story-flex{
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.story-img{
  flex: 1 1 320px;
  min-width: 280px;
}

.story-img img{
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.story-text{
  flex: 1 1 380px;
  min-width: 280px;
}

.story-text p{
  margin-bottom: 1.1em;
  color: #55504a;
}

.signature{
  font-family: var(--font-script);
  font-size: 2.6rem;
  color: var(--gold);
  margin-top: 10px;
}

/* ---------- SCHEDULE ---------- */
.schedule{
  background: var(--sage-light);
}

.timeline{
  position: relative;
  max-width: 750px;
  margin: 0 auto;
}

.timeline::before{
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
  transform: translateX(-50%);
}

.timeline-item{
  position: relative;
  width: 50%;
  padding: 0 40px 60px;
}

.timeline-item:nth-child(odd){
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even){
  left: 50%;
  text-align: left;
}

.timeline-dot{
  position: absolute;
  top: 4px;
  width: 18px;
  height: 18px;
  background: var(--ivory);
  border: 3px solid var(--gold);
  border-radius: 50%;
}

.timeline-item:nth-child(odd) .timeline-dot{ right: -9px; }
.timeline-item:nth-child(even) .timeline-dot{ left: -9px; }

.timeline-card{
  background: #fff;
  border-radius: 14px;
  padding: 24px 26px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.07);
}

.timeline-time{
  color: var(--gold);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}

.timeline-card h3{
  margin-bottom: 6px;
  font-size: 1.3rem;
}

.timeline-card p{
  margin: 0;
  color: #6a6459;
  font-size: .95rem;
}

/* ---------- TRAVEL ---------- */
.travel{
  background: var(--ivory);
}

.travel-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.travel-card{
  background: var(--ivory-dark);
  border: 1px solid var(--sage-light);
  border-radius: 16px;
  padding: 34px 28px;
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}

.travel-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.08);
}

.travel-icon{
  width: 2.2rem;
  height: 2.2rem;
  margin: 0 auto 14px;
  display: block;
  color: var(--gold);
}

.travel-card h3{
  font-size: 1.2rem;
}

.travel-card p{
  color: #5c574f;
  font-size: .95rem;
  margin: 6px 0;
}

.travel-link{
  display: inline-block;
  margin-top: 14px;
  color: var(--sage-dark);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
}

.travel-link:hover{
  color: var(--gold);
}

/* ---------- RSVP ---------- */
.rsvp{
  background: var(--sage-dark);
  color: #fff;
}

.rsvp .section-title, .rsvp .section-kicker{
  color: #fff;
}
.rsvp .section-kicker{ color: var(--gold-light); }

.rsvp-intro{
  max-width: 700px;
  margin: 0 auto 36px;
  text-align: center;
}

.rsvp-intro:empty{
  margin: 0;
}

.rsvp-intro p{
  margin-bottom: 1.1em;
  color: rgba(255,255,255,0.85);
}

.rsvp-intro strong, .rsvp-intro em{
  color: var(--gold-light);
  font-style: normal;
}

.rsvp-form{
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 18px;
  padding: 40px clamp(20px, 5vw, 50px);
}

.invite-required{
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--gold-light);
  border-radius: 14px;
  padding: 26px clamp(20px, 5vw, 42px);
  text-align: center;
}

.invite-required[hidden]{
  display: none;
}

.invite-required h3{
  color: #fff;
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.invite-required p{
  color: rgba(255,255,255,0.9);
  margin: 0;
}

.form-row{
  margin-bottom: 24px;
}

.form-row label{
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: .95rem;
  letter-spacing: .3px;
}

.required-star{ color: var(--gold-light); }

.hp-field{
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="number"],
.form-row select,
.form-row textarea{
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.95);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: .95rem;
}

.form-row textarea{
  resize: vertical;
  min-height: 90px;
}

.radio-group{
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.radio-option{
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  padding: 10px 18px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
}

.radio-option input{ accent-color: var(--gold); cursor: pointer; }

.error-text{
  color: #ffd9d9;
  font-size: .82rem;
  margin-top: 6px;
  display: none;
}

.form-row.invalid input:not([type="radio"]),
.form-row.invalid select,
.form-row.invalid textarea{
  border-color: #ff8a8a;
  box-shadow: 0 0 0 2px rgba(255,138,138,0.35);
}

.form-row.invalid > label{
  color: #ffd9d9;
}

.form-row.invalid .error-text{ display: block; }

#plusOneRow{ display: none; }

#row-meal-second{ display: none; }

#childrenFieldsWrap{ display: none; }

/* After a successful submission, hide every form field/section but keep
   showing the #rsvpSuccess message (a direct child of the same form). */
.rsvp-form.is-submitted > *:not(#rsvpSuccess){ display: none !important; }

.rsvp-submit-wrap{
  text-align: center;
  margin-top: 10px;
}

/* Data-protection note under the RSVP / photo-upload buttons. Both live on
   the sage-dark background, so it's a muted white rather than a grey. */
.privacy-note{
  max-width: 560px;
  margin: 26px auto 0;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.62);
}

.privacy-note a{
  color: var(--gold-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(233,217,168,0.4);
}

.privacy-note a:hover{
  border-bottom-color: var(--gold-light);
}

.rsvp-review{
  display: none;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--gold-light);
  border-radius: 14px;
  margin-top: 24px;
  padding: 24px;
}

.rsvp-review h3{
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 8px;
  text-align: center;
}

.rsvp-review p{
  color: rgba(255,255,255,0.86);
  margin-bottom: 18px;
  text-align: center;
}

.rsvp-review dl{
  display: grid;
  gap: 10px 18px;
  grid-template-columns: minmax(150px, .55fr) 1fr;
  margin-bottom: 22px;
}

.rsvp-review dt{
  color: var(--gold-light);
  font-weight: 600;
}

.rsvp-review dd{
  margin: 0;
  overflow-wrap: anywhere;
}

.review-empty{
  color: #ffd9d9;
  font-style: italic;
}

.rsvp-review-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn-secondary{
  background: rgba(255,255,255,0.16);
}

.btn-secondary:hover{
  background: #fff;
  color: var(--sage-dark);
}

@media (max-width: 560px){
  .rsvp-review dl{
    grid-template-columns: 1fr;
  }

  .rsvp-review dt{
    margin-top: 8px;
  }
}

#rsvpSuccess{
  display: none;
  text-align: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid var(--gold-light);
  padding: 24px;
  border-radius: 14px;
  margin-top: 24px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

#rsvpError{
  display: none;
  text-align: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid #d97757;
  color: #d97757;
  padding: 18px;
  border-radius: 14px;
  margin-top: 24px;
  font-family: var(--font-sans);
  font-size: 1rem;
}

/* ---------- GIFTS ---------- */
.gifts{
  background: var(--ivory);
  text-align: center;
}

.gifts p.lead{
  max-width: 600px;
  margin: 0 auto 40px;
  color: #5c574f;
}

.registry-grid{
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.registry-card{
  background: #fff;
  border: 1px solid var(--sage-light);
  border-radius: 16px;
  padding: 30px 34px;
  width: 220px;
  text-decoration: none;
  color: var(--charcoal);
  transition: transform .25s ease, box-shadow .25s ease;
}

.registry-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.1);
}

.registry-card h3{ font-size: 1.05rem; margin-bottom: 4px; }
.registry-card span{ display: block; font-size: .85rem; color: #8a8478; }

.registry-card .card-script{
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--gold);
  margin: 2px 0 8px;
}

.presents-thanks{
  font-family: var(--font-script);
  font-size: 1.9rem;
  color: var(--gold);
  margin-top: 36px;
}

/* ---------- FOOTER / SHARE ---------- */
footer{
  background: var(--charcoal);
  color: #d8d4cc;
  text-align: center;
  padding: 60px 20px 40px;
}

.footer-names{
  font-family: var(--font-script);
  font-size: 2.8rem;
  color: var(--gold-light);
  margin-bottom: 20px;
}

.footer-note{
  margin-top: 30px;
  font-size: .82rem;
  color: #918d85;
}

.invite-remembered{
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.1);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.invite-remembered p{
  font-size: .78rem;
  color: #918d85;
  margin: 0 0 8px;
}

.invite-logout{
  background: none;
  border: none;
  padding: 0;
  color: var(--gold-light);
  font-size: .78rem;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.invite-logout:hover{ color: #fff; }

/* Scroll to top */
.to-top{
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--gold);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  z-index: 999;
}
.to-top.visible{ opacity: 1; pointer-events: auto; }

/* ---------- CHAT WIDGET ---------- */
.chat-widget{
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 998;
  font-family: var(--font-sans);
}

.chat-toggle{
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  transition: transform .2s ease;
}
.chat-toggle:hover{ transform: translateY(-3px); }

.chat-toggle-icon{
  position: absolute;
  width: 24px;
  height: 24px;
  transition: opacity .15s ease, transform .15s ease;
}
.chat-toggle-icon--close{ opacity: 0; transform: scale(.6); }
.chat-toggle[aria-expanded="true"] .chat-toggle-icon--open{ opacity: 0; transform: scale(.6); }
.chat-toggle[aria-expanded="true"] .chat-toggle-icon--close{ opacity: 1; transform: scale(1); }

.chat-panel{
  position: absolute;
  left: 0;
  bottom: 66px;
  width: min(380px, calc(100vw - 40px));
  max-height: min(560px, calc(100vh - 140px));
  background: var(--ivory);
  border: 1px solid var(--sage-light);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel[hidden]{
  display: none;
}

.chat-panel-header{
  background: var(--sage-dark);
  color: #fff;
  padding: 16px 20px;
  flex-shrink: 0;
}
.chat-panel-title{
  display: block;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
}
.chat-panel-subtitle{
  display: block;
  font-size: .78rem;
  color: var(--gold-light);
  margin-top: 2px;
}

.chat-messages{
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message{
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: .88rem;
  line-height: 1.45;
}
.chat-message p{ margin: 0; }
.chat-message p + p{ margin-top: 6px; }

.chat-message--bot{
  align-self: flex-start;
  background: var(--ivory-dark);
  color: var(--charcoal);
  border-bottom-left-radius: 4px;
}
.chat-message--user{
  align-self: flex-end;
  background: var(--gold);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-message--error{
  align-self: flex-start;
  background: #f6e4e0;
  color: #8a3d2f;
  border-bottom-left-radius: 4px;
}
.chat-message--pending{ font-style: italic; color: #8a8478; }

.chat-form{
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--sage-light);
  flex-shrink: 0;
}

.chat-input{
  flex: 1;
  min-width: 0;
  border: 1px solid var(--sage-light);
  border-radius: 20px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: .88rem;
  color: var(--charcoal);
  background: #fff;
}
.chat-input:focus{ outline: 2px solid var(--gold-light); outline-offset: 1px; }

.chat-send{
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-send svg{ width: 17px; height: 17px; }
.chat-send:disabled{ opacity: .5; cursor: default; }

@media (max-width: 480px){
  .chat-widget{ left: 14px; bottom: 14px; }
  .chat-panel{ bottom: 64px; }
}

/* ============================================================
   ANIMATIONS
   All entrance/scroll animation is scoped under `.js` so that visitors
   without JavaScript (or where the reveal observer never runs) always see
   fully visible content. A prefers-reduced-motion guard at the end disables
   everything for users who opt out of motion.
   ============================================================ */

/* ---- Hero entrance (plays once on load) ---- */
@keyframes heroRise{
  from{ opacity: 0; transform: translateY(24px); }
  to{ opacity: 1; transform: translateY(0); }
}

.js .hero-kicker,
.js .hero-names,
.js .hero-sub,
.js .hero-venue,
.js .countdown,
.js .hero-content .btn{
  opacity: 0;
  animation: heroRise .9s ease forwards;
}
.js .hero-kicker{ animation-delay: .2s; }
.js .hero-names{ animation-delay: .4s; }
.js .hero-sub{ animation-delay: .7s; }
.js .hero-venue{ animation-delay: .85s; }
.js .countdown{ animation-delay: 1s; }
.js .hero-content .btn{ animation-delay: 1.2s; }

/* ---- Scroll reveal (toggled by IntersectionObserver in main.js) ---- */
.js .reveal{
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.js .reveal.is-visible{
  opacity: 1;
  transform: none;
}

/* Directional variants for the story image/text so they meet in the middle. */
.js .reveal-left{ transform: translateX(-45px); }
.js .reveal-right{ transform: translateX(45px); }
.js .reveal-left.is-visible,
.js .reveal-right.is-visible{ transform: none; }

/* Staggered entrance for grouped items that enter the viewport together. */
.js .timeline-item:nth-child(2){ transition-delay: .08s; }
.js .timeline-item:nth-child(3){ transition-delay: .16s; }
.js .timeline-item:nth-child(4){ transition-delay: .24s; }
.js .travel-card:nth-child(2){ transition-delay: .12s; }
.js .travel-card:nth-child(3){ transition-delay: .24s; }
.js .registry-card:nth-child(2){ transition-delay: .12s; }
.js .registry-card:nth-child(3){ transition-delay: .24s; }

/* ---- Animated section divider (draws outward when scrolled into view) ---- */
.js .divider{
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .8s ease;
}
.js .divider.is-visible{ transform: scaleX(1); }

/* ---- Reduced-motion: honor the user's OS-level preference ---- */
@media (prefers-reduced-motion: reduce){
  .js .hero-kicker,
  .js .hero-names,
  .js .hero-sub,
  .js .hero-venue,
  .js .countdown,
  .js .hero-content .btn,
  .js .reveal,
  .js .reveal-left,
  .js .reveal-right,
  .js .divider{
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 800px){
  .nav-links{
    position: fixed;
    top: 62px;
    left: 0; right: 0;
    background: var(--ivory);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  }
  .nav-links.open{ max-height: 400px; }
  .nav-links li{ width: 100%; text-align: center; }
  .nav-links a{
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid var(--sage-light);
  }
  .nav-links a::after{ display: none; }
  .nav-toggle{ display: block; }

  section{ padding: 60px 0; }

  .timeline::before{ left: 22px; }
  .timeline-item{
    width: 100%;
    left: 0 !important;
    padding: 0 20px 40px 55px;
    text-align: left !important;
  }
  .timeline-item .timeline-dot{
    left: 14px !important;
    right: auto !important;
  }
}

@media (max-width: 480px){
  .countdown{ gap: 10px; }
  .countdown-item{ min-width: 70px; padding: 14px 8px; }
  .radio-group{ gap: 12px; }
  .lang-btn{ padding: 5px 9px; font-size: .7rem; }
}
