/* ============================================================
   قالب pearl-night «ليلة اللؤلؤ» — قمري لؤلؤي فاخر
   الدخول + الهيرو: بوابة كريستالية تُفتح ← وهج قمري ← مشهد البحيرة
   الأقسام أسفل الهيرو: زجاج كحلي، فضي لؤلؤي، وإضاءة قمرية ناعمة

   ملاحظة توافق:
   - جميع أسماء الـ selectors الأصلية محفوظة.
   - مسارات الصور والفيديوهات الأصلية محفوظة داخل مجلد assets.
   - لا يحتاج هذا الملف إلى تغيير template.html أو script.js كي يعمل.
   ============================================================ */

:root {
  /* الهوية الأساسية */
  --bg: #05101f;
  --warm: #07182b;
  --white: #f8fbff;
  --muted: rgba(207, 222, 238, 0.72);

  /* الخطوط الأصلية */
  --font-display: "Aref Ruqaa", "Noto Naskh Arabic", serif;
  --font-ar: "Noto Naskh Arabic", "Aref Ruqaa", serif;
  --font-en: "Cormorant Garamond", "Times New Roman", serif;
  --font-ui: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* ألوان ليلة اللؤلؤ — أبقينا أسماء المتغيّرات الأصلية للتوافق */
  --cream: #07182b;
  --ivory: #0b2037;
  --sand: #102a46;
  --camel: #a9c8e4;
  --gold: #dcecff;
  --gold-2: #9fc5e6;
  --taupe: #9fb2c7;
  --ink: #f6faff;
  --ink-soft: #c4d2e1;
  --line: rgba(202, 224, 244, 0.23);

  /* متغيّرات مساعدة خاصة بالثيم */
  --night-950: #020914;
  --night-900: #05101f;
  --night-850: #07182b;
  --night-800: #0a2038;
  --night-700: #10304f;
  --moon: #f4f8ff;
  --pearl: #fffaf2;
  --silver: #c8dced;
  --silver-bright: #e9f4ff;
  --glass: rgba(12, 35, 59, 0.72);
  --glass-soft: rgba(255, 255, 255, 0.065);
  --glass-strong: rgba(4, 17, 31, 0.86);
  --moon-glow: rgba(202, 225, 247, 0.38);
  --candle: #ffe4af;
  --shadow-deep: 0 28px 80px rgba(0, 5, 14, 0.48);
  --shadow-soft: 0 16px 44px rgba(0, 8, 20, 0.30);
  --radius-lg: 24px;
  --radius-md: 17px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--night-950);
}

body {
  position: relative;
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(149, 193, 230, 0.18), transparent 34rem),
    radial-gradient(circle at 8% 38%, rgba(89, 135, 178, 0.10), transparent 28rem),
    linear-gradient(180deg, #07182b 0%, #061323 42%, #030b16 100%);
  color: var(--ink);
  font-family: var(--font-ar);
  font-size: 1.05rem;
  line-height: 1.75;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 76% 22%, rgba(213, 232, 250, 0.46) 0 1px, transparent 1.4px),
    radial-gradient(circle at 42% 68%, rgba(255, 255, 255, 0.30) 0 1px, transparent 1.4px);
  background-size: 145px 145px, 210px 210px, 175px 175px;
}

body.locked {
  height: 100vh;
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img,
video,
svg { display: block; }
img { max-width: 100%; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--silver-bright);
  outline-offset: 4px;
}

::selection {
  background: rgba(182, 214, 241, 0.92);
  color: var(--night-950);
}

