@font-face {
  font-family: "Noto Naskh Arabic Local";
  src: url("/assets/fonts/NotoNaskhArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Naskh Arabic Local";
  src: url("/assets/fonts/NotoNaskhArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #080a0f;
  --bg-2: #0d1118;
  --surface: rgba(18, 23, 31, 0.82);
  --surface-strong: rgba(22, 28, 38, 0.95);
  --surface-soft: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f7f8fb;
  --muted: #b6bfcc;
  --soft: #8a95a6;
  --cyan: #38c7e8;
  --green: #61d49c;
  --amber: #f0b35d;
  --coral: #ef6b7d;
  --violet: #8b7cf6;
  --shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
  --page-background:
    linear-gradient(135deg, rgba(56, 199, 232, 0.1), transparent 34rem),
    linear-gradient(225deg, rgba(97, 212, 156, 0.08), transparent 30rem),
    linear-gradient(180deg, #080a0f 0%, #0b0f16 48%, #080a0f 100%);
  --grid-line: rgba(255, 255, 255, 0.026);
  --page-veil:
    linear-gradient(90deg, rgba(8, 10, 15, 0.98), rgba(8, 10, 15, 0.72), rgba(8, 10, 15, 0.98)),
    linear-gradient(180deg, rgba(8, 10, 15, 0.04), #080a0f 98%);
  --hero-overlay:
    linear-gradient(90deg, rgba(8, 10, 15, 0.98) 0%, rgba(8, 10, 15, 0.82) 44%, rgba(8, 10, 15, 0.95) 100%),
    linear-gradient(180deg, rgba(8, 10, 15, 0.08) 0%, rgba(8, 10, 15, 0.98) 100%);
  --header-bg: rgba(8, 10, 15, 0.72);
  --header-bg-scrolled: rgba(8, 10, 15, 0.92);
  --menu-bg: rgba(15, 19, 27, 0.97);
  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  --card-bg: rgba(255, 255, 255, 0.055);
  --card-bg-hover: rgba(255, 255, 255, 0.09);
  --nav-hover-bg: rgba(255, 255, 255, 0.065);
  --panel-bg:
    radial-gradient(circle at 18% 8%, rgba(84, 220, 255, 0.1), transparent 16rem),
    linear-gradient(180deg, rgba(7, 12, 18, 0.98), rgba(4, 6, 10, 0.98));
  --device-shell: linear-gradient(180deg, rgba(10, 14, 21, 0.96), rgba(5, 7, 11, 0.98));
  --phone-shell: linear-gradient(145deg, #111720, #040506 68%);
  --media-bg: #05080d;
  --phone-screen: #071018;
  --notch-bg: #050609;
  --lead: #d7deea;
  --arabic-muted: #cbd4e1;
  --accent-contrast: #06110d;
  --radius: 8px;
  --container: 1200px;
  --header: 76px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9fb;
  --bg-2: #edf2f6;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-soft: rgba(13, 30, 48, 0.055);
  --line: rgba(15, 32, 51, 0.14);
  --line-strong: rgba(15, 32, 51, 0.22);
  --text: #0a1220;
  --muted: #4c5b6d;
  --soft: #6d7b8d;
  --cyan: #0ea5d8;
  --green: #16b981;
  --amber: #d58a00;
  --coral: #d94c6a;
  --violet: #6d5bd0;
  --shadow: 0 20px 54px rgba(20, 35, 55, 0.12);
  --page-background:
    linear-gradient(135deg, rgba(14, 165, 216, 0.1), transparent 30rem),
    linear-gradient(225deg, rgba(22, 185, 129, 0.08), transparent 28rem),
    linear-gradient(180deg, #f7f9fc 0%, #edf3f8 48%, #f7f9fc 100%);
  --grid-line: rgba(15, 32, 51, 0.036);
  --page-veil:
    linear-gradient(90deg, rgba(247, 249, 252, 0.98), rgba(247, 249, 252, 0.54), rgba(247, 249, 252, 0.94)),
    linear-gradient(180deg, rgba(247, 249, 252, 0.12), #f7f9fc 98%);
  --hero-overlay:
    linear-gradient(90deg, rgba(247, 249, 252, 0.96) 0%, rgba(247, 249, 252, 0.74) 46%, rgba(247, 249, 252, 0.92) 100%),
    linear-gradient(180deg, rgba(247, 249, 252, 0.08) 0%, rgba(247, 249, 252, 0.98) 100%);
  --header-bg: rgba(247, 249, 252, 0.72);
  --header-bg-scrolled: rgba(255, 255, 255, 0.9);
  --menu-bg: rgba(255, 255, 255, 0.96);
  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.66));
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-bg-hover: rgba(255, 255, 255, 0.92);
  --nav-hover-bg: rgba(15, 32, 51, 0.055);
  --panel-bg:
    radial-gradient(circle at 18% 8%, rgba(14, 165, 216, 0.08), transparent 16rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 245, 251, 0.98));
  --device-shell: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(230, 237, 245, 0.98));
  --phone-shell: linear-gradient(145deg, #f1f6fb, #dfe8f1 68%);
  --media-bg: #edf3f8;
  --phone-screen: #f6f9fc;
  --notch-bg: #0a1220;
  --lead: #364556;
  --arabic-muted: #445467;
  --accent-contrast: #06110d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-background);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 76%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: var(--page-veil);
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.06;
  font-weight: 760;
}

h1 {
  font-size: 4.35rem;
}

h2 {
  font-size: 2.35rem;
}

h3 {
  font-size: 1.24rem;
}

.arabic {
  font-family: "Noto Naskh Arabic Local", Tahoma, Arial, sans-serif;
  line-height: 1.95;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
  padding: 0 32px;
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  background: var(--header-bg-scrolled);
  border-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--accent-contrast);
  font-size: 0.92rem;
  font-weight: 850;
  background: linear-gradient(135deg, var(--green), var(--cyan) 58%, var(--amber));
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(84, 220, 255, 0.16);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  color: var(--text);
  font-size: 0.98rem;
}

.brand-text small {
  color: var(--soft);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  color: var(--muted);
  font-size: 0.92rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--nav-hover-bg);
  border-color: var(--line);
}

.site-nav .nav-cta {
  margin-left: 8px;
  color: var(--accent-contrast);
  font-weight: 760;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border-color: transparent;
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  color: var(--text);
  background: var(--nav-hover-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
}

.theme-toggle-icon {
  position: relative;
  display: block;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.theme-toggle-icon::before {
  position: absolute;
  inset: -6px;
  content: "";
  background:
    linear-gradient(currentColor, currentColor) center top / 2px 4px no-repeat,
    linear-gradient(currentColor, currentColor) center bottom / 2px 4px no-repeat,
    linear-gradient(90deg, currentColor, currentColor) left center / 4px 2px no-repeat,
    linear-gradient(90deg, currentColor, currentColor) right center / 4px 2px no-repeat;
}

:root[data-theme="dark"] .theme-toggle-icon {
  background: currentColor;
  border: 0;
  box-shadow: inset -6px -3px 0 var(--bg);
}

:root[data-theme="dark"] .theme-toggle-icon::before {
  display: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--nav-hover-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 2px;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 86svh;
  padding: calc(var(--header) + 78px) 32px 86px;
}

.home-hero {
  display: grid;
  align-items: center;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.82;
}

.hero-backdrop::after,
.page-hero::after,
.case-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--hero-overlay);
}

.page-hero::after,
.case-hero::after {
  z-index: -1;
  pointer-events: none;
}

.hero-content,
.page-hero-content,
.case-content {
  position: relative;
  z-index: 1;
  width: min(100%, var(--container));
  max-width: 100%;
  margin: 0 auto;
}

.hero-content {
  max-width: 760px;
  margin-left: max(32px, calc((100vw - var(--container)) / 2));
}

.profile-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  margin-bottom: 24px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.profile-photo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  object-position: center top;
  border: 2px solid color-mix(in srgb, var(--green) 62%, transparent);
  border-radius: var(--radius);
  background: var(--media-bg);
}

.profile-lockup div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-lockup span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.profile-lockup strong {
  color: var(--text);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 34px;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0.7;
}

.hero-lead {
  max-width: 680px;
  margin-top: 22px;
  color: var(--lead);
  font-size: 1.16rem;
}

.hero-lead.arabic {
  max-width: 730px;
  color: var(--arabic-muted);
  font-size: 1.2rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  font-size: 0.94rem;
  font-weight: 790;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.button.primary {
  color: var(--accent-contrast);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border-color: transparent;
  box-shadow: 0 18px 44px rgba(84, 220, 255, 0.13);
}

.button.ghost {
  color: var(--text);
  background: var(--nav-hover-bg);
}

.button:hover {
  transform: translateY(-1px);
}

.laptop-frame,
.phone-frame,
.mini-shot,
.project-media,
.gallery-item,
.case-panel,
.service-card,
.stack-card,
.contact-panel,
.brief-panel,
.stack-layer,
.value-grid div,
.workflow-list div {
  border: 1px solid var(--line);
  background: var(--glass-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.laptop-frame {
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius);
  background: var(--device-shell);
}

.window-bar {
  display: flex;
  gap: 7px;
  min-height: 34px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
}

.window-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
}

.window-bar i:nth-child(2) {
  background: var(--amber);
}

.window-bar i:nth-child(3) {
  background: var(--green);
}

.laptop-frame img {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--media-bg);
  object-fit: contain;
  object-position: center top;
}

.phone-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 12px;
  background: var(--phone-shell);
  border-radius: 28px;
}

