/* Priyansh & Palak wedding invitation: ivory, maroon and gold. */

:root {
  --ivory: #FFF9F1;
  --cream: #FBF1E4;
  --blush: #F8E9E0;
  --maroon: #7A1F2B;
  --maroon-deep: #561320;
  --gold: #C39A45;
  --gold-dark: #8A6422;
  --gold-light: #EBD39C;
  --ink: #3A2925;
  --muted: #7A6560;
  --card: #FFFFFF;
  --whatsapp: #1FA855;
  --shadow: 0 14px 40px rgba(86, 19, 32, 0.10);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Great Vibes", "Snell Roundhand", "Apple Chancery", cursive;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --guj: "Noto Serif Gujarati", "Gujarati Sangam MN", serif;
  --jaali: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23EBD39C' stroke-opacity='0.16' stroke-width='1'%3E%3Ccircle cx='0' cy='0' r='28'/%3E%3Ccircle cx='56' cy='0' r='28'/%3E%3Ccircle cx='0' cy='56' r='28'/%3E%3Ccircle cx='56' cy='56' r='28'/%3E%3Ccircle cx='28' cy='28' r='28'/%3E%3C/g%3E%3C/svg%3E");
  --jaali-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23C39A45' stroke-opacity='0.13' stroke-width='1'%3E%3Ccircle cx='0' cy='0' r='28'/%3E%3Ccircle cx='56' cy='0' r='28'/%3E%3Ccircle cx='0' cy='56' r='28'/%3E%3Ccircle cx='56' cy='56' r='28'/%3E%3Ccircle cx='28' cy='28' r='28'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
p { margin: 0; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

[lang="gu"] { font-family: var(--guj); }

/* ---------- Shared bits ---------- */

.kicker {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.blessing {
  font-family: var(--guj);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--maroon);
  letter-spacing: 0.02em;
}

.section {
  padding: 84px 20px;
  text-align: center;
}

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 7.5vw, 2.9rem);
  line-height: 1.12;
  color: var(--maroon);
  margin: 8px 0 0;
  text-wrap: balance;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px auto 40px;
  color: var(--gold);
}
.divider::before,
.divider::after {
  content: "";
  width: 70px;
  height: 1px;
  background: linear-gradient(to right, transparent, currentColor);
}
.divider::after { transform: scaleX(-1); }
.divider span {
  width: 9px;
  height: 9px;
  background: currentColor;
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px var(--ivory), 0 0 0 5px currentColor;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--maroon);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible,
a:focus-visible,
button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-solid { background: var(--maroon); color: var(--ivory); }
.btn-solid:hover { background: var(--maroon-deep); }
.btn-outline { background: transparent; color: var(--maroon); }
.btn-outline:hover { background: rgba(122, 31, 43, 0.06); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

/* ---------- Cover ---------- */

.cover { display: none; }
.js .cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  perspective: 1800px;
  overflow: hidden;
}

.door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background-color: var(--maroon);
  background-image: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.18)), var(--jaali);
  transition: transform 1.7s cubic-bezier(0.65, 0.02, 0.2, 1) 0.35s, opacity 0.6s ease 1.4s;
  backface-visibility: hidden;
  will-change: transform;
}
.door-left { left: 0; transform-origin: left center; }
.door-right { right: 0; transform-origin: right center; }
.door::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  border: 1.5px solid rgba(235, 211, 156, 0.6);
  box-shadow: inset 0 0 0 5px var(--maroon), inset 0 0 0 6px rgba(235, 211, 156, 0.35);
}
.door-left::before { left: 16px; right: 8px; }
.door-right::before { right: 16px; left: 8px; }
.door::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #F6E2AE, var(--gold) 60%, var(--gold-dark));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.door-left::after { right: 22px; }
.door-right::after { left: 22px; }

.arch {
  position: relative;
  z-index: 2;
  width: min(88vw, 380px);
  max-height: calc(100svh - 40px);
  overflow: auto;
  padding: 62px 26px 32px;
  border-radius: 200px 200px 18px 18px;
  background: var(--ivory);
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  transition: opacity 0.45s ease, transform 0.6s ease;
}
.arch::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px solid var(--gold);
  border-radius: 192px 192px 12px 12px;
  pointer-events: none;
}

.cover-guest {
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
}
.cover-kicker {
  margin-top: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--muted);
}

.seal {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 96px;
  height: 96px;
  margin: 18px auto 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9A2C3A, var(--maroon) 55%, var(--maroon-deep));
  box-shadow: inset 0 0 0 4px var(--maroon-deep), inset 0 0 0 5.5px var(--gold), 0 6px 16px rgba(86, 19, 32, 0.35);
  color: var(--gold-light);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
}
.seal em,
.crest-mono em,
.footer-mono em {
  font-family: var(--script);
  font-style: normal;
  font-size: 0.75em;
  padding: 0 2px;
}

