/* =========================================================
   HINA WEDDING INVITATION — CORE STYLESHEET
   Luxury Gold Theme | Pure CSS3 | RTL Arabic
   henna.plane-iq.com
   ========================================================= */

/* ─── 1. DESIGN TOKENS ─────────────────────────────────── */
:root {
  /* Gold palette (dominant) */
  --gold-50:   #fffbf0;
  --gold-100:  #fdf3d0;
  --gold-200:  #fae6a0;
  --gold-300:  #f0cc6a;
  --gold-400:  #d4af37;   /* primary gold */
  --gold-500:  #b8912d;
  --gold-600:  #916f1e;   /* deep anchor gold */
  --gold-700:  #6b500f;

  /* Ivory backgrounds (matches the physical card) */
  --ivory:     #fdf6ee;
  --ivory-2:   #faf3e8;
  --ivory-3:   #f5ead8;
  --ivory-dark:#e8dcc8;

  /* Red — accent only, never dominant */
  --red-accent:  #9b2424;
  --red-subtle:  rgba(155, 36, 36, 0.12);

  /* Neutrals */
  --stone-50:  #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;

  /* Dark anchor (warm near-black) */
  --dark:      #1a0800;
  --dark-2:    #2d1400;
  --dark-3:    #3d1c08;

  /* White */
  --white:     #ffffff;

  /* Typography */
  --font-arabic:   'Amiri', 'Times New Roman', serif;
  --font-ui:       'Cairo', 'Segoe UI', sans-serif;
  --font-numbers:  'Playfair Display', Georgia, serif;

  /* Spacing */
  --section-pad: 4rem 1.5rem;
  --card-radius: 1.5rem;
  --btn-radius:  3rem;

  /* Shadows */
  --shadow-gold: 0 4px 24px rgba(212, 175, 55, 0.25);
  --shadow-card: 0 2px 16px rgba(26, 8, 0, 0.08);
  --shadow-lg:   0 8px 40px rgba(26, 8, 0, 0.12);

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── 2. RESET & BASE ───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  background-color: var(--dark);
  color: var(--stone-800);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden; /* locked until gate opens */
  -webkit-tap-highlight-color: transparent;
}

body.unlocked {
  overflow: auto;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select, textarea {
  font-family: var(--font-ui);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--gold-400);
  border-radius: 10px;
}

/* Text selection */
::selection {
  background: var(--gold-200);
  color: var(--dark);
}

/* ─── 3. APP WRAPPER ────────────────────────────────────── */
#app {
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  background-color: var(--ivory);
  min-height: 100svh;
  position: relative;
  box-shadow: 0 0 80px rgba(0,0,0,0.5);
  overflow-x: hidden;
  padding-bottom: 7rem;
}

/* ─── 4. GATE OVERLAY ───────────────────────────────────── */
#gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  transition: opacity 1.2s var(--ease), visibility 1.2s;
  overflow: hidden;
}

#gate.closing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Gate video layer */
#gate-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#gate-video.playing {
  opacity: 1;
}

/* Gate corners decoration */
.gate-corner {
  position: absolute;
  width: 4rem;
  height: 4rem;
  border-color: var(--gold-400);
  border-style: solid;
  opacity: 0.6;
}
.gate-corner--tl { top: 1.5rem; right: 1.5rem; border-width: 2px 2px 0 0; }
.gate-corner--tr { top: 1.5rem; left: 1.5rem;  border-width: 2px 0 0 2px; }
.gate-corner--bl { bottom: 1.5rem; right: 1.5rem; border-width: 0 2px 2px 0; }
.gate-corner--br { bottom: 1.5rem; left: 1.5rem;  border-width: 0 0 2px 2px; }

/* Gate content */
.gate-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 2rem;
  max-width: 360px;
  width: 100%;
}

.gate-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(26, 8, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--gold-400);
  font-size: 1.75rem;
}

.gate-subtitle {
  font-family: var(--font-arabic);
  color: var(--gold-400);
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.gate-rule {
  width: 5rem;
  height: 1px;
  background: linear-gradient(to left, transparent, var(--gold-400), transparent);
  margin: 0.75rem auto;
}

.gate-title {
  font-family: var(--font-arabic);
  font-size: 3.25rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.gate-title span {
  color: var(--gold-400);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0 0.5rem;
}

.gate-desc {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 2rem;
}

.gate-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(
    90deg,
    var(--gold-600) 0%,
    var(--gold-400) 40%,
    var(--gold-300) 60%,
    var(--gold-500) 80%,
    var(--gold-600) 100%
  );
  background-size: 250% 100%;
  animation: shimmerBtn 3.5s linear infinite;
  color: var(--dark);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 2.5rem;
  border: none;
  border-radius: var(--btn-radius);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.03em;
  overflow: hidden;
}

.gate-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  opacity: 0;
  transition: opacity 0.3s;
}

