/* =============================================================
   Yasir Abdul Redha — Portfolio
   Design tokens carried over from the Stitch design
   ============================================================= */

:root {
  /* Colour */
  --primary: #000b28;
  --primary-container: #0d2149;
  --on-primary: #ffffff;
  --on-primary-container: #7889b7;
  --primary-fixed: #d9e2ff;
  --primary-fixed-dim: #b4c6f7;

  --secondary: #b62230;
  --on-secondary: #ffffff;
  --secondary-fixed: #ffdad8;
  --on-secondary-fixed-variant: #92001c;

  --tertiary: #000d21;
  --tertiary-fixed: #d5e3ff;

  --surface: #f8f9fa;
  --surface-lowest: #ffffff;
  --surface-low: #f3f4f5;
  --surface-container: #edeeef;
  --on-surface: #191c1d;
  --on-surface-variant: #44464e;

  --outline: #75777f;
  --outline-variant: #c5c6d0;
  --success: #146c2e;

  /* Type */
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-arabic: "Almarai", system-ui, sans-serif;

  /* Space */
  --stack-sm: 8px;
  --stack-md: 16px;
  --stack-lg: 32px;
  --gutter: 24px;
  --page-x: clamp(20px, 6vw, 80px);
  --section-gap: clamp(64px, 9vw, 120px);
  --container-max: 1280px;
  --header-h: 80px;

  /* Shape */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);

  --shadow-sm: 0 1px 2px rgba(13, 33, 73, .06), 0 1px 3px rgba(13, 33, 73, .05);
  --shadow-lg: 0 18px 40px -12px rgba(13, 33, 73, .18);
  --shadow-xl: 0 32px 64px -24px rgba(13, 33, 73, .28);
}

/* ── Base ──────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 { margin: 0; font-family: var(--font-display); color: var(--primary); }

p { margin: 0; }

/* The page mixes English and Arabic copy. `plaintext` resolves each block's
   direction from its own first strong character, so English keeps its
   punctuation in place when the page is switched to RTL, and vice versa. */
h1, h2, h3, p, li, label { unicode-bidi: plaintext; }

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--page-x);
}

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--primary);
  color: var(--on-primary);
  text-decoration: none;
}
.skip-link:focus { inset-inline-start: 0; }

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
}

.eyebrow {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--secondary);
}
.eyebrow--on-dark { color: var(--secondary-fixed); }

/* Arabic typography. Plus Jakarta Sans and Inter carry no Arabic glyphs, so
   anything that sets them explicitly has to hand over to Almarai in RTL.
   Latin letter-spacing also has to go — it pulls Arabic letterforms apart. */
[dir="rtl"] :is(h1, h2, h3, .brand-name, .btn, .lang-toggle button,
                .field input, .field select, .field textarea) {
  font-family: var(--font-arabic);
}
[dir="rtl"] :is(.eyebrow, .btn, .field label, .lang-toggle button) {
  letter-spacing: normal;
}
[dir="rtl"] :is(h1, h2) { line-height: 1.4; }

/* Phone numbers and addresses are LTR runs whatever the page direction —
   without this the digit groups of "+964 783 448 3311" get reordered. */
a[href^="tel:"],
a[href^="mailto:"] {
  direction: ltr;
  unicode-bidi: isolate;
}

