/* ==========================================================================
   Almoosawi — design system
   Modern minimalist editorial consultant portfolio
   ========================================================================== */

:root {
  --c-text: #0b1730;
  --c-muted: #536075;
  --c-accent: #2563eb;
  --c-accent-dark: #1d4ed8;
  --c-navy: #061a3a;
  --c-bg: #fafbfc;
  --c-soft: #f5f7fa;
  --c-border: #e5eaf0;
  --c-white: #fff;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue",
    Arial, "Noto Sans Arabic", sans-serif;

  --w-page: 1200px;
  --w-text: 720px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  --s-1: clamp(0.75rem, 1.5vw, 1rem);
  --s-2: clamp(1.25rem, 2.5vw, 1.75rem);
  --s-3: clamp(2rem, 4vw, 3rem);
  --s-4: clamp(2.25rem, 4vw, 3.25rem);
  --s-5: clamp(3rem, 5vw, 4.25rem);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  --shadow-card: 0 1px 2px rgba(11, 23, 48, 0.04), 0 12px 32px -18px rgba(11, 23, 48, 0.18);
  --header-h: 76px;
}

/* --------------------------------------------------------------- reset -- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.125rem, 1.8vw, 1.375rem); line-height: 1.3; letter-spacing: -0.01em; }
h4 { font-size: 1.0625rem; letter-spacing: 0; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-accent-dark); }

ul, ol { margin: 0 0 1.15em; padding-inline-start: 1.25em; }
li { margin-bottom: 0.35em; }

hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--s-4) 0; }

blockquote {
  margin: var(--s-2) 0;
  padding-inline-start: var(--s-2);
  border-inline-start: 2px solid var(--c-accent);
  color: var(--c-text);
  font-size: 1.15rem;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: rgba(37, 99, 235, 0.16); }

/* ------------------------------------------------------------- helpers -- */

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--w-page));
  margin-inline: auto;
}

.wrap--text { width: min(100% - (var(--gutter) * 2), var(--w-text)); }

.section { padding-block: var(--s-5); }
.section--tight { padding-block: var(--s-4); }
.section--soft { background: var(--c-soft); }

.eyebrow {
  display: block;
  margin: 0 0 var(--s-1);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--c-muted);
  max-width: 62ch;
}

