/* ════════════════════════════════════════════════════════════
   دعوة — صفحة الخدمة: بطاقات دعوة إلكترونية
   نفس هوية البطاقات: ليل + ذهب
   ════════════════════════════════════════════════════════════ */

:root {
  --night:      #0e0c08;
  --night-2:    #1a1710;
  --panel:      #1e1a12;
  --gold:       #d4af6a;
  --gold-light: #f3dfae;
  --gold-hot:   #fff3d4;
  --gold-deep:  #9a7b3f;
  --ivory:      #f0e8d5;
  --sand:       #a89a7c;
  --line:       rgba(212, 175, 106, .22);

  --f-display: "Aref Ruqaa", serif;
  --f-body:    "Tajawal", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background:
    repeating-linear-gradient(45deg,  rgba(212, 175, 106, .022) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(-45deg, rgba(212, 175, 106, .022) 0 1px, transparent 1px 13px),
    var(--night);
  color: var(--ivory);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--night); }

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ═══════════ نص ذهبي متلألئ ═══════════ */

.shimmer-text {
  background: linear-gradient(105deg, var(--gold) 0%, var(--gold) 38%, var(--gold-hot) 50%, var(--gold) 62%, var(--gold) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold);
  animation: shimmer 4.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: 130% 0; }
  100% { background-position: -130% 0; }
}

/* ═══════════ بتلات متساقطة (CSS فقط) ═══════════ */

.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.petals i {
  position: absolute;
  top: -30px;
  width: 12px;
  height: 17px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  animation: petalFall linear infinite;
  opacity: 0;
}

.p-red    { background: rgba(204, 72, 88, .8); }
.p-red2   { background: rgba(168, 44, 58, .8); }
.p-white  { background: rgba(255, 250, 243, .75); }
.p-white2 { background: rgba(244, 231, 219, .7); }

.petals i:nth-child(1)  { left: 6%;  animation-duration: 13s; animation-delay: 0s;   transform: scale(.8); }
.petals i:nth-child(2)  { left: 17%; animation-duration: 16s; animation-delay: 3s; }
.petals i:nth-child(3)  { left: 28%; animation-duration: 12s; animation-delay: 6s;   transform: scale(.7); }
.petals i:nth-child(4)  { left: 39%; animation-duration: 17s; animation-delay: 1.5s; }
.petals i:nth-child(5)  { left: 50%; animation-duration: 14s; animation-delay: 8s;   transform: scale(.9); }
.petals i:nth-child(6)  { left: 61%; animation-duration: 15s; animation-delay: 4.5s; transform: scale(.75); }
.petals i:nth-child(7)  { left: 72%; animation-duration: 13s; animation-delay: 10s; }
.petals i:nth-child(8)  { left: 82%; animation-duration: 18s; animation-delay: 2s;   transform: scale(.85); }
.petals i:nth-child(9)  { left: 90%; animation-duration: 14s; animation-delay: 7s;   transform: scale(.7); }
.petals i:nth-child(10) { left: 96%; animation-duration: 16s; animation-delay: 12s; }

@keyframes petalFall {
  0%   { transform: translate(0, -4vh) rotate(0deg); opacity: 0; }
  6%   { opacity: .9; }
  50%  { transform: translate(-6vw, 50vh) rotate(200deg); }
  94%  { opacity: .8; }
  100% { transform: translate(3vw, 108vh) rotate(420deg); opacity: 0; }
}

/* ═══════════ الواجهة ═══════════ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(3.5rem, 9vw, 6rem) clamp(1.2rem, 5vw, 2rem);
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse closest-side at 50% 42%, rgba(212, 175, 106, .12), transparent);
  pointer-events: none;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  margin-bottom: clamp(1.6rem, 5vw, 2.6rem);
}

.brand-seal {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--gold-deep);
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--night-2);
  box-shadow: 0 0 24px rgba(212, 175, 106, .18);
  margin-bottom: .6rem;
  animation: sealPulse 3.4s ease-in-out infinite;
}

@keyframes sealPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(212, 175, 106, .14); }
  50%      { box-shadow: 0 0 34px rgba(212, 175, 106, .32); }
}

.brand-name {
  font-family: var(--f-display);
  font-size: 1.6rem;
  color: var(--gold);
  line-height: 1.4;
}

.brand-sub {
  font-size: .72rem;
  font-weight: 300;
  letter-spacing: .18em;
  color: var(--sand);
}

.hero h1 {
  position: relative;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 7.5vw, 4rem);
  line-height: 1.7;
  color: var(--ivory);
}

.hero h1 em { font-style: normal; }

.lead {
  position: relative;
  max-width: 620px;
  margin-top: 1.2rem;
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  font-weight: 300;
  color: var(--sand);
}

.cta-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .9rem;
  margin-top: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 2rem;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: .02em;
  border: 1px solid var(--gold-deep);
  transition: transform .3s, box-shadow .35s, background .35s, color .35s;
}

.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; }

.btn-wa {
  background: linear-gradient(120deg, var(--gold), #e5c684);
  color: var(--night);
  box-shadow: 0 10px 34px rgba(212, 175, 106, .25);
}

.btn-wa:hover {
  background: var(--gold-hot);
  box-shadow: 0 12px 40px rgba(212, 175, 106, .45);
}

.btn-ghost {
  background: rgba(14, 12, 8, .3);
  color: var(--gold);
}

.btn-ghost:hover {
  background: var(--gold);
  color: var(--night);
  box-shadow: 0 8px 30px rgba(212, 175, 106, .3);
}

.phone {
  position: relative;
  margin-top: 1.3rem;
  font-size: .9rem;
  font-weight: 300;
  color: var(--sand);
  letter-spacing: .06em;
}

/* ═══════════ الأقسام ═══════════ */

