/* ===== خط ثمانية — ضع الملفات المحمّلة من font.thmanyah.com في مجلد fonts/ بهذه الأسماء ===== */
@font-face{font-family:'ThmanyahDisplay';src:url('../fonts/thmanyah-display.woff2') format('woff2'),url('../fonts/thmanyah-display.otf') format('opentype'),url('../fonts/thmanyah-display.ttf') format('truetype');font-weight:400 800;font-display:swap}
@font-face{font-family:'ThmanyahHead';src:url('../fonts/thmanyah-head.woff2') format('woff2'),url('../fonts/thmanyah-head.otf') format('opentype'),url('../fonts/thmanyah-head.ttf') format('truetype');font-weight:400 700;font-display:swap}
@font-face{font-family:'ThmanyahText';src:url('../fonts/thmanyah-text.woff2') format('woff2'),url('../fonts/thmanyah-text.otf') format('opentype'),url('../fonts/thmanyah-text.ttf') format('truetype');font-weight:300 600;font-display:swap}
:root{
  color-scheme:light;
  --navy:#1c2960; --navy-deep:#10173d; --gold:#b8892a; --gold-soft:#e3bd6a; --gold-faint:rgba(184,137,42,.14);
  --bg:#ffffff; --surface:#f6f6f8; --surface-2:#fbfbfc; --ink:#111634; --ink-2:#3c4263; --ink-3:#6d7395;
  --line:rgba(17,22,52,.10); --shadow:0 16px 44px -24px rgba(16,23,61,.20);
  --r:22px; --wheel:170px;
  --display-ar:'ThmanyahDisplay','Amiri',serif; --display-en:'ThmanyahDisplay','Cormorant Garamond',serif;
  --head:'ThmanyahHead','IBM Plex Sans Arabic','Inter',system-ui,sans-serif;
  --body-ar:'ThmanyahText','IBM Plex Sans Arabic',system-ui,sans-serif;
  --body-en:'ThmanyahText','Inter',system-ui,sans-serif;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#080b18; --surface:#11173a; --surface-2:#0c1126; --ink:#f2f4fd; --ink-2:#c3c8e2; --ink-3:#8d93b8;
  --line:rgba(237,239,250,.10); --gold:#d4a847; --gold-soft:#e9cd86; --gold-faint:rgba(212,168,71,.16);
  --shadow:0 18px 50px -20px rgba(0,0,0,.6);
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:auto; background:var(--bg)}
h1,h2,h3{color:var(--ink)}
@view-transition{navigation:auto}
::view-transition-old(root){animation:page-out .18s ease both}
::view-transition-new(root){animation:page-in .28s ease both}
@keyframes page-out{to{opacity:0}}
@keyframes page-in{from{opacity:0}}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
  ::view-transition-old(root),::view-transition-new(root){animation:none}
}
body{
  background:var(--bg); color:var(--ink);
  font-family:var(--body-ar); font-weight:400; line-height:1.85; letter-spacing:0;
  transition:background .5s ease,color .5s ease;
  -webkit-font-smoothing:antialiased;
}
html[lang="en"] body{font-family:var(--body-en); line-height:1.7}
.display{font-family:var(--display-ar); font-weight:700}
html[lang="en"] .display{font-family:var(--display-en); font-weight:600; letter-spacing:.01em}
h3,.eyebrow,.t-date,.k-tag,.status,.ctrl,.btn,.wheel-label,.chip,.lbl{font-family:var(--head)}

/* ---------- top bar ---------- */
.topbar{
  position:fixed; inset-inline:0; top:0; z-index:60;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px clamp(18px,4vw,48px);
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  background:var(--bg);
  background:color-mix(in srgb,var(--bg) 82%,transparent);
  border-bottom:1px solid var(--line);
}
.brand{display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--ink)}
.brand img{width:38px; height:38px}
.brand b{font-family:var(--display-en); font-size:1.15rem; letter-spacing:.22em; font-weight:600}
.controls{display:flex; gap:10px}
.ctrl{
  border:1px solid var(--line); background:var(--surface); color:var(--ink);
  border-radius:999px; padding:7px 16px; font:inherit; font-size:.85rem; font-weight:500;
  cursor:pointer; transition:.3s; display:flex; align-items:center; gap:6px;
}
.ctrl:hover{border-color:var(--gold); color:var(--gold)}
.ctrl:focus-visible,.dot:focus-visible,a:focus-visible{outline:2px solid var(--gold); outline-offset:3px; border-radius:6px}