.cover-names {
  margin: 4px 0 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.6rem, 11vw, 3.2rem);
  line-height: 1.15;
  color: var(--maroon);
}
.cover-names em { font-style: normal; color: var(--gold-dark); font-size: 0.8em; }
.cover-date {
  margin: 6px 0 24px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.btn-glow { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(195, 154, 69, 0.0); }
  50% { box-shadow: 0 0 0 8px rgba(195, 154, 69, 0.22); }
}

.cover.is-opening .arch { opacity: 0; transform: scale(0.94) translateY(12px); pointer-events: none; }
.cover.is-opening .door-left { transform: rotateY(-108deg); opacity: 0; }
.cover.is-opening .door-right { transform: rotateY(108deg); opacity: 0; }

/* Coming back to the cover: doors swing shut first, then the arch fades in. */
.cover.is-closing .door { transition: transform 1.1s cubic-bezier(0.5, 0, 0.3, 1), opacity 0.25s ease; }
.cover.is-closing .arch { transition: opacity 0.45s ease 0.9s, transform 0.6s ease 0.9s; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 118px 20px 76px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
}

.toran {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: url("assets/toran.svg") repeat-x center top / auto 100px;
  pointer-events: none;
  animation: sway 6s ease-in-out infinite alternate;
  transform-origin: top center;
}
@keyframes sway {
  from { transform: translateY(0); }
  to { transform: translateY(2px); }
}

.hero .blessing { margin-bottom: 14px; }

.crest {
  position: relative;
  width: clamp(150px, 40vw, 210px);
  aspect-ratio: 1;
  margin: 0 auto 20px;
}
.mandala {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 120s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.crest-mono {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 7vw, 2.3rem);
  color: var(--maroon);
  margin: auto;
  width: 46%;
  height: 46%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease;
}
.crest-mono:hover { transform: scale(1.08); }
.crest-mono:active { transform: scale(0.95); }
.crest-mono em { color: var(--gold-dark); }

.names {
  margin: 10px 0 12px;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3.6rem, 16vw, 6rem);
  line-height: 1.02;
  color: var(--maroon);
  outline: none;
}
.names > span { display: block; }
.names .amp { font-size: 0.5em; color: var(--gold-dark); line-height: 1.2; }

.hero-date {
  margin-top: 20px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--ink);
}
.hero-city {
  margin-top: 2px;
  font-size: 0.95rem;
  color: var(--muted);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-dark);
  text-decoration: none;
}
.scroll-cue svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ---------- Countdown ---------- */

.countdown {
  background-color: var(--maroon);
  background-image: var(--jaali);
  color: var(--ivory);
  padding: 64px 20px 70px;
}
.countdown .kicker { color: var(--gold-light); }
.countdown .section-title { color: var(--ivory); font-size: clamp(1.8rem, 6.5vw, 2.5rem); }
.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 520px;
  margin: 28px auto 0;
}
.cd-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 4px 12px;
  border-radius: 16px;
  background: rgba(255, 249, 241, 0.07);
  border: 1px solid rgba(235, 211, 156, 0.35);
}
.cd-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 9vw, 3.1rem);
  line-height: 1;
  color: var(--gold-light);
  font-variant-numeric: lining-nums tabular-nums;
}
.cd-label {
  margin-top: 8px;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}
.cd-done {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--gold-light);
}

/* ---------- Family invitation ---------- */

.families {
  background-color: var(--ivory);
  background-image: var(--jaali-soft);
}
.invite-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 44px 26px;
  background: var(--card);
  border: 1px solid var(--gold-light);
  border-radius: 20px;
  outline: 1px solid var(--gold-light);
  outline-offset: -10px;
  box-shadow: var(--shadow);
}
.parents {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--ink);
}
.parents-inline { font-weight: 500; color: var(--ink); }
.invite-line {
  margin: 10px auto 0;
  max-width: 340px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}
.person {
  margin-top: 18px;
  font-family: var(--script);
  font-size: clamp(2.3rem, 10vw, 2.9rem);
  line-height: 1.15;
  color: var(--maroon);
}
.person small {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.with {
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--gold-dark);
}

/* ---------- Events ---------- */

.events { background: linear-gradient(180deg, var(--blush) 0%, var(--ivory) 100%); }

.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 330px));
  justify-content: center;
  gap: 22px;
  max-width: 1060px;
  margin: 0 auto;
}

