/* ==========================================================================
   VIVID — BASE
   reset · typography · shell · utilities · HEADER · DRAWER · FOOTER
   --------------------------------------------------------------------------
   Every layout rule uses LOGICAL properties. No physical left/right anywhere.
   Every colour resolves through a token in tokens.css, so light ⇄ dark and the
   "Bakkar Red" chrome option all work without a single rule knowing they exist.

   CASCADE WARNING (this file loads BEFORE components.css):
   a bare `.hdr__cta { --btn-bg: … }` is (0,1,0) and LOSES to `.btn { --btn-bg }`
   in components.css on source order. Anything here that restyles a `.btn` MUST
   be scoped — `.hdr .hdr__cta`, `.drawer .drawer__cta` — to win. Same for a
   `display:none` on a `.btn`.
   ========================================================================== */

/* ==========================================================================
   1. RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The sticky header must not cover an anchored heading. */
  scroll-padding-block-start: calc(var(--hdr-h) + var(--sp-6));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-block-size: 100%;
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-normal);
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Belt and braces against a rogue child ever scrolling the page sideways. */
  overflow-x: clip;
}

img, svg, video, canvas, picture {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}
img { background-color: var(--media-bed); }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { background: none; border: 0; cursor: pointer; }

ul, ol { list-style: none; }

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; inline-size: 100%; }

[hidden] { display: none !important; }

::selection { background: var(--red-brand); color: var(--white); }

/* Bold, unambiguous focus ring. Vivid does not do subtle. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
.on-ink :focus-visible,
.band--ink :focus-visible,
.footer :focus-visible { outline-color: var(--focus-on-ink); }
.band--red :focus-visible { outline-color: var(--focus-on-red); }


/* ==========================================================================
   2. TYPOGRAPHY — heavy, tight, oversized.
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: var(--fw-heavy);
  line-height: var(--lh-head);
  letter-spacing: var(--ls-head);
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: var(--fs-6xl); line-height: var(--lh-tight); letter-spacing: var(--ls-display); }
h2 { font-size: var(--fs-4xl); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-2xl); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); letter-spacing: var(--ls-caps); text-transform: uppercase; }

p { text-wrap: pretty; }

strong, b { font-weight: var(--fw-heavy); color: inherit; }
em, i { font-style: italic; }
small { font-size: var(--fs-sm); }

/* Numbers, phones, emails: always LTR even inside RTL prose. */
.num, .ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .num { display: inline-block; }

/* A red text link that still passes contrast on the page, in both themes. */
.link {
  color: var(--brand-text);
  font-weight: var(--fw-bold);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--red-200);
  transition: text-decoration-color var(--t-fast), color var(--t-fast);
}
.link:hover { text-decoration-color: var(--red-500); }

/* Rich text coming out of data.js description_* fields. */
.prose { color: var(--text-muted); font-size: var(--fs-base); line-height: var(--lh-relax); }
.prose > * + * { margin-block-start: var(--sp-4); }
.prose h3, .prose h4 {
  color: var(--text);
  margin-block-start: var(--sp-8);
  margin-block-end: var(--sp-2);
}
.prose h4 { font-size: var(--fs-lg); }
.prose ul { display: grid; gap: var(--sp-2); }
.prose li {
  position: relative;
  padding-inline-start: var(--sp-6);
}
.prose li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.6em;
  inline-size: 8px;
  block-size: 8px;
  background: var(--red-500);
  border-radius: 2px;
}
.prose strong { color: var(--text); }


/* ==========================================================================
   3. SHELL
   ========================================================================== */
.container {
  inline-size: 100%;
  max-inline-size: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-inline-size: var(--container-wide); }
.container--text { max-inline-size: 76ch; }

main { display: block; }

/* Sections. The whole theme is a rhythm of these. */
.section { padding-block: var(--section-y); }
.section--lg    { padding-block: var(--section-y-lg); }
.section--tight { padding-block: var(--section-y-tight); }
.section--flush-top { padding-block-start: 0; }

