/* ==========================================================
   Version 01 — Cinematic Impact
   Hero + floating navigation + floating impact card
   ========================================================== */

:root {
  --navy: #0b202c;
  --teal: #123b40;
  --mint: #a3e2ce;
  --offwhite: #f5f6f2;
  --white: #ffffff;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --font-ui: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif;
}

body { font-family: var(--font-ui); background-color: var(--offwhite); }

/* أي قسم يُفتح بالرابط يجب ألا يختبئ خلف الشريط العلوي */
#platforms,
#top { scroll-margin-top: calc(var(--nav-h) + 12px); }

.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;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  padding: 14px clamp(12px, 2.4vw, 32px);
  transition: padding 0.45s var(--ease);
  pointer-events: none;
}
.nav__bar {
  pointer-events: auto;
  max-width: 1360px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 10px 8px 12px;
  border-radius: 22px;
  background: rgba(11, 32, 44, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease),
              box-shadow 0.45s var(--ease), border-radius 0.45s var(--ease);
}
.nav.is-solid { padding-top: 8px; }
.nav.is-solid .nav__bar {
  background: rgba(11, 32, 44, 0.96);
  border-color: rgba(163, 226, 206, 0.12);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.6);
}

.nav__brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav__brand > div { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav__brand > div > div { width: 68px !important; height: 46px !important; flex-shrink: 0; border-radius: 14px !important; box-shadow: none !important; }

.nav__links {
  display: none; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none;
}
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.82);
  text-decoration: none; white-space: nowrap;
  transition: color 0.25s, background 0.25s;
}
.nav__link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav__link[aria-current='true'] { color: var(--navy); background: var(--mint); font-weight: 600; }
.nav__link[data-soon] { cursor: default; }
.nav__soon {
  font-size: 10px; font-weight: 600; letter-spacing: 0; padding: 1px 7px; border-radius: 999px;
  color: var(--mint); border: 1px solid rgba(163, 226, 206, 0.4);
}
.nav__link[aria-current='true'] .nav__soon { color: var(--navy); border-color: rgba(11, 32, 44, 0.35); }

