/* ================= NOVA brand tokens ================= */
:root {
  color-scheme: dark;
  --navy: #0E0B2E;
  --ember: #FF5A1F;
  --violet: #3B1A7A;
  --paper: #F4F3F8;
  --white: #FFFFFF;

  /* all-dark site: three navy tones for the sections */
  --bg-0: #0E0B2E;
  --bg-1: #15103A;
  --bg-2: #1C1250;

  /* text on dark — every value passes WCAG AA (4.5:1) on all three tones */
  --text-1: #FFFFFF;
  --text-2: rgba(255, 255, 255, .8);
  --text-3: rgba(255, 255, 255, .68);
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .22);
  --glass: rgba(255, 255, 255, .04);
  --danger: #FF9C9C;

  /* 8px spacing system */
  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 32px; --s-5: 48px; --s-6: 64px; --s-7: 96px; --s-8: 128px;
  --section-y: var(--s-7);
  --gutter: 20px;
  --container: 1200px;

  /* type scale */
  --fs-h1: clamp(2.5rem, 1.5rem + 5vw, 5rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --fs-h3: clamp(1.25rem, 1.15rem + .5vw, 1.5rem);
  --fs-lead: clamp(1.125rem, 1rem + .5vw, 1.25rem);
  --fs-body: clamp(1rem, .96rem + .2vw, 1.125rem);
  --fs-small: .875rem;
  --lh-body: 1.7;
  --lh-head: 1.25;

  --radius: 24px;
  --radius-btn: 12px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  /* the NOVA star (from the logo) as a mask, for eyebrows and the ticker */
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='163.5 0 35.1 35.1'%3E%3Cpath d='M181.1,0C183.2,9.6 189.1,15.4 198.6,17.6C189.1,19.7 183.2,25.5 181.1,35.1C179,25.5 173.1,19.7 163.5,17.6C173.1,15.4 179,9.6 181.1,0Z'/%3E%3C/svg%3E");

  /* Arabic: Thmanyah Sans (load from official source when available) → fallback */
  --font-ar: "Thmanyah Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-en: "Inter", system-ui, sans-serif;
  --font: var(--font-ar);
}
html[lang="en"] { --font: var(--font-en); --lh-body: 1.6; --lh-head: 1.1; }
@media (min-width: 600px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }
@media (max-width: 599px) { :root { --section-y: var(--s-6); } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--s-7); }
body {
  font-family: var(--font); font-size: var(--fs-body); line-height: var(--lh-body);
  color: var(--text-1); background: var(--bg-0);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; }
p { text-wrap: pretty; }

/* keyboard focus: clear on every clickable element */
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* ================= Type ================= */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-1); margin-bottom: var(--s-2);
  font-weight: 500; font-size: var(--fs-small); color: var(--text-2);
}
.eyebrow::before, .ticker span::after {
  content: ""; width: 10px; height: 10px; flex: none; background: var(--ember);
  -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat;
}
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; }

.h2 { font-weight: 700; font-size: var(--fs-h2); line-height: var(--lh-head); letter-spacing: -.01em; }
html[lang="en"] .h2 { font-weight: 800; letter-spacing: -.025em; }
.h2 em { font-style: normal; color: var(--ember); }
.body { color: var(--text-2); font-size: var(--fs-body); margin-top: var(--s-2); max-width: 60ch; }

