:root {
  --saffron: #c9962f;
  --gold-light: #ffe9a8;
  --deep-red: #8a2f1c;
  --cloth-red: #b4331b;
  --leaf-green: #2f8f4e;
  --cream: #fff8ea;
  --ink: #3a2415;
  --bg-black: #0a0306;
  --bg-maroon: #2a0f16;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Tiro Devanagari Marathi', serif;
  background: var(--bg-black);
  color: var(--ink);
  overflow-x: hidden;
}

/* ===================== AMBIENT CINEMATIC BACKGROUND ===================== */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 700px at 50% 12%, rgba(201,150,47,0.22) 0%, rgba(201,150,47,0) 60%),
    radial-gradient(ellipse 1200px 900px at 50% 100%, rgba(138,47,28,0.35) 0%, rgba(10,3,6,0) 65%),
    linear-gradient(180deg, #0a0306 0%, #200a10 45%, #2a0f16 75%, #150609 100%);
}

.vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 220px 60px rgba(0,0,0,0.75);
}

.glow-orb {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,233,168,0.18) 0%, rgba(255,233,168,0) 70%);
  animation: orbPulse 6s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, #ffe9a8 100%, transparent),
    radial-gradient(1.5px 1.5px at 80% 15%, #ffe9a8 100%, transparent),
    radial-gradient(1px 1px at 30% 35%, #ffe9a8 100%, transparent),
    radial-gradient(1px 1px at 65% 45%, #ffe9a8 100%, transparent),
    radial-gradient(1.5px 1.5px at 90% 60%, #ffe9a8 100%, transparent),
    radial-gradient(1px 1px at 15% 65%, #ffe9a8 100%, transparent),
    radial-gradient(1px 1px at 50% 8%, #ffe9a8 100%, transparent),
    radial-gradient(1.5px 1.5px at 25% 80%, #ffe9a8 100%, transparent);
  opacity: 0.5;
  animation: twinkleField 4s ease-in-out infinite alternate;
}

@keyframes twinkleField {
  from { opacity: 0.3; }
  to { opacity: 0.7; }
}

.temple-silhouette {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 22vh;
  min-height: 140px;
}

.petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -5%;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 30% 30%, #ffcf6b, #e8752c 80%);
  border-radius: 60% 0 60% 0;
  opacity: 0.85;
  animation-name: petalFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes petalFall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translate3d(20px, 115vh, 0) rotate(340deg); opacity: 0.6; }
}

/* ===================== CLOSED CARD ===================== */
.closed-card {
  position: fixed;
  inset: 0;
  z-index: 2;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.5s ease 0.35s, visibility 0.5s ease 0.35s;
}

/* the browser's own [hidden] behaviour must always win over any later rule */
[hidden] {
  display: none !important;
}

.closed-card.opening {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.closed-card {
  flex-direction: column;
  gap: 18px;
}

.door-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.closed-card.opening .door-scene {
  animation: doorPunchZoom 0.7s cubic-bezier(.5,0,.85,1) forwards;
}

@keyframes doorPunchZoom {
  0% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.05); filter: brightness(1.3); }
  100% { transform: scale(2.4); filter: brightness(2.4); }
}

/* bright seam of light down the door's centre split */
.door-crack {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 2px;
  height: 84%;
  background: linear-gradient(to bottom, transparent, #fff8e0 15%, #ffe9a8 50%, #fff8e0 85%, transparent);
  transform: translateX(-50%) scaleY(0.4);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 0 rgba(255,233,168,0);
}

.closed-card.opening .door-crack {
  animation: crackOpen 0.55s ease-out forwards;
}

@keyframes crackOpen {
  0% { opacity: 0; width: 2px; transform: translateX(-50%) scaleY(0.4); box-shadow: 0 0 0 rgba(255,233,168,0); }
  30% { opacity: 1; width: 4px; transform: translateX(-50%) scaleY(1); box-shadow: 0 0 24px 6px rgba(255,233,168,0.7); }
  100% { opacity: 1; width: 46px; transform: translateX(-50%) scaleY(1); box-shadow: 0 0 70px 26px rgba(255,248,224,0.95); }
}

.castle-door {
  height: min(72vh, 540px);
  width: auto;
  display: block;
}

/* leaf + coin, centred exactly on the door */
.leaf-coin-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  animation: floaty 4.5s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 12px)); }
}

