/* ══════════════════════════════════════════════════════════════════
   Saad Hakki — graphite & cobalt
   Mobile-first · logical properties (RTL-ready) · reduced-motion aware
   ══════════════════════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────────────────────────── */
:root {
  --bg: #0c0d10;
  --bg-2: #101217;
  --surface: #15171c;
  --surface-2: #1b1e25;
  --line: rgba(236, 231, 222, .09);
  --line-2: rgba(236, 231, 222, .16);
  --text: #ece7de;
  --text-2: #bab5ac;
  --text-3: #918d86;
  --accent: #1f3e9c;          /* showreel cobalt — fills */
  --accent-2: #2a4fc2;        /* hover */
  --accent-text: #8ea6ff;     /* cobalt for text on dark (9:1) */
  --accent-rgb: 64 102 230;
  --rec: #ff5a4e;
  --ok: #5ad19a;
  --danger: #ff7b72;
  --warn: #f5c26b;
  --focus: #b9c8ff;

  --font-display: 'Instrument Serif', 'Amiri', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --label-font: var(--font-mono);
  --label-tracking: .18em;
  --label-transform: uppercase;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --dur-1: 160ms;
  --dur-2: 280ms;
  --dur-3: 560ms;

  --gutter: clamp(1rem, 4vw, 3rem);
  --maxw: 1240px;
  --radius-s: 10px;
  --radius: 14px;
  --radius-l: 22px;
  --header-h: 64px;

  --z-header: 100;
  --z-fab: 110;
  --z-toast: 300;
  --z-intro: 400;
  --z-grain: 500;
  --z-skip: 600;
}

html[lang="ar"] {
  --label-font: var(--font-body);
  --label-tracking: 0;
  --label-transform: none;
}

/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
html[lang="ar"] body { font-size: 1.0625rem; line-height: 1.85; }

img, video, svg, picture { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; -webkit-tap-highlight-color: transparent; }
ul[class], ol[class] { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
code { font-family: var(--font-mono); font-size: .9em; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; inset-inline-start: 1rem; top: 1rem; z-index: var(--z-skip);
  padding: .75rem 1.1rem; border-radius: var(--radius-s);
  background: var(--text); color: var(--bg); font-weight: 500; text-decoration: none;
  transform: translateY(-160%); transition: transform var(--dur-2) var(--ease-out);
}
.skip-link:focus { transform: none; }

/* Film grain */
body::after {
  content: ''; position: fixed; inset: -50%; z-index: var(--z-grain); pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
  opacity: .045;
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* Smooth cross-page transitions where supported */
@view-transition { navigation: auto; }

/* ── Layout helpers ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { position: relative; padding-block: clamp(5rem, 12vw, 9.5rem); }

.section-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1fr minmax(0, 24rem); align-items: end; column-gap: 4rem; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .8rem;
  font-family: var(--label-font); font-size: .75rem; font-weight: 500;
  letter-spacing: var(--label-tracking); text-transform: var(--label-transform);
  color: var(--accent-text);
}
.eyebrow::after { content: ''; width: 2.5rem; height: 1px; background: currentColor; opacity: .45; }
.eyebrow__num { font-family: var(--font-mono); letter-spacing: .1em; color: var(--text-3); }
html[lang="ar"] .eyebrow { font-size: .875rem; }

.h2 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7.2vw, 5.75rem);
  line-height: .96;
  letter-spacing: -.015em;
}
.h2 em, .card__title em { font-style: italic; color: var(--accent-text); }
.h2--xl { font-size: clamp(3.25rem, 9vw, 7.5rem); }
html[lang="ar"] .h2 { line-height: 1.3; letter-spacing: 0; font-weight: 700; font-size: clamp(2.4rem, 6vw, 4.6rem); }
html[lang="ar"] .h2--xl { font-size: clamp(2.8rem, 8vw, 6rem); }
html[lang="ar"] em { font-style: normal; }

.section-intro { color: var(--text-2); font-size: 1.0625rem; max-width: 32rem; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.45rem;
  border-radius: 999px; border: 1px solid transparent;
  font-size: .9375rem; font-weight: 500; letter-spacing: .005em; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  touch-action: manipulation;
  transition: background-color var(--dur-2), color var(--dur-2), border-color var(--dur-2),
              box-shadow var(--dur-2), scale var(--dur-1) var(--ease-out), translate .5s var(--ease-out);
}
.btn:active { scale: .97; }
.btn .icon { width: 1.05em; height: 1.05em; flex: none; }
.btn--primary {
  background: var(--accent); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 12px 32px -14px rgb(var(--accent-rgb) / .9);
}
.btn--primary:hover { background: var(--accent-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 18px 44px -14px rgb(var(--accent-rgb) / 1); }
.btn--ghost { color: var(--text); border-color: var(--line-2); background: rgba(236, 231, 222, .03); }
.btn--ghost:hover { border-color: rgba(236, 231, 222, .42); background: rgba(236, 231, 222, .07); }
.btn--sm { min-height: 40px; padding: .55rem 1.05rem; font-size: .875rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn > .spinner { display: none; }
.btn[aria-busy="true"] > .spinner { display: inline-block; }
.btn[aria-busy="true"] > .arrow { display: none; }

.arrow { transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .arrow, .c-link:hover .arrow { transform: translateX(3px); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow, [dir="rtl"] .c-link:hover .arrow { transform: scaleX(-1) translateX(3px); }
.arrow--back { transform: scaleX(-1); }
.btn:hover .arrow--back { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .arrow--back, [dir="rtl"] .btn:hover .arrow--back { transform: none; }

.spinner {
  width: 1.05em; height: 1.05em; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-inline-end-color: transparent;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Header ───────────────────────────────────────────────────────── */
.site-header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: var(--z-header);
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: transform .5s var(--ease-out), background-color var(--dur-2), border-color var(--dur-2);
}
.site-header.is-scrolled {
  background: rgba(12, 13, 16, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__inner {
  height: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 44px; text-decoration: none;
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1;
}
html[lang="ar"] .brand { font-size: 1.3rem; font-weight: 700; }
.brand__mark { width: 26px; height: 26px; color: var(--text); flex: none; }
.brand__dot { fill: var(--accent-text); transition: fill var(--dur-2); }
.brand:hover .brand__dot { fill: var(--rec); }

.nav { display: none; }
.nav__list { display: flex; gap: .15rem; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; min-height: 40px;
  padding: .45rem .85rem; border-radius: 999px;
  font-size: .875rem; color: var(--text-2); text-decoration: none;
  transition: color var(--dur-2), background-color var(--dur-2);
}
.nav__link:hover { color: var(--text); background: rgba(236, 231, 222, .06); }
.nav__link[aria-current] { color: var(--text); }
.nav__link::after {
  content: ''; position: absolute; inset-inline-start: 50%; bottom: 4px;
  width: 4px; height: 4px; margin-inline-start: -2px; border-radius: 50%;
  background: var(--accent-text); transform: scale(0); transition: transform var(--dur-2) var(--ease-spring);
}
.nav__link[aria-current]::after { transform: scale(1); }

.site-header__tools { display: flex; align-items: center; gap: .5rem; }

.lang__list { display: flex; align-items: center; gap: .15rem; }
.lang__link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 36px; padding: .3rem .6rem; border-radius: 999px;
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em;
  color: var(--text-3); text-decoration: none;
  transition: color var(--dur-2), background-color var(--dur-2);
}
.lang__link:lang(ar) { font-family: var(--font-body); font-size: .85rem; letter-spacing: 0; }
.lang__link:hover { color: var(--text); }
.lang__link[aria-current] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.site-header .lang { display: none; }

.burger {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(12, 13, 16, .4);
}
.burger__lines { display: grid; gap: 6px; width: 18px; }
.burger__lines span { display: block; height: 1.5px; background: var(--text); border-radius: 2px; }
.burger__lines span:last-child { width: 60%; margin-inline-start: auto; }

@media (min-width: 560px) { .site-header .lang { display: block; } }
@media (min-width: 1000px) {
  .nav { display: block; }
  .burger { display: none; }
}

.scroll-progress { position: absolute; inset-inline: 0; bottom: -1px; height: 2px; pointer-events: none; }
.scroll-progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-text));
  transform-origin: 0 50%; transform: scaleX(0);
}
[dir="rtl"] .scroll-progress span { transform-origin: 100% 50%; background: linear-gradient(270deg, var(--accent), var(--accent-text)); }

