/* Main Properties - responsive quality pass v18 */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

/* RTL footer uses logical starts. In RTL, flex-start is the physical right edge. */
html[dir="rtl"] .footer .footer-identity,
html[dir="rtl"] .footer-contact,
html[dir="rtl"] .footer-column {
  direction: rtl;
  align-items: flex-start;
  text-align: right;
}

html[dir="rtl"] .footer-column h3,
html[dir="rtl"] .footer-column a,
html[dir="rtl"] .footer-compliance p {
  align-self: flex-start;
  text-align: right;
}

html[dir="rtl"] .footer-compliance p {
  direction: rtl;
}

html[dir="rtl"] .footer .footer-brand {
  justify-content: flex-start;
  width: min(100%, 470px);
  height: auto;
  aspect-ratio: 3 / 1;
  margin-inline: 0;
  margin-block-start: -10px;
}

html[dir="rtl"] .footer .footer-brand .brand-lockup {
  object-position: right center;
}

html[dir="rtl"] .footer-contact a {
  align-self: flex-start;
}

html[dir="rtl"] .footer-bottom {
  direction: rtl;
  text-align: right;
}

@media (max-width: 1020px) {
  .site-header,
  .site-header.scrolled {
    width: 100%;
  }

  .site-header .header-inner {
    direction: ltr;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: 10px;
    width: min(92vw, 920px);
    min-width: 0;
  }

  .site-header .header-actions {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    gap: 8px;
    min-width: 0;
  }

  .site-header .brand,
  .site-header.scrolled .brand {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: clamp(180px, 31vw, 250px);
    height: auto;
    aspect-ratio: 3 / 1;
    min-width: 0;
  }

  .site-header .brand-lockup {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right center;
  }

  .menu-toggle {
    display: block;
    width: 44px;
    height: 44px;
    padding: 10px;
    flex: 0 0 auto;
  }

  .lang-link {
    min-width: 44px;
    height: 40px;
    flex: 0 0 auto;
  }

  .site-header .main-nav.open {
    display: flex;
    position: fixed;
    inset-inline: 0;
    top: 76px;
    width: 100%;
    max-height: calc(100svh - 76px);
    overflow-y: auto;
    padding: 10px 5vw 22px;
    background: rgba(21,22,21,.98);
    border-top: 1px solid rgba(242,239,232,.12);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    transform: none;
  }

  .site-header.scrolled .main-nav.open {
    top: 68px;
    max-height: calc(100svh - 68px);
  }

  .site-header .main-nav.open a {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(242,239,232,.10);
    font-size: 15px;
    line-height: 1.45;
  }

  html[dir="rtl"] .site-header .main-nav.open {
    direction: rtl;
    text-align: right;
  }

  html[dir="rtl"] .site-header .main-nav.open a {
    justify-content: flex-start;
    text-align: right;
  }

  html[dir="ltr"] .site-header .main-nav.open {
    direction: ltr;
    text-align: left;
  }

  html[dir="ltr"] .site-header .main-nav.open a {
    justify-content: flex-start;
    text-align: left;
  }

  .contact .contact-top,
  .footer .footer-grid,
  .footer-bottom {
    width: min(90vw, 920px);
  }
}

/* The base header is taller on small tablets and landscape phones. */
@media (min-width: 721px) and (max-width: 1020px) {
  .site-header .main-nav.open {
    top: 92px;
    max-height: calc(100svh - 92px);
  }

  .site-header.scrolled .main-nav.open {
    top: 74px;
    max-height: calc(100svh - 74px);
  }
}

