/* Home page (index.html) sections. The header and footer come from
   partials/ and are styled in css/site-chrome.css. */

@font-face { font-family: 'Brandon'; src: url(../assets/fonts/Brandon-Text-Regular.otf) format('opentype'); font-weight: 300 400; font-display: swap; }
@font-face { font-family: 'Brandon'; src: url(../assets/fonts/Brandon-Text-Medium.otf) format('opentype'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Brandon'; src: url(../assets/fonts/Brandon-Text-Bold.otf) format('opentype'); font-weight: 700; font-display: swap; }

:root {
  --black: #000;
  --white: #fff;
  --b20: #333;
  --b40: #666;
  --gray: #d9d9d9;
  --divider: #f5f5f5;
  --link: #3a52c0;
  --brand: 'Brandon', 'Brandon-Regular', system-ui, sans-serif;
  --gutter: clamp(16px, 5.5vw, 80px);
  --head-h: 121px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--head-h); }
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font: 400 16px/1.5 var(--brand);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; flex: none; }

/* ---------- shared bits ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 500; font-size: 16px; line-height: 1.2;
  padding: 14px 26px; border-radius: 999px; border: 1px solid currentColor;
  white-space: nowrap; transition: background-color .15s;
}
.btn--solid { background: #000; color: #fff; border-color: #000; }
.btn--solid:hover { background: #222; }
.btn--white { background: #fff; color: #000; border-color: #fff; }
.btn--white:hover { background: #f0f0f0; }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.8); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline:hover { background: var(--divider); }

.more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 16px; font-weight: 500;
  border-bottom: 1px solid #000; padding-bottom: 2px; align-self: flex-start;
}
.eyebrow { font: 500 12px/1 var(--brand); letter-spacing: .16em; text-transform: uppercase; color: var(--b40); }
.h2 { font-weight: 400; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.12; margin: 0; text-wrap: balance; }
.lede { font-size: clamp(16px, 1.3vw, 18px); line-height: 1.55; color: var(--b20); margin: 0; max-width: 56ch; }

/* ---------- home sections ---------- */
.hero {
  position: relative; color: #fff;
  min-height: 700px; display: flex; align-items: flex-end;
  padding: 0 var(--gutter) 86px;
  background: #333 url(../assets/images/home/hero-d.jpg) center 40% / cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.66), rgba(0,0,0,.12) 64%), linear-gradient(0deg, rgba(0,0,0,.32), transparent 45%);
}
.hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; max-width: 740px; }
.hero .eyebrow { color: #fff; opacity: .85; }
.hero h1 { font-weight: 400; margin: 0; line-height: 1.06; font-size: clamp(40px, 4.8vw, 68px); text-wrap: balance; }
.hero p { margin: 0; line-height: 1.55; opacity: .92; font-size: clamp(16px, 1.4vw, 20px); max-width: 52ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.facts { background: #000; color: #fff; padding: 64px var(--gutter); }
.facts-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; margin: 0; }
.fact { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; margin: 0; }
.fact dd { margin: 0; font-size: clamp(42px, 4vw, 58px); line-height: 1; font-variant-numeric: tabular-nums; }
.fact dt { font-size: clamp(14px, 1.2vw, 17px); opacity: .8; }

.sect { padding: 108px var(--gutter) 0; }
.sect-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.sect-title { display: flex; flex-direction: column; gap: 14px; }
.sect-tools { display: flex; gap: 18px; align-items: center; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 27px; }
.tile { display: flex; flex-direction: column; gap: 16px; }
.tile-img { aspect-ratio: 4 / 5; overflow: hidden; background: #ddd; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tile:hover .tile-img img { transform: scale(1.03); }
.tile h3 { margin: 0; font-weight: 500; font-size: clamp(20px, 1.7vw, 24px); }
.tile p { margin: 0; color: var(--b20); line-height: 1.5; font-size: clamp(15px, 1.2vw, 17px); }

.rail {
  display: flex; gap: 18px; overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter);
}
.rail::-webkit-scrollbar { display: none; }
.brand { flex: none; width: 306px; display: flex; flex-direction: column; gap: 16px; scroll-snap-align: start; }
.brand img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: #ddd; }
.brand-text { display: flex; flex-direction: column; gap: 8px; }
.brand b { font-weight: 500; font-size: 20px; }
.brand p {
  margin: 0; color: var(--b20); font-size: 16px; line-height: 24px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rail-arrows { display: flex; gap: 8px; }
.rail-arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gray); display: inline-flex; align-items: center; justify-content: center; }
.rail-arrows button:hover { border-color: #000; }
.rail-arrows button:disabled { opacity: .35; cursor: default; border-color: var(--gray); }

.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 27px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #ddd; }
.card-text { display: flex; flex-direction: column; gap: 10px; }
.card h3 { margin: 0; font-weight: 400; font-size: clamp(16px, 1.5vw, 21px); line-height: 1.35; text-wrap: balance; }
.card:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

.careers {
  display: grid; grid-template-columns: 1.15fr 1fr;
  margin: 108px var(--gutter); min-height: 495px; background: var(--divider);
}
.careers-img { background: url(../assets/images/home/team.jpg) center / cover no-repeat; min-height: 100%; }
.careers-text { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: clamp(30px, 4.4vw, 63px); }

/* ---------- responsive ---------- */

@media (max-width: 1099px) {
  :root { --head-h: 100px; }
}

@media (max-width: 989px) {
  .facts { padding: 40px 16px; }
  .facts-row { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .fact:last-child { grid-column: 1 / -1; }
  .careers { grid-template-columns: 1fr; margin: 60px 0 0; }
  .careers-img { aspect-ratio: 4 / 3; }
  .careers-text { padding: 30px 16px 40px; }
  .careers .h2 { font-size: 28px; }
}

@media (max-width: 749px) {
  .hero {
    min-height: 600px; padding: 0 16px 36px;
    background-image: url(../assets/images/home/hero-m.jpg); background-position: center;
  }
  .hero::after { background: linear-gradient(0deg, rgba(0,0,0,.72), rgba(0,0,0,.1) 70%); }
  .hero .btn { padding: 12px 20px; font-size: 14px; }

  .sect { padding: 60px 16px 0; }
  .sect-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
  .rail-arrows { display: none; }
  .more { font-size: 15px; }

  .tiles { grid-template-columns: 1fr; gap: 30px; }
  .tile-img { aspect-ratio: 4 / 3; }

  .rail { gap: 12px; margin-right: -16px; padding-right: 16px; }
  .brand { width: min(290px, 78vw); gap: 14px; }
  .brand b { font-size: 18px; }
  .brand p { font-size: 14px; line-height: 21px; }

  .news { grid-template-columns: 1fr; gap: 24px; }
  .card { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; }
  .card img { aspect-ratio: 1 / 1; }

}

@media (prefers-reduced-motion: reduce) {
  .btn, .tile-img img { transition: none; }
  .rail { scroll-behavior: auto; }
}

/* ---------- Arabic (ar/index.html: <html lang="ar" dir="rtl">) ---------- */
html[lang="ar"] { --brand: 'GE_SS_Light', 'Brandon', system-ui, sans-serif; }
html[lang="ar"] :is(.btn, .more, .tile h3, .brand b, .eyebrow) { font-family: 'GE_SS_Medium', 'Brandon', system-ui, sans-serif; }
html[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 14px; line-height: 1.3; }
html[lang="ar"] .hero h1 { line-height: 1.3; }
html[lang="ar"] .h2 { line-height: 1.35; }
/* the dark shade sits behind the text, which is on the right */
html[dir="rtl"] .hero::after { background: linear-gradient(270deg, rgba(0,0,0,.66), rgba(0,0,0,.12) 64%), linear-gradient(0deg, rgba(0,0,0,.32), transparent 45%); }
/* the brand row bleeds off the other edge */
html[dir="rtl"] .rail { margin-right: 0; padding-right: 0; margin-left: calc(var(--gutter) * -1); padding-left: var(--gutter); }
@media (max-width: 749px) {
  html[dir="rtl"] .rail { margin-right: 0; padding-right: 0; margin-left: -16px; padding-left: 16px; }
}
/* arrows point the other way */
html[dir="rtl"] .ico:has(use[href="#i-arr"]), html[dir="rtl"] .ico:has(use[href="#i-back"]), html[dir="rtl"] .ico:has(use[href="#i-ext"]) { transform: scaleX(-1); }
/* Latin numbers in the facts read left-to-right */
html[dir="rtl"] .fact dd { direction: ltr; text-align: right; }
/* "ch" widths are measured on the font's "0", which is much narrower in the Arabic font */
html[lang="ar"] .hero h1 { max-width: 640px; }
html[lang="ar"] .hero p { max-width: 560px; }
html[lang="ar"] .sect-title .h2 { max-width: 620px !important; }
html[lang="ar"] .lede { max-width: 560px; }
