:root {
  --cream: #fbf5e9;
  --cream-2: #f6ead7;
  --sage: #f3e4dc;
  --sage-deep: #9a705f;
  --rose: #bf4059;
  --rose-deep: #822f3c;
  --gold: #bd8b3f;
  --ink: #382821;
  --muted: #725f55;
  --shadow: 0 22px 70px rgba(55, 42, 30, 0.17);
  color-scheme: light;
}

@font-face {
  font-family: "Great Vibes";
  src: url("./fonts/great-vibes-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("./fonts/cormorant-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("./fonts/cormorant-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("./fonts/cormorant-italic-400.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("./fonts/cinzel-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("./fonts/cinzel-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
}

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.is-hidden {
  display: none !important;
}

.intro {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
}

.video-intro {
  position: relative;
  overflow: hidden;
  background: #090806;
}

.intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #090806;
}

.intro-video-overlay {
  position: relative;
  z-index: 1;
  align-self: end;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: 100%;
  padding: 0 20px max(42px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(9, 8, 6, 0.58));
  transition: opacity 280ms ease;
}

.intro-video-overlay.is-playing {
  opacity: 0;
  pointer-events: none;
}

.video-open-btn:disabled {
  cursor: wait;
  opacity: 0.82;
}

.video-intro .tap-note {
  margin: 0;
  color: rgba(255, 250, 240, 0.88);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.intro-kicker,
.tap-note,
.eyebrow,
.event-date,
.venue-kicker,
.rsvp label,
.footer-kicker {
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-kicker {
  color: var(--rose-deep);
  font-size: 0.82rem;
}

.intro h1 {
  margin: 8px 0 20px;
  color: var(--rose);
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(3.4rem, 14vw, 6.5rem);
  font-weight: 400;
  line-height: 0.92;
}

.open-btn,
.gold-btn,
.rsvp button {
  border: 0;
  border-radius: 999px;
  padding: 13px 24px;
  background: linear-gradient(135deg, #d7ad62, #9b6c29);
  color: #fffaf0;
  box-shadow: 0 14px 28px rgba(133, 88, 32, 0.28);
  cursor: pointer;
}

.tap-note {
  margin: 18px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.hero {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: start center;
  padding: 48px 20px 60px;
  text-align: center;
  background: var(--cream);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(251, 245, 233, 0.34), rgba(251, 245, 233, 0.1) 48%, var(--cream));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
}

.ganesh {
  width: 90px;
  margin: 0 auto 8px;
  filter: drop-shadow(0 8px 18px rgba(92, 57, 25, 0.25));
}

.shubh {
  margin: 0 auto 28px;
  color: var(--rose-deep);
  font-size: clamp(1rem, 4vw, 1.35rem);
  font-style: italic;
}

.hero-copy {
  margin: 0 auto 16px;
  max-width: 520px;
  color: var(--rose-deep);
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
}

.name {
  margin: 0;
  color: var(--rose);
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(5.1rem, 22vw, 9rem);
  font-weight: 400;
  line-height: 0.9;
}

.parentage {
  margin: 8px 0 0;
  color: rgba(56, 40, 33, 0.8);
  font-size: clamp(1rem, 3.6vw, 1.18rem);
}

.connector {
  margin: 20px 0 8px;
  color: var(--rose-deep);
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(2.2rem, 9vw, 4rem);
  font-style: italic;
}

.band {
  position: relative;
  overflow: hidden;
  padding: 82px 22px;
}

.band.cream {
  background: var(--cream);
}

.band.sage {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.62), transparent 28%),
    linear-gradient(180deg, #f8ece4 0%, var(--sage) 100%);
}

.band.night {
  background: #31241f;
  color: var(--cream);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.floral {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.23;
  font-size: 2rem;
}

.floral span {
  position: absolute;
}

.floral span:nth-child(1) { top: 22px; left: 20px; }
.floral span:nth-child(2) { top: 42px; right: 24px; }
.floral span:nth-child(3) { bottom: 34px; left: 11%; }
.floral span:nth-child(4) { bottom: 22px; right: 8%; }

.section-head {
  margin-bottom: 34px;
  text-align: center;
}

.section-head h2,
.save-title,
.footer-title {
  margin: 0;
  color: var(--rose-deep);
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(3.7rem, 12vw, 6.4rem);
  font-weight: 400;
  line-height: 0.95;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 22px auto;
  color: var(--gold);
}

.divider::before,
.divider::after {
  content: "";
  width: 70px;
  height: 1px;
  background: rgba(189, 139, 63, 0.55);
}

.save-card {
  position: relative;
  width: min(600px, 100%);
  min-height: 154px;
  margin: 0 auto;
  border: 2px solid rgba(189, 139, 63, 0.54);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--cream);
  text-align: center;
}

.save-card:focus-visible {
  outline: 3px solid rgba(130, 47, 60, 0.38);
  outline-offset: 4px;
}

.save-reveal {
  display: grid;
  min-height: 154px;
  place-items: center;
  padding: 24px 18px;
}

.save-label {
  color: var(--sage-deep);
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0.34em;
}

.save-date {
  margin-top: 4px;
  color: var(--rose-deep);
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(2.7rem, 11vw, 4.2rem);
}

.scratch-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 2;
  opacity: 1;
  transition: opacity 420ms ease, transform 420ms ease;
  user-select: none;
  touch-action: none;
}

.scratch-cover span {
  opacity: 0;
  pointer-events: none;
}

.scratch-cover canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.scratch-cover:active canvas {
  cursor: grabbing;
}

.save-card.is-revealed {
  cursor: default;
}

.save-card.is-revealed .scratch-cover {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.event-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(189, 139, 63, 0.45);
  border-radius: 14px;
  background: #111;
  box-shadow: var(--shadow);
}

.event-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.22) 46%, rgba(0, 0, 0, 0.52)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.82));
}