/* ================= Buttons ================= */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1);
  min-height: 48px; padding: 0 var(--s-4); border-radius: var(--radius-btn); border: 1.5px solid transparent;
  font-weight: 700; font-size: 1rem; line-height: 1.2; cursor: pointer; white-space: nowrap;
  translate: var(--tx, 0) var(--ty, 0);
  transition: transform .2s var(--ease-out), background .2s, border-color .2s, box-shadow .2s, translate .25s var(--ease-out);
}
html[lang="en"] .btn { font-weight: 600; }
.btn:hover { transform: translateY(-2px); }
.btn--ember { background: var(--ember); color: var(--white); box-shadow: 0 8px 24px -8px rgba(255, 90, 31, .7); }
.btn--ember:hover { background: #ff6d38; }
.btn--ghost { background: transparent; color: var(--white); border-color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); }
.btn--sm { padding: 0 var(--s-3); font-size: .95rem; }
.btn--block { width: 100%; }
.btn[disabled] { cursor: progress; opacity: .85; transform: none; }
.btn__spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: var(--white); animation: spin .8s linear infinite; }
.btn.is-loading .btn__spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
/* shine sweep on the main buttons */
.btn--ember::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); transform: translateX(-120%); animation: shine 4.5s ease-in-out 3s infinite; }
@keyframes shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* ================= Logo ================= */
/* min sizes from the guide: NOVA ≥100px, with tagline ≥240px. Clear space ≥ star height. */
.logo { display: inline-block; flex: none; }
.logo svg { display: block; width: 100%; height: auto; overflow: visible; }
.logo--nav { width: 116px; }
.lg-star { transform-box: fill-box; transform-origin: center; }