/* --- BANDS: the Vivid signature -------------------------------------------
   A band is a full-bleed colour field. The page reads light → dark → light.

   IN DARK MODE the band becomes the LIGHTER tone (see tokens.css) so the page
   still reads as a stack of alternating slabs rather than one flat black sheet.
   --band-edge is transparent in light and a lit hairline in dark, which crisps
   the seam now that the two tones are closer together.
   -------------------------------------------------------------------------- */
.band { position: relative; }

.band--ink {
  background: var(--surface-ink);
  color: var(--text-on-ink-muted);
  border-block: var(--bw-hair) solid var(--band-edge);
}
.band--ink h1, .band--ink h2, .band--ink h3, .band--ink h4, .band--ink h5, .band--ink h6 { color: var(--text-on-ink); }
.band--ink .section-head__title { color: var(--text-on-ink); }

.band--red {
  background: var(--surface-red);
  color: var(--text-on-red-muted);
}
.band--red h1, .band--red h2, .band--red h3, .band--red h4 { color: var(--text-on-red); }

.band--sunken { background: var(--surface-sunken); }
.band--warm   { background: var(--surface-warm); }

/* Hairline rules that read as deliberate structure, not as chrome. */
.rule       { border-block-start: var(--bw-hair) solid var(--line); }
.rule-bold  { border-block-start: var(--bw) solid var(--line-bold); }

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: var(--sp-4);
  z-index: var(--z-top);
  padding: var(--sp-3) var(--sp-5);
  background: var(--invert-bg);
  color: var(--invert-fg);
  font-weight: var(--fw-heavy);
  border-radius: var(--r-sm);
  transition: inset-block-start var(--t-fast);
}
.skip-link:focus-visible { inset-block-start: var(--sp-3); }


/* ==========================================================================
   4. UTILITIES
   ========================================================================== */
.sr-only {
  position: absolute !important;
  inline-size: 1px; block-size: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.row  { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.row--tight { gap: var(--sp-2); }
.col  { display: flex; flex-direction: column; gap: var(--sp-3); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.center  { display: flex; align-items: center; justify-content: center; }
.grow { flex: 1 1 auto; min-inline-size: 0; }

.stack > * + * { margin-block-start: var(--sp-4); }
.stack-sm > * + * { margin-block-start: var(--sp-2); }
.stack-lg > * + * { margin-block-start: var(--sp-8); }

.text-start  { text-align: start; }
.text-center { text-align: center; }
.text-end    { text-align: end; }

.muted  { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.on-ink-muted { color: var(--text-on-ink-muted); }

.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relax);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
  max-inline-size: 60ch;
}
.band--ink .lead { color: var(--text-on-ink-muted); }
.band--red .lead { color: var(--text-on-red-muted); }

.mt-0 { margin-block-start: 0; }
.mb-0 { margin-block-end: 0; }
.full { inline-size: 100%; }
.nowrap { white-space: nowrap; }
.hide { display: none; }

/* Hide-below helpers, so the header can shed weight as it narrows. */
@media (max-width: 559px)  { .hide-sm { display: none !important; } }
@media (max-width: 767px)  { .hide-md { display: none !important; } }
@media (max-width: 1023px) { .hide-lg { display: none !important; } }
@media (min-width: 1024px) { .only-lg-down { display: none !important; } }

/* Media wrapper: locks aspect + gives us a zoom target for hover. */
.media {
  position: relative;
  overflow: hidden;
  background: var(--media-bed);
  border-radius: var(--r-lg);
}
.media > img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform var(--dur-4) var(--ease);
}
.media--1x1 { aspect-ratio: 1 / 1; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--16x9{ aspect-ratio: 16 / 9; }
.media--21x9{ aspect-ratio: 21 / 9; }

/* Scroll-reveal. Confident: a short, decisive rise — no long float. */
.reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}


/* ==========================================================================
   5. TOPBAR — a slim BAND strip above the header. It sets the contrast
   rhythm from the very first pixel of the page (and inverts with it in dark).
   ========================================================================== */
.topbar {
  background: var(--surface-ink);
  color: var(--text-on-ink-subtle);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-block-end: var(--bw-hair) solid var(--band-edge);
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-block-size: var(--topbar-h);
}
.topbar__note {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-inline-size: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-on-ink-muted);
}
.topbar__pulse {
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--red-500);
  flex: none;
  box-shadow: 0 0 0 0 rgba(237, 28, 36, 0.7);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(237, 28, 36, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(237, 28, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(237, 28, 36, 0); }
}
@media (prefers-reduced-motion: reduce) { .topbar__pulse { animation: none; } }