/* ── Buttons ───────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--stack-sm);
  padding: 16px var(--stack-lg);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s, color .2s, transform .2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-container); box-shadow: var(--shadow-lg); }

.btn-ghost {
  border-color: var(--outline);
  color: var(--primary);
  background: transparent;
}
.btn-ghost:hover { background: var(--surface-container); }

.btn-submit {
  width: 100%;
  background: var(--secondary);
  color: var(--on-secondary);
  box-shadow: var(--shadow-lg);
}
.btn-submit:hover { background: var(--on-secondary-fixed-variant); }
.btn-submit .material-symbols-outlined { transition: transform .2s; }
.btn-submit:hover .material-symbols-outlined { transform: translateX(4px); }
[dir="rtl"] .btn-submit:hover .material-symbols-outlined { transform: translateX(-4px) scaleX(-1); }
[dir="rtl"] .btn-submit .material-symbols-outlined { transform: scaleX(-1); }
.btn-submit.is-done { background: var(--success); }
.btn:disabled { cursor: default; opacity: .85; }

/* ── Header ────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  background: rgba(248, 249, 250, .8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 8px rgba(13, 33, 73, .05);
  transition: box-shadow .2s;
}
/* Opaque once scrolled: the logo is blended with `multiply`, so a dark
   section passing behind a translucent header would reveal its white plate. */
.site-header.is-scrolled {
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(13, 33, 73, .1);
}

.header-inner {
  height: var(--header-h);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--page-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--stack-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--stack-md);
  text-decoration: none;
  flex-shrink: 0;
}
/* The supplied logo is a JPEG on a #f7f7f7 plate. Lifting it to pure white
   and multiplying makes that plate disappear on any light background. */
.asas-logo { filter: brightness(1.033); mix-blend-mode: multiply; }

.brand-logo { height: 44px; width: auto; object-fit: contain; }
.brand-name {
  display: none;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: -.01em;
}

.main-nav {
  display: none;
  align-items: center;
  gap: var(--stack-lg);
  margin-inline: auto;
}
.main-nav a {
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color .2s;
}
.main-nav a:hover { color: var(--primary); }
.main-nav a.is-active { color: var(--secondary); font-weight: 600; }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--stack-md);
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-container);
}
.lang-toggle button {
  padding: 6px 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--on-surface-variant);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.lang-toggle button:hover { color: var(--primary); }
.lang-toggle button.is-active { background: var(--secondary); color: var(--on-secondary); }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  object-fit: cover;
  object-position: top center;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

/* ── Hero ──────────────────────────────────────────────────── */

main { padding-top: var(--header-h); }

.hero {
  position: relative;
  padding: var(--stack-lg) var(--page-x) var(--section-gap);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: var(--gutter);
  align-items: center;
  padding-inline: 0;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--stack-lg);
}
.hero h1 {
  font-size: clamp(32px, 5.2vw, 48px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-top: var(--stack-sm);
}
.hero-role {
  display: block;
  color: var(--on-primary-container);
}

.hero-intro {
  display: grid;
  gap: var(--stack-lg);
  border-inline-start: 4px solid var(--secondary);
  padding-inline-start: var(--stack-md);
}
.lead {
  font-size: 18px;
  line-height: 28px;
  color: var(--on-surface-variant);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--stack-md);
}

.hero-portrait { position: relative; }
.portrait-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(182, 34, 48, .1) 0%, transparent 60%),
    linear-gradient(160deg, var(--surface-container) 0%, var(--surface-low) 55%, var(--primary-fixed) 100%);
}
.portrait-frame img {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  margin-inline: auto;
  width: 92%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(13, 33, 73, .22));
}
.glow {
  position: absolute;
  width: 256px;
  height: 256px;
  border-radius: var(--r-pill);
  filter: blur(64px);
  z-index: 0;
}
.glow-a { bottom: -32px; inset-inline-end: -32px; background: rgba(182, 34, 48, .18); }
.glow-b { top: -32px; inset-inline-start: -32px; background: rgba(0, 11, 40, .14); }

/* ── Section heading ───────────────────────────────────────── */

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stack-sm);
  text-align: center;
  margin-bottom: var(--stack-lg);
}
.section-head h2,
.track-copy h2 {
  font-size: clamp(26px, 3.6vw, 32px);
  line-height: 1.25;
  font-weight: 600;
}

/* ── Pillars ───────────────────────────────────────────────── */

.pillars { padding: var(--section-gap) 0; }