/* ================= Hero + "Breakout" intro (breakout.js) ================= */
.hero-b {
  position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate; color: var(--white);
  /* fixed Night Navy with a very light vignette at the edges */
  background: radial-gradient(ellipse 120% 100% at 50% 45%, transparent 55%, rgba(0, 0, 0, .28) 100%), var(--navy);
}
.hero-b__bokeh { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* Spotlight glow (option A), behind the content; fades in once the intro hands over to the site */
.spot-dots, .spot-glow, .spot-ring { z-index: -1; pointer-events: none; transition: opacity 1.4s ease; }
.spot-dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.4px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(320px circle at var(--x, 50%) var(--y, 40%), #000, transparent 70%); mask-image: radial-gradient(320px circle at var(--x, 50%) var(--y, 40%), #000, transparent 70%); }
.spot-glow, .spot-ring { position: absolute; top: 0; left: 0; border-radius: 50%; will-change: transform; }
.spot-glow { width: 760px; height: 760px; margin: -380px 0 0 -380px; background: radial-gradient(circle, rgba(255, 90, 31, .35), rgba(59, 26, 122, .25) 40%, transparent 70%); filter: blur(10px); }
.spot-ring { width: 280px; height: 280px; margin: -140px 0 0 -140px; background: radial-gradient(circle, rgba(255, 90, 31, .55), transparent 70%); transition: opacity 1.4s ease, width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out); }
.spot-ring.moving { width: 220px; height: 220px; margin: -110px 0 0 -110px; }
@media (max-width: 599px) { .spot-glow { width: 460px; height: 460px; margin: -230px 0 0 -230px; } }
html.intro-on .spot-dots, html.intro-on .spot-glow, html.intro-on .spot-ring { opacity: 0; }
.hero-b__bokeh i { position: absolute; border-radius: 50%; filter: blur(28px); opacity: 0; will-change: transform, opacity; }
.hero-b__stage { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.intro-logo { width: min(72vw, 520px); height: auto; overflow: visible; will-change: transform; }
.hero-b__content {
  position: relative; height: 100%; max-width: 1000px; margin-inline: auto; padding: var(--s-7) var(--gutter) var(--s-6);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s-3);
}
.hero-b h1 { font-weight: 700; font-size: var(--fs-h1); line-height: var(--lh-head); letter-spacing: -.01em; }
html[lang="en"] .hero-b h1 { font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.hero-b h1 .w, .hero-b h1 .w > span { display: inline-block; }
.hero-b .shine { color: var(--ember); }
/* one shimmer pass on the Ember word once it settles (class added by breakout.js) */
.hero-b .shine .w > span { background: linear-gradient(105deg, var(--ember) 0 42%, #ffe1d3 50%, var(--ember) 58% 100%); background-size: 300% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-b.shimmer .shine .w > span { animation: shimmerOnce 1.1s ease-in-out 1 forwards; }
@keyframes shimmerOnce { to { background-position: 0% 0; } }
.hero-b .lead { max-width: 60ch; color: var(--text-2); font-size: var(--fs-lead); line-height: var(--lh-body); }
.hero-b .ctas { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: center; margin-top: var(--s-1); }

.intro-skip {
  position: fixed; z-index: 70; bottom: var(--s-3); inset-inline-end: var(--s-3); min-height: 48px; padding: 0 var(--s-3); border-radius: var(--radius-btn); cursor: pointer;
  font: 500 .9rem var(--font); color: var(--text-2); background: rgba(255, 255, 255, .06); border: 1.5px solid var(--line-strong);
  backdrop-filter: blur(8px); transition: background .2s, color .2s, opacity .3s;
}
.intro-skip:hover { background: rgba(255, 255, 255, .14); color: var(--white); }

/* while the intro runs: no scroll, content and navbar logo hidden until their turn */
html.intro-on { overflow: hidden; }
html.intro-on .hero-b__content h1 .w > span, html.intro-on .hero-b .lead, html.intro-on .hero-b .ctas { opacity: 0; }
html.intro-on .logo--nav { visibility: hidden; }
html.intro-on .wa-float { opacity: 0; pointer-events: none; }
html:not(.intro-on) .intro-skip { display: none; }
html.intro-skip-now .hero-b__stage { display: none; }

.card, .project, .tst, .plan, .stat, .form { position: relative; }
/* "ابدأ معنا": a light edge orbiting the button */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.btn--orbit { overflow: visible; isolation: isolate; }
.btn--orbit::before { content: ""; position: absolute; inset: -2px; border-radius: calc(var(--radius-btn) + 2px); padding: 2px; z-index: -1;
  background: conic-gradient(from var(--ang), transparent 0 62%, #fff 78%, #ffd2bd 84%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinBorder 2.8s linear infinite; }
.btn--orbit::after { display: none; }
@keyframes spinBorder { to { --ang: 360deg; } }

/* ================= Nav ================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px); /* phones with a notch / the iOS app bar (viewport-fit=cover) */
  transition: background .3s, box-shadow .3s, backdrop-filter .3s, transform .35s var(--ease-out);
}
/* glass after scrolling; slides away while scrolling down, back on scroll up */
.nav.is-scrolled { background: rgba(14, 11, 46, .6); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: var(--s-3); }
.nav__links { display: flex; gap: var(--s-4); font-weight: 500; font-size: .975rem; }
.nav__links a { position: relative; display: inline-flex; align-items: center; min-height: 48px; color: var(--text-2); transition: color .2s; }
.nav__links a::after { content: ""; position: absolute; inset-inline: 0; bottom: 8px; height: 2px; border-radius: 2px; background: currentColor; transform: scaleX(0); transition: transform .25s var(--ease-out); }
.nav__links a:hover, .nav__links a.is-active { color: var(--white); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: var(--s-1); }
.lang-toggle, .burger {
  height: 48px; min-width: 48px; padding-inline: var(--s-2); border-radius: var(--radius-btn); cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1.5px solid var(--line-strong); color: var(--white); font-weight: 600;
  transition: background .2s, border-color .2s;
}
.lang-toggle:hover, .burger:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); }
.burger { display: none; padding: 0; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.burger span { width: 18px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .3s var(--ease-out); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* mobile / tablet: full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; justify-content: center; gap: var(--s-1);
  padding: var(--s-7) var(--gutter) var(--s-5);
  background: radial-gradient(120% 80% at 50% 0%, rgba(59, 26, 122, .55), transparent 60%), rgba(14, 11, 46, .97);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  visibility: hidden; opacity: 0; transition: opacity .35s var(--ease-out), visibility 0s linear .35s;
}
html.menu-open { overflow: hidden; }
html.menu-open .menu { visibility: visible; opacity: 1; transition: opacity .35s var(--ease-out); }
.menu__link {
  display: flex; align-items: center; min-height: 56px; font-size: clamp(1.75rem, 1.2rem + 3vw, 2.5rem); font-weight: 700; color: var(--text-2);
  opacity: 0; transform: translateY(24px); transition: opacity .4s var(--ease-out), transform .5s var(--ease-out), color .2s;
  transition-delay: calc(var(--i, 0) * 50ms + 60ms);
}
.menu__link.is-active, .menu__link:hover { color: var(--white); }
.menu__link.is-active::after { content: ""; width: 10px; height: 10px; margin-inline-start: var(--s-2); background: var(--ember); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
.menu .btn { margin-top: var(--s-4); opacity: 0; transform: translateY(24px); transition: opacity .4s var(--ease-out) .35s, transform .5s var(--ease-out) .35s; }
html.menu-open .menu__link, html.menu-open .menu .btn { opacity: 1; transform: none; }

@media (max-width: 1023px) {
  .nav__links, .nav__cta { display: none; }
  .burger { display: flex; }
}
@media (min-width: 1024px) { .menu { display: none; } }

/* ================= Floating WhatsApp ================= */
.wa-float {
  position: fixed; z-index: 40; right: var(--s-3); bottom: calc(var(--s-3) + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; background: #25D366; color: #fff;
  box-shadow: 0 12px 32px -8px rgba(37, 211, 102, .55), 0 0 0 1px rgba(255, 255, 255, .12) inset;
  transition: transform .25s var(--ease-out), box-shadow .25s, opacity .3s;
}
.wa-float:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 16px 40px -8px rgba(37, 211, 102, .7); }
.wa-float svg { width: 28px; height: 28px; }
html.menu-open .wa-float { opacity: 0; pointer-events: none; }
@media (max-width: 599px) { .wa-float { right: var(--s-2); bottom: calc(var(--s-2) + env(safe-area-inset-bottom, 0px)); } }

/* ================= Sections ================= */
.section { padding-block: var(--section-y); }
.tone-0 { background: var(--bg-0); }
.tone-1 { background: var(--bg-1); }
.tone-2 { background: var(--bg-2); }
.section__head { margin-bottom: var(--s-5); max-width: 720px; }

/* ---- Clients: light trails (option C) — huge headline over long-exposure light, rotating logo grid below ---- */
.clients--trails { position: relative; overflow: hidden; isolation: isolate; }
.clients__trails { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.clients__inner { display: flex; flex-direction: column; gap: var(--s-3); min-height: clamp(280px, 40vh, 440px); justify-content: center; }
.clients__title { font-weight: 700; font-size: clamp(2.8rem, 1.2rem + 7.4vw, 7.2rem); line-height: 1.04; letter-spacing: -.02em; max-width: 14ch; }
html[lang="en"] .clients__title { font-weight: 800; letter-spacing: -.04em; line-height: .98; }
.clients__title em { font-style: normal; color: var(--ember); }
.clients__hint { font-size: var(--fs-small); color: var(--text-3); }
@media (hover: none) { .clients__hint { display: none; } }
/* sector filters */
.wall-filters { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: var(--s-6) 0 var(--s-3); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s-1); min-height: 48px; padding: 0 12px; border-radius: var(--radius-btn); cursor: pointer;
  background: transparent; border: 1.5px solid var(--line-strong); color: var(--text-2); font-weight: 500; font-size: .9rem; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: rgba(255, 255, 255, .5); color: var(--white); }
.chip[aria-pressed="true"] { background: var(--white); border-color: var(--white); color: var(--navy); }
/* the wall: every logo at once, folded to a few rows (max-height set by script.js) */
.wall {
  display: grid; grid-template-columns: repeat(8, 1fr); overflow: hidden;
  border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line);
  transition: max-height .6s var(--ease-out);
}
.wall.is-folded { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 120px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 120px), transparent); }
.wall__cell {
  position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 16% 18%;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr); /* a definite box, so tall logos shrink to fit instead of overflowing */
  border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line);
  opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), background .25s;
  transition-delay: calc(min(var(--i), 24) * 25ms);
}
.wall__cell[hidden] { display: none; }
.wall.is-in .wall__cell { opacity: 1; transform: none; }
.wall__cell:hover { background: rgba(255, 255, 255, .04); transition-delay: 0s; }
.wall__cell img { width: 100%; height: 100%; object-fit: contain; opacity: .6; transition: opacity .25s, transform .25s var(--ease-out); }
.wall__cell:hover img { opacity: 1; transform: scale(1.06); }
/* brand info: hover / focus / tap turns the logo into a small card — full name + what they do — in the same cell */
.wall__info {
  position: absolute; inset: 0; display: grid; align-content: center; gap: 4px; padding: 10px 12px; text-align: center; pointer-events: none;
  background: rgba(14, 11, 46, .94);
  opacity: 0; transform: translateY(6px); transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
}
.wall__info b { font-size: .82rem; font-weight: 700; line-height: 1.35; color: var(--white); }
.wall__info small { font-size: .74rem; line-height: 1.4; color: var(--text-2); }
.wall__cell.has-info { cursor: pointer; }
.wall__cell.has-info:focus-visible { outline-offset: -3px; }
.has-info:hover .wall__info, .has-info:focus-visible .wall__info, .has-info.is-open .wall__info { opacity: 1; transform: none; }
.has-info:hover img, .has-info:focus-visible img, .has-info.is-open img { opacity: 0; transform: scale(.9); }
.logo-ph { font-family: var(--font-en); font-weight: 600; font-size: .9rem; line-height: 1.25; color: rgba(255, 255, 255, .6); text-align: center; }
.wall-more { display: flex; justify-content: center; margin-top: var(--s-4); }
.wall-more[hidden] { display: none; }
@media (max-width: 1279px) { /* narrower cells (small laptops, tablets): tighter card text */
  .wall__info { padding: 6px 8px; gap: 2px; }
  .wall__info b { font-size: .74rem; }
  .wall__info small { font-size: .68rem; }
}
@media (max-width: 1023px) { .wall { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 599px) {
  /* filters scroll sideways on phones instead of stacking into many rows */
  .wall-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); margin-top: var(--s-5); }
  .wall-filters::-webkit-scrollbar { display: none; }
  .wall { grid-template-columns: repeat(4, 1fr); }
  .wall__cell { aspect-ratio: 1; padding: 16%; }
  /* small square cells: tighter card text */
  .wall__info { padding: 6px; gap: 2px; }
  .wall__info b { font-size: .68rem; }
  .wall__info small { font-size: .62rem; }
  .wall-more .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .wall__cell { opacity: 1; transform: none; } }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; align-items: center; width: max-content; gap: var(--s-6); animation: marquee var(--dur, 40s) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee--reverse .marquee__track { animation-direction: reverse; }