.topbar__links { display: flex; align-items: center; gap: var(--sp-5); flex: none; }
.topbar__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-on-ink-subtle);
  transition: color var(--t-fast);
}
.topbar__link:hover { color: var(--text-on-ink); }
.topbar__link svg { inline-size: 15px; block-size: 15px; flex: none; }

@media (max-width: 767px) {
  .topbar__links { gap: var(--sp-3); }
  .topbar__note { display: none; }
  .topbar__in { justify-content: center; }
}


/* ==========================================================================
   6. HEADER
   ---------------------------------------------------------------------------
   SOLID — deliberately NOT glassy (that is Momentum's device). On scroll it
   snaps to a hard 2px underline. It must FIT from 360 → 1920.

   WHAT IS IN IT, AND WHERE
     ≥1080  brand · nav · [search icon · customiser icon · language · QUOTE CTA]
     <1080  brand · [search icon · BURGER]           — and NOTHING else.
            The language switcher, the customiser and the quote CTA all move
            INTO THE DRAWER. That is the whole point of the mobile bar: three
            objects, no compromise, no clipping, at 360px.

   Every colour comes from the --hdr-* tokens, so the customiser's "Bakkar Red"
   option is a pure token re-point (tokens.css §12) and no rule below changes.
   ========================================================================== */
.hdr {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-header);
  background: var(--hdr-bg);
  border-block-end: var(--bw-hair) solid var(--hdr-line);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}
.hdr.is-stuck {
  border-block-end: var(--bw) solid var(--hdr-line-stuck);
  box-shadow: var(--hdr-sh-stuck);
}
.hdr :focus-visible { outline-color: var(--hdr-focus); }

.hdr__in {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 0.2rem + 1vw, 1.25rem);
  min-block-size: var(--hdr-h);
}

/* ---- brand ---------------------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
  min-inline-size: 44px;   /* stays a 44px tap target once the wordmark hides */
  min-block-size: 44px;
}
/* On a red bar the red logo would read as a smudge, so it gets a hard white
   chip. --hdr-mark-plate is transparent everywhere else, so this costs nothing. */
