/* Base layer on the token contract (theme.css): reset, layout, the kit's shared parts, the form. Logical properties only,
   so Arabic and Kurdish (RTL) mirror without extra rules. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: var(--t-body)/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-inline-size: 100%; block-size: auto; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
/* Arabic script joins its letters: tracking pulls them apart, so no element is letter-spaced in Arabic or Kurdish */
html:lang(ar) *, html:lang(ckb) * { letter-spacing: 0 !important; }
::selection { background: #fdb31a; color: var(--accent-ink); }
html { scrollbar-color: var(--s3) var(--bg); caret-color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); line-height: var(--lh-display); letter-spacing: var(--track-display); margin-block: 0 0.5em; text-wrap: balance; }
h1 { font-size: var(--t-title); }
h2 { font-size: var(--t-h2); }
.lead { font-size: var(--t-lead); color: var(--muted); max-inline-size: 60ch; }
.wrap { inline-size: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.narrow { --wrap: 44rem; }

/* Kit parts: skip link, preview bar, developer credit */
.skip-link { position: absolute; inset-inline-start: var(--gap); inset-block-start: var(--gap); padding: 0.5rem 1rem; background: var(--fg); color: var(--bg); z-index: 10; }
.skip-link:not(:focus) { inline-size: 1px; block-size: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.preview-bar { display: flex; gap: 1rem; align-items: center; justify-content: center; padding: 0.5rem 1rem; background: var(--s3); color: var(--fg); font-size: var(--t-small); }
.foot-dev { font-size: var(--t-small); color: var(--muted); }
.foot-dev a { color: inherit; }

/* Sections */
.page { padding-block: calc(var(--gap-section) * 0.6) var(--gap-section); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-block-size: 3.25rem; padding: 0.75rem 1.75rem; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font: 700 1.0625rem/1 var(--font-display); letter-spacing: 0.01em; text-transform: none; text-decoration: none; cursor: pointer; transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out); }
.button:hover { background: var(--tone-18); border-color: var(--tone-18); }
.button:active { background: var(--tone-29); transform: scale(0.97); }
html:lang(ar) .button, html:lang(ckb) .button { letter-spacing: 0; text-transform: none; }
.visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Form */
.form { display: grid; gap: 0.35rem; }
.form label { font-weight: 600; margin-block-start: 0.75rem; }
.form input, .form select, .form textarea { inline-size: 100%; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--fg); font: inherit; }
.form [aria-invalid="true"] { border-color: var(--error); }
.form .check { display: flex; gap: 0.5rem; align-items: start; font-weight: 400; }
.form .check input { inline-size: 1.5rem; block-size: 1.5rem; min-block-size: 0; flex: none; margin-block-start: 0.2rem; accent-color: #fdb31a; }
.form .button { justify-self: start; margin-block-start: 1rem; }
.error, .form-error { color: var(--error); margin: 0; }
.trap { position: absolute; inset-inline-start: -100vw; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

button:disabled, [aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* The frame: the plain bar on top and the footer as the back of the card. One pair of outer margins (--gap) everywhere. */
.bar { position: sticky; inset-block-start: 0; z-index: 20; background: var(--bg); border-block-end: 1px solid var(--line); --nav-hi: #fdb31a; }
/* Three columns: wordmark at the start, the links centred, languages and the enquiry at the end */
.bar-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(1rem, 2.4vw, 2.5rem); padding: 0.875rem var(--gap); }
.wordmark { justify-self: start; display: inline-flex; align-items: center; gap: 0.75rem; color: var(--fg); text-decoration: none; font: 700 1.375rem/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; transition: opacity var(--dur-1) var(--ease-out); }
.wordmark:hover { opacity: 0.85; }
.wordmark:active { transform: scale(0.98); }
html:lang(ar) .wordmark, html:lang(ckb) .wordmark { font-size: 1.0625rem; text-transform: none; }
.mark { inline-size: 1.75rem; block-size: 1.75rem; fill: currentColor; transition: transform var(--dur-2) var(--ease-out); }
/* Decorative spin: only where a real pointer hovers, so a tap does not leave the mark turned */
@media (hover: hover) and (pointer: fine) {
  .wordmark:hover .mark { transform: rotate(60deg); }
}
.mark .mark-core { fill: var(--accent); }
/* The links in one quiet pill; the section in view gets a soft filled pill of its own, its icon in the accent */
.bar-links { display: flex; gap: 0.15rem; padding: 0.3rem; border: 1px solid var(--line); border-radius: 9999px; background: oklch(0.16 0.035 255 / 0.55); }
.bar-links a { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: 2.5rem; padding: 0 1.15rem; border-radius: 9999px; color: var(--muted); font: 600 var(--t-small)/1 var(--font-body); text-decoration: none; transition: color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
.bar-links a:hover, .bar-links a:focus-visible, .bar-links a[aria-current="true"] { color: var(--fg); }
.bar-links a:hover { background-color: oklch(1 0 0 / 0.06); }
.bar-links a[aria-current="true"] { background-color: oklch(1 0 0 / 0.12); }
.nav-icon { inline-size: 1.05rem; block-size: 1.05rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.bar-links .nav-icon, .tabbar .nav-icon { transition: color var(--dur-1) var(--ease-out); }
:is(.bar-links, .tabbar) a[aria-current="true"] .nav-icon { color: var(--nav-hi); }
.bar-end { justify-self: end; display: flex; align-items: center; gap: 0.75rem; }

/* Language menu */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 0.5rem; min-block-size: 2.75rem; padding: 0 0.95rem; font-weight: 600; letter-spacing: 0.06em; border: 1px solid var(--line); border-radius: 9999px; font-size: var(--t-small); color: var(--fg); cursor: pointer; user-select: none; transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { border-color: var(--muted); background-color: var(--s1); }
.lang-menu[open] summary { border-color: var(--nav-hi); background-color: var(--s1); }
.lang-globe { opacity: 0.7; }
.lang-caret { opacity: 0.7; transition: transform var(--dur-1) var(--ease-out); }
.lang-menu[open] .lang-caret { transform: rotate(180deg); }
/* The panel hangs from the button; the invisible ::before bridges the gap so a mouse can travel into it */
.lang-pop { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 0.5rem); min-inline-size: 11rem; box-shadow: 0 18px 40px -18px oklch(0 0 0 / 0.6); padding: 0.35rem; background: var(--s1); border: 1px solid var(--line); border-radius: 0.5rem; display: grid; gap: 0.15rem; z-index: 30; }
/* The menu opens from its trigger (top end), so it scales from that corner, not from the centre */
.lang-menu[open] .lang-pop { animation: pop-in var(--dur-1) var(--ease-out); transform-origin: top right; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.97); } }
.lang-pop::before { content: ""; position: absolute; inset-inline: 0; inset-block-end: 100%; block-size: 0.6rem; }
.lang-pop a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-block-size: 2.75rem; padding: 0 0.85rem; border-radius: 0.35rem; color: var(--fg); font-size: var(--t-small); text-decoration: none; transition: background-color var(--dur-1) var(--ease-out); }
.lang-pop a:hover, .lang-pop a:focus-visible { background-color: var(--s2); color: var(--fg); }
.lang-code { font: 700 var(--t-micro)/1 var(--font-display); letter-spacing: 0.1em; color: var(--muted); }
.lang-pop a[aria-current="true"] { background-color: var(--s2); }
.lang-pop a[aria-current="true"] .lang-code { color: var(--nav-hi); }
.lang-pop a[aria-current="true"] .lang-code::before { content: ""; display: inline-block; inline-size: 0.4rem; block-size: 0.4rem; margin-inline-end: 0.45rem; border-radius: 50%; background: var(--nav-hi); vertical-align: middle; }
html[dir="rtl"] .lang-menu[open] .lang-pop { transform-origin: top left; }

.bar-action { min-block-size: 2.75rem; padding-inline: 1.25rem; font-size: var(--t-small); background: #fdb31a; border-color: #fdb31a; border-radius: 9999px; }
.bar-action:hover { background: var(--fg); border-color: var(--fg); }
@media (max-width: 63.99rem) {
  .bar-in { position: relative; display: flex; }
  .wordmark { margin-inline-end: auto; }
  .bar-links { display: none; }
}
@media (max-width: 34rem) {
  .wordmark span { font-size: 1rem; }
  .bar-action { display: none; }
}

/* Footer: the name returns at full width, then three columns, then the imprint */
.card-back { background: var(--s1); padding: clamp(4rem, 8vw, 7rem) var(--gap) 2rem; overflow: hidden; }
.card-name { margin: 0 0 clamp(2.5rem, 5vw, 4rem); font: 700 var(--t-h2)/0.9 var(--font-display); text-transform: uppercase; letter-spacing: -0.01em; white-space: nowrap; color: var(--fg); }
html:lang(ar) .card-name, html:lang(ckb) .card-name { line-height: 1.2; text-transform: none; }
.card-cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); padding-block-end: clamp(3rem, 6vw, 5rem); }
.card-sign { grid-column: 1 / span 5; }
.card-sign-line { font: 700 var(--t-lead)/1.05 var(--font-display); text-transform: uppercase; margin: 0 0 0.75rem; }
html:lang(ar) .card-sign-line, html:lang(ckb) .card-sign-line { text-transform: none; line-height: 1.5; }
.card-sign p:last-child { margin: 0; max-inline-size: 32ch; }
.card-list { grid-column: 6 / span 4; list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-size: var(--t-body); }
.card-list a { color: var(--fg); text-decoration-color: var(--muted); text-underline-offset: 0.25em; transition: text-decoration-color var(--dur-2) var(--ease-out); }
.card-list a:hover { text-decoration-color: var(--accent); }
.card-contact { grid-column: 10 / span 3; display: grid; gap: 1rem; align-content: start; }
.contact-lines { margin: 0; display: grid; gap: 0.75rem; }
.contact-lines dt { font-size: var(--t-small); color: var(--muted); }
.contact-lines dd { margin: 0; }
.contact-lines a { color: var(--fg); }
.card-write { color: #fdb31a; font-weight: 600; text-underline-offset: 0.25em; }
.card-imprint { display: grid; gap: 0.4rem; padding-block-start: 1.5rem; color: var(--muted); font-size: var(--t-small); }
.card-imprint p { margin: 0; max-inline-size: 90ch; }
.card-imprint .foot-dev { color: var(--muted); }
@media (max-width: 63.99rem) {
  .card-sign, .card-list, .card-contact { grid-column: 1 / -1; }
}

/* Phones: the bottom tab bar, a floating ink panel within thumb reach; the enquiry sits in the middle in amber */
.tabbar { display: none; --nav-hi: #fdb31a; }
@media (max-width: 63.99rem) {
  .tabbar { position: fixed; z-index: 25; inset-inline: 0.75rem; inset-block-end: calc(0.75rem + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.25rem; padding: 0.35rem; border: 1px solid var(--line); border-radius: 1.25rem; background: oklch(0.2 0.04 255 / 0.97); box-shadow: 0 18px 40px -16px oklch(0 0 0 / 0.7); }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 0.3rem; min-block-size: 3.5rem; padding: 0.4rem 0.25rem; border-radius: 0.95rem; color: var(--muted); font: 600 var(--t-micro)/1.15 var(--font-body); text-align: center; text-decoration: none; transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
  .tabbar .nav-icon { inline-size: 1.3rem; block-size: 1.3rem; }
  .tabbar a[aria-current="true"] { background-color: oklch(1 0 0 / 0.12); color: var(--fg); }
  .tabbar .tab-go { background: var(--nav-hi); color: var(--accent-ink); }
  .tabbar a:active { transform: scale(0.97); }
  body { padding-block-end: calc(5.5rem + env(safe-area-inset-bottom)); }
  .tray { inset-block-end: calc(6.25rem + env(safe-area-inset-bottom)); }
}

/* Home page, wide screens: the bar floats over the hero, its wordmark in ink on the amber corner wave and the enquiry in
   the hero's amber. As the page scrolls it turns solid ink and the wordmark turns white. Without scroll timelines, or with
   reduced motion, it is solid from the start (the wordmark is then white on ink, never on the wave). */
@property --wm { syntax: "<color>"; inherits: true; initial-value: oklch(0.97 0.006 240); }
@media (min-width: 64rem) {
  body:has(.hero) .bar { position: fixed; inset-inline: 0; inset-block-start: 0; }
  /* The wordmark stands on the corner wave: pinned to the corner (not the content column, which moves inward on wide
     screens), and home.css keeps the wave big enough that the whole name sits on its light part */
  body:has(.hero) .wordmark { color: var(--wm); margin-inline-start: calc(var(--gap) - max(var(--gap), (100vw - var(--wrap)) / 2)); }
  @supports (animation-timeline: scroll()) {
    @media (prefers-reduced-motion: no-preference) {
      body:has(.hero) .bar { animation: bar-solid linear both; animation-timeline: scroll(root); animation-range: 0 8rem; }
    }
  }
}
@keyframes bar-solid {
  from { background-color: oklch(0.16 0.035 255 / 0); border-color: oklch(0.97 0.006 240 / 0); --wm: var(--accent-ink); }
  to { background-color: var(--bg); border-color: var(--line); --wm: oklch(0.97 0.006 240); }
}

/* Al-Narra Group home. The hero (further down, untouched) sets the language: the two-layer corner wave, amber sampled
   from each photograph, uppercase Rajdhani with an amber second line, amber pills and filling bars. The lower page
   carries the same pieces: five tiles at a glance, curved seams, a scroll-drawn pipeline through the companies.
   Motion is CSS only; without scroll timelines or with reduced motion every line and bar shows finished. */
[hidden] { display: none !important; }

/* Amber from the hero (WAVES in Home.tsx): the page default is Al-Narra's, each company carries its own */
#main { --hi: #fdb31a; --lo: #8c6213; --dim: oklch(0.36 0.035 250); }
[data-company="narra"] { --hi: #fdb31a; --lo: #8c6213; }
[data-company="wadi"] { --hi: #feb841; --lo: #8c6526; }
[data-company="alshaam"] { --hi: #d39a7c; --lo: #624636; }
[data-company="bawaba"] { --hi: #ffcd78; --lo: #8c7042; }
[data-company="jusoor"] { --hi: #d4a052; --lo: #664a23; }

/* Container and jump offsets */
/* One content edge for every section, the bar and the footer: --gap on small screens, centred to --wrap on wide ones */
.intro, .index, .how-grid, .contact, .bar-in, .card-back { padding-inline: max(var(--gap), calc((100% - var(--wrap)) / 2)); }
.intro, .index, .contact, .chapter { scroll-margin-block-start: 5.5rem; }

/* Shared pieces: the seam, the display title, the node circle, the pill */
/* The seam: the curve as an edge. The fill is the surface beyond the edge; the lines ride along the cut */
.seam { position: absolute; z-index: 2; inset-inline: 0; inline-size: 100%; block-size: clamp(3rem, 7vw, 7rem); pointer-events: none; overflow: visible; }
.seam-bottom { inset-block-end: -1px; }
.seam-top { inset-block-start: -1px; }
html[dir="rtl"] .seam { transform: scaleX(-1); }
.seam path { vector-effect: non-scaling-stroke; }
.seam-fill { fill: var(--bg); }
.seam-lo, .seam-hi { fill: none; stroke-linecap: round; }
.seam-lo { stroke: var(--lo); stroke-width: 7; }
.seam-hi { stroke: var(--hi); stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 0; }

.display { margin: 0; font: 700 var(--t-h2)/0.92 var(--font-display); text-transform: uppercase; letter-spacing: 0.005em; color: var(--fg); }
.display .line { display: block; }
.line-hi { color: var(--hi); }
html:lang(ar) .display, html:lang(ckb) .display { line-height: 1.25; }


.node { position: relative; z-index: 1; display: grid; place-items: center; inline-size: 3rem; block-size: 3rem; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--fg); transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.icon { inline-size: 1.35rem; block-size: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.pill { display: inline-flex; align-items: center; gap: 0.75rem; min-block-size: 3.25rem; padding: 0.8rem 1.75rem; border-radius: 999px; background: var(--hi); color: var(--accent-ink); font: 700 var(--t-small)/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; transition: background-color var(--dur-1) var(--ease-out); }
html:lang(ar) .pill, html:lang(ckb) .pill { letter-spacing: 0; }
.pill:hover, .pill:focus-visible { background: var(--fg); }
.pill:active { transform: scale(0.98); }
.arrow { inline-size: 1.25rem; block-size: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: translate var(--dur-2) var(--ease-out); }
.pill:hover .arrow { translate: 0.3rem 0; }
html[dir="rtl"] .arrow { transform: scaleX(-1); }
html[dir="rtl"] .pill:hover .arrow { translate: -0.3rem 0; }
.pill-lg { min-block-size: 4.25rem; padding: 1rem 2.25rem; font-size: var(--t-lead); }

/* Tiles: the five companies at a glance under the hero, framed like it; a jump to each full row */
.tiles { padding: clamp(2.5rem, 5vw, 4rem) max(var(--gap), calc((100% - var(--wrap)) / 2)) 0; }
.tiles-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(0.75rem, 1.2vw, 1.25rem); }
.tile { position: relative; isolation: isolate; display: grid; align-content: space-between; justify-items: start; aspect-ratio: 3 / 4; padding: 1.1rem; overflow: hidden; border-radius: 0.5rem; color: var(--fg); text-decoration: none; background: var(--s1); }
.tile img { position: absolute; inset: 0; z-index: -2; inline-size: 100%; block-size: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.2s var(--ease-out); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, oklch(0.16 0.035 255 / 0.96), oklch(0.16 0.035 255 / 0.8) 32%, oklch(0.16 0.035 255 / 0) 62%, oklch(0.16 0.035 255 / 0.3)); }
/* The hero's timer bar, filling along the foot of the tile in view */
.tile::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; block-size: 3px; background: var(--hi); transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--ease-out); }
html[dir="rtl"] .tile::after { transform-origin: right; }
.tile:is(:hover, :focus-visible) img { transform: scale(1); }
.tile:is(:hover, :focus-visible)::after { transform: scaleX(1); }
.tile:is(:hover, :focus-visible) .tile-icon { background: var(--hi); border-color: var(--hi); color: var(--accent-ink); }
.tile:focus-visible { outline-offset: 4px; }
.tile-icon { inline-size: 2.6rem; block-size: 2.6rem; background: oklch(0.16 0.035 255 / 0.55); border-color: oklch(1 0 0 / 0.25); }
.tile-text { display: grid; gap: 0.4rem; }
.tile-name { font: 700 var(--t-lead)/1.05 var(--font-display); text-transform: uppercase; }
.tile-sector { font: 600 var(--t-small)/1.3 var(--font-body); color: var(--hi); }
html:lang(ar) .tile-name, html:lang(ckb) .tile-name { line-height: 1.35; }

/* Companies index: a pipeline curve through five icon nodes, rows on hairlines, a sticky stage framed like the hero */
.index { padding-block: var(--gap-section); }
.index-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; margin-block-end: clamp(3rem, 6vw, 5rem); }
.index-head h2 { grid-column: 1 / span 7; }
.index-lead { grid-column: 9 / -1; margin: 0; color: var(--muted); }
.index-body { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.index-rail { position: relative; }
.pipeline { position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 3rem; block-size: 100%; overflow: visible; }
.pipeline path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.pipe-base { stroke: var(--line); }
.pipe-flow { stroke: var(--hi); stroke-dasharray: 1; stroke-dashoffset: 0; }
.index-list { position: relative; list-style: none; margin: 0; padding: 0; }
.row { position: relative; display: grid; grid-template-columns: 3rem 1fr; gap: clamp(1.25rem, 2.5vw, 2.25rem); padding-block: clamp(1.75rem, 3vw, 2.5rem); }
.row-text { position: relative; display: grid; gap: 0.7rem; justify-items: start; padding-block-start: 0.4rem; }
.row-bar { position: absolute; inset-inline: 0; inset-block-end: calc(-1 * clamp(1.75rem, 3vw, 2.5rem)); block-size: 1px; background: var(--line); }
.row-bar::after { content: ""; position: absolute; inset: -1px 0; background: var(--hi); transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--ease-out); }
html[dir="rtl"] .row-bar::after { transform-origin: right; }
.row:is(:hover, :focus-within) .row-bar::after { transform: scaleX(1); }
.row:is(:hover, :focus-within) .node { background: var(--hi); border-color: var(--hi); color: var(--accent-ink); transform: scale(1.08); }
.row-sector { display: flex; align-items: center; gap: 0.75rem; margin: 0; font: 700 var(--t-small)/1.2 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--hi); }
html:lang(ar) .row-sector, html:lang(ckb) .row-sector { letter-spacing: 0; }
.chapter-name { margin: 0; font: 700 var(--t-h3)/1 var(--font-display); text-transform: uppercase; color: var(--fg); transition: color var(--dur-2) var(--ease-out); }
html:lang(ar) .chapter-name, html:lang(ckb) .chapter-name { line-height: 1.3; }
.row:is(:hover, :focus-within) .chapter-name { color: var(--hi); }
.row-line { margin: 0; max-inline-size: 48ch; color: var(--fg); }
.row-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0; font-size: var(--t-small); color: var(--muted); }
.row-points li + li::before { content: "/"; margin-inline: 0.6rem; opacity: 0.5; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-block-start: 0.4rem; }
.row-link { display: inline-flex; align-items: center; gap: 0.4rem; min-block-size: 2.75rem; color: var(--fg); font-weight: 600; font-size: var(--t-small); text-decoration: underline; text-decoration-color: var(--hi); text-underline-offset: 0.35em; text-decoration-thickness: 2px; }
.row-link:hover { color: var(--hi); }
.row-soon { margin: 0; font-size: var(--t-small); color: var(--muted); }
.chapter-add { display: none; min-block-size: 2.75rem; padding: 0.5rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--fg); font: 600 var(--t-small)/1 var(--font-body); cursor: pointer; transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out); }
html.js .chapter-add { display: inline-flex; align-items: center; }
.chapter-add:hover { border-color: var(--hi); }
.chapter-add[aria-pressed="true"] { background: var(--hi); border-color: var(--hi); color: var(--accent-ink); }
.chapter.is-flash { animation: flash 1.4s var(--ease-out); }
@keyframes flash { 0%, 100% { outline: 0 solid transparent; } 30% { outline: 2px solid var(--hi); } }
.row-pic { display: none; }

