:root {
  --bg: #f5f6f0;
  --surface: #ffffff;
  --surface-strong: #f0f2e8;
  --surface-dark: #0f1115;
  --surface-dark-2: #181b22;
  --text: #111318;
  --text-muted: #5d6472;
  --text-soft: #8991a0;
  --line: rgba(17, 19, 24, 0.08);
  --line-strong: rgba(17, 19, 24, 0.14);
  --accent: #d7ff64;
  --accent-strong: #bce63d;
  --accent-shadow: rgba(215, 255, 100, 0.28);
  --success: #87d477;
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --shadow-card: 0 20px 40px rgba(17, 19, 24, 0.06);
  --shadow-soft: 0 12px 30px rgba(17, 19, 24, 0.08);
  --container: min(1120px, calc(100vw - 32px));
  --font-latin: "Manrope", "Segoe UI", sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(215, 255, 100, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 52%, #eef1e3 100%);
  color: var(--text);
  font-family: var(--font-latin);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body {
  font-family: var(--font-arabic);
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 5px var(--accent-shadow);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 30;
  background: var(--surface-dark);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 0;
  backdrop-filter: blur(18px);
  background: rgba(245, 246, 240, 0.7);
  border-bottom: 1px solid rgba(17, 19, 24, 0.04);
}

.shell {
  width: var(--container);
  margin: 0 auto;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(17, 19, 24, 0.05);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 12px 22px rgba(17, 19, 24, 0.12);
}

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

.brand-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  display: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.nav-links,
.nav-actions,
.mobile-nav-links {
  display: flex;
  align-items: center;
}

.nav-links {
  display: none;
  gap: 8px;
}

.nav-link,
.mobile-nav-links a {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"],
.mobile-nav-links a:hover,
.mobile-nav-links a[aria-current="page"] {
  color: var(--text);
  background: rgba(17, 19, 24, 0.05);
}

.nav-actions {
  gap: 8px;
}

.nav-actions .button-accent {
  display: none;
}

.button,
.button-ghost,
.button-dark,
.lang-switch,
.menu-toggle,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.button,
.button-dark {
  min-height: 48px;
  padding: 0 18px;
}

.button {
  background: var(--surface-dark);
  color: #fff;
  box-shadow: 0 16px 26px rgba(17, 19, 24, 0.16);
}

.button:hover,
.button-dark:hover,
.button-ghost:hover,
.lang-switch:hover,
.filter-button:hover,
.menu-toggle:hover {
  transform: translateY(-1px);
}

.button-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #f4ffc5 100%);
  color: var(--surface-dark);
  box-shadow: 0 18px 30px rgba(188, 230, 61, 0.32);
}

.button-dark {
  background: var(--surface-dark);
  color: #fff;
}

.button-ghost,
.lang-switch,
.menu-toggle,
.filter-button {
  min-height: 46px;
  padding: 0 16px;
  background: rgba(17, 19, 24, 0.04);
  color: var(--text);
}

.lang-switch {
  font-size: 0.86rem;
}

.menu-toggle {
  position: relative;
  z-index: 21;
}

.mobile-nav {
  margin-top: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 24px;
  border: 1px solid rgba(17, 19, 24, 0.06);
  box-shadow: var(--shadow-soft);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-links {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.main-content {
  padding: 30px 0 100px;
}

.page-section {
  margin-top: 24px;
}

.hero-card,
.panel,
.service-card,
.project-card,
.metric-card,
.contact-card,
.faq-item,
.timeline-card,
.case-card,
.cta-band,
.footer-card,
.empty-state,
.contact-form,
.list-card,
.detail-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(17, 19, 24, 0.05);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.hero-card {
  overflow: hidden;
  position: relative;
  padding: 24px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(215, 255, 100, 0.45), rgba(215, 255, 100, 0));
  transform: rotate(-12deg);
  pointer-events: none;
}

.hero-grid,
.split-grid,
.stats-grid,
.service-grid,
.project-grid,
.card-grid,
.contact-grid,
.case-study-grid,
.related-grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  align-items: stretch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 16px;
  background: rgba(17, 19, 24, 0.06);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-title,
.section-title,
.mini-title,
.case-title {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-title {
  max-width: 12ch;
  font-size: clamp(2.3rem, 10vw, 4.9rem);
}

.hero-text,
.section-text,
.card-text,
.footer-text,
.list-copy,
.case-copy {
  color: var(--text-muted);
  margin: 0;
}

.hero-text {
  max-width: 65ch;
  font-size: 1rem;
}

.button-row,
.chip-row,
.trust-list,
.hero-proof,
.case-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row {
  margin-top: 24px;
}

.trust-list {
  margin-top: 24px;
}

.trust-pill,
.chip,
.badge,
.stack-pill,
.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.05);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-panel,
.panel,
.contact-form {
  padding: 20px;
}

.hero-panel {
  background: linear-gradient(180deg, var(--surface-dark) 0%, var(--surface-dark-2) 100%);
  color: #fff;
}

.hero-panel .section-title,
.hero-panel .card-text,
.hero-panel .mini-title {
  color: #fff;
}

.hero-panel .card-text {
  color: rgba(255, 255, 255, 0.72);
}

.hero-panel .metric-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

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

.metric-card {
  padding: 18px;
}

.metric-value {
  display: block;
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
}

.metric-label {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.hero-panel .metric-label {
  color: rgba(255, 255, 255, 0.72);
}

.section-block {
  padding: 28px 0 0;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.65rem, 6vw, 3rem);
}

.section-text {
  max-width: 72ch;
}

.card-grid,
.service-grid,
.project-grid,
.related-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.service-card,
.project-card,
.contact-card,
.timeline-card,
.case-card,
.list-card,
.detail-card {
  padding: 18px;
}

.icon-tile {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(215, 255, 100, 0.9), rgba(255, 255, 255, 0.9));
  box-shadow: 0 16px 24px rgba(188, 230, 61, 0.22);
  color: var(--surface-dark);
}

.icon-tile svg {
  width: 26px;
  height: 26px;
}

.mini-title {
  font-size: 1.22rem;
}

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

.card-list,
.bullet-list,
.plain-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.bullet-list li,
.plain-list li,
.card-list li {
  position: relative;
  padding-inline-start: 18px;
  color: var(--text-muted);
}

.bullet-list li::before,
.plain-list li::before,
.card-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px rgba(215, 255, 100, 0.18);
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(215, 255, 100, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(17, 19, 24, 0.015));
  pointer-events: none;
}

.project-top,
.case-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  background: rgba(17, 19, 24, 0.08);
  color: var(--text);
}