.brand__plate {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--r-sm);
  background: var(--hdr-mark-plate);
  transition: background-color var(--t-fast), transform var(--t-fast);
}
.brand:hover .brand__plate { transform: scale(1.06) rotate(-3deg); }
.brand__mark {
  inline-size: 34px;
  block-size: 34px;
  flex: none;
  object-fit: contain;
  background: none;
}
.brand__text { display: flex; flex-direction: column; min-inline-size: 0; line-height: 1.1; }
.brand__name {
  font-family: var(--font-head);
  font-weight: var(--fw-heavy);
  font-size: var(--fs-md);
  letter-spacing: var(--ls-tight);
  color: var(--hdr-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand__tag {
  font-size: var(--fs-3xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--hdr-fg-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The wordmark is the first thing to go when space runs out: below 600px, and
   again in the 1080–1179 squeeze where the full nav first appears. */
@media (max-width: 599px) { .brand__text { display: none; } }
@media (min-width: 1080px) and (max-width: 1179px) { .brand__text { display: none; } }

/* ---- desktop nav ---------------------------------------------------------- */
/* The nav is the ONLY flexible child of .hdr__in: it may shrink rather than
   bleeding under the actions. Everything else is flex:none.
   It must NOT clip: the mega panel is absolutely positioned inside it, and any
   overflow != visible here erases the entire panel. */
.nav { display: none; min-inline-size: 0; flex: 0 1 auto; }
@media (min-width: 1080px) { .nav { display: block; } }

.nav__list { display: flex; align-items: center; gap: var(--sp-1); flex-wrap: nowrap; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-2) clamp(0.5rem, 0.1rem + 0.5vw, 0.625rem);
  min-block-size: 40px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  color: var(--hdr-fg-2);
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav__link:hover { color: var(--hdr-hover-fg); background: var(--hdr-hover-bg); }
.nav__link[aria-expanded="true"] { color: var(--hdr-hover-fg); background: var(--hdr-hover-bg); }

/* The active page gets a solid block underline — flat, no gradient. */
.nav__link.is-active { color: var(--hdr-active-fg); }
.nav__link.is-active::after {
  content: '';
  position: absolute;
  inset-block-end: -2px;
  inset-inline: var(--sp-3);
  block-size: 3px;
  background: var(--hdr-active-rule);
  border-radius: 2px;
}
.nav__caret {
  inline-size: 14px;
  block-size: 14px;
  transition: transform var(--t-fast);
}
.nav__link[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }

/* ---- mega menu ------------------------------------------------------------ */
/* The mega is a PAGE surface, not chrome: it stays neutral even when the header
   is painted Bakkar Red, so its category names never sit on red. */
.mega {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: var(--z-dropdown);
  inline-size: min(880px, calc(100vw - 2 * var(--gutter)));
  background: var(--surface);
  border: var(--bw) solid var(--line-bold);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: megaIn var(--dur-2) var(--ease-out) both;
}
[dir="rtl"] .mega { transform: translateX(50%); }
@keyframes megaIn {
  from { opacity: 0; transform: translateX(var(--mega-x, -50%)) translateY(-8px); }
}
[dir="ltr"] .mega { --mega-x: -50%; }
[dir="rtl"] .mega { --mega-x: 50%; }

.mega__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: var(--sp-2);
  padding: var(--sp-4);
}
.mega__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  border: var(--bw) solid transparent;
  transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast);
}
.mega__link:hover {
  background: var(--surface-sunken);
  border-color: var(--line-bold);
  transform: translateX(2px);
}
[dir="rtl"] .mega__link:hover { transform: translateX(-2px); }
.mega__thumb {
  inline-size: 44px;
  block-size: 44px;
  flex: none;
  object-fit: cover;
  border-radius: var(--r-xs);
  border: var(--bw-hair) solid var(--line);
}
/* The specimen mark, for a root with no honest photograph. Miniature of the
   homepage die-line tile: ink, a cut path, and one panel coming off printed.
   It is ART, not chrome — it stays ink-on-ink in both themes. */
.mega__thumb--spec {
  position: relative;
  display: block;
  background: var(--ink-900);
  border-color: var(--ink-900);
  overflow: hidden;
}
.mega__thumb--spec::before {
  content: '';
  position: absolute;
  inset: 9px 7px;
  border: var(--bw-hair) dashed rgba(255, 255, 255, 0.45);
  border-radius: 3px;
}
.mega__thumb--spec::after {
  content: '';
  position: absolute;
  inset-block: 9px;
  inset-inline-start: 7px;
  inline-size: 10px;
  background: var(--red-500);
}
.mega__body { min-inline-size: 0; }
/* Category names wrap to a second line rather than ellipsing. At 4 columns the
   name box is ~129px, but "Packaging Machines" wants 137px and the Arabic
   "الملصقات والأغلفة الحرارية" wants 167px — no panel width wins that back at
   every desktop size, so let it wrap. Clamped at 2 lines. */
.mega__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: var(--fs-sm);
  font-weight: var(--fw-heavy);
  color: var(--text);
  letter-spacing: var(--ls-tight);
  line-height: 1.25;
  overflow-wrap: break-word;
}
.mega__count {
  display: block;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-subtle);
}
.mega__sub {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding-block-start: var(--sp-1);
}
.mega__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding: var(--sp-4);
  background: var(--surface-ink);
}
.mega__note {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-on-ink-muted);
  min-inline-size: 0;
}

