:root {
  --bg: #f4fbfd;
  --bg-soft: #eaf6f9;
  --surface: #ffffff;
  --text: #17303a;
  --muted: #4d6670;
  --text-soft: #284650;
  --brand-cyan: #00a8c9;
  --brand-cyan-deep: #007d97;
  --brand-gold: #b9b27a;
  --brand-gold-soft: #d4ce9f;
  --brand-glow: #58cde3;
  --glass: rgba(255, 255, 255, .93);
  --glass-border: rgba(0, 125, 151, .22);
  --shadow: 0 16px 40px rgba(16, 56, 69, .12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Kufi Arabic", "Tajawal", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  background: radial-gradient(950px 520px at 10% 0%, rgba(0, 168, 201, .16) 0, transparent 70%),
              radial-gradient(1200px 720px at 90% 10%, rgba(185, 178, 122, .16) 0, transparent 70%),
              linear-gradient(180deg, #f8feff 0%, #edf8fb 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

p,
li,
.lead,
.stat p,
.card p,
.footer,
.cta p {
  color: var(--muted);
}

h3,
h4,
.card h3,
.stat h3 {
  color: var(--text);
}

::selection {
  background: rgba(0, 168, 201, .4);
  color: #fff;
}

*::-webkit-scrollbar { width: 10px; }
*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(var(--brand-cyan), var(--brand-gold));
}

.skip-link {
  position: fixed;
  right: 16px;
  top: -60px;
  z-index: 10000;
  background: #ffffff;
  color: #0b4352;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
}
.skip-link:focus { top: 16px; }

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .1;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.16) 0 1px, transparent 1px), radial-gradient(circle at 60% 60%, rgba(255,255,255,.12) 0 1px, transparent 1px);
  background-size: 4px 4px, 3px 3px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 4px;
  width: 0;
  z-index: 9999;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-cyan), var(--brand-gold-soft));
  box-shadow: 0 0 22px rgba(88, 205, 227, .65);
}

.cursor {
  position: fixed;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0,125,151,.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width .2s, height .2s, background .2s, border-color .2s;
}
.cursor.hover {
  width: 42px;
  height: 42px;
  border-color: var(--brand-gold-soft);
  background: rgba(185, 178, 122, .26);
}