.phone-frame img {
  width: 100%;
  height: 100%;
  background: var(--phone-screen);
  object-fit: contain;
  object-position: center top;
  border-radius: 20px;
}

.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 2;
  width: 76px;
  height: 20px;
  background: var(--notch-bg);
  border-radius: 999px;
  transform: translateX(-50%);
}

.hero-laptop {
  position: absolute;
  top: 18%;
  right: 7%;
  width: 650px;
  height: 430px;
  transform: rotate(-4deg);
}

.hero-phone {
  position: absolute;
  right: 33%;
  bottom: 7%;
  width: 245px;
  height: 435px;
  transform: rotate(5deg);
}

.hero-phone.laptop-frame {
  width: 390px;
  height: 250px;
}

.mini-shot {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius);
}

.mini-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-one {
  right: 4%;
  bottom: 9%;
  width: 210px;
  height: 300px;
  transform: rotate(5deg);
}

.mini-two {
  top: 17%;
  left: 4%;
  width: 260px;
  height: 190px;
  opacity: 0.58;
  transform: rotate(4deg);
}

.section {
  width: min(100% - 64px, var(--container));
  margin: 0 auto;
  padding: 92px 0;
}

.compact-section {
  padding-top: 20px;
}

.section-intro {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.section-intro h2,
.section-copy h2,
.cta-band h2,
.contact-panel h2,
.brief-panel h2,
.stack-card h2 {
  margin-bottom: 16px;
}

.section-intro p + p {
  margin-top: 10px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-grid.small {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  min-width: 0;
}

.project-card a {
  display: grid;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card a:hover {
  background: var(--card-bg-hover);
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.project-media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.project-media img {
  width: 100%;
  height: 100%;
  padding: 10px;
  background: var(--panel-bg);
  object-fit: contain;
  object-position: center;
  transition: transform 260ms ease;
}

.project-card a:hover .project-media img {
  transform: none;
}

.project-body {
  display: grid;
  gap: 13px;
  padding: 20px;
}

.project-body span,
.project-body strong {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 790;
}

.project-body p {
  font-size: 0.94rem;
}

.project-body .arabic {
  color: var(--arabic-muted);
  font-size: 0.98rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 38px;
  align-items: center;
}

.align-start {
  align-items: start;
}

.section-copy {
  min-width: 0;
}

.pill-row,
.tech-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
  margin-top: 24px;
}

.pill-row span,
.tech-cloud span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 680;
  overflow-wrap: anywhere;
  white-space: normal;
  background: var(--nav-hover-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pill-row.light span {
  color: var(--accent-contrast);
  background: rgba(85, 239, 181, 0.88);
  border-color: transparent;
}

.tech-cloud {
  margin-top: 0;
}

.tech-cloud.compact {
  margin-top: 20px;
}

.product-stack {
  display: grid;
  gap: 12px;
}

.stack-layer {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 4px 18px;
  padding: 18px;
  border-radius: var(--radius);
}

.stack-layer span {
  grid-row: span 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--accent-contrast);
  font-weight: 850;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border-radius: var(--radius);
}

.stack-layer strong {
  font-size: 1.06rem;
}

.stack-layer small {
  color: var(--muted);
  font-size: 0.91rem;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.process-step,
.trust-strip,
.case-meta-grid {
  border: 1px solid var(--line);
  background: var(--glass-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.process-step {
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius);
}

.process-step span,
.case-meta-grid span {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.process-step p {
  margin-top: 12px;
  font-size: 0.9rem;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius);
}

.trust-strip div {
  padding: 22px;
  background: var(--card-bg);
}

.trust-strip span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-grid.large {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card {
  position: relative;
  min-height: 218px;
  padding: 24px;
  border-radius: var(--radius);
}

.service-index {
  display: inline-grid;
  width: 42px;
  height: 36px;
  margin-bottom: 30px;
  place-items: center;
  color: var(--accent-contrast);
  font-weight: 840;
  background: linear-gradient(135deg, var(--amber), var(--coral));
  border-radius: var(--radius);
}

.service-card p {
  margin-top: 14px;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 64px, var(--container));
  margin: 42px auto 96px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--cyan) 15%, transparent), color-mix(in srgb, var(--coral) 10%, transparent)),
    var(--card-bg);
}

.cta-band div {
  max-width: 720px;
}

.page-hero,
.case-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 68svh;
  overflow: hidden;
  padding: calc(var(--header) + 88px) 32px 76px;
  isolation: isolate;
}

.page-hero.compact {
  min-height: 58svh;
}

.page-hero-bg,
.case-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-hero-bg img,
.case-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  filter: saturate(1.05);
  opacity: 0.48;
}