/* ── Mobile menu (native <dialog>) ────────────────────────────────── */
.menu {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 0 var(--gutter) 2rem; border: 0;
  background: var(--bg); color: var(--text);
  overflow-y: auto; overscroll-behavior: contain;
}
.menu > nav { flex: 1; display: grid; align-content: center; }
.menu[open] { display: flex; flex-direction: column; animation: fadeIn .3s var(--ease-out); }
.menu.is-closing { animation: fadeOut .22s ease forwards; }
.menu::backdrop { background: transparent; }
.menu__top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); flex: none; }
.menu__close {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2);
}
.menu__close .icon { width: 20px; height: 20px; }
.menu__links { margin-block: auto; padding-block: 2rem; display: grid; gap: .25rem; }
.menu__link {
  display: flex; align-items: baseline; gap: 1rem; padding-block: .35rem;
  font-family: var(--font-display); font-size: clamp(2.5rem, 12vw, 4rem); line-height: 1.1;
  text-decoration: none;
}
html[lang="ar"] .menu__link { font-weight: 700; font-size: clamp(2.2rem, 10vw, 3.4rem); line-height: 1.5; }
.menu__num { font-family: var(--font-mono); font-size: .75rem; color: var(--text-3); letter-spacing: .1em; }
.menu[open] .menu__links li { animation: menuIn .7s var(--ease-out) both; animation-delay: calc(var(--i) * 55ms + 60ms); }
.menu__foot { display: grid; gap: 1.25rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.menu__email { color: var(--text-2); }
.lang--full .lang__link { font-family: var(--font-body); font-size: .9375rem; letter-spacing: 0; padding-inline: .9rem; min-height: 44px; }
html.menu-open { overflow: hidden; }

@keyframes menuIn { from { opacity: 0; transform: translateY(24px); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

/* ── Intro (letterbox opening, first visit only) ──────────────────── */
.intro { position: fixed; inset: 0; z-index: var(--z-intro); pointer-events: none; display: none; }
.js .intro { display: block; }
.js.intro-skip .intro { display: none; }
.intro__bar { position: absolute; inset-inline: 0; height: 50.5%; background: var(--bg); }
.intro__bar--top { top: 0; animation: introUp .8s var(--ease-in-out) .75s both; }
.intro__bar--bottom { bottom: 0; animation: introDown .8s var(--ease-in-out) .75s both; }
.intro__slate {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .9rem;
  animation: fadeOut .25s ease .62s forwards;
}
.intro__rec { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .2em; color: var(--text-2); }
.intro__rec i { width: 7px; height: 7px; border-radius: 50%; background: var(--rec); animation: blink 1s steps(2) infinite; }
.intro__name { font-family: var(--font-display); font-size: clamp(1.75rem, 5vw, 2.75rem); line-height: 1; }
.intro__line {
  width: min(62vw, 520px); height: 1px; background: linear-gradient(90deg, transparent, var(--accent-text), transparent);
  transform: scaleX(0); animation: introLine .55s var(--ease-out) .08s forwards;
}
@keyframes introUp { to { transform: translateY(-100%); } }
@keyframes introDown { to { transform: translateY(100%); } }
@keyframes introLine { to { transform: scaleX(1); } }
@keyframes blink { 50% { opacity: .15; } }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  --intro-delay: .95s;
  position: relative; isolation: isolate; overflow: clip;
  min-height: 100vh; min-height: max(600px, 100svh);
  display: grid; align-items: end;
  padding: calc(var(--header-h) + 4rem) var(--gutter) clamp(4.5rem, 11vh, 7rem);
}
.intro-skip .hero { --intro-delay: .1s; }
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; transform-origin: 50% 30%; }
.hero__media picture, .hero__poster, .hero__video, .hero__tint, .hero__shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__poster, .hero__video { object-fit: cover; }
.hero__video { opacity: 0; transition: opacity 1.4s var(--ease-out); }
.hero__video.is-playing { opacity: 1; }
.hero__tint { background: #1c2f73; mix-blend-mode: color; opacity: .28; }
.hero__shade {
  background:
    linear-gradient(180deg, rgba(12, 13, 16, .7) 0%, rgba(12, 13, 16, .1) 26%, rgba(12, 13, 16, .25) 55%, rgba(12, 13, 16, .92) 88%, var(--bg) 100%),
    linear-gradient(90deg, rgba(12, 13, 16, .78) 0%, rgba(12, 13, 16, .35) 45%, rgba(12, 13, 16, 0) 75%),
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}
[dir="rtl"] .hero__shade {
  background:
    linear-gradient(180deg, rgba(12, 13, 16, .7) 0%, rgba(12, 13, 16, .1) 26%, rgba(12, 13, 16, .25) 55%, rgba(12, 13, 16, .92) 88%, var(--bg) 100%),
    linear-gradient(270deg, rgba(12, 13, 16, .78) 0%, rgba(12, 13, 16, .35) 45%, rgba(12, 13, 16, 0) 75%),
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}

/* Viewfinder HUD */
.hud {
  position: absolute; inset: calc(var(--header-h) + .75rem) var(--gutter) 1.1rem;
  pointer-events: none; font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .14em;
  color: rgba(236, 231, 222, .72);
  animation: fadeIn 1.2s var(--ease-out) calc(var(--intro-delay) + .5s) both;
}
.hud__corner { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(236, 231, 222, .5); }
.hud__corner--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hud__corner--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hud__corner--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hud__corner--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.hud__rec { position: absolute; top: 10px; left: 34px; display: inline-flex; align-items: center; gap: .5rem; }
.hud__rec i { width: 7px; height: 7px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 10px var(--rec); animation: blink 1.2s steps(2) infinite; }
.hud__tc { position: absolute; top: 10px; right: 34px; font-variant-numeric: tabular-nums; }
.hud__tc b { font-weight: 400; color: var(--text); }
.hud__specs { position: absolute; bottom: 8px; right: 34px; display: none; }
.hud__cross { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; opacity: .35; display: none; }
.hud__cross::before, .hud__cross::after { content: ''; position: absolute; background: var(--text); }
.hud__cross::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.hud__cross::after { top: 50%; left: 0; right: 0; height: 1px; }
@media (min-width: 900px) { .hud__specs, .hud__cross { display: block; } }

.hero__content { position: relative; max-width: 62rem; padding-inline: clamp(.25rem, 2vw, 2rem); }
.hero__role {
  font-family: var(--label-font); font-size: .75rem; font-weight: 500;
  letter-spacing: var(--label-tracking); text-transform: var(--label-transform);
  color: var(--accent-text);
}
html[lang="ar"] .hero__role { font-size: 1rem; }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(4.25rem, 19vw, 13rem);
  line-height: .84; letter-spacing: -.025em;
  margin-block: .9rem 1.4rem;
}
html[lang="ar"] .hero__title { font-weight: 700; line-height: 1; letter-spacing: 0; font-size: clamp(4rem, 18vw, 11rem); margin-block: .5rem 1rem; }
.hero__title .line { display: block; overflow: clip; padding-block: .08em .04em; margin-block: -.08em -.04em; }
html[lang="ar"] .hero__title .line { padding-block: .1em .42em; margin-block: -.1em -.42em; } /* deep Arabic descenders (ي) */
.hero__title .line > span { display: inline-block; padding-inline-end: .08em; }
.hero__title .line--em { padding-inline-start: clamp(.5em, 8vw, 1.1em); }
.hero__title em {
  font-style: italic;
  background: linear-gradient(100deg, var(--text) 20%, var(--accent-text) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { max-width: 33rem; color: var(--text-2); font-size: clamp(1rem, 1.25vw, 1.125rem); }
.hero__ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }

.hero__scroll {
  position: absolute; inset-inline-end: calc(var(--gutter) + 1.75rem); bottom: 2.4rem;
  display: none; flex-direction: column; align-items: center; gap: .75rem;
  font-family: var(--font-mono); font-size: .625rem; letter-spacing: .25em; text-transform: uppercase; color: var(--text-3);
}
.hero__scroll span { writing-mode: vertical-rl; }
.hero__scroll i { position: relative; width: 1px; height: 56px; background: var(--line-2); overflow: hidden; }
.hero__scroll i::after { content: ''; position: absolute; inset: 0; background: var(--accent-text); animation: scrollCue 2.2s var(--ease-in-out) infinite; }
@keyframes scrollCue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
@media (min-width: 900px) { .hero__scroll { display: flex; } }

/* Staged entrance (pure CSS so it never depends on JS succeeding) */
.hero-in { animation: heroIn 1s var(--ease-out) both; animation-delay: calc(var(--intro-delay) + var(--d, 0) * 90ms); }
.hero__title .hero-in { animation-name: heroLine; animation-duration: 1.1s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } }
@keyframes heroLine { from { transform: translateY(105%); } }

/* ── Marquee ──────────────────────────────────────────────────────── */
.marquee { overflow: clip; padding-block: clamp(1.75rem, 4vw, 3rem); border-block: 1px solid var(--line); }
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee__group { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); padding-inline-end: clamp(1.5rem, 3vw, 3rem); }
.marquee__item {
  font-family: var(--font-display); font-size: clamp(2.5rem, 7vw, 6rem); line-height: 1.1; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(236, 231, 222, .32);
}
.marquee__item:nth-of-type(3n+1) { color: var(--text); -webkit-text-stroke: 0; }
.marquee__item:nth-of-type(3n+2) { font-style: italic; }
html[lang="ar"] .marquee__item { -webkit-text-stroke: 0; color: rgba(236, 231, 222, .26); font-style: normal; font-weight: 700; }
html[lang="ar"] .marquee__item:nth-of-type(3n+1) { color: var(--text); }
.marquee__sep { width: clamp(18px, 2vw, 26px); height: auto; color: var(--accent-text); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marqueeRtl { to { transform: translateX(50%); } }
[dir="rtl"] .marquee__track { animation-name: marqueeRtl; }

/* ── Reveal on scroll (hidden only when JS runs; failsafe below) ──── */
.js .reveal {
  opacity: 0; transform: translate3d(0, 28px, 0);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js [data-split] .w {
  display: inline-block; opacity: 0; transform: translateY(.4em); filter: blur(8px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out), filter .8s var(--ease-out);
  transition-delay: calc(var(--wi, 0) * 55ms);
}
.js [data-split].is-in .w { opacity: 1; transform: none; filter: none; }
.js-failed .reveal, .js-failed [data-split] .w { opacity: 1 !important; transform: none !important; filter: none !important; }

.js img[data-fade] { opacity: 0; transition: opacity .8s var(--ease-out); }
.js img[data-fade].is-loaded, .js-failed img[data-fade] { opacity: 1; }

/* Pointer spotlight on cards */
.spot { position: relative; }
.spot::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(142, 166, 255, .55), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s;
}
.spot:hover::before { opacity: 1; }

/* ── Showreel ─────────────────────────────────────────────────────── */
.reel__stage { padding-inline: var(--gutter); }
.reel__frame {
  position: relative; max-width: 1400px; margin-inline: auto;
  aspect-ratio: 16 / 9; border-radius: var(--radius-l); overflow: hidden;
  background: #000;
  box-shadow: 0 50px 120px -50px rgb(var(--accent-rgb) / .55), 0 0 0 1px var(--line);
  transform-origin: 50% 0;
}
.reel__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.reel__cover {
  position: absolute; inset: 0; display: grid; place-items: center; width: 100%;
  color: var(--text); overflow: hidden; text-align: start;
  transition: opacity .5s var(--ease-out), visibility .5s;
}
.reel__cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.72) saturate(.9); transform: scale(1.02);
  transition: transform 1.4s var(--ease-out), filter .6s;
}
.reel__cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(12, 13, 16, .75)); }
.reel__cover:hover img, .reel__cover:focus-visible img { transform: scale(1.07); filter: brightness(.82) saturate(1); }
.reel__cover:focus-visible { outline-offset: -4px; }
.reel__play {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: clamp(76px, 9vw, 116px); aspect-ratio: 1; border-radius: 50%;
  background: rgba(12, 13, 16, .3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(236, 231, 222, .45);
  transition: transform .5s var(--ease-spring), background-color .3s, border-color .3s;
}
.reel__play::after {
  content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgba(236, 231, 222, .4);
  animation: ring 2.6s var(--ease-out) infinite;
}
.reel__play .icon { width: 34%; height: 34%; margin-inline-start: 6%; }
[dir="rtl"] .reel__play .icon { margin-inline-start: 0; margin-inline-end: -6%; }
.reel__cover:hover .reel__play { transform: scale(1.08); background: var(--accent); border-color: var(--accent); }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.reel__label { position: absolute; z-index: 1; inset-inline-start: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 2.5vw, 1.75rem); display: grid; gap: .2rem; }
.reel__label-title { font-family: var(--font-display); font-size: clamp(1.25rem, 2.4vw, 1.9rem); line-height: 1.1; }
html[lang="ar"] .reel__label-title { font-weight: 700; }
.reel__label-meta { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; color: var(--text-2); }
.reel.is-started .reel__cover, .reel__frame.is-started .reel__cover { opacity: 0; visibility: hidden; pointer-events: none; }
.reel__status {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: .9rem;
  background: rgba(12, 13, 16, .55); text-align: center; pointer-events: none;
}
.reel__status .spinner { width: 34px; height: 34px; color: var(--text); }
.reel__status[data-state="error"] { pointer-events: auto; background: rgba(12, 13, 16, .85); }
.reel__status[data-state="error"] .spinner { display: none; }
.reel__msg { color: var(--text-2); font-size: .9375rem; }

