/* ===== Variables ===== */
:root {
  --bg-dark: #0d0a08;
  --bg-darker: #080605;
  --gold: #c9a962;
  --gold-light: #e5d4a1;
  --gold-dark: #9a7b3d;
  --gold-glow: rgba(201, 169, 98, 0.25);
  --white: #fafaf9;
  --white-muted: rgba(250, 250, 249, 0.9);
  --gray: #a8a29e;
  /* Light theme — applied to body.theme-light */
  --cream: #f6efe2;
  --cream-deep: #ecdfc6;
  --ink: #3a2e1d;
  --ink-muted: #6b5b43;
  --rose: rgba(186, 110, 96, 0.4);
  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans: 'Montserrat', 'Helvetica Neue', sans-serif;
  --font-arabic-serif: 'Amiri', 'Cormorant Garamond', serif;
  --font-arabic-sans: 'Cairo', 'Montserrat', sans-serif;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-theme: 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 2px;
  /* Fluid type scale — scales smoothly from 320px → 1200px viewport */
  --text-xs: clamp(0.64rem, 0.6rem + 0.2vw, 0.72rem);
  --text-sm: clamp(0.78rem, 0.74rem + 0.2vw, 0.88rem);
  --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --text-lg: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  --text-xl: clamp(1.4rem, 1.2rem + 0.9vw, 1.75rem);
  --text-2xl: clamp(1.7rem, 1.4rem + 1.4vw, 2.2rem);
  --text-3xl: clamp(2rem, 1.6rem + 2vw, 2.75rem);
  --text-4xl: clamp(2.5rem, 1.9rem + 2.8vw, 3.5rem);
}

/* When Arabic is active, switch the default sans/serif families */
:root:lang(ar) {
  --font-sans: 'Cairo', 'Montserrat', sans-serif;
  --font-serif: 'Amiri', 'Cormorant Garamond', serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.0625rem);
  background: var(--bg-dark);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition-theme), color var(--transition-theme);
}

/* ===== Light theme — applied on "Open Invitation" ===== */
body.theme-light {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 50%, var(--cream) 100%);
  color: var(--ink);
}

body.theme-light .page-bg .vignette-overlay {
  background: radial-gradient(ellipse at center, transparent 35%, rgba(120, 90, 50, 0.12) 100%);
}

body.theme-light .page-bg .hero-glow {
  background: radial-gradient(ellipse at center, rgba(201, 169, 98, 0.18) 0%, transparent 70%);
}

body.theme-light .page-bg .starry-bg {
  opacity: 0.25;
}

body.theme-light .page-bg .geometric-pattern {
  opacity: 0.06;
}

body.theme-light .page-bg .concentric-circles {
  filter: contrast(1.1);
}

body.theme-light .petal {
  color: var(--rose);
}

body.theme-light .main-content,
body.theme-light .main-content .section-heading,
body.theme-light .main-content .section-title {
  color: var(--ink);
}

body.theme-light .intro-text,
body.theme-light .section-desc,
body.theme-light .venue-desc {
  color: var(--ink-muted);
}

body.theme-light .detail-value,
body.theme-light .countdown-value {
  color: var(--ink);
}

