/* ==========================================================================
   LETSPACT — components.css
   Reusable UI: header, nav, buttons, cards, marquee, forms, footer, etc.
   ========================================================================== */

/* ---------------------------------------------------------------- Header */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: var(--z-header);
  padding-block: 1.1rem;
  transition: background-color var(--dur) var(--ease),
    padding var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 26, 33, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  z-index: -1;
}
.site-header.is-scrolled {
  padding-block: 0.6rem;
  border-bottom-color: var(--line-on-dark);
}
.site-header.is-scrolled::before { opacity: 1; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.brand {
  display: inline-flex;
  align-items: center;
  z-index: 2;
}
.brand img {
  height: 30px;
  width: auto;
}
.site-header.is-scrolled .brand img { height: 26px; }

/* ---------------------------------------------------------------- Nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.75rem);
}
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.75rem);
}
.nav-link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  padding-block: 0.4rem;
  color: var(--text-on-dark);
  transition: color var(--dur-fast) var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: inline-start;
  transition: transform var(--dur) var(--ease);
}
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--coral); }

/* Language switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-on-dark);
  border-radius: 100px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}
.lang-switch:hover {
  border-color: var(--coral);
  color: var(--coral);
}

/* Menu toggle (mobile) */
.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  position: relative;
  z-index: 2;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: transform var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease);
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu panel */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--royal-green);
  padding: calc(var(--header-h) + 2rem) var(--gutter) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateY(-100%);
  transition: transform var(--dur-slow) var(--ease);
  visibility: hidden;
  overflow-y: auto;
}
.mobile-menu.is-open {
  transform: translateY(0);
  visibility: visible;
}
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-nav-list a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 9vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: var(--ls-tight);
  padding-block: 0.35rem;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  color: var(--white);
  opacity: 0;
  transform: translateY(20px);
}
[lang="ar"] .mobile-nav-list a {
  font-family: var(--font-ar);
  font-weight: 700;
}
.mobile-menu.is-open .mobile-nav-list a {
  animation: menuItemIn 0.6s var(--ease) forwards;
}
.mobile-nav-list a .idx {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--coral);
}
.mobile-menu-footer {
  border-top: 1px solid var(--line-on-dark);
  padding-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  justify-content: space-between;
  align-items: center;
  color: var(--text-on-dark-muted);
  font-size: 0.9rem;
}
.mobile-menu-footer a { color: var(--white); }

@keyframes menuItemIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------- Buttons */
.btn {
  --btn-bg: var(--coral);
  --btn-fg: var(--charcoal);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.75rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease),
    background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  will-change: transform;
}
.btn svg { width: 1.1em; height: 1.1em; transition: transform var(--dur) var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(4px); }
[dir="rtl"] .btn:hover svg { transform: translateX(-4px); }
[dir="rtl"] .btn svg { transform: scaleX(-1); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  border-color: var(--line-on-dark);
}
.btn--ghost:hover { --btn-bg: var(--white); --btn-fg: var(--charcoal); }
.surface-light .btn--ghost,
.surface-white .btn--ghost { --btn-fg: var(--charcoal); border-color: var(--line-on-light); }
.surface-light .btn--ghost:hover,
.surface-white .btn--ghost:hover { --btn-bg: var(--charcoal); --btn-fg: var(--white); }

.btn--dark { --btn-bg: var(--charcoal); --btn-fg: var(--white); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--coral);
  position: relative;
}
.link-arrow svg { width: 1em; transition: transform var(--dur) var(--ease); }
[dir="rtl"] .link-arrow svg { transform: scaleX(-1); }
.link-arrow:hover svg { transform: translateX(5px); }
[dir="rtl"] .link-arrow:hover svg { transform: translateX(-5px) scaleX(-1); }

/* ---------------------------------------------------------------- Page hero */
.page-hero {
  padding-top: calc(var(--header-h) + var(--space-2xl));
  padding-bottom: var(--space-2xl);
  position: relative;
  overflow: hidden;
}
.page-hero .breadcrumb {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-md);
}
[lang="ar"] .page-hero .breadcrumb { letter-spacing: normal; }

/* ---------------------------------------------------------------- Section label */
.section-head {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}
.section-head .lead { margin-top: 0.5rem; }
.section-num {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--coral);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

