/* ABSCO round two: order and motion. Loaded after site.css. */

/* The no-script airflow drawing mirrors in Arabic, like the live one */
[dir="rtl"] .air-static { transform: scaleX(-1); }

/* Reading progress and a header that tightens once you scroll */
.progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 70; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--air); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .progress span { transform-origin: right; }
.bar { transition: box-shadow .3s var(--ease); }
.bar-in { transition: height .35s var(--ease); }
.brand img { transition: height .35s var(--ease); }
.bar.is-scrolled { box-shadow: 0 1px 0 rgba(234, 244, 242, .08); }
.bar.is-scrolled .bar-in { height: 66px; }
.bar.is-scrolled .brand img { height: 46px; }
.nav a { position: relative; padding-block: 6px; }
.nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px; background: var(--air); transform: scaleX(0); transition: transform .35s var(--ease); }
.nav a:hover { text-decoration: none; }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--air); }

/* Buttons fill from the side on hover */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--ink); z-index: -1; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
[dir="rtl"] .btn::before { transform-origin: left; }
.btn:hover { background: var(--accent); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
[dir="rtl"] .btn:hover::before { transform-origin: right; }
.btn-ghost::before { background: var(--accent); }
.btn-ghost:hover { color: var(--bg); background: var(--bg-3); }

/* Hero: air lines drift behind, the headline rises word by word */
.hero { position: relative; overflow: hidden; }
.hero-in { position: relative; z-index: 1; }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-lines path { fill: none; stroke: var(--air); stroke-width: 1.2; opacity: .14; stroke-dasharray: 160 420; animation: drift-line 14s linear infinite; animation-delay: calc(var(--i) * -2.3s); }
@keyframes drift-line { to { stroke-dashoffset: -1160; } }
[dir="rtl"] .hero-lines { transform: scaleX(-1); }
.words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.words .w > span { display: inline-block; }
.js .words .w > span { transform: translateY(110%); animation: word-up .9s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms + 250ms); }
.js.intro .words .w > span { animation-delay: calc(var(--i) * 90ms + 1350ms); }
@keyframes word-up { to { transform: none; } }