/* Fixed column counts rather than auto-fit: with three cards, auto-fit
   opens a fourth empty track on wide screens. */
.pillar-grid {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: 1fr;
}

.pillar {
  background: var(--surface-lowest);
  padding: var(--stack-lg);
  border-radius: var(--r-md);
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}
.pillar:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.pillar--secondary { border-top-color: var(--secondary); }
.pillar--tertiary { border-top-color: var(--tertiary); }

.pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--stack-md);
  border-radius: var(--r-sm);
  background: var(--primary-fixed);
  color: var(--primary);
  transition: transform .25s;
}
.pillar-icon .material-symbols-outlined { font-size: 28px; }
.pillar:hover .pillar-icon { transform: scale(1.1); }
.pillar--secondary .pillar-icon { background: var(--secondary-fixed); color: var(--secondary); }
.pillar--tertiary .pillar-icon { background: var(--tertiary-fixed); color: var(--tertiary); }

.pillar-body { display: flex; flex-direction: column; }
.pillar h3 { font-size: 24px; line-height: 32px; font-weight: 600; }
.pillar p { margin-top: var(--stack-sm); color: var(--on-surface-variant); }

/* ── Brands (dark) ─────────────────────────────────────────── */

.brands {
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--section-gap) 0;
}
.brands h3 { color: var(--on-primary); }
.brands p { color: rgba(217, 226, 255, .8); max-width: 36rem; }

.brand-grid {
  display: grid;
  gap: var(--section-gap);
  margin-bottom: var(--section-gap);
}
.brand-block { display: flex; flex-direction: column; gap: var(--stack-md); align-items: flex-start; }
.brand-block h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.25; font-weight: 600; margin-top: var(--stack-md); }

.logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: var(--r-md);
  background: var(--surface-lowest);
  box-shadow: var(--shadow-lg);
}
.logo-chip img { height: 56px; width: auto; object-fit: contain; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  color: var(--secondary);
}
.brand-mark .material-symbols-outlined { font-size: 72px; }

.subsidiaries {
  padding-top: var(--section-gap);
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.subsidiaries-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--stack-sm);
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--stack-lg);
}
.subsidiaries-head h3 { font-size: 24px; line-height: 32px; font-weight: 600; }

.subsidiary-grid {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(2, 1fr);
}
.subsidiary-grid li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--stack-lg);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(4px);
  transition:
    background-color .3s var(--ease-out),
    border-color .3s var(--ease-out),
    transform .3s var(--ease-out),
    opacity .3s var(--ease-out),
    filter .3s var(--ease-out);
}

/* ── Interactive spotlight ─────────────────────────────────
   A light follows the pointer across the group's logos: the section
   picks up a soft glow, every tile dims, and the one under the cursor
   lifts back into full colour. Pointer devices only — a touch screen has
   no cursor to follow, so the tiles stay as they are. */

.subsidiaries { position: relative; }

.js .subsidiaries::before {
  content: "";
  position: absolute;
  inset: -24px;
  border-radius: var(--r-lg);
  background: radial-gradient(
    420px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(182, 34, 48, .25),
    rgba(182, 34, 48, 0) 65%
  );
  opacity: 0;
  transition: opacity .45s var(--ease-out);
  pointer-events: none;
}
.js .subsidiaries.is-lit::before { opacity: 1; }

/* Light pooling inside each tile, centred on the pointer */
.js .subsidiary-grid li::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    200px circle at var(--x, 50%) var(--y, 50%),
    rgba(255, 255, 255, .22),
    transparent 60%
  );
  opacity: 0;
  transition: opacity .35s var(--ease-out);
  pointer-events: none;
}
.js .subsidiaries.is-lit .subsidiary-grid li::before { opacity: 1; }