.event {
  --accent: var(--maroon);
  --tint: #F9E6E9;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 22px 26px;
  border-radius: 170px 170px 22px 22px;
  background: var(--card);
  border: 1px solid rgba(195, 154, 69, 0.35);
  box-shadow: var(--shadow);
  text-align: center;
}
.event--rings { --accent: #A8323F; --tint: #FBE6E9; }
.event--haldi { --accent: #B98400; --tint: #FFF2C6; }
.event--mandap { --accent: #C0410F; --tint: #FFE7D6; }

.event-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  box-shadow: 0 0 0 6px var(--card), 0 0 0 7px rgba(195, 154, 69, 0.4);
}
.event-icon svg { width: 44px; height: 44px; }
.event-local {
  margin-top: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}
.event-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.15;
  color: var(--maroon);
}
.event-time {
  margin-top: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--accent);
}
.event-date { font-size: 0.85rem; color: var(--muted); }
.event-blurb {
  margin-top: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--ink);
}
.event-venue {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  margin-top: 18px;
  padding: 14px 14px;
  border-radius: 14px;
  background: var(--ivory);
  text-align: left;
}
.event-venue svg { width: 20px; height: 20px; margin-top: 2px; flex: none; color: var(--accent); }
.event-venue strong { display: block; font-weight: 500; font-size: 0.95rem; color: var(--ink); }
.event-venue span { display: block; font-size: 0.85rem; color: var(--muted); }
.event-venue .tbc { font-style: italic; }
.event-dress {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--ink);
}
.event-dress b {
  font-weight: 500;
  color: var(--accent);
}
.event-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 20px;
}
.event-actions .btn { flex: 1 1 100%; min-height: 44px; padding: 10px 14px; font-size: 0.86rem; white-space: nowrap; }

/* ---------- RSVP ---------- */

.rsvp { background: var(--ivory); }
.rsvp-note {
  max-width: 460px;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink);
}
.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
  gap: 16px;
  max-width: 700px;
  margin: 30px auto 0;
}
.contact {
  padding: 22px 18px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid rgba(195, 154, 69, 0.35);
  box-shadow: var(--shadow);
}
.contact-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--maroon);
}
.contact-phone { font-size: 0.9rem; color: var(--muted); }
.contact-soon { margin-top: 6px; font-size: 0.88rem; font-style: italic; color: var(--muted); }
.contact .btn-row { margin-top: 14px; gap: 10px; }
.contact .btn { flex: 1 1 110px; min-height: 44px; padding: 10px 14px; font-size: 0.86rem; }
.btn-whatsapp { background: var(--whatsapp); border-color: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #178A45; }

/* ---------- Share ---------- */

.share {
  background-color: var(--cream);
  background-image: var(--jaali-soft);
}
.hashtag {
  font-family: var(--serif);
  font-style: italic;
  word-break: break-word;
}
.share-note {
  max-width: 420px;
  margin: 12px auto 0;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.footer {
  padding: 56px 20px calc(64px + env(safe-area-inset-bottom));
  text-align: center;
  background-color: var(--maroon);
  background-image: var(--jaali);
  color: var(--ivory);
}
.footer-mono {
  display: inline-flex;
  align-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2.2rem;
  color: var(--gold-light);
  padding: 0 6px;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease;
}
.footer-mono:hover { transform: scale(1.08); }
.footer-mono:active { transform: scale(0.95); }
.replay-link {
  margin-top: 22px;
  padding: 9px 20px;
  border: 1px solid rgba(235, 211, 156, 0.5);
  border-radius: 999px;
  background: transparent;
  color: var(--gold-light);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.replay-link:hover { background: rgba(235, 211, 156, 0.12); }
.footer-line {
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
}
.footer-sign {
  margin-top: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--gold-light);
}

/* ---------- Floating bits ---------- */

.petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 120;
  pointer-events: none;
  transition: opacity 0.4s linear;
}

.music-btn {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 110;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--maroon);
  color: var(--gold-light);
  box-shadow: 0 8px 22px rgba(86, 19, 32, 0.35);
  cursor: pointer;
}
.music-btn .eq { display: none; }
.music-btn.is-playing svg { display: none; }
.music-btn.is-playing .eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}
.music-btn .eq i {
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: var(--gold-light);
  animation: eq 0.9s ease-in-out infinite;
}
.music-btn .eq i:nth-child(2) { animation-delay: -0.3s; }
.music-btn .eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}
.music-btn .eq i { transform-origin: bottom; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 130;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 0.88rem;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Larger screens ---------- */

@media (min-width: 720px) {
  .section { padding: 110px 32px; }
  .toran { height: 120px; background-size: auto 120px; }
  .hero { padding-top: 140px; }
  .names > span { display: inline; }
  .names .amp { padding: 0 0.25em; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
