/* ==========================================================================
   Merit Consultation — site stylesheet
   Palette: deep navy + gold. Type: Cormorant Garamond (display),
   Manrope (text), IBM Plex Sans Arabic (Arabic).
   ========================================================================== */

:root {
  --bg: #050c17;
  --navy: #0a1729;
  --navy-2: #0f2038;
  --navy-3: #16294a;
  --ivory: #f2ede2;
  --text: #d9d4c9;
  --muted: #8e9aad;
  --gold: #c8a35a;
  --gold-light: #ecd39b;
  --gold-deep: #9a7738;
  --gold-grad: linear-gradient(115deg, #f3dfaa 0%, #c8a35a 48%, #9a7738 100%);
  --hair: rgba(242, 237, 226, 0.09);
  --line: rgba(200, 163, 90, 0.28);
  --paper: #f2ede2;
  --ink: #0a1729;
  --ink-muted: #4c586b;

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 84px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html[lang="ar"] {
  --font-display: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-sans: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Fine film grain for depth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.nav-open { overflow: hidden; }

::selection { background: var(--gold); color: var(--ink); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; color: var(--muted); }

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

.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }

.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: fixed; top: 12px; inset-inline-start: 12px; z-index: 300;
  padding: 10px 16px; background: var(--gold); color: var(--ink); font-weight: 600;
  transform: translateY(-160%); transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

/* ---------- Type ---------- */
h1, h2, .display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--ivory);
  text-wrap: balance;
}
h1 { font-size: clamp(2.9rem, 6.6vw, 6.3rem); }
h2 { font-size: clamp(2.2rem, 4.3vw, 3.9rem); }
.h2-sm { font-size: clamp(1.9rem, 3vw, 2.7rem); }

h1 em, h2 em, .display em, .gold-text {
  font-style: italic;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-inline-end: 0.04em;
}

h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.16rem;
  line-height: 1.35;
  color: var(--ivory);
  letter-spacing: -0.005em;
}

.lead { font-size: clamp(1.04rem, 1.25vw, 1.2rem); line-height: 1.75; }

html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] .display {
  font-weight: 600; line-height: 1.3; letter-spacing: 0;
}
html[lang="ar"] h1 { font-size: clamp(2.3rem, 5.2vw, 4.8rem); }
html[lang="ar"] h2 { font-size: clamp(1.9rem, 3.6vw, 3.2rem); }
html[lang="ar"] .h2-sm { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
html[lang="ar"] h1 em, html[lang="ar"] h2 em, html[lang="ar"] .display em { font-style: normal; }
html[lang="ar"] body { line-height: 1.85; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.4;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; flex: none; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 0.86rem; }

/* ---------- Buttons & links ---------- */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 26px;
  border: 0;
  border-radius: 2px;
  background: var(--gold-grad);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
}
.button:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -14px rgba(200, 163, 90, 0.7); }
.button:hover::before { transform: translateX(120%); }

.button::after,
.link-arrow::after {
  content: "";
  width: 15px;
  height: 10px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 10'%3E%3Cpath d='M0 5h13M9 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 10'%3E%3Cpath d='M0 5h13M9 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.35s var(--ease);
}
.button:hover::after, .link-arrow:hover::after { transform: translateX(4px); }
[dir="rtl"] .button::after, [dir="rtl"] .link-arrow::after { transform: scaleX(-1); }
[dir="rtl"] .button:hover::after, [dir="rtl"] .link-arrow:hover::after { transform: scaleX(-1) translateX(4px); }
.button.no-arrow::after { display: none; }

.button-ghost {
  background: transparent;
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px rgba(242, 237, 226, 0.24);
}
.button-ghost::before { background: linear-gradient(110deg, transparent 30%, rgba(200, 163, 90, 0.18) 50%, transparent 70%); }
.button-ghost:hover { box-shadow: inset 0 0 0 1px var(--gold); }

.button-small { padding: 11px 18px; font-size: 0.84rem; }
.button-small::after { display: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold);
  transition: color 0.25s;
}
.link-arrow:hover { color: var(--gold-light); }

