/* ==========================================================================
   iSpace Technology — Global Stylesheet
   Converted from Figma: "iSpace Redesign" (dark, precision-tech aesthetic)
   --------------------------------------------------------------------------
   Contents
   1.  Design tokens (colors, fonts, spacing)
   2.  Base / reset
   3.  Utilities (container, overline, gradients, watermarks, corners)
   4.  Buttons & badges
   5.  Header / navigation
   6.  Hero
   7.  Logo marquee (clients)
   8.  Services grid (What We Do)
   9.  Stats panel
   10. Featured case study (home)
   11. Tech stack blueprint
   12. CTA + contact section
   13. Footer
   14. Inner-page hero (services / case studies / generic)
   15. Engineering focus cards
   16. Stack chips marquee
   17. Methodology timeline (4 phases)
   18. Work cards (featured work / listings)
   19. Case study detail (impact, challenge, gallery, timeline)
   20. Content pages (about / contact / careers / 404)
   21. Forms
   22. Reveal animations
   23. Responsive
   24. RTL (Arabic)
   ========================================================================== */

/* 1. Design tokens
   ========================================================================== */
:root {
  /* Surfaces */
  --bg: #030712;               /* page background            */
  --bg-deep: #000205;          /* black pearl                */
  --bg-2: #080e1a;             /* alt section background     */
  --bg-3: #0d1526;             /* raised section background  */
  --panel: rgba(13, 21, 38, 0.32);
  --input-bg: #0d131f;
  --card-glass: rgba(255, 255, 255, 0.03);

  /* Lines */
  --border: #1e2d42;
  --border-2: #1e293b;
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-ice: rgba(210, 242, 255, 0.2);

  /* Text */
  --text-hi: #f0f4f8;
  --text: #eff2f5;
  --text-mid: #8a9bb0;
  --text-low: #4d5d70;
  --muted: #9099a5;
  --placeholder: #40484b;

  /* Accents */
  --accent: #a8d8ea;           /* primary button fill        */
  --accent-ink: #080e1a;       /* text on accent             */
  --ice: #d2f2ff;
  --azure: #0094ff;
  --cyan: #00e6e8;
  --violet: #8b5cf6;

  /* Gradients */
  --grad-word: linear-gradient(90deg, #eaa8e9 0%, #5c92f6 100%);
  --grad-heading: linear-gradient(90deg, #ffffff 0%, #2e7088 100%);
  --grad-stat: linear-gradient(135deg, #6ab6ff 0%, #8b5cf6 100%);

  /* Type */
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Poppins", "Inter", sans-serif;
  --font-card: "Hanken Grotesk", "Inter", sans-serif;
  --font-hero: "Michroma", "Poppins", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --container: 1240px;
  --gutter: 24px;
  --radius-card: 20px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 88px;
}

/* 2. Base / reset
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { margin: 0; color: var(--text-hi); font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

::selection { background: rgba(0, 148, 255, 0.4); color: #fff; }

/* 3. Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { position: relative; padding-block: 96px; }
.section--tight { padding-block: 64px; }
.section--alt { background: var(--bg-2); }
.section--raised { background: var(--bg-3); border-top: 1px solid var(--border); }

/* Overline label: azure dot + mono uppercase */
.overline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--muted);
}
.overline::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--azure);
  flex: none;
}

.section-head { text-align: center; margin-bottom: 56px; }
.section-head .overline { justify-content: center; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-hi);
  margin-top: 16px;
  line-height: 1.25;
}
.section-sub {
  color: var(--text-mid);
  max-width: 560px;
  margin: 12px auto 0;
  font-size: 16px;
}

