/* ============================================================
   دعوة زفاف — ستايل ذهبي فاخر (Elegant Gold)
   ============================================================ */

:root {
  --bg:        #0e1320;   /* خلفية كحلي عميق */
  --bg-2:      #131a2c;   /* خلفية أفتح قليلاً للأقسام */
  --gold:      #d4af6a;   /* ذهبي أساسي */
  --gold-soft: #e7c98c;   /* ذهبي فاتح */
  --gold-deep: #9c7c3c;   /* ذهبي غامق */
  --cream:     #f3ead6;   /* نص فاتح كريمي */
  --muted:     #b9b09a;   /* نص ثانوي */
  --line:      rgba(212, 175, 106, 0.28);

  --font-display: "Aref Ruqaa", "Amiri", serif;
  --font-body:    "Tajawal", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--cream);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% -10%, rgba(212,175,106,0.10), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(212,175,106,0.06), transparent 40%);
  line-height: 1.8;
  overflow-x: hidden;
}

/* ====================== شاشة الغلاف ====================== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 35%, #1a2238, var(--bg) 70%);
  transition: opacity 1s ease, visibility 1s ease, transform 1.1s ease;
}
.cover.is-open {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.08);
  pointer-events: none;
}

/* خلفية اختيارية بحواف متلاشية (تظهر فقط عند ضبط صورة) */
.bg-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 74% at 50% 42%, #000 48%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 74% at 50% 42%, #000 48%, transparent 100%);
}
.bg-photo.is-shown { opacity: 0.5; }

/* محتوى الغلاف فوق طبقة الخلفية */
.cover__inner {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(32px, 8vw, 64px) clamp(28px, 9vw, 70px);
  background: rgba(255,255,255,0.015);
  box-shadow: 0 0 0 6px rgba(212,175,106,0.05), 0 30px 80px rgba(0,0,0,0.5);
  animation: floatIn 1s ease both;
}

.cover__ornament { color: var(--gold); font-size: 30px; opacity: 0.9; }

.cover__label {
  color: var(--muted);
  letter-spacing: normal;
  font-size: 13px;
  margin-top: 10px;
}

.cover__monogram {
  font-family: var(--font-display);
  font-size: clamp(32px, 9vw, 56px); padding: 0 14px;
  color: var(--gold);
  line-height: 1.1;
  margin: 6px 0 4px;
  text-shadow: 0 4px 30px rgba(212,175,106,0.35);
}

.cover__hint { color: var(--muted); font-size: 15px; margin-bottom: 26px; }

.cover__btn {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border: none;
  border-radius: 999px;
  padding: 14px 38px;
  cursor: pointer;
  letter-spacing: normal;
  box-shadow: 0 10px 30px rgba(212,175,106,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.cover__btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 14px 36px rgba(212,175,106,0.5); }
.cover__btn:active { transform: translateY(0); }

/* ====================== محتوى الدعوة ====================== */
.invite {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 70px;
}

.section {
  text-align: center;
  padding: clamp(48px, 9vw, 86px) clamp(16px, 5vw, 44px);
}
.section + .section { border-top: 1px solid var(--line); }

.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 6vw, 38px);
  color: var(--gold);
  margin-bottom: 18px;
}

/* زخارف وفواصل */
.ornament { color: var(--gold); font-size: 26px; opacity: 0.85; }
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--gold);
  margin: 26px auto;
  max-width: 320px;
}
.divider span {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ====================== الترويسة ====================== */
.hero { position: relative; padding-top: clamp(60px, 14vw, 120px); }
/* محتوى الترويسة فوق طبقة الخلفية المتلاشية */
.hero > *:not(.bg-photo) { position: relative; z-index: 1; }
.hero__eyebrow { font-family: var(--font-display); color: var(--gold-soft); font-size: clamp(18px, 4.5vw, 24px); margin: 14px 0 22px; }
.hero__kicker { color: var(--muted); letter-spacing: normal; font-size: 14px; margin-bottom: 6px; }

.couple {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  font-size: clamp(40px, 12vw, 78px);
  color: var(--cream);
  margin: 6px 0 18px;
  text-shadow: 0 2px 24px rgba(212,175,106,0.18);
}
.couple__name { display: block; }
.couple__amp { display: block; color: var(--gold); font-size: 0.7em; margin: 2px 0; }
.hero__sub { color: var(--muted); font-size: clamp(15px, 4vw, 18px); }

/* تلميح التمرير للأسفل أسفل الترويسة */
.scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  letter-spacing: normal;
  color: var(--gold-soft);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.scroll-cue__arrow {
  font-size: 1.2rem;
  line-height: 1;
  color: var(--gold);
  animation: scrollCueBob 1.8s ease-in-out infinite;
}

@keyframes scrollCueBob {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50%      { transform: translateY(7px); opacity: 1; }
}

/* صورة العروسين في الترويسة */
#heroPhoto {
  display: none;
  width: clamp(120px, 34vw, 180px);
  height: clamp(120px, 34vw, 180px);
  margin: 22px auto 6px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(160deg, var(--gold-soft), var(--gold-deep));
  box-shadow:
    0 0 0 1px var(--line),
    0 18px 44px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(212, 175, 106, 0.22);
}
#heroPhoto.is-shown {
  display: block;
  animation: heroPhotoIn 0.9s ease both;
}
#heroPhoto img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
}