body.theme-light .countdown-item {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(154, 123, 61, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 10px rgba(120, 90, 50, 0.06);
}

body.theme-light .countdown-item:hover {
  border-color: var(--gold-dark);
  box-shadow: 0 0 20px rgba(201, 169, 98, 0.35);
}

body.theme-light .event-details {
  border-top-color: rgba(154, 123, 61, 0.3);
  border-bottom-color: rgba(154, 123, 61, 0.3);
}

body.theme-light .detail-item:not(:last-child) {
  border-right-color: rgba(154, 123, 61, 0.3);
}

body.theme-light .section-subtitle {
  border-bottom-color: rgba(154, 123, 61, 0.3);
}

body.theme-light .venue-section {
  border-left-color: rgba(154, 123, 61, 0.35);
}

body.theme-light .map-link:hover {
  background: var(--gold-dark);
  color: var(--cream);
}

/* Footer stays dark as the closing bookend */
body.theme-light .footer {
  background: var(--bg-dark);
  color: var(--white);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.hero.hidden {
  display: none;
}

/* Shared page background - fixed, visible on welcome screen and after opening invitation */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Rain of flowers animation - fixed overlay, works on welcome and after opening invitation */
.flowers-rain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -30px;
  color: rgba(201, 169, 98, 0.4);
  font-size: 0.9rem;
  animation: flowerFall linear infinite;
}

.petal-1 { left: 5%; animation-duration: 12s; animation-delay: 0s; }
.petal-2 { left: 12%; animation-duration: 14s; animation-delay: 1s; }
.petal-3 { left: 20%; animation-duration: 11s; animation-delay: 2.5s; }
.petal-4 { left: 28%; animation-duration: 16s; animation-delay: 0.5s; }
.petal-5 { left: 35%; animation-duration: 13s; animation-delay: 3s; }
.petal-6 { left: 42%; animation-duration: 15s; animation-delay: 1.5s; }
.petal-7 { left: 50%; animation-duration: 10s; animation-delay: 2s; }
.petal-8 { left: 58%; animation-duration: 14s; animation-delay: 0.8s; }
.petal-9 { left: 65%; animation-duration: 12s; animation-delay: 2.8s; }
.petal-10 { left: 72%; animation-duration: 11s; animation-delay: 1.2s; }
.petal-11 { left: 78%; animation-duration: 15s; animation-delay: 3.5s; }
.petal-12 { left: 85%; animation-duration: 13s; animation-delay: 0.3s; }
.petal-13 { left: 92%; animation-duration: 14s; animation-delay: 2.2s; }
.petal-14 { left: 8%; animation-duration: 11s; animation-delay: 4s; }
.petal-15 { left: 45%; animation-duration: 16s; animation-delay: 1.8s; }
.petal-16 { left: 62%; animation-duration: 12s; animation-delay: 2.7s; }
.petal-17 { left: 15%; animation-duration: 13s; animation-delay: 3.2s; }
.petal-18 { left: 88%; animation-duration: 10s; animation-delay: 0.7s; }
.petal-19 { left: 30%; animation-duration: 15s; animation-delay: 4.5s; }
.petal-20 { left: 55%; animation-duration: 11s; animation-delay: 1.6s; }

@keyframes flowerFall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0.5;
  }
  100% {
    transform: translateY(110vh) rotate(720deg) translateX(50px);
    opacity: 0.15;
  }
}

@keyframes flowerFallLeft {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0.5;
  }
  100% {
    transform: translateY(110vh) rotate(-720deg) translateX(-50px);
    opacity: 0.15;
  }
}

.petal.petal-left {
  animation-name: flowerFallLeft;
}

.concentric-circles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: 
    radial-gradient(circle at center, transparent 0%, transparent 20%, rgba(201, 169, 98, 0.03) 25%, transparent 30%),
    radial-gradient(circle at center, transparent 0%, transparent 35%, rgba(201, 169, 98, 0.04) 40%, transparent 45%),
    radial-gradient(circle at center, transparent 0%, transparent 50%, rgba(201, 169, 98, 0.03) 55%, transparent 60%),
    radial-gradient(circle at center, transparent 0%, transparent 65%, rgba(201, 169, 98, 0.02) 70%, transparent 75%);
  pointer-events: none;
}

.starry-bg {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, var(--gold), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(201, 169, 98, 0.5), transparent),
    radial-gradient(1px 1px at 90px 40px, var(--gold), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(201, 169, 98, 0.4), transparent),
    radial-gradient(1px 1px at 160px 120px, var(--gold), transparent);
  background-size: 200px 150px;
  opacity: 0.6;
  pointer-events: none;
  animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.75; }
}

/* Islamic-inspired geometric pattern (8-point star motif) */
.geometric-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(201, 169, 98, 0.15) 35px, rgba(201, 169, 98, 0.15) 36px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(201, 169, 98, 0.1) 35px, rgba(201, 169, 98, 0.1) 36px),
    repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(201, 169, 98, 0.08) 50px, rgba(201, 169, 98, 0.08) 51px),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(201, 169, 98, 0.08) 50px, rgba(201, 169, 98, 0.08) 51px);
  background-size: 100% 100%;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(201, 169, 98, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.vignette-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

.hero-card {
  position: relative;
  z-index: 1;
  padding: 2.5rem 3rem;
  border: 1px solid rgba(201, 169, 98, 0.25);
  max-width: 620px;
}

.hero-card::before,
.hero-card::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(201, 169, 98, 0.4);
  border-style: solid;
  border-width: 0;
  opacity: 0.6;
}

.hero-card::before {
  top: 12px;
  left: 12px;
  border-top-width: 1px;
  border-left-width: 1px;
}

.hero-card::after {
  bottom: 12px;
  right: 12px;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 100%;
}