.page-hero-content,
.case-content {
  max-width: 820px;
  margin-left: max(32px, calc((100vw - var(--container)) / 2));
}

.page-hero-content p,
.case-content p {
  max-width: 720px;
  margin-top: 22px;
  color: var(--lead);
  font-size: 1.08rem;
}

.case-content .arabic {
  color: var(--arabic-muted);
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.showcase-item {
  min-width: 0;
}

.showcase-item .phone-frame {
  height: 580px;
}

.showcase-item .laptop-frame {
  height: 360px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border-radius: var(--radius);
}

.case-meta-grid div {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.case-meta-grid div:last-child {
  border-right: 0;
}

.case-meta-grid strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.live-links-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 12%, transparent), color-mix(in srgb, var(--cyan) 10%, transparent)),
    var(--glass-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.live-links-panel h2 {
  margin-bottom: 12px;
}

.live-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.external-link::after {
  content: "open";
  margin-left: 8px;
  font-size: 0.9em;
  text-transform: uppercase;
  opacity: 0.72;
}

.case-panel,
.stack-card,
.contact-panel,
.brief-panel {
  padding: 26px;
  border-radius: var(--radius);
}

.case-panel p {
  margin-top: 16px;
}

.check-list {
  display: grid;
  gap: 13px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  line-height: 1.7;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  content: "";
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border-radius: 50%;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-item {
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius);
}

.gallery-item img {
  width: 100%;
  padding: 10px;
  background: var(--panel-bg);
  object-fit: contain;
  object-position: center;
}

.phone-gallery img {
  height: clamp(390px, 38vw, 560px);
}

.screen-gallery img {
  height: clamp(220px, 22vw, 330px);
}

.gallery-item figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  border-top: 1px solid var(--line);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.value-grid div,
.workflow-list div {
  padding: 20px;
  border-radius: var(--radius);
}

.value-grid span,
.workflow-list span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.workflow-list {
  display: grid;
  gap: 14px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.brief-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.brief-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 720;
}

.brief-form input,
.brief-form select,
.brief-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--text);
  font: inherit;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

