/* ============================================================
   JOUD AL-TATWEER — DESIGN SYSTEM
   Palette: Charcoal Fig / Linen Glow / Clay Mist / Sage Feather / Olive Drift / Verdant Grove
   Fonts:   Space Grotesk (EN) · Cairo (AR)
   ============================================================ */

/* 1. CUSTOM PROPERTIES
   ============================================================ */
:root {
  --dark:   #23201E;
  --light:  #F4F0E8;
  --mist:   #D8CCBE;
  --sage:   #A9B2A2;
  --olive:  #6E7A58;
  --green:  #4F8B4A;

  --font-en: 'Space Grotesk', system-ui, sans-serif;
  --font-ar: 'Cairo', system-ui, sans-serif;

  --nav-h:    72px;
  --pad-x:    clamp(1.5rem, 6vw, 5rem);
  --max-w:    1200px;
  --sec-py:   clamp(72px, 10vw, 120px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.4s;
}

/* 2. RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;                      /* iOS Safari horizontal scroll */
  scroll-padding-top: var(--nav-h);        /* anchor links clear the fixed nav */
}
body {
  font-family: var(--font-en);
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[dir="rtl"] body { font-family: var(--font-ar); }
[dir="rtl"] { font-family: var(--font-ar); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; }
input, select, textarea { font: inherit; }

/* 3. TYPOGRAPHY SCALE
   ============================================================ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.25rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green);
  flex-shrink: 0;
}
.section-label--light { color: var(--sage); }
.section-label--light::before { background: var(--sage); }

[dir="rtl"] .section-label::before { order: 2; }

/* 4. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transition: background var(--dur) var(--ease-in-out),
              color var(--dur) var(--ease-in-out),
              border-color var(--dur) var(--ease-in-out),
              transform 0.2s var(--ease-out);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--green);
  color: var(--light);
  border: 2px solid var(--green);
}
.btn--primary:hover { background: var(--olive); border-color: var(--olive); }

.btn--ghost {
  background: transparent;
  color: var(--light);
  border: 2px solid rgba(244, 240, 232, 0.4);
}
.btn--ghost:hover {
  border-color: var(--light);
  background: rgba(244, 240, 232, 0.08);
}

.btn--full { width: 100%; }

/* 5. NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--dur) var(--ease-in-out),
              box-shadow var(--dur) var(--ease-in-out);
}
.nav--scrolled {
  background: rgba(35, 32, 30, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 2rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}
.nav__logo-mark {
  width: 36px;
  height: 36px;
  background: var(--green);
  color: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 4px;
  flex-shrink: 0;
  font-family: var(--font-en);
}
.nav__logo-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--light);
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(244, 240, 232, 0.7);
  transition: color var(--dur) var(--ease-in-out);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform var(--dur) var(--ease-out);
}
.nav__link:hover { color: var(--light); }
.nav__link:hover::after { transform: scaleX(1); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(244, 240, 232, 0.6);
  transition: color var(--dur);
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(244, 240, 232, 0.2);
  border-radius: 2px;
  transition: border-color var(--dur), color var(--dur);
}
.lang-toggle:hover { color: var(--light); border-color: rgba(244, 240, 232, 0.5); }
.lang-toggle__option { transition: color var(--dur); cursor: pointer; }
.lang-toggle__option.active { color: var(--green); }
.lang-toggle__sep { color: rgba(244, 240, 232, 0.25); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--light);
  border-radius: 1px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur);
}

.nav__mobile {
  display: none;
  flex-direction: column;
  background: rgba(35, 32, 30, 0.98);
  backdrop-filter: blur(16px);
  gap: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height var(--dur) var(--ease-out),
              padding var(--dur) var(--ease-out),
              opacity var(--dur),
              visibility var(--dur);
}
.nav__mobile.open {
  max-height: 400px;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  opacity: 1;
  visibility: visible;
}
.nav__mobile-link {
  display: block;
  padding: 1rem 0;
  color: rgba(244, 240, 232, 0.8);
  font-size: 1.125rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color var(--dur);
}
.nav__mobile-link:hover { color: var(--green); }

/* 6. MARQUEE
   ============================================================ */
.marquee {
  background: var(--dark);
  border-top: 1px solid rgba(79, 139, 74, 0.18);
  overflow: hidden;
  padding: 0.8125rem 0;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
}

.marquee__set {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding-right: 1.75rem;
  white-space: nowrap;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  font-family: var(--font-en);
}

[dir="rtl"] .marquee__set { font-family: var(--font-ar); letter-spacing: 0.04em; }

.marquee__dot { color: var(--green); font-weight: 400; }

[dir="rtl"] .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* Section dividers — diagonal SVG transitions between light/dark sections */
.sec-divider {
  display: block;
  width: 100%;
  height: 56px;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
}
.sec-divider svg { display: block; width: 100%; height: 100%; }
.sec-divider--l2d { background: var(--light); }
.sec-divider--d2l { background: var(--dark); }

/* 7. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;                       /* fallback */
  min-height: -webkit-fill-available;      /* iOS Safari: actual visible viewport */
  min-height: 100svh;
  background-color: var(--dark);
  background-image: url('../assets/hero-bg.jpg');  /* fallback */
  background-image:
    -webkit-image-set(
      url('../assets/hero-bg.webp') 1x,
      url('../assets/hero-bg.jpg') 1x
    );
  background-image:
    image-set(
      url('../assets/hero-bg.webp') type('image/webp'),
      url('../assets/hero-bg.jpg') type('image/jpeg')
    );
  background-size: cover;
  background-position: center 35%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--nav-h) var(--pad-x) 6rem;
}

