/* ==========================================================================
   Emaar Al-Buroj — site stylesheet
   1. Design tokens
   2. Base / resets
   3. Layout helpers
   4. Header + menu overlay
   5. Hero
   6. Typography blocks
   7. Buttons
   8. Cards, grids, tiles
   9. Table, form, tabs, map
   10. Footer
   11. Responsive
   ========================================================================== */

/* 1. Design tokens ------------------------------------------------------- */
:root {
  /* colours */
  --black: #000000;
  --dark-iron: #181818;
  --charcoal: #202020;
  --shadow-gray: #313131;
  --iron: #555555;
  --steel: #969696;
  --ash: #7d7d7d;
  --smoke: #f5f5f5;
  --white: #ffffff;
  --gold: #ffc000;
  --gold-text: #ffce3e;
  --gold-dark: #917300;
  --teal-action: #1eaedb;

  --surface-abyss: rgba(0, 0, 0, 0.62);
  --surface-deep: rgba(24, 24, 24, 0.72);
  --surface-card: var(--charcoal);
  --surface-raised: var(--shadow-gray);

  --text-body: var(--ash);
  --text-body-strong: var(--smoke);
  --text-muted: var(--steel);
  --text-disabled: var(--iron);
  --text-accent: var(--gold-text);

  --border-divider: var(--charcoal);
  --border-hairline: rgba(255, 255, 255, 0.5);
  --border-faint: rgba(255, 255, 255, 0.16);

  /* type */
  --font-core: "Saira", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Saira Condensed", "Saira", Roboto, Arial, sans-serif;

  --size-hero: 7.5rem;
  --size-section: 3.375rem;
  --size-subsection: 2.5rem;
  --size-feature: 1.6875rem;
  --size-card-title: 1.5rem;
  --size-body-lg: 1.125rem;
  --size-body: 1rem;
  --size-btn: 0.9rem;
  --size-caption: 0.875rem;
  --size-label: 0.75rem;
  --size-micro: 0.625rem;

  --track-label: 0.96px;
  --track-micro: 0.225px;
  --track-btn: 0.2px;

  /* space */
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-80: 80px;
  --section-y: 56px;
  --section-x: 40px;
  --content-max: 1200px;

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Base / resets ------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; min-width: 0; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  /* Concrete canvas behind everything; the dark surface tokens below are
     translucent so the texture reads through each section. */
  background: #000 url("../images/texture-concrete.jpg") center top / cover no-repeat fixed;
  color: var(--text-body);
  font-family: var(--font-core);
  font-size: var(--size-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe, video { max-width: 100%; }
h1, h2, h3, p { overflow-wrap: break-word; text-wrap: pretty; }

a { color: var(--white); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

button { font: inherit; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* 3. Layout helpers ----------------------------------------------------- */
.section { padding: var(--section-y) var(--section-x); background: var(--surface-abyss); }
.section--deep { background: var(--surface-deep); }
.section--band { padding-top: var(--space-80); padding-bottom: var(--space-80); }
.section--divided { border-top: 1px solid var(--border-divider); }

.container { max-width: var(--content-max); margin: 0 auto; }
.measure { max-width: 760px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-56);
  align-items: start;
}
.split--narrow-first { grid-template-columns: 380px 1fr; }
.split--wide-first { grid-template-columns: 1fr 380px; }
.split--wide-last { grid-template-columns: 1fr 1.4fr; }

.grid { display: grid; gap: var(--space-40); }
.grid--tight { gap: 1px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-40);
  flex-wrap: wrap;
}
.row-center { align-items: center; }

.stack-top { margin-top: var(--space-40); }
.stack-top-lg { margin-top: var(--space-48); }

/* 4. Header + menu overlay --------------------------------------------- */
.site-header {
  position: relative;
  z-index: 40;
  padding: var(--space-20) var(--section-x);
}
.site-header__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-20);
}
.menu-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-12);
  min-height: 48px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--white);
  font-size: var(--size-caption);
  letter-spacing: var(--track-btn);
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--transition);
}
.menu-button:hover { color: var(--gold); }
.site-header__inner .brand { order: -1; }
.site-header__inner .menu-button { margin-inline-start: auto; }
.brand img { height: 44px; width: auto; display: block; }
.lang-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-12);
  font-size: var(--size-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.94);
  padding: var(--space-40) var(--section-x);
  overflow-y: auto;
}
.menu-overlay[hidden] { display: none; }
.menu-overlay__inner { max-width: var(--content-max); margin: 0 auto; }
.menu-overlay__top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-48);
}
.menu-close {
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: var(--white);
  cursor: pointer;
  transition: color var(--transition);
}
.menu-close:hover { color: var(--gold); }
.menu-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-48); }
.menu-column h2 {
  margin: 0 0 var(--space-20);
  font-size: var(--size-label);
  font-weight: 400;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-accent);
}
.menu-column ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-12); }
.menu-column a {
  font-family: var(--font-display);
  font-size: var(--size-card-title);
  text-transform: uppercase;
  line-height: 1.2;
}