/* Gradient text helpers */
.grad-word,
.grad-heading {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.grad-word { background-image: var(--grad-word); }
.grad-heading { background-image: var(--grad-heading); }

/* Giant background watermark */
.watermark {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(90px, 15vw, 200px);
  letter-spacing: -0.05em;
  line-height: 1.1;
  color: rgba(239, 242, 245, 0.06);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.watermark--blue { color: rgba(57, 85, 167, 0.08); }

/* Azure corner brackets (8px, on card corners) */
.corners {
  --corner-color: rgba(0, 148, 255, 0.7);
  position: relative;
}
.corners::before,
.corners::after,
.corners > .corner-b::before,
.corners > .corner-b::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
}
.corners::before { top: -1px; left: -1px; border-top: 1px solid var(--corner-color); border-left: 1px solid var(--corner-color); }
.corners::after { top: -1px; right: -1px; border-top: 1px solid var(--corner-color); border-right: 1px solid var(--corner-color); }
.corners > .corner-b::before { bottom: -1px; left: -1px; border-bottom: 1px solid var(--corner-color); border-left: 1px solid var(--corner-color); }
.corners > .corner-b::after { bottom: -1px; right: -1px; border-bottom: 1px solid var(--corner-color); border-right: 1px solid var(--corner-color); }

/* Ambient radial glows */
.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.glow--violet { background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0) 70%); }
.glow--azure { background: radial-gradient(circle, rgba(0, 163, 255, 0.15) 0%, rgba(0, 163, 255, 0) 70%); }
.glow--pink { background: radial-gradient(circle, rgba(221, 88, 248, 0.15) 0%, rgba(248, 88, 188, 0) 70%); }
.glow--cyan { background: radial-gradient(circle, rgba(0, 230, 232, 0.35) 0%, rgba(0, 230, 232, 0) 70%); filter: blur(32px); opacity: 0.6; }
.glow--blue-soft { background: radial-gradient(circle, rgba(0, 148, 255, 0.6) 0%, rgba(0, 148, 255, 0) 70%); filter: blur(32px); opacity: 0.4; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 4. Buttons & badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  padding: 12px 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn svg { flex: none; }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -12px rgba(168, 216, 234, 0.45);
}

.btn--outline {
  border: 1px solid var(--border);
  color: var(--text-hi);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

.btn--outline-accent {
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-body);
}
.btn--outline-accent:hover { background: rgba(168, 216, 234, 0.1); }

.btn--sm {
  padding: 10px 20px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
}

/* Hero pill badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 17px;
  border-radius: 9999px;
  background: #242a37;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
}
.badge .badge-star { font-family: var(--font-body); font-size: 14px; line-height: 1; }

.badge--ice {
  background: rgba(210, 242, 255, 0.05);
  border-color: var(--border-ice);
  color: var(--ice);
  font-size: 12px;
}

/* 5. Header / navigation
   ========================================================================== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding: 20px 16px 0;
  display: flex;
  justify-content: center;
}
.nav-shell {
  width: 100%;
  max-width: var(--container);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 9px 13px;
  border-radius: 9999px;
  background: rgba(3, 8, 19, 0.4);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.45),
              inset 0 1px 0 1px rgba(255, 255, 255, 0.06);
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { width: 110px; height: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 15px;
  color: rgba(239, 242, 245, 0.85);
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links .caret { opacity: 0.7; }

/* Services dropdown */
.nav-item { position: relative; }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  inset-inline-start: -16px;
  min-width: 240px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(8, 14, 26, 0.95);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.65);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-mid);
}
.nav-dropdown a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-hi); }

.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 9999px;
  background: var(--card-glass);
  border: 1px solid var(--border-glass);
  font-size: 12px;
  letter-spacing: 0.3px;
  color: rgba(239, 242, 245, 0.85);
  transition: border-color 0.2s ease;
}
.lang-switch:hover { border-color: var(--accent); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  align-items: center;
  justify-content: center;
  color: var(--text-hi);
}

/* Mobile menu panel */
.mobile-menu {
  display: none;
  position: fixed;
  top: calc(var(--header-h) + 4px);
  inset-inline: 16px;
  z-index: 99;
  padding: 20px;
  border-radius: 24px;
  background: rgba(8, 14, 26, 0.97);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.75);
}
.mobile-menu.is-open { display: block; }
.mobile-menu a {
  display: block;
  padding: 13px 8px;
  font-size: 16px;
  color: var(--text-hi);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: 16px; width: 100%; border-bottom: 0; }
.mobile-menu .btn--primary { color: var(--accent-ink); }
.mobile-menu .mobile-sub { padding-inline-start: 20px; font-size: 14px; color: var(--text-mid); }

/* 6. Hero (home)
   ========================================================================== */