html[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
@media (max-width: 599px) { .marquee__track { gap: var(--s-5); } }

/* ---- About ---- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-6); align-items: center; }
.about__stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.stat { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-4) var(--s-3); }
.stat b { display: block; font-family: var(--font-en); font-weight: 800; font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); letter-spacing: -.03em; line-height: 1.1; direction: ltr; text-align: start; }
html[dir="rtl"] .stat b { text-align: right; }
.stat span { display: block; margin-top: var(--s-1); color: var(--text-2); font-size: var(--fs-small); }
.stat:first-child { background: linear-gradient(150deg, var(--violet), var(--bg-2)); border-color: rgba(255, 255, 255, .18); }

/* ---- Services ---- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.card {
  display: flex; flex-direction: column; padding: var(--s-4); border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--line); color: var(--white); cursor: pointer;
}
.card__icon {
  width: 80px; height: 80px; border-radius: 20px; display: grid; place-items: center; margin-bottom: var(--s-3);
  /* glass tile, like story-highlight covers */
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 32px -16px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.card__icon svg { width: 48px; height: 48px; transition: transform .4s var(--spring); }
.card h3 { font-size: var(--fs-h3); font-weight: 700; line-height: var(--lh-head); margin-bottom: var(--s-1); }
html[lang="en"] .card h3 { font-weight: 600; letter-spacing: -.01em; }
.card p { color: var(--text-2); font-size: 1rem; }
.card__more { margin-top: auto; padding-top: var(--s-3); display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--fs-small); font-weight: 600; color: var(--text-2); transition: color .2s, gap .25s var(--ease-out); }
.card__more svg { width: 16px; height: 16px; }
html[dir="rtl"] .card__more svg { transform: scaleX(-1); }
.card:hover .card__more { color: var(--white); gap: var(--s-2); }
.card:hover .card__icon svg { transform: scale(1.08); }