/* ---------- sections ---------- */
section{padding:clamp(84px,12vh,140px) clamp(20px,6vw,72px); max-width:1180px; margin-inline:auto; scroll-margin-top:64px}
.eyebrow{
  display:inline-flex; align-items:center; gap:10px;
  font-size:.78rem; font-weight:600; letter-spacing:.28em; text-transform:uppercase; color:var(--gold);
}
.eyebrow::before{content:""; width:34px; height:1px; background:var(--gold)}
h2{font-size:clamp(1.9rem,4vw,2.9rem); margin:14px 0 10px; line-height:1.3}
.lead{color:var(--ink-2); max-width:62ch; font-size:1.02rem}

/* ---------- hero ---------- */
.hero{
  min-height:100svh; display:flex; flex-direction:column; justify-content:center; align-items:center;
  text-align:center; position:relative; overflow:hidden; padding-top:110px;
}
.hero-mesh{position:absolute; inset:-20%; opacity:.5; pointer-events:none;
  background:radial-gradient(circle at 50% 32%, var(--gold-faint), transparent 42%);}
.hero svg.geo{position:absolute; top:50%; left:50%; transform:translate(-50%,-54%); width:min(880px,140vw); opacity:.18; pointer-events:none}
.hero img.mark{width:clamp(108px,15vw,150px); filter:drop-shadow(0 14px 34px rgba(192,146,47,.28)); position:relative}
.hero h1{font-size:clamp(2.6rem,7vw,4.8rem); line-height:1.18; margin-top:26px; position:relative}
.hero .role{margin-top:14px; font-size:clamp(.95rem,2vw,1.15rem); color:var(--ink-2); letter-spacing:.04em; position:relative}
.hero .role em{color:var(--gold); font-style:normal}
.hero-cta{margin-top:38px; display:flex; gap:14px; flex-wrap:wrap; justify-content:center; position:relative}
.btn{
  text-decoration:none; font-weight:500; font-size:.92rem; border-radius:999px; padding:13px 30px; transition:.35s;
  display:inline-flex; align-items:center; gap:8px;
}
.btn-gold{background:linear-gradient(135deg,var(--gold),var(--gold-soft)); color:#1b1503; box-shadow:0 10px 30px -10px rgba(192,146,47,.55)}
.btn-gold:hover{transform:translateY(-2px); box-shadow:0 16px 36px -10px rgba(192,146,47,.65)}
.btn-ghost{border:1px solid var(--line); color:var(--ink); background:var(--surface)}
.btn-ghost:hover{border-color:var(--gold); color:var(--gold)}
.scroll-hint{position:absolute; bottom:30px; color:var(--ink-3); font-size:.78rem; letter-spacing:.2em; animation:float 3s ease-in-out infinite}
@keyframes float{50%{transform:translateY(7px)}}

/* ---------- cards / grids ---------- */
.grid{display:grid; gap:22px; margin-top:42px}
.g2{grid-template-columns:repeat(auto-fit,minmax(290px,1fr))}
.g3{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r);
  padding:30px 28px; box-shadow:var(--shadow); transition:transform .4s ease, border-color .4s ease;
  position:relative; overflow:hidden;
}
.card:hover{transform:translateY(-5px); border-color:var(--gold); border-color:color-mix(in srgb,var(--gold) 45%,var(--line))}
.card h3{font-size:1.18rem; margin-bottom:8px; line-height:1.5}
.card p{color:var(--ink-2); font-size:.93rem}
.card .ico{width:42px; height:42px; border-radius:12px; background:var(--gold-faint); color:var(--gold);
  display:flex; align-items:center; justify-content:center; margin-bottom:16px; font-size:1.15rem}