/* ---------------------------------------------------------------- Cards */
.card-grid {
  display: grid;
  gap: var(--space-md);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Capability list item */
.capability {
  border-top: 1px solid var(--line-on-dark);
  padding: var(--space-md) 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-md);
  align-items: baseline;
  transition: padding-inline var(--dur) var(--ease);
}
.surface-light .capability,
.surface-white .capability { border-top-color: var(--line-on-light); }
.capability:hover { padding-inline-start: var(--space-sm); }
.capability .num { color: var(--coral); font-weight: 700; font-size: 0.85rem; }
.capability h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h4); }
[lang="ar"] .capability h3 { font-family: var(--font-ar); font-weight: 700; }
.capability p { color: var(--text-on-dark-muted); max-width: 44ch; }
.surface-light .capability p { color: var(--text-on-light-muted); }

/* Industry list (editorial hover) */
.industry-list { border-top: 1px solid var(--line-on-light); }
.industry-row {
  border-bottom: 1px solid var(--line-on-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: clamp(1rem, 2.5vw, 1.9rem) 0;
  position: relative;
  overflow: hidden;
}
.industry-row .idx { font-size: 0.8rem; font-weight: 700; color: var(--coral); width: 2.5rem; flex: none; }
.industry-row h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 1rem + 2.4vw, 3rem);
  line-height: 1.05;
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
  flex: 1;
}
[lang="ar"] .industry-row h3 { font-family: var(--font-ar); font-weight: 700; }
.industry-row .tag {
  font-size: 0.85rem;
  color: var(--text-on-light-muted);
  text-align: end;
}
.industry-row:hover h3 { color: var(--burgundy); transform: translateX(12px); }
[dir="rtl"] .industry-row:hover h3 { transform: translateX(-12px); }

/* Project card */
.project-card {
  position: relative;
  overflow: hidden;
  background: var(--royal-green);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.project-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--royal-green), var(--charcoal));
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.project-card:hover .project-card__media img { transform: scale(1.06); }
.project-card__sector {
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  background: rgba(0, 26, 33, 0.75);
  color: var(--white);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  backdrop-filter: blur(6px);
}
[lang="ar"] .project-card__sector { letter-spacing: normal; text-transform: none; }
.project-card__body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.project-card__client { font-size: 0.85rem; color: var(--coral); font-weight: 700; }
.project-card__title { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h4); line-height: 1.1; }
[lang="ar"] .project-card__title { font-family: var(--font-ar); font-weight: 700; }
.project-card__role { color: var(--text-on-dark-muted); font-size: 0.95rem; }
.project-card__result {
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--line-on-dark);
  font-size: 0.9rem;
}
.project-card__result strong { color: var(--light-green); font-family: var(--font-display); font-size: 1.3rem; display: block; }
[lang="ar"] .project-card__result strong { font-family: var(--font-ar); }

/* Placeholder media (no client imagery yet) */
.media-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(226,153,134,0.15), rgba(176,201,171,0.1)),
    var(--royal-green);
}
.media-placeholder svg { width: 40%; max-width: 120px; opacity: 0.55; }
.media-placeholder .ph-label {
  position: absolute;
  bottom: 0.85rem;
  inset-inline: 0;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}
[lang="ar"] .media-placeholder .ph-label { letter-spacing: normal; text-transform: none; }

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-xl);
}
.filter-btn {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line-on-light);
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-on-light);
  transition: all var(--dur-fast) var(--ease);
}
.surface-dark .filter-btn { border-color: var(--line-on-dark); color: var(--white); }
.filter-btn:hover { border-color: var(--coral); }
.filter-btn.is-active { background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }
.surface-dark .filter-btn.is-active { background: var(--coral); color: var(--charcoal); border-color: var(--coral); }

.project-card.is-hidden { display: none; }

/* ---------------------------------------------------------------- Comparison (Why LETSPACT) */
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-md);
  align-items: center;
  border-top: 1px solid var(--line-on-dark);
  padding: var(--space-md) 0;
}
.surface-light .compare { border-top-color: var(--line-on-light); }
.compare .old {
  color: var(--text-on-dark-muted);
  text-decoration: line-through;
  text-decoration-color: var(--burgundy);
}
.surface-light .compare .old { color: var(--text-on-light-muted); }
.compare .arrow { color: var(--coral); font-size: 1.2rem; }
[dir="rtl"] .compare .arrow { transform: scaleX(-1); }
.compare .new {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h4);
  text-align: end;
}
[lang="ar"] .compare .new { font-family: var(--font-ar); font-weight: 700; }

