/* APSS — Arabian Projects Support and Services Co.
   Palette is taken from the APSS logo: navy #0D3148, signal red #B61926. */

:root {
  --navy: #0D3148;
  --night: #071A2B;
  --navy-2: #13405F;
  --red: #B61926;
  --red-hot: #D63341;
  --steel: #F1F4F7;
  --paper: #FFFFFF;
  --line: #D6DEE6;
  --line-dark: rgba(255, 255, 255, 0.16);
  --ink: #122232;
  --muted: #526276;
  --on-dark: #E8EEF4;
  --on-dark-muted: #A9B8C8;

  --font: "Archivo", "Segoe UI", system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 136px);
  --radius: 4px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

:lang(ar) body, html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.8; }
[lang="ar"] { font-family: var(--font-ar); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 700; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--red); color: #fff; padding: 10px 16px; border-radius: var(--radius); text-decoration: none; }
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--red-hot); outline-offset: 3px; border-radius: 2px; }

/* Display type: expanded Archivo carries the industrial voice */
h1, h2, .brand-name, .fleet-stats dd, .tab-name {
  font-variation-settings: "wdth" 115;
  letter-spacing: -0.015em;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] .tab-name { letter-spacing: 0; line-height: 1.35; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; border-radius: var(--radius); border: 1.5px solid transparent;
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #9E1420; }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-block { width: 100%; }
.btn-whatsapp { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); margin-top: 28px; }
.btn-whatsapp::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--wa) center/contain no-repeat; mask: var(--wa) center/contain no-repeat;
  --wa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2Zm0 18.2a8.2 8.2 0 0 1-4.2-1.1l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2Zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.7.8-.8 1-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.3-.4.7-1.3a.5.5 0 0 0 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.8 11.9 11.9 0 0 0 4.6 4c1.7.7 2.3.8 3.2.7a2.7 2.7 0 0 0 1.8-1.3 2.2 2.2 0 0 0 .2-1.3c-.1-.1-.3-.2-.5-.3Z'/%3E%3C/svg%3E"); }
.btn-whatsapp:hover { background: #1FA855; border-color: #1FA855; }

.text-link { color: inherit; font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.text-link:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  color: #fff;
  transition: background-color .25s, box-shadow .25s, color .25s;
}
.site-header.is-solid { background: rgba(255,255,255,.97); color: var(--ink); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.header-row { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-inline-end: auto; }
.brand-mark { width: 44px; height: auto; }
.brand-mark--dark { display: none; }
.is-solid .brand-mark--light { display: none; }
.is-solid .brand-mark--dark { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.3rem; letter-spacing: .02em; }
.brand-full { font-size: .78rem; opacity: .8; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; padding: 10px 14px; border-radius: var(--radius); white-space: nowrap; }
.nav a:hover { background: rgba(127,127,127,.14); }
.nav .nav-cta { background: var(--red); color: #fff; margin-inline-start: 10px; }
.nav .nav-cta:hover { background: #9E1420; }

.lang-toggle {
  font: inherit; font-family: var(--font-ar); font-weight: 600; font-size: .95rem;
  background: transparent; color: inherit; border: 1.5px solid currentColor; border-radius: var(--radius);
  padding: 7px 14px; cursor: pointer; opacity: .9;
}
.lang-toggle:hover { opacity: 1; }
html[lang="ar"] .lang-toggle { font-family: var(--font); }

.menu-toggle { display: none; background: none; border: 0; color: inherit; width: 44px; height: 44px; cursor: pointer; padding: 0; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 24px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform .2s; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -7px; }
.menu-bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); color: var(--ink);
    padding: 12px var(--gutter) 24px;
    box-shadow: 0 16px 30px rgba(7, 26, 43, .18);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.05rem; }
  .nav .nav-cta { margin: 16px 0 0; text-align: center; border-radius: var(--radius); border: 0; }
  .site-header.menu-open { background: var(--paper); color: var(--ink); }
  .site-header.menu-open .brand-mark--light { display: none; }
  .site-header.menu-open .brand-mark--dark { display: block; }
}
@media (max-width: 480px) { .brand-full { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100svh, 940px);
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; background: var(--night);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,26,43,.92) 0%, rgba(7,26,43,.72) 42%, rgba(7,26,43,.25) 100%),
    linear-gradient(0deg, rgba(7,26,43,.95) 0%, rgba(7,26,43,0) 45%);
}
html[dir="rtl"] .hero-media::after {
  background:
    linear-gradient(270deg, rgba(7,26,43,.92) 0%, rgba(7,26,43,.72) 42%, rgba(7,26,43,.25) 100%),
    linear-gradient(0deg, rgba(7,26,43,.95) 0%, rgba(7,26,43,0) 45%);
}

