/* ===== Design Tokens ===== */
:root {
  --bg: #FAF7F2;
  --bg-alt: #F3EDE4;
  --wood: #564739;
  --wood-mid: #3D3126;
  --wood-light: #291F17;
  --copper: #B87333;
  --copper-soft: #D4956A;
  --gold: #C9A84C;
  --gold-dim: #A68B3A;
  --mulberry: #B76E79;
  --pearl: #FDFCF5;
  --shadow: rgba(86, 71, 57, 0.08);
  --shadow-md: rgba(86, 71, 57, 0.12);

  --ff-ar: 'Amiri', serif;
  --ff-sans: 'Cairo', sans-serif;
  --ff-en: 'Playfair Display', serif;
  --ff-en-body: 'Cormorant Garamond', serif;
  --ff-script: 'Monsieur La Doulaise', 'Mrs Saint Delafield', cursive;

  /* Card inner-border offsets to keep scrolling content inside the frame */
  --card-border-top: 30px;
  --card-border-bottom: 30px;
  --card-border-left: 40px;
  --card-border-right: 40px;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-weight: bold !important;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--copper) var(--bg);
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z' fill='%23B76E79' stroke='%23564739' stroke-width='1'/></svg>") 12 12, auto;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--wood);
  font-family: var(--ff-ar);
  line-height: 1.8;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z' fill='%23B76E79' stroke='%23564739' stroke-width='1'/></svg>") 12 12, auto;
}

.invitation-card {
  background: url('images/small.jpeg') no-repeat center center;
  background-size: 100% 100%;
  width: 100%;
  max-width: 520px;
  height: 95vh;
  max-height: 850px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0px 15px 40px rgba(62, 39, 35, 0.12);
  border-radius: 16px;
  animation: cardEntrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  overflow: hidden;
  /* Clips scrolling items */
  position: relative;
}

/* Inner Scrollable Container to keep scrolling items inside the borders */
.card-scroll-container {
  position: absolute;
  top: var(--card-border-top);
  bottom: var(--card-border-bottom);
  left: var(--card-border-left);
  right: var(--card-border-right);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  /* Hide scrollbar Firefox */
  -ms-overflow-style: none;
  /* Hide scrollbar IE/Edge */

  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;

  /* Mask to smoothly fade content near borders */
  -webkit-mask-image: linear-gradient(to bottom,
      transparent 0%,
      black 30px,
      black calc(100% - 30px),
      transparent 100%);
  mask-image: linear-gradient(to bottom,
      transparent 0%,
      black 30px,
      black calc(100% - 30px),
      transparent 100%);
}

.card-scroll-container::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar Chrome/Safari */
}

/* Ensure sections fit nicely inside the card layout */
.card-scroll-container .container {
  padding: 40px 16px;
  width: 100%;
}

.invitation-card .hero-section {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 768px) {
  :root {
    --card-border-top: 50px;
    --card-border-bottom: 50px;
    --card-border-left: 30px;
    --card-border-right: 30px;
  }

  body {
    overflow: hidden;
    /* Prevent body scroll to stop double scroll */
  }

  .invitation-card {
    height: 100dvh;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }
}

@media (max-width: 480px) {
  :root {
    --card-border-top: 40px;
    --card-border-bottom: 40px;
    --card-border-left: 20px;
    --card-border-right: 20px;
  }
}

a,
button,
select,
input,
.lang-toggle,
.rsvp-trigger-btn,
.map-btn {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z' fill='%23C9A84C' stroke='%23564739' stroke-width='1'/></svg>") 12 12, pointer;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--copper);
  border-radius: 3px;
}

/* ===== Utility ===== */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 90px 24px;
}

/* ===== Floating Particles ===== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: float-up linear infinite;
  will-change: transform, opacity;
}

@keyframes float-up {
  0% {
    transform: translate3d(0, 100vh, 0) scale(0);
    opacity: 0;
  }

  10% {
    opacity: 0.3;
  }

  90% {
    opacity: 0.1;
  }

  100% {
    transform: translate3d(0, -10vh, 0) scale(1);
    opacity: 0;
  }
}

.flower-petal {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  user-select: none;
  animation: fall-down linear infinite;
  font-family: inherit;
  will-change: transform, opacity;
}

@keyframes fall-down {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.35;
  }

  90% {
    opacity: 0.2;
  }

  100% {
    transform: translate3d(var(--sway, 50px), 105vh, 0) rotate(var(--rot, 360deg));
    opacity: 0;
  }
}

/* ===== Language Toggle ===== */
.lang-toggle {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1001;
  background: var(--wood);
  color: var(--bg);
  border: 1.5px solid var(--copper);
  padding: 7px 22px;
  border-radius: 24px;
  cursor: pointer;
  font-family: var(--ff-en);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  transition: all 0.35s ease;
  box-shadow: 0 4px 20px rgba(62, 39, 35, 0.25);
}