/* ---------- Header ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 2px;
  z-index: 120;
  background: var(--gold-grad);
  transform: scaleX(var(--scroll, 0));
  transform-origin: left;
  pointer-events: none;
}
[dir="rtl"] .progress-bar { transform-origin: right; }

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s;
}
.site-header.scrolled,
body.nav-open .site-header {
  background: rgba(5, 12, 23, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--hair);
}

.nav-wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ivory); flex: none; }
.brand .mark { width: 40px; height: 40px; }
.brand-word { display: grid; gap: 6px; }
.brand-word .wordmark { height: 16px; width: auto; }
.brand-sub {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.47em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
  white-space: nowrap;
}
html[lang="ar"] .brand-sub { letter-spacing: 0; font-size: 0.74rem; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ivory); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
}
.nav-links .mobile-only { display: none; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.language-toggle {
  padding: 9px 14px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.language-toggle:hover { border-color: var(--gold); color: var(--ivory); }
.language-toggle[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; }
.language-toggle[lang="en"] { font-family: "Manrope", sans-serif; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: var(--ivory);
  transition: transform 0.35s var(--ease), opacity 0.2s;
}
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 26px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Sections ---------- */
main { display: block; }

.section { position: relative; padding-block: clamp(90px, 11vw, 160px); }
.section-tight { padding-block: clamp(64px, 8vw, 110px); }
.section-alt { background: var(--navy); }
.section-border { border-top: 1px solid var(--hair); }