/* The orbit from the APSS mark, drawn once across the hero */
.hero-orbit { position: absolute; z-index: -1; inset: 8% -6% auto -6%; width: 112%; height: 78%; pointer-events: none; }
.hero-orbit ellipse { fill: none; stroke: var(--red); stroke-width: 2.5; vector-effect: non-scaling-stroke; opacity: .9;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: orbit 2.4s cubic-bezier(.6,.05,.25,1) .3s forwards; }
@keyframes orbit { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-orbit ellipse { animation: none; stroke-dashoffset: 0; } }

.hero-inner { padding-top: calc(var(--header-h) + 64px); padding-bottom: clamp(48px, 7vw, 88px); }
.hero-kicker { font-size: 1rem; color: var(--on-dark-muted); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.hero-kicker::before { content: ""; width: 28px; height: 2px; background: var(--red); }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 5.4rem); font-weight: 750; max-width: 15ch; line-height: 1.02; text-wrap: balance; }
html[lang="ar"] .hero h1 { max-width: 18ch; line-height: 1.3; font-size: clamp(2.2rem, 5.2vw, 4.4rem); }
.hero-lead { margin-top: 26px; max-width: 58ch; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--on-dark); }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

.cred-rail { background: rgba(7,26,43,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--line-dark); }
.cred-rail-row { display: grid; grid-template-columns: repeat(3, 1fr); }
.cred { display: flex; flex-direction: column; gap: 2px; padding: 22px 24px; text-decoration: none; border-inline-start: 1px solid var(--line-dark); transition: background-color .2s; }
.cred:first-child { border-inline-start: 0; padding-inline-start: 0; }
.cred:hover { background: rgba(255,255,255,.05); }
.cred-title { font-weight: 650; font-size: 1.02rem; }
.cred-meta { color: var(--on-dark-muted); font-size: .92rem; }
@media (max-width: 760px) {
  .cred-rail-row { grid-template-columns: 1fr; padding-inline: 0; }
  .cred, .cred:first-child { border-inline-start: 0; border-top: 1px solid var(--line-dark); padding: 16px var(--gutter); }
  .cred:first-child { border-top: 0; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); text-wrap: balance; }
.section-head p { color: var(--muted); max-width: 52ch; font-size: 1.1rem; }
.section-head--dark p { color: var(--on-dark-muted); }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; } }

.prose p + p { margin-top: 1em; }

/* ---------- About ---------- */
.about { background: var(--paper); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 88px); align-items: stretch; }

/* The highlighted statement: navy panel over a Saudi site photo */
.about-panel {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 460px; padding: clamp(28px, 4vw, 48px);
  background: var(--navy); color: #fff; border-radius: var(--radius);
  border-top: 4px solid var(--red);
}
.about-panel-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.about-panel::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13,49,72,.94) 0%, rgba(13,49,72,.78) 55%, rgba(7,26,43,.92) 100%); }
.about-panel h2 { font-size: clamp(2.3rem, 4.6vw, 3.8rem); line-height: 1.04; text-wrap: balance; }
html[lang="ar"] .about-panel h2 { line-height: 1.35; }

