/* ============================================================
   مودة: الشكل الـ 3D
   - ألوان البراند (عاجي ودهبي) فوق ألوان site.css
   - الافتتاحية: اللوجو، وبعده كارت دعوة بيتفتح من الختم
   - الخلفية الـ 3D (canvas من js/scene3d.js)، ميل الكروت، وظهور الأقسام
   - عجلة الدعوات في الرئيسية، وصفحة الدعوات
   ============================================================ */
:root {
  --bg: #f7f2e9;
  --paper: #fffcf6;
  --soft: #efe6d6;
  --line: #e7dccb;
  --ink: #221c15;
  --muted: #6f6556;
  --green: #7a5a2c;        /* اللون الأساسي بقى برونزي دهبي زي اللوجو */
  --green-dark: #5b421f;
  --gold: #b8924f;
  --gold-hi: #e2c88f;
  --gold-lo: #8c6a33;
  --espresso: #261d15;
  --f-latin: "Cormorant Garamond", "Times New Roman", serif;
}

/* ---------- الخلفية الـ 3D ---------- */
.bg3d {
  position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(255, 244, 219, .95), transparent 70%),
    radial-gradient(900px 560px at 6% 104%, rgba(236, 214, 176, .55), transparent 70%);
}
.sec--paper { background: rgba(255, 252, 246, .74); border-color: rgba(214, 196, 164, .55); }
.top { background: rgba(247, 242, 233, .82); border-bottom-color: rgba(214, 196, 164, .6); }

/* ---------- اللوجو في الهيدر والفوتر (صورة) ---------- */
.logo { display: block; flex: none; line-height: 0; }
.logo img { height: 46px; width: auto; }
.foot__brand img { height: 58px; width: auto; }

/* عناوين بعمق خفيف */
.hero h1, .pagehead h1 {
  text-shadow: 0 1px 0 #fff, 0 2px 0 rgba(226, 200, 143, .55), 0 3px 0 rgba(200, 168, 110, .35), 0 14px 26px rgba(90, 62, 22, .16);
}