.muted { color: var(--c-muted); }
.accent { color: var(--c-accent); }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 999;
  background: var(--c-navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { inset-inline-start: 0; color: #fff; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.section-head h2 { margin-bottom: 0; }

/* -------------------------------------------------------------- button -- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.4em;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn svg { flex: none; transition: transform 0.18s ease; }
.btn:hover svg { transform: translateX(calc(3px * var(--dir, 1))); }

.btn--primary { background: var(--c-navy); color: #fff; }
.btn--primary:hover { background: #0d2a5c; color: #fff; }

.btn--ghost { background: transparent; color: var(--c-text); border-color: var(--c-border); }
.btn--ghost:hover { border-color: var(--c-text); color: var(--c-text); }

.btn--plain { padding: 0; background: none; color: var(--c-accent); }
.btn--light { background: #fff; color: var(--c-navy); }
.btn--light:hover { background: #eef2f8; color: var(--c-navy); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}
.link-arrow svg { transition: transform 0.18s ease; }
.link-arrow:hover svg { transform: translateX(calc(3px * var(--dir, 1))); }

/* -------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 251, 252, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--c-border); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: var(--header-h);
}

.brand { text-decoration: none; color: inherit; line-height: 1.15; }
.brand__name { display: block; font-weight: 700; letter-spacing: 0.06em; font-size: 0.9375rem; text-transform: uppercase; }
.brand__role { display: block; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); margin: 0; padding: 0; list-style: none; }
.nav li { margin: 0; position: relative; }
.nav a {
  color: var(--c-text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a:hover, .nav .current-menu-item > a, .nav .current-menu-ancestor > a { color: var(--c-accent); }

/* dropdown */
.nav .sub-menu {
  position: absolute;
  top: 100%;
  inset-inline-start: -1rem;
  min-width: 260px;
  padding: 0.5rem;
  margin-top: 0.75rem;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  display: block;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.nav li:hover > .sub-menu,
.nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav .sub-menu a { display: block; padding: 0.6rem 0.75rem; border-radius: var(--r-sm); }
.nav .sub-menu a:hover { background: var(--c-soft); }

.header__cta { display: inline-flex; }
.nav__cta { display: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 0.55rem 0.7rem;
  color: var(--c-text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.nav-toggle__bars { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; inset-inline-start: 0; width: 18px; height: 2px; background: currentColor; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .header__cta { display: none; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: block;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    padding: var(--s-2) var(--gutter) var(--s-3);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav ul { display: block; }
  .nav > ul > li > a { display: block; padding: 0.75rem 0; font-size: 1.0625rem; border-bottom: 1px solid var(--c-border); }
  .nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    margin: 0;
    padding: 0.25rem 0 0.5rem 0.75rem;
    min-width: 0;
  }
  .nav .sub-menu a { padding: 0.5rem 0; font-size: 0.9375rem; color: var(--c-muted); }
  .nav__cta { display: block; margin-top: var(--s-2); }
  .nav__cta .btn { width: 100%; justify-content: center; }
}

/* ------------------------------------------------------------ training -- */

.training {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
}
.training__lede { margin: 0; max-width: 46ch; }
.training__topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.training__topics li {
  padding-block: 0.7rem;
  border-top: 1px solid var(--c-border);
  font-size: 1.0625rem;
  font-weight: 600;
}
.training__topics li:first-child { border-top: 0; padding-top: 0; }

@media (max-width: 780px) {
  .training { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* ---------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  padding-block: clamp(2rem, 4vw, 3.5rem) clamp(2.5rem, 5vw, 4rem);
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fff 0%, var(--c-bg) 60%);
  z-index: -1;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: var(--s-3);
}

.hero__title { margin-bottom: var(--s-2); max-width: 17ch; }
.hero__lede { max-width: 48ch; margin-bottom: var(--s-3); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: var(--s-4); }

.hero__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--c-border);
}
.fact { display: flex; align-items: start; }
.fact__title { display: block; font-weight: 600; font-size: 0.9375rem; }
.fact__sub { display: block; font-size: 0.8125rem; color: var(--c-muted); }

.hero__portrait { position: relative; align-self: end; }
.hero__portrait img {
  width: 100%;
  max-width: 560px;
  margin-inline-start: auto;
  /* No drop-shadow: on a transparent cutout it renders as a grey halo
     around the subject and reads as a background panel. */
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 99%);
  mask-image: linear-gradient(180deg, #000 78%, transparent 99%);
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--s-2); }
  .hero__portrait { order: -1; }
  .hero__portrait img { max-width: 380px; margin-inline: auto; }
  .hero__title { max-width: none; }
}

/* ------------------------------------------------------- hero motion -- */
/* Added 1.4.1. Three independent blocks: a drifting glow behind the
   portrait, a staggered entrance on load, and a scroll reveal for content
   below the fold. All of it animates opacity and transform only, so the
   browser never re-lays-out mid-animation, and all of it sits inside
   prefers-reduced-motion. No JavaScript. Deleting any block is safe. */

/* 1. Ambient light, not a disc. Reworked 1.4.6: the previous version drew a
      hard-edged circle behind the head, which read as a panel. This is two
      independently drifting layers of very faint radial light, so the
      portrait sits on clean ground and the colour is atmosphere, not a shape.

      Two things stop a visible arc appearing, and both matter:
      - every gradient runs its falloff all the way to 100% through several
        intermediate stops. A stop that ends at 66% leaves a perceptible ring
        at 66%, however low the alpha.
      - both layers are masked with a linear fade so the colour dies out
        toward the copy side instead of ending on an edge.

      Alphas sit in the 0.06-0.105 range; above that it reads as a disc again.
      z-index -1 keeps both out of the LCP image's paint. --hero-glow tunes
      intensity; --hero-glow-fade flips the mask for RTL. */
.hero { --hero-glow-fade: left; }
[dir="rtl"] .hero { --hero-glow-fade: right; }

/* Layer A - the wider wash, anchored to the hero box. */
.hero::after {
  content: "";
  position: absolute;
  inset: -14% -8%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52% 44% at 80% 18%,
      rgba(37, 99, 235, calc(0.085 * var(--hero-glow, 1))) 0%,
      rgba(37, 99, 235, calc(0.045 * var(--hero-glow, 1))) 38%,
      rgba(37, 99, 235, calc(0.014 * var(--hero-glow, 1))) 66%,
      rgba(37, 99, 235, 0) 100%),
    radial-gradient(46% 40% at 92% 82%,
      rgba(96, 165, 250, calc(0.060 * var(--hero-glow, 1))) 0%,
      rgba(96, 165, 250, calc(0.030 * var(--hero-glow, 1))) 40%,
      rgba(96, 165, 250, calc(0.009 * var(--hero-glow, 1))) 70%,
      rgba(96, 165, 250, 0) 100%);
  -webkit-mask-image: linear-gradient(to var(--hero-glow-fade),
    #000 0%, #000 22%, rgba(0, 0, 0, 0.45) 58%, rgba(0, 0, 0, 0) 92%);
  mask-image: linear-gradient(to var(--hero-glow-fade),
    #000 0%, #000 22%, rgba(0, 0, 0, 0.45) 58%, rgba(0, 0, 0, 0) 92%);
}

/* Layer B - a softer pool around the subject, drifting on its own clock so
   the two layers never move as one block. closest-side keeps the falloff
   circular whatever the box ends up being. */
.hero__portrait::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -26% -20% -14% -20%;
  pointer-events: none;
  background: radial-gradient(closest-side circle at 52% 46%,
    rgba(37, 99, 235, calc(0.105 * var(--hero-glow, 1))) 0%,
    rgba(37, 99, 235, calc(0.080 * var(--hero-glow, 1))) 22%,
    rgba(37, 99, 235, calc(0.050 * var(--hero-glow, 1))) 42%,
    rgba(37, 99, 235, calc(0.026 * var(--hero-glow, 1))) 60%,
    rgba(37, 99, 235, calc(0.010 * var(--hero-glow, 1))) 78%,
    rgba(37, 99, 235, calc(0.003 * var(--hero-glow, 1))) 90%,
    rgba(37, 99, 235, 0) 100%);
  -webkit-mask-image: linear-gradient(to var(--hero-glow-fade),
    #000 0%, #000 26%, rgba(0, 0, 0, 0.5) 62%, rgba(0, 0, 0, 0) 94%);
  mask-image: linear-gradient(to var(--hero-glow-fade),
    #000 0%, #000 26%, rgba(0, 0, 0, 0.5) 62%, rgba(0, 0, 0, 0) 94%);
}

/* RTL mirrors the layout, so mirror where the light sits too. */
[dir="rtl"] .hero::after {
  background:
    radial-gradient(52% 44% at 20% 18%,
      rgba(37, 99, 235, calc(0.085 * var(--hero-glow, 1))) 0%,
      rgba(37, 99, 235, calc(0.045 * var(--hero-glow, 1))) 38%,
      rgba(37, 99, 235, calc(0.014 * var(--hero-glow, 1))) 66%,
      rgba(37, 99, 235, 0) 100%),
    radial-gradient(46% 40% at 8% 82%,
      rgba(96, 165, 250, calc(0.060 * var(--hero-glow, 1))) 0%,
      rgba(96, 165, 250, calc(0.030 * var(--hero-glow, 1))) 40%,
      rgba(96, 165, 250, calc(0.009 * var(--hero-glow, 1))) 70%,
      rgba(96, 165, 250, 0) 100%);
}
[dir="rtl"] .hero__portrait::before {
  background: radial-gradient(closest-side circle at 48% 46%,
    rgba(37, 99, 235, calc(0.105 * var(--hero-glow, 1))) 0%,
    rgba(37, 99, 235, calc(0.080 * var(--hero-glow, 1))) 22%,
    rgba(37, 99, 235, calc(0.050 * var(--hero-glow, 1))) 42%,
    rgba(37, 99, 235, calc(0.026 * var(--hero-glow, 1))) 60%,
    rgba(37, 99, 235, calc(0.010 * var(--hero-glow, 1))) 78%,
    rgba(37, 99, 235, calc(0.003 * var(--hero-glow, 1))) 90%,
    rgba(37, 99, 235, 0) 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .hero::after {
    will-change: transform;
    animation: hero-wisp-a 15s ease-in-out infinite alternate;
  }
  .hero__portrait::before {
    will-change: transform;
    animation: hero-wisp-b 12s ease-in-out infinite alternate;
  }

  /* 2. Entrance. 90ms stagger, everything finished inside 1s. */
  .hero__copy > *,
  .hero__portrait {
    animation: hero-rise 0.62s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  }
  .hero__copy > :nth-child(1) { animation-delay: 0.05s; }
  .hero__copy > :nth-child(2) { animation-delay: 0.14s; }
  .hero__copy > :nth-child(3) { animation-delay: 0.23s; }
  .hero__copy > :nth-child(4) { animation-delay: 0.32s; }
  .hero__copy > :nth-child(5) { animation-delay: 0.41s; }
  .hero__portrait {
    animation-name: hero-rise-portrait;
    animation-delay: 0.10s;
  }
}

@keyframes hero-wisp-a {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(30px, -20px, 0); }
}
@keyframes hero-wisp-b {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-22px, 16px, 0); }
}
@keyframes hero-rise {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
}
@keyframes hero-rise-portrait {
  from { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.985); }
}