/* 5. Hero -------------------------------------------------------------- */
.hero { position: relative; min-height: 480px; display: flex; align-items: flex-end; }
.hero--tall { min-height: 720px; }
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0) 180px),
    linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25) 65%),
    rgba(0, 0, 0, 0.25);
}
.hero__inner {
  position: relative;
  z-index: 1;
  /* the horizontal padding is added on top of the content column, so hero copy
     starts on the same line as every section below it */
  max-width: calc(var(--content-max) + var(--section-x) * 2);
  margin: 0 auto;
  width: 100%;
  padding: var(--space-80) var(--section-x) var(--space-56);
}
/* A gold sheen travelling across the headline on a 10s loop. The gradient repeats and
   is mostly white, so the letters are solid white before and after the sweep. */
@keyframes eab-sheen {
  from { background-position: 200% 0; }
  to { background-position: 0 0; }
}

.hero__title {
  animation: 10s ease-in-out 1.1s infinite eab-sheen;
  background-image: linear-gradient(100deg, var(--white) 42%, var(--gold) 50%, var(--white) 58%);
  background-size: 200% 100%;
  background-repeat: repeat;
  background-position: 200% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: var(--space-16) 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--size-hero);
  line-height: 0.92;
  text-transform: uppercase;
  color: var(--white);
  max-width: 18ch;
}
.hero__subtitle {
  margin: var(--space-24) 0 0;
  max-width: 620px;
  font-size: var(--size-body-lg);
  line-height: 1.56;
  color: var(--text-body-strong);
}
.hero__actions { margin-top: var(--space-32); display: flex; gap: var(--space-16); flex-wrap: wrap; }

/* 6. Typography blocks ------------------------------------------------- */
.eyebrow {
  margin: 0;
  font-size: var(--size-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-accent);
}
.heading-section,
.heading-sub {
  margin: var(--space-16) 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--white);
}
.heading-section { font-size: var(--size-section); line-height: 1.19; }
.heading-sub { font-size: var(--size-subsection); line-height: 1.15; margin-top: 0; }
.lead { margin: var(--space-24) 0 0; font-size: var(--size-body-lg); line-height: 1.56; color: var(--text-body-strong); }
.body-text { margin: var(--space-16) 0 0; font-size: var(--size-body); line-height: 1.5; color: var(--text-body); }
.note {
  margin: var(--space-16) 0 0;
  font-size: var(--size-micro);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--text-disabled);
}
.caption {
  margin: var(--space-16) 0 0;
  font-size: var(--size-caption);
  letter-spacing: -0.42px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--size-btn);
  letter-spacing: var(--track-btn);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-hairline);
  padding-bottom: 6px;
  transition: color var(--transition), border-color var(--transition);
}
.text-link:hover { color: var(--gold); border-bottom-color: var(--gold); }

