/* ADAT Consulting Center — brand tokens taken from the current logo and the 2026 profile imagery */
:root {
  --ink: #1C1C1D;          /* logo charcoal */
  --ink-2: #2A2A2C;
  --ink-3: #3A3A3D;
  --night: #0B1220;        /* deep blue of the profile photography */
  --blue: #49ACE0;         /* logo dot */
  --blue-deep: #1F86BD;    /* accessible blue for text on white */
  --blue-soft: #E8F4FB;
  --paper: #FFFFFF;
  --mist: #F4F5F7;
  --line: #E3E5E8;
  --muted: #5F6368;
  --muted-on-ink: #A9ABB0;
  --radius: 20px;
  --radius-lg: 30px;
  --shadow: 0 1px 2px rgba(28,28,29,.05), 0 10px 30px rgba(28,28,29,.07);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --font-ar: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-en: "Montserrat", system-ui, sans-serif;
  /* Critically damped "spring" for UI (no overshoot) and a softer settle for large surfaces */
  --ease-spring: cubic-bezier(.25, 1, .5, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ar);
  font-size: 1.0625rem;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="en"] body { font-family: var(--font-en); font-size: 1rem; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }
html[lang="en"] h1, html[lang="en"] h2 { letter-spacing: -.02em; line-height: 1.12; }
html[lang="en"] h3 { letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Bilingual content: both languages live in the HTML, the inactive one is hidden */
html[lang="ar"] body [lang="en"]:not(.keep),
html[lang="en"] body [lang="ar"]:not(.keep) { display: none !important; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(80px, 11vw, 140px); }
.section--mist { background: var(--mist); }
.section--ink { background: var(--ink); color: #fff; }
.section--chapter { padding-top: 0; }

/* Arabic is a joined script: never letter-space it. Tracking is applied to Latin only. */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .85rem; font-weight: 600; color: var(--blue-deep);
}
html[lang="en"] .eyebrow { font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.section--ink .eyebrow { color: var(--blue); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3rem); margin-top: 14px; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.08rem; }
.section--ink .section-head p { color: var(--muted-on-ink); }
.subhead { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin: clamp(56px, 8vw, 96px) 0 24px; }
.dot { color: var(--blue); }

/* Buttons — feedback on press, not on release */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background-color .25s var(--ease-out), color .25s, border-color .25s, transform .35s var(--ease-spring);
}
.btn:active { transform: scale(.97); transition-duration: .1s; }
.btn--primary { background: var(--blue); color: var(--ink); }
.btn--primary:hover { background: #6BBDE8; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-3); }
.btn--ghost { border-color: rgba(255,255,255,.3); color: #fff; background: rgba(255,255,255,.06); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.12); }
.btn svg { width: 18px; height: 18px; flex: none; }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* Header — dark translucent material; content scrolls underneath */
.header {
  position: fixed; inset: 0 0 auto; z-index: 60; color: #fff;
  background: rgba(16,18,24,.55);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.header.is-scrolled { background: rgba(20,21,26,.78); box-shadow: 0 8px 24px -12px rgba(0,0,0,.45); }
.header__bar { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.header__logo img { height: 30px; width: auto; filter: invert(1) hue-rotate(180deg) brightness(1.15); }
.nav { display: flex; gap: 2px; margin-inline-start: auto; }
.nav a {
  padding: 7px 13px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: .92rem; color: rgba(255,255,255,.78);
  transition: background-color .25s, color .25s;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a.is-active { color: #fff; background: rgba(255,255,255,.14); }
.header__actions { display: flex; align-items: center; gap: 10px; }
.lang-btn, .menu-btn {
  height: 40px; min-width: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06); color: #fff; font-weight: 600; font-size: .88rem; cursor: pointer;
  transition: border-color .25s, background-color .25s, transform .35s var(--ease-spring);
}
.lang-btn:hover, .menu-btn:hover { border-color: rgba(255,255,255,.5); }
.lang-btn:active, .menu-btn:active { transform: scale(.94); transition-duration: .1s; }
.lang-btn [lang="ar"] { font-family: var(--font-en); }
.lang-btn [lang="en"] { font-family: var(--font-ar); }
.header .btn { min-height: 40px; padding: 0 18px; font-size: .9rem; }
.menu-btn { display: none; padding: 0; width: 40px; }
.menu-btn span { display: block; width: 16px; height: 1.5px; background: #fff; margin: 4px auto; border-radius: 2px; transition: transform .45s var(--ease-spring), opacity .2s; }
.header.menu-open .menu-btn span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.header.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.header.menu-open .menu-btn span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(5,8,14,.4); opacity: 0; transition: opacity .35s var(--ease-out); }
.scrim.is-on { opacity: 1; }

/* Glass material for floating panels over imagery */
.glass {
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,.12);
  border-top-color: rgba(255,255,255,.24); /* light catching the top edge */
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}

/* Hero — the profile's cover photograph, full bleed */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--night);
  min-height: min(100svh, 1000px); display: flex; flex-direction: column; justify-content: space-between;
  padding-top: var(--header-h);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 70%; animation: settle 2.2s var(--ease-out) both; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8,12,22,.75) 0%, rgba(8,12,22,.25) 38%, rgba(8,12,22,.15) 55%, rgba(8,12,22,.85) 100%);
}
@keyframes settle { from { transform: scale(1.08); } to { transform: none; } }
.hero__inner { padding-block: clamp(56px, 10vh, 120px) 40px; }
.hero__copy { max-width: 760px; animation: materialize 1.1s .15s var(--ease-out) both; }
@keyframes materialize { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(8px); } }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); line-height: 1.22; margin-top: 22px; }
html[lang="en"] .hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: 1.04; letter-spacing: -.03em; }
.hero .eyebrow { color: #9FD6F2; }
.hero__lead { margin-top: 22px; max-width: 580px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #DCE3EC; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--radius-lg); margin-bottom: clamp(24px, 5vh, 48px);
  animation: materialize 1.1s .45s var(--ease-out) both;
}
.stat { padding: 26px 26px 28px; }
.stat + .stat { border-inline-start: 1px solid rgba(255,255,255,.12); }
.stat__num { font-family: var(--font-en); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.stat__label { color: #C8D0DA; font-size: .9rem; margin-top: 8px; line-height: 1.6; }
.stat__num small, .cap__num small { font-size: .5em; font-weight: 500; opacity: .75; letter-spacing: 0; font-family: var(--font-ar); }
html[lang="en"] .stat__num small, html[lang="en"] .cap__num small { font-family: var(--font-en); }

/* Chapter scenes — the profile's divider photography */
.scene {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--night);
  min-height: clamp(440px, 78vh, 780px); display: flex; align-items: flex-end;
  margin-bottom: clamp(64px, 9vw, 112px);
}
.scene picture { position: absolute; inset: 0; z-index: -2; }
.scene img { width: 100%; height: 100%; object-fit: cover; }
.scene::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, rgba(6,10,18,.88) 0%, rgba(6,10,18,.35) 45%, rgba(6,10,18,.05) 75%),
    linear-gradient(270deg, rgba(6,10,18,.55) 0%, rgba(6,10,18,0) 55%);
}
.scene__text { padding-block: clamp(40px, 8vh, 80px); }
.scene__text > * { max-width: 600px; margin-left: auto; } /* physical right: the dark side of every divider photo */
.scene__num { display: block; font-family: var(--font-en); font-size: clamp(4rem, 11vw, 8.5rem); font-weight: 600; line-height: .9; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.55); }
.scene__title { font-size: clamp(2.2rem, 5.4vw, 4rem); font-weight: 700; line-height: 1.15; margin-top: 10px; }
html[lang="en"] .scene__title { letter-spacing: -.025em; line-height: 1.05; }
.scene__lead { margin-top: 14px; font-size: clamp(1rem, 1.6vw, 1.18rem); color: #D3DAE3; }
@supports (animation-timeline: view()) {
  .scene img, .cta-scene img { animation: scene-zoom linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes scene-zoom { from { transform: scale(1.14); } to { transform: scale(1); } }
}

/* Clients strip */
.clients { padding-block: 44px; border-bottom: 1px solid var(--line); }
.clients__title { text-align: center; color: var(--muted); font-size: .92rem; font-weight: 500; margin-bottom: 26px; }
.clients__track { display: flex; gap: 18px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.clients__row { display: flex; gap: 18px; flex: none; animation: marquee 50s linear infinite; }
html[dir="rtl"] .clients__row { animation-name: marquee-rtl; }
.clients__track:hover .clients__row { animation-play-state: paused; }
.clients__row img { width: 150px; height: 84px; object-fit: cover; filter: grayscale(1); opacity: .65; transition: filter .4s, opacity .4s; }
.clients__row img:hover { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(calc(-100% - 18px)); } }
@keyframes marquee-rtl { to { transform: translateX(calc(100% + 18px)); } }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about__text p { color: var(--ink-3); font-size: 1.12rem; }
.vm { display: grid; gap: 18px; }
.vm__card { padding: 32px; border-radius: var(--radius-lg); background: var(--mist); }
.vm__card--ink { background: var(--ink); color: #fff; }
.vm__card h3 { font-size: 1rem; display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.vm__card--ink h3 { color: var(--muted-on-ink); }
.vm__card .vm__lead { margin-top: 14px; color: inherit; font-weight: 700; font-size: 1.3rem; line-height: 1.5; }
.vm__card p { margin-top: 12px; color: var(--muted); }
.vm__card--ink p { color: #C9CACD; }
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.value, .cap, .tool, .stage, .member, .offering {
  transition: border-color .3s, transform .5s var(--ease-spring), box-shadow .5s var(--ease-spring);
}
.value { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.value:hover, .cap:hover { border-color: rgba(73,172,224,.6); transform: translateY(-4px); box-shadow: var(--shadow); }
.value__icon { width: 44px; height: 44px; color: var(--ink); }
.value h3 { font-size: 1.1rem; margin-top: 18px; }
.value p { margin-top: 10px; color: var(--muted); font-size: .96rem; }

/* Services — segmented control with a sliding thumb */
.tabs {
  position: relative; display: inline-flex; max-width: 100%; gap: 2px; padding: 5px; margin-bottom: 28px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__thumb {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: var(--ink);
  box-shadow: 0 4px 14px -4px rgba(0,0,0,.35);
  transition: transform .55s var(--ease-spring), width .55s var(--ease-spring);
}
.tab {
  position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 20px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-3);
  font-weight: 600; font-size: .95rem; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: color .35s var(--ease-out), transform .35s var(--ease-spring);
}
.tab:hover { color: var(--ink); }
.tab:active { transform: scale(.96); transition-duration: .1s; }
.tab[aria-selected="true"] { color: #fff; }
.tabs:not(.is-ready) .tab[aria-selected="true"] { background: var(--ink); }
.tab__num { font-family: var(--font-en); font-size: .76rem; opacity: .55; }
.panel { display: grid; grid-template-columns: .95fr 1.05fr; gap: 24px; animation: materialize .5s var(--ease-out); }
.panel[hidden] { display: none; }
.panel__intro { padding: clamp(28px, 4vw, 44px); border-radius: var(--radius-lg); background: var(--ink); color: #fff; display: flex; flex-direction: column; }
.panel__intro h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.panel__intro > p { margin-top: 14px; color: #D2D3D6; font-size: 1.05rem; }
.ideal { margin-top: 22px; padding: 22px; border-radius: var(--radius); background: var(--ink-2); }
.ideal + .ideal { margin-top: 12px; }
.ideal h4 { font-size: .85rem; color: var(--blue); }
html[lang="en"] .ideal h4 { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.ideal p { margin-top: 8px; color: #C9CACD; font-size: .95rem; }
.panel__intro .btn { margin-top: 28px; align-self: flex-start; }
.offerings { display: grid; gap: 12px; align-content: start; }
.offering { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.offering:hover { border-color: rgba(73,172,224,.6); }
.offering__code { font-family: var(--font-en); font-weight: 700; font-size: .78rem; color: var(--blue-deep); background: var(--blue-soft); border-radius: 10px; padding: 6px 10px; height: fit-content; min-width: 40px; text-align: center; }
.offering h4 { font-size: 1.06rem; }
.offering p { margin-top: 6px; color: var(--muted); font-size: .95rem; }

/* Capabilities */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cap { padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.cap__num { font-family: var(--font-en); font-size: 2.1rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.cap h3 { font-size: 1.06rem; margin-top: 12px; }
.cap p { margin-top: 8px; color: var(--muted); font-size: .93rem; }

.network { margin-top: clamp(56px, 8vw, 96px); display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 4vw, 48px); padding: clamp(28px, 4vw, 52px); border-radius: var(--radius-lg); background: var(--ink); color: #fff; }
.network .eyebrow { color: var(--blue); }
.network h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 12px; }
.network__big { margin-top: 26px; }
.network__big strong { font-family: var(--font-en); font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.network__big p { color: #C9CACD; margin-top: 8px; max-width: 380px; }
.network__data h4 { font-size: .85rem; font-weight: 600; color: var(--muted-on-ink); margin-bottom: 14px; }
.network__data h4:not(:first-child) { margin-top: 32px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 120px 1fr 52px; align-items: center; gap: 12px; font-size: .93rem; }
.bars i { height: 10px; border-radius: 99px; background: var(--ink-3); display: flex; overflow: hidden; }
.bars i::after { content: ""; width: calc(var(--v) / 3425 * 100%); border-radius: 99px; background: var(--blue); transform-origin: var(--origin, right); transform: scaleX(0); }
html[dir="ltr"] .bars i::after { --origin: left; }
.network.is-in .bars i::after { animation: bar-grow 1.2s var(--ease-spring) .3s both; }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: none; } }
.bars li:nth-child(2) i::after { animation-delay: .36s; } .bars li:nth-child(3) i::after { animation-delay: .42s; }
.bars li:nth-child(4) i::after { animation-delay: .48s; } .bars li:nth-child(5) i::after { animation-delay: .54s; }
.bars li:nth-child(6) i::after { animation-delay: .6s; }  .bars li:nth-child(7) i::after { animation-delay: .66s; }
.bars b { font-family: var(--font-en); font-weight: 600; text-align: end; }
.edu { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; }
.edu i { flex: var(--p) 0 0; }
.edu i:nth-child(1), .edu__legend li:nth-child(1)::before { background: var(--blue); }
.edu i:nth-child(2), .edu__legend li:nth-child(2)::before { background: #9AA4AE; }
.edu i:nth-child(3), .edu__legend li:nth-child(3)::before { background: #F0F0F0; }
.edu__legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; color: #C9CACD; }
.edu__legend li { display: flex; align-items: center; gap: 8px; }
.edu__legend li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.edu__legend b { color: #fff; font-family: var(--font-en); }

/* Approach */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: none; }
.stage { padding: 30px 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.stage:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stage__num { font-family: var(--font-en); font-weight: 700; font-size: .85rem; color: var(--blue-deep); background: var(--blue-soft); border-radius: 10px; padding: 6px 10px; }
.stage h3 { font-size: 1.18rem; margin-top: 18px; }
.stage ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.stage li { font-size: .92rem; color: var(--muted); }
.stage li b { color: var(--ink); font-weight: 600; }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool { padding: 30px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.tool h4 { font-size: 1.06rem; }
.tool ul { margin: 14px 0 0; padding-inline-start: 18px; display: grid; gap: 8px; color: var(--muted); font-size: .93rem; }
.tool li::marker { color: var(--blue); }
.tool__tags { margin-top: auto; padding-top: 18px; font-family: var(--font-en); font-size: .82rem; font-weight: 600; color: var(--blue-deep); }

/* Team */
.team__group { font-size: 1.1rem; margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.team__group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.team__group:not(:first-of-type) { margin-top: 56px; }
.team { display: grid; gap: 18px; }
.team--3 { grid-template-columns: repeat(3, 1fr); }
.team--4 { grid-template-columns: repeat(4, 1fr); }
.member { border-radius: var(--radius); background: #fff; border: 1px solid var(--line); overflow: hidden; padding-bottom: 24px; }
.member:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.member__photo { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: top; background: #DCE3E8; transition: transform .9s var(--ease-spring); }
.member:hover .member__photo { transform: scale(1.03); }
.member__role, .member h3, .member p { padding-inline: 22px; }
.member__role { font-size: .82rem; font-weight: 600; color: var(--blue-deep); margin-top: 18px; position: relative; }
.member h3 { font-size: 1.12rem; margin-top: 4px; }
.member p { margin-top: 10px; color: var(--muted); font-size: .93rem; }

/* Track record — horizontal rail with native momentum and snap points */
.projects {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 380px); gap: 18px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding: 4px 2px 8px; margin: -4px -2px 0;
}
.projects::-webkit-scrollbar { display: none; }
.projects:focus-visible { outline-offset: 6px; }
.project {
  scroll-snap-align: start; display: flex; flex-direction: column; padding: 26px; border-radius: var(--radius);
  background: var(--ink-2); border: 1px solid var(--ink-3);
  transition: border-color .3s, transform .5s var(--ease-spring);
}
.project:hover { border-color: rgba(73,172,224,.7); transform: translateY(-4px); }
.project__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project__year { font-family: var(--font-en); font-weight: 600; font-size: .9rem; color: var(--blue); border: 1px solid var(--ink-3); border-radius: 99px; padding: 4px 12px; }
.project__logo { width: 128px; height: 72px; border-radius: 14px; background: #fff; overflow: hidden; }
.project__logo img { width: 100%; height: 100%; object-fit: cover; }
.project h3 { font-size: 1.1rem; margin-top: 20px; }
.project h4 { font-size: .95rem; font-weight: 500; color: #E4E5E7; margin-top: 6px; }
.project p { margin-top: 10px; color: #B9BBC0; font-size: .95rem; }
.project__tag { margin-top: auto; padding-top: 18px; font-size: .8rem; font-weight: 600; color: var(--blue); }
.rail__nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.rail__btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.04);
  color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: border-color .25s, background-color .25s, opacity .25s, transform .35s var(--ease-spring);
}
.rail__btn:hover { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.1); }
.rail__btn:active { transform: scale(.92); transition-duration: .1s; }
.rail__btn:disabled { opacity: .3; cursor: default; transform: none; }
.rail__btn svg { width: 20px; height: 20px; }
.rail__btn .arrow--back { transform: scaleX(-1); }
html[dir="rtl"] .rail__btn .arrow { transform: scaleX(-1); }
html[dir="rtl"] .rail__btn .arrow--back { transform: none; }

/* Closing scene — Kingdom Tower at night */
.cta-scene { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--night); min-height: clamp(540px, 92vh, 880px); text-align: center; }
.cta-scene picture { position: absolute; inset: 0; z-index: -2; }
.cta-scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 85%; }
.cta-scene::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6,10,18,.55) 0%, rgba(6,10,18,0) 45%); }
.cta-scene__text { padding-top: clamp(96px, 16vh, 180px); }
.cta-scene h2 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.2; }
html[lang="en"] .cta-scene h2 { line-height: 1.05; letter-spacing: -.03em; }
.cta-scene p { margin-top: 16px; font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: #D3DAE3; }
.cta-scene .hero__cta { justify-content: center; }

/* Contact */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.info { margin-top: 36px; display: grid; gap: 12px; }
.info a, .info div { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink-3); width: fit-content; }
.info a:hover { color: var(--blue-deep); }
.info svg { width: 20px; height: 20px; color: var(--blue-deep); flex: none; }
.form { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field label .req { color: #C2274B; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--mist);
  transition: border-color .25s, background-color .25s, box-shadow .25s; font-size: 1rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(73,172,224,.18); }
.field input[dir="ltr"] { text-align: start; }
html[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #C2274B; }
.field__err { color: #C2274B; font-size: .82rem; display: none; }
.field.has-error .field__err { display: block; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.form__foot small { color: var(--muted); }
.form__status { margin-top: 18px; padding: 14px 18px; border-radius: 14px; font-size: .95rem; display: none; }
.form__status.is-ok { display: block; background: #E7F6EC; color: #1E6B3A; }
.form__status.is-warn { display: block; background: #FFF4E0; color: #8A5300; }
.form__status.is-pending { display: block; background: var(--blue-soft); color: var(--blue-deep); }
.form__alt { font-weight: 700; color: inherit; }
.form { position: relative; }
.form [type="submit"][aria-busy="true"] { opacity: .6; cursor: progress; }
.join { margin-top: clamp(48px, 7vw, 72px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(24px, 4vw, 36px) clamp(24px, 4vw, 44px); border-radius: var(--radius-lg); background: var(--blue-soft); }
.join h3 { font-size: 1.3rem; }
.join p { color: var(--ink-3); margin-top: 6px; max-width: 620px; }

/* Footer */
.footer { background: var(--ink); color: #C9CACD; padding-block: 64px 32px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer__logo { height: 40px; width: auto; }
.footer p { margin-top: 18px; max-width: 360px; font-size: .95rem; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { text-decoration: none; font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; }
.footer ul a:hover { color: #fff; }
.footer ul svg { width: 16px; height: 16px; flex: none; }
.footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ink-3); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: .85rem; color: var(--muted-on-ink); }
.social { display: flex; align-items: center; gap: 10px; }
.social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ink-3); display: grid; place-items: center; color: #C9CACD; transition: color .25s, border-color .25s, transform .35s var(--ease-spring); }
.social a:hover { color: #fff; border-color: var(--blue); }
.social a:active { transform: scale(.92); transition-duration: .1s; }
.social svg { width: 17px; height: 17px; }

/* Materialize on scroll: opacity, scale and blur arrive together */
/* Uses the individual translate/scale properties so hover transforms on the same cards keep working */
.reveal { opacity: 0; }
.reveal.is-in { animation: reveal-in .9s var(--ease-spring) var(--d, 0ms) both; }
@keyframes reveal-in {
  from { opacity: 0; translate: 0 18px; scale: .985; filter: blur(6px); }
  to { opacity: 1; translate: none; scale: none; filter: none; }
}

/* Responsive */
@media (max-width: 1180px) {
  .nav {
    position: fixed; top: calc(var(--header-h) + 8px); inset-inline: 12px; flex-direction: column; gap: 2px; padding: 10px;
    background: rgba(24,26,32,.97); /* nested inside the header's material, so it cannot blur the page: keep it near-solid */
    border: 1px solid rgba(255,255,255,.1); border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
    transform-origin: top var(--menu-origin, left); transform: scale(.96) translateY(-6px); opacity: 0; visibility: hidden;
    transition: transform .45s var(--ease-spring), opacity .25s var(--ease-out), visibility 0s .45s;
  }
  html[dir="rtl"] .nav { --menu-origin: left; }
  html[dir="ltr"] .nav { --menu-origin: right; }
  .header.menu-open .nav { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav a { padding: 14px 14px; border-radius: 14px; font-size: 1.05rem; }
  .menu-btn { display: block; }
  .header__actions { margin-inline-start: auto; }
}
@media (max-width: 1080px) {
  .values, .stages, .team--4 { grid-template-columns: repeat(2, 1fr); }
  .caps { grid-template-columns: repeat(2, 1fr); }
  .network { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .tools, .team--3 { grid-template-columns: 1fr 1fr; }
  .about, .panel, .contact { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.12); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__top > :first-child { grid-column: 1 / -1; }
  .scene__text > * { margin-left: 0; }
  .scene::after { background: linear-gradient(0deg, rgba(6,10,18,.9) 0%, rgba(6,10,18,.4) 55%, rgba(6,10,18,.1) 85%); }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .header .btn--primary { display: none; }
  .header__logo img { height: 26px; }
  .values, .caps, .stages, .tools, .form__grid { grid-template-columns: 1fr; }
  .team--3, .team--4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .member__role, .member h3, .member p { padding-inline: 14px; }
  .member p { font-size: .85rem; }
  .stat { padding: 18px 16px 20px; }
  .stat__label { font-size: .8rem; }
  .hero__cta .btn { flex: 1 1 100%; }
  .projects { grid-auto-columns: 84%; }
  .bars li { grid-template-columns: 96px 1fr 46px; }
  .scene { min-height: 72svh; }
}

/* Accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  html, .projects { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .bars i::after { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .header, .header.is-scrolled { background: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .glass { background: rgba(20,22,28,.92); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav { background: var(--ink-2) !important; backdrop-filter: none !important; }
  .btn--ghost { background: rgba(20,22,28,.85); backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .glass { background: rgba(10,12,16,.94); border-color: #fff; }
  .value, .cap, .tool, .stage, .member, .offering { border-color: var(--ink); }
  .hero__lead, .scene__lead, .stat__label { color: #fff; }
}
