:root {
  --maroon: #6e1423;
  --maroon-dark: #4a0d18;
  --gold: #c9a14a;
  --gold-light: #f1d48a;
  --cream: #fff8ec;
  --ink: #3b2a1e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(201,161,74,.12), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(110,20,35,.08), transparent 40%),
    var(--cream);
  line-height: 1.6;
  text-align: center;
  overflow-x: hidden;
}

body.locked { overflow: hidden; }

.script { font-family: "Great Vibes", cursive; font-weight: 400; color: var(--maroon); }
.deva { font-family: "Tiro Devanagari Hindi", serif; color: var(--maroon); font-size: 1.3rem; }
.deva.small { font-size: 1rem; opacity: .85; margin: .5rem 0 1.5rem; }
.light { color: var(--gold-light) !important; }

/* Cover */
.cover {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(241,212,138,.05) 0 2px, transparent 2px 18px),
    radial-gradient(circle, var(--maroon), var(--maroon-dark));
  color: var(--gold-light);
  transition: opacity 1s ease, visibility 1s ease;
  padding: 1.5rem;
}
.cover.hidden { opacity: 0; visibility: hidden; }
.cover-inner {
  border: 2px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 8px;
  padding: 3rem 2rem;
  max-width: 460px; width: 100%;
  border-radius: 200px 200px 12px 12px;
}
.cover .deva { color: var(--gold-light); }
.ganesh { font-size: 3rem; margin: 1rem 0; animation: glow 2s ease-in-out infinite alternate; }
.cover-small { letter-spacing: .3em; text-transform: uppercase; font-size: .85rem; }
.cover h1 { font-size: clamp(2.8rem, 10vw, 4rem); color: var(--gold-light); line-height: 1.2; margin: .5rem 0; }
.cover h1 span { display: block; font-size: .6em; }
.cover-date { font-family: "Cinzel", serif; letter-spacing: .15em; margin-bottom: 2rem; }

@keyframes glow {
  from { filter: drop-shadow(0 0 4px var(--gold)); }
  to { filter: drop-shadow(0 0 18px var(--gold-light)); }
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: "Cinzel", serif;
  font-size: .95rem; letter-spacing: .1em;
  padding: .85rem 1.8rem;
  border-radius: 40px; border: none; cursor: pointer;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--maroon-dark); }
.btn-maroon { background: var(--maroon); color: var(--gold-light); }
.link-btn { background: none; border: none; color: var(--maroon); text-decoration: underline; cursor: pointer; font: inherit; font-size: .95rem; margin-top: .5rem; }

.music-btn {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--gold); background: var(--maroon); color: var(--gold-light);
  font-size: 1.3rem; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  animation: spin 4s linear infinite;
}
.music-btn.off { animation: none; opacity: .7; text-decoration: line-through; }
@keyframes spin { to { transform: rotate(360deg); } }

