/* ============================================================================
   KHADAMAT SITE THEME
   ----------------------------------------------------------------------------
   Loaded after sdeira-tokens.css/sdeira-subpage.css/sdeira-sections.css, and
   before sdeira-nav-controls.css (see scripts/generate_pages.py::head(),
   site_id == "khadamat" only). Section 1 below is the original T4 charter:
   reassign the ROLE tokens those shared sheets already consume, touch no
   --brand-* primitive, add no selector - same spirit as
   the retired Liwa prototype (a-liwa, retired 2026-09-15). That charter held until T16 (25 Aug
   2026), whose site-owner-requested visual upgrade needs real structural
   CSS with no other honest home: a full-screen carousel hero has no
   equivalent anywhere already loaded on a Khadamat page (sdeira-v2.css's own
   `.hero` is homepage-only and CLAUDE.md forbids lifting CSS out of it), and
   the two-state nav is a Khadamat-only override of values inside sdeira-
   subpage.css's existing `.nav`/`.scrolled` mechanism, not a new one. Section
   2 is that carried-forward addition: selectors, scoped to this file simply
   by this file only ever loading on khadamatfm.ae pages - no second class
   prefix needed for that scoping, the file boundary already is it.

   Confirmed from "Khadamat - Brand Guidelines V1.pdf" (Deep Forest, Basil
   Green, Soft Sage, Olive Green, Light Grey, Grey 70, Black all already exist
   as --brand-khadamat-* / --brand-light-grey / --brand-grey-70 / --brand-black
   primitives in sdeira-tokens.css - reused here rather than re-declared).
   ========================================================================== */

/* ---- 1. Values-only overlay: REMOVED 4 Sep 2026 -------------------------- */

/* This file used to open with a `:root` block of twenty declarations. Eighteen
   of them were a hand-kept copy of `html[data-brand="khadamat"]` in
   sdeira-tokens.css, and that mode was dormant because no generated page ever
   set the attribute. So the copy was what actually rendered, and the mode sat
   in the token file looking authoritative and doing nothing.

   Two implementations of one thing, synchronised by hand. It had already cost
   a real edit twice: the site owner's --surface-brand-deep correction of
   3 Sep 2026 was written into both files, and both files' comments say so. It
   was also a silent trap, because `:root` is (0,1,0) and `html[data-brand]`
   is (0,1,1): whichever file a future editor picked, half the guesses would
   have changed nothing and reported no error.

   The generator now writes `data-brand="khadamat"` on every Khadamat page
   (scripts/generate_pages.py, and its comment carries the full reasoning), so
   the mode is live and this copy is gone. The brand's values live in ONE
   place, the token file, as the repo rule requires. Verified
   as a zero-change refactor: all twenty-three resolved custom properties on
   khadamat/en/ measured identical before and after.

   Two declarations were not duplicates and did not simply vanish:
   - `--icon-on-dark` moved into the token file's khadamat mode, where the
     rest of the brand's on-dark roles already were.
   - `--khadamat-slate: #59595c` was deleted. It was referenced by nothing, in
     any file, and Khadamat Brand Guidelines V1 p.17 names that exact hex
     "Jais" - the same name and the same value as the group's own
     --brand-jais primitive. The comment defending it as a separate name was
     sound in principle and describing a token no rule ever read. */

/* FOOTER COLUMN HEADINGS ("Khadamat"/"More"/"Contact Us") AND THE LEGAL
   HEADING read `--brand-razeen` (Sdeira's own orange/tan) as a hardcoded
   primitive in sdeira-sections.css (`.foot-col :is(h3, h4)`,
   `.foot-legal-heading`) rather than a role token, so the Section 1
   values-only overlay above cannot reach them - the same class of gap
   `--icon-on-dark` above just closed. Overridden here, scoped to this file's
   own khadamatfm.ae-only load boundary, to the brand's own on-dark accent
   (Soft Sage), matching every other on-dark heading/label role already
   remapped above. */
