:root {
  --maroon-deep: #3d0c14;
  --maroon: #5c0f1c;
  --maroon-light: #7a1220;
  --gold: #cda45e;
  --gold-light: #e6c98a;
  --gold-deep: #a8823f;
  --cream: #fbf3e7;
  --cream-deep: #f2e3ca;
  --ink: #3a1418;
  --ink-soft: #6b3a3f;
  --shadow: 0 20px 55px rgba(61, 12, 20, 0.22);
  --serif: 'Playfair Display', 'Cormorant Garamond', serif;
  --script: 'Great Vibes', cursive;
  --body-font: 'Cormorant Garamond', 'Playfair Display', serif;
  --arabic: 'Amiri', serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: inherit; }

/* Warm paper-grain texture, reused on cream surfaces */
.grain {
  background-image:
    radial-gradient(rgba(61,12,20,0.05) 1px, transparent 1px),
    radial-gradient(rgba(61,12,20,0.04) 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  background-position: 0 0, 1px 2px;
}

/* ---------------- Ambient rose corners on the cream card ---------------- */
.floral-layer {
  position: absolute;
  inset: 0;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.corner {
  position: absolute;
  width: 150px;
  height: 150px;
  opacity: 0.96;
  animation: sway 7.5s ease-in-out infinite;
}
.corner-tl { top: 6px; left: 6px; }
.corner-tr { top: 6px; right: 6px; transform: scaleX(-1); animation-delay: 0.6s; }
.corner-bl { bottom: 6px; left: 6px; transform: scaleY(-1); animation-delay: 1.1s; }
.corner-br { bottom: 6px; right: 6px; transform: scale(-1, -1); animation-delay: 1.6s; }

@keyframes sway {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg); }
}
.corner-tr { animation-name: sway-tr; }
.corner-bl { animation-name: sway-bl; }
.corner-br { animation-name: sway-br; }
@keyframes sway-tr {
  0%, 100% { transform: scaleX(-1) rotate(-1.5deg); }
  50% { transform: scaleX(-1) rotate(1.5deg); }
}
@keyframes sway-bl {
  0%, 100% { transform: scaleY(-1) rotate(-1.5deg); }
  50% { transform: scaleY(-1) rotate(1.5deg); }
}
@keyframes sway-br {
  0%, 100% { transform: scale(-1,-1) rotate(-1.5deg); }
  50% { transform: scale(-1,-1) rotate(1.5deg); }
}

/* ---------------- Gate / cover screen: closed velvet card ---------------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: var(--cream-deep);
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
.gate.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body.gate-open { overflow: hidden; height: 100vh; }

.gate-card {
  position: relative;
  width: min(420px, 100%);
  height: min(760px, 92vh);
  border-radius: 200px 200px 18px 18px;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow);
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255,255,255,0.10), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.4), transparent 65%),
    linear-gradient(165deg, var(--maroon-light) 0%, var(--maroon) 45%, var(--maroon-deep) 100%);
}
.gate-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(230, 201, 138, 0.55);
  border-radius: 190px 190px 10px 10px;
  pointer-events: none;
}

.gate-corner {
  position: absolute;
  width: 130px;
  height: 130px;
  opacity: 0.95;
}
.gate-corner-tr { top: 22px; right: 14px; transform: scaleX(-1); }
.gate-corner-bl { bottom: 22px; left: 14px; transform: scaleY(-1); }

.gate-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  max-width: 380px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: floatUp 3.5s ease-in-out infinite;
}
@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.gate-bismillah {
  font-family: var(--arabic);
  font-size: clamp(20px, 5vw, 28px);
  color: var(--gold-light);
  margin: 0 0 20px;
}

.gate-eyebrow {
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold-light);
  margin: 0 0 12px;
}

.gate-names {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(24px, 7.5vw, 38px);
  color: var(--cream);
  margin: 0 0 30px;
  line-height: 1.25;
  text-shadow: 0 2px 18px rgba(0,0,0,0.25);
}
.gate-name-line {
  display: block;
  text-wrap: balance;
}
.gate-names .amp {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.55em;
  color: var(--gold);
  margin: 4px 0;
}

.bow-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px;
  border-radius: 50%;
  transition: transform 0.25s ease;
}
.bow-button:hover { transform: scale(1.06); }
.bow-button:active { transform: scale(0.96); }

.bow-svg { width: 150px; height: auto; overflow: visible; }
.bow-wing { transition: transform 0.7s cubic-bezier(.4,0,.2,1); transform-origin: 0px 0px; }
.bow-wing-l { transform-origin: -6px 0px; }
.bow-wing-r { transform-origin: 6px 0px; }

.gate.untying .bow-wing-l { transform: rotate(-38deg) translate(-14px, 10px); }
.gate.untying .bow-wing-r { transform: rotate(38deg) translate(14px, -10px); }
.gate.untying .bow-svg { transition: transform 0.7s ease 0.15s; transform: scale(1.15); }

.gate-cta {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: ctaFloat 1.8s ease-in-out infinite;
}
.gate-cta-arrow {
  width: 34px;
  height: 42px;
  color: var(--gold-light);
}
.gate-cta-box {
  background: var(--maroon-deep);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}
@keyframes ctaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .gate-cta { animation: none; }
}

/* ---------------- Main card content ----------------
   Every section below is a full viewport-height "page" of the card, so the
   card itself goes edge-to-edge rather than floating as a bordered box. */