.index-stage { position: sticky; inset-block-start: 6rem; display: grid; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 0.5rem; background: var(--s1); }
.stage-pic { position: relative; grid-area: 1 / 1; overflow: hidden; z-index: 0; clip-path: inset(100% 0 0 0); transition: clip-path 0s linear var(--dur-3); }
.stage-pic img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.4s var(--ease-out); }
.stage-pic::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, oklch(0.16 0.035 255 / 0.85), oklch(0.16 0.035 255 / 0) 55%); }
.index-stage .seam { block-size: 4rem; }
.stage-name { position: absolute; z-index: 3; inset-inline-start: 1.5rem; inset-block-end: 5rem; max-inline-size: 60%; margin: 0; font: 700 var(--t-h3)/1 var(--font-display); text-transform: uppercase; color: var(--fg); }
/* The first company shows until a row is pointed at or focused; the stage then wipes up to that row, like the hero slides */
.index-body:not(:has(.row:is(:hover, :focus-within))) .stage-pic:first-child,
.index-body:has(li:nth-child(1) .row:is(:hover, :focus-within)) .stage-pic:nth-child(1),
.index-body:has(li:nth-child(2) .row:is(:hover, :focus-within)) .stage-pic:nth-child(2),
.index-body:has(li:nth-child(3) .row:is(:hover, :focus-within)) .stage-pic:nth-child(3),
.index-body:has(li:nth-child(4) .row:is(:hover, :focus-within)) .stage-pic:nth-child(4),
.index-body:has(li:nth-child(5) .row:is(:hover, :focus-within)) .stage-pic:nth-child(5) { z-index: 1; clip-path: inset(0); transition: clip-path 0.9s var(--ease-out); }
.index-body:not(:has(.row:is(:hover, :focus-within))) .stage-pic:first-child img,
.index-body:has(.row:is(:hover, :focus-within)) .stage-pic img { transform: scale(1); }

