/* site/styles.css — نظام جولدن وان البصري (موجة W-F التصميمية 2026-11).
   لوحة مستبدَلة لا متراكمة: حبر داكن + ذهب صناعي للخَلفيات الدافئة، بلا خطوط خارجية
   (font-src 'self')، بلا CDN، بلا backdrop-filter ولا blur متحرك (جهاز المالك).
   الحركة كلها مشروطة بـ html.js من /interactive.js: بلا JavaScript كل شيء ظاهر. */
:root {
  --ink: #0b1220;
  --ink-2: #1e293b;
  --muted: #55606f;
  --gold: #b45309;
  --gold-hi: #d9a441;
  --gold-deep: #7c3a0f;
  --surface: #fbfaf7;
  --card: #ffffff;
  --line: #e7e2d9;
  --line-strong: #cfc7b8;

  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s5: 1.25rem; --s6: 1.5rem;  --s8: 2rem;    --s10: 2.5rem;
  --s12: 3rem;   --s16: 4rem;   --s20: 5rem;   --s24: 6rem;

  --wrap: 76rem;
  --r: 14px;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.05), 0 12px 28px -18px rgba(11, 18, 32, 0.28);
  --shadow-lift: 0 2px 4px rgba(11, 18, 32, 0.06), 0 22px 40px -20px rgba(11, 18, 32, 0.34);
}

* { box-sizing: border-box; }
html { direction: rtl; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: 'Segoe UI', 'Tahoma', 'Noto Naskh Arabic', 'Arial', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}
bdi { font-weight: 600; color: var(--ink-2); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s4); }
h1, h2, h3 { color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 800; line-height: 1.22; }
h2 { font-size: clamp(1.5rem, 3.2vw, 1.95rem); font-weight: 800; line-height: 1.3; margin-block-end: var(--s4); }
h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.5; }
p { margin: 0; }
a { color: var(--gold-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: -999rem; }
.skip:focus { inset-inline-start: var(--s4); top: var(--s4); z-index: 60; background: var(--card); padding: var(--s2) var(--s4); border-radius: var(--r); box-shadow: var(--shadow); }

/* ── الشريط العلوي + شريط الثقة ─────────────────────────────────────────── */
header.site {
  position: sticky; top: 0; z-index: 30;
  background: var(--card);
  border-block-end: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: var(--s3); padding-block: var(--s3); }
.brand .logo { height: 2.25rem; width: auto; flex: none; border-radius: 8px; }
.brand b { font-size: 1.1rem; }
.brand b a { color: var(--ink); text-decoration: none; }
.brand small { color: var(--muted); font-size: 0.78rem; }
.brand .btn-cta { margin-inline-start: auto; }

.tstrip { border-block-end: 1px solid var(--line); background: var(--card); }
.tstrip ul { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0; padding: var(--s3) 0; }
.tstrip li {
  display: inline-flex; align-items: center; gap: var(--s2);
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  padding: var(--s1) var(--s4); font-size: 0.9rem; font-weight: 700; color: var(--ink-2);
}
.tstrip li svg { color: var(--gold); flex: none; }
.tstrip .count { font-variant-numeric: tabular-nums; color: var(--gold-deep); }

/* ── أزرار وأيقونات ─────────────────────────────────────────────────────── */
.btn-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0.7rem 1.5rem;
  background: var(--gold); color: #fff; text-decoration: none;
  font-weight: 800; border-radius: 12px; border: 1px solid var(--gold);
  box-shadow: 0 10px 22px -14px rgba(180, 83, 9, 0.9);
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.btn-cta:hover { background: var(--gold-deep); border-color: var(--gold-deep); transform: translateY(-2px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 0.7rem 1.25rem;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card);
  color: var(--ink); text-decoration: none; font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--gold-hi); }