/* ── About ────────────────────────────────────────────────────────── */
.about__grid { display: grid; gap: clamp(3rem, 6vw, 6rem); }
@media (min-width: 1000px) { .about__grid { grid-template-columns: 1.15fr .85fr; align-items: start; } }
.about__text .h2 { margin-block: 1.25rem 2rem; }
.about__text p:not(.eyebrow) { color: var(--text-2); font-size: 1.0625rem; max-width: 36rem; }
.about__text p + p { margin-top: 1.1rem; }
.about__text strong { color: var(--text); font-weight: 500; }

.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem;
  margin-top: 3rem; padding-top: 2.25rem; border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column-reverse; gap: .5rem; }
.stat dd {
  display: flex; align-items: baseline; gap: .05em;
  font-family: var(--font-display); font-size: clamp(2.75rem, 5vw, 3.9rem); line-height: 1;
  font-variant-numeric: tabular-nums; margin: 0;
}
.stat__suffix { color: var(--accent-text); }
.stat dt {
  font-family: var(--label-font); font-size: .75rem; letter-spacing: calc(var(--label-tracking) * .6);
  text-transform: var(--label-transform); color: var(--text-3); line-height: 1.4;
}
html[lang="ar"] .stat dt { font-size: .9rem; }

.skills {
  border-radius: var(--radius-l); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  padding: clamp(1.6rem, 3vw, 2.5rem);
}
@media (min-width: 1000px) { .skills { position: sticky; top: calc(var(--header-h) + 2rem); } }
.skills__title { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; margin-bottom: 1.75rem; }
html[lang="ar"] .skills__title { font-weight: 700; }
.skills__group + .skills__group { margin-top: 1.75rem; }
.skills__label {
  font-family: var(--label-font); font-size: .75rem; letter-spacing: var(--label-tracking);
  text-transform: var(--label-transform); color: var(--text-3); margin-bottom: .8rem;
}
html[lang="ar"] .skills__label { font-size: .9rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: .8125rem; line-height: 1.3; color: var(--text-2); background: rgba(236, 231, 222, .02);
  transition: border-color var(--dur-2), color var(--dur-2), background-color var(--dur-2);
}
.tag:hover { border-color: rgba(142, 166, 255, .55); color: var(--text); background: rgba(31, 62, 156, .22); }