/* 3. Reveal on scroll. Driven by a small IntersectionObserver in site.js
      which adds .is-in once. The CSS-only scroll-driven version was tried
      first (animation-timeline: view()) and did not attach a live timeline
      on this page in Chrome 151, so this is the reliable route. Elements
      only start hidden when the observer is present — see .js-reveal on
      <html> — so a JS failure leaves the content visible. */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .reveal-el {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .js-reveal .reveal-el.is-in {
    opacity: 1;
    transform: none;
  }
}


/* -------------------------------------------------------------- cards -- */

.grid { display: grid; gap: var(--s-2); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(11,23,48,.05), 0 22px 48px -22px rgba(11,23,48,.28); }

.card__media {
  aspect-ratio: 16 / 10;
  background: var(--c-soft);
  border-bottom: 1px solid var(--c-border);
  display: grid;
  place-items: center;
  padding: 0;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card__media--contain img { object-fit: contain; padding: 0.75rem; }
.card__media--brand {
  background: linear-gradient(160deg, #fff 0%, var(--c-soft) 100%);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.card__media--brand img {
  width: auto;
  height: auto;
  max-width: 78%;
  max-height: 46%;
  object-fit: contain;
  margin: auto;
}

.card__body { padding: var(--s-2); display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card__kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-accent); }
.card__title { margin: 0; font-size: 1.125rem; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--c-accent); }
.card__text { margin: 0; color: var(--c-muted); font-size: 0.9375rem; }
.card__meta { font-size: 0.8125rem; color: var(--c-muted); }
.card__foot { margin-top: auto; padding-top: var(--s-1); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.tags li { margin: 0; }
.tags--spaced { margin-block: 1rem; }
.tag {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background: var(--c-soft);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--c-muted);
}

