/* ==========================================================================
   مؤسسة مدار الريادة — main stylesheet
   ========================================================================== */

:root {
  --ink: #0A0A0A;
  --white: #FFFFFF;
  --gold: #99896B;
  --gold-light: #B3A482;
  --gold-tint: #F5F1EA;
  --muted: #555555;
  --body: #333333;
  --line: #E5E5E5;
  --soft: #F4F4F4;
  --soft-2: #F7F7F5;
  --container: 1200px;
  --font-display: 'Alexandria', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-num: 'Inter Tight', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-align: justify; text-justify: inter-word; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

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

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

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 10px 18px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Shared section heading ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-weight: 600; font-size: 15px; text-align: start;
}
.eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--gold); flex: none; }
.eyebrow--gold { color: var(--gold); }
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 3.4vw, 44px); line-height: 1.3;
}
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.lead-muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 5; }
.nav-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  padding: 26px 0; border-bottom: 1px solid rgba(255,255,255,0.18);
}
.brand-link { display: flex; align-items: center; min-height: 44px; }
.brand-link img { height: 34px; width: auto; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 28px; font-size: 16px; }
.main-nav a { color: var(--white); text-decoration: none; }
.main-nav a:hover { color: var(--gold-light); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.btn-pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 22px;
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px;
  transition: background .25s ease, color .25s ease;
}
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--gold-tint); color: var(--ink); }
.btn-gold { background: var(--gold); color: var(--ink); min-height: 52px; padding: 0 28px; font-size: 17px; }
.btn-gold:hover { background: var(--gold-light); color: var(--ink); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35); background: transparent; color: var(--white);
  align-items: center; justify-content: center; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; min-height: 780px;
  display: flex; flex-direction: column; color: var(--white); background: var(--ink);
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; animation: slowzoom 24s ease-out forwards; }
.hero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.45) 100%);
}
.hero__body { position: relative; flex-grow: 1; display: flex; align-items: flex-end; padding: 0 24px 168px; }
.hero__content { max-width: var(--container); width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); font-weight: 600; font-size: 15px; }
.hero__eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--gold); }
.hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(42px, 5.6vw, 84px); line-height: 1.1; }
.hero h1 span { color: var(--gold); }
.hero__lead { font-size: clamp(18px, 1.6vw, 22px); color: #E5E5E5; max-width: 34em; }
.hero__cta { padding-top: 12px; }
@keyframes slowzoom { from { transform: scale(1); } to { transform: scale(1.08); } }

/* ---------- Stats ---------- */
.stats { position: relative; z-index: 2; margin-top: -120px; padding: 0 24px 88px; }
.stats__card {
  max-width: var(--container); margin: 0 auto; background: var(--white); border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.06); overflow: hidden;
  border-top: 4px solid var(--gold);
}
.stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px 0; }
.stat { display: flex; flex-direction: column; gap: 18px; padding: 36px 32px; border-inline-end: 1px solid #EEEEEE; }
.stat:last-child { border-inline-end: 0; }
.stat__icon {
  width: 56px; height: 56px; border-radius: 16px; background: var(--gold-tint);
  display: inline-flex; align-items: center; justify-content: center;
}
.stat__num {
  align-self: flex-start; direction: ltr; font-family: var(--font-num); font-weight: 800;
  font-size: clamp(60px, 5.6vw, 84px); line-height: 0.95; letter-spacing: -0.02em;
}
.stat__num span { color: var(--gold); }
.stat__text { display: flex; flex-direction: column; gap: 2px; }
.stat__text strong { font-weight: 700; font-size: 18px; }
.stat__text span { color: var(--muted); font-size: 15px; }

/* ---------- About ---------- */
.about__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 64px;
  align-items: center; padding: 32px 0 112px;
}
.about__text { display: flex; flex-direction: column; gap: 20px; }
.about__text p { color: var(--muted); max-width: 36em; }
.about__visual { display: flex; justify-content: center; padding: 24px 0 40px; }
.about__visual img { width: 100%; max-width: 600px; }