/* Ticker of project names */
.ticker { background: var(--bg-2); overflow: hidden; padding-block: 26px; }
.ticker-track { display: flex; width: max-content; animation: tick-l 48s linear infinite; }
[dir="rtl"] .ticker-track { animation-name: tick-r; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { display: flex; flex: none; }
.ticker li { font-size: clamp(20px, 2vw, 30px); font-weight: 500; color: var(--ink-2); white-space: nowrap; padding-inline: 28px; display: flex; align-items: center; gap: 56px; }
.ticker li::after { content: ""; width: 9px; height: 9px; background: var(--air); transform: rotate(45deg); flex: none; }
@keyframes tick-l { to { transform: translateX(-50%); } }
@keyframes tick-r { to { transform: translateX(50%); } }

/* Photos open like a shutter as they come into view */
.js [data-mask] { overflow: hidden; clip-path: inset(0 0 100% 0); transition: clip-path 1.15s var(--ease); }
.js [data-mask].is-in { clip-path: inset(0 0 0 0); }
.js [data-mask] img:not(.parallax) { transform: scale(1.14); transition: transform 1.6s var(--ease); }
.js [data-mask].is-in img:not(.parallax) { transform: none; }

/* Service tabs */
.tabs { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: clamp(36px, 4vw, 56px); }
.tabs button { font: inherit; text-align: start; cursor: pointer; border: 0; background: var(--bg-2); color: var(--ink-2); padding: 20px 22px 24px; font-size: var(--t-h3); font-weight: 600; line-height: 1.3; display: grid; gap: 6px; transition: background-color .3s var(--ease), color .3s var(--ease); }
.tabs button:hover { color: var(--ink); background: var(--bg-3); }
.tabs button[aria-selected="true"] { color: var(--ink); background: var(--bg-3); }
.tab-n { font-size: var(--t-small); font-weight: 500; color: var(--air); }
.tab-ink { position: absolute; bottom: 0; height: 3px; background: var(--air); left: 0; width: 0; transition: left .45s var(--ease), width .45s var(--ease); }
.js .tabs:not([hidden]) ~ .svc-row + .svc-row { margin-top: 0; }
.svc-row.is-enter .svc-fig { animation: panel-in .6s var(--ease) both; }
.svc-row.is-enter .svc-tx { animation: panel-in .6s var(--ease) .08s both; }
.svc-row.is-enter .svc-list li { animation: panel-in .5s var(--ease) both; animation-delay: calc(var(--k) * 45ms + 150ms); }
@keyframes panel-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Map: the city panel slides in, its list follows */
.city-panel.is-enter h3, .city-panel.is-enter .office-note, .city-panel.is-enter .cp-ph { animation: panel-in .5s var(--ease) both; }
.city-panel.is-enter .cp-list li { animation: panel-in .45s var(--ease) both; }
.city-panel.is-enter .cp-list li:nth-child(1) { animation-delay: .1s; }
.city-panel.is-enter .cp-list li:nth-child(2) { animation-delay: .14s; }
.city-panel.is-enter .cp-list li:nth-child(3) { animation-delay: .18s; }
.city-panel.is-enter .cp-list li:nth-child(4) { animation-delay: .22s; }
.city-panel.is-enter .cp-list li:nth-child(n+5) { animation-delay: .26s; }
.cp-list li { transition: background-color .2s var(--ease), transform .2s var(--ease); }
.cp-list li:hover { background: #1b4340; transform: translateX(4px); }
[dir="rtl"] .cp-list li:hover { transform: translateX(-4px); }

/* Lift on hover */
.slide figure { transition: transform .5s var(--ease); }
.slide:hover figure { transform: translateY(-8px); }
.people li { transition: transform .25s var(--ease); }
.people li:hover { transform: translateY(-3px); }
.people li:hover strong { color: var(--air); }
.qa summary { transition: color .2s; }
.qa summary:hover { color: var(--air); }
.svc-list li { transition: transform .25s var(--ease); }
.svc-list li:hover { transform: translateX(4px); }
[dir="rtl"] .svc-list li:hover { transform: translateX(-4px); }

/* Back to top, with a ring that fills as you read */
.to-top { position: fixed; inset-inline-end: clamp(14px, 2vw, 28px); bottom: clamp(14px, 2vw, 28px); z-index: 50; width: 52px; height: 52px; display: grid; place-items: center; background: var(--bg-3); color: var(--ink); border-radius: 50%; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease), background-color .2s; }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #1b4340; }
.to-top svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.to-top .ring-bg { fill: none; stroke: rgba(234, 244, 242, .12); stroke-width: 3; }
.to-top .ring { fill: none; stroke: var(--air); stroke-width: 3; stroke-dasharray: 132; stroke-dashoffset: 132; }
.to-top .chev { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); transform-origin: 24px 24px; }

/* Opening intro, once per visit: the logo, then the page */
.intro body::before, .intro body::after { content: ""; position: fixed; z-index: 100; pointer-events: none; }
.intro body::before { inset: 0; background: var(--bg) url(../img/logo.png) center 46% / min(260px, 50vw) auto no-repeat; animation: intro-out .7s var(--ease) 1.1s forwards; }
.intro body::after { left: 50%; top: 62%; width: min(260px, 50vw); height: 3px; margin-left: calc(min(260px, 50vw) / -2); background: var(--air); transform: scaleX(0); transform-origin: left; animation: intro-line 1s var(--ease) .1s forwards, intro-out .7s var(--ease) 1.1s forwards; }
[dir="rtl"].intro body::after { transform-origin: right; }
@keyframes intro-line { to { transform: scaleX(1); } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .hero-lines path, .ticker-track { animation: none; }
  .js .words .w > span { transform: none; animation: none; }
  .js [data-mask] { clip-path: none; transition: none; }
  .js [data-mask] img { transform: none !important; transition: none; }
  .ticker ul + ul { display: none; }
  .ticker-track { width: auto; }
  .ticker ul { flex-wrap: wrap; }
  .svc-row.is-enter *, .city-panel.is-enter * { animation: none !important; }
  .intro body::before, .intro body::after { display: none; }
}
@media (max-width: 1080px) {
  .tabs { grid-template-columns: 1fr; }
  .tab-ink { display: none; }
  .tabs button[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--air); }
  [dir="rtl"] .tabs button[aria-selected="true"] { box-shadow: inset -3px 0 0 var(--air); }
}
@media (max-width: 680px) {
  .to-top, .to-top svg { width: 46px; height: 46px; }
  .ticker { padding-block: 18px; }
}