.lang-toggle:hover {
  background: var(--copper);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(184, 115, 51, 0.35);
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 44px;
  background: rgba(62, 39, 35, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184, 115, 51, 0.4);
  transition: all 0.4s ease;
}

.nav-brand {
  font-family: var(--ff-ar);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: rgba(253, 252, 245, 0.8);
  text-decoration: none;
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 4px;
}

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

.nav-links a:hover {
  color: var(--gold);
}

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

/* ===== Hero Section ===== */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(184, 115, 51, 0.06) 0%, transparent 50%),
    transparent;
}

.hero-ornament-top,
.hero-ornament-bottom {
  width: 280px;
  color: var(--copper);
  opacity: 0.5;
}

.ornament-svg {
  width: 100%;
  height: auto;
}

.hero-frame {
  position: relative;
  text-align: center;
  padding: 60px 50px;
  margin: 20px 0;
  animation: fadeIn 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Staggered hero entrance — slower, gentler cascade */
.hero-subtitle {
  animation: slideUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero-divider-small {
  animation: slideUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.hero-invite {
  animation: slideUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

.hero-names {
  animation: slideUp 1.3s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}

.hero-line {
  animation: expandLine 1.6s cubic-bezier(0.16, 1, 0.3, 1) 1.5s both;
}

.hero-date {
  animation: slideUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) 1.7s both;
}

.hero-ornament-top {
  animation: fadeIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-ornament-bottom {
  animation: fadeIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) 1.9s both;
}

/* Corner ornaments using pure CSS */
.hero-frame-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: var(--copper);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-frame-corner.tl {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
  animation: cornerReveal 1s ease-out 2s both, cornerGlow 4s ease-in-out 3s infinite;
}

.hero-frame-corner.tr {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
  animation: cornerReveal 1s ease-out 2.15s both, cornerGlow 4s ease-in-out 3.15s infinite;
}

.hero-frame-corner.bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
  animation: cornerReveal 1s ease-out 2.3s both, cornerGlow 4s ease-in-out 3.3s infinite;
}

.hero-frame-corner.br {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
  animation: cornerReveal 1s ease-out 2.45s both, cornerGlow 4s ease-in-out 3.45s infinite;
}

.hero-subtitle {
  font-family: var(--ff-ar);
  font-size: 1.2rem;
  color: var(--wood);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.hero-divider-small {
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 12px;
  margin: 12px 0 24px;
  opacity: 0.6;
}

.hero-invite {
  font-family: var(--ff-ar);
  font-size: 1.05rem;
  color: var(--wood-mid);
  margin-bottom: 30px;
  font-weight: 400;
}

.hero-names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.hero-name {
  font-family: var(--ff-ar);
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 700;
  color: var(--wood);
  text-shadow: 0 0 20px rgba(86, 71, 57, 0.15), 0 1px 3px rgba(86, 71, 57, 0.1);
  animation: nameGlow 5s ease-in-out infinite;
  line-height: 1.3;
}

.hero-amp {
  font-family: var(--ff-en);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--gold);
  font-style: italic;
  opacity: 0.7;
}

.hero-line {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--copper), transparent);
  margin: 0 auto 20px;
}

.hero-date {
  font-family: var(--ff-sans);
  font-size: 1rem;
  color: var(--wood-mid);
  letter-spacing: 2px;
  font-weight: 300;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeIn 2s ease-out 1s both;
}

.scroll-hint span {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  color: var(--wood-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, var(--copper), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
  will-change: transform, opacity;
}

/* ===== Section Dividers ===== */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px 0;
  width: 80%;
  margin: 0 auto;
  position: relative;
  background: transparent;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to var(--line-dir, right), transparent, var(--copper), transparent);
  opacity: 0.2;
  transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scaleX(0);
}

.section-divider::before {
  --line-dir: left;
  transform-origin: right;
}

.section-divider::after {
  --line-dir: right;
  transform-origin: left;
}

.section-divider.visible::before,
.section-divider.visible::after {
  transform: scaleX(1);
}

.section-divider.dark::before,
.section-divider.dark::after {
  background: linear-gradient(to var(--line-dir, right), transparent, var(--gold), transparent);
}

.divider-img {
  height: 90px;
  width: auto;
  opacity: 0.65;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.divider-img:hover {
  transform: scale3d(0.95, 0.95, 1);
  opacity: 0.95;
}

/* ===== Section Headings ===== */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 50px;
}

.heading-text {
  font-family: var(--ff-ar);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #564739;
  font-weight: 700;
}

.section-heading.light .heading-text {
  color: #564739;
}

.heading-ornament {
  color: #564739;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ===== Quran Section ===== */
.quran-section {
  background: transparent;
  position: relative;
}

/* Subtle dot pattern via CSS */
.quran-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--copper) 0.5px, transparent 0.5px);
  background-size: 32px 32px;
  opacity: 0.04;
  pointer-events: none;
}