/* Short, scannable copy: one intro line, four points, one text colour */
.about-body { display: flex; flex-direction: column; justify-content: center; }
.about-intro { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.55; color: var(--ink); max-width: 44ch; }
.about-points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.about-points li { padding: 22px 0; border-top: 1px solid var(--line); }
.about-points h3, .about-points h4 { margin: 0 0 6px; font-size: 1.08rem; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.about-points h3::before, .about-points h4::before { content: ""; width: 8px; height: 8px; background: var(--red); border-radius: 1px; flex: none; }
.about-points p { color: var(--ink); font-size: 1rem; line-height: 1.55; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-panel { min-height: 340px; }
}
@media (max-width: 560px) { .about-points { grid-template-columns: 1fr; } }

.lifecycle-title { font-size: 1.15rem; font-weight: 650; margin: clamp(56px, 7vw, 88px) 0 22px; }
.lifecycle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); counter-reset: none; position: relative; }
.lifecycle::before { content: ""; position: absolute; top: 19px; inset-inline: 20px; height: 2px; background: linear-gradient(90deg, var(--navy), var(--red)); }
html[dir="rtl"] .lifecycle::before { background: linear-gradient(270deg, var(--navy), var(--red)); }
.lifecycle li { position: relative; display: flex; flex-direction: column; gap: 14px; font-weight: 600; padding-inline-end: 12px; }
.step-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--navy); color: var(--navy); font-weight: 700; position: relative; font-variant-numeric: tabular-nums; }
.lifecycle li:last-child .step-n { border-color: var(--red); color: var(--red); }
@media (max-width: 820px) {
  .lifecycle { grid-template-columns: 1fr; gap: 16px; }
  .lifecycle::before { top: 20px; bottom: 20px; inset-inline-start: 19px; inset-inline-end: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--navy), var(--red)); }
  html[dir="rtl"] .lifecycle::before { background: linear-gradient(180deg, var(--navy), var(--red)); }
  .lifecycle li { flex-direction: row; align-items: center; }
}

.vmv { margin-top: clamp(56px, 7vw, 88px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.vmv-statements { display: grid; gap: 24px; }
.vmv-card { border-radius: var(--radius); padding: clamp(26px, 3vw, 40px); background: var(--steel); border-top: 3px solid var(--navy); }
.vmv-heading { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; color: var(--navy); padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.vmv-heading::before { content: ""; width: 8px; height: 8px; background: var(--red); border-radius: 1px; flex: none; }
.vmv-statement { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--ink); max-width: 48ch; }
.vmv-values { list-style: none; margin: 0; padding: 0; display: grid; }
.vmv-values li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.vmv-values li:first-child { padding-top: 0; }
.vmv-values li:last-child { border-bottom: 0; padding-bottom: 0; }
.vmv-values h4 { margin: 0 0 4px; font-size: 1.02rem; font-weight: 700; color: var(--navy); }
.vmv-values p { color: var(--ink); font-size: .98rem; }
@media (max-width: 900px) { .vmv { grid-template-columns: 1fr; } }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(32px) scale(.97); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); will-change: opacity, transform; }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-reveal .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Services ---------- */
.services { background: var(--steel); }
.svc { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); gap: 48px; align-items: start; }
.svc-tabs { display: flex; flex-direction: column; position: sticky; top: calc(var(--header-h) + 24px); }
.svc-tabs [role="tab"] {
  font: inherit; text-align: start; cursor: pointer;
  background: transparent; color: var(--ink); border: 0; border-top: 1px solid var(--line);
  padding-block: 22px; padding-inline: 20px 0; display: flex; flex-direction: column; gap: 4px; position: relative;
  transition: color .2s, background-color .2s;
}
.svc-tabs [role="tab"]:last-child { border-bottom: 1px solid var(--line); }
.svc-tabs [role="tab"]::before { content: ""; position: absolute; inset-block: -1px; inset-inline-start: 0; width: 3px; background: transparent; transition: background-color .2s; }
.svc-tabs [role="tab"]:hover { color: var(--navy); }
.svc-tabs [role="tab"][aria-selected="true"] { color: var(--navy); }
.svc-tabs [role="tab"][aria-selected="true"]::before { background: var(--red); }
.tab-name { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.tab-count { color: var(--muted); font-size: .92rem; }

.svc-panel[hidden] { display: none; }
.svc-panel { animation: panel-in .35s ease; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .svc-panel { animation: none; } }

.svc-figure { margin: 0; aspect-ratio: 16 / 7; overflow: hidden; border-radius: var(--radius); background: var(--navy); }
.svc-figure img { width: 100%; height: 100%; object-fit: cover; }
.svc-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.svc-list li { padding: 26px 0; border-bottom: 1px solid var(--line); }
.svc-list h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--navy); }
.svc-list p { color: var(--muted); font-size: 1rem; }