.card {
  position: relative;
  z-index: 10;
  margin: 0;
  padding: 0;
  background: var(--cream);
  overflow: hidden;
}

.section {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  padding: 60px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(205, 164, 94, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}
.footer { border-bottom: none; }

.eyebrow {
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold-deep);
  margin: 0 0 18px;
  font-family: var(--serif);
}

.hero { padding-top: 56px; }

.hero-bismillah {
  font-family: var(--arabic);
  font-size: clamp(20px, 5vw, 26px);
  color: var(--maroon);
  margin: 0 0 22px;
}

.names-display {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 6vw, 34px);
  color: var(--maroon);
  margin: 0 0 20px;
  line-height: 1.3;
}
.names-display .name {
  display: block;
  text-wrap: balance;
}
.names-display .weds {
  display: block;
  font-family: var(--script);
  font-size: 0.75em;
  color: var(--gold-deep);
  margin: 8px 0;
}
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--maroon);
  margin: 10px auto 26px;
  max-width: 260px;
}
.divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.verse-block { max-width: 520px; margin: 0 auto; }
.verse-arabic {
  font-family: var(--arabic);
  font-size: clamp(24px, 5.5vw, 32px);
  color: var(--maroon);
  margin: 0 0 12px;
  line-height: 1.8;
}
.verse-urdu {
  font-family: 'Noto Nastaliq Urdu', var(--arabic), serif;
  font-size: clamp(19px, 4.5vw, 24px);
  color: var(--ink-soft);
  margin: 0 0 16px;
  line-height: 2;
}
.verse-en {
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.verse-ref { display: inline-block; margin-top: 4px; font-style: normal; color: var(--gold-deep); letter-spacing: 1px; font-size: 14px; }

.monogram { margin-bottom: 8px; }
.monogram-svg { width: 84px; height: 84px; }
.monogram-text {
  font-family: var(--script);
  font-size: 34px;
  fill: var(--maroon);
}

.greeting-line {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--maroon);
  margin: 0 0 12px;
}
.greeting-body {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto;
}