.badge {
  display: inline-block;
  padding: 4px var(--space-12);
  border-radius: 2px;
  background: var(--gold);
  color: var(--black);
  font-size: var(--size-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

/* 7. Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  min-height: 48px;
  padding: 0 var(--space-24);
  border: 0;
  border-radius: 0;
  font-family: var(--font-core);
  font-size: var(--size-btn);
  letter-spacing: var(--track-btn);
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.btn--accent { background: var(--gold); color: var(--black); }
.btn--accent:hover { background: var(--gold-dark); color: var(--white); }
.btn--ghost { background: transparent; color: var(--white); border: 1px solid var(--border-hairline); }
.btn--ghost:hover { background: var(--teal-action); border-color: var(--teal-action); color: var(--black); }
.btn--large { min-height: 56px; padding: 0 var(--space-32); }

/* 8. Cards, grids, tiles ---------------------------------------------- */
.card { background: var(--surface-card); transition: background-color var(--transition); }
.card--pad { padding: var(--space-32); }
.card--hover:hover { background: var(--surface-raised); }
.card__media { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-title {
  margin: var(--space-16) 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--size-card-title);
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--white);
}
.card-title--feature { font-size: var(--size-feature); line-height: 1.37; margin-top: var(--space-24); }
.card-text { margin: var(--space-12) 0 0; font-size: var(--size-body); line-height: 1.5; color: var(--text-body); }

.icon-gold { color: var(--gold); display: block; }
.icon svg { display: block; }

.stat { padding: var(--space-32) var(--space-24); }
.stat + .stat { border-left: 1px solid var(--border-divider); }
.stat__value {
  font-family: var(--font-display);
  font-size: var(--size-subsection);
  line-height: 1;
  color: var(--white);
}
.stat__value--gold { color: var(--gold); }
.stat__value span { font-size: 0.5em; }
.stat__label {
  margin: var(--space-12) 0 0;
  font-size: var(--size-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-bar { border-top: 1px solid var(--border-divider); border-bottom: 1px solid var(--border-divider); background: var(--surface-deep); }

.rule-card {
  border-top: 1px solid var(--border-hairline);
  padding-top: var(--space-24);
  transition: border-color var(--transition);
}
.rule-card:hover { border-top-color: var(--gold); }

.client-marquee {
  position: relative;
  overflow: hidden;
  /* fade the tiles out at both edges of the rail */
  mask-image: linear-gradient(to right, transparent, #000 80px, #000 calc(100% - 80px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 80px, #000 calc(100% - 80px), transparent);
}
.client-marquee__track {
  display: flex;
  gap: 1px;
  width: max-content;
  animation: client-scroll 60s linear infinite;
}
.client-marquee:hover .client-marquee__track { animation-play-state: paused; }
@keyframes client-scroll {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .client-marquee__track { animation: none; transform: none; }
  .client-marquee { overflow-x: auto; }
}

.client-tile {
  flex: 0 0 220px;
  background: var(--surface-card);
  padding: var(--space-24) var(--space-20);
  display: grid;
  gap: var(--space-16);
  justify-items: center;
  align-content: start;
  text-align: center;
  transition: background-color var(--transition);
}
.client-tile:hover { background: var(--surface-raised); }
.client-tile img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  background: var(--white);
  display: block;
}
.client-tile span {
  font-size: var(--size-micro);
  line-height: 1.4;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}
.client-tile:hover span { color: var(--white); }

.city-tile {
  background: var(--surface-card);
  padding: var(--space-24) var(--space-32);
  display: flex;
  align-items: center;
  gap: var(--space-12);
  font-family: var(--font-display);
  font-size: var(--size-card-title);
  text-transform: uppercase;
  color: var(--white);
  transition: background-color var(--transition);
}
.city-tile:hover { background: var(--surface-raised); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-16); }
.checklist li {
  display: flex;
  gap: var(--space-12);
  align-items: flex-start;
  color: var(--text-body-strong);
  font-size: var(--size-body);
  line-height: 1.5;
}
.checklist .icon { color: var(--gold); flex-shrink: 0; }
.panel-label {
  font-size: var(--size-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-accent);
  margin-bottom: var(--space-20);
}

/* 9. Table, form, tabs, map ------------------------------------------- */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th,
.spec-table td {
  text-align: left;
  padding: var(--space-20) var(--space-24);
  border-bottom: 1px solid var(--shadow-gray);
  font-size: var(--size-body);
  vertical-align: top;
}
.spec-table th {
  width: 240px;
  font-weight: 400;
  font-size: var(--size-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.spec-table td { color: var(--text-body-strong); }
.spec-table tr:hover td,
.spec-table tr:hover th { background: var(--surface-card); }

.contact-form { background: var(--surface-card); padding: var(--space-40); display: grid; gap: var(--space-24); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-24); }
.field { display: grid; gap: var(--space-8); }
.field label {
  font-size: var(--size-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-12) var(--space-16);
  background: var(--black);
  border: 1px solid var(--border-faint);
  border-radius: 0;
  color: var(--white);
  font-family: var(--font-core);
  font-size: var(--size-body);
  transition: border-color var(--transition);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--gold); }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-disabled); }

.form-success { background: var(--surface-card); padding: var(--space-48); display: grid; gap: var(--space-20); justify-items: start; }
.form-success[hidden] { display: none; }