.section-head { display: grid; gap: 22px; max-width: 780px; margin-bottom: clamp(48px, 6vw, 84px); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head.wide {
  max-width: none;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: end;
  column-gap: clamp(40px, 6vw, 100px);
}
.section-head.wide .eyebrow { grid-column: 1 / -1; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}
.split.top { align-items: start; }
.stack { display: grid; gap: 24px; align-content: start; }
.stack-lg { display: grid; gap: 34px; align-content: start; }

/* Light "paper" section */
.section-paper { background: var(--paper); color: var(--ink); }
.section-paper h2, .section-paper h3 { color: var(--ink); }
.section-paper p { color: var(--ink-muted); }
.section-paper .eyebrow { color: var(--gold-deep); }
.section-paper h2 em {
  background: linear-gradient(115deg, #b98f40, #8a6526);
  -webkit-background-clip: text;
  background-clip: text;
}
.section-paper .button-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(10, 23, 41, 0.28); }
.section-paper .button-ghost:hover { box-shadow: inset 0 0 0 1px var(--gold-deep); }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + 60px);
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 72% 38%, rgba(22, 41, 74, 0.9) 0%, rgba(5, 12, 23, 0) 70%),
    var(--bg);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 12, 23, 0.92) 0%, rgba(5, 12, 23, 0.6) 42%, rgba(5, 12, 23, 0) 72%),
    linear-gradient(0deg, var(--bg) 0%, rgba(5, 12, 23, 0) 28%);
}
[dir="rtl"] .hero::after {
  background:
    linear-gradient(270deg, rgba(5, 12, 23, 0.92) 0%, rgba(5, 12, 23, 0.6) 42%, rgba(5, 12, 23, 0) 72%),
    linear-gradient(0deg, var(--bg) 0%, rgba(5, 12, 23, 0) 28%);
}
.hero > .container { position: relative; z-index: 2; }
.hero-content { max-width: 880px; display: grid; gap: 30px; padding-bottom: clamp(56px, 9vh, 104px); }
.hero-content .lead { max-width: 600px; color: #a9b3c2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }

.hero-content > * { animation: rise 1.2s var(--ease) both; }
.hero-content > *:nth-child(2) { animation-delay: 0.12s; }
.hero-content > *:nth-child(3) { animation-delay: 0.24s; }
.hero-content > *:nth-child(4) { animation-delay: 0.36s; }

.hero-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hair);
  animation: rise 1.2s var(--ease) 0.5s both;
}
.hero-rail > div { display: grid; gap: 6px; padding: 26px 32px 36px 0; align-content: start; }
.hero-rail > div + div { padding-inline-start: 32px; border-inline-start: 1px solid var(--hair); }
[dir="rtl"] .hero-rail > div { padding: 26px 0 36px 32px; }
[dir="rtl"] .hero-rail > div + div { padding-inline-start: 32px; }
.rail-num { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.15rem; color: var(--gold); line-height: 1; }
.rail-title { color: var(--ivory); font-weight: 600; font-size: 1rem; }
.rail-text { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 40px;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
}
[dir="rtl"] .scroll-cue { right: auto; left: var(--gutter); }
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 56px;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.2s var(--ease) infinite;
}

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(90px, 13vh, 150px)) 0 clamp(80px, 10vw, 130px);
  overflow: hidden;
  border-bottom: 1px solid var(--hair);
  background: radial-gradient(80% 90% at 85% 10%, rgba(22, 41, 74, 0.85), rgba(5, 12, 23, 0) 70%), var(--bg);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hair) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: radial-gradient(70% 90% at 78% 22%, #000 0%, transparent 72%);
  mask-image: radial-gradient(70% 90% at 78% 22%, #000 0%, transparent 72%);
}
.page-hero::after {
  content: "";
  position: absolute;
  top: -30%;
  inset-inline-end: -12%;
  width: min(62vw, 820px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(200, 163, 90, 0.2), transparent 62%);
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero-emblem {
  position: absolute;
  inset-inline-end: max(var(--gutter), calc((100% - var(--container)) / 2));
  top: 50%;
  width: clamp(220px, 30vw, 440px);
  aspect-ratio: 1;
  transform: translateY(-38%);
  opacity: 0.16;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3CclipPath id='c'%3E%3Crect width='64' height='57'/%3E%3C/clipPath%3E%3Cpolyline points='5.23,63 20,31 31,47 46,17 57.5,63' fill='none' stroke='%23C8A35A' stroke-width='.35' clip-path='url(%23c)'/%3E%3Cpolyline points='5.23,63 20,31 31,47 46,17 57.5,63' fill='none' stroke='%23C8A35A' stroke-width='.2' transform='translate(0 5)' clip-path='url(%23c)'/%3E%3C/svg%3E") center / contain no-repeat;
}
.page-hero .container { position: relative; z-index: 1; display: grid; gap: 26px; }
.page-hero h1 { font-size: clamp(2.6rem, 5.6vw, 5.2rem); max-width: 16ch; }
html[lang="ar"] .page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 4.2rem); }
.page-hero .lead { max-width: 640px; }
.page-hero .container > * { animation: rise 1.1s var(--ease) both; }
.page-hero .container > *:nth-child(2) { animation-delay: 0.1s; }
.page-hero .container > *:nth-child(3) { animation-delay: 0.2s; }

@keyframes drift { to { transform: translate(-6%, 8%) scale(1.08); } }

/* ---------- Marquee ---------- */
.marquee {
  direction: ltr;
  overflow: hidden;
  padding-block: 28px;
  border-block: 1px solid var(--hair);
  background: var(--bg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: 46px; padding-inline-end: 46px; }
.marquee-group span {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(1.4rem, 2.3vw, 2.05rem);
  color: rgba(242, 237, 226, 0.8);
  white-space: nowrap;
}
.marquee-group i { width: 7px; height: 7px; flex: none; background: var(--gold); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Spotlight hover ---------- */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(200, 163, 90, 0.12), transparent 60%);
  transition: opacity 0.4s;
  pointer-events: none;
}
.spot:hover::before { opacity: 1; }