.hero {
  position: relative;
  padding: 154px 24px 120px;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg .glow--violet { width: 800px; height: 800px; left: 50%; top: 102px; transform: translateX(-50%); opacity: 0.6; }
.hero-bg .glow--azure { width: 600px; height: 600px; inset-inline-start: 68%; top: 279px; }
.hero-bg .glow--pink { width: 600px; height: 600px; inset-inline-start: 2%; top: -200px; }
.hero-bg .glow--cyan { width: 900px; height: 900px; inset-inline-start: -30%; top: -183px; }

.hero-inner { position: relative; z-index: 1; max-width: 980px; margin-inline: auto; }

.hero-title {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 58px);
  line-height: 1.42;
  letter-spacing: -0.04em;
  color: var(--text-hi);
  margin-top: 60px;
}
.hero-sub {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(15px, 1.6vw, 16px);
  line-height: 1.8;
  color: var(--text-mid);
  max-width: 720px;
  margin: 36px auto 0;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 44px;
}

/* 7. Logo marquee (clients)
   ========================================================================== */
.clients { position: relative; padding-block: 56px 72px; overflow: hidden; }
.clients-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 40px;
}
.clients-head p { color: var(--text-mid); font-size: 14px; }

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 60px;
  width: max-content;
  animation: marquee 60s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Logos stay transparent and keep their full brand colors (no desaturation overlay) */
.logo-cell {
  position: relative;
  flex: none;
  width: 120px;
  height: 120px;
}
.logo-cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 8. Services grid (What We Do — home)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.service-card {
  position: relative;
  padding: 33px;
  border-radius: var(--radius-card);
  background: var(--panel);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
  overflow: hidden;
  display: block;
}
.service-card:hover {
  border-color: rgba(0, 148, 255, 0.5);
  transform: translateY(-4px);
  background: rgba(13, 21, 38, 0.6);
}
.service-card .num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.2px;
  color: var(--muted);
}
.service-card h3 {
  margin-top: 14px;
  font-family: var(--font-card);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-hi);
  line-height: 1.3;
}
.service-card h3 .light { font-weight: 300; color: rgba(239, 242, 245, 0.75); }
.service-card p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-mid);
  max-width: 42ch;
}
.services-grid .service-card--sm h3 { font-size: 18px; }
.services-grid-sm {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

/* 9. Stats panel
   ========================================================================== */
.stats-panel {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 148, 255, 0.35);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(59, 92, 184, 0.25) 0%, rgba(13, 21, 38, 0.4) 55%),
    var(--bg-2);
  box-shadow: 0 40px 120px -60px rgba(0, 148, 255, 0.35),
              inset 0 1px 0 1px rgba(255, 255, 255, 0.05);
  padding: 72px 48px 64px;
  overflow: hidden;
  text-align: center;
}
.stats-panel .section-title { margin-top: 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
}
.stat {
  padding-inline: 24px;
  position: relative;
}
.stat + .stat::before {
  content: "";
  position: absolute;
  inset-block: 12px;
  inset-inline-start: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(144, 153, 165, 0.35), transparent);
}
.stat .value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.1;
  background-image: var(--grad-stat);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.stat .rule {
  width: 48px;
  height: 1px;
  margin: 18px auto 14px;
  background: linear-gradient(90deg, transparent, rgba(144, 153, 165, 0.5), transparent);
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--text);
}
.stat .hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* 10. Featured case study (home)
   ========================================================================== */
.case-feature { position: relative; overflow: hidden; }
.case-feature .watermark { top: -10px; inset-inline-start: -34px; }

.case-feature-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}
.case-feature-head .index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.2px;
  color: var(--muted);
}
.case-feature-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 24px;
  position: relative;
  z-index: 1;
  align-items: stretch;
}

/* Visual panel (left) */
.case-visual {
  position: relative;
  border-radius: var(--radius-lg);
  background: #0b1120;
  border: 1px solid var(--border-2);
  padding: 49px;
  display: flex;
  flex-direction: column;
  gap: 52px;
  overflow: hidden;
}
.mockups {
  position: relative;
  min-height: 256px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}