/* ---------------------------------------------------------------- Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
}
.stat .stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  line-height: 1;
  color: var(--light-green);
  letter-spacing: var(--ls-tight);
}
[lang="ar"] .stat .stat-num { font-family: var(--font-ar); font-weight: 700; }
.stat .stat-label { margin-top: 0.6rem; color: var(--text-on-dark-muted); font-size: 0.95rem; }
.surface-light .stat .stat-num { color: var(--burgundy); }
.surface-light .stat .stat-label { color: var(--text-on-light-muted); }

/* ---------------------------------------------------------------- Quote */
.quote-block {
  position: relative;
  padding: var(--space-xl) 0;
}
.quote-block blockquote {
  font-family: var(--font-display);
  font-weight: 200;
  font-style: italic;
  font-size: clamp(1.6rem, 1rem + 3vw, 3.4rem);
  line-height: 1.2;
  letter-spacing: var(--ls-tight);
  max-width: 22ch;
}
[lang="ar"] .quote-block blockquote { font-family: var(--font-ar); font-style: normal; font-weight: 300; max-width: 30ch; }
.quote-block cite { display: block; margin-top: var(--space-md); font-style: normal; font-size: 0.95rem; color: var(--coral); font-family: var(--font-body); }
[lang="ar"] .quote-block cite { font-family: var(--font-ar); }

/* ---------------------------------------------------------------- Marquee */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line-on-dark);
  padding-block: var(--space-md);
  white-space: nowrap;
}
.surface-light .marquee, .surface-white .marquee { border-block-color: var(--line-on-light); }
.marquee__track {
  display: inline-flex;
  gap: var(--space-lg);
  align-items: center;
  animation: marquee 32s linear infinite;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.6rem);
  color: var(--text-on-dark-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-lg);
}
[lang="ar"] .marquee__track span { font-family: var(--font-ar); font-weight: 700; }
.marquee__track span::after {
  content: "";
  width: 10px; height: 10px;
  background: var(--coral);
  display: inline-block;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------------------------------------------------------------- Client logos */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line-on-light);
  border: 1px solid var(--line-on-light);
}
.logo-wall .logo-cell {
  background: var(--white);
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  padding: var(--space-md);
  color: var(--text-on-light-muted);
  font-weight: 700;
  text-align: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.logo-wall .logo-cell:hover { background: var(--charcoal); color: var(--white); }

/* ---------------------------------------------------------------- Forms */
.form {
  display: grid;
  gap: var(--space-md);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.field { display: grid; gap: 0.45rem; }
.field.span-2 { grid-column: 1 / -1; }
.field label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.field .req { color: var(--coral); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  background: transparent;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  color: var(--white);
  transition: border-color var(--dur-fast) var(--ease);
}
.surface-light .field input,
.surface-light .field select,
.surface-light .field textarea,
.surface-white .field input,
.surface-white .field select,
.surface-white .field textarea {
  border-color: var(--line-on-light);
  color: var(--charcoal);
}
.field select { appearance: none; cursor: pointer; }
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-on-light-muted); }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--coral); outline: none; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--burgundy); }
.field .error-msg {
  font-size: 0.8rem;
  color: var(--burgundy);
  min-height: 1em;
}
.surface-light .field .error-msg { color: var(--burgundy); }

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.9rem;
}
.checkbox-field input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--coral); }

.form-status {
  padding: var(--space-md);
  border-radius: var(--radius);
  border: 1px solid;
  display: none;
  align-items: center;
  gap: 0.8rem;
}
.form-status.is-visible { display: flex; }
.form-status.is-success { border-color: var(--light-green); background: rgba(176,201,171,0.12); color: var(--light-green); }
.form-status.is-error { border-color: var(--burgundy); background: rgba(115,31,37,0.12); color: var(--light-burgundy); }

.btn.is-loading { pointer-events: none; opacity: 0.75; }
.btn .spinner { display: none; width: 1.1em; height: 1.1em; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Contact info list */
.contact-list { display: grid; gap: var(--space-md); }
.contact-list a { display: block; }
.contact-list .contact-label { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); margin-bottom: 0.3rem; }
[lang="ar"] .contact-list .contact-label { letter-spacing: normal; text-transform: none; }
.contact-list .contact-value { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.2rem, 1rem + 1.2vw, 1.8rem); }
[lang="ar"] .contact-list .contact-value { font-family: var(--font-ar); font-weight: 700; direction: ltr; }

