/* CodeCraft Pro Landing */
:root {
  --bg: #030712;
  --surface: #0a0f1e;
  --card: #0f172a;
  --card-hover: #141c2e;
  --border: rgba(148, 163, 184, 0.1);
  --border-accent: rgba(59, 130, 246, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #64748b;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --grad: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(6,182,212,0.08));
  --shadow: 0 24px 80px rgba(0,0,0,0.45);
  --glow: 0 0 80px rgba(59,130,246,0.2);
  --radius: 20px;
  --radius-sm: 12px;
  --font-ar: 'Cairo', system-ui, sans-serif;
  --font-en: 'Plus Jakarta Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.container { width: min(1180px, 100% - 3rem); margin-inline: auto; }

/* NAV */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  padding: 1rem 0;
  transition: padding 0.3s var(--ease), background 0.3s;
}
.nav.scrolled {
  padding: 0.65rem 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text);
}
.brand img { width: 42px; height: 42px; border-radius: 11px; box-shadow: var(--glow); }
.brand-text strong {
  display: block; font-family: var(--font-en); font-size: 1.05rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-text small { font-size: 0.7rem; color: var(--dim); letter-spacing: 0.05em; }
.nav-menu { display: flex; gap: 2rem; list-style: none; }
.nav-menu a {
  font-size: 0.875rem; font-weight: 600; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.nav-menu a:hover { color: var(--cyan); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.7rem 1.35rem; border-radius: var(--radius-sm);
  font-family: var(--font-ar); font-weight: 700; font-size: 0.875rem;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 32px rgba(59,130,246,0.35);
}
.btn-ghost {
  background: rgba(255,255,255,0.04); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-accent); background: rgba(59,130,246,0.08); }
.wa-num {
  direction: ltr;
  unicode-bidi: isolate;
}
.menu-toggle {
  display: none; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 10px;
  background: transparent; color: var(--text); font-size: 1.2rem; cursor: pointer;
}

/* HERO */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 8rem 0 5rem;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(59,130,246,0.22), transparent),
    radial-gradient(circle at 100% 50%, rgba(6,182,212,0.08), transparent 40%),
    linear-gradient(rgba(59,130,246,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.035) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem; align-items: center; position: relative; z-index: 1;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 8px; border-radius: 100px;
  background: rgba(59,130,246,0.1); border: 1px solid var(--border);
  font-size: 0.78rem; font-weight: 600; color: var(--cyan); margin-bottom: 1.5rem;
}
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{ opacity:1; } 50%{ opacity:0.35; } }
.hero h1 {
  font-family: var(--font-en);
  font-size: clamp(2.75rem, 5.5vw, 4.25rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.04em;
}
.hero h1 .line2 {
  display: block; margin-top: 0.15em;
  background: linear-gradient(135deg, #e2e8f0 0%, #60a5fa 50%, #22d3ee 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub-ar {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700; color: var(--muted); margin-top: 1rem;
}
.hero-lead {
  margin-top: 1.25rem; font-size: 1.05rem; color: var(--muted);
  max-width: 34rem; line-height: 1.75;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.5rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.hero-meta div { font-size: 0.8rem; color: var(--dim); }
.hero-meta strong { display: block; color: var(--text); font-size: 0.95rem; margin-bottom: 2px; }

/* Dashboard mockup */
.hero-panel {
  position: relative; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--shadow), var(--glow);
  overflow: hidden;
}
.hero-panel::before {
  content: ''; position: absolute; inset: -1px;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(59,130,246,0.4), transparent 40%, rgba(6,182,212,0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.panel-top {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: rgba(0,0,0,0.25);
  border-bottom: 1px solid var(--border);
}
.panel-dot { width: 10px; height: 10px; border-radius: 50%; }
.panel-dot.r { background: #ef4444; }
.panel-dot.y { background: #f59e0b; }
.panel-dot.g { background: #22c55e; }
.panel-title {
  margin-left: 8px; font-family: var(--font-en); font-size: 0.72rem;
  color: var(--dim); font-weight: 600;
}
.panel-body { padding: 20px; }
.code-block {
  font-family: 'Consolas', 'Monaco', monospace; font-size: 0.75rem;
  line-height: 1.7; color: #cbd5e1; direction: ltr; text-align: left;
}
.code-block .kw { color: #c084fc; }
.code-block .fn { color: #60a5fa; }
.code-block .str { color: #34d399; }
.code-block .cm { color: #64748b; }
.panel-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px;
}
.mini-card {
  padding: 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.mini-card span {
  font-size: 0.65rem; font-weight: 700; color: var(--cyan);
  font-family: var(--font-en); letter-spacing: 0.05em;
}
.mini-card p { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }

/* MARQUEE */
.marquee-wrap {
  border-y: 1px solid var(--border);
  background: rgba(15,23,42,0.5);
  padding: 1rem 0; overflow: hidden;
}
.marquee {
  display: flex; gap: 3rem; animation: scroll 30s linear infinite;
  white-space: nowrap;
}
.marquee span {
  font-family: var(--font-en); font-size: 0.8rem; font-weight: 600;
  color: var(--dim); letter-spacing: 0.08em;
}
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* SECTION */
.section { padding: 6rem 0; }
.section-head { margin-bottom: 3.5rem; }
.section-head.row {
  display: flex; justify-content: space-between; align-items: end; gap: 2rem;
  flex-wrap: wrap;
}
.section-num {
  font-family: var(--font-en); font-size: 0.75rem; font-weight: 800;
  color: var(--cyan); letter-spacing: 0.2em; margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800; line-height: 1.2;
}
.section-desc { color: var(--muted); margin-top: 0.75rem; max-width: 32rem; font-size: 1rem; }

/* SERVICES — horizontal scroll */
.services-scroll-wrap { margin-top: 0.5rem; }
.services-scroll-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.services-scroll-hint {
  font-size: 0.82rem; font-weight: 600; color: var(--dim);
}
.services-scroll-nav { display: flex; gap: 8px; }
.scroll-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(15,23,42,0.9);
  color: var(--text); font-size: 1.25rem; line-height: 1;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.scroll-btn:hover {
  background: rgba(59,130,246,0.15); border-color: var(--border-accent);
  transform: scale(1.05);
}
.services-scroll {
  display: flex; gap: 1rem;
  overflow-x: auto; overflow-y: hidden;
  padding: 0.25rem 0.15rem 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.35) transparent;
}
.services-scroll::-webkit-scrollbar { height: 6px; }
.services-scroll::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.35); border-radius: 4px;
}
.service-card {
  flex: 0 0 min(320px, 85vw);
  scroll-snap-align: start;
  padding: 1.65rem; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s;
  position: relative; overflow: hidden;
}
.service-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad); opacity: 0; transition: opacity 0.3s;
}
.service-card:hover {
  transform: translateY(-4px); border-color: var(--border-accent);
  background: var(--card-hover); box-shadow: var(--glow);
}
.service-card:hover::after { opacity: 1; }
.service-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-soft); border: 1px solid var(--border);
  color: var(--cyan); margin-bottom: 1.15rem;
}
.service-icon svg { width: 22px; height: 22px; }
.service-num {
  display: block; font-family: var(--font-en);
  font-size: 0.72rem; font-weight: 700; color: var(--cyan);
  margin-bottom: 1rem;
}
.service-card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.35; }
.service-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.65; min-height: 2.8em; }
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.1rem; }
.service-tags span {
  font-size: 0.7rem; font-weight: 600; padding: 4px 10px;
  border-radius: 100px; background: rgba(59,130,246,0.1);
  border: 1px solid var(--border); color: var(--cyan);
}

/* legacy bento — unused */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.bento-card { grid-column: span 4; }

/* PORTFOLIO */
.portfolio-section {
  position: relative;
  background: linear-gradient(180deg, transparent, rgba(10,15,30,0.45) 20%, rgba(10,15,30,0.45) 80%, transparent);
}
.portfolio-page { padding-top: 0; }
.page-hero {
  padding: 7rem 0 2.5rem;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,0.1), transparent 65%);
  border-bottom: 1px solid var(--border);
}
.page-hero-inner { max-width: 720px; }
.page-hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 800; line-height: 1.2; margin-top: 0.35rem;
}
.page-hero p {
  margin-top: 0.75rem; font-size: 1rem; color: var(--muted); line-height: 1.7;
}
.page-back { margin-top: 1.25rem; }
.nav-menu a.nav-active { color: var(--cyan); }