/* --------------------------------------------------------- statement -- */

.statement {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
}
.statement__quote { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.statement__body { border-inline-start: 1px solid var(--c-border); padding-inline-start: var(--s-3); }
.statement__body h3 { font-size: clamp(1.125rem, 1.9vw, 1.375rem); }
@media (max-width: 820px) {
  .statement { grid-template-columns: 1fr; }
  .statement__body { border-inline-start: 0; padding-inline-start: 0; }
}

/* -------------------------------------------------------- expertise -- */

.expertise {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}
/* An odd last card spans the row instead of sitting alone in a column. */
.expertise > .xp:last-child:nth-child(odd) { grid-column: 1 / -1; }
.expertise > .xp:last-child:nth-child(odd) ul { columns: 2; column-gap: var(--s-3); }
@media (max-width: 720px) {
  .expertise { grid-template-columns: 1fr; }
  .expertise > .xp:last-child:nth-child(odd) ul { columns: 1; }
}
.xp { display: flex; flex-direction: column; gap: 0.75rem; }
.xp h3 { margin: 0; }
.xp h3 a { color: inherit; text-decoration: none; }
.xp h3 a:hover { color: var(--c-accent); }
.xp p { margin: 0; font-size: 0.9375rem; color: var(--c-muted); }
.xp ul { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; color: var(--c-muted); }
.xp li { margin-bottom: 0.3rem; }
.xp .link-arrow { margin-top: auto; padding-top: 0.5rem; }

/* ------------------------------------------------------------- about -- */

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: var(--s-4); align-items: center; }

