@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Great+Vibes&display=swap');

:root {
  --cream: hsl(38 50% 95%);
  --cream-light: hsl(38 50% 97%);
  --ink: hsl(25 30% 18%);
  --rose: hsl(348 60% 50%);
  --rose-deep: hsl(348 65% 35%);
  --sage: hsl(95 22% 65%);
  --sage-deep: hsl(95 25% 45%);
  --sage-soft: hsl(95 30% 88%);
  --gold: hsl(36 55% 55%);
  --gold-soft: hsl(36 60% 75%);
  --shadow-elegant: 0 20px 60px -20px hsl(95 25% 25% / 0.25);
  --shadow-soft: 0 8px 30px -10px hsl(25 30% 18% / 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
}

body.is-locked {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

img,
svg,
canvas,
iframe {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.petal-rain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.petal-rain > span {
  position: absolute;
  top: -10vh;
  left: var(--left);
  font-size: var(--size);
  filter: drop-shadow(0 2px 4px hsl(25 30% 18% / 0.1));
  animation: float-petal var(--duration) linear var(--delay) infinite;
}

@keyframes float-petal {
  0% { transform: translate3d(0, -12vh, 0) rotate(0); }
  30% { transform: translate3d(var(--sway), 30vh, 0) rotate(110deg); }
  65% { transform: translate3d(calc(0px - var(--sway)), 68vh, 0) rotate(235deg); }
  100% { transform: translate3d(var(--sway), 116vh, 0) rotate(360deg); }
}

.invitation-cover {
  position: fixed;
  inset: 0;
  z-index: 20;
  min-height: 100svh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(95 30% 80%), hsl(95 22% 68%));
}

.cover-sprig {
  position: absolute;
  z-index: 1;
  opacity: 0.65;
  animation: drift 5s ease-in-out infinite;
}

.cover-sprig--one { top: 24px; left: 24px; font-size: 30px; }
.cover-sprig--two { top: 32px; right: 40px; font-size: 25px; animation-delay: -1s; }
.cover-sprig--three { bottom: 32px; left: 40px; font-size: 30px; animation-delay: -2s; }
.cover-sprig--four { right: 24px; bottom: 24px; font-size: 30px; animation-delay: -0.5s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  50% { transform: translate(8px, -10px) rotate(5deg); }
}

.envelope {
  position: relative;
  z-index: 2;
  width: 280px;
  padding: 0;
  color: white;
  cursor: pointer;
  background: transparent;
  perspective: 1000px;
  transition: transform 0.5s ease;
}

.envelope:hover {
  transform: scale(1.05);
}

.envelope:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 6px;
  border-radius: 12px;
}

.envelope img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 25px 24px rgb(49 63 43 / 0.28));
}

.wax-seal {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, hsl(36 55% 60%), hsl(36 45% 45%));
  box-shadow: 0 10px 40px -10px hsl(36 55% 45% / 0.55), inset 0 0 0 3px rgb(255 255 255 / 0.14);
  animation: shimmer 2.5s ease-in-out infinite;
}

.wax-seal span {
  font-family: Cinzel, serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgb(255 255 255 / 0.9);
}

@keyframes shimmer {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.14); transform: scale(1.025); }
}

.cover-copy {
  z-index: 2;
  margin-top: 40px;
  text-align: center;
  color: var(--sage-deep);
  animation: fade-up 0.8s 0.3s both;
}

.cover-copy h1 {
  margin: 0;
  font-family: 'Great Vibes', cursive;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
}

.cover-copy p {
  margin: 10px 0 0;
  font-size: 17px;
  font-style: italic;
  letter-spacing: 0.03em;
  opacity: 0.82;
}