.gate-btn:hover::before  { opacity: 1; }
.gate-btn:active         { transform: scale(0.96); box-shadow: none; }

.gate-btn-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.gate-footer-note {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

/* Gate: hero card image (replaces old mail icon circle) */
.gate-hero-card {
  margin-bottom: 1.5rem;
  border-radius: 1.25rem;
  overflow: hidden;
  width: min(260px, 72vw);
  border: 2px solid rgba(212, 175, 55, 0.45);
  outline: 5px solid rgba(212, 175, 55, 0.1);
  animation: goldAura 2.8s ease-in-out infinite;
}

.gate-card-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* ─── 5. MUSIC WIDGET — vertical, compact ───────────────── */
#music-widget {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 0.45rem 0.4rem;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-card);
  transform: translateX(-5rem);
  opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

#music-widget.visible {
  transform: translateX(0);
  opacity: 1;
}

.music-label {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--stone-600);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.06em;
  line-height: 1;
}

.music-toggle-btn {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-600), var(--gold-400));
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  box-shadow: 0 2px 8px rgba(212,175,55,0.4);
  transition: transform 0.15s;
}

.music-toggle-btn:active { transform: scale(0.88); }

/* Visualizer bars */
.visualizer {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 1rem;
}

.visualizer.active { display: flex; }

.v-bar {
  width: 2px;
  background: var(--gold-400);
  border-radius: 1px;
  animation: vBounce 1s ease-in-out infinite alternate;
}

.v-bar:nth-child(1) { height: 6px;  animation-delay: 0s; }
.v-bar:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.v-bar:nth-child(3) { height: 8px;  animation-delay: 0.4s; }
.v-bar:nth-child(4) { height: 14px; animation-delay: 0.1s; }

@keyframes vBounce {
  0%   { transform: scaleY(0.3); }
  100% { transform: scaleY(1.1); }
}

/* ─── 6. CANVAS PETALS ──────────────────────────────────── */
#petals-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
}

/* ─── 7. SECTION DIVIDERS ───────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  margin: 0 auto;
}

.section-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, transparent, var(--gold-400), transparent);
}

.section-divider__diamond {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--gold-400);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ─── 8. HERO / COVER SECTION ───────────────────────────── */
#home {
  position: relative;
  width: 100%;
  min-height: 100svh;
  background-color: var(--ivory);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Background video loop */
.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.14;
  /* no blend mode — prevents colour artifacts on ivory bg */
}

/* Warm ivory overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(253,246,238,0.55) 0%,
    rgba(253,246,238,0.20) 40%,
    rgba(253,246,238,0.80) 70%,
    var(--ivory) 100%
  );
}

/* Hero top area: ornamental floral corners */
.hero-floral {
  position: absolute;
  width: 160px;
  height: 160px;
  pointer-events: none;
  opacity: 0.75;
}

.hero-floral--tl {
  top: -20px;
  right: -20px;
  transform: rotate(0deg);
}

.hero-floral--tr {
  top: -20px;
  left: -20px;
  transform: scaleX(-1);
}

.hero-floral--bl {
  bottom: 180px;
  right: -20px;
  transform: scaleY(-1);
  opacity: 0.45;
}

.hero-floral--br {
  bottom: 180px;
  left: -20px;
  transform: rotate(180deg);
  opacity: 0.45;
}

/* Hero top content zone */
.hero-top {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.75rem 2rem;
  width: 100%;
}

.hero-basmala {
  width: 9rem;
  margin: 0 auto 1.5rem;
  opacity: 0.85;
  /* Recolour the SVG to gold */
  filter: invert(62%) sepia(88%) saturate(420%) hue-rotate(5deg) brightness(88%) contrast(95%);
}

.hero-henna-title {
  font-family: var(--font-arabic);
  font-size: 3.75rem;
  font-weight: 700;
  color: var(--gold-600);
  line-height: 1;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 12px rgba(212,175,55,0.2);
}

