:root {
  --cream: #f7f1e7;
  --paper: #fbf6ed;
  --sage: #dfead8;
  --rose: #a42343;
  --rose-dark: #7b1730;
  --gold: #c4934d;
  --brown: #3e2b20;
  --ink: #271d18;
  --muted: #786c63;
  --shadow: 0 24px 80px rgba(79, 55, 34, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Cormorant Garamond", serif;
  overflow-x: hidden;
}
body:not(.invite-open) main {
  opacity: 0;
  transform: scale(.985);
}
body.invite-open main {
  animation: siteReveal .9s ease both;
}
img, iframe { display: block; max-width: 100%; }
button, input { font: inherit; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--paper);
  transition: opacity 1.2s ease, visibility 1.2s ease;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader.is-opening .envelope-loader {
  animation: envelopeOpenScale 1.05s cubic-bezier(.22, 1, .36, 1) both;
}
.loader.is-opening .loader-instruction {
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
}
.envelope-loader {
  position: relative;
  width: min(720px, 90vw);
  min-height: 720px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.envelope-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: auto;
  object-fit: contain;
  filter: drop-shadow(0 28px 55px rgba(85, 58, 35, .16));
}
.loader-instruction {
  position: absolute;
  /* bottom: clamp(1rem, 5vh, 0rem); */
  bottom: 0rem;
  left: 0;
  right: 0;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: .45rem;
  color: var(--rose);
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .68);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.loader-instruction > span {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: .95;
}
.loader-instruction small {
  font-family: Cinzel, serif;
  font-size: clamp(.68rem, 1vw, .86rem);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}
.envelope-loader:hover .envelope-art {
  filter: drop-shadow(0 34px 68px rgba(85, 58, 35, .2));
}
.shree {
  margin: 0;
  color: var(--rose);
  font-weight: 500;
  font-style: italic;
}

.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: rgba(62, 43, 32, .88);
  color: var(--paper);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}
.music-toggle span::before { content: "♪"; font-size: 1.25rem; }
.music-toggle.is-muted span::before { content: "◼"; font-size: .8rem; }

.petals {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}
.petals span {
  position: absolute;
  top: -8vh;
  animation: fall linear infinite;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.08));
}
.scratch-burst {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 75;
  width: 0;
  height: 0;
  pointer-events: none;
}
.scratch-burst span {
  position: absolute;
  left: 0;
  top: 0;
  font-size: var(--size, 18px);
  animation: burstFlower 1.2s cubic-bezier(.16, 1, .3, 1) forwards;
  filter: drop-shadow(0 5px 8px rgba(79, 55, 34, .12));
}

section {
  position: relative;
  overflow: hidden;
}
.paper { background: var(--paper); }
.sage { background: var(--sage); }
.hero {
  min-height: 100svh;
  display: grid;
  place-items: start center;
  text-align: center;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(247, 241, 231, .12), rgba(247, 241, 231, .08) 65%, var(--paper));
}
.hero-copy {
  width: min(640px, 92vw);
  padding-top: clamp(4.2rem, 8vh, 6.5rem);
}
.ganesh { width: clamp(76px, 10vw, 104px); margin: 0 auto .7rem; }
.invite {
  width: min(560px, 100%);
  margin: 2rem auto 1.15rem;
  color: #090705;
  font-size: clamp(.98rem, 1.25vw, 1.16rem);
  font-weight: 400;
  line-height: 1.55;
}
.hero h1 {
  margin: .2rem 0 .15rem;
  color: var(--rose-dark);
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(5.2rem, 8.4vw, 8.2rem);
  line-height: 1;
}
.parents {
  margin: 1.15rem 0 0;
  color: #080504;
  font-size: clamp(1rem, 1.18vw, 1.15rem);
  font-weight: 400;
}
.hero em {
  display: block;
  margin: 1.8rem 0 .15rem;
  color: var(--rose-dark);
  font-family: "Great Vibes", cursive;
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 400;
}

.scratch-section {
  min-height: 410px;
  display: grid;
  place-items: center;
  padding: 4.5rem 1.5rem;
}
.ornament {
  margin: 0 auto 2rem;
  color: var(--gold);
  text-align: center;
  font-size: 1.05rem;
}
.ornament.compact { margin: .5rem auto 1.4rem; }
.section-florals::before,
.section-florals::after {
  position: absolute;
  color: rgba(130, 173, 96, .36);
  font-size: clamp(1.7rem, 3vw, 3rem);
}
.section-florals::before { content: "🌿"; left: 1.8rem; top: 2rem; }
.section-florals::after { content: "🌸"; right: 1.8rem; top: 2.8rem; color: rgba(243, 128, 156, .3); }
.scratch-card {
  position: relative;
  width: min(450px, 86vw);
  height: 126px;
  border: 1px solid rgba(196, 147, 77, .7);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(196, 147, 77, .2);
}
.scratch-result {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .25rem;
  background: #fbf6ed;
  color: var(--rose-dark);
  text-align: center;
}
.scratch-result small,
.label,
.event-detail span,
.rsvp-form label {
  font-family: Cinzel, serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 400;
}
.scratch-result small { font-size: .72rem; color: #7f9a69; }
.scratch-result strong { font-size: 1.55rem; }
.scratch-result span { color: var(--muted); }
.scratch-card canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.events,
.families,
.rsvp,
.venue {
  padding: clamp(5rem, 9vw, 8rem) 1.5rem;
  text-align: center;
}
h2, .rsvp h3 {
  margin: 0;
  color: var(--rose-dark);
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(4rem, 7vw, 6.7rem);
  line-height: 1.08;
  padding-block: .15em;
}
.event-card {
  position: relative;
  width: min(560px, 92vw);
  min-height: 780px;
  margin: 4.2rem auto 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  color: white;
  isolation: isolate;
}
.event-bg,
.event-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.event-bg { object-fit: cover; z-index: -3; }
.event-shade {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(45, 0, 11, .34), rgba(70, 0, 20, .18) 39%, rgba(40,0,12,.38)),
    radial-gradient(circle at 50% 42%, rgba(70,0,20,.08) 0 24%, rgba(30,0,8,.46) 84%);
}
.event-content {
  position: relative;
  z-index: 2;
  width: min(430px, 84%);
  margin: 0 auto;
  padding-top: clamp(12.5rem, 7vw, 10rem);
}
.event-content h3 {
  margin: 0 0 .4rem;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(3.3rem, 6vw, 5rem);
  line-height: 1.04;
  padding-block: .08em;
  text-shadow: 0 2px 14px rgba(0,0,0,.38);
}
.quote {
  margin: 1.1rem 0 3.8rem;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
}
.event-detail { margin: 1.55rem auto; }
.event-detail span {
  display: block;
  margin-bottom: .35rem;
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
}
.event-detail b {
  display: block;
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1.45;
}