@media (hover: hover) {
  .js .subsidiaries.is-lit .subsidiary-grid li {
    opacity: .4;
    filter: grayscale(.55);
  }
  .js .subsidiaries.is-lit .subsidiary-grid li:hover {
    opacity: 1;
    filter: none;
    transform: translateY(-8px) scale(1.06);
    background: rgba(182, 34, 48, .18);
    border-color: rgba(255, 255, 255, .3);
    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .8);
  }
}

/* Touch and no-JS fallback keeps the plain hover */
.subsidiary-grid li:hover { background: rgba(182, 34, 48, .2); transform: translateY(-4px); }
.subsidiary-grid img {
  max-height: 80px;
  width: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
}

/* ── Track record ──────────────────────────────────────────── */

.track { padding: var(--section-gap) 0; }
.track-grid {
  display: grid;
  gap: var(--stack-lg);
  align-items: center;
}
.track-copy { display: flex; flex-direction: column; gap: var(--stack-sm); }
.track-copy p { color: var(--on-surface-variant); margin-top: var(--stack-sm); }

/* These logos carry the credibility of the whole page, so they are shown
   large, in full colour, on their own cards. */
.client-logos {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}
.client-logos li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 32px);
  min-height: clamp(160px, 22vw, 200px);
  overflow: hidden;
  background: var(--surface-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition:
    transform .45s var(--ease-out),
    box-shadow .45s var(--ease-out),
    border-color .45s var(--ease-out);
}
.client-logos img {
  max-height: 150px;
  width: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  transition: transform .45s var(--ease-out);
}

/* Light sweeping across the card on hover */
.client-logos li::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .85), transparent);
  transform: translateX(-180%) skewX(-18deg);
  pointer-events: none;
}
.client-logos li:hover {
  transform: translateY(-12px) scale(1.04);
  box-shadow: var(--shadow-xl);
  border-color: var(--secondary);
}
.client-logos li:hover img { transform: scale(1.07); }
.js .client-logos li:hover::after { animation: sweep .8s var(--ease-out); }

/* ── Inquiry ───────────────────────────────────────────────── */

.inquiry {
  background: var(--surface-lowest);
  padding: var(--section-gap) 0;
}
.inquiry-card {
  display: grid;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--surface-lowest);
}
/* Grid children default to min-width:auto, which lets a long unbreakable
   address push the card wider than the phone it is being read on. */
.inquiry-card > * { min-width: 0; }
.contact-list a,
.footer-col a { overflow-wrap: anywhere; }

.inquiry-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--section-gap);
  padding: clamp(20px, 5vw, 32px);
  background: var(--primary);
  color: var(--on-primary);
}
.inquiry-aside h2 {
  color: var(--on-primary);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: var(--stack-lg);
}
.contact-list { display: flex; flex-direction: column; gap: var(--stack-md); }
.contact-list li { display: flex; align-items: center; gap: var(--stack-md); }
.contact-list .material-symbols-outlined { color: var(--secondary-fixed-dim, #ffb3b1); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.fine-print { font-size: 14px; opacity: .45; }

.inquiry-form-wrap { padding: clamp(20px, 5vw, 32px); }
#consultationForm { display: flex; flex-direction: column; gap: var(--stack-lg); }
.field-row { display: grid; gap: var(--stack-md); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--stack-sm);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}
.field label span { color: var(--secondary); }
.field label .optional {
  color: var(--outline);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: var(--r-md);
  background: var(--surface-container);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; }
.field select { appearance: none; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--primary);
  background: var(--surface-low);
}
.field input[aria-invalid="true"] { border-bottom-color: var(--secondary); }

.form-status { font-size: 14px; color: var(--on-surface-variant); min-height: 20px; }
.form-status.is-error { color: var(--secondary); }

/* ── Footer ────────────────────────────────────────────────── */