.quran-card {
  background: var(--pearl);
  border: 1px solid rgba(184, 115, 51, 0.25);
  border-radius: 16px;
  padding: 55px 45px;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 40px var(--shadow);
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.quran-card:hover {
  transform: scale3d(0.98, 0.98, 1);
  box-shadow: 0 4px 15px rgba(86, 71, 57, 0.1), 0 0 8px rgba(201, 168, 76, 0.05);
  border-color: var(--gold);
}

.quran-bracket {
  font-size: 2.2rem;
  color: var(--gold);
  opacity: 0.7;
  line-height: 1;
  vertical-align: middle;
  display: inline-block;
  margin: 0 6px;
  font-family: var(--ff-ar) !important;
}

.quran-verse {
  font-family: var(--ff-ar);
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  line-height: 2.4;
  color: var(--wood);
  margin: 20px 0;
}

.quran-ref,
.quran-bismillah {
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  color: var(--wood);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.quran-ref {
  margin-top: 16px;
}

.quran-bismillah {
  margin-bottom: 16px;
}

/* ===== Story Section ===== */
.story-section {
  background: transparent;
}

/* Decorative story box with traveling light */
.story-box {
  position: relative;
  z-index: 1;
  padding: 76px 30px 42px;
  text-align: center;
  border-radius: 16px;
  background: var(--pearl);
  border: 1.5px solid rgba(184, 115, 51, 0.2);
  box-shadow: 0 8px 35px var(--shadow);
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-box:hover {
  transform: scale3d(0.98, 0.98, 1);
  box-shadow: 0 4px 15px var(--shadow);
  border-color: rgba(184, 115, 51, 0.4);
}

/* Traveling gold light along the border */
.story-box-border {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  z-index: 1;
  border: 1.5px solid rgba(201, 168, 76, 0.45);
  will-change: opacity;
  overflow: hidden;
}

.story-box-border::before {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.5) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(8px);
  animation: travelLight 6s ease-in-out infinite;
  will-change: top, left;
}

.story-diamond {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(253, 252, 245, 0.95) 0%, rgba(201, 168, 76, 0.92) 38%, rgba(184, 115, 51, 0.98) 100%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  transform: translateX(-50%) scale(0);
  transform-origin: center;
  opacity: 0;
  z-index: 2;
  box-shadow: 0 0 0 1px rgba(253, 252, 245, 0.35), 0 10px 22px rgba(86, 71, 57, 0.18);
  transition: transform 1.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.story-diamond::before {
  content: '';
  position: absolute;
  inset: -18% -35%;
  background: linear-gradient(110deg, transparent 36%, rgba(255, 255, 255, 0.9) 50%, transparent 64%);
  transform: translateX(-160%) rotate(45deg);
  opacity: 0;
}

.story-diamond::after {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 12px;
  background: radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.55) 0%, transparent 28%), radial-gradient(circle at 70% 78%, rgba(86, 71, 57, 0.2) 0%, transparent 40%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  opacity: 0.85;
}

.story-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.story-copy-line,
.story-date,
.story-text-ar,
.story-text-en {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.story-date {
  font-family: var(--ff-en-body);
  font-size: 0.95rem;
  letter-spacing: 2px;
  color: var(--gold-dim);
  text-transform: uppercase;
}

.story-text-ar {
  font-family: var(--ff-ar);
  font-size: 1.15rem;
  line-height: 2.35;
  color: var(--wood-mid);
  max-width: 700px;
}

.story-text-en {
  font-family: var(--ff-en-body);
  font-size: 1rem;
  line-height: 2.15;
  color: var(--wood-light);
  max-width: 680px;
}

.story-box-wrapper.visible .story-diamond {
  opacity: 0.85;
  transform: translateX(-50%) scale(1);
}

.story-box-wrapper.visible .story-diamond::before {
  animation: diamondSweep 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

.story-box-wrapper.visible .story-date {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.55s;
}

.story-box-wrapper.visible .story-text-ar {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.9s;
}

.story-box-wrapper.visible .story-text-en {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 1.25s;
}

@keyframes diamondSweep {
  0% {
    opacity: 0;
    transform: translateX(-170%) rotate(45deg);
  }

  18% {
    opacity: 0.95;
  }

  50% {
    opacity: 1;
  }

  82% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform: translateX(170%) rotate(45deg);
  }
}

@keyframes travelLight {
  0%   { top: -10px; left: -10px; }
  25%  { top: -10px; left: calc(100% - 70px); }
  50%  { top: calc(100% - 70px); left: calc(100% - 70px); }
  75%  { top: calc(100% - 70px); left: -10px; }
  100% { top: -10px; left: -10px; }
}

/* Corner ornaments for the story box */
.story-box-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--gold);
  border-style: solid;
  z-index: 1;
  opacity: 0;
  animation: storyCornerReveal 1.2s ease-out 0.5s both;
}

.story-box-corner.tl {
  top: 10px;
  left: 10px;
  border-width: 2px 0 0 2px;
}

.story-box-corner.tr {
  top: 10px;
  right: 10px;
  border-width: 2px 2px 0 0;
}

.story-box-corner.bl {
  bottom: 10px;
  left: 10px;
  border-width: 0 0 2px 2px;
}

.story-box-corner.br {
  bottom: 10px;
  right: 10px;
  border-width: 0 2px 2px 0;
}

@keyframes storyCornerReveal {
  from {
    opacity: 0;
    transform: scale(0.3);
  }

  to {
    opacity: 0.6;
    transform: scale(1);
  }
}

.story-text {
  font-family: var(--ff-ar);
  font-size: 1.15rem;
  text-align: center;
  line-height: 2.4;
  color: var(--wood-mid);
  max-width: 650px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.couple-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 35px;
  background: var(--pearl);
  border: 1px solid rgba(184, 115, 51, 0.2);
  border-radius: 14px;
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.person-card:hover {
  transform: scale3d(0.98, 0.98, 1);
  box-shadow: 0 4px 15px var(--shadow-md);
}

.person-icon {
  font-size: 1.4rem;
  color: var(--mulberry);
  animation: pulse 3s ease-in-out infinite;
  will-change: transform;
}

.person-role {
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  color: var(--copper);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.person-name {
  font-family: var(--ff-ar);
  font-size: 2rem;
  font-weight: 700;
  color: var(--wood);
}

.couple-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.connector-line {
  width: 1px;
  height: 25px;
  background: linear-gradient(to bottom, transparent, var(--copper), transparent);
}

.connector-symbol {
  font-size: 1.4rem;
  color: var(--gold);
  opacity: 0.6;
}

/* ===== Details Section ===== */
.details-section {
  background: var(--wood);
  position: relative;
  overflow: hidden;
}

.details-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(201, 168, 76, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  position: relative;
}

.detail-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(184, 115, 51, 0.25);
  border-radius: 14px;
  padding: 36px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  backdrop-filter: blur(4px);
}

.detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}

.detail-card:hover {
  transform: scale3d(0.98, 0.98, 1);
  border-color: var(--copper);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.detail-card.main-event {
  border-color: var(--copper);
  background: rgba(184, 115, 51, 0.08);
  box-shadow: 0 8px 30px rgba(184, 115, 51, 0.15);
}

.detail-card.main-event::before {
  opacity: 1;
  height: 3px;
}

.detail-emoji {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 14px;
}

.detail-title {
  font-family: var(--ff-ar);
  font-size: 1.3rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 10px;
}

.detail-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--copper), transparent);
  margin: 14px auto;
}

