:root {
  --black: #000;
  --ink: #1d1d1f;
  --snow: #f5f5f7;
  --white: #fff;
  --muted-d: #a1a1a6;
  --muted-l: #6e6e73;
  --line-d: rgba(255, 255, 255, .14);
  --line-l: rgba(0, 0, 0, .12);
  --blue: #2997ff;
  --blue-l: #0071e3;
  --orange: #ff7a45;
  --card-d: #161617;
  --r: 28px;
  --wrap: 1180px;
  --nav-h: 52px;
  --font: "Inter", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--black); color: var(--white); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--white); color: var(--black); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 8px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.dark { background: var(--black); color: var(--white); }
.light { background: var(--snow); color: var(--ink); }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--orange); letter-spacing: .01em; margin-bottom: 14px; }
.light .eyebrow { color: #d9531e; }
:lang(en) .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }

/* ---------- NAV ---------- */
.nav { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50; background: rgba(0, 0, 0, .72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.nav-inner { width: min(1024px, 100% - 40px); height: 100%; margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -.01em; flex: none; }
.links { display: flex; gap: 28px; margin-inline: auto; font-size: 13.5px; }
.links a { color: rgba(255, 255, 255, .78); transition: color .2s; }
.links a:hover, .links a.on { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.lang { font-size: 13px; font-weight: 600; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line-d); color: #fff; transition: background .2s; }
.lang:hover { background: rgba(255, 255, 255, .12); }
.burger { display: none; width: 34px; height: 34px; position: relative; }
.burger span { position: absolute; inset-inline: 8px; height: 1.6px; background: #fff; transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:nth-child(1) { top: 13px; }
.burger span:nth-child(2) { top: 20px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 16.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 16.5px; transform: rotate(-45deg); }

/* ---------- HERO ---------- */
.hero { padding-top: calc(var(--nav-h) + clamp(56px, 10vh, 120px)); overflow: hidden; background: radial-gradient(120% 70% at 50% 0%, #0b1a33 0%, #000 62%); }
.hero .wrap { text-align: center; }
.hero h1 { font-size: clamp(42px, 8.6vw, 104px); line-height: 1.18; font-weight: 700; display: grid; gap: .04em; }
:lang(en) .hero h1 { line-height: 1.04; letter-spacing: -.035em; font-size: clamp(40px, 8vw, 96px); }
.grad { background: linear-gradient(100deg, var(--blue) 10%, #9f7bff 50%, var(--orange) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.lede { max-width: 640px; margin: 28px auto 0; font-size: clamp(18px, 2.2vw, 23px); line-height: 1.55; color: var(--muted-d); }
.ctas { display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: center; align-items: center; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 24px; border-radius: 999px; font-size: 16px; font-weight: 600; transition: transform .25s var(--ease), background .25s, border-color .25s; }
.btn.primary { background: var(--blue-l); color: #fff; }
.btn.primary:hover { background: #0a84ff; transform: scale(1.03); }
.btn.ghost { border: 1px solid var(--line-d); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.link { color: var(--blue); font-size: 17px; }
.link:hover { text-decoration: underline; }
.arrow { font-style: normal; display: inline-block; transition: transform .25s var(--ease); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
.link:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .link:hover .arrow { transform: scaleX(-1) translateX(3px); }

.hero-reel { display: flex; justify-content: center; align-items: center; gap: clamp(10px, 2vw, 26px); width: min(1100px, 100% - 32px); margin: clamp(48px, 8vw, 90px) auto 0; padding-bottom: clamp(60px, 9vw, 110px); direction: ltr; }
.hero-reel .card { flex: 1 1 0; max-width: 260px; aspect-ratio: 9 / 16; }
.hero-reel .card:nth-child(2) { max-width: 340px; }

/* ---------- SECTIONS ---------- */
.sec { padding: clamp(80px, 12vw, 150px) 0; }
.head { max-width: 760px; margin-bottom: clamp(36px, 6vw, 64px); }
.head h2, .about-copy h2 { font-size: clamp(34px, 5.6vw, 64px); line-height: 1.25; font-weight: 700; }
:lang(en) .head h2, :lang(en) .about-copy h2 { line-height: 1.07; letter-spacing: -.03em; }
.head .sub, .contact .sub { margin-top: 18px; font-size: clamp(18px, 2vw, 22px); color: var(--muted-d); }
.light .head .sub { color: var(--muted-l); }

/* ---------- CARDS ---------- */
.card { position: relative; display: block; width: 100%; overflow: hidden; border-radius: var(--r); background: var(--card-d); isolation: isolate; text-align: start; transition: transform .5s var(--ease), box-shadow .5s var(--ease); cursor: pointer; }
.card:hover { transform: scale(1.015); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.light .card:hover { box-shadow: 0 24px 50px rgba(0, 0, 0, .16); }
.card img, .card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover img, .card:hover video { transform: scale(1.04); }
.card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, .78) 100%); pointer-events: none; }
.card .meta { position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding: clamp(14px, 2.2vw, 24px); color: #fff; }
.card .tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin-bottom: 8px; }
.card h3 { font-size: clamp(16px, 1.9vw, 22px); line-height: 1.35; font-weight: 700; }
:lang(en) .card h3 { letter-spacing: -.01em; }
.card .badge { position: absolute; z-index: 2; top: 14px; inset-inline-end: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); direction: ltr; }
.play { position: absolute; z-index: 2; top: 14px; inset-inline-start: 14px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: #000; transition: transform .3s var(--ease); }
.play svg { margin-inline-start: 2px; }
.card:hover .play { transform: scale(1.12); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, auto); gap: 16px; }
.bento .card { aspect-ratio: 4 / 5; }
.bento .card:first-child { grid-column: 1 / span 2; grid-row: 1 / span 2; aspect-ratio: auto; min-height: 100%; }
.bento .card:first-child h3 { font-size: clamp(22px, 3vw, 36px); }

/* Film rail */
.film { padding-bottom: clamp(60px, 9vw, 110px); background: linear-gradient(180deg, #000, #0b0b0d 40%, #000); }
.rail-wrap { position: relative; }
.rail { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 8px max(20px, calc((100% - var(--wrap)) / 2)) 28px; scrollbar-width: none; scroll-padding-inline: max(20px, calc((100% - var(--wrap)) / 2)); }
.rail::-webkit-scrollbar { display: none; }
.rail .card { flex: none; height: clamp(380px, 52vw, 540px); width: auto; scroll-snap-align: start; }
.rail-nav { display: flex; gap: 12px; justify-content: flex-end; margin-top: 4px; }
.rail-nav button, .lb-nav, .lb-close { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; transition: background .2s, opacity .2s; }
.rail-nav button:hover, .lb-nav:hover, .lb-close:hover { background: rgba(255, 255, 255, .26); }
.rail-nav button:disabled { opacity: .3; cursor: default; }
[dir="rtl"] .rail-nav button svg, [dir="rtl"] .lb-nav svg { transform: scaleX(-1); }

/* Design grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.grid .card { aspect-ratio: 4 / 5; background: #dcdce0; }

/* ---------- TIMELINE ---------- */
.timeline { border-top: 1px solid var(--line-d); }
.timeline > li { display: grid; grid-template-columns: 200px 1fr; gap: 12px 32px; padding: 30px 0; border-bottom: 1px solid var(--line-d); }
.timeline .when { color: var(--muted-d); font-size: 15px; font-variant-numeric: tabular-nums; padding-top: 6px; direction: ltr; text-align: start; }
[dir="rtl"] .timeline .when { text-align: right; }
.timeline h3 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; font-weight: 700; }
.timeline .org { color: var(--blue); font-weight: 600; margin-top: 2px; font-size: 16px; }
.timeline ul { margin-top: 14px; display: grid; gap: 8px; color: #d2d2d7; font-size: 16.5px; }
.timeline ul li { position: relative; padding-inline-start: 18px; }
.timeline ul li::before { content: ""; position: absolute; inset-inline-start: 0; top: .78em; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.tools { margin-top: clamp(56px, 8vw, 96px); }
.tools h3 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 26px; font-weight: 700; }
.tool-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-group { background: var(--card-d); border-radius: 22px; padding: 26px; }
.tool-group h4 { font-size: 13px; font-weight: 600; color: var(--muted-d); margin: 0 0 14px; }
:lang(en) .tool-group h4 { text-transform: uppercase; letter-spacing: .08em; }
.tool-group p { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; line-height: 1.5; direction: ltr; text-align: start; }
[dir="rtl"] .tool-group p { text-align: right; }

/* ---------- ABOUT ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-photo { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; background: #111; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 7% 50%; }
.about-copy p:not(.eyebrow) { margin-top: 20px; font-size: 19px; color: #424245; }
.facts { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.facts li { font-size: 15px; font-weight: 600; padding: 14px 16px; border-radius: 16px; background: var(--white); }

/* ---------- CONTACT ---------- */
.contact { background: radial-gradient(90% 60% at 50% 100%, #0b1a33 0%, #000 70%); }
.center { text-align: center; }
.contact .big { font-size: clamp(38px, 7.2vw, 88px); line-height: 1.22; font-weight: 700; }
:lang(en) .contact .big { line-height: 1.05; letter-spacing: -.035em; }
.contact .sub { max-width: 560px; margin-inline: auto; }
.contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 56px; margin-top: 64px; text-align: center; }
.contact-list dt { font-size: 13px; color: var(--muted-d); margin-bottom: 4px; }
.contact-list dd { font-size: 17px; font-weight: 600; }
.contact-list a:hover { color: var(--blue); }
.foot { padding: 28px 0 40px; border-top: 1px solid var(--line-d); font-size: 13px; color: var(--muted-d); text-align: center; }

/* ---------- LIGHTBOX ---------- */
.lb { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, .92); color: #fff; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.lb::backdrop { background: rgba(0, 0, 0, .6); }
.lb[open] { display: grid; grid-template-rows: 1fr auto; animation: lbin .35s var(--ease); }
@keyframes lbin { from { opacity: 0; } to { opacity: 1; } }
.lb-close { position: absolute; top: 16px; inset-inline-end: 16px; z-index: 5; }
.lb-body { display: grid; place-items: center; padding: 64px 72px 8px; min-height: 0; }
.lb-body video, .lb-body img { max-width: 100%; max-height: calc(100dvh - 190px); width: auto; height: auto; border-radius: 18px; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lb-body video { outline: none; }
.lb-caption { text-align: center; padding: 8px 24px 26px; }
.lb-caption h3 { font-size: 20px; font-weight: 700; }
.lb-caption p { margin-top: 4px; color: var(--muted-d); font-size: 15px; max-width: 640px; margin-inline: auto; }
.lb-dots { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.lb-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .3); transition: background .2s, transform .2s; }
.lb-dots i.on { background: #fff; transform: scale(1.25); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; }
.lb-nav.prev { inset-inline-start: 18px; }
.lb-nav.next { inset-inline-end: 18px; }
.lb-nav[hidden] { display: none; }

/* ---------- MOTION ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card img, .card video { transition: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0; padding: 8px 20px 20px; background: rgba(0, 0, 0, .96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--line-d); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; font-size: 20px; }
  .links.open { transform: none; opacity: 1; visibility: visible; }
  .links a { padding: 14px 0; border-bottom: 1px solid var(--line-d); }
  .burger { display: block; }
  .nav-actions { margin-inline-start: auto; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .card:first-child { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 4.4; min-height: 0; }
  .timeline > li { grid-template-columns: 1fr; padding: 24px 0; }
  .tool-groups { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-photo { aspect-ratio: 4 / 3; }
  .lb-body { padding: 64px 12px 4px; }
  .lb-nav { top: auto; bottom: 108px; transform: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero-reel .card:nth-child(1), .hero-reel .card:nth-child(3) { display: none; }
  .hero-reel .card:nth-child(2) { max-width: 260px; transform: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid .card .tag { display: none; }
  .facts { grid-template-columns: 1fr; }
}