.ico { width: 24px; height: 24px; flex: none; }
.ico-lg { width: 30px; height: 30px; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
section.pad { padding-block: var(--s16); }
.hero { padding-block: var(--s12) var(--s16); background: linear-gradient(180deg, #fff 0%, var(--surface) 100%); }
.hero-grid { display: grid; gap: var(--s8); align-items: center; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.hero .kicker { display: inline-flex; align-items: center; gap: var(--s2); color: var(--gold-deep); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.01em; margin-block-end: var(--s3); }
.hero h1 { margin-block-end: var(--s4); }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 42rem; }
.hero .lede { margin-block-end: var(--s6); }
.hero .actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero-figure { position: relative; margin: 0; }
.hero-figure .frame {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  aspect-ratio: 600 / 1067; background: var(--ink) center/cover no-repeat;
}
.hero-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-figure figcaption { margin-block-start: var(--s2); color: var(--muted); font-size: 0.8rem; }
.hero-figure .badge {
  position: absolute; inset-block-start: var(--s3); inset-inline-start: var(--s3);
  display: inline-flex; align-items: center; gap: var(--s1);
  background: rgba(11, 18, 32, 0.82); color: #fff; border-radius: 999px;
  padding: 0.3rem 0.7rem; font-size: 0.75rem; font-weight: 700;
}
.hero-figure .badge bdi { color: inherit; font-weight: 700; }
.hero-figure .badge svg { color: var(--gold-hi); width: 16px; height: 16px; }

/* ── بطاقات ──────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: var(--s5); box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.card h3 { margin-block-end: var(--s2); }
.card p { color: var(--muted); font-size: 0.95rem; }
.card .ico { color: var(--gold); margin-block-end: var(--s3); }

/* ── الخط الزمني (RTL) ───────────────────────────────────────────────────── */
.tl { position: relative; display: grid; gap: var(--s5); grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.tl::before {
  content: ""; position: absolute; inset-block-start: 15px; inset-inline: 8% 8%; height: 2px;
  background: linear-gradient(90deg, var(--gold-hi), var(--line-strong));
  transform: scaleX(0); transform-origin: right center; transition: transform 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tl.in::before { transform: scaleX(1); }
.tl li { position: relative; padding-block-start: var(--s8); }
.tl .dot {
  position: absolute; inset-block-start: 0; inset-inline-start: 50%; translate: -50% 0;
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--card); border: 2px solid var(--gold); border-radius: 999px; color: var(--gold);
}
.tl .dot svg { width: 18px; height: 18px; }
.tl .shot { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); aspect-ratio: 480 / 271; background: var(--ink-2) center/cover no-repeat; margin-block-end: var(--s3); }
.tl .shot img { display: block; width: 100%; height: auto; }
.tl h3 { margin-block-end: var(--s1); }

/* ── عائلات الخامات والأنواع ─────────────────────────────────────────────── */
.fam { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.fam .card { display: flex; flex-direction: column; }
.fam .head { display: flex; align-items: center; gap: var(--s3); margin-block-end: var(--s3); }
.fam .head .ico { color: var(--gold); margin: 0; }
.fam ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.fam li { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 0.15rem 0.7rem; font-size: 0.85rem; color: var(--ink-2); }
.fam .note { margin-block-start: var(--s3); color: var(--muted); font-size: 0.85rem; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0; padding: 0; }
.chips li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.8rem; font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.chips a { color: var(--gold-deep); text-decoration: none; }
.chips a:hover { text-decoration: underline; }
.trust-note { color: var(--muted); font-size: 0.85rem; }

/* ── بوابة التتبّع ───────────────────────────────────────────────────────── */
.gate-grid { display: grid; gap: var(--s8); align-items: center; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.gate .shot { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); aspect-ratio: 480 / 271; background: var(--ink) center/cover no-repeat; }
.gate .shot img { display: block; width: 100%; height: auto; }
.gate .shot-wrap { margin: 0; }
.gate .shot-wrap figcaption { margin-block-start: var(--s2); color: var(--muted); font-size: 0.8rem; }
.gate ul { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s2); }
.gate ul li { display: flex; align-items: flex-start; gap: var(--s2); color: var(--muted); }
.gate ul svg { color: var(--gold); flex: none; margin-block-start: 0.35rem; }

/* ── معرض الأعمال: شبكة صور حقيقية بنسبة 3:2 معلنة الحجم ───────────────── */
.wgrid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }

/* Slider تلقائي لمعرض الأعمال */
.wslider {
  display: flex;
  gap: var(--s4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-block: var(--s3);
  scrollbar-width: none;
}
.wslider::-webkit-scrollbar { display: none; }
.wslider .wshot {
  flex: 0 0 auto;
  width: min(85vw, 22rem);
  scroll-snap-align: start;
  animation: wslide 60s linear infinite;
}
@keyframes wslide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.wshot {
  margin: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.wshot:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
/* الأبعاد الصريحة في الوسم + aspect-ratio هنا: لا قفزة تخطيط قبل وصول الصورة. */
.wshot img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--ink-2); }
.wshot figcaption { padding: var(--s3) var(--s4) var(--s4); color: var(--muted); font-size: 0.85rem; line-height: 1.6; }

/* ── المحافظات ───────────────────────────────────────────────────────────── */
.govs { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0; padding: 0; }
.govs li {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 0.3rem var(--s3); border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.govs li:hover { transform: translateY(-2px); border-color: var(--gold-hi); }
.govs svg { color: var(--gold); width: 16px; height: 16px; flex: none; }
.govs a { color: var(--ink-2); text-decoration: none; font-size: 0.9rem; font-weight: 600; }

/* ── الأسئلة الشائعة ─────────────────────────────────────────────────────── */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s5); }
.faq summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: var(--s2); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-inline-start: auto; color: var(--gold); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-block-start: var(--s2); color: var(--muted); }
.faq details + details { margin-block-start: var(--s3); }