.brief-form textarea {
  resize: vertical;
}

.brief-form input:focus,
.brief-form select:focus,
.brief-form textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 18%, transparent);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-status {
  min-height: 1.4em;
  font-size: 0.9rem;
}

.contact-line {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--nav-hover-bg);
}

.site-footer {
  padding: 54px 32px 42px;
  border-top: 1px solid var(--line);
  background: var(--header-bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 0.6fr 0.9fr;
  gap: 36px;
  width: min(100%, var(--container));
  margin: 0 auto;
}

.footer-brand {
  margin-bottom: 18px;
}

.site-footer h2 {
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--text);
}

.site-footer a,
.site-footer span {
  display: block;
  margin: 9px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p + p {
  margin-top: 10px;
}

.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 520ms ease, transform 520ms ease;
  transition-delay: var(--delay, 0ms);
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Design refresh */
body {
  text-rendering: optimizeLegibility;
}

body::before {
  background-size: 56px 56px;
  opacity: 0.68;
}

p {
  max-width: 72ch;
  overflow-wrap: break-word;
}

h1 {
  max-width: 12ch;
  letter-spacing: 0;
}

h2 {
  letter-spacing: 0;
}

.site-header {
  left: 18px;
  right: 18px;
  top: 14px;
  height: 68px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18);
}