@media (max-width: 900px) {
  .svc { grid-template-columns: 1fr; gap: 28px; }
  .svc-tabs { position: static; flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); gap: 8px; scrollbar-width: none; }
  .svc-tabs::-webkit-scrollbar { display: none; }
  .svc-tabs [role="tab"] { flex: 0 0 auto; max-width: 230px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; scroll-snap-align: start; background: var(--paper); }
  .svc-tabs [role="tab"]:last-child { border-bottom: 1px solid var(--line); }
  .svc-tabs [role="tab"]::before { display: none; }
  .svc-tabs [role="tab"][aria-selected="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
  .svc-tabs [role="tab"][aria-selected="true"] .tab-count { color: var(--on-dark-muted); }
  .tab-name { font-size: 1rem; }
}
@media (max-width: 640px) {
  .svc-list { grid-template-columns: 1fr; }
  .svc-figure { aspect-ratio: 16 / 9; }
}

/* ---------- Credentials ---------- */
.credentials { background: var(--night); color: #fff; position: relative; overflow: hidden; }
.credentials::before { content: ""; position: absolute; width: 1100px; height: 360px; border: 2px solid var(--red); border-radius: 50%; inset-inline-end: -420px; top: -140px; transform: rotate(-9deg); opacity: .5; pointer-events: none; }
.credentials .wrap { position: relative; }
.cred-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "aramco iso" "cr cr"; gap: 24px; }
.cred-card--aramco { grid-area: aramco; }
.cred-card--cr { grid-area: cr; }
.cred-card--iso { grid-area: iso; }
.cred-card { border: 1px solid var(--line-dark); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); background: rgba(255,255,255,.03); }
.cred-card h3 { font-size: 1.35rem; }
.cred-card p { color: var(--on-dark-muted); }
.cred-code { margin: 18px 0 18px; color: var(--on-dark) !important; }
.cred-code strong { display: block; font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 750; color: #fff; font-variation-settings: "wdth" 112; letter-spacing: .02em; margin-top: 2px; }

.cred-card--doc { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 32px; align-items: start; border-top: 3px solid var(--red); }
.doc-body { min-width: 0; }
.cred-card--doc .cred-code strong { font-size: clamp(1.5rem, 2.2vw, 2rem); overflow-wrap: anywhere; }
.doc-ref { font-size: .9rem; }
.cred-card--cr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; padding-block: 24px; }
.cred-card--cr .cred-code { margin: 0; }
.cred-card--cr .cred-code strong { display: inline; font-size: 1.6rem; margin-inline-start: 10px; }
.cert-thumb { position: relative; padding: 0; border: 0; background: #fff; cursor: zoom-in; border-radius: 2px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.cert-thumb img { width: 100%; }
.cert-thumb-label { position: absolute; inset: auto 0 0 0; background: rgba(13,49,72,.92); color: #fff; font-size: .88rem; font-weight: 600; padding: 9px; text-align: center; font-family: inherit; }
.cert-thumb:hover .cert-thumb-label { background: var(--red); }
.iso-badge { width: 64px; margin-bottom: 18px; border-radius: 50%; background: #fff; }
.iso-dates { display: flex; gap: 40px; margin: 20px 0 22px; }
.iso-dates dt { font-size: .88rem; color: var(--on-dark-muted); }
.iso-dates dd { margin: 0; font-weight: 600; }
.credentials .text-link { color: var(--on-dark); }
@media (max-width: 980px) { .cred-grid { grid-template-columns: 1fr; grid-template-areas: "aramco" "iso" "cr"; } }
@media (max-width: 600px) { .cred-card--doc { grid-template-columns: 1fr; } .cert-thumb { max-width: 200px; } }

.cert-dialog { border: 0; padding: 0; background: transparent; max-width: min(92vw, 760px); max-height: 92vh; overflow: visible; }
.cert-dialog::backdrop { background: rgba(7,26,43,.86); }
.cert-dialog img { max-height: 86vh; width: auto; margin: 0 auto; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.dialog-close { display: block; margin: 0 0 10px auto; font: inherit; font-weight: 600; background: #fff; color: var(--ink); border: 0; border-radius: var(--radius); padding: 8px 16px; cursor: pointer; }
html[dir="rtl"] .dialog-close { margin: 0 auto 10px 0; }

/* ---------- Quality & HSE ---------- */
.standards { background: var(--paper); }
.std-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.std-row + .std-row { margin-top: clamp(64px, 8vw, 112px); }
.std-row--flip .std-media { order: 2; }
.std-media { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 5 / 4; background: var(--navy); }
.std-media img { width: 100%; height: 100%; object-fit: cover; }
.std-text h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-variation-settings: "wdth" 112; color: var(--navy); margin-bottom: 20px; }
.std-text p { color: var(--muted); max-width: 60ch; }
.principle { margin: 0 0 24px; padding-inline-start: 20px; border-inline-start: 3px solid var(--red); font-size: 1.5rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-inline-start: 32px; }
.checks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 18px; height: 10px; border-inline-start: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red); transform: rotate(-45deg); transform-origin: center; }
html[dir="rtl"] .checks li::before { transform: rotate(45deg) scaleX(-1); }
@media (max-width: 860px) { .std-row { grid-template-columns: 1fr; } .std-row--flip .std-media { order: 0; } .std-media { aspect-ratio: 16 / 10; } }

/* ---------- Fleet ---------- */
.fleet { background: var(--steel); }
.fleet-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 48px; background: var(--navy); color: #fff; border-radius: var(--radius); }
.fleet-stats > div { padding: 28px 28px 30px; display: flex; flex-direction: column-reverse; gap: 4px; }
.fleet-stats > div + div { border-inline-start: 1px solid var(--line-dark); }
.fleet-stats dt { color: var(--on-dark-muted); font-size: .95rem; }
.fleet-stats dd { margin: 0; font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 750; line-height: 1; }
.fleet-stats .unit { font-size: .45em; font-weight: 600; color: var(--on-dark-muted); }
@media (max-width: 760px) {
  .fleet-stats { grid-template-columns: 1fr 1fr; }
  .fleet-stats > div:nth-child(3) { border-inline-start: 0; }
  .fleet-stats > div:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
  .fleet-stats > div { padding: 20px; }
}

.fleet-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { font: inherit; font-size: .95rem; font-weight: 500; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip .chip-n { opacity: .65; margin-inline-start: 6px; font-variant-numeric: tabular-nums; }

.fleet-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
.fleet-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.fleet-list .f-name { font-weight: 500; }
.fleet-list .f-qty { color: var(--navy); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 980px) { .fleet-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .fleet-list { grid-template-columns: 1fr; } }

/* ---------- Team / org chart (mirrors the company profile chart) ---------- */
.team { background: var(--paper); }
.oc-scroll { overflow-x: auto; padding: 8px 0 12px; -webkit-overflow-scrolling: touch; }
.oc-scroll:focus-visible { outline-offset: 6px; }
.oc { --oc-line: #9EABB8; --drop: 26px; min-width: 1080px; padding: 4px 0; }

.oc-box { display: block; padding: 11px 16px; border-radius: 5px; font-weight: 600; font-size: .95rem; line-height: 1.25; text-align: center; box-shadow: 0 1px 2px rgba(13, 49, 72, .14); }
.oc-box--navy { background: var(--navy); color: #fff; }
.oc-box--grey { background: #DCE1E6; color: var(--ink); border: 1px solid #C8D0D8; }
.oc-box--light { background: #F2F4F6; color: var(--ink); border: 1px solid #D4DAE0; font-weight: 500; font-size: .9rem; }
.oc-strong { font-weight: 750; }
.oc-gm { display: inline-block; font-size: 1.12rem; font-weight: 700; padding: 18px 46px; }
.oc-mgr { color: #F2E4C2; padding: 14px 22px; min-width: 230px; position: relative; }
.oc-fin { max-width: 200px; }

.oc-top { display: flex; justify-content: center; }

/* Staff row: secretary and finance hang off the GM spine */
.oc-staff { display: grid; grid-template-columns: 1fr 2px 1fr; align-items: center; padding-block: 26px; }
.oc-spine { align-self: stretch; background: var(--oc-line); margin-block: -26px; }
.oc-staff-l, .oc-staff-r { display: flex; align-items: center; }
.oc-staff-l { justify-self: end; }
.oc-staff-r { justify-self: start; }
.oc-staff-l::after, .oc-staff-r::before { content: ""; width: 80px; height: 2px; background: var(--oc-line); flex: none; }
.oc-sec { padding: 16px 30px; }
.oc-dot { width: 11px; height: 11px; border: 2px solid var(--oc-line); border-radius: 50%; background: var(--paper); flex: none; position: relative; margin-inline: 14px; }
.oc-dot::before, .oc-dot::after { content: ""; position: absolute; top: 50%; width: 14px; height: 2px; background: var(--oc-line); transform: translateY(-50%); }
.oc-dot::before { right: 100%; }
.oc-dot::after { left: 100%; }
.oc-side { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 120px; }

/* Tree branches */
.oc-tree { list-style: none; margin: 0; padding: var(--drop) 0 0; display: flex; justify-content: center; position: relative; }
.oc-tree::before { content: ""; position: absolute; top: 0; left: calc(50% - 1px); width: 2px; height: var(--drop); background: var(--oc-line); }
.oc-tree > li { position: relative; padding: var(--drop) 8px 0; display: flex; flex-direction: column; align-items: center; }
.oc-tree > li:has(.oc-stack) { align-items: stretch; }
.oc-tree > li::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 100%; height: 2px; background: var(--oc-line); }
.oc-tree > li:first-child::before { inset-inline-start: 50%; width: 50%; }
.oc-tree > li:last-child::before { width: 50%; }
.oc-tree > li:only-child::before { display: none; }
.oc-tree > li::after { content: ""; position: absolute; top: 0; left: calc(50% - 1px); width: 2px; height: var(--drop); background: var(--oc-line); }
.oc-mgrs { padding-top: 0; }
.oc-mgrs::before { display: none; }
.oc-mgrs > li { flex: 1 1 0; padding-inline: 10px; }
.oc-mgrs > li > .oc-mgr { align-self: center; }
.oc-mgr + .oc-tree { padding-top: calc(var(--drop) + 4px); }
.oc-mgr::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 11px; height: 11px; transform: translateX(-50%); border: 2px solid var(--oc-line); border-radius: 50%; background: var(--paper); z-index: 1; }

/* Stacked sub-roles */
.oc-stack { list-style: none; margin: 0; padding: 14px 0 0; padding-inline-start: 24px; display: grid; gap: 10px; position: relative; }
.oc-stack::before { content: ""; position: absolute; top: 0; bottom: 19px; inset-inline-start: 9px; width: 2px; background: var(--oc-line); }
.oc-stack > li { position: relative; }
.oc-stack > li::before { content: ""; position: absolute; top: 50%; inset-inline-start: -15px; width: 15px; height: 2px; background: var(--oc-line); }
.oc-stack .oc-box { text-align: start; }

.oc-hint { display: none; color: var(--muted); font-size: .9rem; margin-top: 8px; }
@media (max-width: 1140px) { .oc-hint { display: block; } }

/* ---------- Contact ---------- */
.contact { position: relative; isolation: isolate; background: var(--night); color: #fff; padding-bottom: 0; }
.contact-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.contact-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .18; }
.contact-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,26,43,.4), var(--night) 85%); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); text-wrap: balance; }
.contact-lead { margin-top: 20px; color: var(--on-dark); max-width: 52ch; }
.contact-list { margin: 36px 0 0; display: grid; gap: 22px; }
.contact-list dt { color: var(--on-dark-muted); font-size: .9rem; margin-bottom: 2px; }
.contact-list dd { margin: 0; font-size: 1.12rem; font-weight: 500; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
html[dir="rtl"] .contact-list a[dir="ltr"] { unicode-bidi: isolate; }

.quote-form { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: clamp(24px, 3.5vw, 44px); box-shadow: 0 30px 60px rgba(0,0,0,.35); border-top: 4px solid var(--red); }
.quote-form h3 { font-size: 1.5rem; margin-bottom: 22px; color: var(--navy); font-variation-settings: "wdth" 112; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-weight: 600; font-size: .93rem; }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 400; font-size: 1rem; color: var(--ink);
  background: var(--steel); border: 1.5px solid transparent; border-bottom-color: var(--line);
  border-radius: var(--radius); padding: 12px 14px; min-height: 48px; width: 100%;
  transition: border-color .15s, background-color .15s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); background: var(--paper); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }
.form-note { margin-top: 14px; font-size: .88rem; color: var(--muted); text-align: center; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

.map-wrap { margin-top: clamp(56px, 7vw, 96px); }
.map-wrap iframe { display: block; width: 100%; height: 340px; border: 0; border-radius: var(--radius) var(--radius) 0 0; filter: grayscale(.35) contrast(1.05); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--on-dark-muted); border-top: 1px solid var(--line-dark); padding: 48px 0 28px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { width: 52px; }
.footer-name { color: #fff; font-weight: 650; }
.footer-ar { font-size: .95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line-dark); font-size: .88rem; }
