:root {
  --cream: #faf6f0;
  --cream-dark: #f1e9dd;
  --blush: #e8c4c4;
  --gold: #b08d57;
  --gold-light: #d4b483;
  --ink: #3a332c;
  --ink-soft: #6b6259;
  --white: #fffdfb;
  --serif: 'Cormorant Garamond', serif;
  --script: 'Great Vibes', cursive;
  --sans: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  overflow-x: hidden;
}

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

/* ---------- reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  z-index: 999;
  transition: width 0.1s linear;
}

/* ---------- floating petals ---------- */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -5%;
  font-size: 18px;
  color: var(--blush);
  opacity: 0.7;
  animation: fall linear infinite;
  user-select: none;
}
@keyframes fall {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.8; }
  100% { transform: translateY(110vh) translateX(40px) rotate(360deg); opacity: 0; }
}

/* ---------- music toggle ---------- */
.music-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--gold-light);
  background: var(--white);
  box-shadow: 0 6px 20px rgba(176, 141, 87, 0.25);
  cursor: pointer;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.music-toggle .disc {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ink) 0 4px, var(--gold-light) 5px 100%);
  display: flex; align-items: center; justify-content: center;
  animation: spin 4s linear infinite;
  animation-play-state: paused;
}
.music-toggle.playing .disc { animation-play-state: running; }
.music-icon { color: var(--white); font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(232,196,196,0.35), transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(176,141,87,0.25), transparent 50%),
    linear-gradient(160deg, #fdfaf6 0%, #f3e7db 55%, #ecd9c9 100%);
  padding: 40px 20px;
}
.hero-overlay {
  position: absolute;
  inset: 24px;
  border: 1px solid var(--gold-light);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-kicker {
  font-family: var(--sans);
  letter-spacing: 5px;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 18px;
}
.hero-names {
  font-family: var(--script);
  font-size: clamp(48px, 9vw, 92px);
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.15;
}
.hero-names .amp { color: var(--gold); padding: 0 6px; }
.hero-date {
  font-family: var(--sans);
  letter-spacing: 4px;
  font-size: 18px;
  color: var(--ink-soft);
  margin: 10px 0;
}
.hero-line {
  width: 70px;
  height: 1px;
  background: var(--gold);
  margin: 22px auto;
}
.hero-sub {
  font-size: 20px;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 40px;
}
/* When a real hero photo is set, switch text to white + shadow so it stays
   legible regardless of how bright the underlying photo region is. */
.hero.has-photo .hero-kicker { color: var(--gold-light); text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
.hero.has-photo .hero-names { color: var(--white); text-shadow: 0 2px 18px rgba(0,0,0,0.55); }
.hero.has-photo .hero-names .amp { color: var(--gold-light); }
.hero.has-photo .hero-date { color: var(--white); text-shadow: 0 1px 10px rgba(0,0,0,0.5); }
.hero.has-photo .hero-sub { color: rgba(255,255,255,0.92); text-shadow: 0 1px 10px rgba(0,0,0,0.5); }
.hero.has-photo .hero-overlay { border-color: rgba(255,255,255,0.4); }
.hero.has-photo .scroll-cue { border-color: rgba(255,255,255,0.7); }
.hero.has-photo .scroll-cue span { background: var(--white); }

.scroll-cue {
  display: inline-block;
  width: 24px; height: 40px;
  border: 1px solid var(--gold);
  border-radius: 14px;
  position: relative;
}
.scroll-cue span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  background: var(--gold);
  border-radius: 50%;
  animation: cue 1.6s ease infinite;
}
@keyframes cue {
  0% { top: 6px; opacity: 1; }
  80% { top: 24px; opacity: 0; }
  100% { top: 24px; opacity: 0; }
}

/* ---------- section titles ---------- */
.section-title {
  text-align: center;
  font-family: var(--script);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 8px;
}
.section-title span { position: relative; }
.section-sub {
  text-align: center;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 48px;
  letter-spacing: 0.3px;
}
.section-sub code {
  background: var(--cream-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ---------- intro ---------- */
.intro {
  padding: 100px 0 80px;
  text-align: center;
  background: var(--white);
}
.intro-text {
  font-size: clamp(19px, 2.4vw, 25px);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.7;
}
.ornament {
  margin-top: 28px;
  color: var(--gold);
  font-size: 24px;
}

/* ---------- countdown ---------- */
.countdown-section {
  padding: 90px 0;
  background: linear-gradient(160deg, #f3e7db, #ecd9c9);
  text-align: center;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 40px 0 18px;
}
.cd-box {
  background: var(--white);
  border: 1px solid var(--gold-light);
  border-radius: 10px;
  width: 100px;
  padding: 20px 10px;
  box-shadow: 0 10px 30px rgba(176,141,87,0.15);
}
.cd-num {
  display: block;
  font-family: var(--serif);
  font-size: 40px;
  color: var(--gold);
  font-weight: 600;
}
.cd-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--ink-soft);
}
.countdown-note {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---------- story / timeline ---------- */
.story { padding: 100px 0; background: var(--white); }
.timeline {
  position: relative;
  margin-top: 60px;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: var(--gold-light);
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 50px 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: 14px; height: 14px;
  background: var(--gold);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--gold-light);
}
.timeline-item:nth-child(odd) .timeline-dot { right: -8px; }
.timeline-item:nth-child(even) .timeline-dot { left: -8px; }
.timeline-date {
  display: inline-block;
  font-family: var(--sans);
  letter-spacing: 1.5px;
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 6px;
}
.timeline-content h3 {
  margin: 0 0 8px;
  font-size: 26px;
}
.timeline-content p {
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 16px;
  margin: 0;
}

@media (max-width: 720px) {
  .timeline::before { left: 18px; }
  .timeline-item, .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    text-align: left;
    padding: 0 0 50px 46px;
  }
  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot { left: 12px; right: auto; }
}

/* ---------- gallery ---------- */
.gallery { padding: 100px 0; background: linear-gradient(160deg, #f3e7db, #f9f2ea); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 1px;
  text-align: center;
  padding: 10px;
}
.gallery-item span { position: relative; z-index: 2; opacity: 0.9; }
.gallery-item::after {
  content: '♡';
  position: absolute;
  font-size: 34px;
  opacity: 0.5;
  top: 14px; left: 14px;
}
.gallery-item:hover { transform: scale(1.02); transition: transform 0.4s ease; }
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 6px; }
.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 36px;
  cursor: pointer;
}