/* ===== Polish pass ===== */
/* Hero trust line and scroll cue */
.trust { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 36px; font-size: var(--t-small); color: var(--ink-2); }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust li::before { content: ""; width: 7px; height: 7px; background: var(--air); transform: rotate(45deg); flex: none; }
.cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 2; width: 26px; height: 42px; border: 2px solid rgba(234, 244, 242, .45); border-radius: 14px; }
.cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--air); border-radius: 2px; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
/* Leave room under the rig so the scroll cue never sits on its edge */
@media (min-width: 1081px) { .hero-in { padding-bottom: 76px; } }

/* Clients and partners */
.clients { background: var(--bg-2); padding-block: clamp(64px, 7vw, 112px); overflow: hidden; }
.clients-head { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gap); align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
.clients-head h2 { font-size: clamp(26px, 2.6vw, 40px); }
.clients-head p { color: var(--ink-2); }
.logo-row { overflow: hidden; }
.logo-row + .logo-row { margin-top: 14px; }
.logo-track { display: flex; width: max-content; animation: tick-l 60s linear infinite; }
.logo-row:nth-of-type(odd) .logo-track { animation-name: tick-r; animation-duration: 70s; }
[dir="rtl"] .logo-track { animation-name: tick-r; }
[dir="rtl"] .logo-row:nth-of-type(odd) .logo-track { animation-name: tick-l; }
.logo-row:hover .logo-track { animation-play-state: paused; }
.logo-track ul { display: flex; gap: 14px; padding-inline-end: 14px; flex: none; }
.logo-track li { width: 196px; height: 104px; background: #f2f6f5; display: grid; place-items: center; padding: 14px 20px; flex: none; transition: background-color .3s var(--ease); }
.logo-track img { max-width: 100%; max-height: 72px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .78; transition: filter .35s var(--ease), opacity .35s var(--ease), transform .35s var(--ease); }
.logo-track li:hover { background: #fff; }
.logo-track li:hover img { filter: none; opacity: 1; transform: scale(1.06); }

/* Company video */
.video { padding-block: var(--sec); }
.player { position: relative; background: var(--bg-2); }
.player [data-mask] { aspect-ratio: 16 / 8; }
.player-poster { width: 100%; height: 100%; object-fit: cover; }
.player::after { content: ""; position: absolute; inset: 0; background: rgba(7, 24, 22, .35); pointer-events: none; transition: background-color .4s var(--ease); }
.player:hover::after { background: rgba(7, 24, 22, .2); }
.play { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%); width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--accent); cursor: pointer; display: grid; place-items: center; transition: transform .3s var(--ease), background-color .3s; }
.play svg { width: 34px; height: 34px; fill: var(--bg); margin-left: 5px; }
.play:hover { transform: translate(-50%, -50%) scale(1.08); background: var(--accent-hi); }
.play-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--air); animation: ping-ring 2.2s var(--ease) infinite; }
@keyframes ping-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }
.player-yt { position: absolute; z-index: 2; inset-inline-start: 20px; bottom: 16px; font-size: var(--t-small); color: var(--ink); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }
.player.is-playing::after, .player.is-playing .play, .player.is-playing .player-yt { display: none; }

