/*
 * Vivah — Shubh Vivah, the divine-sky wedding invitation.
 * Ivory canvas, deep maroon Playfair, temple-gold hairlines. The hero is a
 * full-viewport generated sky; Blessings and the ask sit on pure white
 * because the toran and petal artwork carry baked-in white mats.
 *
 * Motion budget (Director's cap): the hero sun-glow breathe and the event
 * petals' drift are the only continuous loops. Everything else is a
 * scroll-triggered fade-up. Both loops honor prefers-reduced-motion.
 */
:root {
  --ivory: #FCF9F3;
  --paper: #FFFFFF;
  --card: #FDF6EF;
  --maroon: #8E3B46;
  --maroon-soft: #A85560;
  --gold: #C6A15B;
  --gold-soft: #E3CFA3;
  --leaf: #7C8C6B;
  --ink: #3D3229;
  --ink-soft: #6B5D4F;
  --line: rgba(142, 59, 70, .18);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --alt: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --dev: 'Tiro Devanagari Hindi', 'Playfair Display', serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--ivory);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--maroon); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.vi-inner { max-width: 680px; margin: 0 auto; padding: clamp(48px, 11vw, 88px) clamp(20px, 6vw, 40px); text-align: center; position: relative; }

/* shared type */
.vi-kicker {
  font-family: var(--dev); font-size: clamp(1rem, 4vw, 1.2rem); color: var(--gold);
  margin-bottom: 8px; letter-spacing: .04em;
}
.vi-h2 {
  font-family: var(--serif); font-weight: 500; color: var(--maroon);
  font-size: clamp(1.8rem, 7vw, 2.6rem); line-height: 1.15;
}
.vi-rule {
  display: block; width: 64px; height: 1px; margin: 26px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  position: relative;
}
.vi-rule::after {
  content: ''; position: absolute; left: 50%; top: -2.5px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--gold); transform: translateX(-50%);
  box-shadow: -14px 0 0 -1px var(--gold-soft), 14px 0 0 -1px var(--gold-soft);
}
.vi-moti {
  display: block; width: 5px; height: 5px; margin: 30px auto 0; border-radius: 50%;
  background: var(--gold); box-shadow: -16px 0 0 0 var(--gold-soft), 16px 0 0 0 var(--gold-soft);
}

/* scroll reveal */
[data-vi-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-vi-reveal].vi-in { opacity: 1; transform: none; }

/* ================= 1 · the sky ================= */
.vi-hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
}
.vi-hero__art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
}
.vi-hero__glow {
  position: absolute; left: 50%; top: 22%; width: 70vmin; height: 70vmin;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 214, .5) 0%, rgba(255, 244, 214, 0) 60%);
  animation: vi-breathe 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes vi-breathe {
  0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: .9; transform: translate(-50%, -50%) scale(1.12); }
}
.vi-hero__scrim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 45%;
  background: linear-gradient(to top, rgba(94, 58, 28, .55) 0%, rgba(94, 58, 28, 0) 88%);
  pointer-events: none;
}
.vi-hero__type { position: relative; z-index: 2; text-align: center; padding: 0 24px calc(9vh + env(safe-area-inset-bottom)); }
.vi-hero__kicker {
  font-family: var(--alt); font-style: italic; font-size: clamp(1.15rem, 4.6vw, 1.5rem);
  color: #FDF7EA; text-shadow: 0 1px 12px rgba(94, 58, 28, .45);
}
.vi-hero__names {
  font-family: var(--serif); font-weight: 500; color: #FFFBF2;
  font-size: clamp(2.3rem, 10.5vw, 4.2rem); line-height: 1.08; margin-top: 6px;
  text-shadow: 0 2px 22px rgba(94, 58, 28, .5);
}
.vi-amp { font-family: var(--alt); font-style: italic; color: var(--gold-soft); }
.vi-hero__hindi {
  font-family: var(--dev); font-size: clamp(1.05rem, 4vw, 1.3rem);
  color: #F3E4C3; margin-top: 12px; text-shadow: 0 1px 10px rgba(94, 58, 28, .5);
}
.vi-hero__cue {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2;
  font-size: .6rem; letter-spacing: .34em; text-transform: uppercase; color: rgba(255, 248, 230, .75);
}