/* ---------- Pillars (home) ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hair);
  border-inline-start: 1px solid var(--hair);
}
.pillar, .industry { position: relative; isolation: isolate; }
.pillar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 430px;
  padding: 38px 32px 34px;
  border-inline-end: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
}
.pillar::after {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline: 0;
  height: 2px;
  background: var(--gold-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
[dir="rtl"] .pillar::after { transform-origin: right; }
.pillar:hover::after { transform: scaleX(1); }
.pillar-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 36px; }
.pillar-icon { width: 46px; height: 46px; color: var(--gold); }
.pillar-num { font-family: "Cormorant Garamond", serif; font-style: italic; color: var(--muted); font-size: 1.05rem; }
.pillar h3 { font-size: 1.3rem; }
.pillar p { flex: 1; font-size: 0.95rem; }

/* ---------- Statement (scroll-lit words) ---------- */
.statement {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 4.1rem);
  line-height: 1.16;
  color: var(--ivory);
  letter-spacing: -0.01em;
  max-width: 1120px;
  margin: 0;
}
html[lang="ar"] .statement { font-weight: 600; line-height: 1.45; letter-spacing: 0; font-size: clamp(1.7rem, 3.6vw, 3.2rem); }
.statement .w { opacity: 0.14; transition: opacity 0.4s, color 0.4s; }
.statement .w.on { opacity: 1; }
.statement .w.hl.on { color: var(--gold-light); font-style: italic; }
html[lang="ar"] .statement .w.hl.on { font-style: normal; }
html:not(.js) .statement .w { opacity: 1; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(56px, 7vw, 90px);
  border-top: 1px solid var(--hair);
}
.principle { display: grid; gap: 10px; padding: 28px 28px 0 0; }
.principle + .principle { padding-inline-start: 28px; border-inline-start: 1px solid var(--hair); }
[dir="rtl"] .principle { padding: 28px 0 0 28px; }
[dir="rtl"] .principle + .principle { padding-inline-start: 28px; }
.principle strong { color: var(--ivory); font-weight: 600; font-size: 1.02rem; }
.principle small { font-family: "Cormorant Garamond", serif; font-style: italic; color: var(--gold); font-size: 1.05rem; }

/* ---------- Steps (method) ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); }
.steps::before, .steps::after {
  content: "";
  position: absolute;
  top: 22px;
  inset-inline: 0;
  height: 1px;
  background: var(--hair);
}
.steps::after {
  background: var(--gold-grad);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
  transition: transform 0.2s linear;
}
[dir="rtl"] .steps::after { transform-origin: right; }
.step { position: relative; display: grid; gap: 16px; align-content: start; padding-inline-end: 26px; }
.step-dot {
  position: relative;
  z-index: 1;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  transform: rotate(45deg) scale(0.86);
  transition: border-color 0.5s, box-shadow 0.5s, background 0.5s;
}
.section-alt .step-dot { background: var(--navy); }
.step-dot span {
  transform: rotate(-45deg);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold);
}
.step.active .step-dot {
  border-color: var(--gold);
  background: var(--navy-2);
  box-shadow: 0 0 0 7px rgba(200, 163, 90, 0.07), 0 0 36px rgba(200, 163, 90, 0.35);
}
.step p { font-size: 0.92rem; }

/* ---------- Gallery tiles ---------- */
.gallery { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 1px; background: var(--hair); }
.tile { position: relative; height: clamp(400px, 46vw, 620px); overflow: hidden; background: var(--navy); }
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(0.6);
  transform: scale(1.08);
  transition: transform 1.6s var(--ease), filter 1.2s var(--ease);
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 23, 41, 0.15) 0%, rgba(5, 12, 23, 0.94) 100%);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #c8a35a;
  mix-blend-mode: color;
  opacity: 0.3;
}
.tile:hover img { transform: scale(1.01); filter: grayscale(0.55) contrast(1.1) brightness(0.72); }
.tile-caption { position: absolute; inset-inline: clamp(22px, 3vw, 36px); bottom: clamp(24px, 3vw, 36px); z-index: 2; display: grid; gap: 10px; }
.tile-caption small { font-family: "Cormorant Garamond", serif; font-style: italic; color: var(--gold); font-size: 1.05rem; }
.tile-caption strong { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 2.4vw, 2.2rem); line-height: 1.1; color: var(--ivory); }
.tile-caption span { font-size: 0.92rem; color: #aab4c3; max-width: 340px; }
.tile-tall { height: clamp(460px, 52vw, 640px); }

/* ---------- Facts ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--hair); }
.fact { display: grid; gap: 14px; padding: clamp(32px, 4vw, 52px) clamp(20px, 2.6vw, 34px); align-content: start; }
.fact + .fact { border-inline-start: 1px solid var(--hair); }
.fact strong {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(3.2rem, 5.6vw, 5.4rem);
  line-height: 0.95;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[lang="ar"] .fact strong.word { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 4.2vw, 4rem); line-height: 1.2; }
.fact span { color: var(--muted); font-size: 0.94rem; max-width: 220px; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 12px 20px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.chip:hover { border-color: var(--gold); color: var(--ivory); background: rgba(200, 163, 90, 0.07); }

/* ---------- Check list ---------- */
.check-list { display: grid; gap: 14px; }
.check-list li { position: relative; padding-inline-start: 30px; color: var(--text); }
.section-paper .check-list li { color: var(--ink); }
.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}
.section-paper .check-list li::before { border-color: var(--gold-deep); background: rgba(154, 119, 56, 0.15); }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr auto;
  gap: 40px;
  align-items: end;
  padding: clamp(44px, 7vw, 100px);
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(200, 163, 90, 0.18), transparent 62%),
    linear-gradient(180deg, var(--navy-2), var(--navy));
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hair) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
  mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
  pointer-events: none;
}
[dir="rtl"] .cta { background: radial-gradient(70% 120% at 0% 0%, rgba(200, 163, 90, 0.18), transparent 62%), linear-gradient(180deg, var(--navy-2), var(--navy)); }
.cta > * { position: relative; }
.cta .stack { max-width: 680px; }