.about__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-border);
}
.stat__num { display: block; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; color: var(--c-accent); line-height: 1.1; }
.stat__label { display: block; font-weight: 600; font-size: 0.9375rem; }
.stat__sub { display: block; font-size: 0.8125rem; color: var(--c-muted); }
.about__media img { border-radius: var(--r-lg); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: var(--s-3); } }

/* ------------------------------------------------------------- trust -- */

.logo-band { background: var(--c-soft); }
/* Sitting directly under the hero, the band reads better a little tighter and
   without a hard colour edge against the hero's gradient. 1.4.4. */
.hero + .logo-band {
  background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-soft) 55%);
  padding-block: var(--s-3);
  border-block-end: 1px solid var(--c-border);
}
.hero + .logo-band .logo-band__label { margin-bottom: var(--s-2); }
.logo-band__label {
  margin: 0 0 var(--s-3);
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--c-accent);
}

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.75rem, 4.5vw, 4rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.logo-strip__item { margin: 0; display: flex; align-items: center; }
.logo-strip img {
  width: auto;
  max-width: 320px;
  object-fit: contain;
}

@media (max-width: 600px) {
  .logo-strip { gap: 1.75rem 2.25rem; }
  .logo-strip img { transform: scale(0.85); transform-origin: center; }
}

/* ------------------------------------------------------------- press -- */

/* Written with logical properties throughout, so the section mirrors itself
   in Arabic without a second stylesheet to fall out of step. 1.5.3. */
.press {
  margin-block: var(--s-4);
  padding-block-start: var(--s-3);
  border-block-start: 1px solid var(--c-border);
}
.press__label {
  margin: 0 0 var(--s-2);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--c-accent);
}
.press__list {
  display: grid;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.press__item { margin: 0; }
.press__link {
  display: inline-block;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  color: var(--c-text);
  border-block-end: 1px solid var(--c-border);
}
.press__link:hover,
.press__link:focus-visible { color: var(--c-accent); border-block-end-color: currentColor; }
/* An Arabic headline inside an English page carries its own dir, so it needs
   to be an independent block rather than inheriting the page's direction. */
.press__title[dir="rtl"],
.press__title[dir="ltr"] { display: inline-block; }
.press__meta {
  margin-block: 0.35rem 0;
  font-size: 0.9375rem;
  color: var(--c-muted);
}
.press__publisher { font-weight: 600; }
.press__sep { margin-inline: 0.45rem; color: var(--c-border); }

@media (min-width: 780px) {
  .press__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-3); }
}

/* --------------------------------------------------------- final CTA -- */

.cta-band {
  background: var(--c-navy);
  color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}
.cta-band h2 { color: #fff; max-width: 18ch; margin-inline: auto; }
.cta-band p { color: rgba(255, 255, 255, 0.72); max-width: 52ch; margin-inline: auto; margin-bottom: var(--s-2); }

/* ------------------------------------------------------------ page UI -- */

.page-hero { padding-block: var(--s-3) var(--s-2); }
.page-hero h1 { max-width: 20ch; }
.page-hero .lede { margin-top: var(--s-1); }

.breadcrumbs { font-size: 0.8125rem; color: var(--c-muted); margin-bottom: var(--s-2); }
.breadcrumbs a { color: var(--c-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-accent); }
.breadcrumbs span + span::before { content: "/"; margin: 0 0.5rem; color: var(--c-border); }

.prose { max-width: var(--w-text); }
.entry-content--mb { margin-bottom: var(--s-2); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 1.7em; }
.prose h3 { margin-top: 1.45em; }
.prose h2 + h3 { margin-top: 0.9em; }
.prose > *:first-child { margin-top: 0; }
.prose img, .prose figure { border-radius: var(--r-md); }
.prose figcaption { font-size: 0.8125rem; color: var(--c-muted); text-align: center; margin-top: 0.5rem; }
.prose .wp-block-image { margin-block: var(--s-2); }

.panel {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-2);
}