.site-footer {
  background: var(--surface-lowest);
  border-top: 1px solid var(--outline-variant);
  padding: var(--stack-lg) 0;
}
.footer-grid {
  display: grid;
  gap: var(--gutter);
  margin-bottom: var(--stack-lg);
}
.footer-brand img { height: 40px; width: auto; object-fit: contain; }
.footer-brand p { margin-top: var(--stack-sm); font-size: 14px; color: var(--on-surface-variant); }
.footer-col { display: flex; flex-direction: column; gap: var(--stack-sm); }
.footer-col p { font-size: 14px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--secondary); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stack-sm);
  padding-top: var(--stack-md);
  border-top: 1px solid var(--outline-variant);
  font-size: 14px;
  color: var(--on-surface-variant);
  text-align: center;
}
/* Developer credit — deliberately quiet, a step below the client's own
   copyright line. */
.footer-credit {
  margin-top: var(--stack-md);
  font-size: 11px;
  letter-spacing: .02em;
  text-align: center;
  color: var(--outline);
}
.footer-credit a {
  color: var(--on-surface-variant);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.footer-credit a:hover { color: var(--secondary); border-bottom-color: currentColor; }

.footer-icons { display: flex; gap: var(--stack-md); }
.footer-icons .material-symbols-outlined { cursor: pointer; transition: color .2s; }
.footer-icons .material-symbols-outlined:hover { color: var(--secondary); }

/* ── Motion ────────────────────────────────────────────────────
   Everything here is scoped to `.js`, which main.js only adds when the
   visitor has not asked for reduced motion. No JS / reduced motion means
   the page renders in its final state with no movement at all.
   ────────────────────────────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes riseScale {
  from { opacity: 0; transform: translateY(26px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-14px, 16px, 0) scale(1.15); }
}
@keyframes dropdown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn {
  0%   { opacity: 0; transform: translateY(48px) scale(.78) rotate(-7deg); }
  55%  { opacity: 1; transform: translateY(-14px) scale(1.08) rotate(3deg); }
  78%  { transform: translateY(4px) scale(.98) rotate(-1deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes sweep {
  from { transform: translateX(-180%) skewX(-18deg); }
  to   { transform: translateX(320%) skewX(-18deg); }
}

/* Sections fading in as they scroll into view */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Cards inside a revealed section arrive one after another */
.js .stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.js .reveal.is-visible .stagger > * { opacity: 1; transform: none; }
.js .stagger > *:nth-child(2) { transition-delay: .1s; }
.js .stagger > *:nth-child(3) { transition-delay: .2s; }
.js .stagger > *:nth-child(4) { transition-delay: .3s; }
.js .stagger > *:nth-child(5) { transition-delay: .4s; }

/* Cards land with an overshoot rather than a plain fade — used by the
   service cards, the subsidiary tiles and the client logos alike.
   `backwards` fill holds the first keyframe during the delay and releases
   the element afterwards, so hover transforms still work. */
.js .reveal .pop { opacity: 0; }
.js .reveal.is-visible .pop {
  opacity: 1;
  animation: popIn .95s var(--ease-out) backwards;
}
.js .reveal.is-visible .pop:nth-child(2) { animation-delay: .12s; }
.js .reveal.is-visible .pop:nth-child(3) { animation-delay: .24s; }
.js .reveal.is-visible .pop:nth-child(4) { animation-delay: .36s; }
.js .reveal.is-visible .pop:nth-child(5) { animation-delay: .48s; }

/* The inquiry card is one big surface, so it scales up as a whole */
.js .inquiry .inquiry-card {
  opacity: 0;
  transform: scale(.96);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.js .inquiry.is-visible .inquiry-card { opacity: 1; transform: none; }

/* Hero arrives on load rather than on scroll — it is already in view */
.js .hero-copy > *,
.js .hero-portrait {
  opacity: 0;
  animation: rise .9s var(--ease-out) forwards;
}
.js .hero-copy > *:nth-child(1) { animation-delay: .05s; }
.js .hero-copy > *:nth-child(2) { animation-delay: .15s; }
.js .hero-copy > *:nth-child(3) { animation-delay: .25s; }
.js .hero-copy > *:nth-child(4) { animation-delay: .35s; }
.js .hero-portrait { animation-name: riseScale; animation-duration: 1.1s; animation-delay: .2s; }

/* Ambient glows behind the portrait */
.js .glow { animation: drift 14s var(--ease-soft) infinite; }
.js .glow-b { animation-duration: 18s; animation-delay: -5s; }

.portrait-frame img { transition: transform .6s var(--ease-out); }
.hero-portrait:hover .portrait-frame img { transform: scale(1.03); }

/* Reading progress along the bottom edge of the header */
.scroll-progress {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 2px;
  background: var(--secondary);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  transition: transform .1s linear;
}
[dir="rtl"] .scroll-progress { transform-origin: right center; }

/* Underline that grows under the nav links */
.main-nav a { position: relative; }
.main-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--secondary);
  transform: scaleX(0);
  transition: transform .3s var(--ease-out);
}
.main-nav a:hover::after,
.main-nav a.is-active::after { transform: scaleX(1); }