/* ---------------------------------------------------------------- Footer */
.site-footer {
  background: var(--charcoal);
  color: var(--text-on-dark);
  border-top: 1px solid var(--line-on-dark);
  padding-top: var(--space-2xl);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
}
.footer-brand img { height: 34px; margin-bottom: var(--space-md); }
.footer-brand p { color: var(--text-on-dark-muted); max-width: 34ch; }
.footer-col h4 { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); margin-bottom: var(--space-md); }
[lang="ar"] .footer-col h4 { letter-spacing: normal; text-transform: none; }
.footer-col ul { display: grid; gap: 0.7rem; }
.footer-col a { color: var(--text-on-dark-muted); transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--line-on-dark);
  padding-block: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-on-dark-muted);
}
.footer-bottom .footer-links { display: flex; gap: var(--space-md); flex-wrap: wrap; }

/* ---------------------------------------------------------------- Scroll progress */
.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 0%;
  background: var(--coral);
  z-index: var(--z-top);
  transition: width 0.1s linear;
}

/* ---------------------------------------------------------------- Divider */
.editorial-divider {
  height: 1px;
  background: var(--line-on-dark);
  position: relative;
  overflow: hidden;
}
.editorial-divider::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: -30%;
  width: 30%;
  background: var(--coral);
  animation: dividerSweep 4s var(--ease-in-out) infinite;
}
@keyframes dividerSweep {
  0% { inset-inline-start: -30%; }
  100% { inset-inline-start: 130%; }
}

/* ---------------------------------------------------------------- Logomark device */
.logomark-device {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
  z-index: 0;
}
.logomark-device svg,
.logomark-device img { width: 100%; height: 100%; }

/* ---------------------------------------------------------------- Home hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: var(--space-2xl);
  overflow: hidden;
  background: var(--charcoal);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,26,33,0.55) 0%, rgba(0,26,33,0.35) 40%, rgba(0,26,33,0.92) 100%);
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.hero__supergraphic {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(48vw, 620px);
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: screen;
  pointer-events: none;
}
[dir="rtl"] .hero__supergraphic { transform: scaleX(-1); }
.hero__inner { position: relative; z-index: 1; width: 100%; }
.hero__eyebrow { margin-bottom: var(--space-md); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  max-width: 16ch;
}
[lang="ar"] .hero__title { font-family: var(--font-ar); font-weight: 700; line-height: var(--lh-snug); max-width: 20ch; }
.hero__title em { font-weight: 200; font-style: italic; color: var(--coral); }
[lang="ar"] .hero__title em { font-weight: 300; font-style: normal; }
.hero__lead { margin-top: var(--space-md); max-width: 52ch; }
.hero__actions { margin-top: var(--space-lg); }
.hero__meta {
  margin-top: var(--space-2xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line-on-dark);
}
.hero__meta .stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem,1.2rem+2vw,2.8rem); color: var(--light-green); line-height: 1; }
[lang="ar"] .hero__meta .stat-num { font-family: var(--font-ar); font-weight: 700; }
.hero__meta .stat-label { color: var(--text-on-dark-muted); font-size: 0.85rem; margin-top: 0.3rem; }

.scroll-cue {
  position: absolute;
  inset-block-end: var(--space-md);
  inset-inline-end: var(--gutter);
  z-index: 1;
  writing-mode: vertical-rl;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
}
[lang="ar"] .scroll-cue { letter-spacing: normal; text-transform: none; }
.scroll-cue::after {
  content: "";
  width: 1px; height: 60px;
  background: linear-gradient(var(--coral), transparent);
}

/* ---------------------------------------------------------------- Big statement */
.statement {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(1.8rem, 1rem + 4vw, 4.5rem);
  line-height: 1.14;
  letter-spacing: var(--ls-tight);
  max-width: 20ch;
}
[lang="ar"] .statement { font-family: var(--font-ar); font-weight: 300; max-width: 26ch; }
.statement strong { font-weight: 800; color: var(--coral); }
[lang="ar"] .statement strong { font-weight: 700; }

/* ---------------------------------------------------------------- Split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}
.split--wide-left { grid-template-columns: 1.2fr 0.8fr; }
.split .media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--royal-green);
}
.split .media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- Journey (Approach) */
.journey { display: grid; gap: 0; }
.journey-step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line-on-dark);
  position: relative;
}
.journey-step:last-child { border-bottom: 1px solid var(--line-on-dark); }
.journey-step__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 1rem + 3vw, 3.5rem);
  color: var(--coral);
  line-height: 1;
}
.journey-step h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); margin-bottom: 0.5rem; }
[lang="ar"] .journey-step h3 { font-family: var(--font-ar); font-weight: 700; }
.journey-step p { color: var(--text-on-dark-muted); max-width: 60ch; }
.journey-step:hover .journey-step__num { color: var(--light-green); }