.foot-col :is(h3, h4) {
  color: var(--brand-khadamat-lime);
}

/* THE LEGAL HEADING STAYS OUT OF THE LIME RULE, 18 Sep 2026, an AA fix:
   Lime on the footer's composited ground measures 3.7:1, which the 14px
   legal heading fails (it can never qualify as large text). White is the
   footer's own link colour on the same ground and clears the bound; the
   column headings keep Lime at the sections sheet's weight 700, where the
   20px size qualifies as large text and 3.7 clears the 3.0 bound. */
.foot-legal-heading {
  color: var(--brand-white);
}

/* THE KICKER MARK IS SDEIRA'S OWN EMBLEM, NOT KHADAMAT'S - a plain asset
   swap, not a colour role: `main section:not(.hero) .kicker::before` in
   sdeira-subpage.css hardcodes `url("../images/brand/sdeira-mark.svg")`, a
   path with no token indirection to remap, so it drew the group's own
   diagonal mark ahead of every Khadamat section kicker ("Khadamat 360",
   photo-band tops, etc.) - the wrong company's logo, not a colour mismatch.
   Swaps to Khadamat's own emblem (assets/images/brand/khadamat-mark.svg),
   the same file the assistant launcher above already uses for the
   identical reason, scoped to this file's own khadamatfm.ae-only load
   boundary. */
main section:not(.hero) .kicker::before {
  background-image: url("../images/brand/khadamat-mark.svg?v=3b14d73bb9372478");
}

/* ---- 2. Two-state nav (T16 item 3) -----------------------------------------
   sdeira-subpage.css's rest state is "transparent nav, white text, dark
   scrim behind it to hold contrast over a bright photo" - built for a nav
   that floats over the hero image. The site owner asked for an explicit
   white bar instead, on every Khadamat page: the mechanism (#hd / .scrolled,
   .nav::before as the pill, the logo-height swap) is untouched, only the
   REST state's values change - the .scrolled state is not touched anywhere
   below, it keeps the group's own glass pill exactly as built.

   #hd::before is the readability scrim sdeira-subpage.css paints behind the
   transparent rest-state bar so white nav text clears contrast over a bright
   photo. An opaque white bar needs no such scrim underneath it - left on, it
   would only darken the thin --hd-gap strip of photo around the pill, doing
   a job nothing here asks for. Off in both states, not just at rest: the
   bar's .scrolled state was already fully opaque and never depended on it. */
#hd::before {
  opacity: 0;
}

/* HEADER DENSITY + CONSTANT LOGO + EQUAL LOGO FRAME (site owner, 25 Aug 2026).
   Follow-ups to the full-width white header:
   1. The logo must NOT shrink on scroll: the shared #hd.scrolled rule
      (sdeira-subpage.css:526) steps --logo-h from clamp(40px, 4.4vw, 54px)
      down to clamp(30px, 3.2vw, 38px). Khadamat pins it to the rest value in
      both states, so the wordmark stays one size from first paint.
   2. --hd-gap and --hd-pad carry the --logo-h value, so the bar is compact.
   3. The logo is a brand mark and needs a clear zone equal on ALL four sides;
      the shared mechanism already pads .nav with --hd-pad on every side, so
      the pill gives the logo an equal top/bottom/right frame. --hd-pad is set
      to a comfortable value (12-15px) so that frame is generous, not the 9px
      that read as the edge sitting too close to the wordmark. */
#hd {
  --hd-gap: clamp(5px, .4vw, 8px);
  --hd-pad: clamp(6px, .6vw, 8px);
}

#hd.scrolled {
  /* the logo height is the single 64px in sdeira-nav-controls.css */
}