.project-actions,
.helper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-actions {
  margin-top: 18px;
}

.project-actions .button,
.project-actions .button-ghost {
  flex: 1 1 180px;
}

.filter-wrap {
  display: grid;
  gap: 14px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button.is-active {
  background: var(--surface-dark);
  color: #fff;
  box-shadow: 0 16px 24px rgba(17, 19, 24, 0.16);
}

.filter-status {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.empty-state {
  padding: 20px;
  color: var(--text-muted);
}

.timeline-grid {
  display: grid;
  gap: 16px;
}

.timeline-card {
  position: relative;
  overflow: hidden;
}

.timeline-card::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--accent-strong), rgba(215, 255, 100, 0));
}

.case-study-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.breadcrumbs span {
  opacity: 0.44;
}

.case-title {
  font-size: clamp(2rem, 8vw, 4rem);
}

.case-summary {
  margin: 14px 0 0;
  color: var(--text-muted);
  max-width: 70ch;
}

.case-card {
  display: grid;
  gap: 14px;
}

.detail-grid {
  display: grid;
  gap: 16px;
}

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

.cta-band {
  margin-top: 24px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 17, 21, 0.96), rgba(24, 27, 34, 0.96)),
    radial-gradient(circle at top left, rgba(215, 255, 100, 0.18), transparent 32%);
  color: #fff;
}

.cta-band .section-title,
.cta-band .section-text,
.cta-band .mini-title {
  color: #fff;
}

.cta-band .section-text {
  color: rgba(255, 255, 255, 0.74);
}

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

.contact-card {
  display: grid;
  gap: 12px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.input-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 800;
}

.helper-links a {
  color: var(--text-muted);
  font-weight: 700;
}

.faq-grid {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 18px 20px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.footer {
  padding-bottom: 30px;
}

.footer-card {
  padding: 24px;
}

.footer-top,
.footer-bottom {
  display: grid;
  gap: 16px;
}

.footer-nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-nav a,
.footer-links a {
  color: var(--text-muted);
  font-weight: 700;
}

.muted {
  color: var(--text-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

body.nav-open {
  overflow: hidden;
}

@media (min-width: 720px) {
  .main-content {
    padding-top: 42px;
  }

  .hero-card,
  .panel,
  .service-card,
  .project-card,
  .contact-card,
  .case-card,
  .contact-form,
  .footer-card,
  .cta-band {
    padding: 24px;
  }

  .stats-grid,
  .stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-grid,
  .card-grid,
  .contact-grid,
  .timeline-grid,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .field.full {
    grid-column: 1 / -1;
  }

  .footer-top,
  .footer-bottom {
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
  }

  .brand-subtitle {
    display: block;
  }

  .nav-actions .button-accent {
    display: inline-flex;
  }
}

@media (min-width: 980px) {
  .nav-links {
    display: flex;
  }

  .menu-toggle,
  .mobile-nav {
    display: none;
  }

  .hero-grid,
  .case-study-grid {
    grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
  }

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

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

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

  .contact-grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  }

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