.site-header.is-scrolled {
  border-color: var(--line-strong);
}

.brand-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.site-nav a,
.theme-toggle,
.nav-toggle,
.button,
.contact-line {
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.site-nav a {
  min-height: 38px;
}

.site-nav .nav-cta,
.button.primary {
  box-shadow: 0 14px 34px rgba(56, 199, 232, 0.16);
}

.site-nav .nav-cta:hover,
.button.primary:hover {
  box-shadow: 0 18px 42px rgba(97, 212, 156, 0.18);
}

.hero {
  min-height: 92svh;
  padding-top: calc(var(--header) + 104px);
  padding-bottom: 108px;
}

.hero-backdrop {
  opacity: 0.9;
}

.hero-content {
  max-width: 720px;
}

.profile-lockup,
.laptop-frame,
.phone-frame,
.mini-shot,
.project-media,
.gallery-item,
.case-panel,
.service-card,
.stack-card,
.contact-panel,
.brief-panel,
.stack-layer,
.value-grid div,
.workflow-list div,
.process-step,
.trust-strip,
.case-meta-grid,
.live-links-panel {
  box-shadow: var(--shadow);
}

.profile-lockup {
  margin-bottom: 28px;
  background: rgba(12, 16, 23, 0.72);
}

:root[data-theme="light"] .profile-lockup {
  background: rgba(255, 255, 255, 0.72);
}

.eyebrow {
  color: var(--cyan);
  letter-spacing: 0.08em;
}

.eyebrow::before {
  width: 28px;
}

.hero-lead {
  max-width: 650px;
  color: var(--lead);
}

.hero-laptop {
  top: 19%;
  right: 5%;
  width: min(48vw, 690px);
  height: 448px;
  transform: rotate(-2deg);
}

.hero-phone.laptop-frame {
  right: 31%;
  bottom: 8%;
  width: 420px;
  height: 270px;
  transform: rotate(3deg);
}

.mini-one {
  right: 4%;
  bottom: 8%;
  height: 290px;
}

.mini-two {
  left: 3%;
  opacity: 0.5;
}

.laptop-frame,
.phone-frame {
  border-color: color-mix(in srgb, var(--line-strong) 74%, transparent);
}

.laptop-frame img,
.phone-frame img,
.project-media img,
.gallery-item img {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--media-bg);
}

