
/* ══════════════════════════════════════════════════
   TOKENS
   Warm parchment invitation card, not a dark web-app
   hero. Photos stay full-bleed atmosphere; an ivory
   "printed card" carries the actual reading content.
══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --maroon-deep: #3d0d14;
  --maroon:      #7a1f28;
  --gold:        #ab8027;
  --gold-light:  #d9b559;
  --ivory:       #faf3e2;
  --ivory-dim:   #f1e6cc;
  --leaf:        #55693f;
  --ink:         #2c1a0f;
}

html { scroll-behavior: smooth; scroll-snap-type: y mandatory; }

body {
  font-family: 'Noto Sans Devanagari', 'Mukta', 'Tiro Devanagari Sanskrit', serif;
  background: #000;
  color: var(--ink);
  overflow-x: hidden;
}

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

/* ─── Section shell ─── */
.page {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vh, 1rem);
  scroll-snap-align: start;
  overflow: hidden;
  padding: clamp(1.5rem, 4vh, 3rem) clamp(1rem, 4vw, 2rem);
}

.page::before {
  content: '';
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
#page1::before { background-image: url('Img/home-page.jpg'); }
#page2::before { background-image: url('Img/front-page.jpg'); }
#page3::before { background-image: url('Img/last-page.jpg'); }

/* soft vignette so the photo reads as atmosphere behind the card, not a busy backdrop */
.page::after {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(61,13,20,0.15) 0%, rgba(30,6,10,0.55) 68%, rgba(20,4,7,0.78) 100%);
}

/* ─── Toran (leaf garland) — the one recurring signature motif ─── */
.toran {
  width: 100%;
  max-width: 640px;
  height: 20px;
  margin: 0 auto;
  background-image:
    linear-gradient(135deg, var(--leaf) 26%, transparent 26.5%),
    linear-gradient(225deg, var(--leaf) 26%, transparent 26.5%);
  background-size: 22px 20px;
  background-position: 0 0, 11px 0;
  background-repeat: repeat-x;
  opacity: 0.92;
  position: relative;
}
.toran::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold-light) 12%, var(--gold-light) 88%, transparent);
}
.toran.flip { transform: rotate(180deg); }

/* ─── The printed card itself ─── */
.card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 640px;
  background: var(--ivory);
  border: 1px solid rgba(171,128,39,0.45);
  box-shadow: 0 24px 70px rgba(0,0,0,0.45), inset 0 0 0 6px rgba(250,243,226,0.0);
  padding: 0 clamp(1.5rem, 5vw, 3rem) clamp(2rem, 5vw, 3rem);
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.card.visible { opacity: 1; transform: translateY(0); }

.card-body {
  padding-top: clamp(1.5rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.5rem);
  text-align: center;
}

.rule {
  width: 72px;
  height: 2px;
  background: var(--gold);
  opacity: 0.7;
}

.om {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--maroon);
  text-align: center;
  width: 100%;
}

.headline {
  font-family: 'Tiro Devanagari Sanskrit', serif;
  font-size: clamp(1.9rem, 6vw, 3rem);
  color: var(--maroon);
  line-height: 1.25;
}

.subline {
  font-family: 'Tiro Devanagari Sanskrit', serif;
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  color: var(--gold);
}

/* ─── Page 1: welcome photo + greeting ─── */
.welcome-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}
.welcome-photo {
  width: clamp(120px, 30vw, 168px);
  height: clamp(120px, 30vw, 168px);
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 5px var(--ivory), 0 0 0 6px rgba(171,128,39,0.4);
  overflow: hidden;
  flex-shrink: 0;
}
.welcome-photo img { width: 100%; height: 100%; object-fit: cover; }

.greeting {
  font-size: clamp(0.98rem, 2.6vw, 1.15rem);
  line-height: 1.8;
  max-width: 46ch;
}

@media (min-width: 700px) {
  .welcome-row { flex-direction: row; text-align: left; gap: 1.75rem; }
  .greeting { text-align: left; flex: 1; }
}

.hero-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.hero-tagline {
  font-family: 'Tiro Devanagari Sanskrit', serif;
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  color: var(--maroon);
}
.hero-year {
  font-family: 'Yatra One', 'Tiro Devanagari Sanskrit', serif;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  color: var(--gold);
  line-height: 1;
}

.scroll-cue {
  position: absolute;
  bottom: clamp(0.75rem, 3vh, 1.5rem);
  left: 50%; transform: translateX(-50%);
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  color: var(--ivory);
  opacity: 0.75;
  font-size: 0.8rem;
}
.scroll-cue svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; animation: dip 2s ease-in-out infinite; }
@keyframes dip { 0%,100% { transform: translateY(0);} 50% { transform: translateY(6px);} }

/* ─── Arch frame (temple silhouette) — devotional images & map ─── */
.arch-frame {
  width: clamp(190px, 42vw, 250px);
  height: clamp(230px, 50vw, 300px);
  border-radius: 50% 50% 8% 8% / 62% 62% 10% 10%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 5px var(--ivory), 0 0 0 6px rgba(171,128,39,0.4);
  overflow: hidden;
  margin: 0 auto;
  flex-shrink: 0;
}
.arch-frame img, .arch-frame iframe { width: 100%; height: 100%; object-fit: cover; border: none; }