.detail-day {
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  color: rgba(253, 252, 245, 0.5);
  margin-bottom: 4px;
}

.detail-date {
  font-family: var(--ff-ar);
  font-size: 1.1rem;
  color: var(--pearl);
  font-weight: 700;
  margin-bottom: 6px;
}

.detail-time {
  font-family: var(--ff-sans);
  font-size: 0.95rem;
  color: var(--copper-soft);
  font-weight: 600;
}

/* ===== Countdown Section ===== */
.countdown-section {
  background:
    radial-gradient(ellipse at center, rgba(201, 168, 76, 0.04) 0%, transparent 60%),
    transparent;
}

.countdown-sub {
  text-align: center;
  font-family: var(--ff-sans);
  font-size: 0.95rem;
  color: var(--wood-light);
  margin: -30px 0 40px;
  font-weight: 300;
  letter-spacing: 1px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--pearl);
  border: 1px solid rgba(184, 115, 51, 0.2);
  border-radius: 14px;
  padding: 24px 18px;
  min-width: 95px;
  box-shadow: 0 4px 20px var(--shadow);
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.countdown-unit:hover {
  transform: scale3d(0.96, 0.96, 1);
  box-shadow: 0 2px 10px rgba(86, 71, 57, 0.08);
  border-color: var(--copper);
}

.countdown-num {
  font-family: var(--ff-ar);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #564739;
  line-height: 1;
}

.countdown-lbl {
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  color: var(--wood-light);
  margin-top: 8px;
  letter-spacing: 1px;
  font-weight: 300;
}

.countdown-dot {
  font-size: 2rem;
  color: var(--copper);
  opacity: 0.3;
  padding-bottom: 18px;
}

/* ===== Location Section ===== */
.location-section {
  background: transparent;
}

.location-card {
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
}

.loc-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.loc-name {
  font-family: var(--ff-ar);
  font-size: 1.5rem;
  color: var(--wood);
  font-weight: 700;
  margin-bottom: 6px;
}

.loc-addr {
  font-family: var(--ff-sans);
  font-size: 0.95rem;
  color: var(--wood-light);
  margin-bottom: 28px;
}

.map-wrapper {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(184, 115, 51, 0.2);
  box-shadow: 0 8px 30px var(--shadow);
  margin-bottom: 24px;
}