/* THE FIXED FULL-WIDTH WHITE HEADER (site owner, 25 Aug 2026)
   model as the retired Liwa prototype (a-liwa, retired 2026-09-15) (shared/brand-fixes.css "THE FIXED WHITE
   HEADER"): at rest the top bar is one edge-to-edge white strip, not the
   centred white pill sdeira-subpage.css's `.nav::before` draws (`.nav` caps
   at --max, so the pill floats with a --hd-gap gutter on every side and a
   second, viewport-grown gutter outside .wrap once the screen is wider than
   1280px). On scroll the one box shrinks inward to the shared glass pill.

   The port is a named khadamat variant of the shared fixed nav, so it lives
   here in the two-state section rather than touching the shared sheet.

   WHY THE BREAKOUT MATH LANDED HERE. `.nav` is also `.wrap`
   (sdeira-subpage.css:563) and `.wrap` centres itself with margin-inline:
   auto, so `.nav`'s own center is `#hd`'s centre at every width, capped or
   not. Pinning both edges to that shared centre with `left:50%; right:50%`
   and walking each out by half the viewport (`margin-inline: -50vw`) lands
   the strip exactly on `#hd`'s outer edge - RTL-safe, because the two
   physical edges (left/right) were given the same expression in pairs and
   either reading direction resolves to the same full-bleed strip. Physical,
   not logical, on purpose; `top`/`bottom` only need to cancel `#hd`'s own
   --hd-gap padding, which is on all four sides. */

/* Extend the pill's transition (sdeira-subpage.css:622) to the geometry
   properties this override animates, restated in full so the shorthand here
   adds to the shared list instead of replacing it. */
#hd .nav::before {
  transition:
    left var(--dur-base) var(--ease-out),
    right var(--dur-base) var(--ease-out),
    margin-inline var(--dur-base) var(--ease-out),
    top var(--dur-base) var(--ease-out),
    bottom var(--dur-base) var(--ease-out),
    border-radius var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    backdrop-filter var(--dur-base) var(--ease-out);
}

#hd:not(.scrolled) .nav::before {
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  top: calc(-1 * var(--hd-gap));
  bottom: calc(-1 * var(--hd-gap));
  border-radius: 0;
  background: var(--brand-white);
  /* One plain white surface at rest: no hairline marking where the strip
     ends (site owner's a-liwa instruction), the scrolled pill's --line
     border returns with it in the same transition. */
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


#hd:not(.scrolled) .logo,
#hd:not(.scrolled) .menu > a.active,
#hd:not(.scrolled) .menu > .nav-disclosure > summary > a.active {
  color: var(--ink);
}

/* .menu a.active reads --accent-text in the shared sheet (sdeira-subpage.css,
   both the desktop-bar rule and the drawer-row rule), and this brand maps
   --accent-text to White (Section 1: the ink for a SOLID accent fill). Every
   nav surface on this theme is light - the rest strip, the scrolled glass
   pill, the drawer's --surface-sunken row fill - so an active link rendered
   as white-on-light, invisible. The rest state is pinned to --ink directly
   above; this covers the scrolled bar and the mobile drawer with
   --accent-strong, the light-ground role (same correction the .lang and
   .nav-search hovers below already make). Selector restated exactly as the
   shared drawer rule so source order alone wins it. */
#hd.scrolled .menu > a.active,
#hd.scrolled .menu > .nav-disclosure > summary > a.active,
.menu > a:not(.menu-logo).active {
  color: var(--accent-strong);
}

#hd:not(.scrolled) .lang,
#hd:not(.scrolled) .menu-lang {
  color: var(--muted);
}

#hd:not(.scrolled) .lang:hover,
#hd:not(.scrolled) .lang:focus-visible {
  /* --accent-text is the ink for a SOLID fill (white here) and disappears on
     the pale --accent-wash tint. --accent-strong is the token calibrated for
     small text on a light ground (see sdeira-tokens.css "SMALL ACCENT TEXT"),
     which is what this hover actually is. */
  color: var(--accent-strong);
  background: var(--accent-wash);
}