/* Hero entrance animations - longer, smoother delays */
.hero-content .hero-bismillah { animation: heroFadeUp 1.1s ease 0.1s both; }
.hero-content .invite-text { animation: heroFadeUp 1.1s ease 0.3s both; }
.hero-content .couple-names { animation: heroFadeUp 1.1s ease 0.5s both; }
.hero-content .star-separator { animation: heroFadeUp 1.1s ease 0.65s both; }
.hero-content .countdown { animation: heroFadeUp 1.1s ease 0.8s both; }
.hero-content .countdown-arrived { animation: heroFadeUp 1.1s ease 0.8s both; }
.hero-content .open-invitation-btn { animation: heroFadeUp 1.1s ease 1s both; }
.hero-content .flourish { animation: heroFadeUp 1.1s ease 0.25s both; }

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flourish {
  color: var(--gold);
  font-size: 0.9rem;
  opacity: 0.28;
  margin: 0.5rem 0;
  letter-spacing: 0.5em;
}

.flourish-top { margin-top: 0; margin-bottom: 0.5rem; }
.flourish-bottom { margin-top: 1.25rem; margin-bottom: 0; }

.hero-bismillah {
  font-family: var(--font-arabic-serif);
  font-size: clamp(0.95rem, 0.85rem + 0.6vw, 1.25rem);
  color: rgba(201, 169, 98, 0.85);
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  position: relative;
  display: inline-block;
  padding-bottom: 0.6rem;
}

.hero-bismillah::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 98, 0.5), transparent);
}

.invite-text {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.75rem;
  font-weight: 400;
}

.couple-names {
  font-family: var(--font-serif);
  font-weight: 500;
  font-feature-settings: "kern" 1, "liga" 1;
  font-size: clamp(3rem, 10vw, 5.5rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.couple-names .name-top,
.couple-names .name-bottom {
  display: block;
  color: var(--white);
}

/* Letter-by-letter reveal + synchronized gold-foil shimmer per letter */
.couple-names .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  background: linear-gradient(100deg,
    var(--white) 0%,
    var(--white) 35%,
    var(--gold-light) 50%,
    var(--white) 65%,
    var(--white) 100%);
  background-size: 250% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    letterRise 0.7s cubic-bezier(0.4, 0, 0.2, 1) both,
    goldShimmer 7s ease-in-out 1.6s infinite;
  animation-delay: calc(0.7s + var(--letter-i, 0) * 0.045s), 1.6s;
}

.couple-names .name-bottom .letter {
  animation-delay: calc(0.95s + var(--letter-i, 0) * 0.045s), 1.9s;
}

@keyframes letterRise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes goldShimmer {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}

.couple-names .ampersand {
  display: block;
  font-size: 0.5em;
  font-weight: 300;
  color: var(--gold);
  font-style: italic;
}

.star-separator {
  color: var(--gold);
  font-size: 1.1rem;
  margin: 1.25rem 0 1.75rem;
  letter-spacing: 0.2em;
  animation: starPulseFloat 4s ease-in-out infinite;
}

@keyframes starPulseFloat {
  0%, 100% { opacity: 0.85; transform: scale(1) translateY(0); }
  50% { opacity: 1; transform: scale(1.04) translateY(3px); }
}

/* Countdown */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(201, 169, 98, 0.5);
  min-width: 70px;
  transition: var(--transition);
  background: rgba(201, 169, 98, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.countdown-item:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
}

.countdown-value {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.55rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  line-height: 1.2;
  transition: transform 0.2s ease, color var(--transition-theme);
  display: inline-block;
  transform-origin: 50% 50%;
  perspective: 600px;
  backface-visibility: hidden;
}

.countdown-item:hover .countdown-value {
  transform: scale(1.05);
}

.countdown-value.flip {
  animation: countdownFlip 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes countdownFlip {
  0% { transform: rotateX(0) scale(1); }
  50% { transform: rotateX(90deg) scale(1.05); }
  100% { transform: rotateX(0) scale(1); }
}

.countdown-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.25rem;
}

.countdown-dot {
  color: var(--gold);
  font-size: 1rem;
  margin: 0 0.1rem;
}

.countdown-arrived {
  display: none;
  font-size: 1.25rem;
  color: var(--gold);
  margin: 1rem 0;
}

.countdown-arrived.visible {
  display: block;
}

.countdown.hidden + .countdown-arrived.visible {
  display: block;
}

.countdown.hidden {
  display: none !important;
}

.open-invitation-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.25rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.75rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 0 0 rgba(201, 169, 98, 0);
}

.open-invitation-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 98, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.open-invitation-btn:hover {
  background: var(--gold);
  color: var(--bg-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--gold-glow), 0 0 40px rgba(201, 169, 98, 0.15);
}

.open-invitation-btn:hover::before {
  transform: translateX(100%);
}

.open-invitation-btn .btn-arrow {
  transition: transform var(--transition);
}

