:root {
  --gold: #c9a96e;
  --gold-light: #e8d5a8;
  --gold-dark: #8b6914;
  --maroon: #800020;
  --cream: #fdf8f0;
  --dark: #1a1a1a;
  --text: #333;
  --text-light: #666;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ========== DECORATIVE ORNAMENT ========== */
.invite-ornament-top {
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 1.5rem;
}

/* ========== PETALS ========== */
#petals-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.petal {
  position: absolute;
  top: -40px;
  border-radius: 50% 0 50% 50%;
  opacity: 0.5;
  animation: fall linear forwards;
}

@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ========== NAVIGATION ========== */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: rgba(26, 26, 26, 0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 2px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  background: linear-gradient(135deg, #1a0a0a 0%, #2d0a1a 50%, #1a0a0a 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(201,169,110,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(128,0,32,0.15) 0%, transparent 50%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L35 25 L55 30 L35 35 L30 55 L25 35 L5 30 L25 25 Z' fill='none' stroke='rgba(201,169,110,0.06)' stroke-width='0.5'/%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeInUp 1.2s ease-out;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-light);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  letter-spacing: 3px;
}

.hero-header-img {
  display: block;
  max-width: 280px;
  width: 60%;
  height: auto;
  margin: 0 auto 1.5rem;
  object-fit: contain;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 5rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-title .amp {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
}

.hero-date {
  color: var(--gold-light);
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-parents {
  color: var(--gold-light);
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
  line-height: 1.8;
}

/* === Countdown === */
.countdown {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.countdown-item {
  text-align: center;
}

.countdown-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
}

.countdown-label {
  font-size: 0.7rem;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  min-height: 48px;
}

.btn-gold { background: var(--gold); color: var(--dark); }

.btn-gold:hover {
  background: var(--gold-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201,169,110,0.3);
}

.btn-full { width: 100%; }

/* ========== MAPS LINK (inline) ========== */
.maps-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-dark);
  text-decoration: none;
  border: 1px solid var(--gold);
  padding: 0.2rem 0.6rem;
  margin-left: 0.5rem;
  vertical-align: middle;
  letter-spacing: 0.5px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.maps-link:hover {
  background: var(--gold);
  color: #fff;
}

.maps-link-light {
  color: var(--gold-light);
  border-color: rgba(201,169,110,0.4);
}

.maps-link-light:hover {
  background: var(--gold);
  color: var(--dark);
}

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  cursor: pointer;
  color: var(--gold-light);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 18px;
  height: 18px;
  margin: 0.4rem auto 0;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(4px, 4px); }
}

/* ========== EVENT SECTIONS ========== */
.event-section {
  position: relative;
  padding: 5rem 1.5rem;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.event-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='30' fill='none' stroke='%23000' stroke-width='0.5'/%3E%3Ccircle cx='40' cy='40' r='20' fill='none' stroke='%23000' stroke-width='0.5'/%3E%3Ccircle cx='40' cy='40' r='10' fill='none' stroke='%23000' stroke-width='0.5'/%3E%3C/svg%3E");
}

