/* Meera & Aarav — Indian wedding invitation
   Mobile-first. Palette: deep maroon, gold, ivory, marigold. */

:root {
  --maroon-900: #2c070c;
  --maroon-800: #3b0a10;
  --maroon-700: #4d1016;
  --maroon-600: #6b1a20;
  --gold-300: #f0d48a;
  --gold-400: #e3bd5e;
  --gold-500: #d4af37;
  --gold-700: #9a6b1f;
  --marigold: #f5a623;
  --marigold-deep: #e8821e;
  --ivory: #fbf3e2;
  --ivory-deep: #f3e6cb;
  --ink: #3a2417;
  --ease-ceremony: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--maroon-900);
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--maroon-800);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.invite {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.45);
}

/* ===== Petal canvas (fixed, behind content) ===== */
#petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 88px;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--maroon-600) 0%, transparent 55%),
    radial-gradient(90% 60% at 50% 105%, #5a1419 0%, transparent 60%),
    var(--maroon-800);
  color: var(--ivory);
}

.toran {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  transform-origin: top center;
}

.mandala-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(150vw, 620px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  color: var(--gold-500);
}

.mandala {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.hero-copy { position: relative; }

.invocation {
  font-family: "Yatra One", serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--gold-300);
  margin: 0 0 26px;
}

.eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  color: var(--gold-400);
  margin: 0 0 10px;
}

.names {
  margin: 0;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(3.4rem, 16vw, 5.6rem);
  line-height: 1.04;
  color: var(--ivory);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-shadow: 0 2px 24px rgba(212, 175, 55, 0.25);
}

.name { display: inline-block; white-space: nowrap; }
.name .ch { display: inline-block; will-change: transform, opacity; }

.amp {
  font-size: 0.42em;
  color: var(--gold-500);
  line-height: 1;
}

.hero-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 22px 0 14px;
  color: var(--gold-500);
}

.rule-line {
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500));
}

.rule-line:last-child {
  background: linear-gradient(90deg, var(--gold-500), transparent);
}

.rule-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-500);
}

.hero-date {
  font-size: 1.06rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory);
  margin: 0;
}

.hero-tag {
  font-family: "Yatra One", serif;
  font-size: 1.05rem;
  color: var(--marigold);
  margin: 14px 0 0;
}

.scroll-cue {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--gold-300);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.scroll-cue svg { width: 18px; height: 18px; }

/* ===================== PANELS ===================== */
.panel {
  position: relative;
  padding: 72px 28px;
  text-align: center;
}

.panel--ivory {
  background:
    radial-gradient(140% 90% at 50% 0%, #fffaf0 0%, transparent 60%),
    var(--ivory);
  color: var(--ink);
}

.panel--maroon {
  background:
    radial-gradient(120% 80% at 50% 100%, var(--maroon-700) 0%, transparent 60%),
    var(--maroon-900);
  color: var(--ivory);
}

.kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--maroon-600);
  margin: 0 0 10px;
}

.kicker--gold { color: var(--gold-400); }

.panel-title {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 18px;
  color: var(--maroon-700);
}

.panel-title--gold { color: var(--gold-300); }

.prose {
  max-width: 46ch;
  margin: 0 auto;
  font-size: 1.08rem;
}

.prose strong { color: var(--maroon-600); font-weight: 600; }

.prose--accent {
  font-family: "Yatra One", serif;
  font-size: 1rem;
  color: var(--marigold-deep);
  margin-top: 18px;
}

.prose--light { color: var(--ivory-deep); }
.prose--light strong { color: var(--gold-300); }

/* Mehndi divider (scroll-drawn) */
.mehndi-divider {
  width: min(280px, 70vw);
  height: auto;
  color: var(--gold-700);
  margin: 0 auto 26px;
  display: block;
}

.mehndi-divider--flip { transform: scaleY(-1); }

/* ===================== EVENTS ===================== */
.event-list {
  list-style: none;
  margin: 38px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.event-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
  will-change: transform, opacity;
}

.event-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 50%;
  color: var(--gold-400);
}

.event-icon svg { width: 32px; height: 32px; }

.event-body h3 {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1;
  margin: 0 0 6px;
  color: var(--gold-300);
}

.event-when {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory);
}

.event-where {
  margin: 2px 0 0;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ivory-deep);
  opacity: 0.85;
}

/* ===================== COUNTDOWN ===================== */
.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.count-cell {
  flex: 0 1 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 6px 12px;
  background: var(--maroon-800);
  color: var(--gold-300);
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.count-num {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  will-change: transform, opacity;
}

.count-label {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ivory-deep);
}

.diya-row {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: 40px;
}

.diya {
  position: relative;
  width: 64px;
}

.diya svg { width: 100%; height: auto; display: block; }

.flame-glow {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.55) 0%, transparent 70%);
  animation: glow-pulse 2.6s ease-in-out infinite;
}

.diya--late .flame-glow { animation-delay: -1.3s; }

@keyframes glow-pulse {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.18); }
}

/* ===================== BUTTONS ===================== */
.btn {
  position: relative;
  display: inline-block;
  margin-top: 28px;
  padding: 15px 38px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s var(--ease-ceremony), box-shadow 0.25s var(--ease-ceremony);
}

.btn:active { transform: scale(0.96); }

.btn--gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500) 55%, var(--gold-700));
  color: var(--maroon-900);
  box-shadow: 0 10px 28px rgba(154, 107, 31, 0.35);
}

.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(154, 107, 31, 0.45);
}

.btn--ghost {
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: var(--gold-300);
}

.btn--ghost:hover { background: rgba(212, 175, 55, 0.12); }

.btn-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-110%);
  animation: shimmer 3.4s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-110%); }
  38%, 100% { transform: translateX(110%); }
}

/* ===================== FOOTER ===================== */
.footer {
  padding: 56px 28px calc(48px + env(safe-area-inset-bottom));
  text-align: center;
  background: var(--maroon-900);
  color: var(--ivory-deep);
  font-size: 0.95rem;
}

.footer-names {
  font-family: "Great Vibes", cursive;
  font-size: 2.4rem;
  color: var(--gold-400);
  margin: 0 0 10px;
}

.footer-names span { font-size: 0.6em; }

.footer p { margin: 4px 0; }

.footer-blessing {
  font-family: "Yatra One", serif;
  color: var(--gold-500);
  margin-top: 14px;
  font-size: 0.9rem;
}

/* ===================== DESKTOP ===================== */
@media (min-width: 720px) {
  body { font-size: 19px; }

  .invite {
    border-left: 1px solid rgba(212, 175, 55, 0.25);
    border-right: 1px solid rgba(212, 175, 55, 0.25);
  }

  .panel { padding: 96px 64px; }

  .event-list {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .countdown { gap: 16px; }
  .count-cell { flex-basis: 104px; }
  .count-num { font-size: 2.3rem; }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  #petals { display: none; }

  .flame-glow,
  .btn-shimmer { animation: none; }

  .btn-shimmer { display: none; }
}