@media (max-width: 720px) {
  :root {
    --page: 90vw;
  }

  .site-header {
    height: 76px;
  }

  .site-header.scrolled {
    height: 68px;
  }

  .site-header .header-inner {
    width: 92vw;
    gap: 8px;
  }

  .site-header .brand,
  .site-header.scrolled .brand {
    width: clamp(145px, 44vw, 190px);
  }

  .site-header .header-actions {
    gap: 4px;
  }

  .lang-link {
    min-width: 42px;
    width: 42px;
    height: 38px;
    padding: 0;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    padding: 9px;
  }

  .hero {
    min-height: max(680px, 100svh);
  }

  .hero-content {
    padding: 132px 0 44px;
  }

  .hero-grid {
    gap: 28px;
  }

  .hero h1 {
    margin: 18px 0 20px;
    max-width: 100%;
    font-size: clamp(38px, 11.5vw, 50px);
    line-height: 1.02;
    letter-spacing: -.03em;
    overflow-wrap: break-word;
  }

  html[lang="ar"] .hero h1 {
    font-size: clamp(37px, 10.8vw, 47px);
    line-height: 1.18;
    letter-spacing: -.02em;
  }

  .hero-lead {
    max-width: 100%;
    margin: 0;
    font-size: 16px;
    line-height: 1.72;
  }

  .hero-aside {
    padding-top: 16px;
  }

  .hero-cta {
    gap: 14px;
    font-size: 13px;
  }

  .hero-cta .arrow {
    width: 42px;
    height: 42px;
  }

  .intro,
  .services,
  .approach,
  .contexts {
    padding-top: 76px;
    padding-bottom: 80px;
  }

  .intro-grid,
  .services .section-head,
  .approach-grid,
  .contact-top {
    gap: 30px;
  }

  .intro h2,
  .services h2,
  .approach h2,
  .split-content h2,
  .contexts h2,
  .contact h2 {
    max-width: 100%;
    font-size: clamp(32px, 9.4vw, 42px);
    line-height: 1.12;
    letter-spacing: -.025em;
    overflow-wrap: break-word;
  }

  html[lang="ar"] .intro h2,
  html[lang="ar"] .services h2,
  html[lang="ar"] .approach h2,
  html[lang="ar"] .split-content h2,
  html[lang="ar"] .contexts h2,
  html[lang="ar"] .contact h2 {
    line-height: 1.25;
    letter-spacing: -.015em;
  }

  .intro-copy p {
    font-size: 17px;
    line-height: 1.78;
  }

  .intro-copy .mini,
  .contexts-head p,
  .service-desc,
  .step p {
    font-size: 13px;
    line-height: 1.75;
  }

  .feature-image {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .feature-image .image-caption {
    inset-inline-start: 5vw;
    inset-inline-end: 5vw;
    bottom: 18px;
  }

  .services .section-head {
    margin-bottom: 38px;
  }

  .services .section-head p,
  .contact-text,
  .split-content p {
    font-size: 15px;
    line-height: 1.75;
  }

  .service-item {
    grid-template-columns: 36px minmax(0, 1fr) 24px;
    gap: 12px;
    min-height: 0;
    padding: 22px 0;
    align-items: start;
  }

  html[dir="rtl"] .service-item {
    direction: rtl;
  }

  html[dir="ltr"] .service-item {
    direction: ltr;
  }

  .service-num {
    padding-top: 5px;
    font-size: 10px;
  }

  .service-title {
    margin: 0;
    min-width: 0;
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: -.015em;
  }

  .service-desc {
    grid-column: 2 / 4;
    grid-row: 2;
    max-width: none;
    margin: 0;
    padding: 0 0 4px;
  }

  .service-icon {
    font-size: 20px;
    line-height: 1;
    padding-top: 5px;
  }

  .step {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    padding: 22px 0 24px;
  }

  .step b {
    padding-top: 4px;
    font-size: 10px;
  }

  .step h3 {
    margin-bottom: 8px;
    font-size: 21px;
    line-height: 1.4;
  }

  .split-visual {
    min-height: 0;
  }

  .split-image {
    min-height: 68vw;
    max-height: 420px;
  }

  .split-content {
    min-height: 0;
    padding: 68px 5vw 58px;
  }

  .split-content h2 {
    margin: 18px 0 20px;
  }

  .split-foot {
    margin-top: 48px;
    flex-wrap: wrap;
    gap: 10px 18px;
    line-height: 1.5;
  }

  .contexts-head {
    display: block;
    margin-bottom: 34px;
  }

  .contexts-head p {
    margin-top: 20px;
  }

  .context-grid {
    gap: 16px;
  }

  .context-card,
  .context-card.small {
    min-height: min(118vw, 520px);
  }

  .context-card .meta {
    inset-inline-start: 18px;
    inset-inline-end: 18px;
    bottom: 18px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .context-card .meta strong {
    font-size: 18px;
    line-height: 1.35;
  }

  .contact {
    padding: 78px 0 54px;
  }

  .contact h2 {
    margin: 18px 0 24px;
  }

  .contact .contact-top {
    width: 90vw;
    gap: 32px;
  }

  .contact-details {
    max-width: none;
  }

  .contact-row {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 0;
  }

  .contact-row span {
    font-size: 11px;
  }

  .contact-row a,
  .contact-row strong {
    font-size: 15px;
    line-height: 1.55;
  }

  html[dir="rtl"] .contact-row a[dir="ltr"] {
    justify-self: end;
    text-align: right;
  }

  .contact-cta {
    margin-top: 26px;
    min-height: 46px;
    padding: 13px 16px;
  }

  .footer {
    padding: 42px 0 22px;
  }

  .footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
    width: 90vw;
  }

  .footer .footer-identity {
    width: 100%;
    padding-bottom: 26px;
  }

  .footer .footer-brand,
  html[dir="rtl"] .footer .footer-brand {
    width: min(100%, 310px);
    height: auto;
    aspect-ratio: 3 / 1;
    margin: 0 0 12px;
  }

  .footer-tagline {
    max-width: 100%;
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.7;
  }

  .footer-contact {
    width: 100%;
    gap: 7px;
  }

  .footer-contact a {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 13px;
  }

  .footer-column {
    width: 100%;
    padding: 25px 0;
    gap: 11px;
    border-top: 1px solid rgba(242,239,232,.12);
  }

  .footer-column h3 {
    margin: 0 0 8px;
  }

  .footer-column a {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: break-word;
  }

  .footer-compliance p {
    max-width: 100%;
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.75;
  }

  .footer-bottom {
    width: 90vw;
    margin-top: 12px;
    padding-top: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    font-size: 10px;
  }

  html[dir="rtl"] .footer-bottom > span {
    width: 100%;
    text-align: right;
  }

  html[dir="ltr"] .footer-bottom > span {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 430px) {
  :root {
    --page: 88vw;
  }

  .site-header .header-inner {
    width: 92vw;
    gap: 6px;
  }

  .site-header .brand,
  .site-header.scrolled .brand {
    width: clamp(132px, 42vw, 172px);
  }

  .lang-link {
    min-width: 40px;
    width: 40px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .hero-content {
    padding-top: 120px;
  }

  .hero h1 {
    font-size: clamp(35px, 10.8vw, 44px);
  }

  html[lang="ar"] .hero h1 {
    font-size: clamp(34px, 10.2vw, 42px);
  }

  .intro h2,
  .services h2,
  .approach h2,
  .split-content h2,
  .contexts h2,
  .contact h2 {
    font-size: clamp(30px, 9vw, 38px);
  }

  .service-item {
    grid-template-columns: 32px minmax(0, 1fr) 20px;
    gap: 10px;
  }

  .service-title {
    font-size: 20px;
  }

  .service-desc {
    grid-column: 2 / 4;
  }

  .context-card .meta {
    flex-direction: column;
    align-items: flex-start;
  }

  html[dir="rtl"] .context-card .meta {
    direction: rtl;
    align-items: flex-start;
    text-align: right;
  }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  html[dir="rtl"] .contact-row a[dir="ltr"] {
    justify-self: stretch;
    text-align: right;
  }

  .footer .footer-brand,
  html[dir="rtl"] .footer .footer-brand {
    width: min(100%, 280px);
  }
}