/* ── Frames gallery ───────────────────────────────────────────────── */
.work__viewport {
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.work__viewport::-webkit-scrollbar { display: none; }
.work__viewport:focus-visible { outline-offset: -2px; }
.work__track { display: flex; gap: clamp(1rem, 2.5vw, 2rem); width: max-content; padding-bottom: .5rem; }
.frame { flex: none; scroll-snap-align: start; width: min(84vw, 620px); }
.frame figure { display: grid; gap: 1rem; }
.frame__img {
  width: 100%; height: auto; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(110deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.8s linear infinite;
}
.frame__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.frame figcaption { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem .9rem; padding-inline: .15rem; }
.frame__idx { font-family: var(--font-mono); font-size: .75rem; color: var(--accent-text); letter-spacing: .08em; }
.frame__title { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; line-height: 1.2; }
html[lang="ar"] .frame__title:not([lang]) { font-style: normal; font-weight: 700; font-size: 1.2rem; }
.frame__slug { font-family: var(--label-font); font-size: .6875rem; letter-spacing: calc(var(--label-tracking) * .7); text-transform: var(--label-transform); color: var(--text-3); margin-inline-start: auto; }
html[lang="ar"] .frame__slug { font-size: .8125rem; }
@keyframes shimmer { to { background-position: -300% 0; } }
@media (min-width: 700px) {
  .frame { width: auto; }
  .frame__img { width: auto; height: clamp(260px, 40vw, 380px); }
}

.work__meta { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.75rem; font-family: var(--font-mono); font-size: .75rem; color: var(--text-3); letter-spacing: .1em; }
.work__count b { color: var(--text); font-weight: 400; }
.work__bar { flex: 1; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.work__bar i { position: absolute; inset: 0; background: var(--accent-text); transform-origin: 0 50%; transform: scaleX(.125); }
[dir="rtl"] .work__bar i { transform-origin: 100% 50%; }
.work__hint { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--label-font); letter-spacing: var(--label-tracking); text-transform: var(--label-transform); }
.work__hint .icon { width: 14px; height: 14px; }

/* Pinned horizontal scroll (large screens, JS-enabled, motion allowed) */
.work.is-pinned .work__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center; overflow: clip;
}
.work.is-pinned .work__viewport { overflow: visible; scroll-snap-type: none; }
.work.is-pinned .work__track { will-change: transform; }
.work.is-pinned .frame__img { height: min(58vh, 540px); }
.work.is-pinned .frame__img img { will-change: transform; }

/* ── Experience timeline ──────────────────────────────────────────── */
.timeline { position: relative; --rail: .4rem; padding-inline-start: 2.25rem; }
.timeline__rail { position: absolute; inset-block: .5rem; inset-inline-start: var(--rail); width: 1px; background: var(--line-2); }
.timeline__fill { position: absolute; inset: 0; background: linear-gradient(180deg, var(--accent-text), var(--accent)); transform-origin: 50% 0; transform: scaleY(0); }
.tl-item { position: relative; display: grid; gap: .4rem; padding-block: 1.6rem; border-bottom: 1px solid var(--line); }
.tl-item:first-child { padding-top: 0; }
.tl-item__dot {
  position: absolute; inset-inline-start: calc(var(--rail) - 2.25rem - 5px); top: 2.05rem;
  width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--text-3);
  transition: background-color .4s, border-color .4s, box-shadow .4s;
}
.tl-item:first-child .tl-item__dot { top: .45rem; }
.tl-item.is-active .tl-item__dot { background: var(--accent-text); border-color: var(--accent-text); box-shadow: 0 0 0 5px rgba(142, 166, 255, .15); }
.tl-item__date { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .08em; color: var(--accent-text); padding-top: .15rem; }
.tl-item__body { border-radius: var(--radius); }
.tl-item__title { font-family: var(--font-display); font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.15; }
html[lang="ar"] .tl-item__title { font-weight: 700; font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.5; }
.tl-item__company {
  margin-top: .35rem; font-family: var(--label-font); font-size: .75rem;
  letter-spacing: calc(var(--label-tracking) * .7); text-transform: var(--label-transform); color: var(--text-3);
}
html[lang="ar"] .tl-item__company { font-size: .875rem; }
.tl-item__desc { margin-top: .85rem; color: var(--text-2); max-width: 44rem; }