/* #hd .nav-search beats sdeira-nav-controls.css's own bare .nav-search rule
   on specificity (id + class > class), which it has to: that file loads
   AFTER this one (see generate_pages.py::head()), so an equal-specificity
   override here would lose on source order alone. */
#hd:not(.scrolled) :is(.nav-search, .nav-icon--search, .nav-icon--accessibility, .burger) {
  color: var(--muted);
}

#hd:not(.scrolled) :is(.nav-search, .burger):is(:hover, :focus-visible) {
  /* Same fix as .lang above: --accent-strong is the light-ground role, not
     the solid-fill --accent-text (white for this brand, invisible on wash). */
  color: var(--accent-strong);
  background-color: var(--accent-wash);
}

/* ---- 3. The home carousel hero ---------------------------------------------
   Nothing here: the carousel is the shared component of
   sdeira-hero-carousel.css, and what makes it Khadamat's is tokens in the
   Khadamat block of sdeira-tokens.css (the lines pair as the hero mark art,
   Deep Forest for the emphasised word and the focus ring). */

/* SAME FIX, SAME REASON, ONE MORE DARK-PHOTO GROUND - site owner, 31 Aug
   2026: ".photo-band-action" (khadamat-360.toml's own "Explore Khadamat
   360") sits on a photograph the same way the carousel hero above does
   (.photo-band's own scrim, --surface-inverse-soft) - the flat-ground
   --link-hover role reads exactly as illegible there as it did on the
   hero, for the identical reason. No new token: the same
   --link-hover-on-dark role this file already declares once in Section 1,
   applied to the one other component where a Khadamat `.action-link`
   sits over imagery rather than a plain White/Light-Gray section. */
.photo-band .action-link:is(:hover, :focus-visible) {
  color: var(--link-hover-on-dark);
}

/* .photo-band-top .kicker in sdeira-sections.css hardcodes plain white
   (--brand-white) - correct for the group's own orange/tan kicker mark on
   photography, but this brand's kicker is the "Khadamat 360" label, and
   site owner, 1 Sep 2026, asked it to read this brand's own on-dark accent
   (Soft Sage) instead, matching every other on-dark accent role already
   remapped in Section 1 above. */
#khadamat-360.photo-band .photo-band-top .kicker {
  color: var(--accent-on-dark);
}

/* ---- 4. "Why Khadamat" and "Service Categories" carry no photograph -------
   Both used to carry a section-wide watermark wash of the same line board.
   Removed entirely, site owner instruction, 25 Aug 2026: the line pattern is
   gone site-wide as a background texture. The replacement corner-mark
   technique (see the hero marks in sdeira-sections.css and #about-snapshot
   .split-media::before below) is drawn ON a photograph, and neither of these
   two sections has one - an icon grid has nothing for the mark to sit over,
   so neither section gets a replacement. */

/* ---- 4b. Service Categories: now a row-list, and its arrow ---------------
   Site owner, 1 Sep 2026 (preview review): the section changed from an
   icon-grid to a .row-list (the "section index" shape), so the earlier `#service-categories .icon-item` tonal-step
   rule (31 Aug 2026) matched nothing and is removed - .row-item's own base
   surface IS --surface-sunken (sdeira-sections.css), the same Light Gray
   step that rule existed to force.
   One real defect surfaced with the change: sdeira-sections.css's
   `i.row-item-action` rests at `color: var(--accent-text)`, and this brand
   maps --accent-text to White (Section 1: it is the ink for a SOLID accent
   fill) - a white arrow on the row's light-grey ground. --accent-strong is
   the token calibrated for small marks on a light ground (the same
   correction the .lang/.nav-search hovers in Section 2 already make). The
   hover rule's own --brand-white stays correct over the wipe fill, so only
   the resting colour is overridden. Unscoped by section on purpose: this
   file loads only on /khadamat/ pages, and any future row-list here (a
   routes list, a downloads list) hits the same defect. */
i.row-item-action {
  color: var(--accent-strong);
}