.open-invitation-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gray);
  animation: scrollBounce 2.5s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scroll-indicator::after {
  content: '↓';
  font-size: 0.9rem;
  opacity: 0.6;
}

@keyframes scrollBounce {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(6px); }
}

/* ===== Main Content ===== */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.main-content.hidden {
  display: none;
}

.main-content.visible {
  display: block;
  animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered section animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.detail-animate {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--transition), transform 0.6s var(--transition);
  transition-delay: calc(0.3s + var(--delay, 0) * 1s);
}

.main-content.visible .detail-animate {
  opacity: 1;
  transform: translateY(0);
}

.detail-item:hover .detail-value {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.detail-item .detail-value {
  transition: text-decoration-color var(--transition);
}

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 3rem 0;
  color: var(--gold);
  font-size: 0.65rem;
  letter-spacing: 0.5em;
  opacity: 0.45;
}

.section-divider::before,
.section-divider::after {
  content: '';
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 98, 0.35));
}

.section-divider::after {
  background: linear-gradient(90deg, rgba(201, 169, 98, 0.35), transparent);
}

/* Intro Section */
.intro-section {
  text-align: center;
  margin-bottom: 4rem;
}

.tagline {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.intro-text {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--white-muted);
  margin-bottom: 2rem;
}

.event-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  border-top: 1px solid rgba(201, 169, 98, 0.2);
  border-bottom: 1px solid rgba(201, 169, 98, 0.2);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.5rem 2.5rem;
  flex: 1;
  min-width: 140px;
}

.detail-item:not(:last-child) {
  border-right: 1px solid rgba(201, 169, 98, 0.2);
}

.detail-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.detail-value {
  font-size: 1rem;
  color: var(--white);
}

.section-subtitle {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(201, 169, 98, 0.2);
  display: inline-block;
}

.section-title {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 2rem;
}

/* Countdown Section Inline */
.countdown-section {
  text-align: center;
  margin-bottom: 4rem;
}

.countdown-inline {
  margin-top: 1.5rem;
}

.countdown-inline .countdown-item {
  padding: 1.25rem 1.5rem;
  min-width: 88px;
}

.countdown-inline .countdown-item:hover {
  box-shadow: 0 0 24px var(--gold-glow);
}

.countdown-inline .countdown-value {
  font-size: 1.95rem;
  font-variant-numeric: tabular-nums;
}

/* Venue Section */
.venue-section {
  text-align: center;
  margin-bottom: 4rem;
  padding-left: 2rem;
  border-left: 2px solid rgba(201, 169, 98, 0.3);
}

.venue-desc {
  font-size: var(--text-base);
  color: var(--gray);
  margin-bottom: 1rem;
}

.venue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.map-link {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: var(--transition);
}

.map-link:hover {
  background: var(--gold);
  color: var(--bg-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201, 169, 98, 0.2);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3.5rem 2rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(201, 169, 98, 0.35), transparent) 1;
}

.footer-details {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.footer-credit {
  font-size: 0.7rem;
  color: var(--gray);
}

/* ===== Sound Toggle ===== */
.sound-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border: 1px solid var(--gold);
  background: rgba(13, 10, 8, 0.9);
  color: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: var(--transition);
}

.sound-toggle:hover {
  background: var(--gold);
  color: var(--bg-dark);
  transform: scale(1.05);
}

.sound-toggle.muted {
  opacity: 0.5;
}

.sound-toggle .sound-icon {
  font-size: 1.25rem;
}

/* ===== Language Toggle (mirror of sound toggle) ===== */
.lang-toggle {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  width: 48px;
  height: 48px;
  border: 1px solid var(--gold);
  background: rgba(13, 10, 8, 0.85);
  color: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: var(--transition), background var(--transition-theme), color var(--transition-theme);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0;
}

.lang-toggle:hover {
  background: var(--gold);
  color: var(--bg-dark);
  transform: scale(1.05);
}

body.theme-light .lang-toggle {
  background: rgba(255, 255, 255, 0.85);
  color: var(--gold-dark);
  border-color: var(--gold-dark);
}

body.theme-light .lang-toggle:hover {
  background: var(--gold-dark);
  color: var(--cream);
}

body.theme-light .sound-toggle {
  background: rgba(255, 255, 255, 0.85);
  color: var(--gold-dark);
  border-color: var(--gold-dark);
}

body.theme-light .sound-toggle:hover {
  background: var(--gold-dark);
  color: var(--cream);
}

/* ===== RTL adjustments ===== */
[dir="rtl"] .open-invitation-btn {
  flex-direction: row-reverse;
}