.label {
  margin: 0;
  color: #789566;
  font-size: .8rem;
}
.family-card,
.rsvp-form,
.map-card {
  width: min(720px, 92vw);
  margin: 4rem auto 0;
  border: 1px solid rgba(196, 147, 77, .58);
  border-radius: 18px;
  background: rgba(251, 246, 237, .54);
  box-shadow: 0 18px 60px rgba(80, 64, 45, .07);
}
.family-card { padding: 3rem 1.5rem; }
.family-card > p:last-child {
  margin: 0;
  color: var(--muted);
  font-family: Cinzel, serif;
  letter-spacing: .2em;
  line-height: 1.8;
}
.section-copy {
  width: min(760px, 100%);
  margin: 2.6rem auto 0;
  color: rgba(39, 29, 24, .76);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-style: italic;
}
.respond { margin-top: 4rem; }
.rsvp h3 {
  margin-top: .35rem;
  font-size: clamp(3.3rem, 5.4vw, 5.3rem);
}
.rsvp-form {
  display: grid;
  gap: .9rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  text-align: left;
}
.rsvp-form label {
  color: #698d5d;
  font-size: .78rem;
  font-weight: 400;
}
.rsvp-form input[type="text"],
.rsvp-form input[type="tel"],
.rsvp-form input[type="date"] {
  width: 100%;
  height: 52px;
  margin-bottom: .8rem;
  padding: 0 1rem;
  border: 1px solid rgba(196, 147, 77, .36);
  border-radius: 10px;
  background: rgba(255, 251, 246, .88);
  color: var(--ink);
  outline: 0;
}
.attendance {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(196, 147, 77, .28);
  border-radius: 12px;
  background: rgba(223, 234, 216, .45);
  font-family: "Cormorant Garamond", serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.attendance input { accent-color: var(--rose); }
.rsvp-form button,
.direction-btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4a359, #b68137);
  color: white;
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(196, 147, 77, .26);
}
.thanks {
  display: none;
  margin: .6rem 0 0;
  color: var(--rose-dark);
  text-align: center;
}
.rsvp-form.is-sent .thanks { display: block; }
.map-card {
  height: 360px;
  overflow: hidden;
}
.map-card iframe { width: 100%; height: 100%; border: 0; filter: saturate(.75) sepia(.05); }
.direction-btn {
  margin-top: 2rem;
  min-width: 180px;
  padding: 0 1.4rem;
}
.footer {
  padding: clamp(4.2rem, 8vw, 6rem) 1.5rem;
  background: var(--brown);
  color: var(--paper);
  text-align: center;
}
.footer .label { color: var(--paper); }
.footer h2 {
  margin-top: .6rem;
  color: var(--paper);
  font-size: clamp(3.4rem, 6vw, 5.8rem);
  line-height: 1.08;
  padding-block: .12em;
}
.bouquet { margin: 1.3rem 0; font-size: 1.6rem; }
.footer p:not(.label) {
  margin: .45rem 0;
  font-size: 1.2rem;
  font-style: italic;
}

@keyframes fall {
  to { transform: translate3d(7vw, 112vh, 0) rotate(240deg); }
}
@keyframes burstFlower {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.2) rotate(0deg);
  }
  16% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(.95) rotate(var(--rotate));
  }
}
@keyframes envelopeOpenScale {
  0% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  42% { opacity: 1; transform: translateY(-8px) scale(1.08); filter: blur(0); }
  100% { opacity: 0; transform: translateY(18px) scale(1.35); filter: blur(8px); }
}
@keyframes siteReveal {
  from { opacity: 0; transform: scale(.985); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
  .hero {
    min-height: 940px;
    place-items: start center;
  }
  .hero-bg { object-position: center top; }
  .hero-copy { padding-top: 4rem; }
  .invite {
    width: min(430px, 96vw);
    margin-top: 1.8rem;
    margin-bottom: 1.45rem;
    font-size: 1.02rem;
    line-height: 1.65;
  }
  .hero h1 {
    font-size: clamp(4.6rem, 18vw, 6.15rem);
    line-height: 1.02;
  }
  .parents {
    margin-top: 1.2rem;
    font-size: 1rem;
  }
  .hero em { margin-top: 1.65rem; }
  .scratch-section { min-height: 400px; padding: 4rem 1.1rem; }
  .event-card { min-height: 760px; border-radius: 14px; }
  .event-content { width: 88%; }
  .event-detail b { font-size: 1.08rem; }
  .map-card { height: 420px; }
}