/* ---- header actions ------------------------------------------------------- */
.hdr__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-inline-start: auto;
  flex: none;
  min-inline-size: 0;
}

/* ---- header icon buttons (search · customiser) ---------------------------- */
/* Deliberately NOT .btn — no cascade fight with components.css, and they carry
   their own chrome tokens so Bakkar Red inverts them for free. */
.hdr__btn {
  inline-size: 42px;
  block-size: 42px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: var(--bw) solid var(--hdr-btn-bd);
  background: var(--hdr-btn-bg);
  color: var(--hdr-btn-fg);
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.hdr__btn:hover {
  border-color: var(--hdr-btn-bd-h);
  background: var(--hdr-btn-bg-h);
  color: var(--hdr-btn-fg-h);
  transform: translateY(-1px);
}
.hdr__btn:active { transform: none; }
.hdr__btn svg { inline-size: 19px; block-size: 19px; }

/* The customiser icon is desktop-only: on mobile the whole panel lives INLINE
   in the drawer, so a second overlay opening out of an open drawer (two stacked
   focus traps) never happens. */
.hdr__btn--cust { display: none; }
@media (min-width: 1080px) { .hdr__btn--cust { display: inline-flex; } }

/* ---- language switcher — the segmented toggle ----------------------------
   Both languages are on screen at all times and the live one is a solid block:
   chunky, flat, high-contrast — Vivid, not a soft pill.

   THE THUMB IS POSITIONED WITH LOGICAL PROPERTIES ONLY (never translateX), so
   it lands on the correct half the instant `dir` flips to rtl. The two options
   are an even 1fr / 1fr grid, which is what makes `calc(50% - 3px)` exact.

   It appears in TWO places with two token sets: the desktop header (--hdr-seg-*)
   and, full width, inside the drawer (--dw-seg-*, so it inverts with a red
   sidebar). Nothing else about it changes.
   -------------------------------------------------------------------------- */
.langsw {
  --sw-bg:     var(--hdr-seg-bg);
  --sw-bd:     var(--hdr-seg-bd);
  --sw-fg:     var(--hdr-seg-fg);
  --sw-fg-on:  var(--hdr-seg-fg-on);
  --sw-thumb:  var(--hdr-seg-thumb);

  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  flex: none;
  padding: 3px;
  background: var(--sw-bg);
  border: var(--bw) solid var(--sw-bd);
  border-radius: var(--r-sm);
  isolation: isolate;
}
/* Desktop only in the bar. On mobile it is in the drawer instead. */
.hdr .langsw { display: none; }
@media (min-width: 1080px) { .hdr .langsw { display: grid; } }

.langsw__thumb {
  position: absolute;
  z-index: 0;
  inset-block: 3px;
  inset-inline-start: 3px;
  inline-size: calc(50% - 3px);
  background: var(--sw-thumb);
  border-radius: 7px;
  transition: inset-inline-start var(--dur-3) var(--ease-out);
}
.langsw[data-active="ar"] .langsw__thumb { inset-inline-start: 50%; }
/* Do not slide on first paint — only on a real click. */
.langsw:not(.is-ready) .langsw__thumb { transition: none; }

.langsw__opt {
  position: relative;
  z-index: 1;
  min-inline-size: 40px;
  block-size: 40px;
  padding-inline: var(--sp-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-family: var(--font-head);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-heavy);
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
  color: var(--sw-fg);
  transition: color var(--t-fast);
}
.langsw__opt:hover { color: var(--sw-fg-on); }
.langsw__opt[aria-pressed="true"],
.langsw__opt[aria-pressed="true"]:hover { color: var(--sw-fg-on); }
.langsw__opt:focus-visible { outline-offset: 3px; }

/* Each option keeps its OWN face, whichever direction the page is in: "English"
   in the Latin display face even on an Arabic page, "العربية" in the reader's
   chosen Arabic face (--font-ar) always. */
.langsw__opt[data-lang="en"] {
  font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}
.langsw__opt[data-lang="ar"] {
  font-family: var(--font-ar);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}
/* Below 768px the words abbreviate to "EN" / one generously sized "ع" — never a
   cramped speck. The accessible name stays full (aria-label on the button). */
.langsw__long  { display: none; }
.langsw__short { display: inline; }
.langsw__opt[data-lang="ar"] .langsw__short { font-size: 1.125rem; line-height: 1; }
@media (min-width: 768px) {
  .langsw__long  { display: inline; }
  .langsw__short { display: none; }
}

/* In the drawer it is full width — and there is always room, so it ALWAYS
   spells the languages out. */
.langsw--block {
  --sw-bg:     var(--dw-seg-bg);
  --sw-bd:     var(--dw-seg-bd);
  --sw-fg:     var(--dw-seg-fg);
  --sw-fg-on:  var(--dw-seg-fg-on);
  --sw-thumb:  var(--dw-seg-thumb);
  inline-size: 100%;
}
.langsw--block .langsw__opt  { block-size: 44px; font-size: var(--fs-sm); }
.langsw--block .langsw__long  { display: inline; }
.langsw--block .langsw__short { display: none; }

/* ---- header quote CTA — solid red, never clipped -------------------------
   Scoped `.hdr .hdr__cta` (0,2,0) on purpose: a bare `.hdr__cta` is (0,1,0) and
   would LOSE to `.btn` in components.css on source order, silently falling back
   to the default ink fill — and a bare `display:none` would lose the same way. */
.hdr .hdr__cta {
  --btn-bg: var(--hdr-cta-bg);
  --btn-fg: var(--hdr-cta-fg);
  --btn-bd: var(--hdr-cta-bd);
  display: none;
  flex: none;
  min-block-size: 42px;
  padding-inline: var(--sp-4);
}
.hdr .hdr__cta:hover {
  --btn-bg: var(--hdr-cta-bg-h);
  --btn-bd: var(--hdr-cta-bg-h);
  box-shadow: 4px 4px 0 0 var(--hdr-cta-block);
}
@media (min-width: 1080px) { .hdr .hdr__cta { display: inline-flex; } }
@media (min-width: 1180px) { .hdr .hdr__cta { padding-inline: var(--sp-5); } }

/* ---- burger --------------------------------------------------------------- */
.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 42px;
  block-size: 42px;
  flex: none;
  border-radius: var(--r-sm);
  border: var(--bw) solid var(--hdr-btn-bd);
  background: var(--hdr-btn-bg);
  color: var(--hdr-btn-fg);
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}
.burger:hover {
  border-color: var(--hdr-btn-bd-h);
  background: var(--hdr-btn-bg-h);
  color: var(--hdr-btn-fg-h);
}
.burger svg { inline-size: 20px; block-size: 20px; }
@media (min-width: 1080px) { .burger { display: none; } }