.panel h3 { margin-bottom: 0.4rem; }
.panel p { font-size: 0.9375rem; margin-bottom: 0.9rem; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.checklist li { display: flex; gap: 0.6rem; align-items: start; margin: 0; }
.checklist li::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  margin-top: 0.65em;
  border-radius: 50%;
  background: var(--c-accent);
}


/* ---------------------------------------------------------------- FAQ -- */

.prose .wp-block-details {
  border-bottom: 1px solid var(--c-border);
  padding-block: 1.1rem;
}
.prose .wp-block-details:first-of-type { border-top: 1px solid var(--c-border); }
.prose .wp-block-details summary {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.0625rem;
  list-style: none;
  color: var(--c-text);
}
.prose .wp-block-details summary::-webkit-details-marker { display: none; }
.prose .wp-block-details summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-inline-end: 2px solid var(--c-accent);
  border-bottom: 2px solid var(--c-accent);
  transform: rotate(calc(45deg * var(--dir, 1)));
  transition: transform 0.2s ease;
}
.prose .wp-block-details[open] summary::after { transform: rotate(calc(-135deg * var(--dir, 1))); margin-top: 11px; }
.prose .wp-block-details summary:hover { color: var(--c-accent); }
.prose .wp-block-details > *:not(summary) { margin-top: 0.85rem; color: var(--c-muted); }

/* --------------------------------------------------------- post list -- */

.post-list { display: grid; gap: 0; }
.post-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-2);
  align-items: start;
  padding-block: var(--s-2);
  border-bottom: 1px solid var(--c-border);
}
.post-item__meta { font-size: 0.8125rem; color: var(--c-muted); margin-bottom: 0.35rem; }
.post-item h2, .post-item h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); margin-bottom: 0.35rem; }
.post-item h2 a, .post-item h3 a { color: inherit; text-decoration: none; }
.post-item h2 a:hover, .post-item h3 a:hover { color: var(--c-accent); }
.post-item p { color: var(--c-muted); font-size: 0.9375rem; margin: 0; max-width: 70ch; }
.post-item__thumb { width: 200px; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16/10; }
.post-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) {
  .post-item { grid-template-columns: 1fr; }
  .post-item__thumb { width: 100%; order: -1; }
}

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--s-2); }
.filters a {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--c-muted);
  background: #fff;
}
.filters a:hover, .filters a[aria-current="page"] { border-color: var(--c-accent); color: var(--c-accent); }

.pagination { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: var(--s-3); }
.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 40px; height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--c-text);
  text-decoration: none;
  font-size: 0.9375rem;
}
.pagination .page-numbers:hover { border-color: var(--c-accent); color: var(--c-accent); }
.pagination .current { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }

/* ------------------------------------------------------------- single -- */

.entry-header { padding-block: var(--s-3) var(--s-2); }
.entry-meta { font-size: 0.875rem; color: var(--c-muted); display: flex; flex-wrap: wrap; gap: 0.75rem; }
.entry-hero-img { margin-block: var(--s-2); border-radius: var(--r-lg); overflow: hidden; }
.entry-footer { margin-top: var(--s-3); padding-top: var(--s-2); border-top: 1px solid var(--c-border); }

.author-box { display: flex; gap: var(--s-2); align-items: center; }
.author-box img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }

/* ---------------------------------------------------------- projects -- */

.project-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-3); align-items: center; }
.project-hero__media { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--c-border); background: var(--c-soft); aspect-ratio: 16/10; }
.project-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
@media (max-width: 860px) { .project-hero { grid-template-columns: 1fr; } }

.project-hero__media--brand {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #fff 0%, var(--c-soft) 100%);
  padding: clamp(2rem, 6vw, 4rem);
}
.project-hero__media--brand img {
  width: auto;
  height: auto;
  max-width: 72%;
  max-height: 42%;
  object-fit: contain;
}

