:root {
  --primary: #047857;
  --dark: #065f46;
  --deep: #064e3b;
  --medium: #059669;
  --light: #d1fae5;
  --mint: #34d399;
  --white: #ffffff;
  --surface: #f8fafc;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --amber: #c9973a;
  --shadow: 0 24px 70px rgba(6, 78, 59, 0.16);
  --shadow-soft: 0 16px 44px rgba(17, 24, 39, 0.08);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(209, 250, 229, 0.42) 0, rgba(255, 255, 255, 0) 480px),
    var(--surface);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

html[dir="rtl"] body {
  font-family: "IBM Plex Sans Arabic", Inter, Arial, sans-serif;
}

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

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

img {
  max-width: 100%;
}

.site-shell {
  width: min(100%, 1680px);
  margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
  position: relative;
}

.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(4, 120, 87, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(4, 120, 87, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  z-index: 0;
}

.site-header,
main,
.site-footer,
.mobile-menu {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  box-shadow: 0 12px 36px rgba(17, 24, 39, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 202px;
  flex: 0 0 auto;
}

.brand img,
.site-footer img {
  display: block;
  width: 100%;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 34px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.nav-links a {
  position: relative;
  padding: 28px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 18px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch,
.header-cta,
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.lang-switch {
  border: 1px solid var(--border);
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
  font-size: 13px;
}

.header-cta {
  padding: 0 18px;
  color: var(--white);
  background: var(--deep);
  font-size: 13px;
}

.button {
  border: 0;
  padding: 14px 20px;
  cursor: pointer;
  font-size: 15px;
}

.button:hover,
.lang-switch:hover,
.header-cta:hover,
.button:focus-visible,
.lang-switch:focus-visible,
.header-cta:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--deep), var(--primary) 54%, var(--medium));
  box-shadow: 0 18px 36px rgba(4, 120, 87, 0.25);
}

.button-secondary {
  color: var(--deep);
  background: var(--light);
  border: 1px solid rgba(4, 120, 87, 0.18);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 99px;
}

.mobile-menu {
  display: none;
}

.section-pad {
  padding-inline: clamp(18px, 5vw, 72px);
}

.hero-section {
  min-height: calc(100svh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.88fr);
  gap: clamp(34px, 5vw, 80px);
  align-items: center;
  padding-block: clamp(52px, 8vw, 104px);
  position: relative;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 10% clamp(18px, 5vw, 72px) auto auto;
  width: min(44vw, 680px);
  aspect-ratio: 1;
  border: 1px solid rgba(4, 120, 87, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(6, 78, 59, 0.05), rgba(52, 211, 153, 0.08)),
    repeating-linear-gradient(0deg, transparent 0 48px, rgba(4, 120, 87, 0.08) 49px 50px),
    repeating-linear-gradient(90deg, transparent 0 48px, rgba(4, 120, 87, 0.08) 49px 50px);
  transform: rotate(-3deg);
  z-index: -1;
}

html[dir="rtl"] .hero-bg-grid {
  inset-inline: auto clamp(18px, 5vw, 72px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

html[dir="rtl"] .eyebrow {
  text-transform: none;
  font-size: 15px;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--primary);
}

.hero-copy h1,
.section-heading h2,
.contact-copy h2 {
  margin: 16px 0 0;
  max-width: 900px;
  color: var(--ink);
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: 0;
}

html[dir="rtl"] .hero-copy h1,
html[dir="rtl"] .section-heading h2,
html[dir="rtl"] .contact-copy h2 {
  line-height: 1.16;
}

.hero-copy p,
.section-heading p,
.contact-copy p {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.55vw, 21px);
}

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

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.trust-strip span,
.tag-row span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(4, 120, 87, 0.16);
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(209, 250, 229, 0.42);
  color: var(--deep);
  font-size: 12px;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  min-height: 600px;
}