/* The archive band: a second hero, with its waves, ink and two-tone title over the 1932 photograph */
.how { padding-block: 0 var(--gap-section); overflow-x: clip; }
.how-band { position: relative; isolation: isolate; margin: 0; overflow: hidden; min-block-size: min(80svh, 46rem); display: grid; align-items: end; }
.how-band img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08); z-index: -2; }
.how-band::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to right, oklch(0.16 0.035 255 / 0.9), oklch(0.16 0.035 255 / 0.35) 55%, oklch(0.16 0.035 255 / 0.1)),
              linear-gradient(to top, var(--bg), oklch(0.16 0.035 255 / 0) 40%); }
html[dir="rtl"] .how-band::after { background: linear-gradient(to left, oklch(0.16 0.035 255 / 0.9), oklch(0.16 0.035 255 / 0.35) 55%, oklch(0.16 0.035 255 / 0.1)), linear-gradient(to top, var(--bg), oklch(0.16 0.035 255 / 0) 40%); }
.band-title { position: relative; z-index: 1; padding: 0 max(var(--gap), calc((100% - var(--wrap)) / 2)) clamp(5.5rem, 11vw, 10rem); font-size: var(--t-h2); max-inline-size: 18ch; box-sizing: content-box; }
.how-band figcaption { position: absolute; z-index: 1; inset-block-start: 1.25rem; inset-inline-end: max(var(--gap), calc((100% - var(--wrap)) / 2)); font-size: var(--t-small); color: var(--fg); opacity: 0.8; }