.mockups .connect {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 128px;
  height: 40px;
  opacity: 0.8;
}
.mock-panel {
  width: 256px;
  max-width: 46%;
  border-radius: 12px;
  padding: 17px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.mock-panel--dark {
  background: #111827;
  border: 1px solid #1f2937;
  transform: rotate(-2deg);
}
.mock-panel--light {
  background: #eef1f6;
  border: 1px solid #d7dde7;
  transform: rotate(2deg);
}
.mock-dots { display: flex; gap: 6px; margin-bottom: 16px; }
.mock-dots i {
  width: 8px; height: 8px; border-radius: 50%;
}
.mock-dots i:nth-child(1) { background: rgba(239, 68, 68, 0.5); }
.mock-dots i:nth-child(2) { background: rgba(234, 179, 8, 0.5); }
.mock-dots i:nth-child(3) { background: rgba(34, 197, 94, 0.5); }
.mock-bar {
  height: 10px;
  border-radius: 6px;
  background: rgba(144, 153, 165, 0.25);
  margin-bottom: 10px;
}
.mock-panel--light .mock-bar { background: rgba(13, 21, 38, 0.15); }
.mock-bar.w-60 { width: 60%; }
.mock-bar.w-80 { width: 80%; }
.mock-bar.w-40 { width: 40%; }

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kpi .kpi-value {
  font-family: var(--font-mono);
  font-size: 26px;
  color: var(--text-hi);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.kpi .kpi-value .up { color: #34d399; font-size: 13px; }
.kpi .kpi-value .down { color: #38bdf8; font-size: 13px; }
.kpi .kpi-value .unit { color: var(--muted); font-size: 13px; }
.kpi .kpi-label {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.98px;
  text-transform: uppercase;
  color: rgba(144, 153, 165, 0.8);
}

/* Narrative column (right) */
.case-story { padding-block: 40px; }
.case-story .story-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--muted);
}
.case-story h3 {
  margin-top: 24px;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.037em;
  line-height: 1.08;
  color: var(--text);
}
.case-story h3 .thin {
  display: block;
  font-weight: 200;
  color: rgba(239, 242, 245, 0.8);
}
.case-story blockquote {
  margin: 44px 0 0;
  padding-inline-start: 18px;
  border-inline-start: 2px solid rgba(0, 148, 255, 0.6);
  font-style: italic;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(239, 242, 245, 0.9);
}
.case-story blockquote footer {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.case-story .btn { margin-top: 28px; }

.case-feature-more { text-align: center; margin-top: 72px; position: relative; z-index: 1; }

/* Featured case study carousel */
.carousel-nav { display: flex; align-items: center; gap: 12px; }
.carousel-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.carousel-btn:hover { border-color: rgba(0, 148, 255, 0.6); background: rgba(0, 148, 255, 0.08); color: #fff; }
.carousel-btn:focus-visible { outline: 2px solid rgba(0, 148, 255, 0.7); outline-offset: 2px; }
[dir="rtl"] .carousel-btn svg { transform: scaleX(-1); }

.case-carousel { position: relative; z-index: 1; overflow: hidden; }
.case-carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.case-slide { flex: 0 0 100%; min-width: 100%; }
[dir="rtl"] .case-carousel-track { flex-direction: row-reverse; }

.kpis.kpis--3 { grid-template-columns: repeat(3, 1fr); }
.kpi .kpi-value.kpi-value--sm,
.kpis--3 .kpi .kpi-value { font-size: 20px; }
.kpis--3 .kpi .kpi-value.kpi-value--sm { font-size: 15px; letter-spacing: -0.02em; }
.kpi .kpi-value .unit { color: var(--muted); font-size: 13px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(144, 153, 165, 0.35);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}
.carousel-dot:hover { background: rgba(144, 153, 165, 0.6); }
.carousel-dot.is-active { width: 26px; border-radius: 4px; background: #0094ff; }
.carousel-dot:focus-visible { outline: 2px solid rgba(0, 148, 255, 0.7); outline-offset: 2px; }


/* 11. Tech stack blueprint
   ========================================================================== */
.stack-section { position: relative; }
.stack-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
.stack-intro { flex: 0 0 330px; padding-top: 48px; }
.stack-intro h2 {
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.33;
  letter-spacing: -0.058em;
  color: var(--text);
}
.stack-intro h2 .light { font-weight: 300; color: rgba(239, 242, 245, 0.8); }

.stack-board {
  flex: 1;
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-glass);
  background: var(--card-glass);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.45),
              inset 0 1px 0 1px rgba(255, 255, 255, 0.06);
  padding: 41px;
  overflow: hidden;
}
.stack-ruler {
  position: absolute;
  top: 8px;
  inset-inline: 16px;
  display: flex;
  justify-content: space-around;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.9px;
  color: rgba(144, 153, 165, 0.7);
}
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.tech-card {
  background: var(--card-glass);
  border: 1px solid var(--border-glass);
  border-radius: 28px;
  padding: 21px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.tech-card:hover { border-color: rgba(0, 148, 255, 0.5); background: rgba(255, 255, 255, 0.05); }
.stack-grid .tech-card:nth-child(even) { margin-top: 20px; }
.tech-card img { width: 32px; height: 32px; }
.tech-card .name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.037em;
  color: var(--text);
  line-height: 1.4;
}
.tech-card .code {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.98px;
  text-transform: uppercase;
  color: rgba(144, 153, 165, 0.8);
  margin-top: 3px;
}

/* 12. CTA + contact section
   ========================================================================== */
.cta-contact {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(87, 123, 226, 0) 0%, rgba(59, 92, 184, 0.35) 100%);
  padding-block: 100px 64px;
}
.cta-contact .watermark { bottom: 40px; inset-inline-start: -60px; }

.cta-head { text-align: center; position: relative; z-index: 1; }
.cta-head h2 {
  margin-top: 23px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.5vw, 40px);
  letter-spacing: -0.012em;
  line-height: 1.44;
}
.cta-head .cta-sub {
  margin: 20px auto 0;
  max-width: 672px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-mid);
}