/* ---------------------------------------------------------------- Pillars */
.pillar {
  padding: var(--space-lg);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
  height: 100%;
}
.surface-light .pillar { border-color: var(--line-on-light); background: rgba(0,26,33,0.02); }
.pillar:hover { transform: translateY(-6px); border-color: var(--coral); }
.pillar .pillar-idx { font-size: 0.8rem; color: var(--coral); font-weight: 700; letter-spacing: 0.1em; }
.pillar h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h4); margin: var(--space-sm) 0; }
[lang="ar"] .pillar h3 { font-family: var(--font-ar); font-weight: 700; }
.pillar p { color: var(--text-on-dark-muted); font-size: 0.95rem; }
.surface-light .pillar p { color: var(--text-on-light-muted); }

/* ---------------------------------------------------------------- Ecosystem */
.ecosystem {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
}
.ecosystem__core {
  width: clamp(140px, 22vw, 220px);
  height: clamp(140px, 22vw, 220px);
  border-radius: 50%;
  background: var(--coral);
  color: var(--charcoal);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  z-index: 2;
  position: relative;
}
[lang="ar"] .ecosystem__core { font-family: var(--font-ar); font-weight: 700; }
.ecosystem__ring {
  position: absolute;
  border: 1px dashed var(--line-on-dark);
  border-radius: 50%;
}
.ecosystem__ring.r1 { width: min(80vw, 640px); height: min(80vw, 640px); animation: spin 90s linear infinite; }
.ecosystem__ring.r2 { width: min(58vw, 440px); height: min(58vw, 440px); animation: spin 60s linear infinite reverse; }
.ecosystem__nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  max-width: 760px;
  margin-top: var(--space-xl);
}
.ecosystem-node {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line-on-dark);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--dur-fast) var(--ease);
  background: rgba(255,255,255,0.02);
}
.ecosystem-node:hover { background: var(--coral); color: var(--charcoal); border-color: var(--coral); transform: translateY(-3px); }

/* Fallback grid layout for ecosystem tokens (used as the main mobile-first display) */
.ecosystem-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

/* ---------------------------------------------------------------- Lifecycle */
.lifecycle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
.lifecycle-col {
  border-top: 3px solid var(--coral);
  padding-top: var(--space-md);
}
.lifecycle-col:nth-child(2) { border-top-color: var(--light-green); }
.lifecycle-col:nth-child(3) { border-top-color: var(--light-burgundy); }
.lifecycle-col h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); margin-bottom: var(--space-md); }
[lang="ar"] .lifecycle-col h3 { font-family: var(--font-ar); font-weight: 700; }
.lifecycle-col ul { display: grid; gap: 0.55rem; }
.lifecycle-col li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-on-dark);
  color: var(--text-on-dark-muted);
  font-size: 0.95rem;
}
.surface-light .lifecycle-col li { border-bottom-color: var(--line-on-light); color: var(--text-on-light-muted); }

/* ---------------------------------------------------------------- Values */
.value-row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line-on-dark);
  align-items: baseline;
}
.surface-light .value-row { border-top-color: var(--line-on-light); }
.value-row h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 1rem + 2.5vw, 3rem);
}
[lang="ar"] .value-row h3 { font-family: var(--font-ar); font-weight: 700; }
.value-row .value-num { color: var(--coral); font-size: 0.85rem; font-weight: 700; }
.value-row p { color: var(--text-on-dark-muted); }
.surface-light .value-row p { color: var(--text-on-light-muted); }

/* ---------------------------------------------------------------- Feature grid (Why) */
.feature {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line-on-dark);
}
.surface-light .feature { border-top-color: var(--line-on-light); }
.feature .feature-idx { color: var(--coral); font-weight: 700; font-size: 0.85rem; }
.feature h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h4); margin: 0.6rem 0; }
[lang="ar"] .feature h3 { font-family: var(--font-ar); font-weight: 700; }
.feature p { color: var(--text-on-dark-muted); font-size: 0.95rem; }
.surface-light .feature p { color: var(--text-on-light-muted); }