.section {
  max-width: 1050px;
  margin-inline: auto;
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1.2rem, 5vw, 2rem);
  text-align: center;
}

.section-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  color: var(--gold);
}

.title-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  max-width: 240px;
  margin: 1rem auto clamp(2rem, 5vw, 3rem);
  color: var(--gold-deep);
}

.title-orn span {
  flex: 1;
  height: 1px;
  background: linear-gradient(to var(--grad-dir, left), transparent, var(--gold-deep));
}

.title-orn span:last-child { --grad-dir: right; }
.title-orn b { font-size: .7rem; font-weight: 400; }

/* حركة الظهور */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 1s ease var(--d, 0s),
    transform 1s cubic-bezier(.2, .7, .25, 1) var(--d, 0s);
}

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

/* ═══════════ المزايا ═══════════ */

.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.feat {
  background: linear-gradient(165deg, #241f14 0%, var(--panel) 55%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.8rem 1.4rem;
  transition: border-color .4s, box-shadow .4s;
}

.feat:hover {
  border-color: rgba(212, 175, 106, .5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 34px rgba(212, 175, 106, .07);
}

.feat-ic {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  color: var(--gold);
  border-radius: 50%;
  border: 1px solid var(--gold-deep);
  background: var(--night-2);
  box-shadow: 0 0 20px rgba(212, 175, 106, .12);
}

.feat-ic svg { width: 22px; height: 22px; }

.feat h3 {
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: .4rem;
}

.feat p {
  font-size: .93rem;
  font-weight: 300;
  color: var(--sand);
}

/* ═══════════ الخطوات ═══════════ */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  counter-reset: step;
}

.steps li {
  position: relative;
  background: linear-gradient(165deg, #241f14 0%, var(--panel) 55%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 1.4rem 1.8rem;
}

.steps li b {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 1rem;
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--night);
  border-radius: 50%;
  background: linear-gradient(120deg, var(--gold), #e5c684);
  box-shadow: 0 6px 22px rgba(212, 175, 106, .3);
}

.steps h3 {
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: .4rem;
}

.steps p {
  font-size: .93rem;
  font-weight: 300;
  color: var(--sand);
}

/* ═══════════ النموذج الحي ═══════════ */

.demo {
  display: block;
  max-width: 720px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
  transition: border-color .4s, box-shadow .4s, transform .35s;
}

.demo:hover {
  border-color: rgba(212, 175, 106, .55);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 50px rgba(212, 175, 106, .1);
  transform: translateY(-4px);
}

.demo img { width: 100%; height: auto; }

.demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .9rem 1.3rem;
  border-top: 1px solid var(--line);
}

.demo-link {
  font-size: .85rem;
  font-weight: 300;
  color: var(--sand);
  letter-spacing: .03em;
}

.demo-open {
  font-size: .95rem;
  font-weight: 500;
  color: var(--gold);
}

/* ═══════════ الخاتمة ═══════════ */

.closing-cta { padding-bottom: clamp(4rem, 10vw, 6rem); }

.closing-line {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  color: var(--ivory);
}

.closing-cta .cta-row { margin-top: 1.8rem; }

/* ═══════════ التذييل ═══════════ */

.footer {
  border-top: 1px solid var(--line);
  padding: 1.7rem 1rem calc(1.7rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: .88rem;
  font-weight: 300;
  color: var(--sand);
}

.footer a { color: var(--gold); }

/* ═══════════ تقليل الحركة ═══════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal { opacity: 1 !important; transform: none !important; }

  .petals { display: none; }

  .shimmer-text {
    background: none;
    -webkit-text-fill-color: var(--gold);
    color: var(--gold);
  }
}