/* ---- 5. EVERY PHOTOGRAPH FIGURE ON A KHADAMAT PAGE CARRIES KHADAMAT'S OWN
   MARK, NOT THE GROUP'S ------------------------------------------------- */
/* Generic across this file, not scoped to one section id: the earlier fix
   only touched #about-snapshot, and the next figure added anywhere else on
   a Khadamat page (khadamat-360, about/#overview, contact/#support, ...)
   kept drawing sdeira-sections.css's shared default mark - Sweihan orange
   diagonals, the GROUP's own brand line, not Khadamat's. Site owner, 31
   Aug 2026, flagged live on #khadamat-360's own figure: "never Sdeira's
   corner on a Khadamat page - the two must stay separated". This file only
   ever loads on a /khadamat/ page (see every khadamat page's own
   <link>), so an UNSCOPED .split-media selector here is already scoped
   correctly by the file itself - no id needed, and no future figure on
   this property can miss it again.
   Same corner-mark technique as the hero (the hero marks
   above): one instance, fixed width + aspect-ratio, background 100% 100%,
   on the photograph itself rather than the section. Opposite corner from
   .split-ribbon (the figure component's own identity band, physical `left:
   8%` - see sdeira-sections.css) so the two marks never overlap. .split-
   media is `position: relative` already (the figure component's own
   rule), so no extra positioning context is needed here. */
.split-media::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  /* Site owner, 6 Sep 2026 (preview review): this override hardcoded its own
     36% instead of reading the shared --photo-mark-width token every other
     p.43 mark on the site sizes from (sdeira-sections.css's .split-media
     ::after, --photo-mark-width: clamp(160px, 60%, 520px)) - the smaller
     fixed percentage read as a visibly undersized corner on this one figure
     next to every other mark on the property. Token match, only the asset
     stays Khadamat's own recoloured pair. */
  inline-size: var(--photo-mark-width);
  aspect-ratio: var(--photo-mark-p43-ratio);
  background: url("../images/patterns/khadamat-lines.svg?v=deea2893504e9ed7") no-repeat right bottom / 100% 100%;
  opacity: 1;
  pointer-events: none;
}

/* A SUPPLIED LOGO CARRIES NO DECORATION, EITHER MARK - site owner, 6 Sep
   2026 (preview review, /khadamat/about, "Khadamat by Sdeira Group"):
   sdeira-sections.css already suppresses its own generic ::after mark on
   `.split--logo`/`.split--logo-wide` (a logo is not a crop of the master, so
   it never carries Sdeira's watermark) - but this file's own Khadamat-green
   ::before above is unscoped, so it painted THIS brand's own corner mark on
   the exact same logo the shared rule was already protecting. A parent-
   brand identity mark (the Sdeira Group logo, "Khadamat by Sdeira Group")
   gets no background, no side decoration, no mark of either brand's colour -
   matching the same "a logo is not a photograph" reasoning the shared
   suppression already states, extended here to Khadamat's own mark. */
.split--logo .split-media::before,
.split--logo-wide .split-media::before {
  display: none;
}

/* THE SHARED DEFAULT MARK MUST NOT ALSO DRAW HERE. sdeira-sections.css's
   generic .split-media::after (right bottom, orange lines.svg) paints on
   every figure by default; every Khadamat figure already carries its OWN
   Khadamat-green mark via ::before above (same corner). Left unsuppressed
   the two stacked - two different-coloured diagonal-line boards
   overlapping in one corner - the exact "double corner mark" the site
   owner flagged, 31 Aug 2026 (first on #about-snapshot, then again on
   #khadamat-360 once that section shipped - the reason this is now
   unscoped rather than a second id-specific rule). One mark per photo. */
.split-media::after {
  display: none;
}