.map-btn {
  display: inline-block;
  background: var(--wood);
  color: var(--bg);
  text-decoration: none;
  padding: 11px 32px;
  border-radius: 28px;
  font-family: var(--ff-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid var(--copper);
  transition: all 0.35s ease;
}

.map-btn:hover {
  background: var(--copper);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(184, 115, 51, 0.3);
}

/* ===== Blessing Section ===== */
.blessing-section {
  background: transparent;
}

.blessing-card {
  background: var(--pearl);
  border: 1px solid rgba(184, 115, 51, 0.25);
  border-radius: 18px;
  padding: 60px 45px;
  text-align: center;
  box-shadow: 0 8px 40px var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blessing-card:hover {
  transform: scale3d(0.98, 0.98, 1);
  box-shadow: 0 4px 15px rgba(86, 71, 57, 0.1), 0 0 8px rgba(201, 168, 76, 0.05);
  border-color: var(--gold);
}

/* Elegant gold shine sweep effect on hovering pearl cards */
.quran-card::after,
.blessing-card::after,
.countdown-unit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.08), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left 0.8s ease;
}

.quran-card:hover::after,
.blessing-card:hover::after,
.countdown-unit:hover::after {
  left: 150%;
}

.blessing-ornament {
  font-size: 1.4rem;
  color: var(--gold);
  opacity: 0.4;
  margin: 8px 0;
}

.blessing-text {
  font-family: var(--ff-ar);
  font-size: 1.3rem;
  color: var(--wood-mid);
  margin: 16px 0 24px;
  line-height: 2;
}

.blessing-names-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 10px auto 20px;
  display: block;
}

.blessing-heart {
  color: var(--mulberry);
  margin: 0 14px;
  display: inline-block;
  animation: pulse 2.5s ease-in-out infinite;
  will-change: transform;
}

.blessing-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--copper), transparent);
  margin: 0 auto 20px;
}

.blessing-dua {
  font-family: var(--ff-ar);
  font-size: 1.05rem;
  color: var(--wood-light);
  font-style: italic;
  line-height: 2;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--wood);
  text-align: center;
  padding: 35px 20px;
}

.footer-ornament {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 10px;
  opacity: 0.35;
  margin-bottom: 12px;
}

.footer-text {
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  color: rgba(253, 252, 245, 0.5);
  letter-spacing: 1.5px;
}

/* ===== Animations — Elegant & Cohesive ===== */
@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: scale3d(0.94, 0.94, 1) translate3d(0, 50px, 0);
    filter: blur(4px);
  }

  100% {
    opacity: 1;
    transform: scale3d(1, 1, 1) translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes buttonShimmer {
  0% {
    left: -150%;
  }

  20%,
  100% {
    left: 150%;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0) scale3d(0.98, 0.98, 1);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
  }
}

@keyframes expandLine {
  from {
    width: 0;
    opacity: 0;
  }

  to {
    width: 120px;
    opacity: 1;
  }
}

@keyframes cornerReveal {
  from {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 1);
  }

  to {
    opacity: 0.6;
    transform: scale3d(1, 1, 1);
  }
}

@keyframes cornerGlow {
  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 0.9;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale3d(1, 1, 1);
  }

  50% {
    transform: scale3d(1.12, 1.12, 1);
  }
}

@keyframes textShimmer {

  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 200% center;
  }
}

@keyframes nameGlow {

  0%,
  100% {
    text-shadow: 0 0 20px rgba(86, 71, 57, 0.15), 0 1px 3px rgba(86, 71, 57, 0.1);
  }

  50% {
    text-shadow: 0 0 40px rgba(201, 168, 76, 0.25), 0 2px 6px rgba(86, 71, 57, 0.15);
  }
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scale3d(1, 1, 1);
  }

  50% {
    opacity: 1;
    transform: scale3d(1, 1.2, 1);
  }
}

@keyframes glowPulse {

  0%,
  100% {
    box-shadow: 0 4px 20px var(--shadow);
    border-color: rgba(184, 115, 51, 0.18);
  }

  50% {
    box-shadow: 0 6px 28px rgba(184, 115, 51, 0.14);
    border-color: rgba(184, 115, 51, 0.35);
  }
}

@keyframes floatY {

  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -6px, 0);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {

  0%,
  100% {
    opacity: 0.4;
    transform: scale3d(1, 1, 1);
  }

  50% {
    opacity: 0.7;
    transform: scale3d(1.05, 1.05, 1);
  }
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translate3d(0, 40px, 0) scale3d(0.93, 0.93, 1);
  transition: opacity 0.8s cubic-bezier(0.34, 1.35, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.35, 0.64, 1);
  will-change: transform, opacity;
}

.reveal.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
}

/* Elegant card reveal variants */
.quran-card.reveal {
  transform: translate3d(0, 35px, 0) scale3d(0.97, 0.97, 1);
}

.quran-card.reveal.visible {
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
}

.blessing-card.reveal {
  transform: translate3d(0, 35px, 0) scale3d(0.97, 0.97, 1);
}

.blessing-card.reveal.visible {
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
}

