:root {
  --cream: #fbe9c8;
  --paper: #fdeed6;
  --olive: #3c4825;
  --maroon: #851714;
  --red: #9e1b16;
  --gold: #b47f3a;
  --gold-2: #bc9c22;
  --bronze: #966327;
  --col: min(100vw, 480px);
  --serif: "Playfair Display", Georgia, serif;
  --caps: "Cinzel", "Times New Roman", serif;
  --script: "Great Vibes", cursive;
  --hand: "Dancing Script", cursive;
  --display: "Italiana", "Playfair Display", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--cream); -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--cream);
  color: var(--olive);
  font-family: var(--caps);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; -webkit-user-drag: none; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Desktop: soft blurred artwork around the phone column */
.backdrop {
  position: fixed; inset: -40px; z-index: 0;
  background: url(assets/backdrop.webp) center / cover no-repeat;
  filter: blur(18px) saturate(1.05);
  opacity: .85;
}
.backdrop::after { content: ""; position: absolute; inset: 0; background: rgba(251, 233, 200, .35); }

/* ---------- Gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 250, 238, .96) 0%, rgba(253, 238, 214, .92) 45%, rgba(246, 224, 186, .9) 100%),
    url(assets/backdrop.webp) center / cover;
  text-align: center;
  padding: 24px;
}
.gate__inner { display: flex; flex-direction: column; align-items: center; }
.gate__ganesha { width: 54px; margin-bottom: 26px; opacity: 0; }
.gate__guest { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--bronze); margin-bottom: 14px; opacity: 0; }
.gate__pre { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--olive); opacity: 0; }
.gate__names {
  font-family: var(--serif); font-weight: 400; color: var(--maroon);
  font-size: clamp(38px, 11vw, 52px); line-height: 1.1; margin: 14px 0 10px;
  opacity: 0;
}
.gate__names span { font-family: var(--script); color: var(--gold); font-size: .85em; padding: 0 .08em; }
.gate__date { font-size: 14px; letter-spacing: .4em; color: var(--olive); opacity: 0; }
.gate__btn {
  position: relative; margin-top: 44px;
  padding: 15px 34px; border-radius: 999px;
  font-family: var(--caps); font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #d9b25f, #a8742f 55%, #c99a4a);
  box-shadow: 0 8px 24px rgba(150, 99, 39, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
  opacity: 0;
}
.gate__btn::before {
  content: ""; position: absolute; inset: -6px; border-radius: inherit;
  border: 1px solid rgba(180, 127, 58, .55);
  animation: ring 2.4s ease-out infinite;
}
@keyframes ring { 0% { transform: scale(.94); opacity: .9; } 100% { transform: scale(1.18); opacity: 0; } }

/* ---------- Intro video ---------- */
.intro {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  background: var(--cream) url(assets/intro-poster.webp) center / cover;
  overflow: hidden;
  visibility: hidden;
  will-change: opacity;
}
.intro::before {
  /* blurred fill behind the video so it never looks letterboxed */
  content: ""; position: absolute; inset: -60px;
  background: inherit; filter: blur(30px) brightness(1.05);
}
.intro video {
  position: relative;
  width: var(--col); max-height: 100svh;
  aspect-ratio: 768 / 1158; object-fit: cover;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
}
/* Belt and braces: never show native controls or the big play button */
.intro video::-webkit-media-controls,
.intro video::-webkit-media-controls-panel,
.intro video::-webkit-media-controls-overlay-play-button,
.intro video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.intro__glow {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 46%, #fffdf6 0%, #fff6e2 35%, #fbe9c8 75%);
}
.intro__skip {
  position: absolute; right: max(16px, calc(50% - var(--col) / 2 + 16px)); bottom: max(22px, env(safe-area-inset-bottom));
  font-family: var(--caps); font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--bronze); padding: 8px 14px; border-radius: 999px;
  background: rgba(253, 238, 214, .7); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .6s;
}
.intro.is-playing .intro__skip { opacity: .85; }