.product-window {
  position: relative;
  padding: 22px;
  min-height: 500px;
  border: 1px solid rgba(4, 120, 87, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.92)),
    var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product-window::before {
  content: "";
  position: absolute;
  inset: auto -120px -170px auto;
  width: 440px;
  height: 440px;
  border: 34px solid rgba(4, 120, 87, 0.12);
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 8px 220px 8px 8px;
  transform: rotate(-8deg);
}

.window-top {
  display: flex;
  gap: 8px;
  padding-bottom: 20px;
}

.window-top span {
  width: 11px;
  height: 11px;
  border-radius: 99px;
  background: var(--border);
}

.window-top span:nth-child(2) {
  background: var(--light);
}

.window-top span:nth-child(3) {
  background: var(--mint);
}

.dashboard-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.dashboard-head img {
  width: 54px;
  height: 54px;
}

.dashboard-head strong,
.dashboard-head small {
  display: block;
}

.dashboard-head strong {
  font-size: 18px;
}

.dashboard-head small {
  color: var(--muted);
  font-weight: 750;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
  position: relative;
}

.signal-card {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.signal-card span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.signal-card strong {
  font-size: 18px;
}

.flow-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.flow-line i {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--deep), var(--primary), var(--mint));
}

.phone-preview {
  position: absolute;
  inset-inline-end: -28px;
  bottom: -34px;
  width: 210px;
  height: 372px;
  padding: 28px 18px;
  border: 10px solid var(--ink);
  border-radius: 34px;
  background: var(--white);
  box-shadow: 0 24px 64px rgba(17, 24, 39, 0.22);
}

.phone-preview img {
  display: block;
  width: 86px;
  margin: 20px auto 34px;
}

.phone-preview span {
  display: block;
  height: 14px;
  border-radius: 99px;
  background: var(--border);
  margin: 14px 0;
}

.phone-preview span:nth-of-type(2) {
  width: 72%;
  background: var(--light);
}