.how-grid { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-block-start: clamp(3rem, 6vw, 5rem); }
.how-pic { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.5rem; }
.how-blocks { position: relative; display: grid; gap: clamp(2rem, 4vw, 3rem); justify-items: start; }
.how-block { position: relative; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line); }
.how-block::before { content: ""; position: absolute; inset-block-start: -2px; inset-inline-start: 0; inline-size: 3rem; block-size: 3px; background: var(--hi); }
.how-block h3 { margin: 0 0 0.6rem; font: 700 var(--t-h3)/1.1 var(--font-display); text-transform: uppercase; color: var(--fg); }
.how-block p { margin: 0; max-inline-size: 46ch; color: var(--muted); }

/* Contact: the hero mirrored, waves in the other two corners, the title with its last word in amber */
/* Contact sits on the footer's raised surface; its top edge is the seam, so the page ends on one curved plane */
.contact { position: relative; isolation: isolate; padding-block: calc(var(--gap-section) + clamp(2rem, 5vw, 5rem)) var(--gap-section); background: var(--s1); }
.contact > :not(.seam) { position: relative; z-index: 1; }
.contact-name { margin: 0 0 clamp(2rem, 4vw, 3rem); font-size: var(--t-title); line-height: 0.9; max-inline-size: 12ch; }
/* The smoke card: a framed window of slow amber smoke, the title, one line and the action centred in it. The border is
   a 1px amber gradient (padding-box over border-box); the film fades in over the still plate once it has a frame. */
.contact .smoke-card { position: relative; isolation: isolate; overflow: hidden; display: grid; place-content: center; justify-items: center; gap: 1.1rem;
  min-block-size: clamp(20rem, 28vw, 26rem); margin-block-end: clamp(2.5rem, 5vw, 4rem); padding: clamp(2.5rem, 5vw, 4rem) var(--gap); text-align: center;
  border: 1px solid transparent; border-radius: 1.25rem;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(135deg, color-mix(in oklch, var(--hi) 67%, transparent), color-mix(in oklch, var(--hi) 29%, transparent)) border-box; }
.smoke-plate, .smoke-film { position: absolute; inset: 0; z-index: -1; inline-size: 100%; block-size: 100%; max-inline-size: none; object-fit: cover; object-position: right bottom; }
.smoke-film { opacity: 0; transition: opacity 0.8s var(--ease-out); }
.smoke-card[data-on] .smoke-film { opacity: 0.8; }
/* A soft ink pool behind the words keeps the lead readable where the smoke runs bright (after the film, same layer) */
.smoke-card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 42% 58% at 50% 50%, oklch(0.16 0.035 255 / 0.7), transparent 78%); }
.smoke-lead { color: var(--fg); opacity: 0.86; }
.smoke-card .contact-name { margin: 0; max-inline-size: 18ch; }
.smoke-lead { margin: 0; max-inline-size: 40ch; color: var(--muted); }
.smoke-card .pill { margin-block-start: 0.75rem; transition: background-color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out); }
.smoke-card .pill:hover, .smoke-card .pill:focus-visible { transform: translateY(-1px); box-shadow: 0 0.5rem 2rem color-mix(in oklch, var(--hi) 45%, transparent); }
/* The entrance, once, when the card comes into view: title rises, the line fades, the action grows from its centre */
@media (prefers-reduced-motion: no-preference) {
  html.js .smoke-card > :is(h2, p, .pill) { opacity: 0; }
  html.js .smoke-card[data-in] > h2 { animation: smoke-rise 0.7s var(--ease-out) 0.1s both; }
  html.js .smoke-card[data-in] > p { animation: smoke-fade 0.6s var(--ease-out) 0.45s both; }
  html.js .smoke-card[data-in] > .pill { animation: smoke-grow 0.6s var(--ease-out) 0.75s both; }
}
@keyframes smoke-rise { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }
@keyframes smoke-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes smoke-grow { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .smoke-film { display: none; } }
.contact-row { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 0; font: 600 var(--t-h3)/1.1 var(--font-display); color: var(--fg); text-decoration: none; border-block-start: 1px solid var(--line); }
.contact-row:hover { color: var(--hi); }
.ask-lead { margin: clamp(3rem, 6vw, 4.5rem) 0 1.25rem; font-weight: 600; color: var(--muted); }
.ask-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ask-list a { display: inline-flex; align-items: center; gap: 0.6rem; min-block-size: 2.75rem; padding: 0.5rem 1.15rem; border: 1px solid var(--line); border-radius: 999px; background: var(--s1); color: var(--fg); font-size: var(--t-small); font-weight: 600; text-decoration: none; transition: border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.ask-list .icon { inline-size: 1.1rem; block-size: 1.1rem; color: var(--hi); }
.ask-list a:hover { border-color: var(--hi); color: var(--hi); }

/* Add-to-enquiry tray (JavaScript only) */
.tray { position: fixed; inset-inline-end: var(--gap); inset-block-end: var(--gap); z-index: 30; inline-size: min(22rem, calc(100vw - 2rem)); padding: 1.25rem; gap: 0.75rem; background: var(--s2); border: 1px solid var(--line-highlight); border-radius: 1.25rem; box-shadow: 0 30px 60px -20px var(--tone-19); }
.tray:not([hidden]) { display: grid; }
.tray-title { margin: 0; font: 700 1.25rem/1 var(--font-display); color: var(--fg); }
.tray-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; font-size: var(--t-small); color: var(--muted); }
.tray-empty { margin: 0; font-size: var(--t-small); color: var(--muted); }