.invitation-cover--opening .envelope {
  animation: envelope-open 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.invitation-cover--opening .cover-copy {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes envelope-open {
  0% { transform: scale(1) rotateX(0); opacity: 1; }
  45% { transform: scale(1.08) rotateX(-8deg); opacity: 1; }
  100% { transform: scale(1.38) translateY(-25px); opacity: 0; }
}

.invitation-page {
  position: relative;
  animation: page-fade 0.8s ease both;
}

@keyframes page-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.hero-background,
.hero-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-background {
  object-fit: cover;
}

.hero-wash {
  background: linear-gradient(to bottom, hsl(38 50% 95% / 0.3), transparent 48%, var(--cream));
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  padding: 48px 24px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ganesh-block {
  color: var(--rose-deep);
}

.ganesh-block img {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgb(0 0 0 / 0.14));
}

.ganesh-block p {
  margin: 8px 0 0;
  font-size: 21px;
  font-style: italic;
}

.invitation-line {
  max-width: 450px;
  margin: 30px auto 0;
  color: var(--rose-deep);
  font-size: 19px;
  line-height: 1.45;
}

.couple-name {
  margin: 18px 0 0;
  color: var(--rose);
  font-family: 'Great Vibes', cursive;
  font-size: clamp(76px, 10vw, 128px);
  font-weight: 400;
  line-height: 0.88;
}

.parents-line {
  margin: 16px 0 0;
  font-size: 19px;
  line-height: 1.45;
  color: hsl(25 30% 18% / 0.8);
}

.with {
  margin: 20px 0 0;
  color: var(--rose-deep);
  font-family: 'Great Vibes', cursive;
  font-size: 38px;
  font-style: italic;
  line-height: 1;
}

.hero-last {
  padding-bottom: 20px;
}

.reveal {
  animation: fade-up 0.8s both;
}

.reveal--two { animation-delay: 0.2s; }
.reveal--three { animation-delay: 0.3s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.decorative-section {
  position: relative;
  overflow: hidden;
}

.corner-ornaments span {
  position: absolute;
  z-index: 0;
  font-size: 31px;
  opacity: 0.18;
  pointer-events: none;
}

.corner-ornaments span:nth-child(1) { top: 24px; left: 18px; }
.corner-ornaments span:nth-child(2) { top: 42px; right: 24px; font-size: 27px; }
.corner-ornaments span:nth-child(3) { bottom: 36px; left: 38px; font-size: 27px; }
.corner-ornaments span:nth-child(4) { right: 18px; bottom: 24px; }

.date-reveal {
  min-height: 404px;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--cream);
}

.date-rule {
  position: relative;
  z-index: 1;
}

.scratch-card {
  position: relative;
  width: min(100%, 448px);
  height: 128px;
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid var(--gold-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-elegant);
  background: var(--cream);
  user-select: none;
}

.scratch-message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.scratch-message p {
  margin: 0;
  color: var(--sage-deep);
  font-family: Cinzel, serif;
  font-size: 15px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.scratch-message strong {
  margin-top: 5px;
  color: var(--rose-deep);
  font-family: 'Great Vibes', cursive;
  font-size: 38px;
  font-weight: 400;
}

#scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  transition: opacity 0.45s ease;
}

#scratch-canvas:active {
  cursor: grabbing;
}

#scratch-canvas:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: -5px;
}

.scratch-canvas--gone {
  opacity: 0;
  pointer-events: none;
}

.countdown {
  max-width: 480px;
  margin: 38px auto 0;
  display: flex;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(14px);
  transition: 0.7s ease;
}

.countdown--visible {
  opacity: 1;
  transform: translateY(0);
}

.countdown div {
  min-width: 68px;
  text-align: center;
}

.countdown strong {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  background: var(--cream);
  box-shadow: var(--shadow-soft);
  color: var(--rose-deep);
  font-family: Cinzel, serif;
  font-size: 24px;
  font-weight: 400;
}