.nav__live {
  display: none; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 10px 18px; border-radius: 999px;
  background: var(--white); color: var(--navy);
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: background 0.25s, transform 0.25s var(--ease);
}
.nav__live:hover { background: var(--mint); transform: translateY(-1px); }
.nav__live-dot { width: 7px; height: 7px; border-radius: 50%; background: #1f9d74; box-shadow: 0 0 0 0 rgba(31, 157, 116, 0.6); animation: live-ring 2.4s infinite; }
@keyframes live-ring { 70% { box-shadow: 0 0 0 7px rgba(31, 157, 116, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 116, 0); } }

/* version switch (V1 / V2) */
.nav__ver { display: inline-flex; gap: 2px; padding: 3px; flex-shrink: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
.nav__ver a { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 34px; padding: 0 12px;
  border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: rgba(255, 255, 255, 0.8); text-decoration: none;
  transition: background .25s, color .25s; }
.nav__ver a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.nav__ver a[aria-current='page'] { background: var(--mint); color: var(--navy); }
.nav__ver a:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.nav__end { display: flex; align-items: center; gap: 10px; }

.nav__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  color: #fff; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
}
.nav__toggle svg { width: 22px; height: 22px; }

.nav__panel {
  pointer-events: auto;
  max-width: 1360px; margin: 8px auto 0;
  display: none; flex-direction: column; gap: 4px; padding: 12px;
  border-radius: 22px;
  background: rgba(11, 32, 44, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.nav__panel.is-open { display: flex; }
.nav__panel .nav__link { padding: 14px 16px; font-size: 16px; border-radius: 14px; min-height: 48px; justify-content: space-between; }
.nav__panel .nav__live { display: inline-flex; justify-content: center; margin-top: 6px; min-height: 48px; }

@media (min-width: 1240px) {
  .nav__links { display: flex; }
  .nav__live { display: inline-flex; }
  .nav__toggle, .nav__panel { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(92vh, 960px); min-height: min(92svh, 960px);
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
  background: linear-gradient(120deg, var(--teal) 0%, var(--navy) 70%);
}
.hero__media { position: absolute; inset: -6% 0; z-index: -3; will-change: transform; }
.hero__img {
  width: 100%; height: 100%; object-fit: cover; object-position: 38% 55%;
  animation: img-reveal 1.8s var(--ease) both;
}
@keyframes img-reveal { from { opacity: 0; transform: scale(1.09); } to { opacity: 1; transform: scale(1); } }

/* تدرج أزرق/تيل على جهة النص (اليمين) فقط، ويُترك باقي الصورة مفتوحًا */
.hero__shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(to left, rgba(11, 32, 44, 0.9) 0%, rgba(11, 32, 44, 0.72) 30%, rgba(18, 59, 64, 0.28) 58%, rgba(18, 59, 64, 0) 78%),
    linear-gradient(to top, rgba(11, 32, 44, 0.55) 0%, rgba(11, 32, 44, 0) 38%),
    linear-gradient(to bottom, rgba(11, 32, 44, 0.45) 0%, rgba(11, 32, 44, 0) 22%);
}

.hero__inner {
  width: 100%; max-width: 1360px; margin-inline: auto;
  padding: calc(var(--nav-h) + 56px) clamp(20px, 4vw, 56px) clamp(56px, 9vh, 96px);
  display: grid; gap: 40px;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

.hero__content { max-width: 640px; }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: clamp(13px, 1.1vw, 15px); font-weight: 500; letter-spacing: 0.02em;
  color: var(--mint);
  margin-bottom: 20px;
}
.hero__eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--mint); opacity: 0.8; }

.hero__title {
  margin: 0; font-weight: 700; line-height: 1.18; letter-spacing: -0.01em;
  font-size: clamp(3rem, 7.2vw, 6.25rem);
}
.hero__title .line { display: block; overflow: hidden; padding-block: 0.04em; }
.hero__title .line > span { display: inline-block; animation: line-up 1s var(--ease) both; }
.hero__title .line:nth-child(1) > span { animation-delay: 0.35s; }
.hero__title .line:nth-child(2) > span { animation-delay: 0.5s; color: var(--mint); }
@keyframes line-up { from { transform: translateY(110%); opacity: 0; } to { transform: none; opacity: 1; } }

.hero__org {
  margin: 10px 0 0; font-size: clamp(13px, 1.05vw, 15px); font-weight: 500; letter-spacing: 0.02em;
  color: rgba(245, 246, 242, 0.78);
}

.hero__sub {
  margin: 22px 0 0; font-size: clamp(1.4rem, 2.2vw, 1.95rem); font-weight: 500; line-height: 1.4;
  color: var(--white);
}
.hero__desc {
  margin: 14px 0 0; max-width: 34em;
  font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.85; font-weight: 400;
  color: rgba(245, 246, 242, 0.86); text-wrap: balance;
}
.hero__date {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px;
  font-size: 14px; font-weight: 500; color: rgba(245, 246, 242, 0.78);
}
.hero__date::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }

.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-family: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn--primary { background: var(--mint); color: var(--navy); border: 1px solid var(--mint); }
.btn--primary:hover { background: #b8ecda; transform: translateY(-2px); }
.btn--primary:hover svg { transform: translateX(-4px); }
.btn--ghost {
  color: #fff; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.5); transform: translateY(-2px); }
.btn:focus-visible, .nav__link:focus-visible, .nav__live:focus-visible, .nav__toggle:focus-visible {
  outline: 2px solid var(--mint); outline-offset: 3px;
}

/* ---------- Floating impact card ---------- */
.impact {
  width: 100%; max-width: 400px;
  padding: 26px 28px 24px; border-radius: 26px;
  background: rgba(11, 32, 44, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.55);
  animation: card-in 1s var(--ease) 1s both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.impact__label { font-size: 13px; font-weight: 500; color: rgba(245, 246, 242, 0.7); letter-spacing: 0.02em; }
.impact__main { display: flex; align-items: baseline; gap: 12px; margin-top: 6px; }
.impact__num {
  font-size: clamp(3.2rem, 5vw, 4.4rem); font-weight: 700; line-height: 1.05; color: var(--white);
  font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate;
}
.impact__unit { font-size: 1.2rem; font-weight: 500; color: var(--mint); }
.impact__rule { height: 1px; margin: 20px 0 16px; background: rgba(255, 255, 255, 0.14); border: 0; }
.impact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.impact__row > div + div { padding-inline-start: 16px; border-inline-start: 1px solid rgba(255, 255, 255, 0.14); }
.impact__sub-num {
  font-size: 1.7rem; font-weight: 600; line-height: 1.2; color: var(--white);
  font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; text-align: start;
}
.impact__sub-label { font-size: 13.5px; color: rgba(245, 246, 242, 0.72); margin-top: 2px; }

/* ---------- Generic reveal for hero text ---------- */
.fade-up { animation: fade-up 0.9s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes fade-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---------- Scroll cue ---------- */
.hero__scroll {
  position: absolute; bottom: 22px; inset-inline-start: 50%; transform: translateX(50%);
  display: none; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(245, 246, 242, 0.7); text-decoration: none; letter-spacing: 0.08em;
}
.hero__scroll i { width: 1px; height: 34px; background: linear-gradient(to bottom, rgba(163, 226, 206, 0.9), rgba(163, 226, 206, 0)); display: block; transform-origin: top; animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* فاصل واضح بين الهيرو والقسم التالي */
.hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 6px; z-index: 1;
  background: linear-gradient(to left, var(--mint), rgba(163, 226, 206, 0.15) 60%, transparent);
}

/* ---------- Toast (for sections not yet available) ---------- */
.toast {
  position: fixed; inset-inline: 0; bottom: 28px; margin-inline: auto; width: max-content; max-width: calc(100% - 32px);
  z-index: 60; padding: 12px 20px; border-radius: 14px; font-size: 14px; font-weight: 500;
  background: var(--navy); color: #fff; border: 1px solid rgba(163, 226, 206, 0.3);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.is-show { opacity: 1; transform: none; }

/* ---------- Desktop composition ---------- */
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) auto; }
  /* RTL: العمود الأول (المحتوى) على اليمين، والبطاقة على اليسار أسفل الصورة */
  .hero__content { grid-column: 1; }
  .impact { grid-column: 2; align-self: end; margin-bottom: 8px; }
  .hero__scroll { display: flex; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .hero { min-height: 0; }
  .hero__shade {
    background:
      linear-gradient(to top, rgba(11, 32, 44, 0.92) 0%, rgba(11, 32, 44, 0.7) 45%, rgba(11, 32, 44, 0.25) 80%),
      linear-gradient(to bottom, rgba(11, 32, 44, 0.5) 0%, rgba(11, 32, 44, 0) 25%);
  }
  .hero__inner { padding-top: calc(var(--nav-h) + 150px); gap: 32px; }
  .impact { max-width: 480px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  :root { --nav-h: 68px; }
  .nav { padding: 10px 12px; }
  .nav__brand > div > div { width: 56px !important; height: 40px !important; }
  .hero__img { object-position: 30% 50%; }
  .hero__inner { padding-top: calc(var(--nav-h) + 130px); padding-bottom: 36px; }
  .hero__title { font-size: clamp(2.7rem, 14vw, 3.6rem); }
  .hero__ctas .btn { flex: 1 1 100%; }
  .impact { max-width: none; padding: 22px 20px; }
  .impact__row { gap: 8px; }
  .impact__row > div + div { padding-inline-start: 12px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__img, .hero__title .line > span, .impact, .fade-up { animation: none !important; opacity: 1 !important; transform: none !important; }
  .hero__scroll i, .nav__live-dot { animation: none; }
  .hero__media { transform: none !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .nav, .hero__scroll, .toast { display: none !important; }
  .hero { min-height: 0; }
}