@media (min-width: 800px) {
  .timeline { --rail: 11.5rem; padding-inline-start: 0; }
  .tl-item { grid-template-columns: 9.5rem 1fr; column-gap: 4.5rem; padding-block: 2.1rem; }
  .tl-item__dot { inset-inline-start: calc(var(--rail) - 5px); top: 2.55rem; }
  .tl-item:first-child .tl-item__dot { top: .5rem; }
  .tl-item__body { padding: 1.25rem 1.5rem; margin: -1.25rem -1.5rem; border: 1px solid transparent; transition: background-color .4s, border-color .4s; }
  .tl-item__body:hover { background: rgba(21, 23, 28, .7); border-color: var(--line); }
}

/* ── Contact ──────────────────────────────────────────────────────── */
.contact { background: radial-gradient(60% 50% at 85% 55%, rgba(31, 62, 156, .2), transparent 70%); }
[dir="rtl"] .contact { background: radial-gradient(60% 50% at 15% 55%, rgba(31, 62, 156, .2), transparent 70%); }
.contact__grid { display: grid; gap: 3.5rem; }
@media (min-width: 1000px) { .contact__grid { grid-template-columns: 1fr minmax(0, 33rem); gap: 5rem; align-items: start; } }
.contact__text .h2 { margin-block: 1.25rem 1.75rem; }