/* ================= 2 · blessings (white — toran mat) ================= */
.vi-bless { background: var(--paper); }
.vi-bless__toran { line-height: 0; }
.vi-bless__toran img { width: 100%; display: block; }
.vi-bless .vi-inner { padding-top: clamp(36px, 8vw, 60px); }
.vi-pcards { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 30px; }
@media (min-width: 560px) { .vi-pcards { grid-template-columns: 1fr 1fr; } }
.vi-pcard {
  border: 1px solid var(--gold-soft); border-radius: 4px; padding: 26px 20px;
  background: linear-gradient(180deg, #FFFEFA, var(--card));
  box-shadow: inset 0 0 0 4px #FFFEFA, inset 0 0 0 5px var(--gold-soft);
}
.vi-pcard__who {
  font-size: .68rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.vi-pcard__names {
  font-family: var(--alt); font-size: 1.25rem; line-height: 1.5; color: var(--ink);
}

/* ================= 3 · the ask (white — petal mats) ================= */
.vi-ask { background: var(--paper); position: relative; overflow: hidden; }
.vi-petal { position: absolute; width: clamp(120px, 34vw, 240px); pointer-events: none; z-index: 0; }
.vi-petal--tl { top: 0; left: 0; }
.vi-petal--br { bottom: 0; right: 0; }
.vi-ask .vi-inner { z-index: 1; }
.vi-ask__lead { font-size: 1.02rem; line-height: 1.75; color: var(--ink-soft); }
.vi-ask__names {
  font-family: var(--serif); font-weight: 500; color: var(--maroon);
  font-size: clamp(2rem, 8.5vw, 3.2rem); line-height: 1.15; margin-top: 18px;
}

/* ================= 4 · the ceremonies ================= */
.vi-events { background: var(--ivory); position: relative; overflow: hidden; }
.vi-stack { display: grid; gap: 20px; margin-top: 32px; }
.vi-event {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 30px 24px 26px;
  box-shadow: 0 16px 34px -26px rgba(61, 50, 41, .35);
}
.vi-motif { width: 44px; height: 44px; color: var(--gold); margin-bottom: 10px; }
.vi-event h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; color: var(--maroon); }
.vi-event__date { font-family: var(--alt); font-style: italic; font-size: 1.12rem; color: var(--ink); margin-top: 6px; }
.vi-event__venue { font-size: .92rem; color: var(--ink-soft); margin-top: 4px; }
.vi-event__cap { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; line-height: 1.6; }
.vi-cal {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--maroon); text-decoration: none;
  border-bottom: 1px solid var(--gold); padding-bottom: 2px;
}

/* the drifting petals — within budget: transform+opacity only */
.vi-drift {
  position: absolute; top: -30px; width: 14px; height: 14px; border-radius: 60% 40% 60% 40%;
  background: radial-gradient(circle at 30% 30%, #F2C4CE, #DF93A3 70%, #C76A7E);
  opacity: 0; pointer-events: none; z-index: 0;
  animation: vi-fall var(--dur, 12s) linear var(--delay, 0s) infinite;
}
@keyframes vi-fall {
  0% { transform: translate3d(0, -30px, 0) rotate(0deg); opacity: 0; }
  8% { opacity: .85; }
  50% { transform: translate3d(var(--sway, 26px), 44vh, 0) rotate(190deg); }
  92% { opacity: .7; }
  100% { transform: translate3d(calc(var(--sway, 26px) * -0.4), 88vh, 0) rotate(360deg); opacity: 0; }
}

/* ================= 5 · the photograph ================= */
.vi-couple { background: var(--ivory); }
.vi-frame {
  display: inline-block; transform: rotate(-1.5deg);
  background: var(--paper); padding: 14px 14px 20px;
  border: 1px solid var(--gold-soft);
  box-shadow: 0 24px 44px -28px rgba(61, 50, 41, .45), inset 0 0 0 4px #FFFEFA, inset 0 0 0 5px var(--gold-soft);
}
.vi-frame img { display: block; width: min(78vw, 380px); aspect-ratio: 2 / 3; object-fit: cover; }
.vi-frame figcaption {
  font-family: var(--alt); font-style: italic; font-size: 1.08rem;
  color: var(--ink-soft); padding-top: 14px;
}

/* ================= 6 · the countdown ================= */
.vi-count { background: var(--ivory); }
.vi-timer { display: flex; justify-content: center; gap: clamp(8px, 2.6vw, 14px); margin-top: 30px; }
.vi-box {
  min-width: clamp(64px, 19vw, 92px); padding: 16px 6px 12px;
  background: var(--paper); border: 1px solid var(--gold-soft); border-radius: 6px;
  box-shadow: inset 0 0 0 3px #FFFEFA, inset 0 0 0 4px var(--gold-soft);
}
.vi-num {
  display: block; font-family: var(--serif); font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: clamp(1.5rem, 7vw, 2.3rem); color: var(--maroon); line-height: 1;
}
.vi-unit {
  display: block; margin-top: 7px; font-size: .6rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.vi-count__when { margin-top: 20px; font-family: var(--alt); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); }

/* ================= 7 · the close ================= */
.vi-close { background: var(--paper); }
.vi-venue__name { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; color: var(--ink); margin-top: 24px; }
.vi-venue__addr { font-size: .95rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.6; }
.vi-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.vi-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 13px 26px; border-radius: 999px; text-decoration: none;
  background: var(--maroon); color: #FFF9EF; font-weight: 600; font-size: .95rem;
  box-shadow: 0 14px 28px -16px rgba(142, 59, 70, .7);
}
.vi-btn--ghost {
  background: transparent; color: var(--maroon); border: 1px solid var(--gold);
  box-shadow: none;
}
.vi-foot { margin-top: 34px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.vi-foot a { color: var(--maroon); text-decoration: none; border-bottom: 1px solid var(--gold-soft); }

/* ================= reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-vi-reveal] { opacity: 1; transform: none; transition: none; }
  .vi-hero__glow { animation: none; opacity: .7; }
  .vi-drift { display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}

/* small screens */
@media (max-width: 380px) {
  .vi-box { min-width: 60px; padding: 13px 4px 10px; }
  .vi-unit { font-size: .54rem; letter-spacing: .16em; }
}
