/* Thmanyah Sans (ثمانية) for all Arabic text */
@font-face { font-family: "Thmanyah"; src: url("fonts/thmanyahsans-light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Thmanyah"; src: url("fonts/thmanyahsans-regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Thmanyah"; src: url("fonts/thmanyahsans-medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Thmanyah"; src: url("fonts/thmanyahsans-bold.otf") format("opentype"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Thmanyah"; src: url("fonts/thmanyahsans-black.otf") format("opentype"); font-weight: 800 900; font-display: swap; }

:root {
  --bg: #0a0a0b;
  --bg-2: #121214;
  --fg: #f2f2f2;
  --muted: #8b8b92;
  --line: #26262b;
  --accent: #3478ff;
  --accent-ink: #ffffff;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Inter Tight", system-ui, sans-serif;
  --arabic: "Thmanyah", "Alexandria", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
section { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.ar { font-family: var(--arabic); direction: rtl; font-style: normal; }
.label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 24px; }
.center { text-align: center; margin-top: 64px; }
.section-title { font-family: var(--display); font-weight: 700; font-size: clamp(32px, 6vw, 80px); line-height: 1; text-transform: uppercase; margin: 0 0 64px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 18px 24px; font-weight: 600; border-radius: var(--radius); cursor: pointer; transition: transform .3s, background .3s, color .3s; }
.btn em { font-style: normal; transition: transform .3s; }
.btn:hover em { transform: translate(3px, -3px) rotate(-45deg); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #fff; color: var(--bg); }
.btn--line { border: 1px solid var(--line); }
.btn--line:hover { border-color: var(--accent); color: var(--accent); }
.btn .ar { opacity: .75; font-size: 14px; }

/* ---------- nav + menu ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: center; padding: 16px var(--gutter); pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav__logo img { height: 40px; width: auto; opacity: 0; transition: opacity .4s; }
body.scrolled .nav__logo img { opacity: 1; }
.nav__burger { width: 56px; height: 44px; border: 1px solid var(--accent); background: rgba(10,10,11,.6); backdrop-filter: blur(8px); border-radius: var(--radius); display: grid; place-content: center; gap: 6px; cursor: pointer; }
.nav__burger span { display: block; width: 26px; height: 2px; background: var(--accent); transition: transform .35s; }
body.menu-open .nav__burger span:first-child { transform: translateY(4px) rotate(45deg); }
body.menu-open .nav__burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 40; background: var(--bg-2); display: grid; grid-template-columns: 2fr 1fr; gap: 48px; padding: 120px var(--gutter) 48px; clip-path: inset(0 0 100% 0); transition: clip-path .6s cubic-bezier(.7,0,.2,1); }
body.menu-open .menu { clip-path: inset(0 0 0 0); }
.menu__links a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-family: var(--display); font-weight: 700; font-size: clamp(36px, 7vw, 88px); line-height: 1.1; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.menu__links a i { font-size: .35em; color: var(--muted); }
.menu__links a:hover { color: var(--accent); }
.menu__side { display: flex; flex-direction: column; gap: 8px; align-self: end; }
.menu__side .label { margin: 24px 0 4px; }
.menu__side a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; min-height: 100vh; padding-top: 24px; padding-bottom: 24px; }
.hero__left { display: flex; flex-direction: column; padding-top: 24px; }
.hero__sig img { width: min(100%, 620px); height: auto; visibility: hidden; } /* layout slot; .sig-fly draws it */
.hero__sig { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* flying signature: big in hero → small in nav */
.sig-fly { position: fixed; top: 0; left: 0; z-index: 60; transform-origin: 0 0; will-change: transform; }
.sig-fly img { width: 100%; height: auto; }
.hero__arname { font-size: clamp(28px, 4vw, 52px); font-weight: 800; margin: -8px 0 0; text-align: left; color: var(--accent); }
.hero__meta { display: flex; gap: 48px; margin: 32px 0 auto; font-size: 14px; }
.hero__meta div { display: flex; flex-direction: column; }
.hero__meta div:first-child { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 8px; max-width: 170px; }
.hero__meta small { color: var(--muted); font-size: 13px; width: 100%; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52,120,255,0); } 100% { box-shadow: 0 0 0 0 rgba(52,120,255,0); } }
.hero__eyebrow { margin: 48px 0 4px; color: var(--accent); font-family: var(--display); font-size: 22px; display: flex; gap: 12px; align-items: baseline; }
.work__logo { max-height: 72px; width: auto; margin: 12px 0 4px; }
.hero__title { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 4.4vw, 64px); line-height: 1.05; margin: 0; }
.hero__title-ar { font-size: clamp(22px, 2.4vw, 32px); color: var(--muted); margin: 12px 0 0; text-align: left; }
.hero__intro { color: var(--muted); max-width: 420px; margin: 20px 0 32px; }
.hero__left .btn { align-self: stretch; justify-content: space-between; }

.hero__right { position: relative; }
.hero__frame { position: sticky; top: 24px; height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #050507; }
.hero__frame video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s; }
.hero__frame:hover video { transform: scale(1.03); }

/* ---------- manifesto ---------- */
.manifesto { position: relative; overflow: hidden; isolation: isolate; min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; }
.manifesto::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("assets/portrait.webp") right 15% center / auto 120% no-repeat; filter: grayscale(1) contrast(1.15); transform: translateY(var(--par, 0px)); }
.manifesto::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 25%, rgba(10,10,11,.55) 60%, rgba(10,10,11,.2)), linear-gradient(0deg, var(--bg), transparent 40%), linear-gradient(180deg, var(--bg), transparent 25%); }
.manifesto__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; }
.manifesto__big { font-family: var(--display); font-weight: 900; font-size: clamp(64px, 13vw, 200px); line-height: .88; text-transform: uppercase; margin: 0; }
.manifesto__big::first-line { color: var(--accent); }
.manifesto__ar { font-size: clamp(36px, 5vw, 72px); font-weight: 800; color: var(--accent); margin: 0 0 24px; line-height: 1.2; }
.manifesto__text { font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.3; margin: 0; }
.reveal-words span { opacity: .15; transition: opacity .4s; }
.reveal-words span.on { opacity: 1; }

/* ---------- marquee ---------- */
.works { padding-left: 0; padding-right: 0; }
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 16px 0; margin-bottom: 80px; }
.marquee__track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee span { font-family: var(--display); font-weight: 900; font-size: clamp(48px, 9vw, 140px); text-transform: uppercase; white-space: nowrap; padding-right: 64px; line-height: 1; }
.marquee sup { font-size: .25em; color: var(--accent); vertical-align: top; }
.marquee i { font-size: .45em; color: var(--accent); margin-left: 24px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- works ---------- */
.works__list { padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 24px; }
.work { position: sticky; top: 72px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 78vh; }
.work__img { position: relative; overflow: hidden; background: #000; }
.work__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s; }
.work:hover .work__img img { transform: scale(1.04); }
.work__img--empty { display: grid; place-content: center; text-align: center; color: var(--muted); background: repeating-linear-gradient(45deg, #0e0e10 0 12px, #121216 12px 24px); }
.work__body { padding: clamp(24px, 3vw, 48px); display: flex; flex-direction: column; }
.work__num { color: var(--accent); font-family: var(--display); font-size: 14px; }
.work__name { font-family: var(--display); font-weight: 900; font-size: clamp(32px, 4vw, 60px); line-height: 1; margin: 12px 0 4px; text-transform: uppercase; }
.work__ar { font-size: 24px; color: var(--accent); margin: 0 0 24px; text-align: left; }
.work__sum { color: var(--muted); margin: 0 0 32px; }
.work__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: auto; font-size: 14px; }
.work__meta p { margin: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.work__meta div > span { display: block; }
.work .btn { margin-top: 32px; justify-content: space-between; }

/* ---------- services ---------- */
.services__list { list-style: none; margin: 0; padding: 0; }
.services__list li { display: flex; align-items: baseline; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); transition: color .3s, padding .3s; }
.services__list li:hover { color: var(--accent); padding-left: 16px; }
.services__list sup { font-family: var(--display); font-size: 14px; color: var(--accent); }
.services__list span { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(36px, 7.5vw, 112px); line-height: 1; }
.services__list i { margin-left: auto; font-size: clamp(16px, 2vw, 28px); color: var(--muted); }

/* ---------- why / stats ---------- */
.why__text { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 3.6vw, 52px); line-height: 1.15; max-width: 1100px; margin: 0; }
.why__text em { font-style: normal; color: var(--accent); }
.why__text-ar { font-size: clamp(20px, 2.4vw, 32px); color: var(--muted); margin: 24px 0 0; max-width: 1100px; text-align: left; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 80px; }
.stat { border-top: 1px solid var(--line); padding-top: 24px; }
.stat b { display: flex; align-items: flex-start; font-family: var(--display); font-weight: 900; font-size: clamp(56px, 8vw, 128px); line-height: 1; }
.stat b i { font-style: normal; color: var(--accent); font-size: .5em; }
.stat p { color: var(--muted); margin: 16px 0 0; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.plan h3 { font-family: var(--display); font-size: 28px; margin: 0; text-transform: uppercase; }
.plan .ar { color: var(--accent); font-size: 20px; margin: 0 0 8px; text-align: left; }
.plan p { color: var(--muted); margin: 0; }
.plan__price { font-family: var(--display); color: var(--fg) !important; font-size: 22px; margin: 32px 0 24px !important; }
.plan .btn { margin-top: auto; justify-content: space-between; }
.plan--hot { border-color: var(--accent); }
.tag { position: absolute; top: 24px; right: 24px; font-size: 12px; padding: 4px 10px; background: var(--accent); border-radius: 99px; }

/* ---------- faq ---------- */
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 1fr 40px; gap: 24px; align-items: center; padding: 28px 0; font-family: var(--display); font-size: clamp(16px, 1.8vw, 24px); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 32px; color: var(--accent); text-align: right; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary .ar { font-size: 1.1em; text-align: right; }
.faq__a { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 0 64px 32px 0; color: var(--muted); }
.faq__a p { margin: 0; }
.faq__a b { display: block; color: var(--accent); font-family: var(--display); font-size: 12px; margin-bottom: 8px; }

/* ---------- blog ---------- */
.blog__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.post { cursor: pointer; }
.post__img { aspect-ratio: 4/3; border-radius: var(--radius); margin-bottom: 16px; background-size: cover; background-position: center; transition: transform .5s; }
.post:hover .post__img { transform: scale(.98); }
.post time { font-size: 13px; color: var(--muted); }
.post h3 { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.25; margin: 8px 0; text-transform: uppercase; }
.post:hover h3 { color: var(--accent); }
.post .ar { color: var(--muted); margin: 0; text-align: left; }
.g1 { background-image: url("assets/blog-1.jpg"); }
.g2 { background-image: url("assets/blog-2.jpg"); }
.g3 { background-image: url("assets/blog-3.jpg"); }
.g4 { background-image: url("assets/blog-4.jpg"); }
.g5 { background-image: url("assets/blog-5.jpg"); }
.post__img { background-color: var(--bg-2); }

/* ---------- footer ---------- */
.footer { padding: clamp(80px, 12vw, 160px) var(--gutter) 32px; border-top: 1px solid var(--line); }
.footer__cta { display: inline-block; font-family: var(--display); font-weight: 900; font-size: clamp(48px, 10vw, 160px); line-height: .95; text-transform: uppercase; }
.footer__cta em { font-style: normal; color: var(--accent); display: inline-block; transition: transform .4s; }
.footer__cta:hover em { transform: translate(8px, -8px); }
.footer__cta:hover { color: var(--accent); }
.footer__cta-ar { font-size: clamp(32px, 5vw, 72px); color: var(--accent); margin: 8px 0 80px; text-align: left; }
.footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__grid a, .footer__grid p:not(.label) { display: block; margin: 0 0 6px; }
.footer__grid a:hover { color: var(--accent); }
.footer__sig { width: 100%; max-width: 1400px; margin: 80px auto 24px; opacity: .9; }
.footer__copy { color: var(--muted); font-size: 13px; text-align: center; margin: 0; }

/* ---------- case study page ---------- */
.case { padding-top: 120px; }
.case__head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; margin-bottom: 48px; }
.case__title { font-family: var(--display); font-weight: 900; font-size: clamp(48px, 9vw, 140px); line-height: .9; margin: 0; text-transform: uppercase; }
.case__gallery { display: flex; flex-direction: column; gap: 16px; }
.case__gallery img { width: 100%; border-radius: var(--radius); }

/* ---------- scroll reveal ---------- */
.rise { opacity: 0; transform: translateY(40px); transition: opacity .9s, transform .9s cubic-bezier(.2,.7,.2,1); }
.rise.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__frame { position: relative; height: 70vh; }
  .manifesto__grid, .work, .case__head { grid-template-columns: 1fr; }
  .work { position: relative; top: 0; min-height: 0; }
  .work__img { aspect-ratio: 4/3; }
  .stats, .plans, .footer__grid { grid-template-columns: 1fr; }
  .faq summary { grid-template-columns: 1fr 32px; }
  .faq summary .ar { grid-column: 1; grid-row: 2; text-align: right; }
  .faq summary::after { grid-row: 1 / span 2; grid-column: 2; }
  .faq__a { grid-template-columns: 1fr; padding-right: 0; }
  .menu { grid-template-columns: 1fr; }
  .services__list li { flex-wrap: wrap; gap: 8px 16px; }
  .services__list i { margin-left: 0; width: 100%; }
}

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