/* ===================================================================
   مجموعة مسانيد الاستثمارية — نظام التصميم
   MASANID FOR INVESTMENT GROUP — Design System

   كل الألوان والمقاسات من هنا. لتغيير لون الشعار الذهبي مثلًا،
   غيّر سطر --gold وحده وسيتبعه الموقع كله.
   =================================================================== */

:root {
  /* الأزرق الرئيسي من الشعار */
  --navy:        #223858;
  --navy-deep:   #16263c;
  --navy-soft:   #2f4c74;
  --navy-mist:   #f3f6fb;

  /* الذهبي — مأخوذ من الشعار نفسه: #84704C
     والفاتح والغامق مشتقّان منه ليقرأ على الأزرق وعلى الأبيض. */
  --gold:        #84704c;
  --gold-mid:    #a68d61;
  --gold-light:  #cfb381;
  --gold-deep:   #6a5a3c;

  --ink:         #0f1926;
  --muted:       #5d6b7e;
  --line:        #e6eaf1;
  --white:       #ffffff;
  --bg:          #ffffff;

  --radius:      18px;
  --radius-sm:   12px;
  --radius-lg:   28px;

  --shadow-sm:   0 2px 10px rgba(34, 56, 88, .06);
  --shadow:      0 10px 34px rgba(34, 56, 88, .10);
  --shadow-lg:   0 26px 70px rgba(34, 56, 88, .18);

  --header-h:    82px;
  --container:   1220px;

  --ease:        cubic-bezier(.22, .8, .3, 1);
}

/* ————————————————————————— الأساس ————————————————————————— */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Cairo يغطّي العربية والإنجليزية معًا، ويتغيّر ارتفاع السطر وحده. */
html[lang="en"] body { line-height: 1.72; }

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

h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* يخفي العنصر عن العين ويبقيه لقارئ الشاشة. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ————————————————————————— الترويسة ————————————————————————— */

.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-block-end: 1px solid transparent;
  transition: border-color .35s var(--ease), background .35s var(--ease),
              box-shadow .35s var(--ease);
}

/* الترويسة تصير شفافة فوق البنر، وتتماسك عند النزول. */
.header.is-over-hero {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.header.is-stuck {
  border-block-end-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__mark { height: 64px; width: auto; transition: height .35s var(--ease); }
.header.is-stuck .brand__mark { height: 54px; }

.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-weight: 800; font-size: 16px; color: var(--navy); letter-spacing: -.01em; }
.brand__sub  { font-size: 10.5px; color: var(--gold-deep); letter-spacing: .14em; font-weight: 600; }
.header.is-over-hero .brand__name { color: #fff; }
.header.is-over-hero .brand__sub  { color: var(--gold-light); }

.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }

.nav__link {
  position: relative;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 10px;
  transition: color .25s var(--ease);
}
.nav__link::after {
  content: '';
  position: absolute;
  inset-block-end: 4px;
  inset-inline: 14px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: var(--nav-origin, right);
  transition: transform .3s var(--ease);
}
html[lang="en"] .nav__link::after { --nav-origin: left; }
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--navy); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }

.header.is-over-hero .nav__link { color: rgba(255,255,255,.78); }
.header.is-over-hero .nav__link:hover,
.header.is-over-hero .nav__link[aria-current="page"] { color: #fff; }

/* ————————————————————————— الأزرار ————————————————————————— */

.btn {
  --btn-bg: var(--navy);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14.5px;
  font-weight: 700;
  overflow: hidden;
  isolation: isolate;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, var(--gold-deep), var(--gold-mid), var(--gold-light));
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(34,56,88,.24); }
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(0); }