.story-box-wrapper.reveal {
  transform: translate3d(0, 45px, 0) scale3d(0.93, 0.93, 1);
}

.story-box-wrapper.reveal.visible {
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
}

.story-box-wrapper {
  position: relative;
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
}

.story-bg-card {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: var(--pearl);
  border: 1.5px solid rgba(184, 115, 51, 0.15);
  box-shadow: 0 4px 18px var(--shadow);
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transform: scale3d(0.9, 0.9, 1) rotate(0deg);
  transition: transform 1.2s cubic-bezier(0.34, 1.35, 0.64, 1), opacity 1.2s ease;
  will-change: transform, opacity;
  z-index: 0;
}

.story-box-wrapper.visible .story-bg-card.card-1 {
  opacity: 0.65;
  transform: scale3d(0.98, 0.98, 1) rotate(-6deg);
}

.story-box-wrapper.visible .story-bg-card.card-2 {
  opacity: 0.85;
  transform: scale3d(0.99, 0.99, 1) rotate(4deg);
}

.location-card.reveal {
  transform: translate3d(0, 35px, 0) scale3d(0.98, 0.98, 1);
}

.location-card.reveal.visible {
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
}

.section-heading.reveal .heading-text {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-heading.reveal.visible .heading-text {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.section-heading.reveal .heading-ornament {
  opacity: 0;
  transform: scale3d(0, 0, 1) rotate(-180deg);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.section-heading.reveal.visible .heading-ornament {
  opacity: 0.5;
  transform: scale3d(1, 1, 1) rotate(0deg);
}

.person-card.reveal.stagger-1 {
  transform: translate3d(0, 35px, 0) rotate(-1deg);
}

.person-card.reveal.stagger-2 {
  transform: translate3d(0, 35px, 0) rotate(1deg);
}

.person-card.reveal.visible {
  transform: translate3d(0, 0, 0) rotate(0);
}

/* Staggered reveal delays */
.reveal.visible.stagger-1 {
  transition-delay: 0.1s;
}

.reveal.visible.stagger-2 {
  transition-delay: 0.25s;
}

.reveal.visible.stagger-3 {
  transition-delay: 0.4s;
}

.reveal.visible.stagger-4 {
  transition-delay: 0.55s;
}

/* Gentle ambient glow on cards */
.person-card {
  animation: glowPulse 6s ease-in-out infinite;
}

.quran-card {
  animation: glowPulse 7s ease-in-out 1s infinite;
}

.blessing-card {
  animation: glowPulse 7s ease-in-out 0.5s infinite;
}

.countdown-unit {
  animation: glowPulse 6s ease-in-out infinite;
}

/* Story box ambient glow */
.story-box {
  animation: glowPulse 7s ease-in-out 0.8s infinite;
}

/* Ornament animations */
.divider-img {
  display: inline-block;
  animation: floatY 5s ease-in-out infinite;
  will-change: transform;
}

.heading-ornament {
  display: inline-block;
  animation: breathe 4s ease-in-out infinite;
  will-change: transform, opacity;
}

.blessing-ornament {
  display: inline-block;
  animation: floatY 4.5s ease-in-out infinite;
  will-change: transform;
}

.quran-ornament-top,
.quran-ornament-bottom {
  animation: floatY 5s ease-in-out infinite;
  will-change: transform;
}

/* ===== English Overrides ===== */
html[lang="en"] {
  direction: ltr;
  font-size: 14px;
}

html[lang="en"] .quran-bracket {
  transform: scaleX(-1);
}

html[lang="en"] body {
  font-family: var(--ff-en);
}

html[lang="en"] .nav-brand {
  font-family: var(--ff-en);
  font-size: 1.2rem;
}

html[lang="en"] .nav-links a {
  font-family: var(--ff-en-body);
  font-size: 0.9rem;
}

html[lang="en"] .nav-links a::after {
  right: auto;
  left: 0;
}

html[lang="en"] .hero-name {
  font-family: var(--ff-script);
  font-size: clamp(3.2rem, 9vw, 5.2rem);
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(86, 71, 57, 0.1);
}

html[lang="en"] .hero-subtitle,
html[lang="en"] .hero-invite {
  font-family: var(--ff-en-body);
}

html[lang="en"] .heading-text {
  font-family: var(--ff-en);
}

html[lang="en"] .quran-verse {
  font-family: var(--ff-en-body);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 2;
}

html[lang="en"] .story-text {
  font-family: var(--ff-en-body);
  font-size: 1.1rem;
}

html[lang="en"] .person-name {
  font-family: var(--ff-en);
}

html[lang="en"] .person-role {
  font-family: var(--ff-en);
  font-size: 0.7rem;
}

html[lang="en"] .detail-title {
  font-family: var(--ff-en);
}

html[lang="en"] .detail-date {
  font-family: var(--ff-en);
}

html[lang="en"] .detail-day,
html[lang="en"] .detail-time {
  font-family: var(--ff-en-body);
}

html[lang="en"] .countdown-num {
  font-family: var(--ff-en);
}

html[lang="en"] .countdown-lbl,
html[lang="en"] .countdown-sub {
  font-family: var(--ff-en-body);
}

html[lang="en"] .loc-name {
  font-family: var(--ff-en);
}

html[lang="en"] .loc-addr,
html[lang="en"] .map-btn {
  font-family: var(--ff-en-body);
}

html[lang="en"] .blessing-text,
html[lang="en"] .blessing-dua {
  font-family: var(--ff-en-body);
}

/* No text-styling needed for blessing names image in English version */

html[lang="en"] .hero-date {
  font-family: var(--ff-en-body);
}

html[lang="en"] .quran-ref,
html[lang="en"] .quran-bismillah {
  font-family: var(--ff-en-body);
}

html[lang="en"] .footer-text {
  font-family: var(--ff-en-body);
}

html[lang="en"] .bismillah {
  font-family: var(--ff-en-body);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 20px;
  }

  .nav-links {
    display: none;
  }

  .lang-toggle {
    top: 68px;
    right: 16px;
    padding: 6px 16px;
    font-size: 0.65rem;
  }

  .container {
    padding: 60px 18px;
  }

  .hero-frame {
    padding: 40px 24px;
  }

  .hero-frame-corner {
    width: 28px;
    height: 28px;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .couple-display {
    flex-direction: column;
    gap: 16px;
  }

  .couple-connector {
    flex-direction: row;
    gap: 10px;
  }

  .connector-line {
    width: 25px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--copper), transparent);
  }

  .countdown-unit {
    min-width: 70px;
    padding: 16px 12px;
  }

  .countdown-dot {
    font-size: 1.5rem;
  }

  .blessing-card {
    padding: 40px 22px;
  }

  .quran-card {
    padding: 35px 22px;
  }
}

@media (max-width: 420px) {
  .countdown-timer {
    gap: 6px;
  }

  .countdown-unit {
    min-width: 60px;
    padding: 12px 8px;
  }

  .blessing-names-img {
    max-width: 240px;
  }

  .hero-names {
    gap: 12px;
  }
}

/* ===== RSVP Trigger Buttons ===== */
.rsvp-trigger-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--wood) 0%, var(--wood-mid) 100%);
  color: #ffffff;
  border: 1.5px solid var(--copper);
  padding: 12px 42px;
  font-family: var(--ff-sans);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(62, 39, 35, 0.25);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-top: 15px;
  letter-spacing: 1.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.rsvp-trigger-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--copper) 0%, var(--gold) 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.35s ease;
}