/* ---------- event ---------- */
.event { padding: 100px 0; background: var(--white); }
.event-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.event-card {
  text-align: center;
  padding: 40px 24px;
  border: 1px solid var(--cream-dark);
  border-radius: 12px;
  background: var(--cream);
}
.event-icon { font-size: 30px; margin-bottom: 12px; }
.event-card h3 { margin: 0 0 10px; font-size: 26px; }
.event-time { color: var(--gold); font-family: var(--sans); font-size: 13px; letter-spacing: 1px; margin-bottom: 10px; }
.event-place { color: var(--ink-soft); line-height: 1.6; margin-bottom: 0; }
.qr-section { text-align: center; }
.qr-hint {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 22px;
  letter-spacing: 0.3px;
}
.qr-cards {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 20px 26px;
  border: 1px solid var(--cream-dark);
  border-radius: 12px;
  background: var(--cream);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.qr-card:hover { box-shadow: 0 10px 30px rgba(176,141,87,0.18); transform: translateY(-2px); }
.qr-card img {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  background: var(--white);
  padding: 8px;
  border: 1px solid var(--cream-dark);
}
.qr-card span {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 720px) {
  .event-cards { grid-template-columns: 1fr; }
}

/* ---------- rsvp ---------- */
.rsvp { padding: 100px 0; background: linear-gradient(160deg, #f9f2ea, #f3e7db); }
.rsvp-form {
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(176,141,87,0.15);
}
/* Honeypot anti-spam field: off-screen for real users, but still present
   in the DOM (not display:none) so simple bots that autofill every field
   still catch themselves. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-row { margin-bottom: 22px; }
.form-row label {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.form-row input[type="text"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  font-family: var(--serif);
  font-size: 16px;
  background: var(--cream);
  color: var(--ink);
  resize: vertical;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--gold-light);
}
.radio-group { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--cream-dark);
  padding: 8px 14px;
  border-radius: 30px;
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
}
.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 30px;
  font-family: var(--sans);
  letter-spacing: 1px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.submit-btn:hover { background: var(--ink); }
.rsvp-success {
  display: none;
  text-align: center;
  margin-top: 20px;
  color: var(--gold);
  font-style: italic;
  font-size: 17px;
}
.rsvp-success.show { display: block; }

.guestbook { max-width: 560px; margin: 60px auto 0; }
.guestbook h3 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 24px;
  color: var(--ink);
}
.guestbook-list { display: flex; flex-direction: column; gap: 14px; }
.guestbook-empty { text-align: center; color: var(--ink-soft); font-style: italic; }
.guestbook-item {
  background: var(--white);
  padding: 16px 20px;
  border-radius: 10px;
  border-left: 3px solid var(--gold);
}
.guestbook-item .g-name { font-family: var(--sans); font-size: 13px; color: var(--gold); margin-bottom: 4px; }
.guestbook-item .g-msg { color: var(--ink-soft); font-style: italic; }
.guestbook-more {
  display: block;
  margin: 20px auto 0;
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 30px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.guestbook-more:hover { background: var(--gold); color: var(--white); }
.guestbook-more[hidden] { display: none; }

/* ---------- gift ---------- */
.gift { padding: 100px 0; background: var(--white); text-align: center; }
.gift-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 560px;
  margin: 40px auto 0;
}
.gift-card {
  border: 1px solid var(--cream-dark);
  border-radius: 12px;
  padding: 28px 16px;
  background: var(--cream);
}
.gift-card h4 { margin: 0 0 8px; font-size: 18px; }
.gift-card p { margin: 4px 0; color: var(--ink-soft); font-size: 14px; }
.gift-number { color: var(--gold) !important; font-weight: 600; letter-spacing: 1px; }
.gift-qr {
  display: block;
  width: 130px;
  height: 130px;
  margin: 0 auto 14px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
}
@media (max-width: 560px) {
  .gift-cards { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.footer {
  padding: 70px 0 40px;
  text-align: center;
  background: linear-gradient(160deg, #ecd9c9, #f3e7db);
}
.footer-names {
  font-family: var(--script);
  font-size: 42px;
  color: var(--ink);
  margin: 0 0 8px;
}
.footer-note { color: var(--ink-soft); margin: 0 0 6px; }
.footer-date { font-family: var(--sans); letter-spacing: 3px; color: var(--gold); font-size: 13px; }