.phone-preview span:nth-of-type(3) {
  width: 58%;
  background: var(--primary);
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 clamp(18px, 5vw, 72px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.metric-band article {
  min-height: 146px;
  padding: 24px;
  background: var(--white);
}

.metric-band strong {
  display: block;
  color: var(--primary);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
  font-weight: 900;
}

.metric-band span {
  display: block;
  max-width: 260px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.projects-section,
.services-section,
.process-section,
.contact-section {
  padding-block: clamp(72px, 10vw, 132px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  align-self: start;
}

.section-heading h2 {
  margin-top: 0;
  font-size: clamp(34px, 4.2vw, 58px);
}

.section-heading p {
  margin-top: 0;
}

.section-heading.compact {
  display: block;
  max-width: 850px;
}

.section-heading.compact p {
  margin-top: 18px;
}

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

.project-card {
  position: relative;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(4, 120, 87, 0.26);
  box-shadow: var(--shadow);
}

.project-featured {
  grid-column: span 2;
}

.project-art {
  position: relative;
  min-height: 150px;
  background:
    linear-gradient(135deg, var(--deep), var(--primary) 62%, var(--medium)),
    var(--primary);
  overflow: hidden;
}

.project-art::before {
  content: "";
  position: absolute;
  inset: -80px auto auto -70px;
  width: 260px;
  height: 260px;
  border: 28px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px 140px 8px 8px;
}

.project-index {
  position: absolute;
  inset-inline-start: 18px;
  top: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 900;
}

.portal-mark {
  position: absolute;
  inset-inline-end: 22px;
  bottom: -34px;
  width: 132px;
  height: 150px;
  border: 20px solid rgba(209, 250, 229, 0.62);
  border-bottom: 0;
  border-radius: 8px 90px 0 0;
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.project-type {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.project-body h3,
.service-card h3,
.process-step h3 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.project-body p,
.service-card p,
.process-step p {
  margin: 12px 0 0;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 22px;
}

.services-section {
  background:
    linear-gradient(180deg, var(--surface), rgba(255, 255, 255, 0)),
    var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.service-card {
  min-height: 250px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.service-icon {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--deep), var(--primary)),
    var(--primary);
  position: relative;
}

.service-icon::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 4px solid var(--white);
  border-bottom-width: 7px;
  border-radius: 4px 18px 4px 4px;
}

.process-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(24px, 5vw, 56px);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(6, 78, 59, 0.98), rgba(4, 120, 87, 0.96)),
    var(--deep);
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.process-panel::after {
  content: "";
  position: absolute;
  inset-inline-end: -80px;
  top: -40px;
  width: 420px;
  height: 520px;
  border: 42px solid rgba(52, 211, 153, 0.2);
  border-bottom: 0;
  border-radius: 8px 240px 0 0;
}

.process-panel .section-heading {
  margin: 0;
  position: relative;
  z-index: 1;
}

.process-panel .eyebrow,
.process-panel h2,
.process-panel p {
  color: var(--white);
}

.process-panel .eyebrow::before {
  background: var(--mint);
}

.process-list {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.process-step {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

html[dir="rtl"] .process-step {
  grid-template-columns: 1fr 54px;
}

html[dir="rtl"] .process-step > span {
  grid-column: 2;
}

html[dir="rtl"] .process-step > div {
  grid-column: 1;
  grid-row: 1;
}

.process-step > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--primary);
  font-weight: 900;
}

.process-step h3,
.process-step p {
  color: var(--white);
}

.process-step h3 {
  margin-top: 0;
}

.process-step p {
  opacity: 0.78;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 0.72fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

.contact-copy h2 {
  font-size: clamp(34px, 4.3vw, 60px);
}

.whatsapp-card {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid rgba(4, 120, 87, 0.18);
  border-radius: var(--radius);
  background: var(--light);
  color: var(--deep);
  font-weight: 900;
}

.whatsapp-card strong {
  font-size: 18px;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 13px 14px;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 132px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.11);
}

.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.form-alert {
  border-radius: var(--radius);
  padding: 12px 14px;
  font-weight: 800;
}

.form-alert.success {
  color: var(--deep);
  background: var(--light);
}

.form-alert.error {
  color: #7f1d1d;
  background: #fee2e2;
}

.site-footer {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 32px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
  font-weight: 650;
}

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

.js-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

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

  .reveal,
  .button,
  .project-card,
  .lang-switch,
  .header-cta {
    transition: none;
  }

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

@media (max-width: 1160px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 520px;
  }

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

  .process-panel,
  .contact-section,
  .section-heading {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .site-header {
    height: 70px;
  }

  .brand {
    width: 168px;
  }

  .nav-links,
  .header-cta {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .mobile-menu {
    position: fixed;
    top: 70px;
    inset-inline: 14px;
    z-index: 25;
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

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

  .mobile-menu a {
    padding: 12px 14px;
    border-radius: var(--radius);
    color: var(--ink);
    font-weight: 850;
  }

  .mobile-menu a:hover {
    background: var(--light);
  }

  .hero-section {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-visual {
    min-height: auto;
  }

  .phone-preview {
    position: relative;
    inset: auto;
    width: min(100%, 230px);
    height: 360px;
    margin: -40px 18px 0 auto;
  }

  html[dir="rtl"] .phone-preview {
    margin-inline: auto 18px;
  }

  .metric-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-inline: 16px;
  }

  .brand {
    width: 146px;
  }

  .lang-switch {
    min-height: 38px;
    padding-inline: 10px;
  }

  .section-pad {
    padding-inline: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .hero-copy p,
  .section-heading p,
  .contact-copy p {
    font-size: 16px;
  }

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

  .button {
    min-height: 48px;
  }

  .product-window {
    padding: 16px;
    min-height: 460px;
  }

  .signal-grid,
  .project-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .project-featured {
    grid-column: auto;
  }

  .project-card {
    min-height: 360px;
  }

  .metric-band {
    margin-inline: 16px;
  }

  .process-panel {
    padding: 22px 16px;
  }

  .process-step,
  html[dir="rtl"] .process-step {
    grid-template-columns: 1fr;
  }

  html[dir="rtl"] .process-step > span,
  html[dir="rtl"] .process-step > div {
    grid-column: auto;
    grid-row: auto;
  }

  .contact-section {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 16px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer img {
    width: 168px;
  }
}