/* ---------------------------------------------------------------- CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { max-width: 18ch; margin-inline: auto; }
.cta-band .lead { margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }

/* ---------------------------------------------------------------- Featured project (Eshha) */
.featured-project {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  background: var(--royal-green);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--line-on-dark);
  margin-bottom: var(--space-2xl);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  will-change: transform;
}
.featured-project:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
  border-color: var(--coral);
}
.featured-project:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
}
.featured-project__media {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: linear-gradient(135deg, var(--royal-green), var(--charcoal));
}
.featured-project__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.featured-project:hover .featured-project__media img { transform: scale(1.07); }
.featured-project__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 55%, rgba(0, 57, 40, 0.35));
  pointer-events: none;
}
.featured-project__badge {
  position: absolute;
  inset-block-start: 1.1rem;
  inset-inline-start: 1.1rem;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  border-radius: 100px;
  background: var(--coral);
  color: var(--charcoal);
}
.featured-project__body {
  padding: clamp(1.75rem, 1rem + 2.5vw, 3.25rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  justify-content: center;
}
.featured-project__sector {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--light-green);
}
.featured-project__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h3);
  line-height: 1.05;
}
.featured-project__title .dash { color: var(--coral); }
.featured-project__location {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-on-dark-muted);
  font-size: 0.9rem;
}
.featured-project__location svg { width: 16px; height: 16px; color: var(--coral); flex: none; }
.featured-project__desc {
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-body);
  max-width: 46ch;
}

/* Editorial metrics */
.featured-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-block: var(--space-sm) var(--space-xs);
  padding-block-start: var(--space-md);
  border-top: 1px solid var(--line-on-dark);
}
.featured-metric__num {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3.1rem);
  line-height: 0.95;
  color: var(--white);
  letter-spacing: var(--ls-tight);
}
.featured-metric__num .unit {
  font-size: 0.42em;
  font-weight: 700;
  color: var(--light-green);
  letter-spacing: 0;
}
.featured-metric__label {
  display: block;
  margin-block-start: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  line-height: 1.3;
}
.featured-project__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-block-start: var(--space-xs);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--coral);
}
.featured-project__cta svg {
  width: 20px;
  height: 20px;
  transition: transform var(--dur) var(--ease);
}
.featured-project:hover .featured-project__cta svg { transform: translateX(8px); }
[dir="rtl"] .featured-project__cta svg { transform: scaleX(-1); }
[dir="rtl"] .featured-project:hover .featured-project__cta svg { transform: scaleX(-1) translateX(8px); }

.subsection-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h4);
  margin-bottom: var(--space-md);
  color: var(--text-on-dark-muted);
}

@media (max-width: 860px) {
  .featured-project { grid-template-columns: 1fr; }
  .featured-project__media { min-height: 260px; aspect-ratio: 16 / 10; }
}
@media (max-width: 480px) {
  .featured-metrics { gap: var(--space-sm); }
  .featured-metric__num { font-size: clamp(1.5rem, 4vw + 1rem, 2.2rem); }
  .featured-metric__label { font-size: 0.62rem; }
}

/* ---------------------------------------------------------------- Project detail page */
.project-hero {
  position: relative;
  min-height: clamp(460px, 78vh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-block: calc(var(--header-h) + var(--space-lg)) var(--space-2xl);
  color: var(--white);
}
.project-hero__media { position: absolute; inset: 0; }
.project-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.project-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 26, 33, 0.92) 8%, rgba(0, 26, 33, 0.45) 45%, rgba(0, 26, 33, 0.25));
}
.project-hero__inner { position: relative; z-index: 1; }
.project-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h1);
  line-height: 1.02;
  letter-spacing: var(--ls-tight);
  margin-block: var(--space-xs) var(--space-sm);
  max-width: 20ch;
}
.project-hero__title .dash { color: var(--coral); }
.project-hero__location {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
}
.project-hero__location svg { width: 18px; height: 18px; color: var(--coral); flex: none; }

.breadcrumb {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-sm);
}
.breadcrumb a { color: var(--coral); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.project-metrics-band { padding-block: var(--space-xl); }
.featured-metrics--page {
  grid-template-columns: repeat(4, 1fr);
  border-top: none;
  padding-block-start: 0;
  margin: 0;
}
@media (max-width: 780px) {
  .featured-metrics--page { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg) var(--space-md); }
}

.section-tight { padding-block: var(--space-lg); }
.project-figure { margin: 0; overflow: hidden; border-radius: var(--radius-lg); }
.project-figure img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