.hero-tagline {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--stone-500);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.hero-rule {
  width: 6rem;
  height: 1.5px;
  background: linear-gradient(to left, transparent, var(--gold-400), transparent);
  margin: 0.5rem auto 1.25rem;
}

.hero-names {
  font-family: var(--font-arabic);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

.hero-names span {
  color: var(--gold-400);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0.4rem;
}

.hero-from {
  margin: 1.1rem auto 0;
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 1rem;
  background: rgba(253,246,238,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  line-height: 1.7;
}

.hero-from-label {
  font-size: 0.62rem;
  color: var(--stone-600);
  letter-spacing: 0.12em;
  font-family: var(--font-body);
  margin: 0;
}

.hero-from-names {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--gold-600);
  margin: 0.1rem 0;
  font-weight: 700;
}

.hero-from-names .amp {
  color: var(--gold-400);
  font-style: italic;
  margin: 0 0.25rem;
}

.hero-from-mothers {
  font-size: 0.65rem;
  color: var(--stone-600);
  letter-spacing: 0.06em;
  font-family: var(--font-body);
  margin: 0;
}

.hero-from-footer {
  font-size: 0.6rem;
  color: var(--gold-600);
  letter-spacing: 0.1em;
  font-family: var(--font-body);
  margin: 0.15rem 0 0;
  opacity: 0.85;
}

/* ─── 9. COUPLE ILLUSTRATION (pedestal masking) ─────────── */
.hero-couple-zone {
  position: relative;
  width: 100%;
  height: 450px;
  flex-shrink: 0;
  margin-top: auto;
  overflow: hidden;
  z-index: 5;
}

.hero-couple-img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  max-width: 310px;
  height: auto;
  opacity: 0;
  z-index: 3;         /* above band (z-index 1), below pedestal gradient (z-index 5) */
  animation: coupleRise 1.2s var(--ease) 0.1s forwards;
}

/* Ivory gradient pedestal — covers the leg cut-off and sits ABOVE the image */
.hero-couple-pedestal {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(
    to top,
    var(--ivory) 0%,
    var(--ivory) 40%,
    rgba(253,246,238,0.97) 58%,
    rgba(253,246,238,0.80) 73%,
    rgba(253,246,238,0.35) 87%,
    transparent 100%
  );
  z-index: 5;         /* above couple image (3) — masks the legs */
  pointer-events: none;
}

/* Animated gold band — BEHIND the couple image */
.hero-pedestal-band {
  position: absolute;
  bottom: 193px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--gold-300) 15%,
    var(--gold-400) 35%,
    var(--gold-200) 50%,
    var(--gold-400) 65%,
    var(--gold-300) 85%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmerBand 4s linear infinite;
  z-index: 1;         /* behind couple image (3) — shows only outside the PNG */
  pointer-events: none;
}

/* Date chip — absolute in zone, sits in the solid ivory area */
.hero-date-chip {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  background: var(--white);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--card-radius);
  padding: 0.85rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-gold);
  white-space: nowrap;
  min-width: 240px;
}

.date-chip-badge {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold-400);
  color: var(--dark);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.2rem 0.75rem;
  border-radius: 3rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.date-chip-value {
  font-family: var(--font-numbers);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.2rem;
}

.date-chip-sub {
  font-size: 0.72rem;
  color: var(--stone-500);
  font-weight: 600;
}

/* Scroll cue — removed from layout, kept for future use */
.hero-scroll-cue { display: none; }

/* ─── 10. QURANIC VERSE SECTION ─────────────────────────── */
#verse {
  padding: var(--section-pad);
  background: var(--ivory);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.verse-bg-dots {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(var(--gold-300) 0.6px, transparent 0.6px),
    radial-gradient(var(--gold-300) 0.6px, var(--ivory) 0.6px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  opacity: 0.055;
}

.verse-basmala {
  width: 11rem;
  margin: 0 auto 2rem;
  filter: invert(62%) sepia(88%) saturate(420%) hue-rotate(5deg) brightness(88%) contrast(95%);
  opacity: 0.8;
}

.verse-frame {
  position: relative;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding: 2rem 1rem;
  max-width: 360px;
  margin: 0 auto;
}

.verse-frame-ornament {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ivory);
  padding: 0 0.75rem;
  color: var(--gold-400);
  font-size: 0.8rem;
}