.countdown span {
  display: block;
  margin-top: 8px;
  color: var(--sage-deep);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.events {
  padding: 80px 24px;
  background: var(--sage-soft);
}

.section-title,
.presence,
.families,
.venue {
  text-align: center;
}

.section-title h2,
.presence h2,
.families h2,
.venue h2,
footer h2 {
  margin: 0;
  color: var(--rose-deep);
  font-family: 'Great Vibes', cursive;
  font-size: clamp(52px, 6vw, 64px);
  font-weight: 400;
  line-height: 1.08;
}

.floral-rule {
  margin: 24px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.floral-rule span {
  width: 64px;
  height: 1px;
  background: var(--gold-soft);
}

.floral-rule b {
  color: var(--gold);
  font-size: 18px;
  font-weight: 400;
}

.floral-rule--small {
  margin: 16px auto;
}

.floral-rule--small span,
.floral-rule--light span {
  width: 40px;
}

.event-grid {
  position: relative;
  z-index: 1;
  width: min(100%, 1152px);
  margin: 67px auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.event-card {
  position: relative;
  min-height: 458px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elegant);
}

.event-background,
.event-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.event-background {
  z-index: -2;
  object-fit: cover;
}

.event-shade {
  z-index: -1;
  background: rgb(0 0 0 / 0.4);
}

.event-layout {
  min-height: 458px;
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px;
}

.event-couple-wrap {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
}

.event-couple {
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 7px 7px rgb(0 0 0 / 0.22));
}

.event-copy {
  align-self: center;
  text-align: center;
  color: var(--cream);
}

.event-card--image-right .event-couple-wrap { order: 2; }
.event-card--image-right .event-copy { order: 1; }

.event-copy h3 {
  margin: 0;
  font-family: 'Great Vibes', cursive;
  font-size: 52px;
  font-weight: 400;
  line-height: 1;
}

.event-description {
  min-height: 45px;
  margin: 12px 0 0;
  color: rgb(255 251 241 / 0.86);
  font-size: 17px;
  font-style: italic;
  line-height: 1.35;
}

.floral-rule--light {
  margin: 20px auto;
}

.floral-rule--light span {
  background: hsl(36 60% 75% / 0.62);
}

.event-copy dl {
  margin: 0;
}

.event-copy dl div + div {
  margin-top: 12px;
}

.event-copy dt {
  color: var(--gold-soft);
  font-family: Cinzel, serif;
  font-size: 13px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.event-copy dd {
  margin: 5px 0 0;
  color: var(--cream);
  font-size: 19px;
  line-height: 1.25;
}

.presence {
  padding: 96px 24px;
  background: var(--cream);
}

.presence > *:not(.corner-ornaments) {
  position: relative;
  z-index: 1;
}

.presence p {
  margin: 0 auto;
  color: hsl(25 30% 18% / 0.8);
  font-size: 21px;
  font-style: italic;
  line-height: 1.6;
}

.families {
  padding: 80px 24px;
  background: var(--sage-soft);
}

.eyebrow {
  margin: 0;
  color: var(--sage-deep);
  font-family: Cinzel, serif;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.families h2,
.venue h2 {
  margin-top: 8px;
}

.family-card {
  position: relative;
  z-index: 1;
  width: min(100%, 1024px);
  margin: 40px auto 0;
  padding: 32px;
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  background: hsl(38 50% 95% / 0.8);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.family-card > p:not(.eyebrow) {
  margin: 4px 0;
  font-size: 22px;
}

.venue {
  padding: 80px 24px;
  background: var(--cream);
}

.venue-address {
  max-width: 580px;
  margin: 0 auto;
  color: hsl(25 30% 18% / 0.8);
  font-size: 21px;
}

.map-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 896px);
  margin: 40px auto 0;
  overflow: hidden;
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-elegant);
}

.map-frame iframe {
  width: 100%;
  height: 360px;
  border: 0;
}

.directions-button {
  position: relative;
  z-index: 1;
  min-height: 44px;
  margin-top: 32px;
  padding: 11px 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, hsl(36 55% 60%), hsl(36 45% 45%));
  box-shadow: 0 10px 40px -10px hsl(36 55% 45% / 0.4);
  color: white;
  font-weight: 600;
  text-decoration: none;
  transition: 0.25s ease;
}

.directions-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.directions-button:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 4px;
}

.directions-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.invitation-closings {
  position: relative;
  overflow: hidden;
  padding: 80px 24px;
  text-align: center;
  background: var(--sage-soft);
}

.invitation-closings > *:not(.corner-ornaments) {
  position: relative;
  z-index: 1;
}

.invitation-closings h2 {
  margin-top: 8px;
}

.closing-grid {
  width: min(100%, 1024px);
  margin: 38px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  text-align: center;
}

.closing-card {
  padding: 26px 22px;
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  background: hsl(38 50% 95% / 0.88);
  box-shadow: var(--shadow-soft);
}

.closing-card--hosts,
.closing-card--address {
  grid-column: 1 / -1;
}