/* Site owner, 6 Sep 2026: the mobile-only 46% override existed to compensate
   for this rule's old fixed 36% desktop base - now that inline-size reads
   the shared --photo-mark-width clamp (identical to every other p.43 mark
   site-wide, none of which carry a mobile-specific override of their own),
   the clamp's own responsive range already covers narrow viewports and this
   rule would only reintroduce the same size mismatch this fix corrects. */

/* ---- 5b. .pad--sunken's own ground texture - KEPT for khadamat, 31 Aug 2026 -
   REVERSED site-owner instruction. The 25 Aug 2026 ruling below (no pattern
   texture on khadamat, on a section or a card) is retired for THIS layer:
   the shared solid-a.svg ground pattern (sdeira-sections.css's
   .pad--sunken/.pad--edge/.pad--field::before, 5% opacity, the same p.43
   mark every other such section on the site carries) is now required on
   #why-khadamat exactly like any other .pad--sunken section - the site
   owner's own rule is that a section of this kind always carries the
   pattern, khadamat included, not an exception. Nothing to override: the
   shared rule already renders correctly here (a neutral Grey 70 fill at 5%
   opacity reads the same quiet texture on Khadamat's own --surface-sunken
   ground as it does on the group's). The icon-grid card change directly
   below (section 6) is untouched - that is a different, deliberate
   khadamat-only card treatment (the corner mark replacing the skewed band),
   not this section-ground texture, and stays exactly as it was. */

/* ---- 6. Icon-grid cards: the corner mark instead of the skewed band -------
   Site owner instruction, 25 Aug 2026: .icon-item-band (the skewed identity
   band every icon-grid card on the site carries - sdeira-sections.css, a
   shared component, not khadamat's own) is off for khadamat only. Repeated
   across a whole row of cards it reads as the same "line concept" the
   photo-corner-mark change above already retired, and khadamat's own
   direction is one mark family sitewide: the same small corner pattern-mark
   the photographs above carry, scaled down for a card a few hundred pixels
   wide, not a second mark shape. Scoped to `.icon-grid .icon-item-band` (not
   a blanket `.icon-item-band` hide) so nothing outside an icon-grid is
   touched, and scoped to khadamat-theme.css so no other page on the site is
   affected - this is a named khadamat variant of the shared card, not a
   change to the component itself. */

/* The icon card's corner mark is drawn by the shared icon-card rule from the
   card-mark tokens (the Khadamat block of sdeira-tokens.css): the brand's
   lines on every icon card, turned in place in Arabic, capped to the card's
   height, half the card on a phone. Nothing here restates its box, pivot,
   turn or direction. */

/* ---- 6c. The photo hero's corner pair --------------------------------------
   Drawn by the shared hero mark rule from the Khadamat hero mark tokens
   (sdeira-tokens.css); nothing is restated here. */

/* ---- 6d. The closing band's mark pair ------------------------------------
   Drawn by the shared band rule from the Khadamat band mark tokens, which
   follow its hero mark tokens (sdeira-tokens.css). */

/* ---- 7. NO SECOND LAYER ON A FILLED BUTTON -------------------------------
   Site owner, 22 Sep 2026: a filled button keeps its resting fill on hover and
   the hover effect is the icon only. This block used to give .btn-primary the
   header CTA's travelling slanted panel (site owner, 3 Sep 2026, when the
   header CTA still had one), filled with --surface-brand-deep - which for this
   brand is Olive Green carried 30% toward Brand Black, i.e. a genuinely darker
   second tone, and the clearest example of the defect the owner photographed.
   Both panels it declared are gone: .btn-primary::before and .cta-action::before
   now paint nothing, and the hover is the trailing glyph's shift, declared once
   at the end of assets/css/sdeira-sections.css. */
.btn-primary::before,
.cta-action::before {
  content: none;
}

#packages .spec-table thead th {
  background: var(--accent-fill);
  color: var(--on-action);
}

.menu {
  --drawer-corner-art: url("../images/patterns/khadamat-lines.svg?v=deea2893504e9ed7");
}