.verse-frame-ornament--top { top: -0.6rem; }
.verse-frame-ornament--bottom { bottom: -0.6rem; }

.verse-text {
  font-family: var(--font-arabic);
  font-size: 1.1rem;
  line-height: 2;
  color: var(--dark);
}

.verse-surah {
  display: block;
  margin-top: 1.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold-500);
  letter-spacing: 0.2em;
}

/* ─── 11. COUPLE CARDS SECTION ──────────────────────────── */
#couple {
  padding: var(--section-pad);
  background: var(--white);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--font-arabic);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--dark);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  height: 2px;
  width: 55%;
  margin: 0.35rem auto 0;
  background: linear-gradient(to right, transparent, var(--gold-400), transparent);
  background-size: 200% 100%;
  animation: shimmerBand 3s linear infinite;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--stone-400);
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
}

.couple-card {
  background: var(--stone-50);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.couple-card__glow {
  position: absolute;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.06);
  filter: blur(2rem);
  pointer-events: none;
}

.couple-card__glow--tl { top: -2rem; right: -2rem; }
.couple-card__glow--br { bottom: -2rem; left: -2rem; background: var(--red-subtle); }

.couple-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
  color: var(--gold-500);
}

.couple-name {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.couple-lineage {
  font-size: 0.7rem;
  color: var(--stone-400);
  margin-bottom: 0.75rem;
}

.couple-rule {
  width: 3rem;
  height: 1px;
  background: var(--gold-400);
  margin: 0.5rem auto 0.75rem;
}

.couple-bio {
  font-size: 0.82rem;
  color: var(--stone-600);
  line-height: 1.75;
  max-width: 280px;
  margin: 0 auto;
}

/* Heart connector between cards */
.heart-connector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.heart-line {
  flex: 1;
  max-width: 4rem;
  height: 1.5px;
  background: linear-gradient(to left, transparent, rgba(212,175,55,0.5));
}

.heart-line--rev {
  background: linear-gradient(to right, transparent, rgba(212,175,55,0.5));
}

.heart-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.35);
  background: rgba(253,246,238,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-accent);
  font-size: 0.85rem;
  animation: heartbeat 2s ease-in-out infinite;
}

/* ─── 12. EVENT DETAILS & COUNTDOWN ─────────────────────── */
#event {
  padding: var(--section-pad);
  background: var(--ivory);
  position: relative;
}

/* Countdown box */
.countdown-box {
  background: var(--white);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.countdown-box::before {
  content: '';
  position: absolute;
  top: -3rem;
  right: -3rem;
  width: 7rem;
  height: 7rem;
  background: var(--gold-100);
  border-radius: 50%;
  opacity: 0.5;
}

.countdown-label {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--stone-500);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  direction: ltr;
}

.countdown-unit {
  background: var(--stone-50);
  border: 1px solid var(--stone-100);
  border-radius: 1rem;
  padding: 0.75rem 0.25rem;
  text-align: center;
}

.countdown-number {
  display: block;
  font-family: var(--font-numbers);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-600);
  line-height: 1;
}

.countdown-unit-label {
  display: block;
  font-size: 0.6rem;
  color: var(--stone-400);
  margin-top: 0.3rem;
  font-family: var(--font-ui);
}

/* Details schedule card */
.details-card {
  background: var(--white);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--stone-100);
  margin-bottom: 1.5rem;
}

.detail-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
  margin-bottom: 0;
}

.detail-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold-600);
  font-size: 1.1rem;
}

.detail-text h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--stone-800);
  margin-bottom: 0.25rem;
}

.detail-text p {
  font-size: 0.82rem;
  color: var(--stone-600);
  line-height: 1.6;
}

.detail-text .detail-note {
  font-size: 0.7rem;
  color: var(--stone-400);
  margin-top: 0.2rem;
}

/* Children notice */
.notice-box {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-right: 3px solid var(--gold-400);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.notice-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-600);
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.notice-box h5 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--stone-800);
  margin-bottom: 0.3rem;
}

.notice-box p {
  font-size: 0.72rem;
  color: var(--stone-500);
  line-height: 1.65;
}

/* ─── 13. RSVP SECTION ──────────────────────────────────── */
#rsvp {
  padding: var(--section-pad);
  background: var(--white);
  position: relative;
}

.rsvp-form {
  background: var(--stone-50);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--stone-700);
  letter-spacing: 0.03em;
}