.btn--gold { --btn-bg: var(--gold); --btn-fg: #1b2436; }
.btn--gold::before { background: linear-gradient(120deg, var(--navy-soft), var(--navy)); }
.btn--gold:hover { --btn-fg: #fff; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--navy);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn--ghost:hover { --btn-fg: #fff; }

.btn--lg { padding: 16px 34px; font-size: 15.5px; }

/* السهم يتحرك باتجاه القراءة، فينقلب تلقائيًا مع اللغة. */
.btn__arrow { transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(var(--arrow-dir, -4px)); }
html[lang="en"] .btn { --arrow-dir: 4px; }

/* ————————————— مبدّل اللغة العائم —————————————
   عربي: يطفو على اليسار. إنجليزي: يطفو على اليمين.
   inset-inline-end وحده يكفي: في RTL هو اليسار، وفي LTR هو اليمين. */

.langfab {
  position: fixed;
  inset-inline-end: 22px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 999px;
  background: rgba(34, 56, 88, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(15, 25, 40, .3);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.langfab:hover { box-shadow: 0 18px 52px rgba(15, 25, 40, .42); }

.langfab__btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .62);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: color .28s var(--ease), background .28s var(--ease),
              transform .28s var(--ease);
}
.langfab__btn:hover { color: #fff; transform: scale(1.06); }
.langfab__btn.is-active {
  color: #1b2436;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-mid));
  box-shadow: 0 4px 14px rgba(207, 179, 129, .5);
}

.langfab__globe {
  width: 20px; height: 20px;
  color: var(--gold-light);
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ————————————— قائمة الجوال —————————————
   تنزلق من جهة بداية السطر: يمينًا في العربية، يسارًا في الإنجليزية. */

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  position: relative;
}
.burger span {
  position: absolute;
  inset-inline: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform .35s var(--ease), opacity .25s var(--ease),
              background .3s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.header.is-over-hero .burger span { background: #fff; }

.burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.burger.is-open span { background: var(--navy) !important; }

.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: min(86vw, 360px);
  z-index: 980;
  background: #fff;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 0 70px rgba(15, 25, 40, .26);
  transform: translateX(var(--drawer-hidden, 105%));
  transition: transform .45s var(--ease);
  overflow-y: auto;
}
/* في RTL جهة البداية هي اليمين، فتُخفى بالانزلاق يمينًا (قيمة موجبة). */
html[dir="rtl"] .drawer { --drawer-hidden: 105%; }
html[dir="ltr"] .drawer { --drawer-hidden: -105%; }
.drawer.is-open { transform: translateX(0); }

.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-block-end: 18px; margin-block-end: 12px;
  border-block-end: 1px solid var(--line);
}
.drawer__link {
  padding: 14px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
  transition: background .25s var(--ease), padding-inline-start .25s var(--ease);
}
.drawer__link:hover { background: var(--navy-mist); padding-inline-start: 20px; }

.scrim {
  position: fixed; inset: 0; z-index: 970;
  background: rgba(15, 25, 40, .5);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

/* ————————————————————————— البنر ————————————————————————— */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--navy-deep);
  color: #fff;
  isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: -3; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* طبقة تعتيم متدرّجة تُبقي النص مقروءًا فوق أي صورة. */
.hero__veil {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(to bottom, rgba(22,38,60,.78) 0%, rgba(22,38,60,.62) 45%, rgba(22,38,60,.92) 100%),
    radial-gradient(120% 80% at 70% 20%, rgba(207,179,129,.20), transparent 60%);
}

/* شبكة ضوئية بطيئة تعطي إحساس العمق بلا استهلاك معالج. */
.hero__aurora {
  position: absolute; inset: -20%; z-index: -1;
  background:
    radial-gradient(38% 44% at 22% 32%, rgba(207,179,129,.26), transparent 62%),
    radial-gradient(34% 40% at 78% 62%, rgba(47,76,116,.55), transparent 64%);
  filter: blur(28px);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.09); }
}

.hero__inner { text-align: center; padding-block: calc(var(--header-h) + 40px) 90px; }

.hero__logo {
  width: min(180px, 46vw);
  margin-inline: auto;
  margin-block-end: 26px;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, .45));
}