/* Dark overlay so text stays readable over the construction photo */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(35, 32, 30, 0.76);
  pointer-events: none;
  z-index: 0;
}

/* Radial vignette — deepens the edges */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 50%,
    transparent 25%,
    rgba(35, 32, 30, 0.6) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Signature blueprint grid — sits above overlay */
.hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(79, 139, 74, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 139, 74, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(79, 139, 74, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 139, 74, 0.025) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  animation: gridFade 2s var(--ease-out) forwards;
  opacity: 0;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 7rem; /* clear the absolute scroll indicator */
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: slideUp 0.8s 0.3s var(--ease-out) forwards;
}
.hero__eyebrow-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--olive);
  flex-shrink: 0;
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 1.5rem;
  line-height: 0.9;
}
.hero__word {
  font-size: clamp(4.5rem, 14vw, 12rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--light);
  display: block;
  opacity: 0;
  animation: stampIn 0.9s 0.6s var(--ease-out) forwards;
}
.hero__word--alt {
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--sage);
  animation-delay: 0.75s;
  margin-top: 0.1em;
}

[dir="rtl"] .hero__word {
  letter-spacing: -0.01em;
}
[dir="rtl"] .hero__word--alt {
  letter-spacing: 0.02em;
}

.hero__descriptor {
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: slideUp 0.7s 1s var(--ease-out) forwards;
}

.hero__tagline {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: rgba(244, 240, 232, 0.75);
  line-height: 1.6;
  max-width: 540px;
  margin: 0 auto 3rem;
  opacity: 0;
  animation: slideUp 0.7s 1.1s var(--ease-out) forwards;
}

.hero__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: slideUp 0.7s 1.25s var(--ease-out) forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  z-index: 2;
  opacity: 0;
  animation: fadeIn 0.7s 1.8s var(--ease-out) forwards;
}
.hero__scroll-bar {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--olive), transparent);
  animation: scrollPulse 2s 2s infinite;
}

/* 7. ABOUT
   ============================================================ */
.about {
  padding: var(--sec-py) var(--pad-x);
  background: var(--light);
}
.about__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about__title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1.5rem;
}
.about__text {
  font-size: 1rem;
  font-weight: 400;
  color: #4a4540;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.about__aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mission-card {
  background: var(--dark);
  border-radius: 4px;
  padding: 2.5rem;
  color: var(--light);
  position: relative;
  overflow: hidden;
}
.mission-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--green);
}
[dir="rtl"] .mission-card::before { left: auto; right: 0; }