/* Scroll motion: only where view timelines exist and motion is welcome; otherwise everything rests finished */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .intro-facts > div::before { animation: fill-bar linear both; animation-timeline: view(); animation-range: entry 40% cover 45%; }
    .intro-text .w { animation: lit linear both; animation-timeline: view(); animation-range: cover 20% cover 42%; }
    .intro-text .w-rest { animation-name: lit-rest; }
    .seam-hi { animation: draw linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
    .pipe-flow { animation: draw linear both; animation-timeline: view(); animation-range: cover 5% cover 75%; }
    .how-band img { animation: drift linear both; animation-timeline: view(); }
  }
}
@keyframes lit { from { color: var(--dim); } to { color: var(--fg); } }
@keyframes lit-rest { from { color: var(--dim); } to { color: var(--hi); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes drift { from { transform: scale(1.15); } to { transform: scale(1); } }

@media (max-width: 63.99rem) {
  .tiles { padding-inline: 0; }
  .tiles-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gap); padding-inline: var(--gap); scrollbar-width: none; }
  .tiles-list li { flex: 0 0 72vw; scroll-snap-align: start; }
  .index-head h2, .index-lead { grid-column: 1 / -1; }
  .index-body, .how-grid { grid-template-columns: 1fr; }
  .index-stage { display: none; }
  .row-pic { display: block; grid-column: 2; margin: 0.5rem 0 0; overflow: hidden; border-radius: 0.5rem; }
  .row-pic img { inline-size: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
  .how-band { min-block-size: 70svh; }
}

/* Focus rings hold 3:1 on the dark ground */
.index :focus-visible, .contact :focus-visible, .how :focus-visible { outline-color: var(--focus); }

/* The hero: the company in view plays on a stage card, the other four wait in a row of thumbnails under it. Stage and row
   are one block sized from the free area (container query units), so it fills that area without crossing it; cards and
   film are 16:9, the shape of the film and the photographs, so cover crops nothing. A glow in the company's colour sits
   behind the stage, so each change of company is also a change of light. */
.hero { --hero-ink: oklch(0.16 0.035 255); --dir: 1; position: relative; isolation: isolate; overflow: hidden; min-block-size: max(100svh, 40rem); display: grid; align-content: end; color: var(--fg);
  background: radial-gradient(circle at calc(50% + var(--dir) * 24%) 48%, color-mix(in srgb, var(--wave-hi) 30%, transparent), transparent 46%), var(--bg); }
html[dir="rtl"] .hero { --dir: -1; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, oklch(0.16 0.035 255 / 0.45) 0%, oklch(0.16 0.035 255 / 0) 22%); }
/* The free area: beside the copy (after its column and a 2.5rem gap) to the page margin, under the bar, above the band */
/* --corner is the corner waves' size (as designed); the back wave reaches 56% of it up from its corner */
.hero { --margin: max(var(--gap), calc((100% - var(--wrap)) / 2)); --band: clamp(5rem, 11vw, 10rem); --corner: max(min(42vw, 42rem, 70svh), 37rem); } /* the svh cap only bites on short screens; 37rem keeps the header wordmark wholly on the light wave */
.hero-stage { position: absolute; z-index: 1; container-type: size; display: grid; place-items: center;
  inset-block: 6.5rem max(var(--band), calc(var(--corner) * 0.56 + 1rem)); inset-inline-start: calc(var(--margin) + min(42%, 36rem) + 3rem); inset-inline-end: var(--margin); }