.section {
  padding: 104px 0;
}

.compact-section {
  padding-top: 28px;
}

.section-intro {
  max-width: 820px;
  margin-bottom: 38px;
}

.section-intro h2,
.section-copy h2,
.cta-band h2,
.contact-panel h2,
.brief-panel h2,
.stack-card h2 {
  max-width: 16ch;
}

.project-grid,
.service-grid,
.case-grid,
.gallery-grid {
  gap: 22px;
}

.project-card a {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028)),
    var(--card-bg);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.2);
}

.project-card a:hover {
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

.project-media {
  aspect-ratio: 16 / 9;
  background: var(--panel-bg);
}

.project-media img {
  padding: 14px;
  object-fit: contain;
}

.project-body {
  gap: 12px;
  padding: 22px;
}

.project-body h3 {
  font-size: 1.18rem;
}

.project-body span,
.project-body strong,
.process-step span,
.case-meta-grid span {
  color: var(--cyan);
}

.split-section {
  gap: 56px;
}

.stack-layer {
  align-items: center;
  padding: 20px;
}

.stack-layer span,
.service-index {
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.process-grid {
  gap: 18px;
}

.process-step,
.service-card,
.case-panel,
.stack-card,
.contact-panel,
.brief-panel,
.value-grid div,
.workflow-list div {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.028)),
    var(--card-bg);
}

.service-card {
  min-height: 236px;
}

.trust-strip {
  background: transparent;
  box-shadow: none;
  border: 0;
  gap: 18px;
}

.trust-strip div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
}

.cta-band {
  margin-top: 56px;
  margin-bottom: 112px;
  padding: 36px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green) 13%, transparent), color-mix(in srgb, var(--cyan) 10%, transparent)),
    var(--surface);
  box-shadow: var(--shadow);
}

.page-hero,
.case-hero {
  min-height: 66svh;
  padding-top: calc(var(--header) + 112px);
}

.page-hero.compact {
  min-height: 54svh;
}

.page-hero-bg img,
.case-bg img {
  opacity: 0.58;
  filter: saturate(1.08) contrast(1.04);
}

.page-hero-content,
.case-content {
  max-width: 860px;
}

.showcase-grid {
  gap: 22px;
}

.showcase-item .laptop-frame {
  height: 390px;
}

.showcase-item .phone-frame {
  height: 600px;
}

.case-meta-grid {
  background: var(--card-bg);
}

.gallery-item {
  background: var(--card-bg);
}

.gallery-item img {
  padding: 12px;
}

.gallery-item figcaption {
  min-height: 56px;
}

.brief-form input,
.brief-form select,
.brief-form textarea {
  background: color-mix(in srgb, var(--card-bg) 82%, var(--bg));
}

.site-footer {
  background: rgba(8, 10, 15, 0.88);
}