.mission-card__icon {
  width: 48px;
  height: 48px;
  color: var(--green);
  margin-bottom: 1.5rem;
}
.mission-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: var(--light);
}
.mission-card p {
  font-size: 0.9375rem;
  color: var(--sage);
  line-height: 1.75;
}

.vision-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  background: var(--mist);
  border-radius: 4px;
  border-left: 4px solid var(--green);
}
[dir="rtl"] .vision-badge { border-left: none; border-right: 4px solid var(--green); }

.vision-badge__year {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
  font-family: var(--font-en);
}
.vision-badge__text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--olive);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* 8. STATS
   ============================================================ */
.stats {
  background: var(--dark);
  padding: 4rem var(--pad-x);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.stats__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
  flex-wrap: wrap;
}
.stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}
.stats__value {
  display: flex;
  align-items: baseline;
  gap: 0.125rem;
}
.stats__num {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--light);
  letter-spacing: -0.03em;
  line-height: 1;
  font-family: var(--font-en);
}
.stats__unit {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 300;
  color: var(--green);
  line-height: 1;
}
.stats__label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
}
.stats__divider {
  width: 1px;
  height: 60px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* 9. SERVICES
   ============================================================ */
.services {
  padding: var(--sec-py) var(--pad-x);
  background: var(--light);
}
.services__inner { max-width: var(--max-w); margin: 0 auto; }
.services__header { margin-bottom: 4rem; }
.services__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--dark);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--mist);
  border: 1.5px solid var(--mist);
  border-radius: 4px;
  overflow: hidden;
}

.service-card {
  background: var(--light);
  padding: 2.5rem;
  position: relative;
  transition: background var(--dur) var(--ease-in-out);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

/* Animated green left-border sweep */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--green);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s var(--ease-out);
  z-index: 1;
}
[dir="rtl"] .service-card::before { left: auto; right: 0; }

.service-card:hover { background: #EDEBE4; }
.service-card:hover::before { transform: scaleY(1); }

.service-card__index {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--mist);
  margin-bottom: 1.5rem;
  font-family: var(--font-en);
  transition: color var(--dur);
}
.service-card:hover .service-card__index { color: var(--green); }

.service-card__icon {
  width: 44px;
  height: 44px;
  color: var(--olive);
  margin-bottom: 1.5rem;
  transition: color var(--dur);
}
.service-card:hover .service-card__icon { color: var(--green); }

.service-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.875rem;
  line-height: 1.3;
}
.service-card__desc {
  font-size: 0.9rem;
  color: #6a6259;
  line-height: 1.75;
  flex: 1;
}

/* 10. CERTIFICATIONS
   ============================================================ */
.certifications {
  background: var(--dark);
  padding: var(--sec-py) var(--pad-x);
}
.certifications__inner { max-width: var(--max-w); margin: 0 auto; }
.certifications__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}
.certifications__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--light);
  margin-bottom: 1.25rem;
}
.certifications__sub {
  font-size: 1rem;
  color: var(--sage);
  line-height: 1.75;
}
.certifications__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.cert-card {
  background: rgba(244, 240, 232, 0.04);
  border: 1px solid rgba(244, 240, 232, 0.08);
  border-radius: 4px;
  padding: 2.5rem;
  text-align: center;
  transition: background var(--dur), border-color var(--dur), transform var(--dur) var(--ease-out);
}
.cert-card:hover {
  background: rgba(79, 139, 74, 0.08);
  border-color: rgba(79, 139, 74, 0.3);
  transform: translateY(-4px);
}

