/* =========================================================================
   Taameer — Editorial direction. Shared design tokens + site chrome.
   Loaded on every page; page-specific CSS files build on top of this.
   ========================================================================= */

:root {
  --bg: #F5F2ED;
  --bg-card: #EFEBE4;
  --bg-band: #E9E5DC;
  --ink: #1E2225;
  --cream: #F5F2ED;
  --gold: #B08D57;
  --gold-light: #D8BE95;
  --muted-warm: #B9B0A4;
  --muted: #8B8781;
  --body-text: #5C5852;

  --line-on-dark: rgba(245, 242, 237, 0.14);
  --line-on-dark-soft: rgba(245, 242, 237, 0.10);
  --line-on-light: rgba(30, 34, 37, 0.12);

  --font-base: 'Geist', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --max: 1560px;
  --pad-inline: clamp(20px, 4vw, 64px);
  --pad-inline-header: clamp(20px, 4vw, 48px);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  color: var(--ink);
  font-family: var(--font-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--ink); }
::selection { background: var(--gold); color: var(--cream); }
button { font-family: inherit; }

h1, h2, h3, p { margin: 0; }

/* width:100% matters here: .hero__content is both `.container` and a direct
   flex item of `.hero` (column direction). A flex item with an auto cross-axis
   margin (our centering `margin: 0 auto`) skips stretch sizing per spec and
   shrink-wraps to its content instead of filling up to max-width — silently
   narrowing and off-centering the box. An explicit width:100% sidesteps that;
   it's a no-op everywhere `.container` is a plain block child.

   No padding-inline here on purpose: the source design mixes two patterns —
   most sections put the horizontal padding on the *section* and nest an
   unpadded centered div inside (so `.container` alone is correct there); a
   few full-bleed elements (the hero, the header bar) put padding and
   centering on the *same* element (`.container--padded`, added below). Pick
   per section by checking the source rather than assuming one pattern. */
.container { width: 100%; max-width: var(--max); margin: 0 auto; }
.container--padded { padding-inline: var(--pad-inline); }

@keyframes tmrise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
[data-reveal] { opacity: 0; }
[data-reveal].is-visible { animation: tmrise 760ms cubic-bezier(.22,.7,.3,1) both; }
[data-reveal].is-visible.d1 { animation-delay: 90ms; }
[data-reveal].is-visible.d2 { animation-delay: 180ms; }
[data-reveal].is-visible.d3 { animation-delay: 270ms; }
[data-reveal].is-visible.d4 { animation-delay: 360ms; }
[data-reveal].is-visible.d5 { animation-delay: 450ms; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; animation: none !important; }
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  display: block;
}

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-block;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 17px 32px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 260ms ease;
  text-align: center;
}
.btn--light { background: var(--cream); color: var(--ink); }
.btn--light:hover { background: var(--gold); color: var(--cream); }
.btn--dark { background: var(--ink); color: var(--cream); }
.btn--dark:hover { background: var(--gold); }
.btn--outline { border-color: rgba(245,242,237,0.34); color: var(--cream); background: transparent; }
.btn--outline:hover { border-color: var(--cream); background: rgba(245,242,237,0.08); }
.btn--outline-ink { border-color: var(--line-on-light); color: var(--ink); background: transparent; }
.btn--outline-ink:hover { border-color: var(--gold); color: var(--gold); }

.text-link {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 6px;
  display: inline-block;
}
.text-link:hover { color: var(--gold); }

.chip {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line-on-light);
  background: transparent;
  color: var(--body-text);
  transition: all 250ms ease;
  display: inline-block;
}
.chip.is-active { border-color: var(--ink); background: var(--ink); color: var(--cream); }
.chip:hover:not(.is-active) { border-color: var(--gold); color: var(--ink); }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(30, 34, 37, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-on-dark);
  transition: background 400ms ease, border-color 400ms ease;
}
.site-header--floating {
  position: fixed;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}
.site-header--floating.is-scrolled {
  position: fixed;
  background: rgba(30, 34, 37, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line-on-dark);
}
/* Mobile hamburger menu always needs a solid header background behind it,
   even when the floating header hasn't been scrolled yet — otherwise the
   dropdown links float over whatever page content sits underneath. */