/* ==========================================================================
   7. MOBILE DRAWER
   ---------------------------------------------------------------------------
   Everything the mobile bar handed over lives here: the nav, the LANGUAGE
   SWITCHER, the CUSTOMISER (inline — never a second overlay), the contacts and
   the QUOTE CTA, which is the primary conversion action and gets the foot.
   All colours resolve through --dw-*, so "Bakkar Red sidebar" is a token flip.
   ========================================================================== */
.scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-scrim);
  background: var(--scrim);
  opacity: 0;
  transition: opacity var(--t-base);
}
.scrim.is-open { opacity: 1; }

.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: var(--z-drawer);
  inline-size: min(380px, 92vw);
  display: flex;
  flex-direction: column;
  background: var(--dw-bg);
  color: var(--dw-fg);
  border-inline-start: var(--bw) solid var(--dw-line-bold);
  transform: translateX(100%);
  overflow: hidden;              /* its children must not be measurable outside it */
  overscroll-behavior: contain;
  /* While closed the drawer is INERT: not focusable, not hit-testable, and it
     cannot contribute to the document's scroll width. */
  visibility: hidden;
  transition:
    transform var(--dur-4) var(--ease-out),
    visibility 0s linear var(--dur-4);
}
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  transition:
    transform var(--dur-4) var(--ease-out),
    visibility 0s linear 0s;
}
.drawer :focus-visible { outline-color: var(--dw-focus); }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-block-end: var(--bw) solid var(--dw-line-bold);
  flex: none;
}
.drawer__brand { display: flex; align-items: center; gap: var(--sp-3); min-inline-size: 0; }
.drawer__plate {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 36px;
  block-size: 36px;
  border-radius: var(--r-xs);
  background: var(--hdr-mark-plate);
}
:root[data-sidebar="red"] .drawer__plate { background: var(--white); }
.drawer__plate img { inline-size: 30px; block-size: 30px; object-fit: contain; background: none; }
.drawer__brand-name {
  font-family: var(--font-head);
  font-size: var(--fs-sm);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-tight);
  color: var(--dw-fg);
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer__close {
  inline-size: 42px; block-size: 42px;
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  border: var(--bw) solid var(--dw-btn-bd);
  color: var(--dw-btn-fg);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.drawer__close:hover { border-color: var(--dw-line-bold); background: var(--dw-hover-bg); }
.drawer__close svg { inline-size: 18px; block-size: 18px; }

.drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.drawer__nav { display: flex; flex-direction: column; gap: 2px; }
.drawer__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  inline-size: 100%;
  padding: var(--sp-3);
  min-block-size: 48px;
  font-family: var(--font-head);
  font-size: var(--fs-lg);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-tight);
  text-align: start;
  color: var(--dw-fg);
  border-radius: var(--r-sm);
  transition: background-color var(--t-fast), padding-inline-start var(--t-fast), color var(--t-fast);
}
.drawer__link:hover { background: var(--dw-hover-bg); padding-inline-start: var(--sp-5); }
.drawer__link.is-active { color: var(--dw-active-fg); }
.drawer__link.is-active::before {
  content: '';
  position: absolute;
  inset-block: var(--sp-2);
  inset-inline-start: 0;
  inline-size: 3px;
  border-radius: 2px;
  background: var(--dw-active-rule);
}
.drawer__link svg { inline-size: 16px; block-size: 16px; flex: none; color: var(--dw-fg-3); transition: transform var(--t-fast); }
.drawer__link[aria-expanded="true"] svg { transform: rotate(180deg); }

