:root {
  --ink: #0B2A2E;
  --ink-2: #102F33;
  --teal: #105E62;
  --teal-soft: #1F6E70;
  --amber: #E6A31C;
  --cream: #F5F4EF;
  --text: #1C2B2D;
  --muted: #5B6B6D;
  --line: #E1DFD6;
  --tag: #D6E6E4;
  --radius: 4px;
  --max: 1160px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text); background: #fff; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
svg, canvas { display: block; }
html[lang="ar"] .en, html[lang="en"] .ar { display: none !important; }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 24px; }
body.swap main, body.swap .footer { animation: swap .45s var(--ease); }
@keyframes swap { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }

/* CURSOR */
.cursor { position: fixed; top: 0; left: 0; width: 12px; height: 12px; background: var(--amber); pointer-events: none; z-index: 200; opacity: 0; transition: width .2s, height .2s, opacity .3s, margin .2s; margin: -6px 0 0 -6px; mix-blend-mode: normal; }
.cursor.on { opacity: 1; }
.cursor.big { width: 34px; height: 34px; margin: -17px 0 0 -17px; opacity: .35; }
@media (pointer: coarse) { .cursor { display: none; } }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; color: #fff; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(11,42,46,.92); backdrop-filter: blur(10px); border-color: rgba(255,255,255,.06); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.3rem; }
.brand-mark { width: 30px; height: 30px; color: #fff; }
.links { display: flex; gap: 28px; font-size: .95rem; }
.links a { opacity: .8; transition: opacity .2s, color .2s; }
.links a:hover { opacity: 1; color: var(--amber); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn { font: inherit; font-weight: 600; font-size: .85rem; background: transparent; color: #fff; cursor: pointer; border: 1px solid rgba(255,255,255,.3); border-radius: var(--radius); padding: 4px 12px; min-width: 44px; }
.lang-btn:hover { border-color: var(--amber); color: var(--amber); }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; }

/* HERO */
.hero { position: relative; height: 240vh; background: var(--ink); color: #fff; }
.hero-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-text { position: relative; z-index: 2; pointer-events: none; }
.hero-text > * { max-width: 560px; }
.hero-text a { pointer-events: auto; }
.eyebrow { color: var(--amber); font-weight: 600; font-size: .95rem; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 12px; height: 12px; background: var(--amber); flex: none; }
h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.3; font-weight: 700; margin-bottom: 22px; }
html[lang="en"] h1 { line-height: 1.15; }
.h-line { display: block; }
.h-chaos { display: inline-block; transform-origin: center; }
.h-chaos.shake { animation: shake .18s steps(2) infinite; }
@keyframes shake { 0% { transform: translate(1px,-1px) rotate(-.6deg); } 50% { transform: translate(-1px,1px) rotate(.5deg); } }
.h-order { clip-path: inset(0 0 0 100%); transition: clip-path .7s var(--ease); color: #fff; }
html[dir="ltr"] .h-order { clip-path: inset(0 100% 0 0); }
.h-order.show { clip-path: inset(0 0 0 0) !important; }
.h-order .ar, .h-order .en { background: linear-gradient(transparent 70%, rgba(230,163,28,.35) 70%); }
.hero-end { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s var(--ease); }
.hero-end.show { opacity: 1; transform: none; }
.lead { font-size: 1.12rem; color: rgba(255,255,255,.78); margin-bottom: 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 26px; border-radius: var(--radius); font-weight: 600; font-size: 1rem; transition: transform .15s, background .2s, border-color .2s; border: 2px solid transparent; cursor: pointer; font-family: inherit; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: #F2B53A; }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.scroll-hint { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: .85rem; color: rgba(255,255,255,.7); display: flex; flex-direction: column; align-items: center; gap: 8px; transition: opacity .3s; }
.scroll-hint i { width: 2px; height: 34px; background: linear-gradient(var(--amber), transparent); animation: drip 1.6s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.hero-meter { position: absolute; bottom: 32px; inset-inline-end: 24px; z-index: 2; font-size: .8rem; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.hero-meter b { color: var(--amber); font-size: 1rem; margin-inline-start: 6px; display: inline-block; min-width: 3.2ch; }

/* SECTIONS */
.section { padding: 100px 0; position: relative; scroll-margin-top: 40px; }
.section.alt { background: var(--cream); }
.section.dark { background: var(--ink); color: #fff; }
.title { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; display: flex; align-items: center; gap: 12px; line-height: 1.3; }
.title::before { content: ""; width: 14px; height: 14px; background: var(--amber); flex: none; }
.subtitle { color: var(--muted); margin-top: 6px; margin-bottom: 44px; font-size: 1.05rem; }
.dark .subtitle { color: rgba(255,255,255,.7); }

/* ABOUT */
body.loading main, body.loading .footer { opacity: 0; }
main, .footer { transition: opacity .3s; }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: start; }
.body-lg { font-size: 1.15rem; margin-top: 24px; color: #33474A; }
.vmv { background: var(--teal); color: #fff; padding: 12px 36px; border-radius: var(--radius); }
.vmv-item { padding: 24px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.vmv-item:last-child { border-bottom: 0; }
.vmv h3 { font-size: 1.1rem; margin-bottom: 4px; }
.vmv p { color: rgba(255,255,255,.82); }

/* PICKER */
.picker-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 32px; align-items: start; }
.chips { display: flex; flex-direction: column; gap: 10px; }
.alt .chip { background: #fff; }
.chip { font: inherit; text-align: start; cursor: pointer; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-size: 1.02rem; color: var(--text); display: flex; align-items: center; gap: 14px; transition: border-color .2s, transform .2s, background .2s; }
.chip:hover { border-color: var(--teal); transform: translateX(-4px); }
html[dir="ltr"] .chip:hover { transform: translateX(4px); }
.chip .sq { width: 12px; height: 12px; background: var(--teal-soft); flex: none; transition: transform .4s var(--ease), background .3s; transform: rotate(28deg); }
.chip[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip[aria-selected="true"] .sq { background: var(--amber); transform: none; }
.answer { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 36px; position: sticky; top: 92px; min-height: 380px; overflow: hidden; }
.answer .tagline { color: var(--amber); font-weight: 600; font-size: .9rem; display: flex; gap: 8px; align-items: center; }
.answer h3 { font-size: 1.6rem; margin: 6px 0 18px; line-height: 1.35; }
.answer ul { list-style: none; display: grid; gap: 12px; margin-bottom: 22px; }
.answer li { display: flex; gap: 12px; color: rgba(255,255,255,.85); opacity: 0; transform: translateY(10px); animation: rise .5s var(--ease) forwards; }
.answer li::before { content: ""; width: 10px; height: 10px; background: var(--amber); flex: none; margin-top: 9px; }
.answer .get { border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; margin-bottom: 24px; color: rgba(255,255,255,.75); font-size: .95rem; }
.answer .get b { color: #fff; }
.answer .anim { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.answer .empty { display: grid; place-items: center; min-height: 300px; text-align: center; color: rgba(255,255,255,.6); }

/* SERVICES */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: #fff; padding: 26px 26px 30px; border-top: 4px solid var(--teal); transition: transform .25s var(--ease), box-shadow .25s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 34px -20px rgba(11,42,46,.4); }
.card h3 { font-size: 1.2rem; margin: 18px 0 6px; color: var(--ink); }
.card p { color: var(--muted); }
.scene { position: relative; height: 130px; background: var(--ink); border-radius: 2px; overflow: hidden; }
.scene i { position: absolute; background: #2A8487; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(.7); opacity: .55; transition: transform .9s var(--ease), opacity .9s, background .6s; transition-delay: var(--d); }
.scene i.a { background: var(--amber); }
.scene.in i { transform: none; opacity: 1; }

/* PROCESS */
.steps { list-style: none; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 20px; position: relative; text-align: center; }
.steps::before, .steps::after { content: ""; position: absolute; top: 36px; left: 8%; right: 8%; height: 2px; background: var(--teal); }
.steps::after { background: var(--amber); transform: scaleX(0); transform-origin: right; transition: transform 1.8s var(--ease); }
html[dir="ltr"] .steps::after { transform-origin: left; }
.steps.in::after { transform: scaleX(1); }
.steps li { position: relative; z-index: 1; }
.steps b { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 20px; border: 3px solid var(--teal-soft); background: var(--ink); font-size: 1.4rem; font-weight: 700; transition: border-color .4s, transform .4s var(--ease); transform: rotate(18deg) scale(.85); }
.steps.in b { border-color: var(--amber); transform: none; }
.steps.in li:nth-child(2) b { transition-delay: .3s; } .steps.in li:nth-child(3) b { transition-delay: .6s; }
.steps.in li:nth-child(4) b { transition-delay: .9s; } .steps.in li:nth-child(5) b { transition-delay: 1.2s; }
.steps h3 { font-size: 1.1rem; margin-bottom: 4px; }
.steps p { color: rgba(255,255,255,.7); font-size: .95rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 72px; }
.stats > div { border: 1px solid rgba(255,255,255,.12); padding: 22px; display: flex; flex-direction: column; }
.stats b { font-size: 2.4rem; color: var(--amber); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats span { color: rgba(255,255,255,.75); font-size: .95rem; }
.why { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; margin-top: 56px; padding-top: 40px; border-top: 1px solid rgba(255,255,255,.15); }
.why h4 { color: var(--amber); font-size: 1rem; margin-bottom: 4px; }
.why p { color: rgba(255,255,255,.8); font-size: .95rem; }

/* WORK */
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.work article { border: 1px solid var(--line); border-inline-end: 5px solid var(--amber); padding: 28px; position: relative; transition: transform .25s var(--ease); }
.work article:hover { transform: translateY(-4px); }
.redact { display: block; width: 90px; height: 12px; background: var(--ink); margin-bottom: 16px; position: relative; overflow: hidden; }
.redact::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); transform: translateX(-100%); }
.work article:hover .redact::after { animation: sweep .8s; }
@keyframes sweep { to { transform: translateX(100%); } }
.work h3 { font-size: 1.15rem; color: var(--ink); margin-bottom: 6px; }
.work p { color: var(--muted); margin-bottom: 16px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--tag); color: var(--ink); font-size: .78rem; padding: 3px 10px; direction: ltr; }
.client-note { margin-top: 22px; color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.redact-inline { display: inline-block; width: 40px; height: 10px; background: var(--ink); }

/* CONTACT */
.contact { overflow: hidden; }
.contact-mark { position: absolute; width: 440px; height: 440px; color: var(--teal); bottom: -40px; left: -40px; }
html[dir="ltr"] .contact-mark { left: auto; right: -40px; }
.contact-square { transform-box: fill-box; transform-origin: center; animation: drop 2.4s var(--ease) infinite alternate; }
@keyframes drop { 0%, 40% { transform: translateY(-14px) rotate(25deg); } 100% { transform: none; } }
.contact-inner { position: relative; }
.cta-title { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 700; line-height: 1.3; }
.contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 14px; margin-bottom: 36px; }
.contact-list > * { display: flex; flex-direction: column; padding: 16px 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); font-size: 1.1rem; transition: border-color .2s; }
.contact-list a:hover { border-color: var(--amber); }
.contact-list small { color: var(--amber); font-weight: 600; font-size: .8rem; }
html[dir="rtl"] .contact-list [dir="ltr"] { text-align: right; }

.footer { background: #071D20; color: rgba(255,255,255,.75); padding: 32px 0; font-size: .85rem; }
.footer p + p { margin-top: 6px; }
.footer .muted { color: rgba(255,255,255,.5); }

/* RESPONSIVE */
@media (max-width: 960px) {
  .cards, .work { grid-template-columns: repeat(2, 1fr); }
  .picker-grid, .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .answer { position: relative; top: 0; min-height: 0; }
  .steps { grid-template-columns: 1fr; text-align: start; gap: 28px; }
  .steps::before, .steps::after { top: 0; bottom: 0; left: auto; right: 35px; width: 2px; height: auto; }
  .steps::after { transform: scaleY(0); transform-origin: top; }
  .steps.in::after { transform: scaleY(1); }
  html[dir="ltr"] .steps::before, html[dir="ltr"] .steps::after { right: auto; left: 35px; }
  html[dir="ltr"] .steps::after { transform-origin: top; }
  .steps li { display: grid; grid-template-columns: 72px 1fr; column-gap: 20px; align-items: center; }
  .steps b { margin: 0; grid-row: span 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--ink); padding: 8px 24px 18px; display: none; }
  .links.open { display: flex; }
  .links a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
}
@media (max-width: 760px) {
  .hero-sticky { align-items: flex-end; padding-bottom: 92px; }
  .hero-text > * { max-width: none; }
  h1 { font-size: 1.85rem; }
  .lead { font-size: 1rem; margin-bottom: 18px; }
  .scroll-hint { bottom: 18px; }
  .hero-meter { display: none; }
}
@media (max-width: 600px) {
  .container { padding-inline: 16px; }
  .section { padding: 68px 0; }
  .cards, .work, .why { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .answer { padding: 26px 20px; }
  .contact-mark { width: 260px; height: 260px; opacity: .5; }
}
@media (prefers-reduced-motion: reduce) {
  .hero { height: 100vh; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