/* ---- Ticker band ---- */
.ticker { background: var(--bg-2); padding-block: var(--s-3); overflow: hidden; border-block: 1px solid var(--line); }
.ticker .marquee__track { gap: var(--s-5); --dur: 40s; }
.ticker span { display: inline-flex; align-items: center; gap: var(--s-5); font-weight: 700; font-size: clamp(1.125rem, 1rem + 1vw, 1.5rem); white-space: nowrap; color: var(--white); }
.ticker span:nth-child(odd) { color: rgba(255, 255, 255, .6); }

/* ---- Work: full portfolio (Google Drive) — QR + button ---- */
.portfolio {
  display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); padding: var(--s-4);
  border-radius: var(--radius); background: linear-gradient(135deg, rgba(59, 26, 122, .45), rgba(255, 255, 255, .03)); border: 1px solid var(--line-strong);
}
.portfolio__qr { flex: none; padding: 12px; border-radius: 16px; background: var(--white); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .6); }
.portfolio__qr img { display: block; width: 160px; height: 160px; }
.portfolio__text { display: grid; gap: var(--s-1); justify-items: start; }
.portfolio__text h3 { font-size: var(--fs-h3); font-weight: 700; line-height: var(--lh-head); }
.portfolio__text p { color: var(--text-2); max-width: 46ch; margin-bottom: var(--s-1); }
/* on a phone the visitor can't scan their own screen: show the button only */
@media (max-width: 599px) {
  .portfolio { padding: var(--s-3); }
  .portfolio__qr { display: none; }
  .portfolio__text, .portfolio__text .btn { width: 100%; }
}