/* ---------- Brands ---------- */
.brands { background: var(--soft); }
.brands__inner { padding: 104px 0; display: flex; flex-direction: column; gap: 48px; }
.brands__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.legend { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.brands__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.brand-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: var(--ink);
  transition: transform .3s ease, box-shadow .3s ease;
}
.brand-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.08); color: var(--ink); }
.brand-card__logo {
  height: 150px; border-radius: 12px; background: var(--soft-2);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.brand-card__logo img { width: auto; height: auto; max-width: 72%; }
.brand-card__meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.tag { border: 1px solid #D4D4D4; border-radius: 999px; padding: 2px 12px; font-size: 13px; color: var(--muted); }
.partner {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: 999px;
  background: var(--gold); color: var(--white); font-size: 13px; font-weight: 700;
}
.brand-card__desc {
  color: var(--body); flex-grow: 1; font-size: 15px; line-height: 1.8; min-height: 3.6em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.brand-card__link { font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }
.arrow-circle {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
  transition: transform .3s ease;
}
.brand-card:hover .arrow-circle { transform: translateX(-4px); }

/* ---------- Values ---------- */
.values { position: relative; overflow: hidden; background: var(--ink); color: var(--white); }
.values__bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center;
  filter: grayscale(1) contrast(1.35) brightness(0.75); opacity: 0.6;
}
.values__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, var(--ink) 0%, rgba(10,10,10,0.35) 22%, rgba(10,10,10,0.35) 75%, var(--ink) 100%),
    linear-gradient(to left, var(--ink) 0%, rgba(10,10,10,0.75) 38%, rgba(10,10,10,0.1) 70%, rgba(10,10,10,0.3) 100%);
}
.values__inner { position: relative; padding: 120px 0; display: flex; flex-direction: column; gap: 56px; }
.values__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.value { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid rgba(255,255,255,0.25); padding-top: 24px; }
.value__top { display: flex; justify-content: space-between; align-items: center; }
.value__num { font-family: var(--font-num); color: var(--gold); font-size: 15px; font-weight: 600; }
.value h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.value p { color: #D4D4D4; text-align: start; }

/* ---------- Clients ---------- */
.clients__inner { padding: 96px 0; display: flex; flex-direction: column; gap: 32px; }
.clients__grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.clients__more { margin-top: 10px; }
.clients__more[hidden] { display: none; }
.client {
  height: 84px; border: 1px solid #EAEAEA; border-radius: 12px; background: var(--white);
  display: flex; align-items: center; justify-content: center; padding: 10px;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.client:hover { border-color: var(--gold); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.client img { max-width: 100%; height: auto; }
.clients__toggle-wrap { display: flex; justify-content: center; padding-top: 28px; }
.more-btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding-block: 0; padding-inline: 26px 12px;
  border-radius: 999px; border: 1px solid var(--gold); background: var(--white); color: var(--ink);
  font-weight: 600; font-size: 15px; cursor: pointer; transition: background .25s ease;
}
.more-btn:hover { background: var(--gold-tint); }
.more-btn__icon {
  width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
}
.more-btn__icon svg { transition: transform .3s ease; }
.more-btn[aria-expanded="true"] .more-btn__icon svg { transform: rotate(180deg); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #D4D4D4; border-top: 3px solid var(--gold); }
.footer__inner {
  padding: 56px 0 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 32px; font-size: 15px;
}
.footer__logo img { height: 96px; width: auto; }
.footer__info { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; margin-inline-start: auto; }
.footer__about { color: #B5B5B5; font-size: 15px; line-height: 1.9; text-align: left; white-space: nowrap; }
.footer__mail {
  display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none;
  font-family: var(--font-num); font-weight: 400; font-size: 17px; min-height: 44px; direction: ltr;
}
.site-footer a:hover { color: var(--gold); }
.social { display: flex; gap: 10px; }
.social a {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2);
  display: inline-flex; align-items: center; justify-content: center; color: var(--white);
  transition: border-color .25s ease, color .25s ease;
}
.social a:hover { border-color: var(--gold); }
.footer__copy {
  width: 100%; border-top: 1px solid rgba(255,255,255,0.14); padding-top: 24px;
  font-size: 14px; color: #B5B5B5; text-align: start;
}

/* ---------- Language switch ---------- */
.lang-switch { color: var(--white); text-decoration: none; font-size: 15px; font-weight: 500; }
.lang-switch:hover { color: var(--gold-light); }

/* ---------- English (left-to-right) adjustments ---------- */
[dir="ltr"] body, html[dir="ltr"] { font-family: var(--font-body); }
[dir="ltr"] p { text-align: left; hyphens: manual; }
@media (min-width: 861px) { [dir="ltr"] .about__text p { text-align: justify; } }
[dir="ltr"] .hero h1, [dir="ltr"] .section-title { letter-spacing: -0.01em; }
[dir="ltr"] .values__bg { transform: scaleX(-1); }
[dir="ltr"] .values__shade {
  background:
    linear-gradient(to bottom, var(--ink) 0%, rgba(10,10,10,0.35) 22%, rgba(10,10,10,0.35) 75%, var(--ink) 100%),
    linear-gradient(to right, var(--ink) 0%, rgba(10,10,10,0.75) 38%, rgba(10,10,10,0.1) 70%, rgba(10,10,10,0.3) 100%);
}
[dir="ltr"] .brand-card:hover .arrow-circle { transform: translateX(4px); }
[dir="ltr"] .footer__about { text-align: right; }
[dir="ltr"] .footer__mail { direction: ltr; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .clients__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .brand-card__desc { display: block; -webkit-line-clamp: unset; overflow: visible; min-height: 0; }
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-inline-end: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid #EEEEEE; }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    display: none; width: 100%; order: 3;
    background: rgba(10,10,10,0.92); border-radius: 18px; padding: 16px 20px;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { display: block; padding: 10px 0; }
  .nav-actions .btn-light { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: 680px; }
  .hero__body { padding-bottom: 150px; }
  .stats { margin-top: -100px; padding-bottom: 64px; }
  .stat { padding: 24px 20px; gap: 12px; }
  .stat__num { font-size: 52px; }
  .stat__icon { width: 48px; height: 48px; }
  .about__grid { gap: 32px; padding-bottom: 72px; grid-template-columns: 1fr; }
  .brands__inner, .clients__inner { padding: 72px 0; }
  .values__inner { padding: 80px 0; }
  .clients__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__info { align-items: flex-start; margin-inline-start: 0; }
  .footer__about, [dir="ltr"] .footer__about { white-space: normal; text-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg img { animation: none; }
  .brand-card, .arrow-circle, .client, .more-btn__icon svg { transition: none; }
}