.hero__title {
  font-size: clamp(2rem, 5.6vw, 4.1rem);
  font-weight: 800;
  line-height: 1.22;
  margin-block-end: 18px;
}
.hero__title .accent {
  background: linear-gradient(100deg, var(--gold-light), var(--gold), var(--gold-light));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.hero__lede {
  max-width: 660px;
  margin-inline: auto;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, .84);
  margin-block-end: 34px;
}

.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

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

.section { padding-block: clamp(70px, 9vw, 130px); position: relative; }
.section--mist { background: var(--navy-mist); }
.section--navy { background: var(--navy-deep); color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; letter-spacing: .18em;
  color: var(--gold-deep);
  margin-block-end: 14px;
}
.eyebrow::before { content: ''; width: 26px; height: 1.5px; background: var(--gold); }
.section--navy .eyebrow { color: var(--gold-light); }

.section__title {
  font-size: clamp(1.6rem, 3.4vw, 2.7rem);
  color: var(--navy);
  margin-block-end: 16px;
}
.section--navy .section__title { color: #fff; }

.section__lede { max-width: 680px; color: var(--muted); font-size: 17px; }
.section--navy .section__lede { color: rgba(255,255,255,.76); }

.section__head { margin-block-end: 52px; }
.section__head--center { text-align: center; }
.section__head--center .section__lede { margin-inline: auto; }

/* ————————————————————————— المبادئ ————————————————————————— */

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.principle {
  position: relative;
  padding: 34px 30px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease),
              border-color .45s var(--ease);
}
.principle::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-mid), var(--gold-light));
  transform: scaleX(0);
  transform-origin: var(--nav-origin, right);
  transition: transform .5s var(--ease);
}
.principle:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: transparent; }
.principle:hover::before { transform: scaleX(1); }

.principle__icon {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  margin-block-end: 20px;
  background: linear-gradient(140deg, rgba(34,56,88,.08), rgba(207,179,129,.16));
  color: var(--navy);
  transition: transform .45s var(--ease);
}
.principle:hover .principle__icon { transform: rotate(-6deg) scale(1.06); }
.principle__icon svg { width: 26px; height: 26px; }

.principle__title { font-size: 18px; color: var(--navy); margin-block-end: 8px; }
.principle__text  { color: var(--muted); font-size: 15px; }

/* ————————————————————————— الرؤية ————————————————————————— */

.vision { position: relative; overflow: hidden; }
.vision__grid {
  display: grid;
  gap: 54px;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
}
.vision__quote {
  position: relative;
  padding-inline-start: 30px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.75;
}
.vision__quote::before {
  content: '';
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}
.vision__body { margin-block-start: 22px; color: rgba(255,255,255,.74); font-size: 16.5px; }