/* ── التواصل ─────────────────────────────────────────────────────────────── */
.contact-link { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; font-weight: 700; color: var(--gold-deep); text-decoration: none; }
.contact-link svg { flex: none; color: var(--gold); }
.card .row { display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: 0.95rem; }
.card .row + .row { margin-block-start: var(--s2); }
.card .row svg { color: var(--gold); flex: none; }

footer.site { border-block-start: 1px solid var(--line); background: var(--card); padding-block: var(--s8); color: var(--muted); font-size: 0.9rem; }
footer.site nav { display: flex; flex-wrap: wrap; gap: var(--s4); margin-block-start: var(--s2); }
footer.site nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Policy pages stay readable without animation and use the shared site tokens. */
.policy { max-width: 52rem; padding-block: var(--s12) var(--s16); overflow-wrap: anywhere; }
.policy h1 { margin-block-end: var(--s6); }
.policy section { margin-block-start: var(--s8); padding-block-start: var(--s6); border-block-start: 1px solid var(--line); }
.policy p + p { margin-block-start: var(--s4); }

/* ── الحركة: لا تُفعَّل إلا مع JavaScript، وتُلغى تمامًا مع تقليل الحركة ──
   الإخفاء استثناء بصري لا شرط ظهور: /interactive.js يُلغيه من الجذر بصنف
   no-reveal عند أي استثناء أو عدم دعم IntersectionObserver أو بعد 1200ms،
   و HTML بلا جافاسكربت أصلًا ظاهر (القواعد معلّقة على html.js). */
html.js [data-reveal] { opacity: 0; transform: translateY(14px); }
html.js [data-reveal].in { opacity: 1; transform: none; transition: opacity 0.55s ease, transform 0.55s ease; }
html.js .reveal { opacity: 0; transform: translateY(14px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity 0.55s ease, transform 0.55s ease; }
/* مسار الإنهاك: لا نص يبقى حبيس حركة — كل ما هو مؤجَّل يظهر بلا استثناء. */
html.no-reveal [data-reveal], html.no-reveal .reveal, html.no-reveal .tl::before {
  opacity: 1 !important; transform: none !important;
}
@media (scripting: none) {
  [data-reveal], .reveal { opacity: 1 !important; transform: none !important; }
  .tl::before { transform: none !important; }
}
html.js .hero h1 {
  background: linear-gradient(100deg, var(--ink) 0 42%, var(--gold-hi) 50%, var(--ink) 58%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6.5s ease-in-out 1;
}
@keyframes shimmer { from { background-position: 220% 0; } to { background-position: -60% 0; } }
@supports not (background-clip: text) {
  html.js .hero h1 { background: none; color: var(--ink); animation: none; }
}

@media (max-width: 62rem) {
  .hero-grid, .gate-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { order: -1; }
  .hero-figure .frame { aspect-ratio: 4 / 5; }
  .gate-grid .shot { order: -1; }
}
@media (max-width: 40rem) {
  section.pad { padding-block: var(--s12); }
  .tl { grid-template-columns: minmax(0, 1fr); }
  .tl::before { inset-block: 12px 12px; inset-inline: 15px auto; width: 2px; height: auto; transform: scaleY(0); transform-origin: top center; }
  .tl.in::before { transform: scaleY(1); }
  .tl li { padding-block-start: 0; padding-inline-start: var(--s10); }
  .tl .dot { inset-inline-start: 0; translate: 0 0; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  /* تقليل الحركة يُلغي الإخفاء نفسه لا الحركة فقط: لا ثانية واحدة من الشفافية. */
  html.js [data-reveal], html.js .reveal { opacity: 1 !important; transform: none !important; }
  .tl::before { transform: none !important; }
}