@keyframes heroPhotoIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* ====================== العدّاد التنازلي ====================== */
.when__date { font-family: var(--font-display); font-size: clamp(22px, 6vw, 34px); color: var(--cream); }
.when__time { color: var(--muted); margin-top: 4px; font-size: 16px; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2.5vw, 16px);
  max-width: 440px;
  margin: 30px auto 0;
}
.cd__cell {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 6px;
  background: rgba(255,255,255,0.02);
}
.cd__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 44px);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.cd__lbl { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.when__arrived { font-family: var(--font-display); color: var(--gold); font-size: clamp(24px, 6vw, 34px); margin-top: 24px; }

/* ====================== القاعة ====================== */
.venue__name { font-family: var(--font-display); font-size: clamp(24px, 6vw, 34px); color: var(--cream); }
.venue__addr { color: var(--muted); margin-top: 6px; font-size: 16px; }
.venue__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-weight: 700;
  font-size: 16px;
  color: var(--gold-soft);
  text-decoration: none;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 13px 30px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.venue__btn:hover { background: var(--gold); color: #1a1206; transform: translateY(-2px); }

/* ====================== الأقسام الإضافية ====================== */
.hero__date { color: var(--gold-soft); font-family: var(--font-display); font-size: clamp(15px, 4vw, 19px); margin-top: 12px; }
.section__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 6vw, 36px); color: var(--gold); margin-bottom: 16px; }

/* دعاء افتتاحي */
.verse__text { font-family: var(--font-script, "Amiri", serif); font-size: clamp(18px, 5vw, 26px); color: var(--gold-soft); line-height: 2; max-width: 30ch; margin: 0 auto; }

/* نص الدعوة */
.invitation__text { font-size: clamp(15px, 4vw, 17px); color: var(--cream); line-height: 2.1; max-width: 42ch; margin: 0 auto; }

/* عائلتا العروسين */
.families { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 4vw, 26px); flex-wrap: wrap; }
.family { flex: 1; min-width: 130px; }
.family__label { display: block; color: var(--muted); font-size: 13px; letter-spacing: normal; margin-bottom: 6px; }
.family__names { font-family: var(--font-display); color: var(--cream); font-size: clamp(16px, 4.4vw, 20px); }
.families__heart { color: var(--gold); font-size: 20px; }

/* برنامج الحفل */
.timeline { list-style: none; max-width: 360px; margin: 6px auto 0; text-align: start; }
.timeline__item { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; padding: 12px 18px 12px 0; border-inline-start: 1px solid var(--line); margin-inline-start: 6px; }
.timeline__dot { position: absolute; inset-inline-start: -6px; top: 17px; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--bg); }
.timeline__time { font-family: var(--font-display); color: var(--gold-soft); font-size: 15px; min-width: 86px; }
.timeline__title { color: var(--cream); font-size: 15px; }

/* ملاحظات */
.notes__list { list-style: none; max-width: 400px; margin: 4px auto 0; text-align: start; }
.notes__item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; color: var(--cream); font-size: 15px; line-height: 1.7; }
.notes__mark { color: var(--gold); font-size: 13px; margin-top: 4px; flex-shrink: 0; }

/* ====================== الخاتمة ====================== */
.closing__note { font-family: var(--font-display); font-size: clamp(20px, 5vw, 28px); color: var(--cream); margin-bottom: 10px; }
.closing__hashtag { color: var(--gold-soft); font-weight: 700; font-size: 15px; letter-spacing: normal; margin-bottom: 18px; }
.contact { margin: 0 auto 20px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; max-width: 280px; background: rgba(255,255,255,0.03); }
.contact__label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.contact__link { color: var(--gold-soft); font-weight: 700; font-size: 17px; text-decoration: none; }
.contact__link:hover { text-decoration: underline; }
.closing__families { color: var(--muted); font-size: 16px; margin-bottom: 22px; }

/* ====================== حركة الظهور عند التمرير ====================== */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ====================== البريق المتساقط ====================== */
.sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.sparkle {
  position: absolute;
  top: -20px;
  color: var(--gold);
  opacity: 0;
  animation: fall linear forwards;
}

@keyframes fall {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
  10%  { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(105vh) rotate(320deg); }
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  *, .reveal { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  #heroPhoto.is-shown { opacity: 1; transform: none; }
  .bg-photo { transition: none !important; }
}

/* أسطر Enter في حقل «الدعاء/العبارة» تُعرض كما كتبها الزبون (بسملة فوق والآية تحتها) */
.verse__text { white-space: pre-line; }