.closing-card h3 {
  margin: 0 0 12px;
  color: var(--sage-deep);
  font-family: Cinzel, serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.closing-card p {
  margin: 0;
  font-size: 21px;
  line-height: 1.55;
}

.closing-contact {
  margin-top: 12px !important;
}

.closing-contact a {
  color: var(--rose-deep);
  text-decoration-color: hsl(348 65% 35% / 0.4);
  text-underline-offset: 3px;
}

.closing-contact a:hover {
  color: var(--rose);
}

footer {
  padding: 64px 24px;
  text-align: center;
  background: var(--ink);
  color: var(--cream);
}

footer .eyebrow {
  color: var(--gold-soft);
}

footer h2 {
  margin-top: 12px;
  color: var(--cream);
}

.footer-flower {
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer-flower span {
  width: 48px;
  height: 1px;
  background: hsl(36 60% 75% / 0.4);
}

.footer-flower b {
  font-size: 24px;
  font-weight: 400;
}

.footer-date {
  margin: 0;
  font-size: 19px;
  font-style: italic;
}

.footer-tag {
  margin: 10px 0 0;
  color: hsl(38 50% 95% / 0.7);
  font-family: Cinzel, serif;
  font-size: 12px;
  letter-spacing: 0.18em;
}

.music-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: hsl(25 30% 18% / 0.8);
  box-shadow: var(--shadow-elegant);
  color: var(--cream);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease;
}

.music-toggle:hover { transform: scale(1.06); }
.music-toggle:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 3px; }

.music-toggle svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.volume-off { display: none; }
.music-toggle--muted .volume-on { display: none; }
.music-toggle--muted .volume-off { display: block; }

.butterfly {
  position: fixed;
  z-index: 31;
  top: 64%;
  left: -70px;
  width: 38px;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgb(0 0 0 / 0.2));
  animation: butterfly-flight 21s linear infinite;
}

.butterfly svg ellipse,
.butterfly svg circle {
  fill: #1f2937;
}

.butterfly svg > g > path:not(.wing) {
  fill: none;
  stroke: #1f2937;
  stroke-linecap: round;
}

.wing--one { fill: #3b82f6; }
.wing--two { fill: #60a5fa; }

@keyframes butterfly-flight {
  0% { transform: translate(-60px, 15vh) rotate(-10deg) scale(0.85); }
  18% { transform: translate(24vw, -28vh) rotate(8deg) scale(1); }
  43% { transform: translate(52vw, 18vh) rotate(-5deg) scale(0.9); }
  70% { transform: translate(81vw, -34vh) rotate(10deg) scale(1); }
  100% { transform: translate(calc(100vw + 120px), 8vh) rotate(-8deg) scale(0.82); }
}

@media (min-width: 640px) {
  .envelope { width: 360px; }
  .wax-seal { width: 96px; height: 96px; }
  .cover-copy h1 { font-size: 48px; }
  .hero-content { padding-top: 80px; }
  .event-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .countdown { gap: 24px; }
  .countdown div { min-width: 90px; }
  .countdown strong { font-size: 36px; }
}

@media (min-width: 768px) {
  .envelope { width: 420px; }
}

@media (min-width: 1024px) {
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .hero-content { padding-inline: 18px; }
  .ganesh-block img { width: 82px; height: 82px; }
  .ganesh-block p { font-size: 18px; }
  .invitation-line { max-width: 330px; font-size: 17px; }
  .couple-name { font-size: 76px; }
  .parents-line { font-size: 17px; }
  .event-card { min-height: 700px; }
  .event-layout {
    min-height: 700px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: 24px;
    gap: 12px;
  }
  .event-couple-wrap,
  .event-card--image-right .event-couple-wrap { order: 2; }
  .event-copy,
  .event-card--image-right .event-copy { order: 1; }
  .event-couple { max-width: 190px; max-height: 330px; width: auto; }
  .event-description { min-height: auto; }
  .date-reveal { min-height: 340px; }
  .countdown { gap: 8px; }
  .countdown div { min-width: 0; flex: 1; }
  .countdown strong { font-size: 19px; border-radius: 12px; }
  .countdown span { font-size: 9px; letter-spacing: 0.08em; }
  .events,
  .families,
  .venue,
  .invitation-closings { padding: 70px 16px; }
  .closing-grid { grid-template-columns: 1fr; gap: 14px; }
  .closing-card--hosts,
  .closing-card--address { grid-column: auto; }
  .closing-card { padding: 22px 16px; }
  .closing-card p { font-size: 19px; }
  .presence { padding: 82px 20px; }
  .section-title h2,
  .presence h2,
  .families h2,
  .venue h2,
  footer h2 { font-size: 50px; }
  .map-frame iframe { height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
