/* ==========================================================================
   Zaka2 — Neo-Alexandrian Cyber-Heritage Design System
   (Pharaonic Monumentalism + Islamic Golden Age Astronomy + Frontier AI)
   ========================================================================== */
:root {
  /* Surfaces - Nile Obsidian Basalt */
  --paper: #0c0907;
  --white: #16120f;
  --ink: #F7F3EC;
  --muted: #A39B92;
  --line: rgba(229, 178, 93, 0.18);
  
  /* Radiant Accents - Pharaonic Solar Electrum Gold */
  --copper: #E5B25D;
  --copper-radiant: #F7CB78;
  --copper-deep: #B38435;
  --lime: #E5B25D;
  --lime-dark: #B38435;
  --gold-glow: rgba(229, 178, 93, 0.24);

  /* Optical & Data Beams - Alhazen Lapis Lazuli */
  --ice: #0EA5E9;
  --ice-glow: rgba(14, 165, 233, 0.22);
  
  --max: 1440px;
  --radius: 8px; /* Monumental architectural bevel */
  --radius-sm: 4px;

  /* Typography - Neo-Alexandrian font stack */
  --font-base: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Grotesk', 'Tajawal', sans-serif;
  --font-arabic: 'Tajawal', sans-serif;
}

html { background: var(--paper); }
body {
  font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 10% 20%, rgba(229, 178, 93, 0.04) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.03) 0%, transparent 40%);
}
::selection { background: var(--copper); color: #0c0907; }
.wrap { width: min(calc(100% - 96px), var(--max)); margin-inline: auto; }
section[id], main { scroll-margin-top: 100px; }

.topbar, .brand-mark, .zakaa-arabesque, .zakaa-feathers, .zakaa-focus-doodle { display: none !important; }

/* Sticky Header */
.header {
  background: rgba(12, 9, 7, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.nav { height: 86px; gap: 28px; }
.brand { gap: 0; }
.brand-name {
  font: 700 32px/1 'Space Grotesk', sans-serif;
  letter-spacing: -.05em;
  display: block;
  direction: ltr;
  color: var(--ink);
}
.brand-name::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline-start: 6px;
  background: var(--copper);
  border-radius: 1px;
  box-shadow: 0 0 16px var(--copper);
}
.brand-sub {
  font: 500 8.5px/1 'JetBrains Mono', 'Space Grotesk', 'Tajawal', sans-serif;
  letter-spacing: .2em;
  color: var(--muted);
  margin-top: 8px;
  text-transform: uppercase;
}
.navlinks { gap: 24px; font-size: 13px; font-weight: 600; }
.navlinks a[href='#about'], .navlinks a[href='#stories'], .navlinks a[href='#faq'], .navlinks a[href='#contact'] { display: none; }
.navlinks a {
  color: var(--ink);
  transition: color .25s ease;
  position: relative;
  padding: 6px 0;
}
.navlinks a:after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 0%;
  height: 2px;
  background: var(--copper);
  transition: width 0.25s ease;
}
.navlinks a:hover {
  color: var(--copper-radiant);
  text-decoration: none !important;
}
.navlinks a:hover:after {
  width: 100%;
}

.lang, .menu {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  font-family: 'Space Grotesk', 'Tajawal', sans-serif;
  font-weight: 600;
  padding: 9px 14px;
}
.lang:hover, .menu:hover {
  border-color: var(--copper);
  color: var(--copper-radiant);
}

.nav-cta, .btn {
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #E5B25D 0%, #C9933B 100%);
  color: #0c0907;
  border: 1px solid var(--copper);
  padding: 14px 22px;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .02em;
  transition: transform .25s, box-shadow .25s, background .25s;
  box-shadow: 0 4px 18px var(--gold-glow);
}
.nav-cta {
  padding: 11px 18px;
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  font-size: 12px;
  box-shadow: none;
}
.btn:hover, .nav-cta:hover {
  background: linear-gradient(135deg, #F7CB78 0%, #E5B25D 100%);
  color: #0c0907;
  box-shadow: 0 8px 30px var(--gold-glow);
  transform: translateY(-2px);
  border-color: var(--copper-radiant);
}
.btn.outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}
.btn.outline:hover {
  background: rgba(229, 178, 93, 0.08);
  border-color: var(--copper);
  color: var(--copper-radiant);
}
.btn.lime {
  background: linear-gradient(135deg, #E5B25D 0%, #C9933B 100%);
  color: #0c0907;
}
.btn.lime:hover {
  background: linear-gradient(135deg, #F7CB78 0%, #E5B25D 100%);
}
.btn .arrow { display: inline-block; transition: transform .3s; }
.btn:hover .arrow { transform: translate(3px, -3px); }
html[dir='rtl'] .btn:hover .arrow { transform: translate(-3px, -3px); }

a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 4px;
}

.eyebrow {
  font: 600 10.5px/1.7 'JetBrains Mono', 'Space Grotesk', 'Tajawal', sans-serif;
  letter-spacing: .16em;
  color: var(--copper);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--copper);
  border-radius: 1px;
  box-shadow: 0 0 12px var(--copper);
}

/* ==========================================================================
   HERO: THE ASTROLABE NEURAL OBSERVATORY
   ========================================================================== */
.hero {
  isolation: isolate;
  overflow: hidden;
  background: #0c0907;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 78% 43%, rgba(229, 178, 93, 0.12), transparent 48%),
              radial-gradient(ellipse at 8% 8%, rgba(14, 165, 233, 0.08), transparent 42%);
  animation: stellar-shift 16s ease-in-out infinite alternate;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .3;
  background-image: radial-gradient(rgba(229, 178, 93, 0.35) .7px, transparent .7px);
  background-size: 60px 60px;
  mask-image: linear-gradient(transparent, #000 25%, transparent);
}
.hero-grid {
  position: relative;
  min-height: 720px;
  padding-block: 60px 80px;
  grid-template-columns: 1.08fr 1fr;
  gap: 30px;
}
.hero-copy { z-index: 3; padding-block: 12px; }
.hero-copy .eyebrow {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid rgba(229, 178, 93, 0.28);
  border-radius: 30px;
  background: rgba(229, 178, 93, 0.05);
  font-size: 9.5px;
  letter-spacing: .14em;
}
.hero h1 {
  font: 600 clamp(64px, 7vw, 110px)/.98 'Space Grotesk', sans-serif;
  letter-spacing: -.06em;
  margin: 28px 0 24px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}
.hero h1 .highlight {
  display: inline-block;
  color: var(--copper);
  background: linear-gradient(110deg, #F7CB78 0%, #E5B25D 45%, #C9933B 75%, #F7CB78 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: light-sweep 10s ease-in-out infinite alternate;
}
.hero h1 .highlight::after { display: none; }
.hero-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
  max-width: 480px;
}
.hero-buttons { gap: 14px; margin-top: 32px; }
.hero-foot {
  margin-top: 48px;
  gap: 18px;
  font: 500 9px/1.8 'JetBrains Mono', 'Space Grotesk', 'Tajawal', sans-serif;
  letter-spacing: .14em;
  color: #8C847A;
  text-transform: uppercase;
}
.hero-foot .dash { background: var(--copper); width: 35px; }

/* Astrolabe Hero Art */
.hero-art {
  position: relative;
  height: 580px;
  width: 110%;
  margin-inline-start: -5%;
  isolation: isolate;
  overflow: visible;
  display: grid;
  place-items: center;
  direction: ltr;
}
.hero-art::before {
  content: '';
  position: absolute;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #221A14, #0c0907 68%);
  box-shadow: 0 0 110px 15px rgba(229, 178, 93, 0.12), inset 0 0 50px rgba(229, 178, 93, 0.08);
  z-index: -1;
}
.ai-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.orbital-ring {
  position: absolute;
  z-index: 2;
  width: 84%;
  aspect-ratio: 1;
  border: 1.5px dashed rgba(229, 178, 93, 0.35);
  border-radius: 50%;
  transform: rotate(-28deg) scaleY(.58);
  pointer-events: none;
  animation: orbit-drift 22s ease-in-out infinite alternate;
}
.orbital-ring::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 1;
  border-radius: 50%;
  background: conic-gradient(from -45deg, transparent 0 80%, rgba(229, 178, 93, 0.4) 86%, rgba(229, 178, 93, 0.9) 94%, #FFF 98%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  animation: orbit-trace 5s linear infinite;
}
.orbital-ring::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--copper-radiant);
  top: 17%;
  left: 11%;
  box-shadow: 0 0 24px 6px var(--copper);
}
.orbital-ring.two {
  width: 92%;
  transform: rotate(45deg) scaleY(.65);
  border-color: rgba(14, 165, 233, 0.35);
  animation-delay: -10s;
  animation-direction: alternate-reverse;
}
.orbital-ring.two::after {
  background: var(--ice);
  box-shadow: 0 0 22px var(--ice);
  top: auto;
  bottom: 14%;
}
.logo-stage {
  position: relative;
  z-index: 1;
  width: 58%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: translate3d(var(--logo-x,0px), var(--logo-y,0px),0);
  transition: transform 140ms cubic-bezier(.2,.75,.25,1);
  mix-blend-mode: screen;
}
.original-hero-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1) invert(1) contrast(1.35) sepia(.45);
  opacity: .95;
  clip-path: inset(14% 12% 14%);
  transform: scale(1.16);
}
.field-index {
  position: absolute;
  top: 16px;
  left: 10%;
  font: 600 9.5px/1.8 'JetBrains Mono', 'Space Grotesk', sans-serif;
  color: var(--copper);
  letter-spacing: .16em;
}
.field-index::before {
  content: '✳ ';
  color: var(--copper);
  margin-right: 6px;
}
.field-caption {
  position: absolute;
  bottom: 12px;
  left: 10%;
  right: 6%;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font: 500 8.5px/1.8 'JetBrains Mono', 'Space Grotesk', sans-serif;
  letter-spacing: .14em;
  color: #A39B92;
}
.field-caption span:last-child { color: var(--ice); }
.hero-orbit-label {
  position: absolute;
  right: 2%;
  top: 26%;
  border-inline-start: 2px solid var(--ice);
  padding-inline-start: 12px;
  font: 600 9.5px/1.8 'JetBrains Mono', 'Space Grotesk', sans-serif;
  color: var(--ice);
  letter-spacing: .1em;
}
.hero-orbit-label small {
  display: block;
  font-size: 7.5px;
  color: #8C847A;
}
.motion-toggle {
  position: absolute;
  right: 6%;
  bottom: -25px;
  z-index: 4;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: 9px 'JetBrains Mono', 'Tajawal', sans-serif;
  padding: 8px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* ==========================================================================
   TICKER
   ========================================================================== */
.ticker {
  background: #110E0C;
  color: #DDD4CA;
  border-bottom: 1px solid var(--line);
}
.ticker .wrap {
  min-height: 72px;
  font: 500 10px 'JetBrains Mono', 'Tajawal', sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ticker b { color: var(--copper); font-size: 14px; }

/* ==========================================================================
   SECTIONS & MONUMENTAL PYLON ARCHITECTURE
   ========================================================================== */
.section { padding: 104px 0; }
.section-head { margin-bottom: 48px; }
.section h2, .section-head h2, .intro-text, .contact h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.1;
  color: var(--ink);
}
.section h2 { font-size: clamp(38px, 4.4vw, 64px); }
.section-head p, .intro-side {
  color: var(--muted);
  line-height: 1.85;
  font-size: 15px;
}
.intro-text { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.25; }
.intro-text strong { background: none; color: var(--copper); font-weight: 600; }
.intro-side .rule { background: var(--copper); height: 2px; width: 45px; }

/* Company Profile (About) */
.profile {
  background: linear-gradient(145deg, #16120F, #0E0B09);
  border-block: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.profile::before {
  content: 'ZAKAA';
  position: absolute;
  right: -20px;
  top: -90px;
  font: 800 320px 'Space Grotesk', sans-serif;
  color: rgba(229, 178, 93, 0.02);
  pointer-events: none;
  letter-spacing: -.08em;
}
.profile h2 strong { color: var(--copper); font-weight: 700; }
.profile-intro p { color: #C5BCB2; font-size: 15.5px; line-height: 1.85; }
.vm-grid { gap: 26px; }
.vm {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(229, 178, 93, 0.28);
  border-top: 3px solid var(--copper);
  border-radius: var(--radius);
  padding: 34px;
  background: radial-gradient(ellipse at 100% 0%, rgba(229, 178, 93, 0.12), transparent 60%),
              linear-gradient(145deg, #1C1713, #120E0C 80%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  transition: transform .25s ease, border-color .25s ease;
}
.vm:hover {
  transform: translateY(-3px);
  border-color: var(--copper-radiant);
}
.vm p {
  color: #EDE5DA;
  font: 500 20px/1.65 'Space Grotesk', 'Tajawal', sans-serif;
  margin-top: 14px;
}
.do-row { border-color: var(--line); }
.do-row .num {
  color: var(--copper);
  font-family: 'JetBrains Mono', 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
}
.do-row h4, .why h4 { font-weight: 600; color: #FAF7F2; }
.why {
  border: 1px solid var(--line);
  border-top: 2px solid var(--copper);
  border-radius: var(--radius);
  background: #17120E;
  padding: 28px 24px;
}

/* ==========================================================================
   SERVICES & BENTO CATALOGS
   ========================================================================== */
.services { background: #0c0907; }
.services-grid { border: 0; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service {
  padding: 30px 24px 28px;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius);
  background: linear-gradient(150deg, #1A1512, #110E0B 80%);
  min-height: 330px;
  position: relative;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .3s;
}
.service::before {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  top: -80px;
  right: -40px;
  border-radius: 50%;
  background: var(--copper);
  filter: blur(50px);
  opacity: .12;
  transition: opacity .3s;
}
.service:hover, .service:focus-within {
  transform: translateY(-5px);
  background: linear-gradient(150deg, #231C17, #130F0D);
  border-color: var(--copper) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.4), 0 0 25px var(--gold-glow);
}
.service:hover::before { opacity: .35; }
.service-num { font: 700 10.5px 'JetBrains Mono', sans-serif; color: var(--copper); }
.service-icon {
  font: 40px 'Space Grotesk', sans-serif;
  color: var(--copper);
  margin: 26px 0 18px;
  text-shadow: 0 0 25px var(--gold-glow);
}
.service h3 {
  font: 600 21px/1.3 'Space Grotesk', 'Tajawal', sans-serif;
  letter-spacing: -.03em;
  color: #FAF7F2;
}
.service p { color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.service-tail { color: var(--copper); font-size: 18px; transition: transform .2s; }
.service:hover .service-tail { transform: translateX(4px); }
html[dir='rtl'] .service:hover .service-tail { transform: translateX(-4px); }

/* Portfolio Catalogue */
.portfolio { background: #110E0C; border-block: 1px solid var(--line); }
.portfolio-controls { gap: 10px; }
.portfolio-filter {
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #C5BCB2;
  border: 1px solid var(--line);
  background: #171310;
  padding: 10px 18px;
  font-weight: 600;
  transition: background .2s, border-color .2s, color .2s;
}
.portfolio-filter[aria-pressed='true'] {
  background: var(--copper);
  color: #0c0907;
  border-color: var(--copper);
  font-weight: 700;
}
.portfolio-filter:hover:not([aria-pressed='true']) {
  border-color: var(--copper);
  color: var(--copper-radiant);
}
.portfolio-group-head { border-color: rgba(229, 178, 93, 0.35); }
.portfolio-group-head h3 {
  font: 600 28px 'Space Grotesk', 'Tajawal', sans-serif;
  letter-spacing: -.03em;
  color: #FAF7F2;
}
.portfolio-grid { gap: 24px; }
.portfolio-card {
  background: #181411;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .3s;
}
.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
  border-color: var(--copper);
}
.portfolio-media { background: #221B17; }
.portfolio-media img { transition: transform .5s ease; }
.portfolio-card:hover img { transform: scale(1.04); }
.portfolio-media--ev {
  background: radial-gradient(ellipse at 70% 20%, rgba(14, 165, 233, 0.25), transparent 55%),
              linear-gradient(145deg, #13171B, #1B292D);
}
.portfolio-media--ev::before { color: var(--ice); }
.portfolio-visual-tag {
  background: rgba(12, 9, 7, 0.92);
  color: var(--copper-radiant);
  border: 1px solid rgba(229, 178, 93, 0.3);
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  padding: 4px 8px;
}
.portfolio-body { padding: 24px; }
.portfolio-kicker { color: var(--copper); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.portfolio-card h4 {
  font: 600 22px/1.3 'Space Grotesk', 'Tajawal', sans-serif;
  letter-spacing: -.025em;
  color: #FAF7F2;
}
.portfolio-actions a:hover { color: var(--copper-radiant); }

/* Layer Diagram */
.layer {
  background: radial-gradient(ellipse at 80% 50%, rgba(229, 178, 93, 0.12), transparent 55%), #0c0907;
  position: relative;
}
.orbit { border-color: rgba(229, 178, 93, 0.35); animation: system-orbit 36s linear infinite; }
.orbit.two { border-color: rgba(14, 165, 233, 0.35); animation-direction: reverse; animation-duration: 28s; }
.orbit.three { border-color: var(--copper); }
.orbit::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--copper);
  border-radius: 50%;
  top: 14%;
  left: 14%;
  box-shadow: 0 0 20px var(--copper);
}
.core {
  color: #0c0907;
  background: radial-gradient(circle at 35% 35%, #F7CB78, #E5B25D 60%, #B38435 100%);
  border: 2px solid var(--copper);
  box-shadow: 0 0 65px var(--gold-glow);
  font: 700 18px 'Space Grotesk', 'Tajawal', sans-serif;
}
.node {
  color: #EDE5DA;
  background: #181411;
  border: 1px solid rgba(229, 178, 93, 0.3);
  border-radius: var(--radius-sm);
  font: 600 10.5px 'JetBrains Mono', 'Tajawal', sans-serif;
  padding: 10px 16px;
}

/* Steps */
.step .number { color: var(--copper); font: 700 54px 'Space Grotesk', sans-serif; letter-spacing: -.06em; }
.step h3 { font: 600 22px 'Space Grotesk', 'Tajawal', sans-serif; color: #FAF7F2; }

/* Proof */
.proof { background: #110E0C; }
.proof-note {
  background: linear-gradient(130deg, #201914, #130F0D 75%);
  border: 1px solid rgba(229, 178, 93, 0.35);
  border-radius: var(--radius);
  padding: 38px;
}
.proof-note::before {
  content: '“';
  font: 80px Georgia, serif;
  color: var(--copper);
  top: -40px;
  right: 30px;
}
.proof-note p { font: 500 28px/1.4 'Space Grotesk', 'Tajawal', sans-serif; color: #FAF7F2; }

/* Contact Section */
.contact {
  position: relative;
  overflow: hidden;
  background: #0e0b09;
  border-top: 1px solid var(--line);
  padding: 110px 0;
}
.contact::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  border: 1px solid rgba(229, 178, 93, 0.18);
  border-radius: 50%;
  left: -250px;
  top: -180px;
  box-shadow: 0 0 0 70px rgba(229,178,93,0.03), 0 0 0 140px rgba(229,178,93,0.02);
  pointer-events: none;
}
.contact h2 { font-size: clamp(48px, 5.5vw, 84px); color: #FAF7F2; }
.contact-card {
  background: linear-gradient(135deg, #241D18, #15110E 70%);
  border: 1px solid rgba(229, 178, 93, 0.35);
  border-radius: var(--radius);
  padding: 38px;
}
.contact-card a.phone { color: #FAF7F2; font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.contact-card a.phone:hover { color: var(--copper-radiant); }
.contact-card a.btn { color: #0c0907; width: 100%; margin-top: 24px; }

/* Footer */
.footer { background: #080605; border-top: 1px solid var(--line); }
.footer .brand-name { color: #FAF7F2; }
.footer .footer-tag { font: 400 18px/1.5 'Space Grotesk', 'Tajawal', sans-serif; color: var(--muted); }
.footer a, .footer .muted { color: var(--muted); }
.footer h4 { color: var(--copper); font-family: 'JetBrains Mono', monospace; font-size: 11px; }

/* Assistant Button */
.assistant-link {
  position: fixed;
  z-index: 50;
  bottom: 22px;
  right: 22px;
  border: 1px solid var(--copper);
  border-radius: 30px;
  background: rgba(22, 18, 15, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 35px rgba(0, 0, 0, 0.45), 0 0 20px var(--gold-glow);
  color: var(--copper);
  padding: 13px 20px;
  font: 600 11px 'JetBrains Mono', 'Tajawal', sans-serif;
  letter-spacing: .06em;
  transition: all .25s ease;
}
.assistant-link:hover {
  transform: translateY(-2px) scale(1.02);
  color: var(--copper-radiant);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 28px var(--gold-glow);
}

.zakaa-scroll-line {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  z-index: 80;
  background: linear-gradient(90deg, var(--ice), var(--copper));
  width: var(--zakaa-progress, 0%);
  pointer-events: none;
}

/* RTL Typography Balance */
html[dir='rtl'] body { font-family: 'Tajawal', sans-serif; }
html[dir='rtl'] :is(.hero h1, .section h2, .contact h2, .intro-text, .proof-note p, .service h3, .step h3, .do-row h4, .why h4, .portfolio-card h4, .portfolio-group-head h3, summary, .core, .footer-tag) {
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 0;
  font-weight: 600;
}
html[dir='rtl'] .hero h1 { font-size: clamp(46px, 5.4vw, 80px); line-height: 1.25; }
html[dir='rtl'] .eyebrow { letter-spacing: 0; }

@keyframes stellar-shift { to { transform: scale(1.15) translate(-2%, 2%); opacity: .7; } }
@keyframes light-sweep { to { background-position: 100% 50%; } }
@keyframes orbit-drift { to { transform: rotate(22deg) scaleY(.72); } }
@keyframes orbit-trace { to { transform: rotate(1turn); } }
@keyframes system-orbit { to { transform: rotate(360deg); } }

/* Responsive Rules */
@media (max-width: 1150px) {
  .wrap { width: calc(100% - 56px); }
  .navlinks { gap: 16px; }
  .nav-cta { display: none; }
  .hero-grid { min-height: 680px; }
  .hero-art { height: 500px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .menu { display: block; }
  .navlinks {
    display: none;
    position: absolute;
    top: 86px;
    left: 0;
    right: 0;
    padding: 24px;
    background: #16120F;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  .navlinks.open { display: flex; }
  .navlinks a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(229,178,93,0.1); }
  .hero-grid { grid-template-columns: 1fr; padding-block: 45px 40px; }
  .hero-art { width: 100%; height: 500px; margin: 0 auto; }
}

@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .nav { height: 74px; }
  .navlinks { top: 74px; }
  .brand-name { font-size: 28px; }
  .hero h1 { font-size: clamp(48px, 12vw, 68px); }
  html[dir='rtl'] .hero h1 { font-size: clamp(38px, 10vw, 54px); }
  .hero-art { height: 380px; }
  .services-grid { grid-template-columns: 1fr; }
  .intro-grid, .layer-grid, .proof-grid, .contact-grid, .profile-intro, .vm-grid, .why-grid { grid-template-columns: 1fr; }
  .assistant-link { bottom: 16px; right: 16px; padding: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .logo-stage { transform: none; }
}


/* ==========================================================================
   DYNAMIC CULTURAL GLYPHS (Universal Card Watermarks)
   ========================================================================== */
.catalog-card .card-body::after,
.bento-card .card-body::after,
.vm::after, .why::after, .service::after, .contact-card::after, .do-row::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  width: 136px;
  height: 168px;
  bottom: -22px;
  inset-inline-end: -12px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.18;
  transform: rotate(-10deg) scale(0.95);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease;
  background-image: url("./glyphs/arabic-zakaa.svg");
}

:is(.catalog-card, .bento-card):is([data-slug*="erp360"], :has(a[href*="erp360"])) .card-body::after { background-image: url("./glyphs/hiero-djed.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="worktracker"], :has(a[href*="worktracker"])) .card-body::after { background-image: url("./glyphs/hiero-wadjet.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="yourspace"], :has(a[href*="yourspace"])) .card-body::after { background-image: url("./glyphs/arabic-khatam.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="gathering"], :has(a[href*="gathering"])) .card-body::after { background-image: url("./glyphs/hiero-ankh.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="madinaty-ai"], :has(a[href*="madinaty-ai"])) .card-body::after { background-image: url("./glyphs/hiero-scarab.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="ai-software"], :has(a[href*="ai-software"])) .card-body::after { background-image: url("./glyphs/ai-neural.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="consulting"], :has(a[href*="consulting"])) .card-body::after { background-image: url("./glyphs/arabic-zakaa.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="websites-ecommerce"], :has(a[href*="websites-ecommerce"])) .card-body::after { background-image: url("./glyphs/ai-quantum.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="academy"], :has(a[href*="academy"])) .card-body::after { background-image: url("./glyphs/arabic-noon.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="autostop"], :has(a[href*="autostop"])) .card-body::after { background-image: url("./glyphs/ai-astrolabe.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="loqma"], :has(a[href*="loqma"])) .card-body::after { background-image: url("./glyphs/hiero-ankh.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="souk-el-kanto"], :has(a[href*="souk-el-kanto"])) .card-body::after { background-image: url("./glyphs/arabic-khatam.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="eduflow"], :has(a[href*="eduflow"])) .card-body::after { background-image: url("./glyphs/arabic-noon.svg"); }
:is(.catalog-card, .bento-card):is([data-slug*="masar"], :has(a[href*="masar"])) .card-body::after { background-image: url("./glyphs/ai-astrolabe.svg"); }

:is(.catalog-card, .bento-card, .vm, .why, .service):is(:hover, :focus-within) .card-body::after,
:is(.vm, .why, .service):hover::after {
  opacity: 0.38;
  transform: rotate(-3deg) scale(1.12);
  filter: drop-shadow(0 0 16px rgba(229, 178, 93, 0.45));
}

/* ==========================================================================
   ABOUT HERO: ALEXANDRIAN ASTROLABE OF COGNITION
   ========================================================================== */
.about-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  min-height: 440px;
  padding-block: 56px 48px;
  gap: 40px;
  overflow: hidden;
}
.about-hero::before, .about-hero::after { display: none !important; }

.about-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 2;
}
.about-hero-copy h1 { margin-bottom: 0; }
.about-hero-copy .lead { margin-top: 0; max-width: 620px; }

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.about-badge {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 4px;
  background: rgba(229, 178, 93, 0.08);
  border: 1px solid rgba(229, 178, 93, 0.25);
  color: var(--copper);
}

.about-hero-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.astrolabe-mechanism {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.astrolabe-limb {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(229, 178, 93, 0.4);
  box-shadow: 0 0 35px rgba(229, 178, 93, 0.15), inset 0 0 25px rgba(14, 165, 233, 0.08);
  background: radial-gradient(circle, transparent 62%, rgba(229, 178, 93, 0.05) 65%, transparent 68%);
  animation: astrolabe-limb-spin 90s linear infinite;
}
.astrolabe-limb::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(229, 178, 93, 0.25);
}
.astrolabe-limb::after {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.astrolabe-khatam {
  position: absolute;
  width: 58%;
  height: 58%;
  border: 1.5px solid rgba(229, 178, 93, 0.35);
  transform: rotate(0deg);
  animation: khatam-counter-spin 45s linear infinite;
}
.astrolabe-khatam::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border: 1.5px solid rgba(229, 178, 93, 0.35);
  transform: rotate(45deg);
  background: rgba(229, 178, 93, 0.03);
}

.astrolabe-cardinal {
  position: absolute;
  font-family: var(--font-arabic, sans-serif);
  font-size: 11px;
  font-weight: 600;
  color: var(--copper);
  background: rgba(12, 9, 7, 0.9);
  padding: 3px 8px;
  border: 1px solid rgba(229, 178, 93, 0.3);
  border-radius: 4px;
  letter-spacing: 0.05em;
  z-index: 5;
}
.astrolabe-cardinal.north { top: 0; transform: translateY(-50%); }
.astrolabe-cardinal.south { bottom: 0; transform: translateY(50%); }
.astrolabe-cardinal.east { inset-inline-end: 0; transform: translateX(50%); }
.astrolabe-cardinal.west { inset-inline-start: 0; transform: translateX(-50%); }

.astrolabe-core {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 178, 93, 0.25) 0%, rgba(12, 9, 7, 0.95) 70%);
  border: 1.5px solid var(--copper);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(229, 178, 93, 0.4), inset 0 0 15px rgba(229, 178, 93, 0.3);
  z-index: 4;
}
.solar-pulse {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  border: 1px dashed rgba(229, 178, 93, 0.4);
  animation: solar-pulse-breathe 4s ease-in-out infinite alternate;
}
.core-glyph svg {
  width: 44px;
  height: 44px;
  animation: core-glyph-float 6s ease-in-out infinite alternate;
}

.hiero-orbit-marker {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(12, 9, 7, 0.92);
  border: 1px solid var(--copper);
  box-shadow: 0 0 14px rgba(229, 178, 93, 0.35);
  background-position: center;
  background-size: 65%;
  background-repeat: no-repeat;
  z-index: 6;
}
.hiero-orbit-marker.ankh {
  top: 18%;
  inset-inline-start: 14%;
  background-image: url("./glyphs/hiero-ankh.svg");
  animation: orbit-bob-1 5s ease-in-out infinite alternate;
}
.hiero-orbit-marker.wadjet {
  bottom: 20%;
  inset-inline-start: 16%;
  background-image: url("./glyphs/hiero-wadjet.svg");
  animation: orbit-bob-2 6s ease-in-out infinite alternate 1s;
}
.hiero-orbit-marker.djed {
  top: 25%;
  inset-inline-end: 14%;
  background-image: url("./glyphs/hiero-djed.svg");
  animation: orbit-bob-3 5.5s ease-in-out infinite alternate 0.5s;
}

@keyframes astrolabe-limb-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes khatam-counter-spin { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@keyframes solar-pulse-breathe { 0% { transform: scale(0.92); opacity: 0.4; } 100% { transform: scale(1.12); opacity: 0.9; } }
@keyframes core-glyph-float { 0% { transform: translateY(-2px) scale(0.96); } 100% { transform: translateY(2px) scale(1.04); } }
@keyframes orbit-bob-1 { 0% { transform: translateY(0px) rotate(0deg); } 100% { transform: translateY(-8px) rotate(12deg); } }
@keyframes orbit-bob-2 { 0% { transform: translateY(0px) rotate(0deg); } 100% { transform: translateY(8px) rotate(-10deg); } }
@keyframes orbit-bob-3 { 0% { transform: translateY(0px) rotate(0deg); } 100% { transform: translateY(-6px) rotate(-8deg); } }

/* ==========================================================================
   HOMEPAGE INTERACTIVE BENTO SWITCHER
   ========================================================================== */
.bento-switcher-section {
  padding-block: 72px;
  border-top: 1px solid var(--line);
  position: relative;
}
.bento-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}
.bento-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.bento-nav {
  display: inline-flex;
  gap: 8px;
  background: rgba(22, 18, 15, 0.8);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 40px;
  backdrop-filter: blur(8px);
}
.bento-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-base, sans-serif);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bento-tab:hover {
  color: var(--ink);
  background: rgba(229, 178, 93, 0.08);
}
.bento-tab.active {
  background: var(--copper);
  color: #0c0907;
  font-weight: 700;
  box-shadow: 0 2px 14px rgba(229, 178, 93, 0.35);
}
.bento-metrics-pill {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--copper);
  background: rgba(229, 178, 93, 0.08);
  border: 1px solid rgba(229, 178, 93, 0.2);
  padding: 6px 14px;
  border-radius: 30px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.bento-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(150deg, #171310, #100d0a);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease, opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}
.bento-card.is-hidden {
  display: none !important;
}
.bento-card:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 178, 93, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(229, 178, 93, 0.12);
}
.bento-card-media {
  width: 100%;
  height: 180px;
  background: #1a1512;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
}
.bento-card-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-card:hover .bento-card-media img {
  transform: scale(1.08);
}
.bento-card .card-body {
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.bento-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #38bdf8;
  margin-bottom: 12px;
}
.bento-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.bento-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}
.bento-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   REDESIGNED /PRODUCTS & /SERVICES COMMAND HUBS
   ========================================================================== */
.hub-intro {
  padding-block: 64px 44px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.hub-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.spec-box {
  background: linear-gradient(150deg, #171310, #100d0a);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.spec-box h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--ink);
}
.spec-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spec-list li {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.spec-list li::before {
  content: '✦';
  color: var(--copper);
  font-size: 11px;
  margin-top: 2px;
}

/* Feature Matrix Table */
.matrix-container {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #14100d;
  margin-block: 36px;
}
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
  font-size: 14px;
}
.matrix-table th, .matrix-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(229, 178, 93, 0.1);
}
.matrix-table th {
  background: #1a1512;
  color: var(--copper);
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.matrix-table tr:hover td {
  background: rgba(229, 178, 93, 0.03);
}

/* 4-Phase Engineering Framework */
.phase-framework {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-block: 40px;
}
.phase-card {
  position: relative;
  background: linear-gradient(150deg, #16120e, #0e0b08);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.phase-card:hover {
  transform: translateY(-5px);
  border-color: var(--copper);
}
.phase-num {
  font-family: var(--font-mono, monospace);
  font-size: 26px;
  font-weight: 700;
  color: var(--copper);
  margin-bottom: 12px;
  opacity: 0.85;
}
.phase-card h4 {
  font-size: 17px;
  margin-bottom: 10px;
  color: var(--ink);
}
.phase-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .about-hero { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  .hub-grid-2 { grid-template-columns: 1fr; }
  .phase-framework { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .phase-framework { grid-template-columns: 1fr; }
  .bento-nav { width: 100%; justify-content: center; }
  .bento-tab { padding: 6px 12px; font-size: 12px; }
}