.rsvp-trigger-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  z-index: 2;
  animation: buttonShimmer 6s infinite ease-in-out;
}

.rsvp-trigger-btn:hover {
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(184, 115, 51, 0.4);
}

.rsvp-trigger-btn:hover::before {
  opacity: 1;
}

/* ===== Modal Overlay ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 18, 16, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===== RSVP Modal Card ===== */
.modal-card {
  background: var(--pearl);
  border: 2px solid var(--copper);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 40px 30px;
  position: relative;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--wood-light);
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

/* Keep close button location symmetric across languages */

.modal-close:hover {
  color: var(--copper);
}

.modal-title {
  font-family: var(--ff-ar);
  font-size: 1.7rem;
  color: var(--wood);
  text-align: center;
  font-weight: 700;
}

html[lang="en"] .modal-title {
  font-family: var(--ff-en);
}

.modal-line {
  width: 60px;
  height: 1px;
  background: var(--copper);
  margin: 15px auto 25px;
}

/* ===== Form Controls ===== */
.form-group {
  margin-bottom: 20px;
  text-align: center;
}

html[lang="en"] .form-group {
  text-align: center;
}

.form-group label {
  display: block;
  font-family: var(--ff-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--wood-mid);
  margin-bottom: 8px;
}

html[lang="en"] .form-group label {
  font-family: var(--ff-en-body);
  font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(184, 115, 51, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--wood);
  font-family: var(--ff-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
  text-align: center;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.15);
  background: #fff;
}

/* Submit button & Loading state */
.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--wood) 0%, var(--wood-mid) 100%);
  color: #ffffff;
  border: 1px solid var(--copper);
  border-radius: 8px;
  font-family: var(--ff-sans);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: var(--copper);
  color: #ffffff;
}

.submit-btn.loading .btn-text {
  visibility: hidden;
  opacity: 0;
}

.submit-btn.loading .loading-spinner {
  display: block;
}

.loading-spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(201, 168, 76, 0.3);
  border-radius: 50%;
  border-top-color: var(--gold);
  animation: spinner-spin 0.8s linear infinite;
  position: absolute;
}