/* ---------- Page column ---------- */
.page {
  position: relative; z-index: 1;
  width: var(--col); margin: 0 auto;
  background: var(--cream);
  box-shadow: 0 0 60px rgba(120, 80, 30, .18);
}
.card { position: relative; container-type: inline-size; overflow: hidden; }
.card > div[class$="__bg"] { position: absolute; inset: 0; }
.card > div[class$="__bg"] img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hero ---------- */
.hero { aspect-ratio: 941 / 1672; }
.hero__bg img { transform-origin: 50% 35%; }
.petals {
  position: fixed; z-index: 5; top: 0; bottom: 0; left: 50%;
  width: var(--col); height: 100%; transform: translateX(-50%);
  pointer-events: none;
}
.hero__content {
  position: absolute; z-index: 3;
  left: 19%; right: 19%; top: 22.5%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero__ganesha { width: 7.5cqw; margin-bottom: 3cqw; filter: drop-shadow(0 0 6px rgba(255, 240, 200, .9)); }
.hero__blessing { font-size: 2.45cqw; line-height: 1.55; letter-spacing: .03em; text-transform: uppercase; }
.hero__blessing b { font-weight: 600; }
.hero__names { display: flex; flex-direction: column; align-items: center; font-weight: 400; margin: 3.2cqw 0 1cqw; }
.name {
  font-family: var(--serif); font-weight: 400; color: var(--maroon);
  line-height: .98; letter-spacing: .04em; white-space: nowrap;
}
.name--a { font-size: 12.6cqw; }
.name--b { font-size: 10.4cqw; }
.name .ch { display: inline-block; will-change: transform, opacity, filter; }
.and { display: flex; align-items: center; gap: 2.4cqw; margin: .4cqw 0 .8cqw; }
.and em { font-family: var(--script); font-style: normal; color: #a47542; font-size: 8.6cqw; line-height: 1; }
.rule { position: relative; display: block; width: 13cqw; height: 1px; background: #b8915b; }
.rule::before, .rule::after {
  content: ""; position: absolute; top: 50%; width: 1.2cqw; height: 1.2cqw;
  background: #b8915b; transform: translate(-50%, -50%) rotate(45deg);
}
.rule::before { left: 0; } .rule::after { left: 100%; }
.hero__tag { font-size: 3.5cqw; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.hero__heart { width: 2.6cqw; margin: 1.6cqw 0 1.2cqw; }
.hero__save { font-size: 3.2cqw; letter-spacing: .06em; text-transform: uppercase; }
.hero__date { display: flex; align-items: center; gap: 4cqw; margin-top: .6cqw; }
.hero__date span { font-size: 2.5cqw; letter-spacing: .06em; text-transform: uppercase; }
.hero__date strong { font-weight: 400; font-size: 8.2cqw; line-height: 1; }
.hero__year { font-size: 3cqw; letter-spacing: .45em; margin: .4cqw 0 0 .45em; }
.hero__time { font-size: 3.2cqw; letter-spacing: .06em; text-transform: uppercase; margin-top: 2.4cqw; }
.hero__venue { font-size: 2.65cqw; line-height: 1.5; letter-spacing: .03em; text-transform: uppercase; margin-top: 2.4cqw; }
.hero__lotus { width: 12cqw; margin-top: 3cqw; }

.scroll-cue {
  position: absolute; z-index: 4; left: 50%; bottom: 3.2cqw; transform: translateX(-50%);
  width: 22px; height: 36px; border: 1.5px solid rgba(150, 99, 39, .7); border-radius: 12px;
  opacity: 0;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px; background: var(--bronze);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Venue ---------- */
.venue { aspect-ratio: 940 / 1672; }
.venue__map {
  position: absolute; z-index: 2; left: 50%; top: 53.6%; transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 1.6cqw;
  padding: 1.5cqw 2cqw; border-radius: 3cqw;
  transition: transform .3s;
}
.venue__map:active { transform: translateX(-50%) scale(.96); }
.venue__click { width: 24cqw; }
.venue__pin { width: 5.6cqw; animation: bob 2.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2cqw); } }

.countdown {
  position: absolute; z-index: 2; left: 8%; right: 8%; top: 63.2%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.countdown__orn { width: 60cqw; }
.countdown__orn--top { transform: scaleY(-1); }
.countdown__lead { font-family: var(--hand); font-weight: 600; color: var(--maroon); font-size: 5cqw; margin: 1.6cqw 0 2cqw; }
.countdown__grid { display: flex; align-items: flex-start; justify-content: center; gap: 1.6cqw; margin-bottom: 2cqw; }
.countdown__grid > div { display: flex; flex-direction: column; align-items: center; min-width: 13cqw; }
.countdown__grid b {
  font-family: var(--hand); font-weight: 500; color: var(--red);
  font-size: 10cqw; line-height: 1.05; font-variant-numeric: tabular-nums;
}
.countdown__grid i { font-family: var(--hand); font-style: normal; color: var(--red); font-size: 8cqw; line-height: 1.1; }
.countdown__grid small { font-family: var(--hand); color: var(--maroon); font-size: 3.2cqw; letter-spacing: .08em; text-transform: uppercase; margin-top: .6cqw; }
.calendar {
  margin-top: 3.4cqw;
  font-family: var(--caps); font-size: 2.7cqw; letter-spacing: .22em; text-transform: uppercase;
  color: var(--bronze); text-decoration: none;
  padding: 1.8cqw 4.4cqw; border: 1px solid rgba(150, 99, 39, .5); border-radius: 999px;
  background: rgba(253, 238, 214, .6);
}

/* ---------- RSVP ---------- */
.rsvp { min-height: calc(var(--col) * 1672 / 941); padding: calc(var(--col) * .15) calc(var(--col) * .15) calc(var(--col) * .22); }
.rsvp__title {
  position: relative; z-index: 2; text-align: center;
  font-family: var(--display); font-weight: 400; font-size: 21cqw; line-height: 1;
  color: var(--red); letter-spacing: .02em;
  text-shadow: 0 2px 18px rgba(255, 246, 225, .9);
}
.rsvp__panel {
  position: relative; z-index: 2; margin-top: 7cqw;
  background: rgba(253, 238, 214, .94);
  border: 1px solid rgba(180, 127, 58, .35);
  border-radius: 9cqw;
  padding: 9cqw 6.5cqw 8cqw;
  box-shadow: 0 10px 30px rgba(120, 80, 30, .15);
}
.corner { position: absolute; width: 27cqw; pointer-events: none; }
.corner--tl { left: -7cqw; top: -7cqw; }
.corner--tr { right: -7cqw; top: -7cqw; transform: scaleX(-1); }
.corner--bl { left: -7cqw; bottom: -7cqw; transform: scaleY(-1); }
.corner--br { right: -7cqw; bottom: -7cqw; transform: scale(-1, -1); }
.lbl { display: block; font-family: var(--serif); font-style: italic; color: var(--maroon); font-size: max(13px, 3.5cqw); margin: 0 0 2cqw; }
#rsvpForm input[type=text], #rsvpForm textarea {
  width: 100%; font: 16px var(--serif); color: var(--olive);
  background: #fff8ea; border: 1px solid rgba(133, 23, 20, .45); border-radius: 2.4cqw;
  padding: 10px 12px; margin-bottom: 5cqw; outline: none; resize: vertical;
  transition: border-color .25s, box-shadow .25s;
}
#rsvpForm input[type=text]:focus, #rsvpForm textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(180, 127, 58, .18); }
.choices { display: grid; gap: 2.4cqw; margin-bottom: 5cqw; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); color: var(--maroon); font-size: max(14px, 3.6cqw);
  padding: 14px 16px; border-radius: 2.4cqw;
  background: #f0d2bb; border: 1px solid transparent;
  transition: background .25s, border-color .25s, transform .2s;
}
.choice span::before {
  content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--maroon); background: #fff8ea;
  transition: box-shadow .25s, background .25s;
}
.choice input:checked + span { background: #f6dcc4; border-color: var(--gold); }
.choice input:checked + span::before { background: var(--maroon); box-shadow: inset 0 0 0 3px #fff8ea; }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.guests { display: none; margin-bottom: 5cqw; }
.guests.is-on { display: block; }
.stepper { display: inline-flex; align-items: center; border: 1px solid rgba(133, 23, 20, .45); border-radius: 999px; background: #fff8ea; }
.stepper button { width: 42px; height: 40px; font-size: 20px; color: var(--maroon); }
.stepper output { min-width: 34px; text-align: center; font: 17px var(--serif); color: var(--olive); }
.submit {
  display: block; width: 100%; padding: 13px;
  font-family: var(--serif); font-style: italic; font-size: max(16px, 4cqw); color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #9e1b16, #7a1310);
  box-shadow: 0 6px 18px rgba(133, 23, 20, .28);
  transition: transform .2s, opacity .2s;
}
.submit:active { transform: scale(.98); }
.submit[disabled] { opacity: .6; }
.form-msg { min-height: 1.4em; margin-top: 3cqw; text-align: center; font-family: var(--serif); font-style: italic; color: var(--maroon); font-size: max(14px, 3.4cqw); }

/* ---------- Footer ---------- */
.end { text-align: center; padding: 34px 16px 48px; background: var(--cream); }
.end img { width: 56px; margin: 0 auto 10px; }
.end p { font-family: var(--serif); color: var(--maroon); font-size: 24px; }
.end small { display: block; margin-top: 6px; letter-spacing: .4em; font-size: 12px; }

/* ---------- Music toggle ---------- */
.music {
  position: fixed; z-index: 15; bottom: max(18px, env(safe-area-inset-bottom));
  right: max(16px, calc(50% - var(--col) / 2 + 16px));
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(253, 238, 214, .85); border: 1px solid rgba(180, 127, 58, .5);
  backdrop-filter: blur(6px);
}
.music svg { width: 20px; fill: none; stroke: var(--bronze); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.music[hidden] { display: none; }
.music.is-off { opacity: .55; }
.music.is-off::after { content: ""; position: absolute; width: 26px; height: 1.8px; background: var(--bronze); transform: rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