.drawer__sub {
  display: grid;
  gap: 2px;
  padding-inline-start: var(--sp-3);
  margin-inline-start: var(--sp-3);
  border-inline-start: var(--bw) solid var(--dw-line);
  overflow: hidden;
}
.drawer__sublink {
  display: flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  min-block-size: 42px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--dw-fg-2);
  border-radius: var(--r-xs);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.drawer__sublink:hover { color: var(--dw-fg); background: var(--dw-hover-bg); }

.drawer__rule {
  block-size: var(--bw-hair);
  background: var(--dw-line);
  margin-block: var(--sp-4);
  flex: none;
}
.drawer__label {
  font-family: var(--font-head);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--dw-fg-3);
  margin-block-end: var(--sp-3);
}

/* The customiser, INLINE. Not a dialog — opening a second focus trap out of an
   already-trapped drawer reads as broken and behaves worse. */
.drawer__cust { display: flex; flex-direction: column; gap: var(--sp-4); }

.drawer__contacts { display: grid; gap: var(--sp-3); }
.drawer__contact {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-block-size: 32px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--dw-fg-2);
}
.drawer__contact:hover { color: var(--dw-fg); }
.drawer__contact svg { inline-size: 16px; block-size: 16px; color: var(--dw-icon); flex: none; }