.stats { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.stat {
  padding: 26px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.stat:hover { background: rgba(255,255,255,.09); transform: translateY(-5px); }
.stat__num {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1.1;
}
.stat__label { font-size: 13px; color: rgba(255,255,255,.62); margin-block-start: 6px; }

/* ————————————— العلامات التجارية: شريط متحرك ————————————— */

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  gap: 26px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
/* الاتجاه ثابت بصريًا في اللغتين: الشعارات تسير يسارًا دائمًا. */

.brandcard {
  flex: 0 0 auto;
  width: 210px;
  padding: 26px 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  gap: 14px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.brandcard:hover { transform: translateY(-7px) scale(1.02); box-shadow: var(--shadow); }
.brandcard__logo {
  height: 62px; width: auto; object-fit: contain;
  filter: grayscale(1); opacity: .62;
  transition: filter .4s var(--ease), opacity .4s var(--ease);
}
.brandcard:hover .brandcard__logo { filter: none; opacity: 1; }
.brandcard__name { font-size: 13.5px; font-weight: 700; color: var(--navy); text-align: center; }

/* ————————————— الاستثمارات: بطاقات عائمة ————————————— */

.sectors { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.sector {
  position: relative;
  padding: 32px 26px 30px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  animation: float 7s ease-in-out infinite;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
/* كل بطاقة تعوم بإيقاع مختلف قليلًا فلا تبدو الحركة آلية. */
.sector:nth-child(2) { animation-delay: -1.6s; }
.sector:nth-child(3) { animation-delay: -3.2s; }
.sector:nth-child(4) { animation-delay: -4.8s; }
.sector:nth-child(5) { animation-delay: -2.4s; }
@keyframes float { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-9px); } }

.sector::after {
  content: '';
  position: absolute;
  inset-block-start: -60%;
  inset-inline-end: -30%;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(207,179,129,.22), transparent 68%);
  z-index: -1;
  transition: transform .6s var(--ease);
}
.sector:hover { transform: translateY(-14px); box-shadow: var(--shadow-lg); animation-play-state: paused; }
.sector:hover::after { transform: scale(1.7); }

.sector__icon {
  display: grid; place-items: center;
  width: 62px; height: 62px;
  border-radius: 20px;
  margin-block-end: 22px;
  background: linear-gradient(145deg, var(--navy), var(--navy-soft));
  color: var(--gold-light);
  box-shadow: 0 10px 24px rgba(34,56,88,.24);
  transition: transform .5s var(--ease);
}
.sector:hover .sector__icon { transform: translateY(-4px) rotate(-8deg); }
.sector__icon svg { width: 30px; height: 30px; }

.sector__title { font-size: 19px; color: var(--navy); margin-block-end: 10px; }
.sector__text  { color: var(--muted); font-size: 14.5px; }

/* ————————————————————————— شريط الدعوة ————————————————————————— */

.cta {
  position: relative;
  padding: clamp(44px, 6vw, 70px);
  border-radius: var(--radius-lg);
  background: linear-gradient(130deg, var(--navy-deep), var(--navy) 55%, var(--navy-soft));
  color: #fff;
  overflow: hidden;
  text-align: center;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 100% at 20% 0%, rgba(207,179,129,.26), transparent 62%);
}
.cta > * { position: relative; }
.cta__title { font-size: clamp(1.4rem, 3vw, 2.2rem); margin-block-end: 14px; }
.cta__text  { color: rgba(255,255,255,.78); max-width: 560px; margin-inline: auto; margin-block-end: 28px; }

/* ————————————————————————— الذيل ————————————————————————— */

.footer { background: var(--navy-deep); color: rgba(255,255,255,.72); padding-block: 70px 0; }

.footer__grid {
  display: grid;
  gap: 44px;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  padding-block-end: 48px;
}
.footer__logo { height: 52px; width: auto; margin-block-end: 18px; }
.footer__about { font-size: 14.5px; line-height: 1.9; }

.footer__title {
  font-size: 14px; font-weight: 800; color: #fff;
  margin-block-end: 18px; letter-spacing: .04em;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer__list a {
  font-size: 14.5px;
  transition: color .25s var(--ease), padding-inline-start .25s var(--ease);
}
.footer__list a:hover { color: var(--gold-light); padding-inline-start: 6px; }

.footer__meta { font-size: 13.5px; display: grid; gap: 8px; }
.footer__meta b { color: rgba(255,255,255,.9); font-weight: 700; }

.footer__bar {
  border-block-start: 1px solid rgba(255,255,255,.1);
  padding-block: 22px;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  font-size: 13px;
}

/* ————————————————————————— ظهور عند التمرير ————————————————————————— */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
/* التتابع يعطي إحساس الترتيب بدل ظهور كل شيء دفعة واحدة. */
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* ————————————————————————— الاستجابة ————————————————————————— */

@media (max-width: 1000px) {
  .vision__grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .nav { display: none; }
  .burger { display: block; margin-inline-start: auto; }
  .header__cta { display: none; }
  .langfab { inset-block-start: auto; inset-block-end: 22px; transform: none; flex-direction: row; }
  .langfab__globe { display: none; }
}

@media (max-width: 620px) {
  .container { padding-inline: 18px; }
  .footer__grid { grid-template-columns: 1fr; gap: 34px; }
  .stats { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
}

/* من يطلب تقليل الحركة من نظامه، يُحترم طلبه. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ————————————— شعار الترويسة: أبيض فوق البنر، وذهبي بعده ————————————— */

.brand__mark--light, .brand__mark--dark {
  transition: opacity .35s var(--ease), height .35s var(--ease);
}
.brand__mark--dark { position: absolute; }
.header.is-over-hero .brand__mark--light { opacity: 1; }
.header.is-over-hero .brand__mark--dark  { opacity: 0; }
.header:not(.is-over-hero) .brand__mark--light { opacity: 0; }
.header:not(.is-over-hero) .brand__mark--dark  { opacity: 1; }
.brand { position: relative; }

/* زر زجاجي فوق البنر الداكن */
.btn--glass {
  --btn-bg: rgba(255, 255, 255, .1);
  --btn-fg: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn--glass::before { background: rgba(255, 255, 255, .96); }
.btn--glass:hover { --btn-fg: var(--navy); }

/* بطاقات الرؤية: العنوان فيها كلمة لا رقم، فيُصغَّر ليتّسع */
.stat__num { font-size: clamp(1rem, 1.7vw, 1.15rem); letter-spacing: -.005em; }
.stat__label { line-height: 1.6; }

/* ————————————— البنر بلا صورة —————————————
   شعار البنر نفسه هو الشعار الأبيض بشعاره النصي، فلا داعي لصورة خلفه.
   الخلفية تدرّج كحلي + أشعّة خفيفة تنبع من خلف الشعار. */

.hero { background: radial-gradient(120% 90% at 50% 18%, #1e3454 0%, #16263c 55%, #101c2e 100%); }
.hero__veil { background: radial-gradient(70% 55% at 50% 34%, rgba(207,179,129,.10), transparent 70%); }

.hero__rays {
  position: absolute;
  inset-block-start: -10%;
  inset-inline-start: 50%;
  width: min(1100px, 130vw);
  aspect-ratio: 1;
  translate: -50% 0;
  z-index: -1;
  background: conic-gradient(from 200deg at 50% 42%,
    transparent 0deg, rgba(207,179,129,.09) 12deg, transparent 26deg,
    transparent 60deg, rgba(207,179,129,.07) 72deg, transparent 88deg,
    transparent 250deg, rgba(207,179,129,.08) 262deg, transparent 278deg,
    transparent 340deg, rgba(207,179,129,.06) 350deg, transparent 360deg);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 40%, #000 25%, transparent 75%);
  mask-image: radial-gradient(60% 60% at 50% 40%, #000 25%, transparent 75%);
  animation: sweep 40s linear infinite;
}
@keyframes sweep { to { rotate: 360deg; } }

/* الشعار هو بطل الصفحة، فيأخذ حجمه */
.hero__logo {
  width: min(520px, 78vw);
  margin-block-end: 34px;
  filter: drop-shadow(0 18px 46px rgba(0, 0, 0, .5));
}

/* القائمة المخفية لا تُرى ولا تُلتقط باللمس.
   بدون هذا، تبديل اللغة يقلب جهة إخفائها فتعبر الشاشة أمام الزائر. */
.drawer {
  visibility: hidden;
  transition: transform .45s var(--ease), visibility 0s linear .45s;
}
.drawer.is-open {
  visibility: visible;
  transition: transform .45s var(--ease), visibility 0s linear 0s;
}

/* ═══════════════════════════════════════════════════════════════════
   النماذج
   ═══════════════════════════════════════════════════════════════════ */

.pagehead {
  position: relative;
  padding-block: calc(var(--header-h) + 70px) 64px;
  background: linear-gradient(150deg, var(--navy-deep), var(--navy) 60%, var(--navy-soft));
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.pagehead::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 90% at 78% 0%, rgba(207,179,129,.20), transparent 62%),
    radial-gradient(50% 70% at 10% 100%, rgba(47,76,116,.7), transparent 65%);
}
.pagehead__title { font-size: clamp(1.8rem, 4vw, 3rem); margin-block-end: 12px; }
.pagehead__lede  { max-width: 640px; color: rgba(255,255,255,.8); font-size: 17px; }

.formwrap {
  max-width: 880px;
  margin-inline: auto;
  margin-block-start: -46px;
  position: relative;
  z-index: 2;
  padding: clamp(26px, 4vw, 46px);
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.formnote {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px;
  margin-block-end: 26px;
  border-radius: var(--radius-sm);
  background: var(--navy-mist);
  border-inline-start: 3px solid var(--gold);
  font-size: 13.5px;
  color: var(--muted);
}

.fields { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.field--wide { grid-column: 1 / -1; }

.field { display: grid; gap: 8px; }
.field__label {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--navy);
}
.req  { color: #b3261e; font-weight: 800; }
.tag  {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px;
  background: var(--navy-mist); color: var(--muted);
}
.field__hint { font-size: 12.5px; color: var(--muted); line-height: 1.65; }

.input, .select, .textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  outline: 0;
  border-color: var(--navy-soft);
  box-shadow: 0 0 0 4px rgba(47, 76, 116, .12);
}
.textarea { min-height: 148px; resize: vertical; line-height: 1.8; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6b7e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 18px;
  background-position: left 16px center;
  padding-inline-end: 16px;
  padding-inline-start: 44px;
}
html[dir="ltr"] .select { background-position: right 16px center; }

/* أرقام الهاتف تُقرأ يسارًا حتى في الواجهة العربية */
.input--ltr { direction: ltr; text-align: start; }
html[dir="rtl"] .input--ltr { text-align: right; }

.field.is-bad .input,
.field.is-bad .select,
.field.is-bad .textarea,
.field.is-bad .drop { border-color: #d9534f; background: #fff8f7; }

.field__err {
  display: none;
  align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: #b3261e;
}
.field.is-bad .field__err { display: flex; }

.counter { font-size: 12px; color: var(--muted); text-align: start; }
.counter.is-near { color: var(--gold-deep); font-weight: 700; }
.counter.is-over { color: #b3261e; font-weight: 700; }

/* ————————————————————————— المرفقات ————————————————————————— */

.drop {
  position: relative;
  display: grid; place-items: center; gap: 8px;
  padding: 26px 18px;
  text-align: center;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  background: #fcfdff;
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease),
              transform .25s var(--ease);
}
.drop:hover, .drop.is-over {
  border-color: var(--gold-mid);
  background: #fffdf8;
  transform: translateY(-2px);
}
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(140deg, rgba(34,56,88,.08), rgba(207,179,129,.2));
  color: var(--navy);
}
.drop__icon svg { width: 22px; height: 22px; }
.drop__text  { font-size: 14px; font-weight: 700; color: var(--navy); }
.drop__meta  { font-size: 12px; color: var(--muted); }

.files { display: grid; gap: 8px; margin-block-start: 10px; }
.file {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--navy-mist);
  border: 1px solid var(--line);
  animation: filein .35s var(--ease);
}
@keyframes filein { from { opacity: 0; transform: translateY(-6px); } }
.file.is-bad { background: #fff5f4; border-color: #f3c9c6; }
.file__ext {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--navy); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
}
.file.is-bad .file__ext { background: #b3261e; }
.file__body { min-width: 0; flex: 1; }
.file__name {
  font-size: 13.5px; font-weight: 600; color: var(--navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file__meta { font-size: 11.5px; color: var(--muted); }
.file.is-bad .file__meta { color: #b3261e; font-weight: 600; }
.file__x {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.file__x:hover { background: #fff; color: #b3261e; }

.form__actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-block-start: 30px;
  padding-block-start: 26px;
  border-block-start: 1px solid var(--line);
}

/* ————————————————————————— بعد الإرسال ————————————————————————— */

.done {
  display: none;
  text-align: center;
  padding: 40px 20px;
}
.done.is-on { display: block; animation: filein .5s var(--ease); }
.done__mark {
  display: grid; place-items: center;
  width: 74px; height: 74px; border-radius: 50%;
  margin-inline: auto; margin-block-end: 20px;
  background: linear-gradient(140deg, var(--gold-mid), var(--gold-light));
  color: #fff;
}
.done__mark svg { width: 34px; height: 34px; }
.done__title { font-size: 21px; color: var(--navy); margin-block-end: 8px; }
.done__text  { color: var(--muted); }

@media (max-width: 720px) {
  .fields { grid-template-columns: 1fr; }
  .formwrap { margin-block-start: -30px; border-radius: var(--radius); }
}

/* ═══════════════════════════════════════════════════════════════════
   العلامات التجارية
   ═══════════════════════════════════════════════════════════════════ */

.brandgrid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

.brandbig {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 26px;
  align-items: center;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease),
              border-color .5s var(--ease);
}
.brandbig::after {
  content: '';
  position: absolute; inset-block-start: -50%; inset-inline-start: -20%;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(207,179,129,.16), transparent 68%);
  z-index: -1;
  transition: transform .7s var(--ease);
}
.brandbig:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.brandbig:hover::after { transform: scale(1.6); }

.brandbig__logo {
  display: grid; place-items: center;
  min-height: 130px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--navy-mist);
}
.brandbig__logo img { max-height: 96px; width: auto; object-fit: contain; }

/* يظهر بدل الشعار إن لم يُرفع ملفه بعد */
.brandbig__fallback {
  font-size: 22px; font-weight: 800; letter-spacing: .1em;
  color: var(--navy); opacity: .35;
}

.brandbig__tag {
  display: inline-block;
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em;
  color: var(--gold-deep);
  margin-block-end: 8px;
}
.brandbig__name { font-size: 26px; color: var(--navy); margin-block-end: 10px; }
.brandbig__text { color: var(--muted); font-size: 15px; margin-block-end: 20px; }
.brandbig__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.brandbig__actions .btn { padding: 11px 20px; font-size: 13.5px; }

/* ————————————— صفحة العلامة الواحدة ————————————— */

.brandhead__inner {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 40px;
  align-items: center;
}
.brandhead__plate {
  display: grid; place-items: center;
  min-height: 180px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
}
.brandhead__plate img { max-height: 120px; width: auto; object-fit: contain; }
.brandhead__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-block-start: 24px; }

.brandbody {
  display: grid;
  grid-template-columns: 1.5fr .9fr;
  gap: 50px;
  align-items: start;
}
.brandbody__p { color: var(--muted); font-size: 16.5px; margin-block-start: 18px; }

.brandpoints {
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  background: var(--navy-mist);
  border: 1px solid var(--line);
  position: sticky;
  inset-block-start: calc(var(--header-h) + 20px);
}
.brandpoints__title { font-size: 16px; color: var(--navy); margin-block-end: 18px; }
.brandpoints__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.brandpoints__list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14.5px; color: var(--ink); line-height: 1.6;
}
.brandpoints__list svg { flex: 0 0 auto; margin-block-start: 4px; color: var(--gold); }

@media (max-width: 900px) {
  .brandgrid { grid-template-columns: 1fr; }
  .brandhead__inner, .brandbody { grid-template-columns: 1fr; gap: 30px; }
  .brandpoints { position: static; }
}
@media (max-width: 560px) {
  .brandbig { grid-template-columns: 1fr; padding: 22px; }
}

/* ═══════════════════════════════════════════════════════════════════
   من نحن · السياسة
   ═══════════════════════════════════════════════════════════════════ */

.aboutgrid { display: grid; grid-template-columns: 1.5fr .9fr; gap: 54px; align-items: start; }
.aboutgrid__p { color: var(--muted); font-size: 16.5px; margin-block-start: 20px; }

.entitycard {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--navy-mist);
  border: 1px solid var(--line);
  position: sticky;
  inset-block-start: calc(var(--header-h) + 20px);
}
.entitycard__logo { height: 46px; width: auto; margin-block-end: 22px; }
.entitycard__title { font-size: 15px; color: var(--navy); margin-block-end: 20px; }
.entitycard__list { margin: 0; display: grid; gap: 16px; }
.entitycard__list dt {
  font-size: 12px; font-weight: 800; letter-spacing: .06em;
  color: var(--gold-deep); margin-block-end: 3px;
}
.entitycard__list dd { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--navy); }
.entitycard__list dd.num { direction: ltr; text-align: start; letter-spacing: .02em; }
html[dir="rtl"] .entitycard__list dd.num { text-align: right; }
.entitycard__list a { color: var(--navy); border-block-end: 1px solid var(--gold-mid); }

/* بطاقات المبادئ في «من نحن» بلا أيقونات، فتُزال مساحتها */
.aboutgrid + * .principle__title, .section .principle > .principle__title:first-child {
  margin-block-start: 0;
}

.policy {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(28px, 4vw, 52px);
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.policy__item { padding-block-end: 28px; margin-block-end: 28px; border-block-end: 1px solid var(--line); }
.policy__item--last { padding-block-end: 0; margin-block-end: 0; border-block-end: 0; }
.policy__title {
  font-size: 18px; color: var(--navy); margin-block-end: 10px;
  display: flex; align-items: baseline; gap: 10px;
}
.policy__text { color: var(--muted); font-size: 15.5px; }
.policy__mail {
  display: inline-block;
  margin-block-start: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--navy-mist);
  color: var(--navy);
  font-weight: 700; font-size: 14px;
  direction: ltr;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.policy__mail:hover { background: var(--navy); color: #fff; }

@media (max-width: 900px) {
  .aboutgrid { grid-template-columns: 1fr; gap: 32px; }
  .entitycard { position: static; }
}

/* زر الإغلاق داخل القائمة: يظهر دائمًا وشكله × لا ثلاثة خطوط. */
.burger--close { display: block; }
.burger--close span { background: var(--navy) !important; }
.burger--close span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger--close span:nth-child(2) { opacity: 0; }
.burger--close span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* شريط تنبيه أعلى النموذج حين يرفض الخادمُ الإرسال. */
.formalert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px;
  margin-block-end: 18px;
  border-radius: var(--radius-sm);
  background: #fff5f4;
  border-inline-start: 3px solid #d9534f;
  color: #8f1f1a;
  font-size: 14px;
  font-weight: 600;
}

/* ————————————— بديل شعار العلامة —————————————
   يظهر ريثما يصل ملف الشعار، بلونَي العلامة نفسها لا بلون رمادي محايد. */

.brandmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 22px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--tint) 12%, #fff);
  border: 1.5px solid color-mix(in srgb, var(--tint) 36%, #fff);
  line-height: 1.15;
}
.brandmark__en {
  font-size: 19px; font-weight: 800; letter-spacing: .14em;
  color: var(--ink);
}
.brandmark__ar {
  font-size: 14px; font-weight: 700;
  color: var(--tint);
}

/* أحجام صور الشعارات في المواضع الثلاثة */
.brandbig__img  { max-height: 96px;  width: auto; object-fit: contain; }
.brandhead__img { max-height: 120px; width: auto; object-fit: contain; }