.form-control {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--stone-800);
  font-family: var(--font-ui);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.form-control::placeholder { color: var(--stone-400); }

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.btn-submit {
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--gold-600) 0%,
    var(--gold-400) 40%,
    var(--gold-300) 60%,
    var(--gold-500) 80%,
    var(--gold-600) 100%
  );
  background-size: 250% 100%;
  animation: shimmerBtn 4s linear infinite;
  color: var(--dark);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.9rem;
  border: none;
  border-radius: var(--btn-radius);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-submit:hover  { box-shadow: 0 6px 28px rgba(212,175,55,0.45); }
.btn-submit:active { transform: scale(0.975); }

/* RSVP toast */
.rsvp-toast {
  display: none;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  color: var(--gold-700);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.5s ease;
}

.rsvp-toast.visible { display: block; }

/* Guestbook */
.guestbook {
  margin-top: 2.5rem;
}

.guestbook-title {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  text-align: center;
  margin-bottom: 1rem;
}

.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.25rem 0.25rem;
}

.guest-bubble {
  background: var(--ivory);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.guest-bubble--new {
  border-right: 3px solid var(--gold-400);
  animation: slideUp 0.5s var(--ease) both;
}

.guest-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.guest-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--stone-800);
}

.guest-status-tag {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--gold-700);
  background: rgba(212, 175, 55, 0.1);
  border-radius: 3rem;
  padding: 0.2rem 0.6rem;
}

.guest-message {
  font-size: 0.78rem;
  color: var(--stone-600);
  line-height: 1.65;
}

/* ─── 14. LOCATION SECTION ──────────────────────────────── */
#location {
  padding: var(--section-pad);
  background: var(--ivory);
  border-top: 1px solid var(--stone-100);
}

.map-card {
  background: var(--white);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.map-frame {
  width: 100%;
  height: 18rem;
  border: none;
  display: block;
}

.map-info {
  padding: 1.25rem;
  text-align: center;
}

.map-venue-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--stone-800);
  margin-bottom: 0.4rem;
}

.map-venue-note {
  font-size: 0.75rem;
  color: var(--stone-400);
  margin-bottom: 1.25rem;
}

.btn-map {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400), var(--gold-600));
  color: var(--dark);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 1rem;
  border-radius: 1rem;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-map:hover  { opacity: 0.9; }
.btn-map:active { transform: scale(0.975); }

.btn-instagram {
  background: transparent;
  color: var(--stone-400);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 2rem;
  border: 1px solid var(--stone-200);
  box-shadow: none;
  margin-top: 0.5rem;
  direction: ltr;
  width: auto;
  align-self: center;
}
.btn-instagram:hover { color: var(--stone-600); border-color: var(--stone-400); opacity: 1; }

/* ─── 15. FOOTER ────────────────────────────────────────── */
footer {
  padding: 4rem 1.5rem 2.5rem;
  background: var(--dark);
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.footer-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.04;
  font-size: 18rem;
  color: var(--gold-400);
}

.footer-tagline {
  font-family: var(--font-arabic);
  font-size: 1.35rem;
  color: var(--gold-300);
  margin-bottom: 0.75rem;
  position: relative;
}

.footer-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  max-width: 280px;
  margin: 0 auto 1.5rem;
}

.footer-rule {
  width: 3rem;
  height: 1px;
  background: var(--gold-400);
  margin: 0.75rem auto 1.25rem;
}

.footer-names {
  font-family: var(--font-arabic);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  position: relative;
}

.footer-names span {
  color: var(--gold-400);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0.4rem;
}

.footer-credit {
  margin-top: 2.5rem;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.15em;
  position: relative;
}

/* ─── 16. BOTTOM NAVIGATION ─────────────────────────────── */
#smart-nav {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(6rem);
  width: 90%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 1.25rem;
  box-shadow: 0 8px 32px rgba(26, 8, 0, 0.14);
  z-index: 100;
  padding: 0.5rem 0.75rem;
  opacity: 0;
  transition: transform 0.7s var(--ease), opacity 0.7s ease;
}

#smart-nav.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.nav-list {
  display: flex;
  justify-content: space-around;
  align-items: center;
  list-style: none;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  border-radius: 0.75rem;
}

.nav-icon-wrap {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: var(--stone-100);
  color: var(--stone-500);
  transition: all 0.25s var(--ease);
  font-size: 0.9rem;
}

.nav-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--stone-500);
  margin-top: 0.25rem;
  transition: color 0.25s;
}