/* ---- 6b. card-grid (project variant) cards: one Khadamat mark per card ----
   The mark is the shared `.card-chevron::after`, and its artwork is this
   brand's through --card-mark-art (sdeira-tokens.css). */

/* THE RESTING ACTION READS ON THE LIGHT CARD, NOT WHITE ON GREY. The project
   variant puts the action on a --surface-sunken copy panel, but this brand
   maps --accent-text (what sdeira-subpage.css's `.news-item .action-link`
   rests at) to White - the ink for a solid accent fill, invisible on Light
   Gray. Same correction the row-list arrow above already makes: the token
   calibrated for small marks on a light ground is --accent-strong. The
   hover rule's own --link-hover stays (darker still, correct on the card)
   and the shared wipe-hover whitening
   (.project-card-base:is(:hover...) .project-card-copy > :not(.card-chevron))
   outranks this at rest only - on hover the wipe fill supplies the dark
   ground the white needs, exactly as on the group site's own cards. */
#service-categories .news-item .action-link {
  color: var(--accent-strong);
}

/* The shared wipe-hover whitening cannot match here: its selector is
   `.project-card-base:is(:hover, :focus-within) .project-card-copy > ...`
   but the card's own class list puts project-card-base on the article while
   :is() here needs the SAME element to be hovering - verified live, the link
   never matched it, so under the full wipe fill it stayed Deep Forest on
   Deep Forest. Restate it one level up (same ancestor chain every other
   whitening rule in this file already walks), so hover/focus/keyboard all
   flip the action to white exactly when the wipe supplies its dark ground. */
#service-categories .project-card-base:is(:hover, :focus-within) .action-link {
  color: var(--brand-white);
}

/* THE ONE-PARAGRAPH logo-wide RECORD READS IN THE RIGHT ORDER - site owner,
   6 Sep 2026 (preview review, "الوصف فوق العنوان؟"): .split--logo-wide's own
   grid assigns `p:nth-of-type(2)`/`(3)` to body-one/body-two because its
   reference record (companies/khadamat.toml's #overview) always ships a
   kicker first. This page's record carries NO kicker, so its single body
   paragraph IS `p:nth-of-type(1)`, matches neither selector, and fell into
   auto-placement ABOVE the h2 in the heading row. Pinning the first
   paragraph to body-one restores the documented reading order (heading, then
   body below) without touching the reference record, whose own paragraphs
   keep their numbered slots. */

/* THE HEADING ROW IS ONLY AS TALL AS ITS TALLEST ITEM - site owner, 6 Sep
   2026 (follow-up, "المسافة بين العنوان والوصف مختلفة كتير"): the logo tile
   sits in the SAME grid row as the h2 (areas "heading media"), and the
   shared .split--logo-wide .split-media padding clamp(24px, 3vw, 44px)
   measured 43.2px per side here, making the row ~138px tall against a
   69px heading - so the paragraph started ~88px below the heading's last
   line, the gap the owner flagged. The tile's padding is the only
   stretchable part of that row: trimming it (scoped to this section, the
   reference record on /companies/khadamat/ keeps the shared value) brings
   the row down to the heading's own height and the paragraph follows
   immediately. The logo itself is unchanged; only the empty tile margin
   around it shrinks. */
#khadamat-by-sdeira .split--logo-wide .split-copy > p:nth-of-type(1) {
  grid-area: body-one;
}

#khadamat-by-sdeira .split--logo-wide .split-media {
  padding: clamp(10px, 1.2vw, 16px);
}

/* ---- Alternating grounds: a card or a form panel is never its section's colour
   Owner, 21 Oct 2026: Khadamat's sections alternate White and Light Gray
   (alternate_grounds in its _config.toml), so two neighbouring sections can no
   longer share one textured ground. On a White section the cards take Light
   Gray and the form panel takes Light Gray with White controls, the same pair
   Eskan uses. Light Gray sections keep the shared White cards. */