.work-preview { background: rgba(10,15,30,0.35); }
.work-preview-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; margin-bottom: 1.75rem; flex-wrap: wrap;
}
.work-preview-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem;
}
.work-preview-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); display: block; text-decoration: none;
  color: inherit; min-height: 220px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.work-preview-card:hover {
  transform: translateY(-5px); box-shadow: var(--glow);
  border-color: var(--border-accent);
}
.work-preview-card img {
  width: 100%; height: 220px; object-fit: cover; object-position: top center;
  display: block; transition: transform 0.5s var(--ease);
}
.work-preview-card:hover img { transform: scale(1.04); }
.work-preview-tone {
  height: 220px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-en); font-size: 2rem; font-weight: 800;
  color: rgba(255,255,255,0.2);
}
.work-preview-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(3,7,18,0.92) 0%, rgba(3,7,18,0.2) 55%, transparent 100%);
  padding: 1.25rem; display: flex; flex-direction: column; justify-content: flex-end;
}
.work-preview-overlay h3 { font-size: 1.05rem; font-weight: 700; margin: 0.4rem 0 0.2rem; }
.work-preview-overlay p { font-size: 0.82rem; color: var(--muted); }

.portfolio-head { margin-bottom: 2rem; max-width: 720px; }
.portfolio-title {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 800; line-height: 1.2; margin-top: 0.35rem;
}
.portfolio-lead {
  margin-top: 0.75rem; font-size: 1rem; color: var(--muted); line-height: 1.7;
}
.portfolio-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.75rem; flex-wrap: wrap; overflow: hidden;
}
.work-filters {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 6px; border-radius: 100px;
  border: 1px solid var(--border); background: rgba(15,23,42,0.8);
  backdrop-filter: blur(12px); max-width: 100%;
}
.filter-btn {
  padding: 0.48rem 1rem; border-radius: 100px;
  border: none; background: transparent;
  color: var(--muted); font-family: var(--font-ar); font-weight: 600;
  font-size: 0.82rem; cursor: pointer; transition: all 0.22s var(--ease);
}
.filter-btn.active {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 24px rgba(59,130,246,0.25);
}
.filter-btn:not(.active):hover { color: var(--text); background: rgba(255,255,255,0.05); }
.portfolio-count {
  font-size: 0.8rem; font-weight: 600; color: var(--dim); font-family: var(--font-en);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
.portfolio-tile {
  position: relative; border: none; cursor: pointer;
  border-radius: var(--radius); overflow: hidden;
  background: var(--card); text-align: right;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
  padding: 0; font-family: var(--font-ar); color: var(--text);
}
.portfolio-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35), var(--glow);
}
.portfolio-tile-media {
  position: relative; height: 200px; overflow: hidden; background: #0b1220;
}
.portfolio-tile-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform 0.55s var(--ease);
}
.portfolio-tile-media.cover-fit-contain {
  background: #0a0a0a;
}
.portfolio-tile-media.cover-fit-contain img {
  object-fit: contain;
  object-position: center center;
  padding: 0.35rem;
}
.portfolio-tile:hover .portfolio-tile-media img { transform: scale(1.06); }
.portfolio-tile:hover .portfolio-tile-media.cover-fit-contain img { transform: scale(1.03); }
.portfolio-glyph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-en); font-size: 2rem; font-weight: 800;
  color: rgba(255,255,255,0.2);
}
.portfolio-tile-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3,7,18,0.55); opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.portfolio-tile:hover .portfolio-tile-overlay { opacity: 1; }
.portfolio-open {
  padding: 0.55rem 1.1rem; border-radius: 100px;
  background: rgba(255,255,255,0.95); color: #0f172a;
  font-size: 0.8rem; font-weight: 700;
  transform: translateY(8px); transition: transform 0.3s var(--ease);
}
.portfolio-tile:hover .portfolio-open { transform: translateY(0); }
.portfolio-tile-foot {
  padding: 1.15rem 1.25rem 1.3rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15,23,42,0.5), rgba(15,23,42,0.95));
}
.portfolio-tile-foot h3 {
  font-size: 1rem; font-weight: 700; line-height: 1.35;
  margin: 0.45rem 0 0.35rem;
}
.portfolio-tile-foot p {
  font-size: 0.82rem; color: var(--muted); line-height: 1.5;
}