#petals { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* Hero */
.hero { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.frame {
  max-width: 640px; width: 100%;
  padding: 3rem 1.5rem;
  border: 2px solid var(--gold);
  border-radius: 240px 240px 16px 16px;
  background: rgba(255,255,255,.55);
  box-shadow: 0 0 0 8px var(--cream), 0 0 0 9px var(--gold), 0 20px 50px rgba(110,20,35,.12);
}
.lead { font-style: italic; margin: .6rem 0; }
.parents { font-family: "Cinzel", serif; font-weight: 700; color: var(--maroon); letter-spacing: .05em; }
.names { font-size: clamp(2.6rem, 9vw, 4.2rem); line-height: 1.1; margin-top: .6rem; }
.with { font-family: "Cinzel", serif; color: var(--gold); letter-spacing: .3em; }
.hero-date { font-family: "Cinzel", serif; letter-spacing: .15em; color: var(--maroon); }
.scroll-hint { margin-top: 2rem; font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; animation: bob 1.6s infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* Sections */
.section { padding: 4.5rem 1.25rem; }
.section.maroon { background: radial-gradient(circle, var(--maroon), var(--maroon-dark)); color: var(--gold-light); }
.section.cream { background: rgba(201,161,74,.08); }
.title { font-family: "Cinzel", serif; font-weight: 500; color: var(--maroon); font-size: clamp(1.5rem, 5vw, 2.2rem); letter-spacing: .08em; }

.divider { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1rem auto 2rem; color: var(--gold); max-width: 260px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.divider.light { color: var(--gold-light); }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s ease, transform 1s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Scratch */
.scratch-wrap {
  position: relative;
  width: min(320px, 85vw); aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 4px var(--gold), 0 15px 35px rgba(110,20,35,.25);
}
.scratch-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: radial-gradient(circle, #fff, var(--cream));
  padding: 1.5rem;
}
.scratch-content .big { font-family: "Cinzel", serif; color: var(--gold); letter-spacing: .2em; }
.scratch-content .huge { font-family: "Great Vibes", cursive; font-size: 2.4rem; color: var(--maroon); line-height: 1.2; }
.small-note { font-size: .9rem; font-style: italic; }
#scratch { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .8s; }
#scratch.done { opacity: 0; pointer-events: none; }
.hint { margin-top: 1.2rem; font-style: italic; }

/* Countdown */
.tag { font-family: "Cinzel", serif; letter-spacing: .15em; font-size: .9rem; text-transform: uppercase; }
.countdown { display: flex; justify-content: center; gap: clamp(.5rem, 3vw, 1.5rem); margin: 1.8rem 0; flex-wrap: wrap; }
.countdown div {
  width: clamp(70px, 20vw, 110px); padding: 1rem .5rem;
  border: 1px solid var(--gold); border-radius: 12px;
  background: rgba(255,255,255,.05);
}
.countdown span { display: block; font-family: "Cinzel", serif; font-size: clamp(1.8rem, 6vw, 2.8rem); color: #fff; }
.countdown small { text-transform: uppercase; letter-spacing: .15em; font-size: .7rem; }

/* Timeline */
.timeline { max-width: 560px; margin: 0 auto; position: relative; text-align: left; }
.timeline::before { content: ""; position: absolute; left: 28px; top: 2.5rem; bottom: 1rem; width: 2px; background: linear-gradient(var(--gold), transparent); }
.day-label { font-family: "Cinzel", serif; color: var(--maroon); font-weight: 700; margin: 2rem 0 1rem 70px; letter-spacing: .05em; }
.event { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.2rem; position: relative; }
.event .icon {
  flex: none; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem;
  background: var(--cream); border: 2px solid var(--gold); z-index: 1;
}
.event > div:last-child {
  flex: 1; background: #fff; border-radius: 12px; padding: 1rem 1.2rem;
  border-left: 4px solid var(--gold);
  box-shadow: 0 6px 18px rgba(110,20,35,.08);
}
.event.highlight > div:last-child { border-left-color: var(--maroon); background: linear-gradient(135deg, #fff, #fdf0d8); }
.event h3 { font-family: "Cinzel", serif; color: var(--maroon); font-size: 1.15rem; }
.event .time { font-style: italic; }
.cal { font-size: .85rem; color: var(--gold); font-weight: 600; text-decoration: none; }
.cal:hover { text-decoration: underline; }

/* Families */
.families { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; max-width: 820px; margin: 0 auto; }
.family-card, .awaiting {
  background: #fff; border: 1px solid var(--gold); border-radius: 16px; padding: 2rem 1.25rem;
  box-shadow: 0 10px 30px rgba(110,20,35,.08);
}
.family-card h3 { font-family: "Cinzel", serif; color: var(--maroon); margin-bottom: 1rem; letter-spacing: .08em; }
.person { margin: .35rem 0; font-weight: 600; }
.person small { display: block; font-weight: 400; font-style: italic; color: var(--gold); font-size: .85rem; }
.person.main { font-family: "Great Vibes", cursive; font-size: 1.9rem; color: var(--maroon); font-weight: 400; }
.sub { margin-top: 1.2rem; font-style: italic; color: var(--maroon); opacity: .8; }
.awaiting { max-width: 420px; margin: 1.5rem auto 0; }
.tiny { font-size: .95rem; font-style: italic; }

/* Venue */
.venue-name { font-family: "Great Vibes", cursive; font-size: clamp(2.2rem, 8vw, 3rem); color: var(--maroon); font-weight: 400; }
.address { margin: .5rem auto 1.5rem; max-width: 480px; }
.map { max-width: 720px; margin: 0 auto; border-radius: 16px; overflow: hidden; border: 3px solid var(--gold); }
.map iframe { display: block; width: 100%; height: 320px; border: 0; }
.actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* Footer */
.footer p { max-width: 520px; margin: 0 auto 1rem; }
.big-names { font-size: clamp(2.6rem, 9vw, 4rem); margin: 1rem 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