/* Simple centered CTA (inner pages) */
.cta-simple { text-align: center; position: relative; z-index: 1; }
.cta-simple .btn { margin-top: 36px; }
.cta-simple .cta-alt {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-mid);
}
.cta-simple .cta-alt a { color: var(--accent); }

.contact-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 24px;
  margin-top: 72px;
  position: relative;
  z-index: 1;
}

.contact-form-card {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 49px;
  overflow: hidden;
}
.contact-form-card > .glow { width: 288px; height: 288px; inset-inline-end: -105px; top: -76px; }
.contact-form-card h2 {
  font-family: var(--font-card);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.contact-side { display: flex; flex-direction: column; gap: 24px; }
.info-card {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 33px;
  overflow: hidden;
}
.info-card--accent { border-color: var(--border-ice); }
.info-card--accent > .glow { width: 288px; height: 288px; inset-inline-end: -112px; top: 15px; }
.info-card .info-head { display: flex; gap: 16px; align-items: flex-start; }
.info-card .icon-tile {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(210, 242, 255, 0.1);
  color: var(--ice);
}
.info-card .icon-tile--violet { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; }
.info-card h3 {
  font-family: var(--font-card);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}
.info-card .info-line { color: var(--text-mid); font-size: 16px; }
.info-card .info-hint { color: var(--text-mid); opacity: 0.7; font-size: 14px; margin-top: 4px; }
.info-card .info-block + .info-block { margin-top: 16px; }
.info-card .info-block strong { color: var(--text-hi); font-weight: 600; font-size: 16px; display: block; }
.info-card .info-block span { color: var(--text-mid); font-size: 14px; }

.direct-links { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
.direct-links a {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-hi);
  font-size: 16px;
}
.direct-links a:hover { color: var(--accent); }
.direct-links .ring {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(210, 242, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ice);
}
.info-card--accent h3 { color: var(--ice); }

/* 13. Footer
   ========================================================================== */
.site-footer {
  position: relative;
  padding: 80px 0 40px;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 80px;
}
.footer-brand .logo-line {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.025em;
  color: #fff;
}
.footer-brand .logo-line .hl { color: var(--accent); }
.footer-brand p { margin-top: 22px; color: var(--text-low); font-size: 16px; line-height: 1.6; }
.footer-social { display: flex; gap: 16px; margin-top: 28px; }
.footer-social a { color: var(--text-low); transition: color 0.2s ease; }
.footer-social a:hover { color: var(--accent); }

.footer-col h4 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 23px;
}
.footer-col li { margin-bottom: 15px; }
.footer-col a, .footer-col span { color: var(--text-low); font-size: 16px; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--text-hi); }
.footer-col .group strong {
  display: block;
  color: #fff;
  font-weight: 500;
  font-size: 16px;
}
.footer-col .group { margin-bottom: 23px; }

.footer-bottom {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { color: var(--text-mid); font-size: 16px; margin: 0; }
.footer-lang {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.2px;
  color: var(--accent);
}
.footer-legal {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-low);
}
.footer-legal a { color: var(--text-low); transition: color 0.2s ease; }
.footer-legal a:hover { color: var(--text-hi); }

/* 14. Inner-page hero (services / case studies / generic)
   ========================================================================== */