/* Map gets a square frame instead of the temple arch — reads more like a location card */
.map-frame {
  width: clamp(190px, 42vw, 250px);
  height: clamp(190px, 42vw, 250px);
  border-radius: 14px;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 5px var(--ivory), 0 0 0 6px rgba(171,128,39,0.4);
  overflow: hidden;
  margin: 0 auto;
  flex-shrink: 0;
}
.map-frame iframe { width: 100%; height: 100%; border: none; }

/* ─── Shloka — set apart on its own ribbon, sacred-text feel ─── */
.shloka {
  font-family: 'Tiro Devanagari Sanskrit', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  line-height: 2;
  color: var(--maroon);
  border-top: 1px solid rgba(171,128,39,0.5);
  border-bottom: 1px solid rgba(171,128,39,0.5);
  padding: 0.9rem 0;
}

/* ─── Ledger row: दिनांक / वेळ / स्थळ, like a printed patrika, not a card-grid ─── */
.invite-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ledger {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.ledger-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  text-align: left;
}
.ledger-icon { font-size: 1.1rem; flex-shrink: 0; }
.ledger-label {
  font-family: 'Noto Sans Devanagari', 'Mukta', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gold);
  min-width: 4.2rem;
  flex-shrink: 0;
}
.ledger-value {
  font-size: clamp(0.95rem, 2.4vw, 1.08rem);
  line-height: 1.5;
}

@media (min-width: 640px) {
  .ledger { flex-direction: row; justify-content: space-between; gap: 1rem; }
  .ledger-item { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
}

.invite-line {
  font-size: clamp(0.92rem, 2.3vw, 1.05rem);
  line-height: 1.7;
  opacity: 0.85;
}

/* ─── Page 3: closing + map/address ─── */
.closing {
  font-size: clamp(0.98rem, 2.6vw, 1.15rem);
  line-height: 1.85;
}

.venue-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  width: 100%;
}
.address {
  text-align: center;
  width: 100%;
}
.address-label {
  font-family: 'Noto Sans Devanagari', 'Mukta', sans-serif;
  font-weight: 600;
  color: var(--gold);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.address-text {
  font-size: clamp(0.92rem, 2.3vw, 1.05rem);
  line-height: 1.8;
}
.address-phone { color: var(--maroon); font-weight: 600; margin-top: 0.4rem; }

@media (min-width: 700px) {
  .venue-row { flex-direction: row; align-items: flex-start; text-align: left; gap: 2rem; }
  .address { text-align: left; }
}

.chant {
  font-family: 'Noto Sans Devanagari', 'Mukta', sans-serif;
  font-weight: 500;
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  color: var(--maroon);
  text-align: center;
  opacity: 0.85;
}

/* ─── Desktop composition (≥900px): the card widens and the
   devotional image sits beside the reading content instead of
   stacking above it ─── */
@media (min-width: 900px) {
  .card { max-width: 940px; }
  #page1 .card { max-width: 760px; }

  #page2 .card-body,
  #page3 .card-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    align-items: start;
    text-align: left;
    column-gap: 2.5rem;
    row-gap: 1.25rem;
  }
  #page2 .om, #page2 .headline, #page2 .rule.top { grid-column: 1 / -1; text-align: center; justify-self: center; }
  #page3 .om { grid-column: 1 / -1; }

  #page2 .shloka { grid-column: 1 / -1; text-align: center; }
  #page2 .arch-frame { grid-column: 1; }
  #page2 .invite-block { grid-column: 2; }

  #page3 .map-frame { grid-column: 1; width: 260px; height: 260px; }
  #page3 .closing { grid-column: 1 / -1; text-align: center; }
  #page3 .address { grid-column: 2; align-self: center; }
  #page3 .chant { grid-column: 1 / -1; }
}

@media (min-width: 900px) and (max-height: 820px) {
  .card-body { gap: 1rem; }
  .arch-frame, .map-frame { width: 200px !important; height: 240px !important; }
}

/* ─── Floating petals ─── */
.petals { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.petal { position: absolute; top: -10%; animation: fall linear infinite; opacity: 0; }
@keyframes fall {
  0% { opacity: 0; transform: translateY(0) rotate(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(110vh) rotate(540deg); }
}

/* ─── Page-1 load-in: one orchestrated moment ─── */
#page1 .card { animation: cardIn 1s ease forwards; opacity: 0; transform: translateY(24px) scale(0.98); }
@keyframes cardIn { to { opacity: 1; transform: translateY(0) scale(1); } }
#page1 .toran { opacity: 0; animation: fadeIn 0.8s ease 0.5s forwards; }
@keyframes fadeIn { to { opacity: 0.92; } }

@media (prefers-reduced-motion: reduce) {
  .card, #page1 .card, .toran { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

@media (max-width: 380px) {
  .headline { font-size: 1.7rem; }
  .hero-year { font-size: 2.2rem; }
}