.cert-card__top {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}
.cert-card__iso {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--green);
  font-family: var(--font-en);
}
.cert-card__num {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--light);
  letter-spacing: -0.02em;
  line-height: 1;
  font-family: var(--font-en);
}
.cert-card__yr {
  font-size: 1rem;
  font-weight: 300;
  color: var(--sage);
  font-family: var(--font-en);
}
.cert-card__line {
  width: 32px;
  height: 2px;
  background: var(--green);
  margin: 0 auto 1.25rem;
  border-radius: 1px;
}
.cert-card__name {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--sage);
  text-transform: uppercase;
  line-height: 1.5;
}

/* 11. PARTNERS
   ============================================================ */
.partners {
  padding: var(--sec-py) var(--pad-x);
  background: var(--light);
}
.partners__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.partners__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--dark);
  margin-bottom: 1.25rem;
}
.partners__text {
  font-size: 1rem;
  color: #4a4540;
  line-height: 1.8;
}

.partners__featured {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.partner-badge {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  background: var(--dark);
  border-radius: 4px;
  color: var(--light);
}
.partner-badge__icon {
  width: 44px;
  height: 44px;
  color: var(--green);
  flex-shrink: 0;
}
.partner-badge span {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
}

.partners__open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 2rem;
  background: var(--mist);
  border-radius: 4px;
}
.partners__open p {
  font-size: 0.9rem;
  color: var(--olive);
  font-weight: 500;
}

/* 12. CONTACT
   ============================================================ */
.contact {
  padding: var(--sec-py) var(--pad-x);
  background: var(--dark);
}
.contact__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  align-items: start;
}
.contact__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--light);
  line-height: 1.1;
  margin-bottom: 3rem;
}
.contact__details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact__item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.contact__item-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
}
.contact__item-value {
  display: block;
  font-size: 1rem;
  color: var(--sage);
  line-height: 1.6;
}
.contact__item-link {
  color: rgba(244, 240, 232, 0.7);
  transition: color var(--dur);
}
.contact__item-link:hover { color: var(--green); }

/* 13. FORM
   ============================================================ */
