/* Aurelia Sweet Seventeen v2 — Luxury Burgundy */
:root {
  --burgundy: #4b0718;
  --wine: #650d24;
  --maroon: #801b32;
  --black: #090909;
  --gold: #d4af62;
  --champagne: #e8d5a3;
  --ivory: #f7f0e6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: "Montserrat", system-ui, sans-serif;
  line-height: 1.6;
}
.hidden { display: none !important; }

/* ---------- Opening ---------- */
.opening {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at center, var(--wine) 0%, var(--burgundy) 55%, var(--black) 100%);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; padding: 24px 16px;
  transition: opacity .6s ease, visibility .6s;
}
.opening.open { opacity: 0; visibility: hidden; }
.opening-inner { text-align: center; max-width: 420px; width: 100%; }
.opening-kicker, .hero-kicker {
  letter-spacing: .35em; font-size: 11px; color: var(--champagne); margin: 8px 0;
}
.opening-to-label { color: var(--champagne); font-size: 12px; letter-spacing: .25em; margin: 18px 0 4px; }
.opening-guest {
  font-family: "Cormorant Garamond", serif; font-size: 30px; color: var(--gold);
  margin: 0 0 16px; word-wrap: break-word;
}
.envelope { margin: 18px auto; width: 260px; }
.envelope-body {
  position: relative; height: 170px; border: 1px solid var(--gold); border-radius: 6px;
  background: linear-gradient(160deg, var(--wine), var(--burgundy));
  overflow: hidden;
}
.envelope-flap {
  position: absolute; inset: 0 0 auto 0; height: 85px;
  background: linear-gradient(180deg, var(--maroon), transparent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top; transition: transform .8s ease;
}
.envelope.open .envelope-flap { transform: rotateX(180deg); }
.envelope-seal {
  position: absolute; left: 50%; top: 62px; transform: translateX(-50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--champagne), var(--gold) 60%, #a8842f);
  color: var(--burgundy); font-family: "Pinyon Script", cursive; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(212, 175, 98, .7);
}
.envelope-card {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  font-family: "Cormorant Garamond", serif; letter-spacing: .2em; font-size: 14px; color: var(--ivory);
  transition: transform .8s ease;
}
.envelope-card span { font-size: 10px; color: var(--champagne); }
.envelope.open .envelope-card { transform: translate(-50%, -46px); }
.opening-name { font-family: "Cormorant Garamond", serif; font-size: 22px; letter-spacing: .12em; margin: 14px 0 0; }
.opening-sub { color: var(--gold); letter-spacing: .4em; font-size: 12px; margin: 4px 0 20px; }
.open-error { color: #ffb3b3; font-size: 14px; }
.btn-gold, .btn-ghost, .btn-small {
  cursor: pointer; border-radius: 999px; font-family: "Montserrat", sans-serif; font-weight: 600;
  letter-spacing: .12em; text-decoration: none; display: inline-block; text-align: center;
}
.btn-gold {
  background: linear-gradient(160deg, var(--champagne), var(--gold) 60%, #a8842f);
  color: var(--burgundy); border: none; padding: 14px 30px; font-size: 14px;
  box-shadow: 0 4px 18px rgba(212, 175, 98, .35);
}
.btn-gold:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: transparent; color: var(--champagne); border: 1px solid var(--gold);
  padding: 10px 24px; font-size: 13px; margin-top: 10px;
}
.btn-small {
  background: transparent; color: var(--champagne); border: 1px solid var(--gold);
  padding: 6px 14px; font-size: 12px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, var(--wine) 0%, var(--burgundy) 45%, var(--black) 100%);
  padding: 32px 16px; overflow: hidden;
}
.particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-frame { position: relative; text-align: center; max-width: 520px; width: 100%; }
.hero-script {
  font-family: "Pinyon Script", cursive; font-size: clamp(40px, 11vw, 64px);
  color: var(--gold); margin: 10px 0 0; line-height: 1.2;
}
.big-17 { margin: 6px 0; }
.big-17 span {
  font-family: "Cormorant Garamond", serif; font-weight: 700; font-size: clamp(90px, 26vw, 150px);
  line-height: 1; color: transparent;
  -webkit-text-stroke: 2px var(--gold); text-shadow: 0 0 34px rgba(212, 175, 98, .45);
}
.hero-title { letter-spacing: .35em; font-size: 13px; color: var(--ivory); margin: 4px 0; }
.hero-date { color: var(--champagne); letter-spacing: .25em; font-size: 14px; }
.floral { color: var(--gold); letter-spacing: .5em; margin: 14px 0; }
.hero-photo {
  width: 210px; height: 270px; margin: 16px auto; border: 3px solid var(--gold); border-radius: 130px 130px 12px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(170deg, var(--wine), var(--burgundy));
  box-shadow: 0 0 0 6px rgba(212, 175, 98, .15), 0 18px 40px rgba(0,0,0,.5);
  overflow: hidden;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.monogram { font-family: "Pinyon Script", cursive; font-size: 56px; color: var(--gold); }
.photo-soon { font-size: 10px; letter-spacing: .3em; color: var(--champagne); border: 1px solid var(--gold); padding: 4px 10px; border-radius: 999px; }

/* ---------- Sections ---------- */
.section { max-width: 640px; margin: 0 auto; padding: 56px 20px; text-align: center; }
.gold-divider { display: flex; align-items: center; gap: 12px; color: var(--gold); margin-bottom: 10px; }
.gold-divider::before, .gold-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.section-title { font-family: "Cormorant Garamond", serif; font-size: 34px; color: var(--gold); margin: 6px 0 14px; }
.section-note { color: var(--champagne); font-size: 14px; }
.dear { font-family: "Cormorant Garamond", serif; font-size: 24px; color: var(--ivory); }
.dear .guest-name { color: var(--gold); }
.invite-text { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 19px; color: var(--ivory); }
.count-target { color: var(--champagne); letter-spacing: .1em; font-size: 13px; }
.count-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.count-box { border: 1px solid var(--gold); border-radius: 12px; padding: 14px 4px; background: rgba(101, 13, 36, .5); }
.count-box span { display: block; font-family: "Cormorant Garamond", serif; font-size: 32px; color: var(--gold); line-height: 1.1; }
.count-box label { font-size: 11px; letter-spacing: .15em; color: var(--champagne); text-transform: uppercase; }
.detail-day { letter-spacing: .4em; color: var(--champagne); font-size: 13px; }
.detail-date { font-family: "Cormorant Garamond", serif; font-size: 30px; color: var(--gold); margin: 4px 0; }
.detail-time { font-size: 22px; font-weight: 600; }
.detail-time span { font-size: 12px; letter-spacing: .3em; color: var(--champagne); }
.detail-venue { font-family: "Cormorant Garamond", serif; font-size: 24px; color: var(--gold); }
.detail-address, .detail-note { font-size: 14px; color: var(--ivory); }

/* Dress code */
.swatches { display: flex; justify-content: center; gap: 22px; margin-top: 18px; }
.swatch { text-align: center; }
.swatch-color { display: block; width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--gold); margin: 0 auto 8px; }
.sw-maroon { background: #801b32; }
.sw-gold { background: #d4af62; }
.sw-black { background: #090909; }
.swatch label { font-size: 13px; letter-spacing: .1em; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.gallery-slot {
  aspect-ratio: 3/4; border: 2px solid var(--gold); border-radius: 12px; overflow: hidden;
  background: linear-gradient(170deg, var(--wine), var(--burgundy));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.gallery-slot img { width: 100%; height: 100%; object-fit: cover; }
.gallery-toggle-wrap { text-align: center; margin-top: 16px; }
.gallery-slot .monogram { font-size: 34px; }

/* Location */
.map-wrap { border: 2px solid var(--gold); border-radius: 12px; overflow: hidden; margin: 16px 0; }
.map-wrap iframe { width: 100%; height: 280px; border: 0; display: block; }

/* RSVP + guestbook */
.rsvp-form { text-align: left; max-width: 480px; margin: 0 auto; }
.rsvp-form label { display: block; font-size: 13px; letter-spacing: .08em; margin: 14px 0 4px; color: var(--champagne); }
.rsvp-form input[type="text"], .rsvp-form input[type="number"], .rsvp-form textarea {
  width: 100%; padding: 12px; border: 1px solid var(--gold); border-radius: 10px;
  background: rgba(9, 9, 9, .6); color: var(--ivory); font-family: inherit; font-size: 15px; margin-top: 4px;
}
.rsvp-form fieldset { border: 1px solid rgba(212, 175, 98, .4); border-radius: 10px; margin: 14px 0; padding: 10px 14px; }
.rsvp-form legend { color: var(--champagne); font-size: 13px; padding: 0 6px; }
.radio, .check { display: flex !important; align-items: flex-start; gap: 8px; font-size: 14px !important; color: var(--ivory) !important; }
.radio input, .check input { margin-top: 4px; accent-color: var(--gold); }
.form-msg { padding: 12px; border-radius: 10px; font-size: 14px; background: rgba(101, 13, 36, .7); border: 1px solid var(--gold); }
.form-msg.ok { border-color: #7fbf7f; }
.form-hint { font-size: 13px; color: var(--champagne); }
.guestbook { margin-top: 48px; }
.wishes-list { display: grid; gap: 14px; margin-top: 16px; text-align: left; }
.wish-card {
  background: linear-gradient(170deg, var(--wine), var(--burgundy));
  border: 1px solid var(--gold); border-radius: 14px; padding: 18px;
  animation: fadeUp .5s ease both;
}
.wish-card .wish-name { font-family: "Cormorant Garamond", serif; font-size: 20px; color: var(--gold); }
.wish-card .wish-text { margin: 6px 0; white-space: pre-wrap; word-wrap: break-word; }
.wish-card .wish-date { font-size: 12px; color: var(--champagne); }
.wishes-empty { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 20px; color: var(--champagne); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Closing / footer / music / lightbox */
.closing-text { font-family: "Cormorant Garamond", serif; font-size: 24px; color: var(--gold); }
.closing-love { letter-spacing: .35em; font-size: 12px; color: var(--champagne); }
.closing-year { letter-spacing: .25em; font-size: 13px; color: var(--ivory); }
.footer { text-align: center; padding: 24px 16px 90px; font-size: 12px; color: var(--champagne); border-top: 1px solid rgba(212, 175, 98, .3); }
.footer-note { font-style: italic; }
.music-bar {
  position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); right: 16px; z-index: 90;
}
.music-round-btn {
  width: 56px; height: 56px; border-radius: 50%; cursor: pointer;
  background: rgba(75, 7, 24, .92); border: 2px solid var(--gold); color: var(--champagne);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
  -webkit-tap-highlight-color: transparent;
}
.music-round-btn .icon-play { font-size: 20px; line-height: 1; margin-left: 2px; }
.music-round-btn .icon-pause { font-size: 17px; line-height: 1; letter-spacing: 2px; }
.music-bar:not(.playing) .icon-pause { display: none; }
.music-bar.playing .icon-play { display: none; }
.music-bar.playing .music-round-btn { box-shadow: 0 6px 24px rgba(0, 0, 0, .45), 0 0 0 4px rgba(212, 175, 98, .25); }
.lightbox {
  position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px;
}
.lightbox img { max-width: 92vw; max-height: 80vh; border: 2px solid var(--gold); border-radius: 12px; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