/* ============ شاشة الدخول: فيديو البوابة + شريط التحميل ============ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: #020914 url("assets/preloader-poster.jpg") center / cover no-repeat;
  transition: opacity 950ms cubic-bezier(0.7, 0, 0.3, 1);
}

#preloader::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 20%, rgba(231, 244, 255, 0.10), transparent 30%),
    linear-gradient(180deg, rgba(1, 8, 18, 0.10) 0%, rgba(1, 8, 18, 0.06) 42%, rgba(0, 5, 14, 0.74) 100%);
}

#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

#preloader.hidden { display: none; }

#preloaderPoster {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  padding:
    0
    max(1.1rem, env(safe-area-inset-right))
    max(3.35rem, calc(2.5rem + env(safe-area-inset-bottom)))
    max(1.1rem, env(safe-area-inset-left));
  border: 0;
  background: transparent;
  color: var(--white);
  transition: opacity 700ms ease;
}

#preloaderPoster.hidden {
  opacity: 0;
  pointer-events: none;
}

#preloaderPoster:disabled { cursor: progress; }
#preloaderPoster.loading .preloader-cta { animation: none; }
#preloaderPoster.loading .preloader-cta::after { opacity: 0.14; animation: none; }
#preloaderPoster.loading .preloader-cta__hint { opacity: 0.60; }

#preloaderPoster.is-ready .preloader-cta {
  border-color: rgba(224, 239, 253, 0.72);
  box-shadow:
    0 28px 68px rgba(0, 4, 14, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 34px rgba(175, 213, 242, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#preloaderPoster.is-ready .preloader-progress__bar {
  box-shadow: 0 0 22px rgba(216, 237, 255, 0.78);
}

.preloader-cta {
  position: relative;
  isolation: isolate;
  display: flex;
  width: min(21.5rem, calc(100vw - 2.2rem));
  min-height: 8.7rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  overflow: hidden;
  padding: 1.18rem 1.4rem 1.22rem;
  border: 1px solid rgba(191, 219, 242, 0.48);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(20, 51, 78, 0.58), rgba(4, 17, 32, 0.74));
  box-shadow:
    0 26px 60px rgba(0, 4, 14, 0.44),
    0 0 0 1px rgba(255, 255, 255, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  color: var(--white);
  text-align: center;
  text-shadow: 0 3px 20px rgba(0, 4, 14, 0.58);
  animation: ctaFloat 3.1s ease-in-out infinite;
}

.preloader-cta::before {
  content: "";
  position: absolute;
  inset: 0.48rem;
  z-index: -1;
  border: 1px solid rgba(225, 240, 253, 0.15);
  border-radius: 0.98rem;
  box-shadow: inset 0 0 26px rgba(182, 216, 244, 0.035);
}

.preloader-cta::after {
  content: "";
  position: absolute;
  top: -38%;
  bottom: -38%;
  left: -82%;
  z-index: -1;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(234, 246, 255, 0.30), transparent);
  transform: rotate(17deg);
  animation: ctaShine 4.1s ease-in-out infinite;
}

.preloader-text {
  margin: 0;
  color: var(--pearl);
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 7vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-shadow:
    0 3px 22px rgba(0, 6, 18, 0.65),
    0 0 20px rgba(205, 232, 253, 0.20);
}

.preloader-cta__label,
.preloader-cta__hint {
  font-family: var(--font-ui);
  font-weight: 500;
  line-height: 1.4;
}

.preloader-cta__label {
  color: rgba(224, 239, 253, 0.86);
  font-size: 0.9rem;
}

.preloader-cta__hint {
  color: rgba(235, 244, 252, 0.68);
  font-size: 0.86rem;
}

.preloader-progress {
  position: relative;
  display: block;
  width: min(13.7rem, 100%);
  height: 0.38rem;
  margin-top: 0.44rem;
  overflow: hidden;
  border: 1px solid rgba(219, 237, 252, 0.17);
  border-radius: 999px;
  background: rgba(222, 239, 253, 0.10);
  box-shadow: inset 0 1px 4px rgba(0, 5, 15, 0.44);
}

.preloader-progress__bar {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7faed2, #cfe8fb 52%, #fffaf2);
  transition: width 260ms ease;
}

/* وميض متحرّك أثناء التحميل */
.preloader-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  transform: translateX(-120%);
  animation: progShimmer 1.25s ease-in-out infinite;
}

#preloaderPoster.is-ready .preloader-progress::after {
  opacity: 0;
  animation: none;
}

.preloader-progress__meta {
  margin-top: 0.08rem;
  color: rgba(217, 233, 247, 0.76);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

@keyframes progShimmer {
  0% { transform: translateX(-120%); }
  55%, 100% { transform: translateX(240%); }
}

@keyframes ctaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.32rem); }
}

@keyframes ctaShine {
  0%, 44% { left: -82%; }
  76%, 100% { left: 140%; }
}

#preloaderVideo {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020914 url("assets/preloader-poster.jpg") center / cover no-repeat;
  opacity: 0;
  transition: opacity 300ms ease;
}

#preloaderVideo.is-ready { opacity: 1; }

#preloaderWhite {
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    radial-gradient(circle at 50% 46%, #ffffff 0%, #f2f8ff 46%, #dcecff 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 650ms ease-out;
}

#preloader.whiteout #preloaderWhite { opacity: 1; }

/* ============ الموقع + الهيرو القمري ============ */
#site {
  opacity: 0;
  transition: opacity 1250ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