/* Header condenses once the page is scrolled */
.header-inner { transition: height .3s var(--ease-soft); }
.brand-logo { transition: height .3s var(--ease-soft); }
.site-header.is-scrolled .header-inner { height: 64px; }
.site-header.is-scrolled .brand-logo { height: 36px; }

/* Buttons lift on hover and settle on press */
.btn-primary:hover,
.btn-ghost:hover,
.btn-submit:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-submit.is-busy .material-symbols-outlined { animation: spin 1s linear infinite; }

.pillar:hover .pillar-icon { transform: scale(1.1) rotate(-5deg); }

.lang-toggle button { transition: background-color .25s var(--ease-out), color .25s var(--ease-out); }

/* ── RTL adjustments ───────────────────────────────────────── */

[dir="rtl"] body { font-family: var(--font-arabic); }
[dir="rtl"] .brand-block--end { align-items: flex-start; text-align: right; }

/* ── Breakpoints ───────────────────────────────────────────── */

@media (min-width: 560px) {
  .client-logos { grid-template-columns: repeat(3, 1fr); }
  .subsidiary-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .pillar-grid { grid-template-columns: repeat(3, 1fr); }
  .subsidiary-grid { grid-template-columns: repeat(4, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: start; }
  .brand-grid { grid-template-columns: 1fr 1fr; }
  .brand-block--end { align-items: flex-end; text-align: right; }
  .brand-block--end .brand-mark { justify-content: flex-end; }
  .inquiry-card { grid-template-columns: 1fr 1fr; }
  .inquiry-aside,
  .inquiry-form-wrap { padding: clamp(32px, 5vw, 80px); }
}

@media (min-width: 900px) {
  .subsidiary-grid { grid-template-columns: repeat(5, 1fr); }
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
  .brand-name { display: block; }
  .hero { min-height: 85vh; display: flex; align-items: center; }
  .hero-grid { grid-template-columns: 7fr 5fr; gap: var(--stack-lg); }
  .track-grid { grid-template-columns: 4fr 8fr; gap: var(--gutter); }
}

/* Mobile menu (open state) */
@media (max-width: 899px) {
  .main-nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--stack-sm) var(--page-x) var(--stack-md);
    background: var(--surface-lowest);
    border-bottom: 1px solid var(--outline-variant);
    box-shadow: var(--shadow-lg);
  }
  .main-nav.is-open { display: flex; }
  .js .main-nav.is-open { animation: dropdown .28s var(--ease-out); }
  .main-nav a::after { display: none; }
  .avatar { display: none; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--surface-container); }
  .main-nav a:last-child { border-bottom: 0; }
  .brand-block--end { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal,
  .js .stagger > *,
  .js .hero-copy > *,
  .js .hero-portrait,
  .js .reveal .pop,
  .js .inquiry .inquiry-card { opacity: 1; transform: none; transition: none; animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
