/* ===========================================================
   Kheer's Birthday — romantic night-walk theme
   night #1B1A3A · night-2 #262556 · blush #F2A6C1
   rose #E85D75 · gold #F4D35E · lavender #B8A9E0 · cream #FFF8F4
=========================================================== */

:root{
  --night: #1B1A3A;
  --night-2: #262556;
  --cream: #FFF8F4;
  --cream-2: #FFEFF3;
  --blush: #F2A6C1;
  --rose: #E85D75;
  --gold: #F4D35E;
  --lavender: #B8A9E0;
  --ink: #3A2E4D;
  --white: #FFFDFB;

  --font-display: "Fraunces", serif;
  --font-script: "Caveat", cursive;
  --font-body: "Quicksand", sans-serif;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,h2{ font-family: var(--font-display); margin:0; }

.script{ font-family: var(--font-script); color: var(--rose); font-weight: 700; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- scroll reveal ---------- */
.reveal-item{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.reveal-item.revealed{
  opacity: 1;
  transform: translateY(0);
}
.reasons-grid .reveal-item:nth-child(2){ transition-delay: 0.07s; }
.reasons-grid .reveal-item:nth-child(3){ transition-delay: 0.14s; }
.reasons-grid .reveal-item:nth-child(4){ transition-delay: 0.21s; }
.reasons-grid .reveal-item:nth-child(5){ transition-delay: 0.28s; }
.reasons-grid .reveal-item:nth-child(6){ transition-delay: 0.35s; }

/* ---------- hero scroll cue ---------- */
.scroll-cue{
  margin-top: 46px;
  width: 28px;
  height: 46px;
  border: 2px solid rgba(58,46,77,0.35);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue span{
  width: 5px;
  height: 9px;
  border-radius: 999px;
  background: var(--rose);
  animation: scrollWheel 1.8s ease-in-out infinite;
}
@keyframes scrollWheel{
  0%{ opacity: 1; transform: translateY(0); }
  70%{ opacity: 0; transform: translateY(14px); }
  100%{ opacity: 0; transform: translateY(14px); }
}

/* ---------- confetti canvas ---------- */
#confetti-canvas{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 500;
}

/* ---------- floating sticker field ---------- */
.sticker-field{
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.sticker{
  position: absolute;
  left: var(--x);
  bottom: -60px;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  opacity: 0.5;
  animation: floatUp var(--dur, 10s) ease-in var(--delay, 0s) infinite;
  filter: drop-shadow(0 2px 4px rgba(27,26,58,0.1));
}
@keyframes floatUp{
  0%{ transform: translateY(0) rotate(-6deg); opacity:0; }
  10%{ opacity:0.5; }
  90%{ opacity:0.45; }
  100%{ transform: translateY(-110vh) rotate(10deg); opacity:0; }
}

/* ---------- twinkling star field (behind gate) ---------- */
.star-field{
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.star-field .twinkle{
  position: absolute;
  background: var(--gold);
  border-radius: 50%;
  animation: twinkle 2.6s ease-in-out infinite;
}
@keyframes twinkle{
  0%,100%{ opacity: 0.15; transform: scale(0.8); }
  50%{ opacity: 0.9; transform: scale(1.2); }
}

/* =============== GATE (night sky) =============== */
.gate{
  min-height: 100svh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  position: relative;
  z-index: 2;
  background:
    radial-gradient(circle at 80% 10%, rgba(244,211,94,0.12) 0%, transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(184,169,224,0.15) 0%, transparent 50%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}
.gate-card{
  text-align:center;
  max-width: 420px;
  width: 100%;
  background: rgba(255,253,251,0.97);
  border-radius: 28px;
  padding: 44px 32px 36px;
  box-shadow: 0 24px 70px -20px rgba(0,0,0,0.55);
  border: 1px solid rgba(244,211,94,0.25);
  position: relative;
  z-index: 2;
}
.eyebrow{
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--lavender);
  font-weight: 700;
  margin: 0 0 6px;
}
.eyebrow.center{ text-align:center; }
.eyebrow.light{ color: var(--lavender); }
.gate-name{
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  color: var(--rose);
  font-weight: 600;
  font-style: italic;
}
.gate-name .dot{ color: var(--gold); }

.gate-scene{ margin: 16px auto 8px; width: 200px; }
.scene-svg{ width:100%; height:auto; overflow: visible; }

.moon{ fill: var(--gold); opacity: 0.9; }
.star{ fill: var(--gold); animation: starTwinkle 2.4s ease-in-out infinite; }
.star:nth-child(2){ animation-delay: .3s; }
.star:nth-child(3){ animation-delay: .6s; }
.star:nth-child(4){ animation-delay: .9s; }
.star:nth-child(5){ animation-delay: 1.2s; }
.star:nth-child(6){ animation-delay: 1.5s; }
@keyframes starTwinkle{
  0%,100%{ opacity: 0.35; }
  50%{ opacity: 1; }
}

.figure{ fill: var(--ink); opacity: 0.85; }
.figure.light-fig{ fill: var(--cream); opacity: 0.92; }
.hold-line{ stroke: var(--rose); stroke-width: 2.4; stroke-linecap: round; }
.tiny-heart{ fill: var(--rose); animation: heartPulse 1.6s ease-in-out infinite; transform-origin: center; }
.tiny-heart.drift{ animation: heartDrift 2.6s ease-in-out infinite; }
@keyframes heartPulse{
  0%,100%{ transform: scale(1); }
  50%{ transform: scale(1.25); }
}
@keyframes heartDrift{
  0%{ transform: translateY(0) scale(1); opacity: 1; }
  70%{ opacity: 0.8; }
  100%{ transform: translateY(-22px) scale(0.7); opacity: 0; }
}

.gate-line{
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 12px 0 22px;
  color: var(--ink);
}
.open-btn{
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose), #d3495f);
  border: none;
  padding: 15px 34px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 28px -10px rgba(232,93,117,0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: pulseBtn 2.4s ease-in-out infinite;
}
.open-btn:hover{ transform: translateY(-2px) scale(1.03); }
.open-btn:active{ transform: translateY(0) scale(0.98); }
@keyframes pulseBtn{
  0%,100%{ box-shadow: 0 12px 28px -10px rgba(232,93,117,0.6); }
  50%{ box-shadow: 0 14px 34px -8px rgba(232,93,117,0.85); }
}
.gate-hint{ margin-top: 14px; font-size: 0.8rem; color: #A9927C; }

.gate.closing{ animation: gateOut 0.6s ease forwards; }
@keyframes gateOut{
  to{ opacity: 0; transform: scale(1.04); visibility: hidden; }
}

/* =============== MAIN =============== */
.main{ position: relative; z-index: 2; }

.music-toggle{
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 600;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid #F1E2CE;
  background: var(--white);
  box-shadow: 0 8px 20px -8px rgba(27,26,58,0.3);
  cursor: pointer;
  display:flex; align-items:center; justify-content:center;
  font-size: 1.2rem;
}
.music-toggle .music-icon{ animation: spin 4s linear infinite; display:inline-block; }
.music-toggle.paused .music-icon{ animation: none; opacity: 0.4; }
@keyframes spin{ from{ transform: rotate(0);} to{ transform: rotate(360deg);} }

.section-title{
  text-align:center;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--ink);
}
.section-title.light{ color: var(--cream); }
.section-sub{
  text-align:center;
  color: #9C8267;
  margin: 8px 0 0;
  font-size: 0.95rem;
}

/* HERO */
.hero{
  min-height: 92svh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center;
  padding: 40px 20px;
}
.hero-title{
  font-size: clamp(2.4rem, 9vw, 4.4rem);
  line-height: 1.08;
  font-weight: 600;
  color: var(--ink);
}
.hero-title .script{ font-size: 1.15em; }
.hero-sub{
  margin-top: 18px;
  font-size: 1.1rem;
  color: #7A6C8E;
  max-width: 480px;
}
.pop-btn{
  margin-top: 32px;
  font-family: var(--font-body);
  font-weight: 700;
  background: var(--ink);
  color: var(--white);
  border: none;
  padding: 14px 30px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(58,46,77,0.5);
  transition: transform 0.2s ease;
}
.pop-btn:hover{ transform: translateY(-2px); }

/* LETTER */
.letter-section{ padding: 60px 20px 100px; display:flex; justify-content:center; }
.letter-card{
  max-width: 620px;
  width: 100%;
  background: var(--white);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 18px 50px -24px rgba(58,46,77,0.3);
  border: 1px solid #F1E2CE;
  position: relative;
}
.letter-mark{ color: var(--gold); font-size: 1.4rem; margin: 0 0 10px; }
.letter-text{
  font-family: var(--font-script);
  font-size: 1.5rem;
  line-height: 1.55;
  color: var(--ink);
}
.letter-text em{ color: var(--rose); font-style: normal; font-weight: 700; }
.letter-sign{
  margin-top: 18px;
  text-align: right;
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--rose);
}

/* WALK SECTION (night) */
.walk-section{
  background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
.walk-content{ max-width: 560px; text-align: center; }
.walk-text{
  margin-top: 16px;
  color: #D8D2EC;
  font-size: 1.08rem;
  line-height: 1.65;
}
.walk-scene{ max-width: 520px; width: 100%; }
.walk-svg{ width: 100%; height: auto; }
.lamp-post{ stroke: #4A4776; stroke-width: 3; }
.lamp-glow{ fill: var(--gold); opacity: 0.18; }
.lamp-bulb{ fill: var(--gold); opacity: 0.9; }
.road{ stroke: #322F5C; stroke-width: 2; }

.couple-shadow{ fill: #0E0D22; }
.ground-glow{ fill: rgba(244,211,94,0.16); }
.ground-shadow{ fill: rgba(0,0,0,0.4); }

/* CAKE */
.cake-section{ padding: 80px 20px 100px; }
.cake-wrap{
  max-width: 420px;
  margin: 40px auto 0;
  text-align: center;
}
.cake-svg{ width: 100%; height: auto; }
.candle{ cursor: pointer; }
.flame{
  fill: #FFB74D;
  transform-origin: bottom center;
  animation: flicker 0.7s ease-in-out infinite alternate;
}
@keyframes flicker{
  from{ transform: scaleY(1) scaleX(1); opacity: 1; }
  to{ transform: scaleY(1.12) scaleX(0.92); opacity: 0.85; }
}
.candle.blown .flame{ animation: none; opacity: 0; transform: scaleY(0); }
.cake-msg{
  margin-top: 20px;
  min-height: 1.6em;
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--rose);
}

/* REASONS */
.reasons-section{ padding: 20px 20px 100px; }
.reasons-grid{
  max-width: 900px;
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.reason-card{
  background: var(--white);
  border: 1px solid #F1E2CE;
  border-radius: 20px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 12px 28px -18px rgba(58,46,77,0.35);
  transition: transform 0.25s ease;
}
.reason-card:hover{ transform: translateY(-4px) rotate(-0.5deg); }
.reason-emoji{ font-size: 1.8rem; display:block; margin-bottom: 10px; }
.reason-card p{ margin:0; font-size: 0.98rem; line-height: 1.5; color: #6E5F7E; }

/* CLOSING */
.closing-section{ padding: 20px 20px 80px; text-align: center; }
.closing-card{
  max-width: 560px;
  margin: 0 auto;
  background: linear-gradient(160deg, var(--rose), #d3495f);
  color: var(--white);
  border-radius: 28px;
  padding: 52px 36px;
  box-shadow: 0 24px 60px -22px rgba(232,93,117,0.55);
}
.closing-title{ font-size: clamp(1.6rem, 5vw, 2.2rem); color: var(--white); }
.closing-text{ margin-top: 16px; line-height: 1.6; font-size: 1.05rem; opacity: 0.96; }
.closing-heart{ font-size: 1.6rem; margin-top: 18px; }
.closing-card .pop-btn{
  background: var(--white);
  color: var(--rose);
  margin-top: 26px;
}
.footer-note{
  margin-top: 30px;
  font-family: var(--font-script);
  font-size: 1.2rem;
  color: var(--lavender);
}

@media (max-width: 480px){
  .letter-card{ padding: 36px 24px; }
  .letter-text{ font-size: 1.3rem; }
}