.availability {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.75rem;
  padding: .5rem .95rem; border-radius: 999px;
  border: 1px solid rgba(90, 209, 154, .3); background: rgba(90, 209, 154, .08);
  color: #c4f1dc; font-size: .875rem;
}
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.pulse-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ring 2s var(--ease-out) infinite; }

.contact-links { margin-top: 2.25rem; border-top: 1px solid var(--line); }
.c-link {
  position: relative; display: flex; align-items: center; gap: 1rem;
  min-height: 64px; padding-block: .9rem; border-bottom: 1px solid var(--line);
}
.c-link__icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--accent-text);
  transition: background-color var(--dur-2), border-color var(--dur-2);
}
.c-link__icon .icon { width: 18px; height: 18px; }
.c-link:hover .c-link__icon { background: rgba(31, 62, 156, .25); border-color: rgba(142, 166, 255, .4); }
.c-link__text { display: grid; gap: .1rem; min-width: 0; flex: 1; text-decoration: none; }
.c-link__label { font-family: var(--label-font); font-size: .6875rem; letter-spacing: var(--label-tracking); text-transform: var(--label-transform); color: var(--text-3); }
html[lang="ar"] .c-link__label { font-size: .8125rem; }
.c-link__value { color: var(--text); overflow-wrap: anywhere; }
.c-link__text > a.c-link__value { justify-self: start; }
a.c-link__value, .c-link__value a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--dur-3) var(--ease-out); }
[dir="rtl"] a.c-link__value { background-position: 100% 100%; }
a.c-link__value:hover { background-size: 100% 1px; }
.c-link__stretch::after { content: ''; position: absolute; inset: 0; }
.c-link__arrow { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.c-link__copy {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none;
  color: var(--text-3); transition: color var(--dur-2), background-color var(--dur-2);
}
.c-link__copy:hover { color: var(--text); background: rgba(236, 231, 222, .06); }
.c-link__copy .icon { width: 18px; height: 18px; }

.card {
  border-radius: var(--radius-l); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(27, 30, 37, .92), rgba(18, 20, 24, .92));
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.card__title { font-family: var(--font-display); font-size: clamp(2rem, 3.5vw, 2.5rem); line-height: 1.05; }
html[lang="ar"] .card__title { font-weight: 700; line-height: 1.45; font-size: clamp(1.7rem, 3vw, 2.1rem); }
.card__sub { margin-top: .5rem; color: var(--text-3); font-size: .875rem; }

.form { display: grid; gap: 1.15rem; margin-top: 1.75rem; }
.field { display: grid; gap: .45rem; }
.field__label { font-size: .875rem; font-weight: 500; color: var(--text-2); }
.req { color: var(--accent-text); }
.input {
  width: 100%; min-height: 50px; padding: .8rem 1rem;
  border-radius: var(--radius-s); border: 1px solid var(--line-2);
  background: rgba(12, 13, 16, .55); color: var(--text); font-size: 1rem; line-height: 1.5;
  transition: border-color var(--dur-2), box-shadow var(--dur-2), background-color var(--dur-2);
}
.input::placeholder { color: rgba(236, 231, 222, .34); }
.input:hover { border-color: rgba(236, 231, 222, .3); }
.input:focus { outline: none; border-color: var(--accent-text); background: rgba(12, 13, 16, .85); box-shadow: 0 0 0 4px rgba(142, 166, 255, .2); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(255, 123, 114, .2); }
.input--area { min-height: 150px; resize: vertical; }
[dir="rtl"] input[type="email"] { text-align: right; }
.field__meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.field__error { display: flex; gap: .4rem; color: var(--danger); font-size: .8125rem; line-height: 1.45; }
.field__count { margin-inline-start: auto; font-family: var(--font-mono); font-size: .75rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.field__count.is-near { color: var(--warn); }
.field__count.is-over { color: var(--danger); }

.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.turnstile { position: relative; min-height: 65px; }
.turnstile__skeleton {
  position: absolute; inset: 0; display: flex; align-items: center; gap: .75rem; padding-inline: 1rem;
  border-radius: var(--radius-s); border: 1px dashed var(--line-2); color: var(--text-3); font-size: .8125rem;
  background: linear-gradient(110deg, transparent 30%, rgba(236, 231, 222, .04) 50%, transparent 70%) 0 0 / 300% 100%;
  animation: shimmer 1.8s linear infinite;
}
.turnstile__skeleton.is-error { border-style: solid; border-color: rgba(255, 123, 114, .4); color: var(--danger); animation: none; }
.turnstile__mount { position: relative; }

.form-summary, .form-alert {
  border-radius: 12px; border: 1px solid rgba(255, 123, 114, .35); background: rgba(255, 123, 114, .08);
  color: #ffd7d3; font-size: .875rem;
}
.form-summary { margin-top: 1.5rem; padding: 1rem 1.2rem; }
.form-summary:focus { outline: 2px solid var(--danger); outline-offset: 2px; }
.form-summary__title { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.form-summary ul { margin-top: .5rem; padding-inline-start: 1.7rem; list-style: disc; }
.form-summary a { color: #fff; }
.form-alert { display: flex; gap: .6rem; align-items: flex-start; padding: .85rem 1rem; }
.form-summary .icon, .form-alert .icon { width: 18px; height: 18px; flex: none; margin-top: .1rem; }
.form__privacy { font-size: .78rem; line-height: 1.55; color: var(--text-3); }
.form__privacy a { color: var(--text-2); }
.form__noscript { margin-top: 1.5rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--line-2); color: var(--text-2); }
.no-js .form, .no-js .turnstile { display: none; }

.success { display: grid; justify-items: center; gap: .6rem; text-align: center; padding-block: 2.5rem 1.5rem; }
.success .card__title:focus { outline: none; }
.success .btn { margin-top: 1.5rem; }
.success__check { width: 76px; height: 76px; margin-bottom: .75rem; }
.success__check circle { stroke: rgba(90, 209, 154, .35); stroke-width: 2; }
.success__check path { stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.success:not([hidden]) .success__check path { animation: draw .7s var(--ease-out) .15s forwards; }
.success:not([hidden]) .success__check { animation: pop .6s var(--ease-spring) both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(4rem, 9vw, 7rem) 2.25rem; overflow: clip; }
.footer__word {
  font-family: var(--font-display); font-size: clamp(3.75rem, 17vw, 15.5rem); line-height: .9; letter-spacing: -.03em;
  white-space: nowrap; user-select: none;
}
.footer__word span {
  --fill: 0%;
  color: transparent; -webkit-text-stroke: 1px rgba(236, 231, 222, .2);
  background: linear-gradient(90deg, var(--text) var(--fill), transparent var(--fill));
  -webkit-background-clip: text; background-clip: text;
}
[dir="rtl"] .footer__word span { background: linear-gradient(270deg, var(--text) var(--fill), transparent var(--fill)); -webkit-background-clip: text; background-clip: text; }
html[lang="ar"] .footer__word { font-weight: 700; letter-spacing: 0; line-height: 1.3; }
html[lang="ar"] .footer__word span { -webkit-text-stroke: 0; color: rgba(236, 231, 222, .1); }
.footer__grid {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2.5rem;
  margin-top: clamp(2rem, 5vw, 3.5rem); padding-top: 1.75rem; border-top: 1px solid var(--line);
  font-size: .8125rem; color: var(--text-3);
}
.footer__copy { flex: 1 1 18rem; }
.footer__links a { color: var(--text-2); }
.footer__links a:hover { color: var(--text); }
.lang--footer .lang__link { font-family: var(--font-body); font-size: .8125rem; letter-spacing: 0; }

/* Back to top with scroll-progress ring */
.back-top {
  position: fixed; inset-inline-end: 1.25rem; bottom: 1.25rem; z-index: var(--z-fab);
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(21, 23, 28, .85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--text); text-decoration: none;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--dur-2), visibility var(--dur-2), transform var(--dur-2) var(--ease-out), background-color var(--dur-2);
}
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { background: var(--accent); }
.back-top .icon { width: 18px; height: 18px; }
.back-top__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.back-top__ring circle { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.back-top__ring .back-top__progress { stroke: var(--accent-text); stroke-dasharray: 100; stroke-dashoffset: 100; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: var(--z-toast);
  padding: .7rem 1.1rem; border-radius: 999px; background: var(--text); color: var(--bg);
  font-size: .875rem; font-weight: 500; white-space: nowrap;
  transform: translate(-50%, 150%); opacity: 0; pointer-events: none;
  transition: transform .45s var(--ease-spring), opacity .3s;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast:empty { visibility: hidden; }

/* ── Legal page ───────────────────────────────────────────────────── */
.legal { padding-block: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)) clamp(4rem, 8vw, 6rem); }
.legal__container { max-width: calc(52rem + 2 * var(--gutter)); }
.legal__head .h2 { font-size: clamp(2.6rem, 6.5vw, 4.75rem); }
.legal__updated { color: var(--text-3); font-size: .875rem; }
.legal__section { padding-block: 2rem; border-top: 1px solid var(--line); }
.legal__section h2 { display: flex; align-items: baseline; gap: 1rem; font-family: var(--font-display); font-size: 1.75rem; line-height: 1.2; margin-bottom: .9rem; }
html[lang="ar"] .legal__section h2 { font-weight: 700; font-size: 1.45rem; }
.legal__num { font-family: var(--font-mono); font-size: .75rem; color: var(--accent-text); letter-spacing: .1em; }
.legal__section p, .legal__section li { color: var(--text-2); }
.legal__section p + p { margin-top: .9rem; }
.legal__section ul { padding-inline-start: 1.2rem; display: grid; gap: .6rem; }
.legal__section a { color: var(--text); }
.legal__section strong { color: var(--text); font-weight: 500; }
.legal__back { margin-top: 2.5rem; }

/* ── Error page (film leader countdown) ───────────────────────────── */
.error { min-height: 100svh; display: grid; align-items: center; padding-block: calc(var(--header-h) + 3rem) 4rem; }
.error__grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
@media (min-width: 900px) { .error__grid { grid-template-columns: auto 1fr; } }
.error__text .h2 { margin-block: 1.25rem 1.25rem; font-size: clamp(2.5rem, 6vw, 4.5rem); }
.error__ctas { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 2rem; }

@property --sweep { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.leader {
  position: relative; width: clamp(220px, 34vw, 340px); aspect-ratio: 1; margin-inline: auto;
  display: grid; place-items: center; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle, var(--surface-2), var(--bg-2));
  box-shadow: 0 0 0 1px var(--line), 0 40px 100px -40px rgb(var(--accent-rgb) / .6);
}
.leader__sweep {
  position: absolute; inset: 0;
  background: conic-gradient(rgba(142, 166, 255, .28) var(--sweep), transparent var(--sweep));
  animation: sweep 1s linear infinite;
}
@keyframes sweep { to { --sweep: 360deg; } }
.leader__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.leader__svg circle, .leader__svg path { fill: none; stroke: rgba(236, 231, 222, .35); stroke-width: 1; }
.leader__num { position: relative; display: flex; font-family: var(--font-display); font-size: clamp(4.5rem, 10vw, 7rem); line-height: 1; }
.leader__num span { animation: flicker 3s steps(1) infinite; animation-delay: calc(var(--n) * .35s); }
@keyframes flicker { 0%, 100% { opacity: 1; } 92% { opacity: .35; } }

/* ── Large screens ────────────────────────────────────────────────── */
@media (min-width: 1000px) {
  :root { --header-h: 76px; }
  .back-top { inset-inline-end: 2rem; bottom: 2rem; }
}

/* ── Reduced motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  body::after { animation: none; }
  .intro { display: none !important; }
  .hero-in, .hero__title .hero-in, .hud { animation: none !important; }
  .marquee__track { animation: none; }
  .js .reveal, .js [data-split] .w { opacity: 1; transform: none; filter: none; }
  .spinner { animation-duration: 1.5s !important; animation-iteration-count: infinite !important; }
  .frame__img { animation: none; }
  @view-transition { navigation: none; }
}

/* ── Print ────────────────────────────────────────────────────────── */
@media print {
  body::after, .site-header, .menu, .intro, .hud, .hero__media, .marquee, .back-top, .toast, .reel__stage, .form, .turnstile, .footer__word, .hero__scroll { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { min-height: 0; padding: 0 0 1rem; }
  .section { padding-block: 1.5rem; }
  .js .reveal, .js [data-split] .w { opacity: 1 !important; transform: none !important; filter: none !important; }
  .h2 em, .hero__title em { color: #000; -webkit-text-fill-color: #000; }
  .work__track { flex-wrap: wrap; width: auto; }
}