.page-hero {
  position: relative;
  padding: 170px 0 90px;
  overflow: hidden;
}
.page-hero .hero-bg .glow--violet { width: 800px; height: 800px; left: 50%; top: -300px; transform: translateX(-50%); opacity: 0.5; }
.page-hero .hero-bg .glow--cyan { width: 900px; height: 900px; inset-inline-start: -30%; top: -283px; }
.page-hero .hero-bg .glow--azure { width: 600px; height: 600px; inset-inline-end: -10%; top: -100px; }

.page-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 48px;
  align-items: center;
}
.page-hero h1 {
  margin-top: 28px;
  font-family: var(--font-card);
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text-hi);
}
.page-hero h1 .light { font-weight: 300; color: rgba(240, 244, 248, 0.85); }
.page-hero .lead {
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-mid);
  max-width: 54ch;
}
.page-hero .hero-ctas { justify-content: flex-start; margin-top: 36px; }

.page-hero--center { text-align: center; }
.page-hero--center .lead { margin-inline: auto; }
.page-hero--center .hero-ctas { justify-content: center; }

/* Framed visual (dashboard/browser mock) */
.frame-visual {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  background: rgba(8, 14, 26, 0.8);
  padding: 14px;
  box-shadow: 0 40px 120px -50px rgba(0, 148, 255, 0.4);
}
.frame-visual::before {
  content: "";
  position: absolute;
  inset: -60px;
  background: radial-gradient(circle at 60% 40%, rgba(139, 92, 246, 0.18), transparent 65%);
  pointer-events: none;
}
.frame-visual .mock-dots { margin: 2px 4px 12px; }
.frame-visual img {
  border-radius: 12px;
  width: 100%;
  object-fit: cover;
}

/* Phone-style frame for portrait (mobile app) visuals */
.frame-visual--phone {
  max-width: 300px;
  margin-inline: auto;
  border-radius: 40px;
  padding: 12px;
}
.frame-visual--phone .mock-dots { display: none; }
.frame-visual--phone::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
}
.frame-visual--phone img {
  border-radius: 30px;
  max-height: 540px;
  object-fit: cover;
  object-position: center top;
}
@media (max-width: 900px) {
  .frame-visual--phone { max-width: 260px; }
  .frame-visual--phone img { max-height: 460px; }
}

/* Case-study hero specifics */
.case-hero-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--card-glass);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-mid);
}
.kpi-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; max-width: 460px; }
.kpi-card {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 16px;
}
.kpi-card .v {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--text-hi);
}
.kpi-card .l { margin-top: 4px; font-size: 11px; color: var(--muted); }

/* 15. Engineering focus cards (service pages)
   ========================================================================== */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.focus-card {
  --corner-color: rgba(0, 211, 242, 0.6);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 33px;
  transition: border-color 0.25s ease;
}
.focus-card:hover { border-color: rgba(0, 211, 242, 0.5); }
.focus-card h3 {
  font-family: var(--font-card);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-hi);
}
.focus-card p { margin-top: 10px; font-size: 14px; color: var(--text-mid); }
.focus-card--wide { grid-column: 1 / -1; }

/* 16. Stack chips marquee (service pages)
   ========================================================================== */
.chips-marquee { overflow: hidden; position: relative; z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.chips-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee 35s linear infinite;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  border: 1px solid var(--border-glass);
  background: var(--card-glass);
  padding: 20px 32px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.chip img, .chip svg { width: 26px; height: 26px; }

/* 17. Methodology timeline (4 phases)
   ========================================================================== */
.phases {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  z-index: 1;
}
.phases::before {
  content: "";
  position: absolute;
  top: 28px;
  inset-inline: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 211, 242, 0.35), rgba(0, 211, 242, 0.35), transparent);
}
.phase { position: relative; text-align: start; }
.phase .ring {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #020618;
  border: 1px solid rgba(0, 211, 242, 0.4);
  box-shadow: 0 0 30px -5px rgba(34, 211, 238, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  margin-bottom: 24px;
}
.phase h3 {
  font-family: var(--font-card);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-hi);
}
.phase p { margin-top: 8px; font-size: 13.5px; color: var(--text-mid); max-width: 30ch; }