.contact__form-wrap {
  background: rgba(244, 240, 232, 0.04);
  border: 1px solid rgba(244, 240, 232, 0.08);
  border-radius: 4px;
  padding: 2.5rem;
}
.contact__form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage);
}
.form-input {
  background: rgba(244, 240, 232, 0.06);
  border: 1px solid rgba(244, 240, 232, 0.12);
  border-radius: 2px;
  padding: 0.875rem 1rem;
  color: var(--light);
  font-size: 1rem;                         /* ≥16px prevents iOS zoom on focus */
  width: 100%;
  transition: border-color var(--dur), background var(--dur);
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder { color: rgba(169, 178, 162, 0.5); }
.form-input:focus {
  outline: none;
  border-color: var(--green);
  background: rgba(79, 139, 74, 0.06);
}
.form-input:hover { border-color: rgba(244, 240, 232, 0.25); }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A9B2A2' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
[dir="rtl"] .form-select {
  background-position: left 1rem center;
  padding-right: 1rem;
  padding-left: 2.5rem;
}
.form-select option { background: var(--dark); color: var(--light); }
.form-textarea { resize: vertical; min-height: 120px; }

.form-success {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(79, 139, 74, 0.12);
  border: 1px solid rgba(79, 139, 74, 0.3);
  border-radius: 2px;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 500;
}
.form-success svg { width: 20px; height: 20px; flex-shrink: 0; }
.form-success.visible { display: flex; }

/* 14. FOOTER
   ============================================================ */
.footer {
  background: #1A1816;
  padding: 4rem var(--pad-x) 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
}
.footer__brand .footer__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--light);
}
.footer__desc {
  font-size: 0.875rem;
  color: var(--sage);
  margin-bottom: 0.375rem;
}
.footer__location {
  font-size: 0.8125rem;
  color: rgba(169, 178, 162, 0.6);
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer__col-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.25rem;
}
.footer__col a,
.footer__col span {
  font-size: 0.875rem;
  color: rgba(169, 178, 162, 0.7);
  transition: color var(--dur);
  display: block;
}
.footer__col a:hover { color: var(--green); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__bottom p {
  font-size: 0.8125rem;
  color: rgba(169, 178, 162, 0.45);
}
.footer__bottom a { color: var(--olive); }
.footer__bottom a:hover { color: var(--green); }

/* 15. ANIMATIONS
   ============================================================ */
@keyframes gridFade {
  to { opacity: 1; }
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes stampIn {
  from { opacity: 0; transform: scale(0.96) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(0.7); }
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.15s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.2s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero::before { opacity: 1; animation: none; }
  .hero__eyebrow, .hero__word, .hero__descriptor, .hero__tagline,
  .hero__cta, .hero__scroll { opacity: 1; animation: none; }
  .animate-on-scroll { opacity: 1; transform: none; }
}

/* 16. RTL OVERRIDES
   ============================================================ */
[dir="rtl"] .nav__links { flex-direction: row-reverse; }
[dir="rtl"] .hero__eyebrow { flex-direction: row-reverse; }
[dir="rtl"] .hero__eyebrow-line { order: -1; }
[dir="rtl"] .partner-badge { flex-direction: row-reverse; }
[dir="rtl"] .partners__open { flex-direction: row-reverse; }
[dir="rtl"] .contact__item-label, [dir="rtl"] .contact__item-value { text-align: right; }
[dir="rtl"] .form-success { flex-direction: row-reverse; }
[dir="rtl"] .footer__col a,
[dir="rtl"] .footer__col span { text-align: right; }
[dir="rtl"] .footer__brand { text-align: right; }

/* 17. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .about__inner { grid-template-columns: 1fr; gap: 3rem; }
  .partners__inner { grid-template-columns: 1fr; gap: 3rem; }
  .contact__inner { grid-template-columns: 1fr; gap: 3.5rem; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .footer__brand { grid-column: 1 / -1; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .certifications__grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; --pad-x: 1.25rem; }

  /* Nav */
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__mobile { display: flex; }
  .nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__burger.open span:nth-child(2) { opacity: 0; }
  .nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__logo-text { font-size: 0.875rem; }

  /* Hero */
  .hero { padding-bottom: 5rem; }
  .hero__word { font-size: clamp(3.5rem, 18vw, 6rem); }
  .hero__word--alt { font-size: clamp(2rem, 11vw, 4rem); }
  .hero__cta { flex-direction: column; align-items: center; }
  .hero__cta .btn { width: 100%; max-width: 320px; }
  .hero__scroll { display: none; }        /* hides "Scroll" label on mobile */

  /* Stats */
  .stats__inner { flex-direction: column; gap: 2rem; }
  .stats__divider { width: 60px; height: 1px; }

  /* Services */
  .services__grid { grid-template-columns: 1fr; }

  /* Certifications: 2 columns on tablet/phone */
  .certifications__grid { grid-template-columns: repeat(2, 1fr); }

  /* Partners */
  .partners__open { flex-direction: column; align-items: flex-start; }
  [dir="rtl"] .partners__open { align-items: flex-end; }

  /* Footer */
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer__brand { grid-column: auto; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }
  .contact__form-wrap { padding: 1.5rem; }

  /* Service cards: show green border permanently on touch devices */
  .service-card::before { transform: scaleY(0.25); opacity: 0.45; }
}

@media (max-width: 480px) {
  :root { --pad-x: 1rem; }

  /* Hero: very small screens */
  .hero__word { font-size: clamp(3rem, 20vw, 4rem); }
  .hero__word--alt { font-size: clamp(1.75rem, 12vw, 3rem); }
  .hero__tagline { font-size: 1rem; }
  .hero__descriptor { font-size: 0.6875rem; }

  /* Certifications: single column */
  .certifications__grid { grid-template-columns: 1fr; }

  /* Cards */
  .mission-card { padding: 1.5rem; }
  .cert-card { padding: 1.5rem; }
  .service-card { padding: 1.5rem; }

  /* Footer */
  .footer__col-title { margin-top: 0.5rem; }
}