/* Active nav item — gold */
.nav-item.active .nav-icon-wrap {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-600);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212,175,55,0.2);
}

.nav-item.active .nav-label {
  color: var(--gold-700);
}

/* ─── 17. ORNAMENTAL GOLD LINES / DIVIDERS ──────────────── */
.gold-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}

.gold-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, transparent, var(--gold-300), transparent);
}

.gold-divider__gem {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--gold-400);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ─── 18. SCROLL ANIMATIONS (Intersection Observer targets) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── 19. ANIMATIONS KEYFRAMES ──────────────────────────── */
@keyframes coupleRise {
  0%   { opacity: 0; transform: translateX(-50%) translateY(28px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes shimmerBand {
  0%   { background-position: 100% center; }
  100% { background-position: -100% center; }
}

@keyframes goldAura {
  0%, 100% { box-shadow: 0 8px 40px rgba(212,175,55,0.22), 0 0 0 2px rgba(212,175,55,0.28); }
  50%       { box-shadow: 0 14px 60px rgba(212,175,55,0.50), 0 0 0 3px rgba(212,175,55,0.55); }
}

@keyframes shimmerBtn {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

@keyframes fadeIn {
  0%   { opacity: 0; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 0.9; transform: translateX(-50%) translateY(4px); }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.12); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.1); }
  70%       { transform: scale(1); }
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

@keyframes petalsFloat {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ─── 20. UTILITY CLASSES ───────────────────────────────── */
.text-center { text-align: center; }
.hidden      { display: none !important; }
.sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Stack spacing helpers */
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* ─── 21. BOTTOM NAV — more compact ─────────────────────── */
#smart-nav {
  padding: 0.3rem 0.5rem;
}

.nav-item {
  padding: 0.3rem 0.5rem;
}

.nav-icon-wrap {
  width: 2rem;
  height: 2rem;
  font-size: 0.8rem;
}

.nav-label {
  font-size: 0.55rem;
  margin-top: 0.15rem;
}

/* ─── 22. GATE SKIP BUTTON — gold, visible ───────────────── */
.gate-skip-btn {
  background: var(--gold-400) !important;
  color: var(--dark) !important;
  border-color: var(--gold-300) !important;
  font-weight: 700 !important;
}

.gate-skip-btn:hover {
  background: var(--gold-300) !important;
}

/* ─── 23. RESPONSIVE: MOBILE & SMALL SCREENS ────────────── */
@media (min-width: 431px) {
  body { background: var(--dark-2); }
}

/* Small phones (≤ 390px wide) */
@media (max-width: 390px) {
  .hero-henna-title { font-size: 3rem; }
  .hero-names       { font-size: 2rem; }
  .gate-title       { font-size: 2.5rem; }
  .gate-hero-card   { width: min(200px, 56vw); }
  .hero-couple-zone { height: 380px; }
  .hero-top         { padding-top: 2rem; }
  .hero-basmala     { width: 7rem; margin-bottom: 1rem; }
  .hero-couple-img  { top: 0; }
}

/* Short viewports (landscape mobile, small screens) */
@media (max-height: 680px) {
  .gate-hero-card   { width: min(160px, 40vw); max-height: 38vh; object-fit: cover; }
  .gate-content     { padding: 1rem 1.5rem; gap: 0.5rem; }
  .gate-title       { font-size: 2.25rem; margin-bottom: 0.5rem; }
  .gate-desc        { display: none; }
  .gate-btn         { padding: 0.7rem 1.75rem; font-size: 0.9rem; }
  #home             { min-height: 100svh; }
  .hero-top         { padding-top: 1.5rem; }
  .hero-basmala     { width: 6.5rem; margin-bottom: 0.75rem; }
  .hero-henna-title { font-size: 2.75rem; }
  .hero-tagline     { display: none; }
  .hero-couple-zone { height: 360px; }
}

/* ─── 24. GATE CONTENT: safer flex layout for all heights ── */
.gate-content {
  justify-content: center;
  padding: clamp(1rem, 5vh, 2.5rem) clamp(1rem, 4vw, 2rem);
  gap: clamp(0.5rem, 2vh, 1rem);
  max-height: 100svh;
  overflow: hidden;
}

.gate-hero-card {
  width: min(250px, 62vw);
  /* cap height so card never pushes button off-screen */
  max-height: min(42vh, 340px);
  overflow: hidden;
}