@media (max-width: 768px) {
  .work-filters {
    flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: var(--radius-sm);
    padding: 8px;
  }
  .work-filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; }
}

@media (hover: none) {
  .portfolio-tile-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(3,7,18,0.82) 0%, transparent 55%);
  }
  .portfolio-open { transform: translateY(0); }
}

/* tone backgrounds */
.tone-quran { background: linear-gradient(145deg, #065f46, #0f172a); }
.tone-nasr { background: linear-gradient(145deg, #ca8a04, #0f172a); }
.tone-ai { background: linear-gradient(145deg, #7c3aed, #0f172a); }
.tone-cbl { background: linear-gradient(145deg, #0c4a6e, #0f172a); }
.tone-mithaq { background: linear-gradient(145deg, #b45309, #0f172a); }
.tone-mood { background: linear-gradient(145deg, #c2410c, #0f172a); }
.tone-lab { background: linear-gradient(145deg, #0e7490, #0f172a); }
.tone-onco { background: linear-gradient(145deg, #be185d, #0f172a); }
.tone-docs { background: linear-gradient(145deg, #115e59, #0f172a); }
.tone-gov { background: linear-gradient(145deg, #1d4ed8, #0f172a); }

.tag {
  font-size: 0.68rem; font-weight: 700; padding: 3px 9px;
  border-radius: 100px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.04); color: var(--muted);
}
.tag-gov { color: #93c5fd; border-color: rgba(147,197,253,0.25); }
.tag-apps { color: #67e8f9; border-color: rgba(103,232,249,0.25); }
.tag-systems { color: #6ee7b7; border-color: rgba(110,231,183,0.25); }
.tag-grad { color: #f0abfc; border-color: rgba(240,171,252,0.25); }
.tag-design { color: #fcd34d; border-color: rgba(252,211,77,0.25); }
.tag-ai { color: #c4b5fd; border-color: rgba(196,181,253,0.3); background: rgba(124,58,237,0.12); }

/* CASE STUDY MODAL */
body.modal-open { overflow: hidden; }
.case-modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem; opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.case-modal.open { opacity: 1; visibility: visible; }
.case-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(3,7,18,0.82); backdrop-filter: blur(14px);
}
.case-modal-dialog {
  position: relative; z-index: 1;
  width: min(920px, 100%); max-height: min(90vh, 900px);
  border-radius: 22px; border: 1px solid var(--border-accent);
  background: #0a0f1e; box-shadow: var(--shadow);
  overflow: hidden;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.35s var(--ease);
}
.case-modal.open .case-modal-dialog {
  transform: scale(1) translateY(0);
}
.case-modal-close {
  position: absolute; top: max(14px, env(safe-area-inset-top, 14px)); left: 14px; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(15,23,42,0.9);
  color: var(--text); font-size: 1.35rem; line-height: 1;
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.case-modal-close:hover { background: rgba(59,130,246,0.2); border-color: var(--border-accent); }
.case-modal-scroll {
  max-height: min(90vh, 900px); overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--dim) transparent;
}
.case-modal-gallery {
  padding: 1rem 1rem 0;
  display: flex; flex-direction: column; gap: 1rem;
}
.case-gallery-panels {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.case-gallery-phone-wrap { margin-top: 0.25rem; }
.case-gallery-phone-label {
  font-size: 0.78rem; font-weight: 700; color: var(--dim);
  margin-bottom: 0.65rem; padding-inline: 0.15rem;
}
.case-gallery-phones {
  display: flex; gap: 12px;
  overflow-x: auto; overflow-y: hidden;
  padding: 0.25rem 0.15rem 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.case-gallery-phones::-webkit-scrollbar { height: 4px; }
.case-gallery-phones::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.35); border-radius: 4px;
}
.case-shot {
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: #0b1220;
  position: relative;
}
.case-shot--panel { }
.case-shot--hero { grid-column: 1 / -1; }
.case-shot--panel img {
  width: 100%; display: block;
  max-height: 340px; object-fit: cover; object-position: top center;
}
.case-shot--hero img { max-height: 420px; }
.case-shot--phone {
  flex: 0 0 auto; width: min(168px, 42vw);
  scroll-snap-align: center;
  border: none; background: transparent;
}
.phone-frame {
  border-radius: 18px; overflow: hidden;
  border: 2px solid rgba(148,163,184,0.22);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  background: #0b1220;
}
.case-shot--phone img {
  width: 100%; display: block;
  aspect-ratio: 9 / 19.5;
  object-fit: cover; object-position: top center;
  max-height: none;
}
.case-shot--phone figcaption {
  padding: 0.45rem 0.25rem 0; font-size: 0.72rem;
  text-align: center; color: var(--muted); background: transparent;
}
.case-shot figcaption {
  padding: 0.5rem 0.65rem; font-size: 0.75rem; font-weight: 600;
  color: var(--muted); background: rgba(15,23,42,0.9);
}
.case-shot--tone {
  min-height: 160px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-en); font-size: 1.5rem; font-weight: 800;
  color: rgba(255,255,255,0.25);
}
.case-modal-body { padding: 1.5rem 1.65rem 1.75rem; }
.case-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.75rem; }
.case-modal-body h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem); font-weight: 800; line-height: 1.25;
}
.case-subtitle {
  margin-top: 0.35rem; font-size: 0.88rem; color: var(--cyan); font-weight: 600;
}
.case-desc {
  margin-top: 0.85rem; font-size: 0.92rem; color: var(--muted); line-height: 1.75;
}
.case-highlights {
  display: grid; gap: 0.65rem; margin: 1.25rem 0;
}
.case-highlight {
  padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
}
.case-highlight strong { display: block; font-size: 0.9rem; margin-bottom: 0.25rem; }
.case-highlight p { font-size: 0.85rem; color: var(--muted); line-height: 1.55; }
.case-highlight--ai {
  border-color: rgba(167,139,250,0.35);
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(59,130,246,0.06));
}
.case-block { margin-top: 1.15rem; }
.case-block h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.6rem; }
.case-list {
  list-style: none; display: grid; gap: 0.4rem;
}
.case-list li {
  font-size: 0.86rem; color: var(--muted); padding-right: 1rem; position: relative;
}
.case-list li::before {
  content: ''; position: absolute; right: 0; top: 0.55rem;
  width: 5px; height: 5px; border-radius: 50%; background: var(--cyan);
}
.case-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.case-tech span {
  font-size: 0.68rem; font-weight: 600; padding: 4px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.05); color: var(--dim); font-family: var(--font-en);
}
.case-links {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.85rem;
}
.case-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.5rem 0.9rem; border-radius: 100px;
  border: 1px solid var(--border-accent);
  background: rgba(59,130,246,0.1);
  color: var(--cyan); font-size: 0.8rem; font-weight: 700;
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.case-link:hover { background: rgba(59,130,246,0.2); color: #fff; }
.case-cta { margin-top: 1.5rem; }

/* GRAD BANNER */
.grad-block {
  border-radius: 24px; padding: 3rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(59,130,246,0.06));
  border: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.grad-list { list-style: none; margin-top: 1.25rem; }
.grad-list li {
  padding: 0.5rem 0; font-size: 0.92rem; color: var(--muted);
  display: flex; align-items: center; gap: 10px;
}
.grad-list li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* BLOG / INSIGHTS */
.insights-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
  align-items: stretch;
}
.blog-card {
  border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--border); overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
  text-align: right; width: 100%;
}
.blog-card--clickable {
  cursor: pointer; font-family: var(--font-ar); color: var(--text);
  padding: 0; display: block;
}
.blog-card--clickable:hover {
  border-color: var(--border-accent); transform: translateY(-3px);
}
.blog-card .cat {
  padding: 1rem 1.25rem 0; font-size: 0.72rem; font-weight: 700;
  color: var(--cyan); font-family: var(--font-en); letter-spacing: 0.05em;
}
.blog-card h3 {
  padding: 0.5rem 1.25rem 0; font-size: 1rem; font-weight: 700; line-height: 1.45;
}
.blog-teaser {
  padding: 0.5rem 1.25rem 0; font-size: 0.85rem; color: var(--muted); line-height: 1.65;
}
.blog-read {
  display: block; padding: 1rem 1.25rem 1.25rem;
  font-size: 0.82rem; font-weight: 700; color: var(--blue);
}
.insight-modal-dialog { max-width: min(640px, 100%); }
.insight-modal-body { padding: 1.75rem 1.65rem 1.85rem; }
.insight-modal-body .cat { padding: 0; margin-bottom: 0.5rem; }
.insight-modal-body h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem); font-weight: 800; line-height: 1.3;
}
.insight-steps { display: grid; gap: 0.65rem; margin: 1.15rem 0; }
.insight-step {
  padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
}
.insight-step strong { display: block; font-size: 0.9rem; margin-bottom: 0.25rem; }
.insight-step p { font-size: 0.85rem; color: var(--muted); line-height: 1.55; }
.blog-tip {
  margin-top: 0.5rem; padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(59,130,246,0.08);
  border: 1px solid var(--border-accent);
  font-size: 0.88rem; color: var(--muted); line-height: 1.6;
}
@media (max-width: 768px) {
  .insights-layout { grid-template-columns: 1fr; }
}

/* PROCESS */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.process-item {
  padding: 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: rgba(15,23,42,0.4);
  position: relative;
}
.process-item::before {
  content: attr(data-step);
  font-family: var(--font-en); font-size: 2.5rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0.35; line-height: 1;
}
.process-item h4 { margin-top: 0.75rem; font-size: 0.95rem; }
.process-item p { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }

/* CTA */
.cta-box {
  text-align: center; padding: 4rem 2rem; border-radius: 28px;
  background: var(--grad-soft); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.cta-box::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(59,130,246,0.15), transparent 60%);
}
.cta-box h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; position: relative; }
.cta-box p { color: var(--muted); margin-top: 0.75rem; position: relative; }
.cta-actions {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  margin-top: 1.75rem; position: relative;
}

/* FOOTER */
.footer { padding: 4rem 0 2rem; border-top: 1px solid var(--border); margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer p { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; max-width: 280px; }
.footer h4 {
  font-size: 0.8rem; font-weight: 700; color: var(--cyan);
  margin-bottom: 1rem; letter-spacing: 0.05em;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 0.45rem; }
.footer a { color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.footer a:hover { color: var(--cyan); }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  text-align: center; font-size: 0.78rem; color: var(--dim);
}

/* REVEAL */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-panel { max-width: 520px; margin-inline: auto; }
  .bento-card, .bento-card.wide { grid-column: span 6; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .work-preview-grid { grid-template-columns: 1fr; }
  .work-preview-head { flex-direction: column; align-items: flex-start; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card.featured { grid-column: span 1; }
  .work-visual.has-gallery { grid-template-columns: 1fr; }
  .work-visual.has-gallery .gallery-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .ishraf-gallery { grid-template-columns: 1fr; }
  .ishraf-shot.main img { min-height: 220px; }
  .ishraf-grid { grid-template-columns: 1fr; }
  .grad-block { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .nav-menu.open {
    display: flex; flex-direction: column; position: absolute;
    top: calc(100% + 8px); left: 0; right: 0;
    background: var(--card); padding: 1rem; border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .work-mosaic { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-toolbar { flex-direction: column; align-items: stretch; }
  .portfolio-tile-media { height: 180px; }
  .case-modal {
    padding: 0;
    align-items: stretch;
  }
  .case-modal-dialog {
    width: 100%; max-height: 100%;
    height: 100%; border-radius: 0; border: none;
    max-height: 100dvh;
  }
  .case-modal-scroll { max-height: 100dvh; }
  .case-modal-body { padding: 1.25rem 1.15rem 1.5rem; }
  .case-gallery-panels { grid-template-columns: 1fr; }
  .case-shot--phone { width: min(156px, 38vw); }
  .case-cta { width: 100%; justify-content: center; }
  .bento-card, .bento-card.wide { grid-column: span 12; }
  .section-head.row { flex-direction: column; align-items: flex-start; }
}