/* ---------- Services page ---------- */
.services-layout { display: grid; grid-template-columns: minmax(260px, 0.42fr) 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.services-aside { position: sticky; top: calc(var(--header-h) + 40px); display: grid; gap: 24px; }
.service-index { display: grid; margin-top: 12px; border-top: 1px solid var(--hair); }
.service-index a {
  display: flex;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.25s, padding 0.35s var(--ease);
}
.service-index a span:first-child { font-family: "Cormorant Garamond", serif; font-style: italic; color: var(--gold); min-width: 22px; }
.service-index a:hover, .service-index a.active { color: var(--ivory); padding-inline-start: 8px; }

.service-list { border-top: 1px solid var(--hair); }
.service-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 24px;
  padding: clamp(32px, 4vw, 46px) clamp(0px, 1.5vw, 20px);
  border-bottom: 1px solid var(--hair);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.service-num { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.5rem; color: var(--gold); line-height: 1.2; }
.service-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px clamp(28px, 4vw, 56px); }
.service-intro { display: grid; gap: 12px; align-content: start; }
.service-intro h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
.service-points { display: grid; gap: 12px; align-content: start; padding-top: 4px; }
.service-points li { position: relative; padding-inline-start: 24px; font-size: 0.94rem; color: var(--text); }
.service-points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 1px;
  top: 0.66em;
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