/* 18. Work cards (featured work / listing)
   ========================================================================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.work-grid--3 { grid-template-columns: repeat(3, 1fr); }
.work-card {
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.work-card:hover { border-color: rgba(0, 148, 255, 0.5); transform: translateY(-4px); }
.work-card .thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 20%, rgba(59, 92, 184, 0.35), rgba(8, 14, 26, 0.9));
}
.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-card .thumb--logo { display: flex; align-items: center; justify-content: center; }
.work-card .thumb--logo img { width: 44%; height: auto; object-fit: contain; }
.work-card .body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.work-card .row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.work-card h3 { font-family: var(--font-card); font-size: 20px; font-weight: 700; color: var(--text-hi); }
.work-card .tag { font-size: 12px; color: var(--muted); margin-top: 4px; }
.work-card .metrics { text-align: end; }
.work-card .metrics .m1 { font-family: var(--font-mono); font-size: 13px; color: var(--accent); white-space: nowrap; }
.work-card .metrics .m2 { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.work-card .desc { margin-top: 14px; font-size: 14px; color: var(--text-mid); flex: 1; }
.work-card .btn { margin-top: 20px; align-self: flex-start; }

/* 19. Case study detail
   ========================================================================== */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
  z-index: 1;
}
.impact { text-align: center; }
.impact .value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1.1;
  background-image: var(--grad-stat);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.impact .rule {
  width: 64px; height: 1px;
  margin: 20px auto 16px;
  background: linear-gradient(90deg, transparent, rgba(144, 153, 165, 0.5), transparent);
}
.impact .label { color: var(--text-hi); font-weight: 600; font-size: 16px; }
.impact .hint { margin-top: 6px; font-size: 13px; color: var(--muted); }

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  position: relative;
  z-index: 1;
}
.split-col h3 {
  margin-top: 18px;
  font-family: var(--font-card);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-hi);
}
.split-col > p { margin-top: 18px; font-size: 15px; line-height: 1.75; color: var(--text-mid); }
.point-list { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.point-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  color: var(--text);
}
.point-list .pt-icon {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.point-list--warn .pt-icon { color: #fbbf24; }
.point-list--ok .pt-icon { color: #34d399; }

/* Gallery — overlapping screens */
.gallery {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: 24px;
  z-index: 1;
}
.gallery img {
  border-radius: 14px;
  border: 1px solid var(--border-2);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
  width: 40%;
}
.gallery img.side { opacity: 0.55; width: 34%; }
.gallery img.side--l { transform: translateX(18%) rotate(-2deg) scale(0.96); }
.gallery img.side--r { transform: translateX(-18%) rotate(2deg) scale(0.96); }
.gallery img.main { position: relative; z-index: 2; }

/* Project timeline card */
.timeline-card {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 64px 49px 49px;
  z-index: 1;
  overflow: hidden;
}
.timeline-card > h2 {
  font-family: var(--font-card);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 40px;
}
.tl-row {
  position: relative;
  display: grid;
  grid-template-columns: 120px 40px 1fr;
  gap: 8px;
  padding-block: 4px 36px;
}
.tl-row:last-child { padding-bottom: 0; }
.tl-week {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
  background: rgba(168, 216, 234, 0.08);
  border: 1px solid rgba(168, 216, 234, 0.25);
  border-radius: 9999px;
  padding: 5px 12px;
  height: fit-content;
  width: fit-content;
  white-space: nowrap;
}
.tl-node { position: relative; display: flex; justify-content: center; }
.tl-node .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--azure);
  margin-top: 6px;
  z-index: 1;
  box-shadow: 0 0 12px rgba(0, 148, 255, 0.6);
}
.tl-row:not(:last-child) .tl-node::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: -36px;
  width: 1px;
  background: linear-gradient(180deg, rgba(0, 148, 255, 0.5), rgba(0, 148, 255, 0.08));
}
.tl-body h3 { font-family: var(--font-card); font-size: 17px; font-weight: 700; color: var(--text-hi); }
.tl-body p { margin-top: 6px; font-size: 14px; color: var(--text-mid); }

/* 20. Content pages (about / contact / careers / 404)
   ========================================================================== */
.prose-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: start;
  position: relative;
  z-index: 1;
}
.prose-grid h2 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.prose p { font-size: 15.5px; line-height: 1.8; color: var(--text-mid); }
.prose p + p { margin-top: 18px; }
.prose strong { color: var(--text-hi); font-weight: 600; }

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.value-card {
  --corner-color: rgba(0, 148, 255, 0.7);
  background: var(--card-glass);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  padding: 28px 24px;
}
.value-card .v-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.2px;
  color: var(--muted);
}
.value-card h3 { margin-top: 14px; font-family: var(--font-card); font-size: 18px; font-weight: 700; }
.value-card p { margin-top: 10px; font-size: 13.5px; color: var(--text-mid); }