#site.visible { opacity: 1; }

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: #020914 url("assets/poster.jpg") center / cover no-repeat;
}

.hero__video,
.hero__overlay,
.hero__vignette,
.hero__fade {
  position: absolute;
  inset: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020914 url("assets/poster.jpg") center / cover no-repeat;
  opacity: 0;
  filter: saturate(0.96) contrast(1.03) brightness(0.92);
  transform: scale(1.01);
  transition: opacity 380ms ease;
}

.hero__video.is-ready { opacity: 1; }

.hero__overlay {
  background:
    linear-gradient(180deg, rgba(1, 7, 16, 0.34) 0%, rgba(1, 8, 18, 0.10) 30%, rgba(1, 8, 18, 0.18) 55%, rgba(1, 7, 16, 0.72) 100%),
    radial-gradient(ellipse at center, rgba(4, 16, 31, 0.02) 0%, rgba(2, 9, 20, 0.22) 70%, rgba(0, 5, 14, 0.52) 100%);
}

.hero__vignette {
  background:
    radial-gradient(ellipse at 50% 45%, transparent 24%, rgba(1, 8, 19, 0.16) 58%, rgba(0, 5, 14, 0.60) 100%);
}

.hero__fade {
  top: auto;
  height: 13rem;
  background: linear-gradient(0deg, var(--warm) 0%, rgba(7, 24, 43, 0.88) 20%, transparent 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:
    max(3rem, env(safe-area-inset-top))
    1.25rem
    max(6rem, calc(4.8rem + env(safe-area-inset-bottom)));
  color: var(--white);
  text-align: center;
  isolation: isolate;
}

.hero__content::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: min(31rem, calc(100vw - 2rem));
  height: min(34rem, 67svh);
  border: 1px solid rgba(220, 237, 251, 0.08);
  border-radius: 48% 48% 42% 42% / 26% 26% 52% 52%;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(5, 17, 33, 0.34), rgba(2, 11, 23, 0.10) 68%, transparent 100%);
  box-shadow: inset 0 0 60px rgba(192, 222, 246, 0.025);
  transform: translate(-50%, -48%);
  pointer-events: none;
}

.hero__eyebrow,
.eyebrow {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__eyebrow {
  color: rgba(232, 243, 253, 0.88);
  text-shadow: 0 2px 16px rgba(0, 5, 14, 0.72);
}

.ornament {
  display: flex;
  align-items: center;
  gap: 0.78rem;
  width: min(17rem, 72vw);
  margin: 0.72rem auto;
  color: rgba(218, 237, 252, 0.66);
}

.ornament span {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}

.ornament b {
  color: var(--pearl);
  font-size: 0.82rem;
  font-weight: 400;
  filter: drop-shadow(0 0 8px rgba(220, 239, 255, 0.42));
}

.mask-reveal {
  overflow: visible;
  padding: 0.3rem 0.55rem;
}

.hero__name {
  margin: 0;
  color: var(--pearl);
  font-family: var(--font-display);
  font-size: clamp(3.7rem, 17vw, 5.35rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0.01em;
  text-shadow:
    0 10px 38px rgba(0, 5, 15, 0.68),
    0 0 24px rgba(199, 226, 248, 0.19);
}

.hero__amp {
  margin: -0.18rem 0;
  color: rgba(220, 237, 252, 0.90);
  font-family: var(--font-en);
  font-size: 3.05rem;
  line-height: 1;
  text-shadow: 0 0 22px rgba(191, 222, 247, 0.22);
}

.hero__invite {
  max-width: 28rem;
  margin: 0.95rem auto 0;
  color: rgba(235, 244, 252, 0.86);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 2;
  text-shadow: 0 3px 18px rgba(0, 5, 14, 0.76);
}

.hero__forever {
  margin: 0.26rem 0 0;
  color: var(--silver-bright);
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  text-shadow: 0 0 22px rgba(199, 227, 249, 0.24);
}

.hero__date {
  margin: 0.34rem 0 0;
  color: rgba(244, 249, 255, 0.95);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  text-shadow: 0 2px 14px rgba(0, 4, 13, 0.74);
}

.hero__caption {
  margin: 0.28rem 0 0;
  color: rgba(235, 244, 252, 0.91);
  font-family: var(--font-display);
  font-size: 1.68rem;
  text-shadow: 0 2px 16px rgba(0, 5, 14, 0.74);
}

.hero__scroll {
  position: absolute;
  bottom: max(1.8rem, calc(1.2rem + env(safe-area-inset-bottom)));
  left: 50%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  color: rgba(231, 243, 253, 0.93);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(0, 4, 13, 0.76);
  transform: translateX(-50%);
}

.hero__scroll svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  filter: drop-shadow(0 0 7px rgba(191, 224, 250, 0.42));
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(0.45rem); }
}