/* The block: stage W x 9/16 W, a gap of 2% W, then four thumbnails of 23.5% W at 16:9; height 0.7147 W in all */
.showcase-slides { position: relative; inline-size: min(100cqw, 139.9cqh); aspect-ratio: 1 / 0.7147; }
/* The film sits exactly on the stage slot, above the photographs, and fades in once it plays */
.hero-film { position: absolute; inset-block-start: 0; inset-inline-start: 0; z-index: 4; inline-size: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 1rem; opacity: 0; transition: opacity 1.2s var(--ease-out); pointer-events: none; }
.hero[data-film] .hero-film { opacity: 1; }
.hero .slide img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; max-inline-size: none; max-block-size: none; object-fit: cover; object-position: 50% 50%; filter: saturate(0.96) contrast(1.04); }
/* The band: the page's own ground, rising in a soft wave over the foot of the stage */
.hero-band { position: absolute; z-index: 1; inset-inline: 0; inset-block-end: -1px; inline-size: 100%; block-size: var(--band); fill: var(--bg); pointer-events: none; }
/* The corner waves: the same shape in two corners (the bottom-right one is turned 180 degrees), coloured from the photograph */
@property --wave-hi { syntax: "<color>"; inherits: true; initial-value: #fdb31a; }
@property --wave-lo { syntax: "<color>"; inherits: true; initial-value: #8c6213; }
.hero { transition: --wave-hi 1s var(--ease-out), --wave-lo 1s var(--ease-out); }
.hero-corner { position: absolute; z-index: 2; inline-size: var(--corner); block-size: auto; aspect-ratio: 1; pointer-events: none; }
.corner-tl { inset-block-start: 0; inset-inline-start: 0; }
.corner-br { inset-block-end: 0; inset-inline-end: 0; transform: rotate(180deg); }
.hero-corner .wave-back { fill: var(--wave-lo); }
.hero-corner .wave-front { fill: var(--wave-hi); }
/* Right to left: the insets are logical and already swap sides, so only the shape is mirrored (top-right under the
   wordmark, bottom-left away from the copy) */
html[dir="rtl"] .corner-tl { transform: scaleX(-1); }
html[dir="rtl"] .corner-br { transform: scaleY(-1); }
/* The timer bars fill from the reading start, and the arrows point the reading way */
html[dir="rtl"] .hero .progress-btn::after { transform-origin: right center; }
html[dir="rtl"] .hero .progress-arrow svg { transform: scaleX(-1); }

/* Left column: headline, the company in view, controls, in one flow */
/* In flow, starting below the top wave's reach; when it needs more room than the screen gives, the hero grows */
.hero .hero-copy { position: relative; z-index: 3; margin-inline-start: var(--margin); padding-block: calc(var(--corner) * 0.5) clamp(2rem, 5vh, 4rem); inline-size: min(42%, 36rem); align-content: end; display: grid; gap: 1.3rem; justify-items: start; }
.hero .hero-head { display: grid; gap: 1rem; }
.hero .hero-head::before, .hero .hero-head::after { content: none; }
.hero .hero-title { margin: 0; font: 700 var(--t-title)/0.92 var(--font-display); text-transform: uppercase; letter-spacing: 0.005em; color: var(--fg); text-shadow: 0 2px 24px oklch(0.16 0.035 255 / 0.35); }
.hero .hero-title .line { display: block; }
.hero .hero-title .line:last-child { color: var(--wave-hi); }
.hero .hero-lead { margin: 0; max-inline-size: 36ch; font: 500 var(--t-body)/1.55 var(--font-body); color: var(--muted); }
/* The company in view: name, sector, line and one pill action */
.hero .hero-caps { display: grid; }
.hero .slide-cap { position: relative; display: none; gap: 0.5rem; justify-items: start; }
.hero .slide-cap[data-active] { display: grid; }
.hero .slide-name { margin: 0; font: 700 var(--t-h3)/1 var(--font-display); text-transform: uppercase; color: var(--fg); }
.hero .slide-sector { margin: 0; font: 700 var(--t-small)/1.2 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--wave-hi); }
.hero .slide-line { margin: 0; max-inline-size: 46ch; font-size: var(--t-small); line-height: 1.5; color: var(--muted); }
.hero .slide-cta { margin-block-start: 0.4rem; display: inline-flex; align-items: center; min-block-size: 3rem; padding: 0.7rem 1.6rem; border-radius: 999px; background: var(--wave-hi); color: var(--accent-ink); font: 700 var(--t-small)/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; transition: background-color var(--dur-1) var(--ease-out); }
.hero .slide-cta:hover, .hero .slide-cta:focus-visible { background: var(--fg); color: var(--accent-ink); }
/* The controls: bars with a fill for the time left, and the arrows */
.hero .showcase-progress { display: flex; align-items: center; gap: 1rem; margin: 0; }
.hero .progress-list { display: flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.hero .progress-btn { position: relative; inline-size: 3.2rem; block-size: 1.6rem; padding: 0; background: none; border: 0; cursor: pointer; }
.hero .progress-btn::before { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; block-size: 3px; background: oklch(0.97 0.006 240 / 0.3); }
.hero .progress-btn::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; block-size: 3px; background: var(--wave-hi); transform: scaleX(0); transform-origin: left center; }
.hero .progress-btn[aria-current="true"]::after { animation: fill-bar 7s linear both; }
.hero .progress-btn:focus-visible { outline-offset: 4px; }
.hero .progress-arrow { inline-size: 2.25rem; block-size: 2.25rem; display: grid; place-items: center; border: 0; background: none; color: var(--fg); cursor: pointer; }
.hero .progress-arrow svg { inline-size: 1.6rem; block-size: 1.6rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.hero .progress-arrow:hover, .hero .progress-arrow:focus-visible { color: var(--wave-hi); }
/* Narrow screens: the stage on top, the copy at the foot */
@media (max-width: 63.99rem) {
  .hero { min-block-size: 38rem; }
  .hero .hero-copy { inset-block-start: auto; inset-block-end: 2.5rem; inline-size: auto; inset-inline: var(--gap); }
  .hero .hero-title { font-size: clamp(2.2rem, 9vw, 3.2rem); }
  .hero { --corner: min(64vw, 18rem); }
}
/* Proof strip: two facts under the controls, in the same type as the rest of the copy */
.hero .hero-proof { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; margin: 0.5rem 0 0; }
.hero .hero-proof > div { display: grid; gap: 0.25rem; }
.hero .hero-proof dt { font: 700 var(--t-small)/1 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--wave-hi); }
.hero .hero-proof dd { margin: 0; font: 600 var(--t-body)/1.2 var(--font-display); color: var(--fg); }
@media (prefers-reduced-motion: reduce) {
  .slide, .slide img { transition: none; }
}

/* The queue: each card is the stage slot (W x 9/16 W) moved and scaled from its top inline-start corner. data-pos 0 is the
   stage, 1-4 the thumbnails in order: x = k * 25.5% (23.5% card + 2% gap), y = 103.56% (the stage height + 2% W gap),
   scale 0.235. On a change the first thumbnail grows into the stage and the old stage shrinks to the end of the row.
   Only transform and opacity move, so the glide stays on the compositor. */
.slide { position: absolute; inset-block-start: 0; inset-inline-start: 0; inline-size: 100%; aspect-ratio: 16 / 9; margin: 0; overflow: hidden; border-radius: 1rem;
  box-shadow: 0 2rem 4rem -1.5rem oklch(0.1 0.03 255 / 0.7); transform-origin: 0 0; cursor: pointer;
  transition: transform 0.9s var(--ease-out), opacity 0.9s var(--ease-out), border-radius 0.9s var(--ease-out); }
html[dir="rtl"] .slide { transform-origin: 100% 0; }
.slide[data-pos="0"] { z-index: 3; cursor: default; }
.slide:not([data-pos="0"]) { z-index: 2; opacity: 0.6; border-radius: 2.65rem; } /* scaled by .235 this is a 0.625rem corner, in proportion to the stage's 1rem */
.slide:not([data-pos="0"]):hover { opacity: 1; }
.slide[data-pos="1"] { transform: translate(0%, 103.56%) scale(0.235); }
.slide[data-pos="2"] { transform: translate(calc(var(--dir) * 25.5%), 103.56%) scale(0.235); }
.slide[data-pos="3"] { transform: translate(calc(var(--dir) * 51%), 103.56%) scale(0.235); }
.slide[data-pos="4"] { transform: translate(calc(var(--dir) * 76.5%), 103.56%) scale(0.235); }
/* The hero's one authored moment, in two parts. The title lines rise into view, each from behind its own edge, on load;
   each time the company changes, its caption settles in part by part from a little below and out of focus. Words and
   lines move whole, never letters, so Arabic and Kurdish stay joined. Without motion (or script) everything simply shows. */
@media (prefers-reduced-motion: no-preference) {
  /* The edge: the line clips its text, with room above and below so tall letters and Arabic marks are never cut */
  html.js .hero .hero-title .line { overflow: clip; padding-block: 0.14em; margin-block: -0.14em; }
  html.js .hero .hero-title .line > span { display: inline-block; animation: title-rise 1.1s var(--ease-out) 0.15s both; }
  html.js .hero .hero-title .line + .line > span { animation-delay: 0.3s; }
  html.js .hero .slide-cap[data-active] > * { animation: cap-in 0.7s var(--ease-out) both; }
  html.js .hero .slide-cap[data-active] > :nth-child(2) { animation-delay: 0.07s; }
  html.js .hero .slide-cap[data-active] > :nth-child(3) { animation-delay: 0.14s; }
  html.js .hero .slide-cap[data-active] > :nth-child(4) { animation-delay: 0.21s; }
}
@keyframes title-rise { from { transform: translateY(110%); } }
@keyframes cap-in { from { opacity: 0; transform: translateY(0.75em); filter: blur(6px); } }
/* The timer: a bar under the current numeral fills over the seven seconds until the next slide */
@keyframes fill-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.progress-btn[aria-current="true"]::after { background: var(--wave-hi); opacity: 1; transform-origin: left center; animation: fill-bar 7s linear both; }
.hero:hover .progress-btn[aria-current="true"]::after { animation-play-state: paused; }


/* Without JavaScript the first slide stands alone and its caption is visible */
html:not(.js) .slide:not([data-pos="0"]) { opacity: 0.6; }

/* Narrow screens: the facts the intro repeats step aside, and the hero fits under the bar (kept last to win) */
@media (max-width: 63.99rem) {
  .hero .hero-proof { display: none; }
  /* Narrow screens stack in normal flow (stage, then copy) instead of pinning both, so they can never run into each other */
  .hero { block-size: auto; min-block-size: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem;
    padding: calc(var(--corner) * 0.48) var(--gap) calc(var(--corner) * 0.56 + 1rem); } /* clear of both corner waves */
  .hero .progress-btn { inline-size: 2.4rem; } /* five bars and both arrows fit a 320px screen */
  .hero-stage { position: relative; inset: auto; container-type: inline-size; display: block; }
  .showcase-slides { inline-size: 100cqw; }
  .hero .hero-copy { inset: auto; inline-size: auto; margin: 0; padding: 0; }
}
/* Arabic script needs room for its dots and marks: the hero title opens its line height */
html:lang(ar) .hero .hero-title, html:lang(ckb) .hero .hero-title { line-height: 1.2; }
/* The slide arrows can sit over the amber wave: an ink disc keeps the white arrow readable on any ground */
.hero .progress-arrow { border-radius: 50%; background: oklch(0.16 0.035 255 / 0.6); }

/* Intro: the statement at display size, lit word by word on scroll, its answer in amber; beside it the statement drawn,
   five companies on a ring around the group's hexagon; under both the facts as numbers on amber bars. */
.intro { padding-block: var(--gap-section) clamp(4rem, 7vw, 6rem); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.intro-kicker { display: flex; align-items: center; gap: 0.75rem; margin: 0; font: 700 var(--t-small)/1 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--hi); }
.intro-kicker::before { content: ""; inline-size: 2.5rem; block-size: 3px; background: var(--hi); }
html:lang(ar) .intro-kicker, html:lang(ckb) .intro-kicker { letter-spacing: 0; }
.intro-text { margin: 1.5rem 0 0; max-inline-size: 22ch; font: 700 var(--t-h2)/1.02 var(--font-display); letter-spacing: var(--track-display); color: var(--fg); text-wrap: balance; }
html:lang(ar) .intro-text, html:lang(ckb) .intro-text { max-inline-size: 24ch; line-height: 1.45; }
.intro-text .w { display: inline-block; }
.w-rest { color: var(--hi); }

/* The orbit: points on a ring (viewBox 0-100), nodes placed on the same points; a pentagon, so it reads the same mirrored */
.orbit { position: relative; inline-size: min(100%, 32rem); aspect-ratio: 1; justify-self: center; margin-block-end: 2rem; }
.orbit-lines { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
.orbit-ring { fill: none; stroke: var(--line); stroke-width: 0.3; stroke-dasharray: 0.6 1.4; transform-box: fill-box; transform-origin: center; }
.orbit-spoke { stroke: var(--hi); stroke-width: 0.35; stroke-opacity: 0.55; stroke-dasharray: 1; }
.orbit-core { position: absolute; inset: 50% auto auto 50%; display: grid; place-items: center; inline-size: 26%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, oklch(0.72 0.16 230 / 0.22), transparent 70%); color: var(--fg); }
.orbit-core::before, .orbit-core::after { content: ""; position: absolute; inset: 8%; border: 1px solid var(--line-highlight); border-radius: 50%; }
.orbit-core::after { inset: -14%; border-color: var(--line); }
.orbit-core .mark { inline-size: 52%; block-size: 52%; filter: drop-shadow(0 0 1.25rem oklch(0.72 0.16 230 / 0.55)); }
.orbit-list { list-style: none; margin: 0; padding: 0; }
.orbit-node { position: absolute; display: flex; justify-content: center; inline-size: 0; block-size: 0; }
.o1 { inset-inline-start: 50%; inset-block-start: 12%; }
.o2 { inset-inline-start: 86.1%; inset-block-start: 38.3%; }
.o3 { inset-inline-start: 72.3%; inset-block-start: 80.7%; }
.o4 { inset-inline-start: 27.7%; inset-block-start: 80.7%; }
.o5 { inset-inline-start: 13.9%; inset-block-start: 38.3%; }
.orbit-node a { flex: none; display: grid; justify-items: center; gap: 0.5rem; inline-size: max-content; max-inline-size: 10rem; margin-block-start: -1.6rem; color: var(--fg); text-align: center; text-decoration: none; }
.o1 { align-items: flex-end; }
.o1 a { margin-block: 0 -1.6rem; }
.o1 .orbit-name { order: -1; }
.orbit-dot { display: grid; place-items: center; inline-size: 3.2rem; block-size: 3.2rem; border: 1px solid var(--hi); border-radius: 50%; background: var(--bg); color: var(--hi); box-shadow: 0 0 0 0.4rem var(--bg); transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.orbit-name { padding: 0.15rem 0.4rem; border-radius: 0.25rem; background: var(--bg); font: 700 var(--t-small)/1.15 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; text-wrap: balance; hyphens: none; }
.orbit-name .nb { white-space: nowrap; }
html:lang(ar) .orbit-name, html:lang(ckb) .orbit-name { letter-spacing: 0; text-transform: none; line-height: 1.5; }
.orbit-node a:is(:hover, :focus-visible) .orbit-dot { background: var(--hi); color: var(--accent-ink); transform: scale(1.1); }
.orbit-node a:focus-visible { outline: none; }
.orbit-node a:focus-visible .orbit-dot { outline: 2px solid var(--focus); outline-offset: 4px; }

/* The facts: numbers where there are numbers, words where there are words */
.intro-facts { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: var(--gap); margin: clamp(3rem, 6vw, 5rem) 0 0; }
.intro-facts > div { position: relative; padding-block-start: 1.25rem; border-block-start: 1px solid var(--line); }
.intro-facts > div::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: -2px; block-size: 3px; background: var(--hi); transform-origin: left; }
html[dir="rtl"] .intro-facts > div::before { transform-origin: right; }
.intro-facts dt { font: 700 var(--t-small)/1.2 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--hi); }
html:lang(ar) .intro-facts dt, html:lang(ckb) .intro-facts dt { letter-spacing: 0; }
.intro-facts dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1rem; margin: 0.6rem 0 0; }
.fact-num { font: 700 clamp(3rem, 2rem + 3vw, 4.75rem)/0.9 var(--font-display); letter-spacing: -0.02em; color: var(--fg); font-variant-numeric: tabular-nums; }
.fact-note { font: 600 var(--t-lead)/1.3 var(--font-display); color: var(--muted); }
.fact-wide .fact-note { color: var(--fg); }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .orbit-spoke { animation: draw linear both; animation-timeline: view(); animation-range: entry 30% cover 50%; }
    .orbit-node { animation: orbit-in linear both; animation-timeline: view(); animation-range: entry 30% cover 45%; }
  }
}
@media (prefers-reduced-motion: no-preference) { .orbit-ring { animation: spin 90s linear infinite; } }
@keyframes orbit-in { from { opacity: 0; scale: 0.6; } }
@keyframes spin { to { rotate: 360deg; } }