.invite-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}
.invite-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: 1px solid var(--gold);
  border-radius: 30px;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--maroon);
  background: linear-gradient(180deg, rgba(205,164,94,0.12), transparent);
}

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px auto;
}
.cd-sep {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--gold);
  opacity: 0.7;
  transform: translateY(-10px);
}
.countdown-box {
  background: var(--cream);
  border: 1px solid var(--gold);
  border-radius: 12px;
  min-width: 82px;
  padding: 16px 10px;
  box-shadow: 0 8px 20px rgba(61,12,20,0.08);
}
.countdown-box-seconds {
  animation: pulseGlow 1s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 20px rgba(61,12,20,0.08); }
  50% { box-shadow: 0 8px 22px rgba(205,164,94,0.55); }
}
.cd-num {
  display: flex;
  justify-content: center;
  gap: 2px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--maroon);
  perspective: 200px;
}
.digit {
  display: inline-block;
  min-width: 0.62em;
}
.digit.flip {
  animation: digitFlip 0.5s ease;
  transform-origin: 50% 50%;
}
@keyframes digitFlip {
  0% { transform: rotateX(0deg); opacity: 1; }
  45% { transform: rotateX(-90deg); opacity: 0.3; }
  55% { transform: rotateX(90deg); opacity: 0.3; }
  100% { transform: rotateX(0deg); opacity: 1; }
}
.cd-label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}
.countdown-caption {
  margin-top: 18px;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 16px;
}

/* Full-screen, one-section-at-a-time scrolling for the whole page.
   main.js drives this deterministically (one wheel/swipe/key = one section);
   this proximity snap is just a gentle fallback if JS hasn't run yet. */
html {
  scroll-snap-type: y proximity;
}

/* Events — full-screen, one celebration at a time */
.events-intro-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 6vw, 40px);
  color: var(--maroon);
  margin: 0 0 6px;
}
.events-intro-hint {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15px;
  margin: 26px 0 0;
}

.events-preview {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 420px;
}
.events-preview-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.events-preview-label {
  font-family: var(--script);
  font-size: 30px;
  color: var(--maroon);
}
.events-preview-date {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}
.events-preview-venue {
  font-size: 14px;
  letter-spacing: 0.5px;
  color: var(--gold-deep);
}
.events-preview-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.events-stack {
  display: flex;
  flex-direction: column;
}
.event-card {
  scroll-snap-align: start;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.08), transparent 60%),
    linear-gradient(165deg, var(--maroon-light) 0%, var(--maroon) 55%, var(--maroon-deep) 100%);
  border-top: 1px solid var(--gold);
  position: relative;
}
.event-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(230, 201, 138, 0.5);
  border-radius: 8px;
  pointer-events: none;
}
.event-illustration {
  width: min(62vw, 250px);
  height: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.25));
}
.event-card-flourish { color: var(--gold-light); font-size: 22px; margin-bottom: 8px; }
.event-title {
  font-family: var(--script);
  font-size: 52px;
  color: var(--cream);
  margin: 0 0 14px;
  font-weight: 400;
  text-shadow: 0 2px 14px rgba(0,0,0,0.25);
}
.party-badge {
  display: inline-block;
  margin: 0 0 20px;
  padding: 10px 24px;
  background: var(--gold);
  color: var(--maroon-deep);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
  border-radius: 30px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.event-date { font-family: var(--serif); font-size: 21px; margin: 4px 0; color: var(--cream); }
.event-time { color: var(--gold-light); letter-spacing: 1px; margin: 0 0 18px; font-size: 16px; }
.event-venue-name { font-weight: 600; margin: 0 0 4px; font-size: 18px; color: var(--gold-light); }
.event-venue-address { font-size: 16px; color: rgba(251, 243, 231, 0.75); line-height: 1.5; margin: 0 0 24px; max-width: 360px; }
.map-btn {
  display: inline-block;
  padding: 12px 30px;
  border: 1px solid var(--gold);
  border-radius: 30px;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  transition: all 0.25s ease;
}
.map-btn:hover { background: var(--gold); color: var(--maroon-deep); border-color: var(--gold); }

.event-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.calendar-btn {
  border-color: var(--cream);
  color: var(--cream);
}
.calendar-btn:hover { background: var(--cream); color: var(--maroon-deep); border-color: var(--cream); }

.no-events { color: var(--ink-soft); font-style: italic; font-size: 18px; max-width: 420px; line-height: 1.6; }

.find-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}
.find-form input[type="text"] {
  padding: 12px 18px;
  border: 1px solid var(--gold);
  border-radius: 30px;
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--ink);
  background: var(--cream);
  min-width: 240px;
  text-align: center;
}
.find-form input[type="text"]:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(124, 18, 32, 0.12);
}
.find-form button {
  padding: 12px 28px;
  border: none;
  border-radius: 30px;
  background: var(--maroon);
  color: var(--cream);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease;
}
.find-form button:hover { background: var(--maroon-deep); }