/* أنميشن ظهور نصّ الهيرو — الأسماء محفوظة كما هي */
.reveal,
.reveal-mask {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal-mask { transform: translateY(1.7rem); }
.reveal.is-in,
.reveal-mask.is-in {
  opacity: 1;
  transform: translateY(0);
}

.hero__scroll.reveal {
  transform: translateX(-50%) translateY(1rem);
}

.hero__scroll.reveal.is-in {
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 700px) {
  .preloader-text { font-size: 2.65rem; }
  .hero__name { font-size: 6.15rem; }
  .hero__amp { font-size: 3.5rem; }
  .hero__forever { font-size: 2.8rem; }
}

/* ============ طبقة البتلات/الرموز العائمة ============ */
.petals {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: screen;
}

.petal,
.msg {
  position: absolute;
  top: -6%;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 7px rgba(205, 232, 253, 0.32));
}

.petal {
  animation: petalFall linear infinite;
  opacity: 0.62;
}

.msg {
  animation: msgRise linear infinite;
  opacity: 0;
}

@keyframes petalFall {
  0% { transform: translateY(-10vh) rotate(0); opacity: 0; }
  10% { opacity: 0.72; }
  100% { transform: translateY(112vh) rotate(320deg); opacity: 0; }
}

@keyframes msgRise {
  0% { transform: translateX(0) scale(0.6); opacity: 0; top: 104%; }
  12% { opacity: 0.78; }
  100% { transform: translateX(var(--mx)) scale(1.05); opacity: 0; top: -8%; }
}

/* ============ البطاقة والأقسام: زجاج ليلي لؤلؤي ============ */
.card {
  position: relative;
  z-index: 1;
  max-width: 33rem;
  margin: -2px auto 0;
  padding: 42px 18px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(169, 205, 234, 0.13), transparent 27rem),
    linear-gradient(180deg, rgba(9, 31, 52, 0.98), rgba(4, 16, 30, 0.99));
  border-right: 1px solid rgba(219, 238, 253, 0.07);
  border-left: 1px solid rgba(219, 238, 253, 0.07);
  box-shadow: var(--shadow-deep);
  color: var(--ink);
  font-family: "El Messiri", "Tajawal", serif;
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.card::before {
  top: 0;
  right: -6rem;
  left: -6rem;
  height: 13rem;
  opacity: 0.48;
  background: radial-gradient(ellipse at center top, rgba(179, 215, 243, 0.22), transparent 68%);
}

.card::after {
  inset: 0;
  z-index: -1;
  opacity: 0.42;
  background-image:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.44) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 29%, rgba(214, 235, 251, 0.32) 0 1px, transparent 1.5px);
  background-size: 135px 135px, 190px 190px;
}

.card__frame {
  position: absolute;
  inset: 14px;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 20px;
  pointer-events: none;
  box-shadow:
    inset 0 0 34px rgba(179, 216, 244, 0.025),
    0 0 0 1px rgba(255, 255, 255, 0.018);
}

.card__frame .corner {
  position: absolute;
  padding: 3px 5px;
  background: #081a2d;
  color: var(--silver);
  font-size: 1rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(202, 229, 249, 0.34);
}

.corner--tr { top: -9px; right: -9px; }
.corner--tl { top: -9px; left: -9px; }
.corner--br { bottom: -9px; right: -9px; }
.corner--bl { bottom: -9px; left: -9px; }

.section {
  position: relative;
  margin: 0 0 14px;
  padding: 26px 14px;
  overflow: hidden;
  border: 1px solid rgba(201, 225, 244, 0.13);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    rgba(7, 26, 45, 0.58);
  box-shadow:
    0 14px 34px rgba(0, 6, 16, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  text-align: center;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 14%;
  left: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 241, 253, 0.42), transparent);
}

.section__title {
  position: relative;
  display: inline-block;
  margin: 0 0 17px;
  color: var(--gold);
  font-family: "Aref Ruqaa", serif;
  font-size: 1.58rem;
  line-height: 1.35;
  text-shadow: 0 0 18px rgba(183, 218, 245, 0.19);
}