.project-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--c-border);
}
.project-nav__link { text-decoration: none; color: inherit; }
.project-nav__link--next { text-align: end; }
.project-nav__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  margin-bottom: 0.35rem;
}
.project-nav__title { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.project-nav__link:hover .project-nav__title { color: var(--c-accent); }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-2);
  padding-block: var(--s-2);
  margin-block: var(--s-2) 0;
  border-block: 1px solid var(--c-border);
}
.meta-grid dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-muted); margin-bottom: 0.35rem; }
.meta-grid dd { margin: 0; font-weight: 600; font-size: 0.9375rem; }

/* -------------------------------------------------------------- form -- */

.form { display: grid; gap: var(--s-2); }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-2); }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.875rem; font-weight: 600; }
.field .req { color: var(--c-accent); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--c-text);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #d33; }
.field__hint { font-size: 0.8125rem; color: var(--c-muted); }
.hp-field { position: absolute !important; inset-inline-start: -9999px; }

.notice { padding: 0.9rem 1.1rem; border-radius: var(--r-sm); font-size: 0.9375rem; }
.notice--ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.notice--err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: var(--s-3);
  align-items: start;
}
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

#project-form { padding: clamp(1.5rem, 3vw, 2.25rem); }
#project-form > .card__title { margin-bottom: clamp(1.1rem, 2vw, 1.5rem); }
#project-form .form__row { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }



/* --------------------------------------------------- form mode switch -- */