.drawer__foot {
  flex: none;
  padding: var(--sp-5);
  border-block-start: var(--bw) solid var(--dw-line-bold);
  display: grid;
  gap: var(--sp-3);
  background: var(--dw-bg-2);
}
/* Scoped (0,2,0) so it beats `.btn` in components.css — see the cascade note. */
.drawer .drawer__cta {
  --btn-bg: var(--dw-cta-bg);
  --btn-fg: var(--dw-cta-fg);
  --btn-bd: var(--dw-cta-bd);
}
.drawer .drawer__cta:hover { box-shadow: 4px 4px 0 0 var(--ink-900); }
.drawer__note {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
  color: var(--dw-fg-3);
  text-align: center;
}

body.is-locked { overflow: hidden; }


/* ==========================================================================
   8. FOOTER — the closing band. The page ends on the note it kept striking,
   and it inverts with the rest of the rhythm in dark.
   ========================================================================== */
.footer {
  background: var(--surface-ink);
  color: var(--text-on-ink-subtle);
  border-block-start: var(--bw-thick) solid var(--red-500);
}
.footer__top {
  display: grid;
  gap: var(--sp-10);
  padding-block: var(--sp-16) var(--sp-12);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .footer__top { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .footer__top { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--sp-8); }
}

.footer__brand { display: flex; flex-direction: column; gap: var(--sp-4); align-items: start; }
.footer__mark { inline-size: 52px; block-size: 52px; background: none; }
.footer__blurb {
  font-size: var(--fs-sm);
  line-height: var(--lh-relax);
  color: var(--text-on-ink-subtle);
  max-inline-size: 40ch;
}
.footer__title {
  font-family: var(--font-head);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-on-ink);
  margin-block-end: var(--sp-4);
}
.footer__list { display: grid; gap: var(--sp-2); }
.footer__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-on-ink-subtle);
  transition: color var(--t-fast), transform var(--t-fast);
}
.footer__link:hover { color: var(--text-on-ink); transform: translateX(3px); }
[dir="rtl"] .footer__link:hover { transform: translateX(-3px); }
.footer__link svg { inline-size: 15px; block-size: 15px; flex: none; color: var(--red-400); }
/* The chevron is directional: unmirrored it pointed right in Arabic too, i.e.
   away from its label and out at the page margin. */
[dir="rtl"] .footer__link svg { transform: scaleX(-1); }

.footer__contact { display: grid; gap: var(--sp-3); }
.footer__row {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
  color: var(--text-on-ink-subtle);
}
.footer__row svg { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 3px; color: var(--red-400); }
.footer__row a:hover { color: var(--text-on-ink); }

.footer__social { display: flex; gap: var(--sp-2); margin-block-start: var(--sp-2); }
.footer__social a {
  inline-size: 42px;
  block-size: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--bw-hair) solid var(--line-on-ink);
  border-radius: var(--r-sm);
  color: var(--text-on-ink-muted);
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.footer__social a:hover {
  background: var(--red-500);
  border-color: var(--red-500);
  color: var(--white);
  transform: translateY(-2px);
}
.footer__social svg { inline-size: 18px; block-size: 18px; }

.footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding-block: var(--sp-5);
  border-block-start: var(--bw-hair) solid var(--line-on-ink);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-on-ink-subtle);
}
.footer__bar-links { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.footer__bar a:hover { color: var(--text-on-ink); }
.footer__noprice {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border: var(--bw-hair) solid var(--line-on-ink);
  border-radius: var(--r-pill);
  color: var(--text-on-ink-muted);
}
.footer__noprice svg { inline-size: 13px; block-size: 13px; color: var(--red-400); }

/* ---- brand mark sizing: matched to Momentum (44px header / 36px drawer / 52px footer) ---- */
.brand__plate { inline-size: 44px; block-size: 44px; flex: none; }
.brand__mark { inline-size: 44px; block-size: 44px; max-inline-size: none; flex: none; }
.drawer__plate { inline-size: 36px; block-size: 36px; flex: none; }
.drawer__brand img, .drawer__head img { inline-size: 36px; block-size: 36px; max-inline-size: none; flex: none; }
.footer__mark { inline-size: 52px; block-size: 52px; max-inline-size: none; flex: none; }
@media (max-width: 559px) { .brand__mark { inline-size: 40px; block-size: 40px; } }