.g-featured{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-follow{margin-top:22px}
.card-featured{
  background:linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 78%);
  border:1.5px solid color-mix(in srgb, var(--gold) 62%, var(--navy));
  box-shadow:var(--shadow), inset 0 0 0 1px rgba(227,189,106,.2);
  padding:36px 32px;
  min-height:220px;
}
.card-featured h3{color:#f6f7ff; font-size:1.32rem}
.card-featured p{color:rgba(242,244,253,.84)}
.card-featured .ico{
  width:48px; height:48px; background:rgba(184,137,42,.22); color:var(--gold-soft);
}
.card-featured:hover{
  transform:translateY(-6px);
  border-color:var(--gold);
}
html[data-theme="dark"] .card-featured{
  background:linear-gradient(165deg, #2a3878 0%, #0c122e 80%);
  border-color:color-mix(in srgb, var(--gold) 55%, #2a3878);
}
@media (max-width:720px){
  .g-featured{grid-template-columns:1fr}
}
.project-card{display:block; text-decoration:none; color:inherit; min-height:100%}
.project-card .project-cta{
  display:inline-flex; align-items:center; gap:8px; margin-top:18px;
  color:var(--gold); font-family:var(--head); font-size:.78rem; font-weight:600;
  letter-spacing:.12em; text-transform:uppercase;
}
.project-card .project-cta::after{content:"↗"; font-size:.9rem; line-height:1}
.chips{display:flex; flex-wrap:wrap; gap:10px; margin-top:26px}
.chip{border:1px solid var(--line); background:var(--surface); padding:7px 16px; border-radius:999px; font-size:.83rem; color:var(--ink-2)}
.chip b{color:var(--gold); font-weight:600}
.cert-strip{margin-top:28px; display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.cert-pill{
  border:1px solid var(--line); background:var(--surface-2); border-radius:16px;
  padding:16px 18px; box-shadow:var(--shadow); display:flex; gap:14px; align-items:flex-start;
}
.cert-pill b{display:block; color:var(--ink); font-family:var(--head); font-size:.92rem; line-height:1.5}
.cert-pill span{display:block; margin-top:3px; color:var(--ink-3); font-size:.78rem}
.cert-mark{
  flex:0 0 34px; width:34px; height:34px; border-radius:10px;
  display:grid; place-items:center; background:var(--gold-faint); color:var(--gold);
  font-family:var(--head); font-size:.72rem; font-weight:700;
}
.ms-mark{grid-template-columns:repeat(2,1fr); gap:2px; padding:5px; background:transparent}
.ms-mark i{display:block; width:100%; height:100%}
.ms-mark i:nth-child(1){background:#f25022}.ms-mark i:nth-child(2){background:#7fba00}
.ms-mark i:nth-child(3){background:#00a4ef}.ms-mark i:nth-child(4){background:#ffb900}

/* ---------- timeline ---------- */
.timeline{margin-top:46px; position:relative; padding-inline-start:30px}
.timeline::before{content:""; position:absolute; inset-block:6px; inset-inline-start:6px; width:1px;
  background:linear-gradient(var(--gold),transparent)}
.t-item{position:relative; padding-bottom:44px}
.t-item:last-child{padding-bottom:0}
.t-item::before{content:""; position:absolute; inset-inline-start:-30px; top:8px; width:13px; height:13px;
  border-radius:50%; border:2px solid var(--gold); background:var(--bg)}
.t-date{font-size:.8rem; letter-spacing:.14em; color:var(--gold); font-weight:600; text-transform:uppercase}
.t-item h3{font-size:1.25rem; margin:6px 0 4px}
.t-item .org{color:var(--ink-3); font-size:.9rem; margin-bottom:10px}
.t-item ul{padding-inline-start:20px; color:var(--ink-2); font-size:.93rem}
.t-item li{margin-bottom:6px}

/* ---------- future projects ---------- */
.status{position:absolute; top:20px; inset-inline-end:20px; font-size:.72rem; font-weight:600; letter-spacing:.1em;
  padding:5px 13px; border-radius:999px; background:var(--gold-faint); color:var(--gold)}
.f-card{border-style:dashed; border-width:1.5px}

/* ---------- knowledge ---------- */
.k-row{display:flex; gap:20px; align-items:flex-start; padding:26px 6px; border-bottom:1px solid var(--line)}
.k-row:last-child{border-bottom:none}
.k-num{font-family:var(--display-en); font-size:1.7rem; color:var(--gold); font-weight:600; min-width:46px; line-height:1.2}
.k-row h3{font-size:1.12rem; margin-bottom:4px}
.k-row p{color:var(--ink-2); font-size:.92rem}
.k-tag{font-size:.74rem; color:var(--gold); letter-spacing:.16em; text-transform:uppercase; font-weight:600}

/* ---------- contact ---------- */
.contact-wrap{text-align:center}
.c-links{display:flex; flex-wrap:wrap; justify-content:center; gap:16px; margin-top:40px}
.c-link{
  display:flex; flex-direction:column; gap:6px; align-items:center; text-decoration:none;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r);
  padding:26px 34px; color:var(--ink); min-width:200px; transition:.35s; box-shadow:var(--shadow);
}
.c-link:hover{transform:translateY(-4px); border-color:var(--gold)}
.c-link .lbl{font-size:.76rem; letter-spacing:.2em; text-transform:uppercase; color:var(--gold); font-weight:600}
.c-link .val{font-size:.95rem; direction:ltr}
footer{text-align:center; padding:40px 20px 130px; color:var(--ink-3); font-size:.82rem; border-top:1px solid var(--line)}

/* ---------- THE WHEEL ---------- */
.wheel-wrap{position:fixed; bottom:26px; inset-inline-end:26px; z-index:70; user-select:none}
.wheel{
  width:var(--wheel); height:var(--wheel); border-radius:50%; position:relative;
  background:var(--surface);
  background:color-mix(in srgb,var(--surface) 90%,transparent);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  border:1px solid var(--line); box-shadow:var(--shadow);
}
.wheel::before{ /* gold ring like the logo */
  content:""; position:absolute; inset:10px; border-radius:50%;
  border:2px solid transparent;
  background:linear-gradient(140deg,var(--gold-soft),var(--gold) 45%,#8a6418) border-box;
  -webkit-mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude; opacity:.9; pointer-events:none;
}
.ring{position:absolute; inset:0; transition:transform .7s cubic-bezier(.6,.05,.2,1)}
.dot{
  position:absolute; top:50%; left:50%; width:30px; height:30px; margin:-15px;
  border-radius:50%; border:none; background:transparent; cursor:pointer; padding:0;
}
.dot i{
  display:block; width:9px; height:9px; margin:10.5px; border-radius:50%;
  background:var(--ink-3); transition:.4s; font-style:normal;
}
.dot:hover i{background:var(--gold); transform:scale(1.5)}
.dot.active i{background:var(--gold); transform:scale(1.8); box-shadow:0 0 0 5px var(--gold-faint)}
.hub{
  position:absolute; inset:0; margin:auto; width:74px; height:74px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; border:none; background:transparent; cursor:pointer;
}
.hub img{width:62px; height:62px; transition:transform .7s cubic-bezier(.6,.05,.2,1)}
.wheel-label{
  position:absolute; bottom:calc(100% + 12px); inset-inline-end:0;
  background:var(--surface); border:1px solid var(--line); color:var(--ink);
  font-size:.8rem; font-weight:500; padding:7px 16px; border-radius:999px;
  white-space:nowrap; box-shadow:var(--shadow); text-align:center;
}
.wheel-label b{color:var(--gold)}
@media (max-width:760px){
  :root{--wheel:44px}
  .wheel-wrap{
    top:50%; bottom:auto; inset-inline-end:10px; transform:translateY(-50%);
    display:flex; flex-direction:column; align-items:center;
  }
  .wheel{
    width:44px; height:auto; min-height:270px; border-radius:999px;
    display:flex; align-items:center; justify-content:center; padding:12px 0;
    touch-action:none;
  }
  .wheel::before{display:none}
  .ring{
    position:relative; inset:auto; display:flex; flex-direction:column; align-items:center;
    justify-content:center; gap:7px; transform:none!important; transition:none;
  }
  .dot{
    position:relative; top:auto; left:auto; width:28px; height:28px; margin:0;
    display:grid; place-items:center; transform:none!important;
  }
  .dot i{width:8px;height:8px;margin:0}
  .dot.active i{transform:scale(1.7); box-shadow:0 0 0 5px var(--gold-faint)}
  .hub{display:none}
  .brand b{display:none}
  .wheel-label{display:none}
  section{padding-inline-end:64px}
}

/* reveal on scroll */
.reveal{opacity:0; transform:translateY(26px); transition:opacity .8s ease,transform .8s ease}
.reveal.in{opacity:1; transform:none}