.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  border: 0;
  margin: 0;
  padding: 0;
}
.modes__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.modes__option {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.modes__option:hover { border-color: var(--c-muted); }
.modes__title { display: block; font-weight: 600; font-size: 0.9375rem; }
.modes__sub { display: block; font-size: 0.8125rem; color: var(--c-muted); margin-top: 0.15rem; }

.modes__input:checked + .modes__option {
  border-color: var(--c-accent);
  background: rgba(37, 99, 235, 0.04);
  box-shadow: 0 0 0 1px var(--c-accent);
}
.modes__input:focus-visible + .modes__option { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* Mode-dependent fields. Pure CSS, so this works without JavaScript. */
.field--general { display: none; }
.form--modal:has(#cf-mode-general:checked) .field--project { display: none; }
.form--modal:has(#cf-mode-general:checked) .field--general { display: inline; }

/* Browsers without :has() keep every field visible — the server still
   validates by mode, so nothing breaks. */
@supports not selector(:has(*)) {
  .field--general { display: none; }
}

/* ------------------------------------------------- third-party forms -- */
/* Defensive styling so a Contact Form 7 / Forminator form dropped into a page
   still matches the design instead of falling back to browser defaults. */

.wpcf7 p { margin-bottom: 1.1rem; }
.wpcf7 label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.4rem; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--c-text);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
}
.wpcf7 textarea { min-height: 150px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.wpcf7 input[type="submit"] {
  padding: 0.85em 1.4em;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: var(--c-navy);
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: #0d2a5c; }
.wpcf7-not-valid-tip { color: #b91c1c; font-size: 0.8125rem; }
.wpcf7-response-output {
  margin: 1rem 0 0;
  padding: 0.9rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------ footer -- */

.site-footer {
  margin-top: var(--s-4);
  padding-block: var(--s-4) var(--s-2);
  background: var(--c-soft);
  border-top: 1px solid var(--c-border);
}
.footer__cols { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.footer__brand p { color: var(--c-muted); font-size: 0.9375rem; max-width: 34ch; margin-top: 0.75rem; }
.footer h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--c-muted); margin-bottom: 0.9rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.5rem; }
.footer a { color: var(--c-text); text-decoration: none; font-size: 0.9375rem; }
.footer a:hover { color: var(--c-accent); }
.footer__bottom {
  margin-top: var(--s-3);
  padding-top: var(--s-2);
  border-top: 1px solid var(--c-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-2);
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--c-muted);
}
.footer__bottom a { font-size: 0.8125rem; color: var(--c-muted); }
.footer__legal { display: flex; gap: 1.25rem; }
.footer__legal li { margin: 0; }
@media (max-width: 780px) { .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .footer__cols { grid-template-columns: 1fr; } }

.search-box { max-width: 520px; }
.search-box--spaced { margin-top: var(--s-3); }
.search-form { display: flex; gap: 0.5rem; }
.search-form input[type="search"] {
  flex: 1;
  padding: 0.8rem 0.9rem;
  font: inherit;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: #fff;
}
.search-form input[type="submit"] {
  padding: 0.8rem 1.2rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--c-navy);
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
}

/* --------------------------------------------------------- utilities -- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* WordPress core alignment support */
.alignwide { width: min(100%, 1080px); margin-inline: auto; }
.alignfull { width: 100vw; margin-inline: calc(50% - 50vw); max-width: none; }
.aligncenter { margin-inline: auto; }
.wp-caption-text { font-size: 0.8125rem; color: var(--c-muted); }

/* ==========================================================================
   Arabic / RTL
   No rtl.css and no physical-property overrides — the layout above is written
   entirely in logical properties, so direction is handled by dir="rtl" alone.
   What is left here is the two things logical properties cannot do:
   direction-aware rotation/translation, and Arabic typography.
   ========================================================================== */

/* Only the Arabic subset is bundled. Latin glyphs fall through to the stack
   below via unicode-range, so English inside an Arabic page is unchanged. */
@font-face {
  font-family: "Almarai";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/almarai-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Almarai";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/almarai-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}

/* Direction token. Anything that rotates or translates along the inline axis
   multiplies by this instead of being restated in an RTL block. */
[dir="rtl"] { --dir: -1; }

html[lang^="ar"] {
  --font: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
    "Helvetica Neue", Arial, sans-serif;
}

/* Letter-spacing disconnects Arabic letter joining — it is never correct here.
   One guard rule rather than twelve overrides, so CSS added later cannot
   silently reintroduce the bug. */
html[lang^="ar"] * { letter-spacing: normal !important; }

/* Arabic needs more leading than Latin at the same size: the script carries
   dots below the baseline and marks above it. */
html[lang^="ar"] body { line-height: 1.9; }
html[lang^="ar"] h1,
html[lang^="ar"] h2 { line-height: 1.35; }
html[lang^="ar"] h3 { line-height: 1.5; }
html[lang^="ar"] .statement__quote { line-height: 1.45; }
html[lang^="ar"] .prose { line-height: 1.95; }

/* The brand lockup is two tight lines tuned for uppercase Latin. Arabic sits
   taller and has no uppercase, so it needs its own rhythm. */
html[lang^="ar"] .brand { line-height: 1.3; }
html[lang^="ar"] .brand__name { font-size: 1.0625rem; }
html[lang^="ar"] .brand__role { margin-top: 0.1rem; font-size: 0.75rem; }

/* The inline arrow icon points right; mirror it rather than shipping a
   second icon. */
[dir="rtl"] .btn svg,
[dir="rtl"] .link-arrow svg,
[dir="rtl"] .project-nav svg { transform: scaleX(-1); }
[dir="rtl"] .btn:hover svg,
[dir="rtl"] .link-arrow:hover svg { transform: scaleX(-1) translateX(3px); }

/* --------------------------------------------------- language switcher -- */


.lang-switch {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
}
/* Two switchers are rendered — one beside the header CTA for desktop, one
   inside the collapsible nav for mobile — mirroring how the CTA itself is
   handled. Exactly one is visible at any width. */
.lang-switch--header { display: inline-flex; }
.lang-switch--nav { display: none; }
.lang-switch a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.6rem;
  color: var(--c-muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.lang-switch a:hover { color: var(--c-text); border-color: var(--c-border); }
.lang-switch a[aria-current="true"] { color: var(--c-text); }
.site-header .lang-switch { margin-inline-start: 0.25rem; }
.footer .lang-switch a { padding-inline: 0; }

@media (max-width: 960px) {
  .lang-switch--header { display: none; }
  .lang-switch--nav { display: block; margin-top: var(--s-1); }
  .lang-switch--nav a { padding-inline: 0; }
}
