/* =========================================================================
   سند البنيان — Landing page stylesheet
   Palette taken from the company logo: navy #2F3F99 and green #3CBA90.
   Arabic-first, RTL. No letter-spacing on Arabic (it breaks the join).
   ========================================================================= */

/* --------------------------------- Tokens -------------------------------- */
:root {
  /* Brand — sampled from the logo artwork */
  --navy:      #2f3f99;
  --navy-deep: #24327a;
  --navy-ink:  #1b2350;
  --green:     #3cba90;
  --green-dk:  #2c9a76;

  --paper:     #ffffff;
  --paper-2:   #f5f6fb;
  --line:      #e3e6f2;
  --line-soft: #eef0f8;

  --ink:       var(--navy-ink);
  --ink-70:    #3b4470;
  --muted:     #656d8a;
  --hero-ink:  #c7d0f2;

  --shadow-sm: 0 1px 2px rgba(27, 35, 80, .06);
  --shadow-md: 0 24px 48px -32px rgba(27, 35, 80, .45);

  --container:  1200px;
  --gutter:     clamp(20px, 5vw, 48px);
  --sp-section: clamp(68px, 8vw, 120px);
  --header-h:   76px;
  --radius:     3px;

  --font: "Cairo", "Segoe UI", "Noto Sans Arabic", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 10px);
  scrollbar-color: var(--navy) var(--paper-2);
}
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb {
  background: var(--navy);
  border-radius: 8px;
  border: 3px solid var(--paper-2);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
figure { margin: 0; }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--navy); color: #fff; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 50%;
  top: 0;
  transform: translate(50%, -120%);
  z-index: 200;
  padding: 12px 22px;
  background: var(--navy-ink);
  color: #fff;
  font-weight: 600;
  transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: translate(50%, 0); }