/* ---- Work ---- */
/* "نموذج توضيحي" on template projects (WORK_IS_SAMPLE in script.js): the corner opposite the service tag */
.project__sample {
  position: absolute; top: var(--s-3); inset-inline-end: var(--s-3); z-index: 1;
  font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  color: var(--white); background: rgba(14, 11, 46, .7); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.project {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--s-3);
  border: 1px solid var(--line);
}
/* media slot: a gradient now, a photo or video when they're uploaded */
.project__media { position: absolute; inset: 0; z-index: -2; transition: transform .6s var(--ease-out); }
.project__media img, .project__media video { width: 100%; height: 100%; object-fit: cover; }
.project::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(14, 11, 46, .95) 0%, rgba(14, 11, 46, .7) 30%, transparent 60%); }
.project:hover .project__media { transform: scale(1.05); }
.project__tag { align-self: flex-start; font-size: .8rem; font-weight: 500; padding: 4px 12px; border-radius: 999px; background: rgba(14, 11, 46, .45); border: 1px solid var(--line-strong); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.project__metric { font-family: var(--font-en); font-weight: 800; font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem); letter-spacing: -.03em; line-height: 1.1; direction: ltr; text-align: start; }
html[dir="rtl"] .project__metric { text-align: right; }
.project__metric small { font-family: var(--font); font-weight: 500; font-size: .95rem; letter-spacing: 0; color: var(--text-2); }
.project h3 { font-size: var(--fs-h3); font-weight: 700; line-height: var(--lh-head); margin-top: var(--s-1); }
.project p { color: var(--text-2); font-size: .95rem; }