/* A fuller footer */
.foot-cols { display: grid; grid-template-columns: 4fr 2fr 3fr 3fr; gap: clamp(28px, 4vw, 64px); padding-bottom: clamp(48px, 6vw, 88px); }
.fc-brand img { height: 64px; width: auto; }
.fc-brand p { margin-top: 18px; max-width: 30em; }
.fc-brand .btn { margin-top: 22px; }
.foot-cols h3 { font-size: 15px; color: var(--ink); margin-bottom: 14px; letter-spacing: 0; }
.foot-cols li { padding-block: 5px; font-size: 15px; }
.foot-cols a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.foot-cols a:hover { color: var(--air); }
/* The footer's link colours must not reach its button: keep dark text on the teal button */
.foot .btn, .foot .btn:hover { color: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  .cue span, .play-ring { animation: none; }
  .logo-track { animation: none; width: auto; }
  .logo-track ul + ul { display: none; }
  .logo-track ul { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 1080px) {
  .clients-head { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .fc-brand { grid-column: 1 / -1; }
  .cue { display: none; }
}
@media (max-width: 680px) {
  .logo-track li { width: 150px; height: 84px; }
  .logo-track img { max-height: 56px; }
  .player [data-mask] { aspect-ratio: 4 / 3; }
  .play { width: 72px; height: 72px; }
  .foot-cols { grid-template-columns: 1fr; }
}

/* ===== Phone and touch ===== */
/* Larger, thumb-sized range controls everywhere */
.ao-slider input { -webkit-appearance: none; appearance: none; background: transparent; height: 36px; }
.ao-slider input::-webkit-slider-runnable-track { height: 6px; background: #2d4e4c; border-radius: 3px; }
.ao-slider input::-moz-range-track { height: 6px; background: #2d4e4c; border-radius: 3px; }
.ao-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--air); border: 4px solid var(--bg-2); box-shadow: 0 0 0 2px var(--air); transition: transform .15s; }
.ao-slider input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--air); border: 4px solid var(--bg-2); box-shadow: 0 0 0 2px var(--air); }
.ao-slider input:active::-webkit-slider-thumb { transform: scale(1.15); }
.ao.is-off .ao-slider input::-webkit-slider-thumb { background: var(--warn); box-shadow: 0 0 0 2px var(--warn); }
.ao.is-off .ao-slider input::-moz-range-thumb { background: var(--warn); box-shadow: 0 0 0 2px var(--warn); }
.ao-slider input:focus-visible { outline: none; }
.ao-slider input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--air), 0 0 0 6px rgba(111, 227, 214, .35); }

/* City chips: an easy list of cities under the map on smaller screens */
.city-chips { display: none; }
@media (hover: none) { .drag-hint { display: none !important; } }
@media (max-width: 1080px) {
  .city-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 4px calc(var(--m) * -1) 8px; padding: 4px var(--m); scroll-snap-type: x proximity; }
  .city-chips::-webkit-scrollbar { display: none; }
  .dot-chip { flex: none; scroll-snap-align: center; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--bg-3); border: 0; padding: 10px 16px; min-height: 44px; cursor: pointer; transition: background-color .2s, color .2s; }
  .dot-chip span { color: var(--ink-2); margin-inline-start: 4px; font-variant-numeric: tabular-nums; }
  .dot-chip.is-on { background: var(--air); color: var(--bg); }
  .dot-chip.is-on span { color: var(--bg); }
  .map-in { gap: 20px; }
}
@media (max-width: 680px) {
  /* The rig reads as rows: name and status, the reading, then a full-width slider */
  .air { padding: 16px; margin-inline: calc(var(--m) * -1); }
  .air-head { display: block; }
  .air-hint { margin-top: 4px; }
  .air-stage { aspect-ratio: 5 / 4; margin-top: 14px; }
  .air-outlets { grid-template-columns: 1fr; gap: 6px; }
  .ao { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; background: var(--bg-3); padding: 12px 14px 6px; }
  .ao-name { grid-column: 1; color: var(--ink); font-weight: 500; }
  .ao-status { grid-column: 1; grid-row: 2; }
  .ao-q { grid-column: 2; grid-row: 1 / span 2; text-align: end; font-size: 24px; }
  .ao-q small { display: inline; }
  .ao-slider { grid-column: 1 / -1; }
  .ao-pos { display: none; }
  .air-foot { gap: 10px; }
  .air-foot .btn { width: 100%; }
  .hero h1 { font-size: clamp(32px, 9vw, 40px); }
  .lede { margin-top: 18px; }
  .actions { margin-top: 28px; }
  .trust { margin-top: 24px; gap: 8px 18px; }
  .sec-head { margin-bottom: 32px; }
  .map-box { margin-inline: -8px; }
  .dot { width: 36px; height: 36px; }
  .cp-list { max-height: none; }
  .rail-head p, .sec-head p, .sec-p { font-size: 17px; }
  .stats dd { font-size: 48px; }
  .to-top { bottom: 14px; }
}