/* --------------------------------- Layout -------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sp-section); }

.section-tinted {
  background: var(--paper-2);
  border-block: 1px solid var(--line-soft);
}

/* ---------------------------------- Type --------------------------------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--navy);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.6;
}
.section-label::before {
  content: "";
  width: 22px;
  height: 3px;
  background: var(--green);
  flex: none;
}
.section-label-invert { color: #fff; justify-content: center; }

.section-title {
  font-size: clamp(1.9rem, 1.25rem + 2.3vw, 2.9rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.rule { margin-top: 22px; }
.rule svg { width: 120px; height: 4px; }

.lead {
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  line-height: 2.05;
  color: var(--ink-70);
  max-width: 56ch;
}
.lead-narrow { max-width: 48ch; }

/* -------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 32px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .22s var(--ease), border-color .22s var(--ease),
              color .22s var(--ease), transform .22s var(--ease);
}
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-deep); }
.btn-accent { background: var(--green); color: var(--navy-ink); }
.btn-accent:hover { background: #34a983; }
.btn-outline {
  border-color: rgba(255, 255, 255, .55);
  background: transparent;
  color: #fff;
}
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 56px; padding-inline: 42px; font-size: 1.0625rem; }

/* --------------------------------- Header -------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 12px 30px -26px rgba(27, 35, 80, .5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: var(--header-h);
}

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); }
.nav-list { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); }
.nav-link {
  position: relative;
  display: inline-block;
  padding-block: 6px;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink-70);
  transition: color .2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s var(--ease);
}
.nav-link:hover { color: var(--navy); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--navy); }

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}
.nav-toggle-bars {
  display: block;
  position: relative;
  width: 20px;
  height: 12px;
  margin-inline: auto;
}
.nav-toggle-bars i {
  position: absolute;
  inset-inline: 0;
  height: 2px;
  background: var(--navy-ink);
  transition: transform .25s var(--ease);
}
.nav-toggle-bars i:first-child { top: 0; }
.nav-toggle-bars i:last-child { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:first-child { transform: translateY(5px) rotate(-45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:last-child { transform: translateY(-5px) rotate(45deg); }

/* ---------------------------------- Hero --------------------------------- */
.hero {
  background: linear-gradient(165deg, var(--navy-ink) 0%, #232c63 55%, var(--navy) 100%);
  color: #fff;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}
.hero-copy {
  align-self: center;
  padding-block: clamp(60px, 7vw, 110px);
  padding-inline-start: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  padding-inline-end: clamp(24px, 4vw, 64px);
}

.hero-title {
  font-size: clamp(2.4rem, 1.3rem + 4.8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.22;
  color: #fff;
  margin-bottom: 24px;
}
.hero-text {
  max-width: 52ch;
  font-size: clamp(1.0625rem, 1rem + .38vw, 1.1875rem);
  line-height: 2.05;
  color: var(--hero-ink);
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: 36px;
}

.hero-media { position: relative; min-height: 380px; }
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

/* ---------------------------------- About -------------------------------- */
/* Full-bleed split mirroring the hero: photo fills the right half of the page,
   copy sits in the left half aligned with the site container. */
.about { padding-block: 0; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}
.about-copy {
  order: 2;
  align-self: center;
  padding-block: clamp(60px, 7vw, 110px);
  padding-inline-start: clamp(24px, 4vw, 64px);
  padding-inline-end: max(var(--gutter), calc(100% - var(--container) / 2 + var(--gutter)));
}
.about-copy .lead { margin-top: 20px; }

.about-media {
  position: relative;
  order: 1;
  min-height: 420px;
}
.about-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}
.about-media figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 52px clamp(20px, 3vw, 44px) 22px;
  background: linear-gradient(to top, rgba(27, 35, 80, .92) 0%, rgba(27, 35, 80, .68) 45%, rgba(27, 35, 80, 0) 100%);
  color: #fff;
  font-size: .875rem;
  line-height: 1.9;
}

/* -------------------------------- Products ------------------------------- */
.products-head { margin-bottom: clamp(32px, 4vw, 56px); }
.products-head .lead { margin-top: 18px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
}
.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.product-card:hover {
  border-color: #cfd5ea;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.product-figure { background: var(--paper-2); overflow: hidden; }
.product-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.product-card:hover .product-figure img { transform: scale(1.04); }
.product-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 20px;
}
.product-name { font-size: clamp(1.05rem, .95rem + .5vw, 1.3125rem); font-weight: 700; }
.product-rule { width: 30px; height: 3px; background: var(--green); flex: none; }

/* ---------------------------------- Band --------------------------------- */
.band {
  position: relative;
  isolation: isolate;
  min-height: clamp(300px, 42vw, 460px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.band-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to left, rgba(27, 35, 80, .82), rgba(27, 35, 80, .55) 55%, rgba(27, 35, 80, .35));
}
.band-overlay { padding-inline: var(--gutter); }
.band-text {
  max-width: 20ch;
  color: #fff;
  font-size: clamp(1.5rem, 1rem + 2.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.5;
}

/* ------------------------------- Principles ------------------------------ */
.values-head { margin-bottom: clamp(36px, 4.5vw, 64px); }
.values-head .lead { margin-top: 18px; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
}
.principle {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.principle::before {
  content: "";
  position: absolute;
  inset-block-start: -1px;
  inset-inline-start: 0;
  width: 48px;
  height: 3px;
  background: var(--navy);
  transition: width .3s var(--ease), background-color .25s var(--ease);
}
.principle:nth-child(2)::before { background: var(--green); }
.principle:nth-child(3)::before { background: var(--navy-ink); }
.principle:hover::before { width: 100%; }

.principle-num {
  display: block;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.principle-title {
  font-size: clamp(1.1875rem, 1.05rem + .5vw, 1.4375rem);
  font-weight: 700;
  margin-bottom: 10px;
}
.principle-text {
  font-size: 1rem;
  line-height: 1.95;
  color: var(--ink-70);
  max-width: 34ch;
}

/* --------------------------------- Contact ------------------------------- */
.contact {
  position: relative;
  background: var(--navy-ink);
  color: #fff;
  padding-block: clamp(72px, 9vw, 118px);
  overflow: hidden;
}
.contact-inner { text-align: center; }
.contact-logo { width: clamp(170px, 20vw, 220px); height: auto; margin: 0 auto 30px; }
.contact-title {
  font-size: clamp(1.9rem, 1.25rem + 2.3vw, 2.9rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
}
.contact-text {
  max-width: 52ch;
  margin-inline: auto;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  line-height: 2.05;
  color: rgba(255, 255, 255, .8);
}
.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 30px;
  margin-top: 34px;
}
.contact-number {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  direction: ltr;
  border-bottom: 1px solid rgba(255, 255, 255, .32);
  padding-block: 6px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.contact-number:hover { color: var(--green); border-color: var(--green); }
.contact-location { margin-top: 30px; font-size: .875rem; color: rgba(255, 255, 255, .58); }

/* --------------------------------- Footer -------------------------------- */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding-top: clamp(34px, 4vw, 52px);
}
.footer-top { padding-bottom: clamp(24px, 3vw, 34px); }

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px clamp(18px, 2vw, 32px);
}
.footer-nav a {
  display: inline-block;
  padding-block: 6px;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink-70);
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}
.footer-nav a:hover,
.footer-nav a:focus-visible { color: var(--navy); text-decoration-color: var(--green); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 24px;
  padding-block: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: .8125rem;
  color: var(--muted);
}

/* ------------------------------- Reveal FX ------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 1080px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 1px); /* clear the header's bottom border */
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -30px rgba(27, 35, 80, .5);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .site-nav.is-open { opacity: 1; transform: none; visibility: visible; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link {
    display: block;
    padding-block: 14px;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-link::after { display: none; }
  .nav-link.is-active { color: var(--navy); }

  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 46px var(--gutter) 60px; }
  .hero-media { order: -1; min-height: 0; }
  .hero-media img { position: static; aspect-ratio: 16 / 10; }
  .hero-actions { margin-top: 28px; }

  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-copy { padding: 46px var(--gutter) 60px; }
  .about-media { order: -1; min-height: 0; }
  .about-media img {
    position: static;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
  }
  .about-media figcaption {
    position: static;
    margin-top: 14px;
    padding: 14px 0 0;
    background: none;
    color: var(--muted);
    border-top: 1px solid var(--line);
  }

  .footer-nav ul { gap: 2px 22px; }
}

@media (max-width: 620px) {
  body { font-size: 1rem; }
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .btn { width: 100%; }
  .contact-actions { flex-direction: column; }
  .contact-actions .btn { width: auto; min-width: 220px; }
  .band-text { max-width: 16ch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .product-card:hover .product-figure img { transform: none; }
}

@media print {
  .site-header, .skip-link { display: none; }
}