@media (max-width: 63.99rem) {
  .intro-grid { grid-template-columns: 1fr; }
  .orbit { inline-size: min(100%, 24rem); margin-block: 1.5rem 3rem; }
  .intro-facts { grid-template-columns: 1fr 1fr; }
  .fact-wide { grid-column: 1 / -1; }
}
@media (max-width: 30rem) {
  .orbit { inline-size: 82%; }
  .orbit-dot { inline-size: 2.6rem; block-size: 2.6rem; }
  .orbit-node a { max-inline-size: 7.5rem; margin-block-start: -1.3rem; }
  .o1 a { margin-block: 0 -1.3rem; }
  .orbit-name { font-size: 0.75rem; }
}

/* Inner pages in the home page's language: Oil Services (photo hero, icon rows, the job on a drawn line), the enquiry
   (promise beside a raised form), the 404 (the hero's corner wave), and the footer's seam and icon rows. */

/* Oil Services: the photograph full-bleed, the copy at its foot on a scrim, the seam into the page */
.dhero { position: relative; isolation: isolate; display: grid; align-items: end; min-block-size: min(88svh, 56rem); padding: clamp(8rem, 16vw, 12rem) var(--gap) clamp(6rem, 11vw, 10rem); overflow: hidden; }
.dhero-photo { position: absolute; inset: 0; z-index: -2; inline-size: 100%; block-size: 100%; object-fit: cover; }
.dhero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--bg) 4%, oklch(0.16 0.035 255 / 0.7) 45%, oklch(0.16 0.035 255 / 0.15)); }
.dhero-copy { display: grid; gap: 1.5rem; justify-items: start; max-inline-size: 52rem; }
.dhero-title { font-size: var(--t-title); }
.dhero-lead { margin: 0; color: var(--fg); max-inline-size: 40ch; }

.dpoints { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: start; padding: var(--gap-section) var(--gap) calc(var(--gap-section) * 0.6); }
.dpoints-line { grid-column: 1 / span 5; margin: 0; font: 600 var(--t-lead)/1.35 var(--font-body); color: var(--fg); text-wrap: pretty; }
.dpoints-list { grid-column: 7 / -1; list-style: none; margin: 0; padding: 0; display: grid; }
.dpoints-list li { display: flex; align-items: center; gap: 1.25rem; padding-block: 1.25rem; border-block-end: 1px solid var(--line); }
.dpoints-list li:first-child { border-block-start: 1px solid var(--line); }
.dpoints-list .node { color: var(--hi); }
.dpoints-name { font: 700 var(--t-h3)/1.1 var(--font-display); text-transform: uppercase; }
html:lang(ar) .dpoints-name, html:lang(ckb) .dpoints-name { text-transform: none; line-height: 1.4; }