.mandala-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 210px;
  height: 210px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255,233,168,0.25);
  background:
    repeating-conic-gradient(rgba(255,233,168,0.08) 0deg 4deg, transparent 4deg 18deg);
  animation: spinSlow 40s linear infinite;
}
.mandala-ring.ring2 {
  width: 168px;
  height: 168px;
  border-color: rgba(255,233,168,0.18);
  animation: spinSlow 30s linear infinite reverse;
}

@keyframes spinSlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.coin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  z-index: 3;
}

/* the Om coin is now the sole emblem on the door, so it reads bigger */
.coin.coin-big {
  width: 108px;
  height: 108px;
}
.coin-big .coin-inner {
  width: 108px;
  height: 108px;
}
.coin-big .coin-om {
  font-size: 52px;
}

.coin-rays {
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,233,168,0.4) 0%, rgba(255,233,168,0.12) 45%, rgba(255,233,168,0) 72%);
  animation: pulseInPlace 3.2s ease-in-out infinite;
}

.coin-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 236, 179, 0.85);
  animation: spinInPlace 12s linear infinite;
}

/* rotate/pulse in place — for elements centred with inset (not top/left+translate) */
@keyframes spinInPlace {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes pulseInPlace {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.coin-inner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3cf, var(--saffron) 62%, #7c561c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.55), inset 0 0 0 3px #fff2c7, 0 0 24px rgba(255,209,110,0.35);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(0,0,0,0.55), inset 0 0 0 3px #fff2c7, 0 0 0 0 rgba(224,166,58,0.45); }
  50% { box-shadow: 0 8px 22px rgba(0,0,0,0.55), inset 0 0 0 3px #fff2c7, 0 0 0 14px rgba(224,166,58,0); }
}

.coin-om {
  font-size: 30px;
  color: #6b3a12;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.tap-hint {
  margin: 0;
  font-family: 'Yatra One', serif;
  font-size: 1.15rem;
  letter-spacing: 1px;
  background: linear-gradient(100deg, #c9962f 20%, #fff3cf 45%, #c9962f 70%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  to { background-position: -200% center; }
}

.sparkle {
  position: absolute;
  color: #ffe08a;
  font-size: 1.4rem;
  animation: twinkle 2.6s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(255,224,138,0.8);
}
.s1 { top: 4%; left: 6%; animation-delay: 0s; }
.s2 { top: 55%; right: 4%; animation-delay: 0.8s; }
.s3 { bottom: 10%; left: 10%; animation-delay: 1.4s; }
.s4 { top: 18%; right: 8%; animation-delay: 2s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.75); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* golden flash on open */
.flash {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: radial-gradient(circle, #fff8e0 0%, #ffd67a 40%, rgba(255,214,122,0) 75%);
  opacity: 0;
  pointer-events: none;
}
.flash.fire {
  animation: flashPop 0.5s ease-out forwards;
}
@keyframes flashPop {
  0% { opacity: 0; transform: scale(0.3); }
  45% { opacity: 0.95; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* second, softer flash as the invitation arrives at the end of the warp */
.flash.arrive {
  animation: flashArrive 0.6s ease-out forwards;
}
@keyframes flashArrive {
  0% { opacity: 0; transform: scale(0.6); }
  35% { opacity: 0.85; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* "travelling at light speed to earth" hyperspace transition */
.warp {
  position: fixed;
  inset: 0;
  z-index: 6;
  background: #000;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.warp.active {
  animation: warpBg 1.15s ease forwards;
}
@keyframes warpBg {
  0% { opacity: 0; }
  10% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}

.streak {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--w, 2px);
  height: 40px;
  background: linear-gradient(to top, transparent, var(--clr, #fff3cf) 60%, #ffe9a8 85%, transparent);
  border-radius: 2px;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--ang, 0deg)) translateY(0) scaleY(0.3);
  filter: blur(var(--blur, 0px));
}
.streak.go {
  animation: streakOut var(--dur, 0.85s) cubic-bezier(.16,.6,.2,1) forwards;
  animation-delay: var(--sdelay, 0s);
}
@keyframes streakOut {
  0%   { opacity: 0; transform: translate(-50%, -50%) rotate(var(--ang, 0deg)) translateY(0) scaleY(0.3); }
  15%  { opacity: var(--maxop, 1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--ang, 0deg)) translateY(var(--dist, -480px)) scaleY(var(--scaleend, 9)); }
}

.warp-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fff8e0 0%, #ffd67a 45%, rgba(255,214,122,0) 75%);
  opacity: 0;
}
.warp.active .warp-core {
  animation: warpCore 1.15s ease forwards;
}
@keyframes warpCore {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.2); }
}

/* ===================== OPENED INVITATION ===================== */
.invite {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 70px;
  opacity: 0;
}

.invite.reveal {
  animation: arriveZoom 1s cubic-bezier(.2,.7,.25,1) forwards;
}

/* arriving at earth after the light-speed jump */
@keyframes arriveZoom {
  0%   { opacity: 0; transform: scale(0.2); filter: blur(14px); }
  55%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.invite-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  background:
    radial-gradient(ellipse 380px 260px at 50% 0%, rgba(232,151,90,0.22) 0%, rgba(232,151,90,0) 60%),
    linear-gradient(180deg, #fff6ea 0%, #ffe9d2 55%, #fbdfc0 100%);
  border-radius: 20px;
  padding: 34px 26px 38px;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(90,50,20,0.35),
    0 0 0 1px rgba(224,151,90,0.55),
    0 0 60px rgba(232,151,90,0.18);
  border: 1px solid #e8c19a;
}

.corner {
  position: absolute;
  width: 44px;
  height: 44px;
  opacity: 0.85;
}
.corner-tl { top: 10px; left: 10px; }
.corner-tr { top: 10px; right: 10px; transform: scaleX(-1); }
.corner-bl { bottom: 10px; left: 10px; transform: scaleY(-1); }
.corner-br { bottom: 10px; right: 10px; transform: scale(-1, -1); }

.garland {
  margin: -6px -6px 6px;
}
.garland-bottom {
  margin: 10px -6px -10px;
  transform: scaleY(-1);
}

.mute-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(224,151,90,0.6);
  background: linear-gradient(160deg, #fff3e4 0%, #ffe3c7 100%);
  color: #a8632f;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  z-index: 4;
}

.hero-title {
  font-family: 'Yatra One', serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  line-height: 1.05;
  margin: 4px 0 6px;
  letter-spacing: 0.5px;
  background: linear-gradient(100deg, #b9722a 10%, #e8a75c 35%, #c9762f 55%, #e8a75c 75%, #b9722a 92%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
  text-shadow: 0 2px 24px rgba(201,118,47,0.2);
}

.hero-sub {
  font-family: 'Yatra One', serif;
  color: #b9812f;
  font-size: 1.05rem;
  margin: 0 0 18px;
  letter-spacing: 0.5px;
}

.ganpati-stage {
  position: relative;
  width: 220px;
  margin: 4px auto 14px;
}

.ganpati-sunburst {
  position: absolute;
  top: 44%;
  left: 50%;
  width: 320px;
  height: 320px;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(rgba(224,178,90,0.16) 0deg 3deg, transparent 3deg 15deg);
  border-radius: 50%;
  z-index: 0;
  animation: spinSlow 50s linear infinite;
}

.arch-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 26px rgba(0,0,0,0.45));
}

.ganpati-clouds {
  position: relative;
  z-index: 2;
  width: 92%;
  margin: -14px auto 0;
  opacity: 0.95;
}

.lead-line {
  font-family: 'Yatra One', serif;
  color: #c9762f;
  font-weight: 400;
  margin: 6px 0 12px;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
}

.body-text {
  font-size: 1.04rem;
  line-height: 1.75;
  margin: 0 0 16px;
  color: #5a3a24;
}

.family-name {
  font-family: 'Yatra One', serif;
  font-size: 1.4rem;
  color: #c9704a;
  font-weight: 400;
  margin: 6px 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.fn-flourish {
  color: #c9762f;
  font-size: 1rem;
}

.timeline {
  text-align: left;
  margin-bottom: 26px;
}

.timeline-title {
  font-family: 'Yatra One', serif;
  font-weight: 400;
  font-size: 1.15rem;
  color: #c9762f;
  margin: 0 0 2px;
  text-align: center;
}

.tl-month {
  text-align: center;
  font-size: 0.95rem;
  color: #a8632f;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 16px;
}

.tl-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-left: 6px;
  padding-bottom: 18px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 22px;
  bottom: -2px;
  width: 1px;
  background: linear-gradient(180deg, rgba(201,118,47,0.5), rgba(201,118,47,0.12));
}
.tl-item:last-child::before { display: none; }
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(160deg, #e0975a 0%, #b9682f 100%);
  box-shadow: 0 4px 10px rgba(120,70,30,0.3), inset 0 0 0 1px rgba(255,243,207,0.6);
  z-index: 1;
}

.tl-content {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding-top: 4px;
}

.tl-date {
  font-family: 'Yatra One', serif;
  font-size: 1.15rem;
  color: #a8632f;
  min-width: 30px;
}

.tl-event {
  font-size: 1rem;
  color: #5a3a24;
}

.tl-note {
  flex-basis: 100%;
  font-size: 0.88rem;
  color: #c9704a;
  font-weight: 600;
}

.tl-item.highlight .tl-dot {
  background: linear-gradient(160deg, #e0805a 0%, #b94f2f 100%);
  box-shadow: 0 4px 14px rgba(120,70,30,0.35), 0 0 0 4px rgba(224,128,90,0.28);
}
.tl-item.highlight .tl-event {
  color: #8a3f1f;
  font-weight: 700;
}

.venue-block {
  text-align: center;
  border-top: 1px solid rgba(201,118,47,0.35);
  padding-top: 20px;
  margin-bottom: 18px;
  position: relative;
}
.venue-block::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #c9762f;
  border-radius: 3px;
}

.venue-block h2 {
  font-family: 'Yatra One', serif;
  font-weight: 400;
  font-size: 1.15rem;
  color: #c9762f;
  margin: 10px 0 8px;
}

.venue-block p {
  margin: 0 0 14px;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #5a3a24;
}

.map-btn {
  display: inline-block;
  background: linear-gradient(160deg, #e0855a 0%, #b9532f 100%);
  color: #fff;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  box-shadow: 0 8px 18px rgba(120,60,20,0.3);
  letter-spacing: 0.3px;
}

.map-embed {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #c9762f;
  box-shadow: 0 10px 24px rgba(90,50,20,0.25);
}

.closing-line {
  font-size: 1.02rem;
  color: #c9762f;
  font-weight: 600;
  margin: 0;
  line-height: 1.6;
}

.memory-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(201,118,47,0.35);
  text-align: center;
}

.memory-block h2 {
  font-family: 'Yatra One', serif;
  font-weight: 400;
  font-size: 1.05rem;
  color: #c9762f;
  margin: 0 0 12px;
}

.memory-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #c9762f;
  box-shadow: 0 14px 30px rgba(90,50,20,0.3);
  max-width: 320px;
  margin: 0 auto;
}

.memory-frame img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 400px) {
  .coin-big { width: 92px; height: 92px; }
  .coin-big .coin-inner { width: 92px; height: 92px; }
  .coin-big .coin-om { font-size: 44px; }
  .ganpati-stage { width: 185px; }
  .hero-title { font-size: clamp(2rem, 12vw, 2.8rem); }
}