.tabs { display: flex; gap: var(--space-32); border-bottom: 1px solid var(--border-divider); }
.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: var(--space-16) 0;
  color: var(--text-muted);
  font-size: var(--size-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.tab:hover { color: var(--white); }
.tab.is-active { color: var(--white); border-bottom-color: var(--gold); }

.map-frame { width: 100%; height: 420px; border: 0; display: block; filter: grayscale(1) invert(0.92) contrast(0.9); }

/* 10. Footer ---------------------------------------------------------- */
.site-footer { background: var(--surface-abyss); border-top: 1px solid var(--border-divider); padding: var(--section-y) var(--section-x); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
  gap: var(--space-40);
}
.footer-brand img { height: 56px; width: auto; display: block; }
.footer-brand p { margin: var(--space-20) 0 0; font-size: var(--size-body); color: var(--text-body); max-width: 34ch; }
.footer-col h2 {
  margin: 0 0 var(--space-20);
  font-size: var(--size-label);
  font-weight: 400;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-accent);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-12); }
.footer-col a { font-size: var(--size-body); color: var(--text-muted); }
.footer-col a:hover { color: var(--white); }
.footer-legal {
  margin-top: var(--space-48);
  padding-top: var(--space-24);
  border-top: 1px solid var(--border-divider);
  display: flex;
  justify-content: space-between;
  gap: var(--space-24);
  flex-wrap: wrap;
}
.footer-legal p { margin: 0; font-size: var(--size-micro); letter-spacing: var(--track-micro); text-transform: uppercase; color: var(--text-disabled); }
.footer-legal a { color: var(--text-muted); }
.footer-legal a:hover { color: var(--gold); }

/* Scroll reveal — opacity only, per the brand's motion rules.
   JavaScript adds .is-visible when the block enters the viewport. */
.reveal { opacity: 0; transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.is-visible { opacity: 1; }
.reveal:nth-of-type(even) { transition-delay: 80ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transition: none; }
}

/* Floating WhatsApp button — label reveals on hover (opacity only). */
.wa-fab {
  position: fixed;
  right: var(--section-x);
  bottom: var(--section-x);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--gold);
  color: var(--black);
  transition: background-color var(--transition), color var(--transition);
}
.wa-fab:hover { background: var(--gold-dark); color: var(--white); }
.wa-fab__label {
  position: absolute;
  right: calc(100% + var(--space-12));
  white-space: nowrap;
  background: var(--surface-card);
  color: var(--white);
  padding: var(--space-8) var(--space-12);
  font-size: var(--size-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.wa-fab:hover .wa-fab__label,
.wa-fab:focus-visible .wa-fab__label { opacity: 1; }

/* 11. Responsive ------------------------------------------------------ */
@media (max-width: 1024px) {
  :root {
    --size-hero: 4.25rem;
    --size-section: 2.5rem;
    --size-subsection: 2rem;
    --section-x: 24px;
    --section-y: 40px;
  }
  .grid--3,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .split,
  .split--narrow-first,
  .split--wide-first,
  .split--wide-last { grid-template-columns: minmax(0, 1fr); }
  .split--portrait-first > :first-child { order: 2; }
  .split--portrait-first > :last-child { order: 1; }
  .portrait-photo { height: auto !important; max-height: 60vh; aspect-ratio: 4 / 5; }
  .split--reverse .split__panel { order: 2; }
  .split--reverse .split__body { order: 1; }
  .menu-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root {
    --size-hero: 2.5rem;
    --size-section: 1.75rem;
    --size-subsection: 1.5rem;
    --size-feature: 1.375rem;
    --section-x: 20px;
    --section-y: 32px;
    --space-56: 32px;
    --space-48: 28px;
    --space-80: 48px;
  }
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .footer-grid,
  .menu-columns { grid-template-columns: minmax(0, 1fr); }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--border-divider); }
  .spec-table th { width: auto; }
  .spec-table,
  .spec-table tbody,
  .spec-table tr,
  .spec-table th,
  .spec-table td { display: block; }
  .spec-table th { border-bottom: 0; padding-bottom: 0; }
  .contact-form { padding: var(--space-24); }
}

.cert-card { display: flex; flex-direction: column; gap: var(--space-24); }
.cert-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-20); }
.cert-meta { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--space-10) var(--space-24); font-size: var(--size-body); line-height: var(--lh-body); }
.cert-meta dt { font-size: var(--size-micro); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-muted); align-self: center; }
.cert-meta dd { margin: 0; color: var(--text-body-strong); }
.cert-meta dd strong { color: var(--white); font-weight: 400; }
.cert-card .text-link { margin-top: auto; align-self: flex-start; }