[dir="rtl"] .open-invitation-btn .btn-arrow {
  transform: scaleX(-1);
}

[dir="rtl"] .open-invitation-btn:hover .btn-arrow {
  transform: scaleX(-1) translateX(4px);
}

[dir="rtl"] .lang-toggle {
  left: auto;
  right: 1.5rem;
}

[dir="rtl"] .sound-toggle {
  right: auto;
  left: 1.5rem;
}

[dir="rtl"] .detail-item:not(:last-child) {
  border-right: none;
  border-left: 1px solid rgba(201, 169, 98, 0.2);
}

[dir="rtl"] .venue-section {
  padding-left: 0;
  padding-right: 2rem;
  border-left: none;
  border-right: 2px solid rgba(201, 169, 98, 0.3);
}

body.theme-light[dir="rtl"] .venue-section {
  border-right-color: rgba(154, 123, 61, 0.35);
}

body.theme-light[dir="rtl"] .detail-item:not(:last-child) {
  border-left-color: rgba(154, 123, 61, 0.3);
}

/* Arabic typography tuning — slightly larger to balance Latin x-height */
:lang(ar) .invite-text,
:lang(ar) .tagline,
:lang(ar) .section-subtitle,
:lang(ar) .detail-label,
:lang(ar) .countdown-label,
:lang(ar) .footer-details {
  letter-spacing: 0;
}

:lang(ar) .couple-names {
  font-family: var(--font-arabic-serif);
  letter-spacing: 0;
  line-height: 1.25;
}

:lang(ar) .section-heading,
:lang(ar) .section-title {
  font-family: var(--font-arabic-serif);
  letter-spacing: 0;
}

:lang(ar) .open-invitation-btn {
  font-family: var(--font-arabic-sans);
  letter-spacing: 0.05em;
}

/* ===== Focus-visible ===== */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

body.theme-light :focus-visible {
  outline-color: var(--gold-dark);
}

/* ===== Section divider — gentle reveal ===== */
.animate-on-scroll + .section-divider,
.section-divider {
  opacity: 0.45;
  transition: transform 0.8s var(--transition-slow), opacity 0.8s var(--transition-slow);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .countdown {
    gap: 0.25rem;
  }

  .countdown-item {
    min-width: 60px;
    padding: 0.5rem 0.75rem;
  }

  .event-details {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .event-details .detail-item {
    border-right: none;
    border-bottom: 1px solid rgba(201, 169, 98, 0.2);
    padding: 1.25rem 1.5rem;
    min-width: 100%;
  }

  [dir="rtl"] .event-details .detail-item {
    border-left: none;
  }

  .event-details .detail-item:last-child {
    border-bottom: none;
  }

  .venue-section {
    padding-left: 1rem;
    border-left-width: 1px;
  }

  .venue-actions {
    flex-direction: column;
    align-items: stretch;
  }

  [dir="rtl"] .venue-section {
    padding-left: 0;
    padding-right: 1rem;
    border-right-width: 1px;
  }

  .main-content {
    padding: 3rem 1.25rem;
  }

  .sound-toggle,
  .lang-toggle {
    width: 44px;
    height: 44px;
  }

  .lang-toggle {
    top: 1rem;
    left: 1rem;
    font-size: 0.95rem;
  }

  [dir="rtl"] .lang-toggle {
    left: auto;
    right: 1rem;
  }

  .sound-toggle {
    right: 1rem;
    bottom: 1rem;
  }

  [dir="rtl"] .sound-toggle {
    right: auto;
    left: 1rem;
  }

  .hero-card {
    padding: 1.75rem 1.5rem;
  }

  .hero-card::before,
  .hero-card::after {
    width: 16px;
    height: 16px;
  }

  .countdown-inline .countdown-item {
    min-width: 64px;
    padding: 0.85rem 0.75rem;
  }

  .countdown-inline .countdown-value {
    font-size: clamp(1.25rem, 5.5vw, 1.65rem);
  }
}

/* Very narrow screens — collapse countdown to 2×2 grid, hide separator dots */
@media (max-width: 400px) {
  .countdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .countdown-dot {
    display: none;
  }

  .countdown-item {
    width: 100%;
    min-width: 0;
  }
}

/* ===== Reduced motion — respect accessibility preferences ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .petal {
    display: none;
  }

  .couple-names .letter {
    opacity: 1;
    transform: none;
    background: none;
    -webkit-text-fill-color: var(--white);
    animation: none;
  }

  .countdown-value.flip {
    animation: none;
  }

  .starry-bg,
  .star-separator,
  .scroll-indicator {
    animation: none;
  }
}