.office-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

.partner-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.partner-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-mid);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 12px 28px;
  background: var(--card-glass);
}

/* Careers */
.job-list { display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  padding: 24px 28px;
  transition: border-color 0.25s ease;
}
.job-card:hover { border-color: rgba(0, 148, 255, 0.5); }
.job-card h3 { font-family: var(--font-card); font-size: 19px; font-weight: 700; }
.job-card .job-meta { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* 404 */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}
.error-page .code {
  font-family: var(--font-mono);
  font-size: clamp(90px, 18vw, 160px);
  line-height: 1;
  background-image: var(--grad-stat);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.error-page h1 { margin-top: 24px; font-family: var(--font-display); font-size: 28px; }
.error-page p { margin-top: 12px; color: var(--text-mid); }
.error-page .btn { margin-top: 32px; }

/* 21. Forms
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-mid);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--text-hi);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--placeholder); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(0, 148, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 148, 255, 0.12);
}
.field select {
  color: #dde2f4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a9bb0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-inline-end: 44px;
}
[dir="rtl"] .field select { background-position: left 16px center; }
.field textarea { min-height: 140px; resize: vertical; }

.form-note {
  display: none;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.08);
  color: #6ee7b7;
  font-size: 14px;
}
.form-note.is-visible { display: block; }

/* 22. Reveal animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track, .chips-track { animation: none; }
}

/* 23. Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav-links { gap: 24px; }
  .nav-actions .btn { display: none; }
  .stack-layout { flex-direction: column; }
  .stack-intro { flex: none; padding-top: 0; max-width: 560px; }
  .stack-intro h2 br { display: none; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .lang-switch { display: none; }
  .mobile-menu .lang-switch { display: inline-flex; }

  .services-grid,
  .focus-grid,
  .split-grid,
  .contact-grid,
  .case-feature-grid,
  .page-hero-grid,
  .prose-grid { grid-template-columns: 1fr; }
  .services-grid-sm { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .stat:nth-child(3)::before { display: none; }
  .work-grid, .work-grid--3 { grid-template-columns: 1fr 1fr; }
  .value-grid { grid-template-columns: 1fr 1fr; }
  .office-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
  .phases { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .phases::before { display: none; }
  .impact-grid { grid-template-columns: 1fr; gap: 40px; }
  .case-story { padding-block: 8px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .case-feature-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .gallery img.side { display: none; }
  .gallery img.main, .gallery img { width: 100%; }
  .tl-row { grid-template-columns: 96px 32px 1fr; }
  .section { padding-block: 72px; }
}

@media (max-width: 560px) {
  :root { --gutter: 20px; }
  .hero { padding-top: 130px; }
  .hero-ctas .btn { width: 100%; }
  .services-grid-sm { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat + .stat::before { display: none; }
  .stats-panel { padding: 48px 24px; }
  .work-grid, .work-grid--3 { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .stack-board { padding: 28px 20px; }
  .phases { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-form-card { padding: 32px 24px; }
  .kpi-cards { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .mockups { flex-direction: column; gap: 20px; min-height: 0; }
  .mockups .connect { display: none; }
  .mock-panel { max-width: 100%; width: 100%; }
  .case-visual { padding: 28px 22px; }
  .tl-row { grid-template-columns: 1fr; gap: 10px; }
  .tl-node { display: none; }
  .timeline-card { padding: 40px 24px 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* 24. RTL (Arabic)
   ========================================================================== */
[dir="rtl"] body,
[dir="rtl"] {
  --font-body: "Tajawal", "Inter", sans-serif;
  --font-display: "Tajawal", "Poppins", sans-serif;
  --font-card: "Tajawal", "Hanken Grotesk", sans-serif;
  --font-hero: "Tajawal", sans-serif;
}
[dir="rtl"] .hero-title { font-weight: 700; letter-spacing: 0; line-height: 1.55; }
[dir="rtl"] .section-title,
[dir="rtl"] .cta-head h2,
[dir="rtl"] .stack-intro h2 { letter-spacing: 0; }
[dir="rtl"] .overline { letter-spacing: 1px; }
[dir="rtl"] .badge { letter-spacing: 0.5px; }
[dir="rtl"] .marquee-track { animation-direction: reverse; }
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }
[dir="rtl"] .case-story h3 { letter-spacing: 0; line-height: 1.4; }
[dir="rtl"] .watermark { letter-spacing: 0; }