/* The job: four steps hanging on one amber line that draws itself as the section scrolls in */
.dsteps { display: grid; gap: clamp(2.5rem, 5vw, 4rem); justify-items: start; padding: calc(var(--gap-section) * 0.6) var(--gap) var(--gap-section); }
.dsteps-list { position: relative; inline-size: 100%; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.dsteps-list::before, .dsteps-list::after { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0.6rem; block-size: 2px; background: var(--line); }
.dsteps-list::after { background: var(--hi); transform-origin: left; }
html[dir="rtl"] .dsteps-list::after { transform-origin: right; }
.dsteps-list li { position: relative; z-index: 1; display: grid; gap: 1.25rem; font: 700 var(--t-lead)/1.2 var(--font-display); text-transform: uppercase; }
html:lang(ar) .dsteps-list li, html:lang(ckb) .dsteps-list li { text-transform: none; line-height: 1.5; }
.dsteps-dot { inline-size: 1.25rem; block-size: 1.25rem; border-radius: 50%; border: 2px solid var(--hi); background: var(--bg); }
.dsteps-list li:last-child .dsteps-dot { background: var(--hi); }

/* Enquiry: the promise and what happens next at the start, the form on a raised panel at the end */
.enq { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: start; padding: clamp(3rem, 7vw, 6rem) var(--gap) var(--gap-section); }
.enq-side { grid-column: 1 / span 5; position: sticky; inset-block-start: 7rem; display: grid; gap: 1.25rem; justify-items: start; }
.enq-sent .enq-side { grid-column: 1 / span 8; position: static; }
.enq-title { font-size: var(--t-title); }
.enq-side .lead { margin: 0; }
.enq-next { margin: 1rem 0 0; padding-block-start: 1.25rem; border-block-start: 1px solid var(--line); font: 700 var(--t-small)/1 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--hi, var(--accent)); }
.enq-note { margin: 0; color: var(--muted); max-inline-size: 40ch; }
.enq-form { grid-column: 7 / -1; padding: clamp(1.5rem, 3vw, 2.75rem); background: var(--s1); border: 1px solid var(--line); border-radius: 1.25rem; }
.enq-form label:first-of-type { margin-block-start: 0; }
.enq-form :is(input, select, textarea) { min-block-size: 3rem; border-radius: 0.65rem; transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out); }
.enq-form :is(input, select, textarea):hover { border-color: var(--muted); }
.enq-form :is(input, select, textarea):focus-visible { outline: none; border-color: var(--hi); box-shadow: 0 0 0 3px oklch(0.8 0.15 75 / 0.25); }
.enq-form .pill { justify-self: start; margin-block-start: 1.25rem; border: 0; cursor: pointer; }

/* 404 and errors: the hero's amber corner wave and the way home */
.lost { position: relative; isolation: isolate; display: grid; align-items: center; min-block-size: 72svh; padding: clamp(8rem, 14vw, 11rem) var(--gap) var(--gap-section); overflow: hidden; }
.lost .hero-corner { z-index: -1; inline-size: min(38vw, 34rem); }
.lost-copy { display: grid; gap: 1.5rem; justify-items: start; max-inline-size: 46rem; margin-inline-start: clamp(0rem, 18vw, 20rem); }
.lost-title { font-size: var(--t-title); }
.lost .lead { margin: 0; }
.lost-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pill-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.pill-ghost:hover, .pill-ghost:focus-visible { background: var(--s2); color: var(--fg); }

/* Footer: the seam from the page above (the home page's contact band is already on this surface), icon rows */
.card-back { position: relative; padding-block-start: calc(clamp(4rem, 8vw, 7rem) + clamp(2rem, 5vw, 5rem)); }
.card-back > .seam { --hi: #fdb31a; --lo: #8c6213; }
body:has(.hero) .card-back > .seam { display: none; }
body:has(.hero) .card-back { padding-block-start: clamp(4rem, 8vw, 7rem); }
.card-sign-line .line { display: block; }
.card-sign-line .line-hi { color: #fdb31a; }
.card-list { gap: 0; }
.card-list li { display: flex; align-items: center; gap: 0.85rem; padding-block: 0.55rem; border-block-end: 1px solid var(--line); }
.card-list .node { inline-size: 2.25rem; block-size: 2.25rem; color: var(--hi); background: transparent; }
.card-list .icon { inline-size: 1.05rem; block-size: 1.05rem; }

/* Scroll motion for the inner pages, on the same terms as the home page's */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .dsteps-list::after { animation: grow linear both; animation-timeline: view(); animation-range: entry 30% cover 50%; }
    .dhero-photo { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
    .dpoints-list li { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
  }
}
@keyframes grow { from { transform: scaleX(0); } }
@keyframes rise { from { opacity: 0; translate: 0 1.5rem; } }

/* The inner pages share the home page's content edge (after their padding shorthands, so it wins) */
.dhero, .dpoints, .dsteps, .enq, .lost { padding-inline: max(var(--gap), calc((100% - var(--wrap)) / 2)); }

/* Moving between pages cross-fades instead of flashing (same-origin navigations, where supported) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

@media (max-width: 63.99rem) {
  .dhero { min-block-size: 0; padding-block-start: 10rem; }
  .dpoints-line, .dpoints-list, .enq-side, .enq-form, .enq-sent .enq-side { grid-column: 1 / -1; }
  .enq-side { position: static; }
  .dsteps-list { grid-template-columns: 1fr; gap: 2rem; padding-inline-start: 2.5rem; }
  .dsteps-list::before, .dsteps-list::after { inset-inline: auto; inset-inline-start: 0.55rem; inset-block: 0.6rem 0.6rem; inline-size: 2px; block-size: auto; }
  .dsteps-list::after { transform-origin: top; }
  .dsteps-list li { display: block; }
  .dsteps-dot { position: absolute; inset-inline-start: -2.5rem; inset-block-start: 0.2rem; }
  .lost-copy { margin-inline-start: 0; }
  .lost .hero-corner { inline-size: 60vw; opacity: 0.6; }
}
@media (max-width: 63.99rem) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) { .dsteps-list::after { animation-name: grow-down; } }
}
@keyframes grow-down { from { transform: scaleY(0); } }

/* Search: an icon button beside the language opens the finder, a dialog of the home page's sections, the five companies
   and the enquiry, filtered as you type (client/main.ts) */
.bar-search { display: inline-grid; place-items: center; flex: none; inline-size: 2.75rem; block-size: 2.75rem; border: 1px solid var(--line); border-radius: 9999px; color: var(--fg); transition: border-color var(--dur-1), color var(--dur-1); }
.bar-search:hover, .bar-search:focus-visible { border-color: var(--line-highlight); color: var(--accent); }
.search-glyph { inline-size: 18px; block-size: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.search { inline-size: min(40rem, calc(100vw - 2rem)); max-block-size: min(72vh, 38rem); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--bg); color: var(--fg); box-shadow: 0 30px 80px -20px oklch(0.05 0.02 255 / 0.8); }
.search::backdrop { background: oklch(0.08 0.03 255 / 0.6); backdrop-filter: blur(4px); }
.search-in { display: grid; grid-template-rows: auto 1fr; max-block-size: inherit; }
.search-field { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; border-block-end: 1px solid var(--line); color: var(--accent); }
.search-field .search-glyph { inline-size: 22px; block-size: 22px; }
.search-field input { flex: 1; min-inline-size: 0; border: 0; background: none; color: var(--fg); caret-color: var(--accent); font: 500 var(--t-lead)/1.3 var(--font-body); outline: none; }
.search-field input::placeholder { color: var(--muted); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-results { overflow: auto; overscroll-behavior: contain; padding: 0.5rem; display: grid; align-content: start; }
.search-group { margin: 0.85rem 0.75rem 0.25rem; color: var(--muted); font-size: var(--t-micro); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
html:lang(ar) .search-group, html:lang(ckb) .search-group { letter-spacing: 0; }
.search-item { display: flex; align-items: center; gap: 0.85rem; padding: 0.6rem 0.75rem; border-radius: 0.5rem; color: var(--fg); font-weight: 600; text-decoration: none; transition: background-color var(--dur-1) var(--ease-out); }
.search-item small { display: block; margin-block-start: 0.1rem; color: var(--muted); font-size: var(--t-small); font-weight: 400; }
.search-node { display: grid; place-items: center; flex: none; inline-size: 2rem; block-size: 2rem; color: var(--hi); }
.search-node svg { inline-size: 1.35rem; block-size: 1.35rem; }
.search-dot { flex: none; inline-size: 2rem; display: grid; place-items: center; }
.search-dot::after { content: ''; inline-size: 0.45rem; block-size: 0.45rem; border-radius: 50%; background: var(--accent); }
.search-item:hover, .search-item:focus-visible, .search-item.on { background: var(--s1); outline: none; }
.search-item[hidden], .search-group[hidden] { display: none; }
.search-empty { margin: 1rem 0.75rem; color: var(--muted); }
.search-empty a { color: var(--accent); font-weight: 600; }
/* The narrowest phones: the mark alone, so search and the language fit (the link keeps the name as its label) */
@media (max-width: 23.4rem) { .wordmark span { display: none; } }