@keyframes spinner-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Successful Ticket Modal Card ===== */
.ticket-card-style {
  background: #fff;
  border: none;
  padding: 8px;
  max-width: 500px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.ticket-border {
  border: 2px dashed var(--copper);
  padding: 40px 30px;
  border-radius: 12px;
  text-align: center;
  position: relative;
  background: var(--pearl);
}

/* Ornate corners inside ticket */
.ticket-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gold-dim);
  opacity: 0.5;
}

.ticket-corner.tl {
  top: 12px;
  left: 12px;
  border-width: 2px 0 0 2px;
}

.ticket-corner.tr {
  top: 12px;
  right: 12px;
  border-width: 2px 2px 0 0;
}

.ticket-corner.bl {
  bottom: 12px;
  left: 12px;
  border-width: 0 0 2px 2px;
}

.ticket-corner.br {
  bottom: 12px;
  right: 12px;
  border-width: 0 2px 2px 0;
}

.ticket-badge {
  display: inline-block;
  background: var(--wood);
  color: var(--gold);
  border: 1px solid var(--copper);
  padding: 4px 16px;
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

html[lang="en"] .ticket-badge {
  font-family: var(--ff-en);
}

.ticket-names {
  font-family: var(--ff-ar);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--wood);
  margin-bottom: 10px;
}

html[lang="en"] .ticket-names {
  font-family: var(--ff-en);
  font-size: 1.8rem;
}

.ticket-divider {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 8px;
  margin-bottom: 20px;
}

.ticket-welcome {
  font-family: var(--ff-ar);
  font-size: 1.25rem;
  color: var(--wood-mid);
  margin-bottom: 24px;
}

html[lang="en"] .ticket-welcome {
  font-family: var(--ff-en-body);
}

.ticket-guest-info {
  background: rgba(184, 115, 51, 0.05);
  border: 1px solid rgba(184, 115, 51, 0.15);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.ticket-guest-name {
  font-family: var(--ff-ar);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--wood);
  margin-bottom: 4px;
}

html[lang="en"] .ticket-guest-name {
  font-family: var(--ff-en);
  font-size: 1.3rem;
}

.ticket-guest-count {
  font-family: var(--ff-sans);
  font-size: 0.88rem;
  color: var(--copper);
  font-weight: 600;
}

html[lang="en"] .ticket-guest-count {
  font-family: var(--ff-en-body);
  font-size: 0.95rem;
}

.ticket-divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--copper), transparent);
  margin: 20px 0;
}

.ticket-details {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-sans);
  font-size: 0.95rem;
  color: var(--wood-mid);
  margin-bottom: 24px;
}

html[lang="en"] .ticket-details {
  font-family: var(--ff-en-body);
  font-size: 1rem;
}

.ticket-dot {
  color: var(--gold);
}

.ticket-footer-msg {
  font-family: var(--ff-ar);
  font-size: 1rem;
  color: var(--gold-dim);
  font-style: italic;
}

html[lang="en"] .ticket-footer-msg {
  font-family: var(--ff-en-body);
}

@media (max-width: 480px) {
  .modal-card {
    padding: 30px 20px;
  }

  .ticket-border {
    padding: 30px 15px;
  }

  .ticket-names {
    font-size: 1.8rem;
  }
}

/* ===== Mouse Star Trail ===== */
.mouse-star {
  position: absolute;
  pointer-events: none;
  font-family: Arial, sans-serif;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(201, 168, 76, 0.9), 0 0 15px rgba(212, 149, 106, 0.6);
  z-index: 99999;
  line-height: 1;
  user-select: none;
  animation: starSparkle 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes starSparkle {
  0% {
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
    opacity: 0;
  }

  15% {
    transform: translate(-50%, -50%) scale(1.2) rotate(45deg);
    opacity: 1;
  }

  100% {
    transform: translate(var(--drift-x, 0), var(--drift-y, -80px)) scale(0) rotate(180deg);
    opacity: 0;
  }
}

/* ===== Mobile Animation Optimizations (Phone-Sustainable) ===== */
@media (max-width: 768px) {
  /* Disable heavy card shadow/border pulses (glowPulse) to prevent continuous repaints */
  .quran-card,
  .blessing-card,
  .countdown-unit,
  .story-box,
  .person-card {
    animation: none !important;
    box-shadow: 0 4px 18px var(--shadow) !important;
    border-color: rgba(184, 115, 51, 0.22) !important;
  }

  /* Disable heavy text-shadow pulsing animation (nameGlow) */
  .hero-name {
    animation: none !important;
    text-shadow: 0 0 15px rgba(86, 71, 57, 0.15), 0 1px 2px rgba(86, 71, 57, 0.1) !important;
  }

  /* Disable traveling light on the story box and replace with a performant opacity pulse */
  .story-box-border::before {
    display: none !important;
    animation: none !important;
  }

  .story-box-border {
    animation: mobileBorderPulse 6s ease-in-out infinite !important;
  }

  /* Reduce scroll bounce and delay offsets on mobile */
  .reveal {
    transition-duration: 0.8s !important;
  }
}

@keyframes mobileBorderPulse {
  0%, 100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.85;
  }
}