.site-header--floating:has(.mobile-menu.is-open) {
  background: rgba(30, 34, 37, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line-on-dark);
}

.site-header__bar {
  padding-block: 14px;
  padding-inline: var(--pad-inline-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.site-header__mark { display: block; line-height: 0; }
.site-header__mark-img { height: 55px; width: auto; cursor: pointer; }
.wordmark {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cream);
}
.wordmark--footer { font-size: 26px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}
.site-nav__link {
  cursor: pointer;
  color: rgba(245, 242, 237, 0.86);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.site-nav__link:hover, .site-nav__link.is-active { color: var(--cream); border-bottom-color: var(--gold); }

.site-header__actions { display: flex; align-items: center; gap: 12px; }

.lang-switch { display: inline-block; margin: 0; }
.lang-pill {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted-warm);
  border: 1px solid rgba(245,242,237,0.22);
  border-radius: var(--radius);
  padding: 9px 16px;
  background: transparent;
}
.lang-pill:hover { color: var(--cream); border-color: var(--gold); }

.site-header__contact { padding: 13px 24px; font-size: 12px; }

.burger {
  cursor: pointer;
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  border: 1px solid rgba(245,242,237,0.22);
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.burger span { display: block; width: 18px; height: 1.5px; background: var(--cream); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px var(--pad-inline-header) 26px;
  border-top: 1px solid var(--line-on-dark-soft);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu__link {
  color: rgba(245,242,237,0.86);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-on-dark-soft);
}
.mobile-menu__contact { text-align: center; padding: 16px 24px; margin-top: 16px; font-size: 13px; letter-spacing: 0.12em; }

@media (max-width: 899px) {
  .site-nav { display: none; }
  .burger { display: flex; }
}
@media (max-width: 639px) {
  .site-header__contact { display: none; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(56px,7vw,80px) var(--pad-inline) 40px;
  border-top: 1px solid var(--line-on-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(32px,4vw,48px);
}
.footer-logo { height: 40px; width: auto; }
.footer-tagline { margin-top: 28px; font-size: 16px; line-height: 1.72; color: rgba(245,242,237,0.58); max-width: 400px; text-wrap: pretty; }
.footer-heading { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.footer-links a, .footer-links span { color: rgba(245,242,237,0.78); }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line-on-dark);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* =========================================================================
   Media slot (image placeholder)
   ========================================================================= */
/* media_slot wraps its <img> in a <picture> (for the WebP <source>) —
   picture is inline by default, which would break the absolute-positioned
   fill-the-container layout below; display:contents takes it out of the
   box tree entirely so .media-slot__img still positions against the same
   parent it did before. */
picture { display: contents; }
.media-slot__img, .media-slot__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-slot__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  color: var(--muted);
}
.media-slot__caption { font-size: 11px; letter-spacing: 0.08em; line-height: 1.6; text-transform: uppercase; opacity: 0.75; }

/* =========================================================================
   Cards
   ========================================================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius);
  transition: all 300ms ease;
}
.card:hover { border-color: var(--gold); transform: translateY(-3px); }

/* =========================================================================
   Shared CTA band (used at the end of projects/services pages)
   ========================================================================= */
.cta-band {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(72px, 9vw, 120px) var(--pad-inline);
  text-align: center;
}
.cta-band__inner { max-width: 820px; margin: 0 auto; }
.cta-band h2 { margin: 0; font-size: clamp(30px, 3.4vw, 50px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 400; text-wrap: balance; }
.cta-band .btn { margin-top: 38px; padding: 18px 34px; }

/* Static (non-interactive) chip variant, e.g. service tag lists. */
.chip--static { cursor: default; padding: 9px 16px; font-size: 13px; color: var(--ink); }
.chip--static:hover { border-color: var(--line-on-light); color: var(--ink); }

/* =========================================================================
   RTL adjustments
   ========================================================================= */
[dir="rtl"] .site-nav__link,
[dir="rtl"] .mobile-menu__link { letter-spacing: 0; }