.topbar {
  position: sticky;
  top: 16px;
  width: min(1200px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  z-index: 99;
  transition: transform .35s ease, background .35s ease, border-color .35s ease;
}
.topbar.scrolled {
  background: rgba(255, 255, 255, .94);
  border-color: rgba(185, 178, 122, .52);
}
.brand img { width: 140px; height: auto; display: block; }

.menu-toggle {
  display: none;
  border: 1px solid rgba(0, 125, 151, .28);
  background: rgba(255, 255, 255, .8);
  color: var(--text);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
}

.nav { display: flex; gap: 16px; flex-wrap: wrap; }
.nav a {
  color: var(--text);
  text-decoration: none;
  opacity: 1;
  padding: 6px 10px;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.nav a:hover,
.nav a.active {
  color: var(--brand-cyan-deep);
  background: rgba(0, 168, 201, .11);
}

main { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
.section {
  padding: 110px 0 40px;
  scroll-margin-top: 120px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 700px;
}
.section-head h2,
.hero h1 {
  line-height: 1.2;
  margin: 10px 0 0;
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  letter-spacing: -.015em;
  background: linear-gradient(90deg, #1d3b46, var(--brand-cyan-deep), #326271, var(--brand-gold));
  background-size: 230% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 8s linear infinite;
  text-shadow: 0 8px 24px rgba(255, 255, 255, .28);
}
@keyframes shine { to { background-position: 230% 0; } }

.kicker,.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-cyan);
  border: 1px solid rgba(88,205,227,.38);
  background: rgba(0,168,201,.08);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 600;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
  min-height: 78vh;
}
.lead {
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 56ch;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.hero__visual {
  position: relative;
  background: linear-gradient(145deg, rgba(0,168,201,.12), rgba(185,178,122,.1));
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-main { width: min(560px, 90%); z-index: 2; filter: drop-shadow(0 14px 26px rgba(9, 66, 83, .18)); }
.hero-shape { position: absolute; opacity: .9; animation: float 8s ease-in-out infinite; }
.hero-shape.s1 { width: 200px; right: -20px; top: 20px; }
.hero-shape.s2 { width: 140px; left: -15px; bottom: 40px; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-20px) rotate(8deg); } }

.stats-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat {
  background: linear-gradient(145deg, rgba(0,168,201,.07), rgba(255,255,255,.98));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 26px 20px;
  box-shadow: var(--shadow);
}
.stat h3 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  color: var(--brand-cyan-deep);
}
.stat p { margin: 0; }

.cards {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  isolation: isolate;
  background: linear-gradient(145deg, rgba(0,168,201,.06), rgba(255,255,255,1));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(130deg, rgba(185,178,122,.28), rgba(0,168,201,.24), transparent 60%);
  z-index: -1;
  opacity: 0;
  transition: opacity .35s ease;
}
.card:hover {
  transform: translateY(-8px);
  border-color: rgba(185,178,122,.65);
  box-shadow: 0 20px 42px rgba(16, 56, 69, .16);
}
.card:hover::before { opacity: 1; }
.card img { width: 120px; height: 120px; object-fit: contain; display: block; margin-bottom: 12px; }
.card h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.masonry {
  margin-top: 28px;
  columns: 3 260px;
  column-gap: 14px;
}
.masonry img {
  width: 100%;
  margin-bottom: 14px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transition: transform .35s ease, filter .35s ease;
  cursor: zoom-in;
}
.masonry img:hover {
  transform: translateY(-6px) scale(1.02);
  filter: saturate(1.05);
}

.cta {
  margin-top: 30px;
  padding: 36px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: linear-gradient(115deg, rgba(0,168,201,.16), rgba(185,178,122,.2));
  border: 1px solid rgba(0,125,151,.2);
}

.cta h2 {
  color: var(--text);
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.faq-grid .card {
  min-height: 100%;
}

.faq-grid h3 {
  margin-bottom: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  color: #05212a;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-gold-soft));
  box-shadow: 0 10px 30px rgba(185,178,122,.45);
}
.btn-ghost {
  color: var(--text);
  border-color: rgba(99,182,201,.65);
  background: rgba(255,255,255,.7);
}

.btn-ghost:hover {
  background: rgba(255,255,255,.95);
}

.footer {
  text-align: center;
  color: var(--text-soft);
  padding: 42px 16px 28px;
}

.to-top {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(185,178,122,.55);
  background: rgba(255, 255, 255, .92);
  color: var(--brand-cyan-deep);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .25s ease;
  z-index: 90;
}
.to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.lightbox {
  border: none;
  padding: 12px;
  background: rgba(244, 251, 253, .98);
  border-radius: 16px;
  width: min(92vw, 900px);
  max-height: 90vh;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 80px);
  margin: 0 auto;
  border-radius: 12px;
}
.lightbox-close {
  border: 1px solid rgba(0,125,151,.24);
  color: var(--brand-cyan-deep);
  background: rgba(255,255,255,.9);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  margin-right: auto;
  display: block;
  margin-bottom: 10px;
}

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

.reveal {
  opacity: 0;
  transform: translateY(34px) scale(.98);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.65,.2,1);
}
.reveal.show {
  opacity: 1;
  transform: none;
}

@media (min-width: 981px) {
  .section-head,
  .hero__content {
    max-width: 92%;
  }
}

@media (max-width: 980px) {
  .cursor { display: none; }
  .hero { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: 1fr; }
  .topbar { top: 8px; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .nav {
    position: absolute;
    inset: calc(100% + 8px) 0 auto 0;
    margin: 0;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, .97);
    box-shadow: var(--shadow);
    display: none;
  }
  .topbar.menu-open .nav { display: grid; gap: 8px; }
}

@media (max-width: 640px) {
  .topbar { padding: 10px 12px; }
  .stats-grid { grid-template-columns: 1fr; }
  .cta { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto !important; }
}