/* آخر قسم (كلّمونا): إسبريسو ودهبي بدل الأخضر */
.end {
  background:
    radial-gradient(700px 380px at 85% 0%, rgba(184, 146, 79, .28), transparent 70%),
    radial-gradient(600px 400px at 0% 100%, rgba(184, 146, 79, .16), transparent 70%),
    var(--espresso);
}
.end p { color: #d9ccb6; }

/* ---------- البداية بشكل 3D ---------- */
.hero__art {
  transform-style: preserve-3d;
  transform: perspective(1500px) rotateY(var(--hy, -7deg)) rotateX(var(--hx, 3deg));
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
[dir="rtl"] .hero__art { --hy: 7deg; }
.hero__big img { box-shadow: 0 40px 60px -34px rgba(60, 40, 12, .55), 0 0 0 1px rgba(184, 146, 79, .25); }
.hero__phone { transform: translateZ(40px); animation: floaty 6s ease-in-out infinite; }
.hero__phone:hover { transform: translateZ(40px) translateY(-4px); }
[dir="ltr"] .hero__phone { right: 0; }
[dir="rtl"] .hero__phone { left: 0; }
html { overflow-x: clip; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- ميل الكروت مع الماوس ---------- */
.tilt {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(var(--tz, 0px));
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}
.tilt.is-tilting { transition-duration: .12s; }
.tilt { position: relative; }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 245, 220, .45), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.tilt.is-tilting::after { opacity: 1; }

/* ---------- ظهور الأقسام بزاوية ---------- */
.hero__in, .sec__head, .grid, .plans, .steps, .faq__list, .rsvp, .pay, .pick, .contact, .try__in, .inv-cta { perspective: 1400px; }
.rv {
  opacity: 0; translate: 0 46px; rotate: x 16deg; transform-origin: 50% 100%;
  transition: opacity .9s ease, translate 1s cubic-bezier(.2, .75, .2, 1), rotate 1.1s cubic-bezier(.2, .75, .2, 1);
}
.rv.rv-in { opacity: 1; translate: none; rotate: none; }
.rv.tilt { transition: opacity .9s ease, translate 1s cubic-bezier(.2, .75, .2, 1), rotate 1.1s cubic-bezier(.2, .75, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1); }
.rv.tilt.is-tilting { transition: opacity .9s ease, translate 1s ease, rotate 1.1s ease, transform .12s ease-out; }

/* كروت الدعوات بتدخل ورا بعض لما التاب يتغير */
.grid .card { animation: cardIn .8s cubic-bezier(.2, .75, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes cardIn { from { opacity: 0; translate: 0 40px; rotate: x 18deg; } to { opacity: 1; translate: none; rotate: none; } }
.card__media { box-shadow: 0 22px 36px -26px rgba(60, 40, 12, .5); }

/* ============================================================
   الافتتاحية: ظرف مالي الشاشة كلها
   الكلاسات بيحطها js/intro.js بالترتيب:
   is-draw (اللوجو بيترسم) ← is-filled ← is-env (خطوط الظرف) ← is-solid (الظرف بقى ورق)
   ← is-seal (الختم بيظهر و«مودة» بتترسم عليه) ← is-sealed (بيلمع لحظة)
   ← is-break (الختم بيتكسر) ← is-open (الغطا بيتفتح والموقع يبان من الفتحة) ← is-drop (الظرف بيقع ويختفي)
   ============================================================ */
.intro { display: none; }
html.has-intro body { overflow: hidden; }
html.has-intro .intro {
  position: fixed; inset: 0; z-index: 1000; display: block;
  overflow: hidden; color: var(--ink);
}
/* الخلفية طبقة لوحدها، عشان تختفي والموقع يبان من فتحة الظرف */
html.has-intro .intro::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, #fffaf1 0%, #f6ecda 60%, #eadbc0 100%);
  transition: opacity .9s ease;
}
.intro.is-open { pointer-events: none; }
.intro.is-open::before { opacity: 0; transition-delay: .35s; }
.intro__dust, .intro__dust::before {
  position: absolute; inset: -20%; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(184, 146, 79, .8), transparent 60%),
    radial-gradient(1.5px 1.5px at 28% 72%, rgba(184, 146, 79, .7), transparent 60%),
    radial-gradient(2.5px 2.5px at 44% 38%, rgba(226, 200, 143, .9), transparent 60%),
    radial-gradient(1.5px 1.5px at 63% 18%, rgba(184, 146, 79, .7), transparent 60%),
    radial-gradient(2px 2px at 78% 62%, rgba(226, 200, 143, .9), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 34%, rgba(184, 146, 79, .6), transparent 60%),
    radial-gradient(2px 2px at 55% 88%, rgba(184, 146, 79, .7), transparent 60%),
    radial-gradient(1.5px 1.5px at 8% 84%, rgba(226, 200, 143, .8), transparent 60%);
  background-size: 520px 520px;
  animation: dust 26s linear infinite;
  transition: opacity .6s;
}
.intro__dust::before { content: ""; inset: 0; background-size: 340px 340px; animation-duration: 18s; opacity: .7; }
.intro.is-solid .intro__dust { opacity: .5; }
.intro.is-open .intro__dust { opacity: 0; }
@keyframes dust { to { transform: translate3d(0, -520px, 0); } }

.intro__skip {
  position: absolute; top: max(14px, env(safe-area-inset-top)); inset-inline-end: 16px; z-index: 5;
  padding: 8px 14px; border: 1px solid rgba(140, 106, 51, .35); border-radius: 20px;
  background: rgba(255, 252, 246, .7); color: var(--gold-lo); font-size: .85rem; cursor: pointer; letter-spacing: .04em;
  transition: opacity .4s;
}
.intro__skip:hover { background: #fffcf6; }
.intro.is-break .intro__skip { opacity: 0; }

/* المسرح: الشاشة كلها */
.intro__stage {
  --sd: min(30vw, 150px, 26svh);          /* مقاس الختم */
  --tip: 52%;                              /* بوز الغطا (ونص الختم) */
  position: absolute; inset: 0;
  perspective: 1400px; perspective-origin: 50% 45%;
}
.intro__tilt { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.env { position: absolute; inset: 0; transform-style: preserve-3d; }

/* --- الجيب: كل الظرف ماعدا الغطا --- */
.env__pocket {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform-origin: 50% 100%;
  transition: transform 1.4s cubic-bezier(.55, 0, .3, 1), opacity 1s ease .35s;
}
/* في الآخر بيقع لقدّام ويختفي */
.intro.is-drop .env__pocket { transform: translateY(6%) rotateX(-80deg); opacity: 0; }
.env__front {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1s ease;
}
.intro.is-solid .env__front { opacity: 1; }
/* ضل الغطا على الجيب */
.env__cast {
  position: absolute; left: 0; right: 0; top: 0; height: calc(var(--tip) + 4%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, transparent 55%, rgba(90, 62, 20, .2));
  filter: blur(6px); opacity: 0;
  transition: opacity .9s ease;
}
.intro.is-solid .env__cast { opacity: 1; }
.intro.is-open .env__cast { opacity: 0; transition-duration: .5s; }

/* --- الغطا: وشّين، بيتقلب لفوق في 3D وواخد معاه نص الختم --- */
.env__flap {
  position: absolute; left: 0; right: 0; top: 0; height: var(--tip);
  transform-style: preserve-3d; transform-origin: 50% 0;
  transform: translateZ(2px) rotateX(0deg);
}
.intro.is-open .env__flap { transform: translateZ(2px) rotateX(186deg); transition: transform 1.6s cubic-bezier(.6, 0, .25, 1); }
.env__flapOut, .env__flapIn {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.intro.is-solid .env__flapOut, .intro.is-solid .env__flapIn { opacity: 1; }
.env__flapOut {
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #fdf8ed 0%, #f5ead6 70%, #eddcbd 100%);
}
.env__flapOut::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(80, 55, 15, 0), rgba(80, 55, 15, .4));
  opacity: 0; transition: opacity 1.6s cubic-bezier(.6, 0, .25, 1);
}
.intro.is-open .env__flapOut::after { opacity: 1; }
.env__flapIn {
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
  transform: rotateX(180deg);
  background:
    repeating-linear-gradient(45deg, rgba(160, 124, 60, .10) 0 2px, transparent 2px 12px),
    linear-gradient(0deg, #e6d4b1, #f3e7d0);
}

/* خطوط الظرف وهي بتترسم (الإحداثيات بالبكسل من js/intro.js) */
.env__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; transform: translateZ(3px); transition: opacity .9s; }
.env__lines path {
  fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.intro.is-env .env__frame { transition: stroke-dashoffset 1.5s cubic-bezier(.6, 0, .3, 1); stroke-dashoffset: 0; }
.intro.is-env .env__v { transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .3, 1) .45s; stroke-dashoffset: 0; }
.intro.is-solid .env__lines { opacity: .45; }
.intro.is-open .env__lines { opacity: 0; transition-duration: .3s; }

/* --- اللوجو: بيترسم في النص، وبعدين بينزل تحت الختم --- */
.env__logo {
  position: absolute; left: 50%; top: 50%; width: min(64vw, 560px, 62svh); aspect-ratio: 2800 / 1040;
  translate: -50% -50%; scale: 1.25;
  transform: translateZ(3px);
  transition: top 1.4s cubic-bezier(.5, 0, .2, 1), scale 1.4s cubic-bezier(.5, 0, .2, 1);
}
.intro.is-env .env__logo { top: 78%; scale: 1; }
.env__fallback { width: 100%; height: 100%; opacity: 0; transition: opacity .8s; }
.env__logo.no-svg .env__fallback { opacity: 1; }
.env__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.env__strokes path {
  fill: none; stroke: #7d5724; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.intro.is-draw .env__strokes path {
  animation: pen 1.05s cubic-bezier(.45, .05, .35, 1) forwards;
  animation-delay: calc(var(--i) / var(--n) * 1.5s);
}
@keyframes pen { to { stroke-dashoffset: 0; } }
.env__fill { fill: #8f672f; fill-rule: evenodd; opacity: 0; transition: opacity 1s ease; }
.intro.is-filled .env__fill { opacity: 1; }
.intro.is-filled .env__strokes { opacity: 0; transition: opacity 1.2s ease .3s; }
.env__shine {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(../assets/brand/logo.webp) center / contain no-repeat;
  mask: url(../assets/brand/logo.webp) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 246, 215, .95) 50%, transparent 62%);
  background-size: 260% 100%; background-position: 130% 0;
}
.intro.is-filled .env__shine { animation: shine 1.4s ease-in-out .5s forwards; }
@keyframes shine { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* --- الختم: شمع دهبي و«مودة» بتترسم عليه. متقسم نصين:
       النص الفوقاني على الغطا، والتحتاني على الجيب، فبيتكسر ويتفتح مع الظرف --- */
.seal {
  position: absolute; left: 50%; width: var(--sd); aspect-ratio: 1;
  translate: -50% -50%;
  transition: translate .45s cubic-bezier(.3, 1.4, .5, 1), rotate .45s ease;
}
.seal--top {
  top: 100%; transform: translateZ(3px);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  clip-path: polygon(-10% -10%, 110% -10%, 110% 50%, 88% 46%, 74% 54%, 60% 47%, 47% 55%, 33% 47%, 19% 53%, 6% 47%, -10% 51%);
}
.seal--bot {
  top: var(--tip); transform: translateZ(4px);
  clip-path: polygon(-10% 51%, 6% 47%, 19% 53%, 33% 47%, 47% 55%, 60% 47%, 74% 54%, 88% 46%, 110% 50%, 110% 110%, -10% 110%);
}
.intro.is-break .seal--top { translate: -50% calc(-50% - 4px); rotate: -2deg; }
.intro.is-break .seal--bot { translate: -50% calc(-50% + 5px); rotate: 1.5deg; }
.seal__wax {
  position: absolute; inset: 0; scale: 0;
  transition: scale .75s cubic-bezier(.3, 1.5, .5, 1);
}
.intro.is-seal .seal__wax { scale: 1; }
.seal__wax::before, .seal__wax::after { content: ""; position: absolute; }
.seal__wax::before {
  inset: 0;
  border-radius: 47% 53% 50% 50% / 52% 47% 53% 48%;
  background: radial-gradient(circle at 36% 30%, #f5dfa6 0, #d6b064 24%, #b38a3d 52%, #8a6322 78%, #6c4b17 100%);
  box-shadow: 0 10px 22px rgba(70, 45, 10, .38), inset 0 -6px 12px rgba(70, 45, 10, .45), inset 0 5px 9px rgba(255, 240, 200, .6);
}
.seal__wax::after {
  inset: 11%; border-radius: 50%;
  border: 2px solid rgba(95, 64, 20, .4);
  box-shadow: 0 1px 0 rgba(255, 236, 190, .5), inset 0 1px 0 rgba(255, 236, 190, .35), inset 0 0 16px rgba(80, 52, 14, .35);
}
/* «مودة» محفورة في الشمع */
.seal__ink { position: absolute; left: 17%; right: 17%; top: 22%; bottom: 22%; }
.seal__svg {
  width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(0 1.5px 0 rgba(255, 236, 190, .65)) drop-shadow(0 -1px 0 rgba(60, 35, 5, .45));
}
.seal__strokes path {
  fill: none; stroke: #5d3d10; stroke-width: 14; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.intro.is-seal .seal__strokes path {
  animation: pen .9s cubic-bezier(.45, .05, .35, 1) forwards;
  animation-delay: calc(.45s + var(--i) / var(--n) * 1.05s);
}
.seal__fill { fill: #6d4a15; fill-rule: evenodd; opacity: 0; transition: opacity .9s ease; }
.intro.is-sealed .seal__fill { opacity: 1; }
.intro.is-sealed .seal__strokes { opacity: 0; transition: opacity 1s ease .2s; }
.seal__ink::after {
  content: ""; position: absolute; inset: -39% -26%; border-radius: 50%; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 244, 210, .7) 50%, transparent 60%);
  background-size: 250% 100%; background-position: 130% 0;
}
.intro.is-sealed .seal__ink::after { animation: shine 1.1s ease-in-out .3s forwards; }

/* الموقع بيطلع من ورا الظرف */
html.site-in .top, html.site-in main {
  animation: siteIn 1.5s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes siteIn { from { opacity: .2; transform: scale(.95); } to { opacity: 1; transform: none; } }

/* ============================================================
   أول الصفحة: العجلة، وبعدها «البداية» بتطلع من العمق
   ============================================================ */
.ringhero {
  position: relative; overflow: hidden;
  min-height: min(calc(100svh - 64px), 980px); display: flex; flex-direction: column; justify-content: center;
  padding: 40px 0 70px;
}
.ringhero > .wrap { perspective: 1500px; }
.ringhero__head { text-align: center; max-width: 720px; margin: 0 auto 10px; }
.ringhero__head .eyebrow { margin-bottom: 6px; letter-spacing: .08em; }
.ringhero__head h2 {
  font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.1;
  text-shadow: 0 1px 0 #fff, 0 2px 0 rgba(226, 200, 143, .55), 0 3px 0 rgba(200, 168, 110, .35), 0 14px 26px rgba(90, 62, 22, .16);
}
.ringhero__head > p:last-child { margin-top: 10px; color: var(--muted); }
/* وإنت نازل: العجلة بتميل لورا وتبعد (--p من js/scene3d.js) */
.ringhero__scene {
  transform-origin: 50% 0;
  transform: translateY(calc(var(--p, 0) * 70px)) rotateX(calc(var(--p, 0) * 32deg)) scale(calc(1 - var(--p, 0) * .14));
  opacity: calc(1 - var(--p, 0) * .8);
  will-change: transform, opacity;
}
.ringhero__down {
  position: absolute; left: 50%; bottom: 16px; translate: -50% 0;
  display: grid; justify-items: center; gap: 2px;
  color: var(--gold-lo); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  opacity: calc(1 - var(--p, 0) * 3);
}
[dir="rtl"] .ringhero__down { text-transform: none; letter-spacing: 0; }
.ringhero__down svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* فاصل دهبي بيترسم فوق «البداية» */
.hero { position: relative; padding-top: 40px; }
.flourish { display: flex; justify-content: center; margin: 0 auto 34px; color: var(--gold); }
.flourish svg { width: min(400px, 80vw); height: auto; overflow: visible; }
.flourish path { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.5, 0, .2, 1); }
.flourish circle { fill: currentColor; opacity: 0; transition: opacity .6s ease 1.2s; }
.flourish.rv-in path, .flourish:not(.rv) path { stroke-dashoffset: 0; }
.flourish.rv-in circle, .flourish:not(.rv) circle { opacity: 1; }

/* ============================================================
   عجلة الدعوات في الرئيسية
   ============================================================ */
.ring3d {
  --iw: 250px;
  position: relative; height: calc(var(--iw) * .95 + 60px);
  perspective: 1700px; perspective-origin: 50% 30%;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
}
.ring3d.is-drag { cursor: grabbing; }
.ring3d__stage {
  position: absolute; left: 50%; top: 20px; width: var(--iw); height: calc(var(--iw) * .75);
  margin-left: calc(var(--iw) / -2);
  transform-style: preserve-3d;
}
.ring3d__item {
  position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer;
  border-radius: 10px; overflow: hidden; background: var(--soft);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-shadow: 0 26px 40px -24px rgba(60, 40, 12, .6), 0 0 0 1px rgba(184, 146, 79, .25);
  transition: box-shadow .4s, filter .4s;
}
.ring3d__item > img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ring3d__item.is-phone { display: flex; align-items: center; justify-content: center; }
.ring3d__item[data-cat="classic"] { background: #efe3dc; }
.ring3d__item[data-cat="3d"] { background: #e9e2d2; }
.ring3d__item[data-cat="world"] { background: #e3e4dc; }
.ring3d__item .phone { height: 90%; aspect-ratio: 404 / 858; padding: 4px; border-radius: 16px; }
.ring3d__item .phone img { height: 100%; border-radius: 12px; pointer-events: none; }
.ring3d__item.is-front { box-shadow: 0 34px 50px -24px rgba(60, 40, 12, .7), 0 0 0 2px var(--gold-hi); }
.ring3d__item:focus-visible { outline: 2px solid var(--gold-lo); outline-offset: 3px; }
.ring3d__floor {
  position: absolute; left: 50%; bottom: 0; width: min(90%, 760px); height: 60px; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(120, 88, 36, .22), transparent);
  pointer-events: none;
}
.ring3d__nav {
  position: absolute; top: calc(20px + var(--iw) * .375); z-index: 2; translate: 0 -50%;
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(184, 146, 79, .5); background: rgba(255, 252, 246, .88); color: var(--gold-lo);
  cursor: pointer; box-shadow: 0 8px 20px -10px rgba(60, 40, 12, .5);
}
.ring3d__nav:hover { background: #fff; }
.ring3d__nav--prev { inset-inline-start: 0; }
.ring3d__nav--next { inset-inline-end: 0; }
[dir="rtl"] .ring3d__nav svg { transform: scaleX(-1); }

.ring3d__cap { text-align: center; margin-top: 18px; min-height: 7.2em; }
.ring3d__cap small { display: block; color: var(--muted); font-size: .85rem; letter-spacing: .04em; }
.ring3d__cap h3 { font-size: 1.7rem; margin-top: 2px; }
.ring3d__cap p { color: #4a4238; font-size: .95rem; max-width: 34em; margin: 4px auto 0; }
.ring3d__acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; margin-top: 14px; }
.ring3d__acts button { background: none; border: 0; padding: 0; cursor: pointer; }
.ring3d__hint { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.ring3d__all { display: flex; justify-content: center; margin-top: 26px; }

/* ============================================================
   صفحة الدعوات
   ============================================================ */
.pagehead { padding: 64px 0 8px; }
.pagehead h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.15; }
.pagehead__lead { margin-top: 14px; color: var(--muted); max-width: 40em; }
.sec--gallery { padding-top: 40px; }
.inv-cta { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; }
.inv-cta p { color: var(--muted); margin-top: 8px; max-width: 36em; }
.inv-cta__acts { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.inv-cta__acts button { background: none; border: 0; padding: 0; cursor: pointer; }

@media (max-width: 760px) {
  .ring3d { --iw: 190px; }
  .logo img { height: 40px; }
  .ringhero { padding: 26px 0 64px; }
  .ring3d__nav { width: 40px; height: 40px; }
  .pagehead { padding: 40px 0 0; }
  .inv-cta { grid-template-columns: 1fr; }
  .hero__art { --hy: -4deg; --hx: 2deg; }
  [dir="rtl"] .hero__art { --hy: 4deg; }
  .hero__phone { transform: translateZ(30px); }
}

/* من غير حركة لو الجهاز طالب كده */
@media (prefers-reduced-motion: reduce) {
  .hero__phone, .intro__dust, .intro__dust::before, .intro__float, .ringhero__down svg { animation: none !important; }
  .grid .card { animation: none; }
  .ringhero__scene { transform: none; opacity: 1; }
  .env__strokes { display: none; }
  .env__fill { opacity: 1; }
  .seal__strokes { display: none; }
  .seal__fill { opacity: 1; }
  html.site-in .top, html.site-in main { animation: none; }
  .hero__art { transform: none; }
  .rv { opacity: 1; translate: none; rotate: none; }
}

/* ============================================================
   علامة مودة على المعاينات (عشان محدش ياخد التصميم):
   لوجو صغير متكرر بميل وشفافية خفيفة، فوق الشاشة ومابيمنعش اللمس
   ============================================================ */
.wm {
  position: absolute; inset: 0; z-index: 6; overflow: hidden;
  pointer-events: none; border-radius: inherit;
}
.wm::before {
  content: ""; position: absolute; inset: -60%;
  background: url(../assets/brand/wm-tile.png) 0 0 / 150px auto repeat;
  opacity: .14; transform: rotate(-22deg);
}
/* جوه الموبايل: على الشاشة بس، مش على الإطار */
.try__phone, .studio__phone { position: relative; }
.try__phone > .wm, .studio__phone > .wm { inset: 7px; border-radius: 24px; }
.viewer__device > .wm { z-index: 8; }
.viewer__device > .wm::before { opacity: .16; background-size: 170px auto; }
/* على صور المعرض أخف */
.card__media > .wm::before, .ring3d__item > .wm::before { opacity: .11; background-size: 115px auto; }
.ring3d__item { position: absolute; }

/* الطلب: ملاحظات آخر ميعاد للتسليم */
.field__hint.is-warn { color: #9a5a12; font-weight: 500; }
.field__hint.is-bad { color: var(--red); font-weight: 500; }
.row--rush b { color: #9a5a12; }

/* ============================================================
   آراء العملاء (js/reviews.js)
   ============================================================ */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars i {
  width: 15px; height: 15px; background: #e2d6bf;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.stars i.is-on { background: linear-gradient(135deg, #ecd08f, #b8883b); }

.rh__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 40px; margin-bottom: 30px; }
.rh__lead { color: var(--muted); margin-top: 8px; max-width: 36em; }
.rh__sum { display: flex; align-items: center; gap: 10px; }
.rh__sum b { font-family: var(--f-latin); font-size: 2.6rem; font-weight: 600; line-height: 1; color: var(--gold-lo); }
.rh__sum span { color: var(--muted); font-size: .9rem; }
.rh__all { display: flex; justify-content: center; margin-top: 30px; }

.rev-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; perspective: 1400px; }
.rev {
  position: relative; display: flex; flex-direction: column; gap: 12px; overflow: hidden;
  padding: 24px 24px 20px; border-radius: 14px;
  background: rgba(255, 252, 246, .92); border: 1px solid rgba(214, 196, 164, .6);
  box-shadow: 0 22px 40px -30px rgba(60, 40, 12, .45);
  animation: cardIn .8s cubic-bezier(.2, .75, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms);
}
.rev__q { position: absolute; top: -22px; inset-inline-end: 14px; font-family: var(--f-latin); font-size: 6.5rem; line-height: 1; color: rgba(184, 146, 79, .16); pointer-events: none; }
.rev__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rev__top time { font-size: .8rem; color: var(--muted); }
.rev__text { color: #3f372c; line-height: 1.75; font-size: .98rem; white-space: pre-line; overflow-wrap: anywhere; }
.rev__text.is-long:not(.is-open) { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rev__more { align-self: flex-start; padding: 0; border: 0; background: none; cursor: pointer; color: var(--green); font-weight: 500; font-size: .88rem; text-decoration: underline; text-underline-offset: 4px; }
.rev__who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.rev__av {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f5dfa6, #b8924f 70%); color: #fff;
  font-family: var(--f-latin); font-weight: 600; font-size: 1.05rem;
}
.rev__who b { display: block; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.rev__who small { color: var(--muted); font-size: .8rem; }

/* صفحة الآراء */
.rev-top {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px 48px; align-items: center;
  margin-bottom: 34px; padding: 24px 28px; border-radius: 14px;
  background: rgba(255, 252, 246, .88); border: 1px solid var(--line);
}
.rev-top:has(#revSum[hidden]) { display: none; }
.rev-sum { display: flex; align-items: center; gap: 14px; }
.rev-sum__avg { font-family: var(--f-latin); font-size: 4rem; font-weight: 600; line-height: 1; color: var(--gold-lo); }
.rev-sum p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.rev-sum .stars i { width: 20px; height: 20px; }
.rev-bars { display: grid; gap: 4px; }
.rev-bars button {
  display: grid; grid-template-columns: 5.5em minmax(0, 1fr) 2.2em; align-items: center; gap: 10px;
  width: 100%; min-height: 34px; padding: 4px 10px; border: 1px solid transparent; border-radius: 8px;
  background: none; cursor: pointer; color: var(--ink); font-size: .88rem; text-align: start;
}
.rev-bars button[data-stars="0"] { grid-template-columns: 1fr auto; font-weight: 500; }
.rev-bars button[aria-pressed="true"] { border-color: var(--gold); background: rgba(226, 200, 143, .18); }
.rev-bars button:disabled { opacity: .45; cursor: default; }
.rev-bars i { display: block; height: 7px; border-radius: 4px; background: #eadfcb; overflow: hidden; }
.rev-bars em { display: block; height: 100%; background: linear-gradient(90deg, #b8924f, #e2c88f); }
[dir="rtl"] .rev-bars em { background: linear-gradient(270deg, #b8924f, #e2c88f); margin-inline-start: 0; }
.rev-bars small { color: var(--muted); text-align: end; }
.rev-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 14px; padding: 44px 10px; color: var(--muted); text-align: center; }

/* ============================================================
   التقييم من صفحة المتابعة (js/track.js)
   ============================================================ */
.fbk {
  margin: 22px 0 6px; padding: 22px 22px 20px; border-radius: 14px;
  background: linear-gradient(160deg, #fffaf0, #f7ecd8); border: 1px solid rgba(184, 146, 79, .45);
  box-shadow: 0 18px 36px -28px rgba(60, 40, 12, .5);
}
.fbk h3 { font-size: 1.45rem; }
.fbk > p { color: #4a4238; margin-top: 4px; }
.fbk__stars { border: 0; padding: 0; margin: 16px 0 14px; }
.fbk__stars legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.fbk__row { display: flex; gap: 6px; }
.fbk__star { position: relative; cursor: pointer; }
.fbk__star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fbk__star i {
  display: block; width: 38px; height: 38px; background: #e4d7bd; transition: transform .15s, background .15s;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.fbk__star.is-on i { background: linear-gradient(135deg, #ecd08f, #b8883b); }
.fbk__star:hover i { transform: scale(1.1); }
.fbk__star input:focus-visible + i { outline: 2px solid var(--green); outline-offset: 3px; }
.fbk .tf { margin-top: 10px; }
.fbk textarea { resize: vertical; }
.fbk__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.fbk__msg { font-size: .9rem; }
.fbk__msg.is-bad { color: var(--red); }
.fbk--done { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.fbk--done .stars i { width: 20px; height: 20px; }
.fbk--done p { flex: 1 1 14em; color: #4a4238; }
.fbk__acts { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.fbk__acts button { background: none; border: 0; padding: 0; cursor: pointer; }

@media (max-width: 1000px) {
  .rev-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .rev-list { grid-template-columns: 1fr; gap: 16px; }
  /* في الرئيسية على الموبايل: الآراء بتتسحب يمين وشمال */
  .rev-list--home {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px;
    margin-inline: calc(var(--gut) * -1); padding: 4px var(--gut) 16px; scrollbar-width: none;
  }
  .rev-list--home::-webkit-scrollbar { display: none; }
  .rev-list--home .rev { flex: 0 0 84%; scroll-snap-align: center; }
  .rev-top { grid-template-columns: 1fr; padding: 18px; gap: 16px; }
  .rev-sum__avg { font-size: 3.2rem; }
  .rh__head { align-items: flex-start; }
  .fbk { padding: 18px 16px; }
  .fbk__star i { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) { .rev { animation: none; } }
.fbk .tf textarea {
  width: 100%; padding: 10px 12px; min-height: 110px; line-height: 1.6;
  background: #fffdf8; border: 1px solid var(--line); border-radius: var(--r); font-size: 1rem;
}
.fbk .tf input { background: #fffdf8; }
.fbk .tf textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.rev__av { font-family: var(--f-body); }

/* آراء بصور (سكرين واتساب مثلًا) */
.rev__src { font-size: .75rem; color: #1f7a48; background: rgba(31, 143, 78, .1); padding: 2px 8px; border-radius: 10px; }
.rev__top time { margin-inline-start: auto; }
.rev__img {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  border-radius: 10px; overflow: hidden; background: #f1e8d8;
  box-shadow: inset 0 0 0 1px rgba(184, 146, 79, .25);
}
.rev__img img { width: 100%; max-height: 340px; object-fit: cover; object-position: top; }
.rev-zoom {
  position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center;
  padding: 50px 16px 16px; background: rgba(24, 19, 13, .88); backdrop-filter: blur(4px);
}
.rev-zoom[hidden] { display: none; }
.rev-zoom img { max-width: min(100%, 720px); max-height: 100%; border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.rev-zoom__x {
  position: absolute; top: max(12px, env(safe-area-inset-top)); inset-inline-end: 14px;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.6rem; line-height: 1;
}

/* ============================================================
   حماية المعاينات (js/guard.js)
   ============================================================ */
#viewer .viewer__device, .try__phone, .studio__phone, .card__media, .ring3d, .answer__eg, .hero__art, .rev__img {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
#viewer .viewer__device img, .try__phone img, .studio__phone img, .card__media img, .ring3d img, .answer__eg img, .hero__art img, .rev__img img {
  -webkit-user-drag: none; user-drag: none; pointer-events: none;
}
.card__media, .ring3d__item, .rev__img, .answer__eg a { pointer-events: auto; }
/* لحظة التصوير أو الخروج من الصفحة: المعاينات بتتغبّش */
html.is-shielded #viewer .viewer__device, html.is-shielded .try__phone, html.is-shielded .studio__phone,
html.is-shielded .card__media, html.is-shielded .ring3d, html.is-shielded .answer__eg, html.is-shielded .hero__art {
  filter: blur(24px) saturate(.6);
}
/* علامة «Demo · Mawwdah» بقت جوه الدعوات نفسها (mawwdah-guard.js)، فمش محتاجينها هنا */
/* الطباعة: المعاينات مش بتطلع */
@media print {
  #viewer, .try__phone, .studio__phone, .card__media, .ring3d, .answer__eg, .hero__art, .rev__img, .bg3d { visibility: hidden !important; }
  body::after { content: "© Mawwdah · مودة"; display: block; text-align: center; margin-top: 40px; }
}
.rev__top { flex-wrap: wrap; row-gap: 6px; }
.rev__src { white-space: nowrap; }

/* ============================================================
   العرض: الدعوة + ديمو صفحة ردود المعازيم (js/rsvp-demo.js)
   الشاشات الكبيرة: الموبايلين جنب بعض. الأصغر: واحد بس وزرارين فوق للتبديل
   ============================================================ */
.viewer__in { gap: 44px; }
.viewer__screen[data-tag]::before {
  content: attr(data-tag); position: absolute; left: 0; right: 0; top: -30px;
  text-align: center; white-space: nowrap; color: #e9dfc9; font-size: .82rem; letter-spacing: .04em;
}
.viewer__screen--rsvp::before { color: var(--gold-hi); font-weight: 500; }
.viewer__rsvp { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: #fbf6ec; }
.viewer__mode { display: none; }

@media (max-width: 1239px) {
  .viewer__mode {
    display: flex; position: fixed; top: 16px; left: 50%; translate: -50% 0; z-index: 3; gap: 4px;
    padding: 4px; border-radius: 22px; background: rgba(255, 255, 255, .1);
  }
  .viewer__mode button { border: 0; background: none; color: #e9dfc9; padding: 7px 14px; border-radius: 18px; cursor: pointer; font-size: .85rem; white-space: nowrap; }
  .viewer__mode button[aria-selected="true"] { background: #f3efe6; color: var(--ink); }
  .viewer__screen--rsvp { display: none; }
  .viewer.is-rsvp .viewer__screen--rsvp { display: block; }
  .viewer.is-rsvp #vScreen { display: none; }
  .viewer__screen[data-tag]::before { display: none; }
}
@media (max-width: 760px) {
  .viewer__mode { position: static; translate: none; flex: none; justify-content: center; border-radius: 0; background: #1a1712; padding: 6px; }
  .viewer__mode button { flex: 1; }
}

.rsvpd {
  min-height: 100%; padding: 20px 16px 24px; direction: inherit;
  background: linear-gradient(180deg, #fffaf1, #f6ecdb); color: #2b241b;
  font-family: var(--f-body); font-size: 14px; line-height: 1.5;
}
.rsvpd__top { text-align: center; padding: 16px 0 14px; }
.rsvpd__demo { display: inline-block; padding: 3px 10px; border-radius: 10px; background: rgba(184, 146, 79, .16); color: #8c6a33; font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.rsvpd__top h3 { font-family: var(--f-latin); font-size: 30px; line-height: 1.2; margin-top: 8px; }
[dir="rtl"] .rsvpd__top h3 { font-family: var(--f-head); }
.rsvpd__top p { color: #7a6f60; font-size: 13px; }
.rsvpd__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.rsvpd__stats div { padding: 12px 4px; text-align: center; background: #fff; border: 1px solid #efe3cc; border-radius: 14px; box-shadow: 0 8px 18px -14px rgba(60, 40, 12, .5); }
.rsvpd__stats b { display: block; font-size: 24px; font-weight: 700; line-height: 1.15; }
.rsvpd__stats span { font-size: 11px; color: #7a6f60; }
.rsvpd__stats .is-yes b { color: #2f7a48; }
.rsvpd__stats .is-no b { color: #b3452f; }
.rsvpd__stats .is-wait b { color: #9a8a70; }
.rsvpd__bar { display: flex; height: 8px; margin: 14px 0 8px; border-radius: 4px; overflow: hidden; background: #e8dcc6; }
.rsvpd__bar .is-yes { background: #3f8f5a; }
.rsvpd__bar .is-no { background: #c96a55; }
.rsvpd__total { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: #6b604f; }
.rsvpd__total b { font-size: 18px; color: #2b241b; }
.rsvpd__tabs { display: flex; gap: 6px; margin: 16px 0 10px; overflow-x: auto; scrollbar-width: none; }
.rsvpd__tabs button { flex: none; padding: 6px 12px; border: 1px solid #e2d4ba; border-radius: 16px; background: #fff; color: #4a4034; font: inherit; font-size: 12.5px; cursor: pointer; }
.rsvpd__tabs button.is-on { background: #2b241b; border-color: #2b241b; color: #fff; }
.rsvpd__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rsvpd__list li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; background: #fff; border: 1px solid #efe3cc; border-radius: 14px; }
.rsvpd__list li[hidden] { display: none; }
.rsvpd__av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f5dfa6, #b8924f 70%); color: #fff; font-weight: 700; }
.rsvpd__who { min-width: 0; }
.rsvpd__who b { display: block; font-size: 13.5px; font-weight: 600; }
.rsvpd__who small { color: #8a7f6e; font-size: 11.5px; }
.rsvpd__who p { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: #faf3e6; color: #4a4034; font-size: 12.5px; font-style: italic; }
.rsvpd__tag { font-style: normal; font-size: 11px; padding: 3px 8px; border-radius: 10px; white-space: nowrap; }
.rsvpd__tag.is-y { background: #e3f2e7; color: #2f7a48; }
.rsvpd__tag.is-n { background: #f8e3de; color: #b3452f; }
.rsvpd__note { margin: 16px 6px 10px; text-align: center; color: #8a7f6e; font-size: 12px; }
.rsvpd__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rsvpd__acts span { padding: 10px 6px; border-radius: 12px; background: #2b241b; color: #fff; text-align: center; font-size: 12.5px; font-weight: 600; }
.rsvpd__acts span + span { background: #1f8f4e; }
.viewer__rsvp { scrollbar-width: none; }
.viewer__rsvp::-webkit-scrollbar { display: none; }

/* لينك «شاشة كاملة» في كروت المعرض */
.card__actions .open-full { color: var(--muted); font-weight: 500; }
.card__actions .open-full:hover { color: var(--ink); }

/* صفحة ديمو ردود المعازيم لوحدها (rsvp-demo.html) */
.rsvp-page { min-height: 100svh; }
.rsvp-page__in { max-width: 460px; margin: 0 auto; padding: 12px 14px 30px; }
.rsvp-page__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rsvp-page__logo img { height: 42px; width: auto; }
.rsvp-page__phone {
  position: relative; overflow: hidden; border-radius: 28px;
  box-shadow: 0 30px 60px -30px rgba(60, 40, 12, .55), 0 0 0 1px rgba(184, 146, 79, .3);
}
.rsvp-page__screen { position: static; overflow: visible; }
.rsvp-page__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 18px; }
html.is-shielded .rsvp-page__phone { filter: blur(24px) saturate(.6); }
@media (max-width: 480px) { .rsvp-page__in { padding: 8px 0 24px; } .rsvp-page__phone { border-radius: 0; box-shadow: none; } .rsvp-page__bar, .rsvp-page__links { padding: 0 14px; } }