/* ---------- Industries ---------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--hair);
  border-inline-start: 1px solid var(--hair);
}
.industry {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 340px;
  padding: 32px 26px 40px;
  border-inline-end: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
}
.industry::after {
  content: attr(data-code);
  position: absolute;
  inset-inline-end: -4px;
  bottom: -22px;
  z-index: -1;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 7rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(200, 163, 90, 0.2);
  transition: transform 0.6s var(--ease), -webkit-text-stroke-color 0.6s;
  direction: ltr;
}
.industry:hover::after { transform: translateY(-8px); -webkit-text-stroke-color: rgba(200, 163, 90, 0.55); }
.industry .num { font-family: "Cormorant Garamond", serif; font-style: italic; color: var(--gold); font-size: 1.05rem; margin-bottom: 28px; }
.industry h3 { font-size: 1.12rem; }
.industry p { font-size: 0.9rem; }

/* ---------- Framework (cases) ---------- */
.framework { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.frame { display: grid; gap: 16px; align-content: start; padding: clamp(30px, 3.6vw, 48px); background: var(--bg); min-height: 300px; }
.frame-num { font-family: "Cormorant Garamond", serif; font-size: 4.2rem; line-height: 1; font-style: italic; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 18px; }
.frame h3 { font-size: 1.35rem; }

.library {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(32px, 4.5vw, 56px);
  border: 1px dashed var(--line);
  background: linear-gradient(180deg, rgba(15, 32, 56, 0.6), rgba(10, 23, 41, 0.3));
}
.library-icon { width: 64px; height: 64px; color: var(--gold); }

/* ---------- Panels (about) ---------- */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.panel { display: grid; gap: 20px; align-content: start; padding: clamp(36px, 5vw, 70px); background: var(--navy); }
.panel .display { font-size: clamp(2rem, 3.2vw, 2.9rem); }

.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.member { display: grid; gap: 10px; justify-items: start; padding: clamp(32px, 4vw, 48px); background: var(--bg); }
.monogram {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}
.monogram::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 0.8s var(--ease);
}
.member:hover .monogram::before { transform: rotate(225deg); }
.monogram span { position: relative; font-family: "Cormorant Garamond", serif; font-size: 1.9rem; color: var(--ivory); }
.member p { font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact-card { display: grid; gap: 26px; padding: clamp(30px, 4vw, 46px); border: 1px solid var(--hair); background: var(--navy); }
.contact-item { display: grid; gap: 6px; padding-top: 22px; border-top: 1px solid var(--hair); }
.contact-item small { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
html[lang="ar"] .contact-item small { letter-spacing: 0; font-size: 0.82rem; }
.contact-item a, .contact-item strong { color: var(--ivory); font-size: 1.08rem; font-weight: 500; overflow-wrap: anywhere; }
.contact-item a { transition: color 0.25s; }
.contact-item a:hover { color: var(--gold-light); }
.contact-item a[href^="tel"] { direction: ltr; unicode-bidi: isolate; }

.form-card { display: grid; gap: 34px; padding: clamp(28px, 4.5vw, 56px); border: 1px solid var(--line); background: linear-gradient(180deg, var(--navy-2), var(--navy)); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 9px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.8rem; font-weight: 600; color: var(--text); letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(242, 237, 226, 0.12);
  border-radius: 2px;
  background: rgba(5, 12, 23, 0.55);
  color: var(--ivory);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23C8A35A' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 12px 8px;
  background-position: right 18px center;
}
[dir="rtl"] .field select { background-position: left 18px center; }
.field select option { background: var(--navy); color: var(--ivory); }
.field input::placeholder, .field textarea::placeholder { color: #5f6b7e; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(5, 12, 23, 0.8);
  box-shadow: 0 0 0 4px rgba(200, 163, 90, 0.12);
}
.field textarea { min-height: 160px; resize: vertical; }
.form-note { font-size: 0.84rem; margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding: clamp(80px, 10vw, 130px) 0 34px;
  border-top: 1px solid var(--hair);
  background: var(--bg);
  overflow: hidden;
}
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px; }
.footer-brand { display: grid; gap: 24px; align-content: start; }
.footer-brand p { max-width: 340px; font-size: 0.94rem; }
.footer-title { margin-bottom: 20px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
html[lang="ar"] .footer-title { letter-spacing: 0; font-size: 0.86rem; }
.footer-links { display: grid; gap: 12px; }
.footer-links a { width: fit-content; font-size: 0.94rem; color: var(--muted); transition: color 0.25s; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--ivory); }
.footer-links a[href^="tel"] { direction: ltr; unicode-bidi: isolate; }
.footer-giant { margin-top: clamp(64px, 9vw, 120px); color: rgba(200, 163, 90, 0.11); direction: ltr; }
.footer-giant .wordmark { width: 100%; height: auto; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 26px;
  border-top: 1px solid var(--hair);
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Brand page ---------- */
.brand-board { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.brand-cell { display: grid; place-items: center; min-height: 340px; padding: 48px; background: var(--navy); }
.brand-cell.light { background: var(--paper); }
.brand-cell.deep { background: var(--bg); }
.brand-cell img { width: min(100%, 460px); }
.brand-cell .mark-lg { width: 150px; }
.brand-cell .fav { width: 96px; border-radius: 22px; }
.brand-cell figcaption { margin-top: 26px; font-size: 0.8rem; color: var(--muted); }
.brand-cell.light figcaption { color: var(--ink-muted); }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.swatch { display: grid; align-content: end; gap: 4px; min-height: 180px; padding: 20px; color: var(--ivory); font-size: 0.85rem; }
.swatch strong { font-weight: 600; }
.swatch.dark-text { color: var(--ink); }
.type-specimen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.type-specimen > div { display: grid; gap: 14px; align-content: start; padding: 36px; background: var(--navy); }
.type-specimen .big { font-size: 3.4rem; line-height: 1; color: var(--ivory); }

/* ---------- Reveal on scroll ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px var(--gutter) 40px;
    background: rgba(5, 12, 23, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  /* A backdrop-filter on the header would trap the fixed menu panel inside it */
  body.nav-open .site-header,
  body.nav-open .site-header.scrolled {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--bg);
  }
  .nav-links a {
    padding: 18px 0;
    border-bottom: 1px solid var(--hair);
    font-family: var(--font-display);
    font-size: 1.9rem;
    color: var(--ivory);
  }
  html[lang="ar"] .nav-links a { font-size: 1.4rem; }
  .nav-links a.active { color: var(--gold); }
  .nav-links a.active::after { display: none; }
  .nav-links .mobile-only { display: inline-flex; margin-top: 28px; padding: 16px 26px; border: 0; font-family: var(--font-sans); font-size: 0.95rem; color: var(--ink); }
  .menu-toggle { display: block; }
  .desktop-cta { display: none; }

  .section-head.wide { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillar { min-height: 360px; }
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-inline-start: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .services-layout { grid-template-columns: 1fr; }
  .services-aside { position: static; }
  .service-index { display: none; }

  .steps { grid-template-columns: 1fr; gap: 34px; }
  .steps::before, .steps::after { top: 0; bottom: 0; inset-inline-start: 22px; inset-inline-end: auto; width: 1px; height: auto; }
  .steps::after { transform: scaleY(var(--progress, 0)); transform-origin: top; }
  [dir="rtl"] .steps::after { transform-origin: top; }
  .step { grid-template-columns: 45px 1fr; column-gap: 28px; row-gap: 8px; padding-inline-end: 0; }
  .step-dot { grid-row: span 2; margin-bottom: 0; }

  .brand-board { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(3, 1fr); }
  .type-specimen { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 72px; }
  .brand .mark { width: 34px; height: 34px; }
  .brand-word .wordmark { height: 14px; }
  .language-toggle { padding: 8px 11px; }

  .hero-rail { grid-template-columns: 1fr; }
  .hero-rail > div, [dir="rtl"] .hero-rail > div { padding: 18px 0; }
  .hero-rail > div + div, [dir="rtl"] .hero-rail > div + div { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid var(--hair); }
  .rail-text { display: none; }
  .scroll-cue { display: none; }
  .hero-actions .button { flex: 1 1 100%; }

  .split, .contact-layout, .panels, .team, .framework, .principles { grid-template-columns: 1fr; }
  .principle + .principle, [dir="rtl"] .principle + .principle { padding-inline-start: 0; border-inline-start: 0; }
  .principle, [dir="rtl"] .principle { padding: 22px 0; border-bottom: 1px solid var(--hair); }
  .pillars, .industry-grid { grid-template-columns: 1fr; }
  .pillar { min-height: 0; }
  .pillar-top { margin-bottom: 12px; }
  .industry { min-height: 250px; }
  .gallery { grid-template-columns: 1fr; }
  .tile, .tile-tall { height: 360px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .cta { grid-template-columns: 1fr; align-items: start; }
  .cta .button { width: 100%; }
  .service-row { grid-template-columns: 1fr; gap: 10px; }
  .service-body { grid-template-columns: 1fr; }
  .library { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .brand-cell { min-height: 260px; padding: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