/* ---- Testimonials ---- */
.marquee--tst { padding-block: var(--s-1); }
.marquee--tst + .marquee--tst { margin-top: var(--s-2); }
.marquee--tst .marquee__track { gap: var(--s-3); align-items: stretch; --dur: 55s; }
.tst { width: 360px; flex: none; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-3); }
.tst__stars { color: var(--white); letter-spacing: 2px; font-size: .9rem; }
.tst p { margin: var(--s-2) 0 var(--s-3); color: var(--text-1); font-size: 1rem; }
.tst__who { display: flex; align-items: center; gap: var(--s-2); }
.tst__avatar { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--violet), var(--bg-2)); border: 1px solid var(--line-strong); }
.tst__who b { display: block; font-size: .95rem; line-height: 1.3; }
.tst__who span { color: var(--text-3); font-size: var(--fs-small); }

/* ---- Pricing ---- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: var(--s-4); border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); }
/* featured plan: warm Ember glow around the card (user's mock-up) */
.plan--featured {
  background: linear-gradient(160deg, var(--violet), var(--bg-2) 80%); border-color: rgba(255, 90, 31, .55);
  box-shadow: 0 0 0 1px rgba(255, 90, 31, .25), 0 0 80px -8px rgba(255, 90, 31, .6), 0 32px 64px -32px rgba(59, 26, 122, .9);
}
/* "الأكثر طلباً": an Ember pill with the NOVA star, sitting on the card's top edge */
.plan__badge {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; white-space: nowrap;
  font-size: .8rem; font-weight: 700; color: var(--white); background: linear-gradient(135deg, #FF7A3D, var(--ember));
  box-shadow: 0 6px 20px -4px rgba(255, 90, 31, .7);
}
.plan__badge::before {
  content: ""; width: 10px; height: 10px; flex: none; background: var(--white);
  -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat;
}
.plan h3 { font-size: var(--fs-h3); font-weight: 700; line-height: var(--lh-head); }
.plan__desc { color: var(--text-2); font-size: .95rem; margin-top: var(--s-1); }
.plan__price { margin: var(--s-3) 0; display: flex; align-items: baseline; gap: var(--s-1); }
.plan__price b { font-family: var(--font-en); font-weight: 800; font-size: clamp(2.25rem, 2rem + 1vw, 2.75rem); letter-spacing: -.03em; line-height: 1; }
.plan__price span { color: var(--text-3); font-size: .9rem; }
.plan ul { list-style: none; display: grid; gap: var(--s-2); align-content: start; margin-bottom: var(--s-4); flex: 1; } /* short lists stay at the top; the button stays at the bottom */
.plan li { display: flex; gap: var(--s-1); color: var(--text-2); font-size: .975rem; }
.plan li::before { content: "✓"; color: var(--white); font-weight: 700; }
/* 4 plans (the 4th is "المخصصة"): 4 columns on wide screens, 2 below 1280, 1 on phones */
@media (max-width: 1279px) { .plans { grid-template-columns: repeat(2, 1fr); } }

/* ---- Contact ---- */
.contact { background: radial-gradient(90% 70% at 85% 10%, rgba(59, 26, 122, .7), transparent 65%), var(--bg-2); }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); align-items: start; }
.contact__list { list-style: none; margin-top: var(--s-4); display: grid; gap: var(--s-2); }
.contact__list li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); flex-wrap: wrap; padding-bottom: var(--s-2); border-bottom: 1px solid var(--line); }
.contact__list span { color: var(--text-3); }
.contact__list a { display: inline-flex; align-items: center; min-height: 48px; }
.contact__list a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }

.form { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--radius); background: rgba(14, 11, 46, .55); border: 1px solid var(--line-strong); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.field { display: grid; gap: var(--s-1); }
.field label { font-weight: 500; font-size: .95rem; color: var(--text-1); }
.form input, .form select, .form textarea {
  width: 100%; min-height: 48px; padding: 12px var(--s-2); border-radius: var(--radius-btn);
  background: rgba(255, 255, 255, .05); border: 1.5px solid var(--line-strong); color: var(--white); font-size: 1rem;
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s; resize: vertical;
}
.form textarea { min-height: 128px; }
.form ::placeholder { color: var(--text-3); }
.form input:hover, .form select:hover, .form textarea:hover { border-color: rgba(255, 255, 255, .4); }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--white); background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); }
.form [aria-invalid="true"] { border-color: var(--danger); }
.form [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(255, 156, 156, .2); }
.field__err { color: var(--danger); font-size: var(--fs-small); min-height: 0; }
.field__err:empty { display: none; }
.form__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.form__actions .btn { flex: 1 1 200px; }
.btn--wa svg { width: 20px; height: 20px; flex: none; }
.form__note:empty { display: none; }
.form__note { padding: var(--s-2); border-radius: var(--radius-btn); font-size: .95rem; font-weight: 500; }
.form__note.is-ok { background: rgba(37, 211, 102, .12); border: 1px solid rgba(37, 211, 102, .4); color: #9FF0C0; }
.form__note.is-err { background: rgba(255, 156, 156, .1); border: 1px solid rgba(255, 156, 156, .35); color: var(--danger); }

/* ---- Footer ---- */
.footer { background: var(--bg-0); color: var(--text-2); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.footer__social { display: flex; gap: var(--s-1); }
.footer__social a { width: 48px; height: 48px; border-radius: var(--radius-btn); display: grid; place-items: center; border: 1.5px solid var(--line-strong); color: var(--text-2); transition: background .2s, border-color .2s, color .2s; }
.footer__social svg { width: 20px; height: 20px; }
.footer__social a:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); color: var(--white); }
.footer__bottom { display: flex; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; padding-block: var(--s-3); font-size: var(--fs-small); color: var(--text-3); }

/* ================= Motion ================= */
/* one entrance for every section: fade + 24px rise */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
/* after the entrance, hover states respond fast */
.reveal.is-done { transition: transform .25s var(--ease-out), border-color .25s, box-shadow .25s, background .25s; }
.card.is-done:hover { transform: translateY(-4px); border-color: var(--ember); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .7); }
@media (min-width: 1280px) { .plan--featured.is-in { transform: translateY(-8px); } } /* only when the 4 plans share one row */

/* Scroll progress */
.progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 60; background: rgba(255, 255, 255, .7); transform-origin: left; transform: scaleX(0); }
html[dir="rtl"] .progress { transform-origin: right; }

/* navbar star is driven by GSAP (spin + hover replay), so no CSS animation on it */
.nav .logo--nav .lg-star { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .menu__link, .menu .btn { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ================= Responsive ================= */
/* tablet: 600–1023 */
@media (max-width: 1023px) {
  .cards, .work, .plans { grid-template-columns: repeat(2, 1fr); }
  .about, .contact__inner { grid-template-columns: 1fr; gap: var(--s-5); }
}
/* mobile: under 600 */
@media (max-width: 599px) {
  .cards, .work, .plans { grid-template-columns: 1fr; }
  .card, .plan, .form { padding: var(--s-3); }
  .project { aspect-ratio: 4 / 5; }
  .hero-b .ctas { flex-direction: column; align-self: stretch; }
  .hero-b .ctas .btn, .plan .btn, .form__actions .btn, .menu .btn { width: 100%; }
  .form__actions { flex-direction: column; }
  .form__actions .btn { flex: none; }
  .tst { width: min(300px, 80vw); }
  .stat { padding: var(--s-3) var(--s-2); }
  .nav__inner { gap: var(--s-2); }
}

/* contact form spam trap (Web3Forms honeypot) - never visible */
.form input.hp { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); opacity: 0; pointer-events: none; }

/* privacy links (footer + under the form) */
.footer__link { color: inherit; text-underline-offset: 3px; }
.footer__link:hover { color: var(--white); }
.form__legal { margin: 0; font-size: var(--fs-small); color: var(--text-3); }
.form__legal a { color: var(--text-2); text-underline-offset: 3px; }
.form__legal a:hover { color: var(--white); }