:root[data-theme="light"] .site-footer {
  background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 1080px) {
  h1 {
    font-size: 3.45rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-laptop {
    right: -4%;
    width: 560px;
  }

  .hero-phone {
    right: 22%;
  }

  .project-grid,
  .service-grid,
  .case-grid,
  .gallery-grid,
  .process-grid,
  .case-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }

  .case-meta-grid div:nth-child(2n) {
    border-right: 0;
  }

  .showcase-grid {
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .site-header {
    top: 10px;
    left: 12px;
    right: 12px;
    height: 68px;
    padding: 0 18px;
  }

  .brand-text small {
    display: none;
  }

  .nav-toggle {
    position: fixed;
    top: 20px;
    right: 18px;
    z-index: 60;
    display: block;
    background: var(--surface-strong);
  }

  .site-nav {
    position: fixed;
    top: 88px;
    left: 18px;
    right: 18px;
    display: grid;
    padding: 12px;
    background: var(--menu-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav .nav-cta {
    margin-left: 0;
  }

  .theme-toggle {
    width: 100%;
    justify-content: center;
  }

  .hero,
  .page-hero,
  .case-hero {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    min-height: 88svh;
    padding-top: 134px;
  }

  .hero-content,
  .page-hero-content,
  .case-content {
    width: 100%;
    max-width: calc(100vw - 40px);
    margin-left: 0;
  }

  .hero-laptop {
    top: 22%;
    right: -235px;
    width: 520px;
    height: 330px;
    opacity: 0.2;
  }

  .hero-phone {
    right: 12px;
    bottom: 8%;
    width: 170px;
    height: 310px;
    opacity: 0.36;
  }

  .hero-phone.laptop-frame {
    width: 280px;
    height: 182px;
  }

  .mini-one {
    display: none;
  }

  .mini-two {
    left: -84px;
    top: 22%;
    opacity: 0.18;
  }

  .section,
  .cta-band {
    width: min(100% - 36px, var(--container));
  }

  .section {
    padding: 68px 0;
  }

  .split-section,
  .contact-section,
  .footer-grid,
  .live-links-panel {
    grid-template-columns: 1fr;
  }

  .cta-band {
    display: grid;
  }

  .live-link-list {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  h1 {
    max-width: 11ch;
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.72rem;
  }

  h3 {
    font-size: 1.12rem;
  }

  .hero-lead,
  .page-hero-content p,
  .case-content p {
    width: 100%;
    max-width: calc(100vw - 40px);
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .hero-lead.arabic,
  .page-hero-content .arabic,
  .case-content .arabic {
    text-align: right;
  }

  .case-content {
    max-width: calc(100vw - 40px);
  }

  .case-content .pill-row {
    max-width: calc(100vw - 40px);
  }

  .case-content .pill-row span {
    flex: 1 1 142px;
    justify-content: center;
    text-align: center;
  }

  .project-grid,
  .project-grid.small,
  .service-grid,
  .service-grid.large,
  .case-grid,
  .case-meta-grid,
  .gallery-grid,
  .showcase-grid,
  .value-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .case-meta-grid div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .case-meta-grid div:last-child {
    border-bottom: 0;
  }

  .showcase-item .phone-frame {
    width: min(100%, 320px);
    height: 560px;
    margin: 0 auto;
  }

  .showcase-item .laptop-frame {
    height: 260px;
  }

  .phone-gallery img {
    height: min(74vh, 540px);
  }

  .screen-gallery img {
    height: clamp(210px, 62vw, 300px);
  }

  .hero-actions,
  .contact-actions {
    display: grid;
  }

  .profile-lockup {
    width: 100%;
  }

  .button,
  .contact-line {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .hero,
  .page-hero,
  .case-hero {
    width: 100vw;
    max-width: 100vw;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-content,
  .page-hero-content,
  .case-content {
    width: min(100%, 340px);
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .hero-lead,
  .hero-lead.arabic,
  .page-hero-content p,
  .case-content p {
    width: 100%;
    max-width: 100%;
  }

  .hero-actions,
  .contact-actions,
  .form-actions {
    width: 100%;
  }

  .button,
  .contact-line {
    max-width: 100%;
  }

  .profile-lockup {
    max-width: 100%;
  }

  .profile-lockup span {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .profile-lockup strong {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .profile-photo {
    width: 58px;
    height: 58px;
  }
}