html[data-brand="khadamat"] .pad:not(.pad--sunken, .pad--field, .photo-band) :is(.news-list--cols .news-item, .icon-item) {
  background: var(--surface-sunken);
}
html[data-brand="khadamat"] .pad:not(.pad--sunken) .form-block--panel {
  padding: var(--sec-head-gap);
  border-radius: var(--r);
  background: var(--surface-sunken);
}
html[data-brand="khadamat"] .pad:not(.pad--sunken) .form-block--panel .field :is(input:not([type="checkbox"], [type="file"]), select, textarea),
html[data-brand="khadamat"] .pad:not(.pad--sunken) .form-block--panel .field :is(input:not([type="checkbox"], [type="file"]), select, textarea):hover,
html[data-brand="khadamat"] .pad:not(.pad--sunken) .form-block--panel .field :is(input, select, textarea):focus-visible,
html[data-brand="khadamat"] .pad:not(.pad--sunken) .form-block--panel :is(.select-toggle, .phone-country-toggle, .field .file-drop, .field--consent input[type="checkbox"]:not(:checked)) {
  background-color: var(--surface-raised);
}

/* ---- Spec table on a White section: the rows step off the ground ----------
   Owner, 22 Oct 2026: with alternating grounds the package table sits on White,
   where the shared zebra (White odd rows, transparent even rows) drew a table
   with no visible rows. On a White section the odd rows take Light Gray and the
   even rows stay White, with a hairline between rows; the heading row keeps its
   brand fill. Light Gray sections keep the shared rule. */
html[data-brand="khadamat"] .pad:not(.pad--sunken, .pad--inverse) .spec-table tbody tr:nth-child(odd) {
  background: var(--surface-sunken);
}
html[data-brand="khadamat"] .pad:not(.pad--sunken, .pad--inverse) .spec-table tbody tr:nth-child(even) {
  background: var(--surface-raised);
}
html[data-brand="khadamat"] .pad:not(.pad--sunken, .pad--inverse) .spec-table tbody tr {
  border-block-end: 1px solid color-mix(in srgb, var(--surface-sunken) 70%, var(--brand-black, #000) 12%);
}

/* ---- Home hero on a phone: the buildings stay in the frame ----------------
   Owner, 22 Oct 2026: the sky and the buildings must both show on desktop and
   on a phone. The client's landscape photographs centre on their path and
   palms, so a portrait crop kept sky and pavement and lost the buildings. The
   focus-left variant (set per slide in content/khadamat/pages/home.toml)
   moves the crop toward the building block. */
@media (max-width: 767px) {
  .subpage-hero--carousel .subpage-hero-media .hero-carousel-slide--focus-left img {
    object-position: 0% 50%;
  }
  .subpage-hero--carousel .subpage-hero-media .hero-carousel-slide--focus-soft img {
    object-position: 25% 50%;
  }
}

/* In Arabic the copy sits on the right, over whatever the photograph has
   there: the dark building and the worker. Mirroring these two photographs
   (no signs or text in either) gives the Arabic hero the same calm sky behind
   its copy that the English one has. */
/* The page's own zoom animation ends on scale(1), which would undo the mirror
   and, on the way, turn the photograph through zero width. The Arabic slides
   get the same zoom with the mirror kept in both keyframes. */
@keyframes khadamat-hero-zoom-mirrored {
  from { transform: scale(-1.08, 1.08); }
  to   { transform: scale(-1, 1); }
}
[dir="rtl"] :is(.hero-carousel-slide--focus-left, .hero-carousel-slide--focus-soft) img {
  transform: scale(-1.08, 1.08);
  animation-name: khadamat-hero-zoom-mirrored;
}
@media (prefers-reduced-motion: reduce) {
  [dir="rtl"] :is(.hero-carousel-slide--focus-left, .hero-carousel-slide--focus-soft) img {
    transform: scaleX(-1);
    animation: none;
  }
}