.event-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-couple {
  width: 100%;
  max-width: 220px;
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.32));
}

.is-couple-left::after {
  background:
    radial-gradient(circle at 52% 32%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.22) 42%, rgba(0, 0, 0, 0.6)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.82));
}

.is-couple-right::after {
  background:
    radial-gradient(circle at 48% 32%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.22) 58%, rgba(0, 0, 0, 0.34)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.82));
}

.event-body {
  z-index: 3;
  position: relative;
  min-height: 430px;
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
  align-items: end;
  text-align: center;
  color: #fffaf0;
}

.is-couple-right .event-figure {
  order: 2;
}

.is-couple-right .event-copy {
  order: 1;
}

.event-figure {
  order: 1;
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 300px;
}

.event-copy {
  order: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.event-copy h3 {
  margin: 0;
  color: #fffaf0;
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(3rem, 5vw, 4.7rem);
  font-weight: 400;
  line-height: 0.9;
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.46);
}

.event-detail {
  display: grid;
  gap: 4px;
  margin: 15px 0 0;
  color: #fffaf0;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.15;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.event-detail span {
  color: #fffaf0;
  font-family: Cinzel, Georgia, serif;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.event-desc {
  white-space: pre-line;
  margin: 18px 0 0;
  color: #fffaf0;
  font-size: clamp(1rem, 2.1vw, 1.22rem);
  font-style: italic;
  line-height: 1.28;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.event-flower {
  margin: 28px 0 12px;
  color: #e1b05a;
  font-size: 1.1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(189, 139, 63, 0.35);
  box-shadow: 0 12px 30px rgba(45, 32, 22, 0.1);
  background: var(--cream);
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.family-card,
.location-card,
.rsvp-panel {
  border: 1px solid rgba(189, 139, 63, 0.38);
  background: rgba(251, 245, 233, 0.74);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
  min-width: 0;
}

.map-frame {
  width: min(900px, 100%);
  margin: 0 auto 28px;
  overflow: hidden;
  border: 1px solid rgba(189, 139, 63, 0.42);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--cream-2);
}

.map-frame iframe {
  width: 100%;
  height: min(58vh, 420px);
  min-height: 300px;
  display: block;
  border: 0;
}

.family-card h3,
.location-card h3 {
  margin: 0 0 10px;
  color: var(--rose-deep);
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.family-role {
  margin: 18px 0 7px;
  color: var(--sage-deep);
  font-family: Cinzel, Georgia, serif;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.family-member {
  margin: 3px 0;
  font-size: 1.18rem;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(650px, 100%);
  margin: 0 auto;
}

.time-box {
  border: 1px solid rgba(215, 173, 98, 0.48);
  padding: 20px 10px;
  text-align: center;
}

.time-box strong {
  display: block;
  color: #f8d99d;
  font-size: clamp(2rem, 9vw, 3.8rem);
  line-height: 1;
}

.time-box span {
  color: rgba(251, 245, 233, 0.72);
  font-family: Cinzel, Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.location-card {
  text-align: left;
}

.location-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.location-card p {
  min-height: 1.5em;
  color: var(--muted);
}

.location-card .direction-btn,
.calendar-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--rose-deep);
  font-family: Cinzel, Georgia, serif;
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.location-card .direction-btn {
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d7ad62, #9b6c29);
  color: #fffaf0;
  box-shadow: 0 10px 22px rgba(133, 88, 32, 0.18);
}

.rsvp-panel {
  width: min(680px, 100%);
  margin: 0 auto;
}

.rsvp {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rsvp .field {
  text-align: left;
}

.rsvp .span-2,
.rsvp-status,
.rsvp button {
  grid-column: 1 / -1;
}

.rsvp input,
.rsvp select,
.rsvp textarea {
  width: 100%;
  margin-top: 7px;
  padding: 13px 14px;
  border: 1px solid rgba(189, 139, 63, 0.45);
  border-radius: 0;
  background: #fffaf1;
  color: var(--ink);
  font: inherit;
  min-height: 48px;
}

.rsvp textarea {
  resize: vertical;
}

.rsvp-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.rsvp-status.is-success {
  color: #547640;
}

.rsvp-status.is-error {
  color: #9c3548;
}

.rsvp button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.footer {
  padding: 70px 22px 54px;
  background: #31241f;
  color: var(--cream);
  text-align: center;
}

.footer-title {
  color: var(--cream);
}

.brand-link {
  display: inline-flex;
  justify-content: center;
  width: min(270px, 72vw);
  margin: 34px auto 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.brand-link:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.brand-link img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.28));
}

#petals {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 12;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -36px;
  animation: fall linear forwards;
  filter: drop-shadow(0 3px 5px rgba(50, 35, 25, 0.14));
}

@keyframes fall {
  to {
    transform: translate3d(var(--drift), 110vh, 0) rotate(540deg);
    opacity: 0.2;
  }
}

.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(49, 36, 31, 0.86);
  color: var(--cream);
  box-shadow: var(--shadow);
}

@media (max-width: 820px) {
  .events-grid,
  .location-grid {
    grid-template-columns: 1fr;
  }

  .event-card,
  .event-body {
    height: auto;
    min-height: 520px;
  }

  .event-body,
  .is-couple-right .event-body {
    grid-template-columns: 1fr;
    align-items: end;
    padding: 28px 24px;
    gap: 18px;
  }

  .event-figure,
  .is-couple-right .event-figure {
    order: 2;
    min-height: 180px;
  }

  .event-copy,
  .is-couple-right .event-copy {
    order: 1;
  }

  .event-copy h3,
  .event-desc,
  .event-flower,
  .event-meta-stack,
  .is-couple-right .event-copy h3,
  .is-couple-right .event-desc,
  .is-couple-right .event-flower,
  .is-couple-right .event-meta-stack {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .event-couple {
    max-width: 220px;
    max-height: 220px;
    opacity: 1;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-card {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .band {
    padding: 58px 14px;
  }

  .section-head {
    margin-bottom: 24px;
  }

  .section-head h2,
  .footer-title {
    font-size: clamp(3.1rem, 17vw, 4.4rem);
  }

  .hero {
    padding-top: 34px;
  }

  .name {
    font-size: clamp(4.7rem, 23vw, 6.4rem);
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .save-card {
    min-height: 132px;
  }

  .save-reveal {
    min-height: 132px;
  }

  .event-body,
  .is-couple-right .event-body {
    padding: 24px 18px;
    min-height: 520px;
  }

  .event-figure,
  .is-couple-right .event-figure {
    min-height: 165px;
  }

  .event-copy h3,
  .event-desc,
  .event-flower,
  .event-meta-stack,
  .is-couple-right .event-copy h3,
  .is-couple-right .event-desc,
  .is-couple-right .event-flower,
  .is-couple-right .event-meta-stack {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .event-body h3 {
    font-size: clamp(2.35rem, 13.5vw, 3.45rem);
    line-height: 0.86;
  }

  .event-desc {
    margin-top: 12px;
    font-size: 0.96rem;
    line-height: 1.18;
  }

  .event-flower {
    margin: 16px 0 4px;
  }

  .event-detail {
    margin-top: 10px;
    font-size: 0.98rem;
  }

  .event-detail span {
    font-size: 0.65rem;
  }

  .event-meta-stack {
    padding-bottom: 2px;
  }

  .event-couple {
    max-width: 230px;
    max-height: 230px;
    opacity: 1;
  }

  .map-frame iframe {
    min-height: 260px;
  }

  .location-card {
    padding: 20px;
  }

  .location-card h3 {
    font-size: clamp(2rem, 12vw, 3rem);
    line-height: 1.08;
  }

  .venue-kicker {
    font-size: 0.66rem;
  }

  .rsvp-panel {
    padding: 22px 16px;
  }

  .rsvp {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rsvp input,
  .rsvp select,
  .rsvp textarea {
    font-size: 16px;
  }
}