.section__title::after {
  content: "";
  display: block;
  width: 62px;
  height: 1px;
  margin: 9px auto 0;
  background: linear-gradient(90deg, transparent, var(--silver), transparent);
  box-shadow: 0 0 10px rgba(193, 224, 247, 0.23);
}

.flourish {
  display: block;
  margin: 4px 0 12px;
  color: var(--silver);
  font-size: 1.55rem;
  text-shadow: 0 0 14px rgba(203, 229, 249, 0.25);
}

.verse__text {
  max-width: 26rem;
  margin: 0 auto;
  color: var(--pearl);
  font-family: "Amiri", serif;
  font-size: 1.3rem;
  line-height: 2.15;
  white-space: pre-line;
  text-shadow: 0 2px 18px rgba(0, 5, 14, 0.40);
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 5px 0;
  color: var(--silver);
  font-size: 0.7rem;
}

.divider span {
  width: 62px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}

.divider span:last-child {
  background: linear-gradient(90deg, var(--line), transparent);
}

.invitation__text {
  max-width: 27rem;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 2;
}

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

.family {
  min-width: 128px;
  flex: 1;
  padding: 14px 10px;
  border: 1px solid rgba(202, 226, 245, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.family__label {
  display: block;
  margin-bottom: 5px;
  color: var(--taupe);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.family__names {
  color: var(--ink);
  font-family: "El Messiri", serif;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.8;
}

.families__heart {
  align-self: center;
  color: var(--silver-bright);
  font-size: 0.88rem;
  filter: drop-shadow(0 0 8px rgba(202, 229, 249, 0.32));
}

/* العدّاد القمري */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: center;
  gap: 9px;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.cd__cell {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 14px 5px 12px;
  border: 1px solid rgba(203, 228, 248, 0.20);
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 236, 252, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(21, 53, 82, 0.72), rgba(7, 25, 44, 0.90));
  box-shadow:
    0 12px 28px rgba(0, 6, 16, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.cd__cell::before {
  content: "";
  position: absolute;
  top: 0;
  right: 20%;
  left: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(235, 246, 255, 0.68), transparent);
}

.cd__num {
  display: block;
  color: var(--pearl);
  font-family: "Aref Ruqaa", serif;
  font-size: clamp(1.45rem, 6vw, 1.8rem);
  line-height: 1;
  text-shadow:
    0 0 16px rgba(201, 228, 249, 0.30),
    0 3px 12px rgba(0, 5, 14, 0.52);
}

.cd__lbl {
  display: block;
  margin-top: 7px;
  color: var(--taupe);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
}

.when__arrived {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.28rem;
  text-shadow: 0 0 16px rgba(200, 227, 248, 0.22);
}

/* البرنامج */
.timeline {
  max-width: 24rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: right;
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 14px auto 1fr;
  align-items: center;
  gap: 11px;
  padding: 13px 10px;
  border-bottom: 1px solid rgba(203, 226, 245, 0.11);
  border-radius: 12px;
  transition: background 220ms ease, transform 220ms ease;
}

.timeline__item:last-child { border-bottom: 0; }

.timeline__item:hover {
  background: rgba(255, 255, 255, 0.035);
  transform: translateX(-2px);
}

.timeline__dot {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(239, 248, 255, 0.74);
  border-radius: 50%;
  background: var(--silver);
  box-shadow:
    0 0 0 4px rgba(169, 202, 229, 0.11),
    0 0 12px rgba(200, 228, 249, 0.42);
}

.timeline__time {
  color: var(--gold);
  font-family: "Cormorant Garamond", var(--font-ui), serif;
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
}

.timeline__title { color: var(--ink-soft); }

/* القاعة والمكان */
.venue__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 176px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid rgba(201, 226, 245, 0.20);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(202, 228, 248, 0.13), transparent 55%),
    var(--sand) center / cover no-repeat;
  box-shadow:
    0 14px 34px rgba(0, 5, 14, 0.28),
    inset 0 0 34px rgba(202, 228, 248, 0.035);
}

.venue.has-photo .venue__pin { display: none; }

.venue__pin {
  color: var(--silver);
  font-size: 2.05rem;
  opacity: 0.78;
  filter: drop-shadow(0 0 10px rgba(200, 228, 249, 0.26));
}

.when__date {
  color: var(--ink);
  font-family: "El Messiri", serif;
  font-weight: 600;
}

.when__time {
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.venue__name {
  color: var(--gold);
  font-family: "Aref Ruqaa", serif;
  font-size: 1.28rem;
  text-shadow: 0 0 15px rgba(192, 223, 247, 0.19);
}

.venue__addr {
  margin-bottom: 15px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.venue__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 24px;
  overflow: hidden;
  border: 1px solid rgba(239, 248, 255, 0.64);
  border-radius: 999px;
  background: linear-gradient(135deg, #f8fbff 0%, #cfe4f6 52%, #9fc5e6 100%);
  box-shadow:
    0 12px 28px rgba(4, 12, 24, 0.34),
    0 0 22px rgba(173, 211, 239, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  color: #07182b;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.venue__btn::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -50%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88), transparent);
  transform: rotate(16deg);
  transition: left 520ms ease;
}

.venue__btn:hover,
.venue__btn:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow:
    0 16px 34px rgba(2, 10, 22, 0.40),
    0 0 28px rgba(184, 219, 244, 0.23),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.venue__btn:hover::after { left: 125%; }
.venue__btn:active { transform: translateY(0); }

/* الملاحظات */
.notes__list {
  max-width: 25rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: right;
}

.notes__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(202, 226, 245, 0.09);
  color: var(--ink-soft);
}

.notes__item:last-child { border-bottom: 0; }

.notes__mark {
  margin-top: 6px;
  color: var(--silver-bright);
  font-size: 0.8rem;
  text-shadow: 0 0 9px rgba(205, 232, 253, 0.33);
}

/* الخاتمة والتواصل */
.closing {
  padding-top: 17px;
  padding-bottom: 32px;
}

.closing__note {
  margin-bottom: 7px;
  color: var(--pearl);
  font-family: "Amiri", serif;
  font-size: 1.22rem;
  text-shadow: 0 2px 16px rgba(0, 5, 14, 0.40);
}

.closing__hashtag {
  margin-bottom: 17px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-shadow: 0 0 15px rgba(195, 224, 247, 0.22);
}

.contact { margin: 15px auto; }

.contact__label {
  display: block;
  margin-bottom: 7px;
  color: var(--taupe);
  font-size: 0.8rem;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 22px;
  border: 1px solid rgba(194, 222, 244, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(0, 6, 16, 0.18);
  color: var(--silver-bright);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.contact__link:hover,
.contact__link:focus-visible {
  border-color: rgba(227, 242, 253, 0.76);
  background: rgba(218, 237, 252, 0.10);
  transform: translateY(-2px);
}

.closing__families {
  margin-top: 19px;
  color: var(--taupe);
  font-family: "Aref Ruqaa", serif;
  font-size: 0.98rem;
}

/* ظهور أقسام البطاقة عند التمرير */
.creveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition:
    opacity 0.82s ease,
    transform 0.82s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.creveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ تحسينات الهاتف والشاشات الصغيرة ============ */
@media (max-width: 420px) {
  body { font-size: 1rem; }

  #preloaderPoster {
    padding-right: 0.9rem;
    padding-left: 0.9rem;
  }

  .preloader-cta {
    width: min(20.5rem, calc(100vw - 1.8rem));
    min-height: 8.25rem;
    border-radius: 1.18rem;
  }

  .hero__content {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .hero__name {
    font-size: clamp(3.25rem, 17vw, 4.45rem);
  }

  .hero__invite {
    max-width: 20rem;
    font-size: 0.78rem;
  }

  .card {
    padding-right: 12px;
    padding-left: 12px;
  }

  .card__frame { inset: 9px; }

  .section {
    margin-bottom: 11px;
    padding: 23px 11px;
    border-radius: 20px;
  }

  .countdown { gap: 6px; }

  .cd__cell {
    padding-right: 3px;
    padding-left: 3px;
    border-radius: 12px;
  }

  .cd__lbl { font-size: 0.64rem; }

  .timeline__item {
    grid-template-columns: 12px auto 1fr;
    gap: 8px;
    padding-right: 5px;
    padding-left: 5px;
  }
}

@media (min-width: 900px) {
  .card {
    max-width: 46rem;
    padding-right: 28px;
    padding-left: 28px;
  }

  .section {
    padding: 30px 24px;
  }

  .venue__photo { height: 220px; }
}

/* ============ تقليل الحركة وإتاحة أفضل ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .creveal,
  .reveal,
  .reveal-mask {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__scroll.reveal,
  .hero__scroll.reveal.is-in {
    transform: translateX(-50%);
  }
}

/* Fallback للأجهزة التي لا تدعم blur */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .preloader-cta { background: rgba(4, 17, 32, 0.91); }
  .section { background: rgba(7, 26, 45, 0.94); }
}