.search-matches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  max-width: 480px;
}
.search-match-btn {
  padding: 10px 22px;
  border: 1px solid var(--gold);
  border-radius: 30px;
  text-decoration: none;
  color: var(--maroon);
  font-family: var(--serif);
  font-size: 16px;
  transition: all 0.25s ease;
}
.search-match-btn:hover { background: var(--maroon); color: var(--cream); border-color: var(--maroon); }

.search-hint { font-size: 14px; color: var(--ink-soft); margin-top: 16px; font-style: italic; }

.find-form-side {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}
.side-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.side-pill input { accent-color: var(--maroon); margin: 0; }
.side-pill:has(input:checked) {
  background: var(--maroon);
  border-color: var(--maroon);
  color: var(--cream);
}

/* Families */
.families-section .divider { margin-bottom: 14px; }
.families-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.family-block { max-width: 280px; }
.family-illustration {
  width: 56px;
  height: auto;
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 8px rgba(61,12,20,0.15));
}
.family-block h4 {
  font-family: var(--serif);
  color: var(--gold-deep);
  letter-spacing: 1px;
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
}
.family-block .parents { font-family: var(--serif); font-size: 21px; color: var(--maroon); margin: 0 0 10px; }
.family-contacts { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.contact-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 20px;
  border: 1px solid var(--gold);
  border-radius: 30px;
  text-decoration: none;
  min-width: 170px;
  transition: all 0.25s ease;
}
.contact-pill:hover { background: var(--maroon); border-color: var(--maroon); }
.contact-pill:hover .contact-name,
.contact-pill:hover .contact-phone { color: var(--cream); }
.contact-name { font-family: var(--serif); font-size: 15px; color: var(--maroon); }
.contact-phone { font-size: 13px; letter-spacing: 0.5px; color: var(--ink-soft); }
.family-ampersand {
  font-family: var(--script);
  font-size: 40px;
  color: var(--gold);
}

/* Footer */
.footer {
  min-height: 100vh;
  min-height: 100svh;
  padding: 60px 10px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}
.footer-names { font-family: var(--script); font-size: 42px; color: var(--maroon); margin: 0 0 10px; }
.footer-line { color: var(--ink-soft); font-style: italic; }

/* FAQ */
.faq-list {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 480px;
  text-align: left;
}
.faq-item { border-left: 2px solid var(--gold); padding-left: 16px; }
.faq-q { font-family: var(--serif); font-size: 18px; color: var(--maroon); margin: 0 0 4px; }
.faq-a { font-size: 15px; line-height: 1.6; color: var(--ink-soft); margin: 0; }
.faq-a a { color: var(--maroon); }

/* Closing note */
.closing-message {
  font-style: italic;
  font-size: 20px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 18px auto 0;
}
.closing-signature {
  font-family: var(--script);
  font-size: 44px;
  color: var(--maroon);
  margin: 6px 0 0;
}

@media (max-width: 560px) {
  .corner { width: 105px; height: 105px; }
  .gate-corner { width: 100px; height: 100px; }
  .family-ampersand { font-size: 40px; }
  .section { padding: 44px 6px; }
  .gate { padding: 12px; }
  .gate-card { height: min(800px, 96vh); border-radius: 140px 140px 14px 14px; }
  .gate-card::before { border-radius: 132px 132px 8px 8px; }
  .side-pill { padding: 11px 18px; font-size: 15px; }
  .invite-badge { padding: 10px 22px; }
  .search-match-btn { padding: 13px 24px; }
  .find-form input[type="text"] { padding: 14px 18px; }
  .find-form button { padding: 14px 28px; }
}