.event-carnival { background: linear-gradient(170deg, #fdf2e9 0%, #fce4d6 100%); }
.event-carnival .event-badge { background: #e07c3e; }
.event-carnival .event-name { color: #b85a1f; }
.event-carnival .ornament { background: #e07c3e; }
.event-carnival .ornament::before,
.event-carnival .ornament::after { color: #e07c3e; }

.event-mehndi { background: linear-gradient(170deg, #f0f5ec 0%, #dce8d2 100%); }
.event-mehndi .event-badge { background: #5a8a3c; }
.event-mehndi .event-name { color: #3d6b22; }
.event-mehndi .ornament { background: #5a8a3c; }
.event-mehndi .ornament::before,
.event-mehndi .ornament::after { color: #5a8a3c; }

.event-haldi { background: linear-gradient(170deg, #fdf8e8 0%, #f5ebc4 100%); }
.event-haldi .event-badge { background: #c9a020; }
.event-haldi .event-name { color: #9a7a10; }
.event-haldi .ornament { background: #c9a020; }
.event-haldi .ornament::before,
.event-haldi .ornament::after { color: #c9a020; }

.event-wedding { background: linear-gradient(170deg, #1a0a0a 0%, #2d0a1a 100%); }
.event-wedding .event-inner { color: #fff; }
.event-wedding .event-badge { background: var(--gold); color: var(--dark); }
.event-wedding .event-name { color: var(--gold); }
.event-wedding .ornament { background: var(--gold); }
.event-wedding .ornament::before,
.event-wedding .ornament::after { color: var(--gold); }
.event-wedding .event-desc { color: var(--gold-light); }
.event-wedding .event-details { border-color: rgba(201,169,110,0.2); }
.event-wedding .event-detail { border-color: rgba(201,169,110,0.2); }
.event-wedding .detail-label { color: var(--gold); }
.event-wedding .detail-value { color: #fff; }

.event-inner {
  position: relative;
  max-width: 600px;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.event-inner.visible { opacity: 1; transform: translateY(0); }

.event-badge {
  display: inline-block;
  background: var(--maroon);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.4rem 1.2rem;
  margin-bottom: 1.25rem;
}

.event-name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--maroon);
  margin-bottom: 0.5rem;
}

.event-desc {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.event-details {
  text-align: left;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.event-detail {
  display: flex;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  align-items: baseline;
}

.detail-label {
  width: 80px;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-dark);
}

.detail-value {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

/* ========== ORNAMENT ========== */
.ornament {
  width: 50px;
  height: 3px;
  background: var(--gold);
  margin: 0 auto 1.75rem;
  position: relative;
}

.ornament::before, .ornament::after {
  content: '\25C6';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 0.45rem;
}

.ornament::before { left: -14px; }
.ornament::after { right: -14px; }

/* ========== RSVP ========== */
.section-rsvp {
  padding: 5rem 1.5rem;
  background: var(--cream);
}

.section-rsvp > * { max-width: 700px; margin-left: auto; margin-right: auto; }

.section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  text-align: center;
  color: var(--maroon);
  margin-bottom: 0.5rem;
}

.rsvp-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group { position: relative; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  background: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color 0.3s;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--gold); }

.form-group label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--text-light);
  font-size: 0.95rem;
  transition: all 0.2s;
  pointer-events: none;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -0.6rem;
  left: 0.75rem;
  font-size: 0.75rem;
  color: var(--gold-dark);
  background: var(--cream);
  padding: 0 0.25rem;
}

.form-group select {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  background: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  min-height: 48px;
}

.form-group select:focus { border-color: var(--gold); }

.rsvp-success { text-align: center; }
.rsvp-success.hidden { display: none; }

.rsvp-success h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--maroon);
  margin-bottom: 0.5rem;
}

.rsvp-success p { color: var(--text-light); }

/* keep "Ganesh Sthapana" together when it wraps */
.event-name .nowrap { white-space: nowrap; }

/* ========== CUSTOM RSVP FORM ========== */
.rsvp-form2 {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  text-align: left;
}

.field-block { display: flex; flex-direction: column; }

.field-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.req { color: var(--maroon); }

.rsvp-form2 input[type="text"],
.rsvp-form2 input[type="tel"],
.rsvp-form2 input[type="number"] {
  width: 100%;
  padding: 0.85rem;
  border: 1px solid #ccc;
  background: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  border-radius: 4px;
  -webkit-appearance: none;
  transition: border-color 0.2s;
}

.rsvp-form2 input:focus { border-color: var(--gold); }

/* Name: three parts */
.name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.name-part { display: flex; flex-direction: column; }

.sub-label {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.35rem;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.4rem;
}

/* Radio / checkbox options */
.opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
}

.opt input[type="radio"],
.opt input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--maroon);
  cursor: pointer;
  flex-shrink: 0;
}

/* Divider */
.form-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.15);
  margin: 0.25rem 0;
}

/* Event info block */
.event-info p {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0.15rem 0;
}

/* Number stepper */
.stepper {
  display: flex;
  align-items: stretch;
  max-width: 260px;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.step-btn {
  width: 46px;
  border: none;
  background: #f0e9dc;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.step-btn:hover { background: var(--gold-light); }

.stepper input[type="number"] {
  border: none !important;
  text-align: center;
  border-left: 1px solid #ccc !important;
  border-right: 1px solid #ccc !important;
  border-radius: 0 !important;
  -moz-appearance: textfield;
}

.stepper input[type="number"]::-webkit-outer-spin-button,
.stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Submit */
.btn-submit {
  background: var(--maroon);
  color: #fff;
  border-radius: 4px;
}

.btn-submit:hover {
  background: #5c0016;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(128,0,32,0.3);
}

.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-error {
  color: var(--maroon);
  font-size: 0.85rem;
  font-weight: 500;
  margin: -0.5rem 0 0;
}

.form-error.hidden { display: none; }

/* generic show/hide for conditional form fields */
.hidden { display: none !important; }

/* contact line in the thank-you block */
.rsvp-contact {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}
.rsvp-contact a {
  color: var(--gold-dark);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.rsvp-contact a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .name-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* ========== FOOTER ========== */
.footer {
  background: var(--dark);
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.footer-mandala {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.25rem;
  border: 2px solid var(--gold);
  border-radius: 50%;
  position: relative;
  opacity: 0.3;
}

.footer-mandala::before {
  content: '\2743';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.5rem;
}

.footer-names {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.footer-date {
  color: var(--gold-light);
  font-size: 0.8rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  color: var(--text-light);
  font-size: 0.75rem;
  font-style: italic;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(26,26,26,0.98);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.75rem;
  }

  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.9rem; padding: 0.5rem 0; display: block; }

  .invite-card { padding: 2.5rem 1.5rem; }

  .hero { padding: 4rem 1.25rem 2.5rem; }
  .countdown { gap: 0.5rem; }
  .countdown-item { min-width: 55px; padding: 0.5rem 0.3rem; }
  .countdown-num { font-size: 1.5rem; }

  .event-section { padding: 4rem 1.25rem; }
  .event-name { font-size: 1.8rem; }
  .event-desc { font-size: 0.85rem; }

  .maps-link { margin-left: 0; margin-top: 0.4rem; display: inline-block; }
}
