/* Shfrah — site.css: shared by every page, the home included (home_patch.py links it there), loaded after the theme's
   main.css and the home's shfrah.css (and sections.css on the home).
   Arabic pages look exactly like the home; English pages (html[lang="en"], dir="ltr") get Inter and the LTR fixes. */

/* ---------------------------------------------------------------- page start */
/* the first panel sits as far under the header as the home's hero: the theme gives the home's first wrapper
   (.sec-1-home-4-wrap) 140px, 100px on phones; every page starts <main> with a plain <div class="container-2200"> */
main > .container-2200:first-child { padding-top: 140px; }
@media (max-width: 767.98px) { main > .container-2200:first-child { padding-top: 100px; } }

/* ---------------------------------------------------------------- theme buttons */
/* The theme sets .at-btn { line-height: 1 } and clips its sliding label (.at-btn span { overflow: hidden }): the clip box
   was exactly one em tall, so Arabic lost its hamza and the dots and tails under the line (ابدأ read ابدآ), English its
   descenders. The label box is now two em tall with half an em of negative margin above and below: the button keeps its
   size, the glyphs keep their ink, and the hover swap (text-1 out, text-2 in) still happens inside the box. */
.at-btn > span:has(> .text-1) { line-height: 2; margin-top: -.5em; margin-bottom: -.5em; }
.at-btn > span > .text-1, .at-btn > span > .text-2 { line-height: 2; }
.at-btn .text-1 span, .at-btn .text-2 span { display: inline; overflow: visible; }

/* ---------------------------------------------------------------- chrome */
/* the EN / عربي pill (the home keeps this rule inline in its <head>) */
.shf-lang { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 12px; border: 1px solid rgba(127, 127, 127, .35); border-radius: 50px; font: 600 13px/1 var(--shf-ff); color: var(--at-neutral-900); text-decoration: none; letter-spacing: .04em; }
.shf-lang:hover { color: var(--at-neutral-900); border-color: rgba(127, 127, 127, .7); }
html[lang="en"] .shf-lang { letter-spacing: 0; font-size: 14px; padding: 0 13px 2px; }

/* the page you are on, in the main menu and the phone menu: a quiet pill, the theme's own shape */
.at-main-menu nav ul li.is-active > a { background: var(--at-neutral-50); border-radius: 50px; }
[data-bs-theme=dark] .at-main-menu nav ul li.is-active > a { background: rgba(255, 255, 255, .1); }
.at-offcanvas-menu nav ul li.is-active > a { opacity: 1; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .35em; }

/* 992-1199px: the menu is hidden there; the theme's col-lg-1 squeezed the logo and the right-hand group spilled over it */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .shf-hdr-logo { flex: 0 0 auto; width: auto; }
  .shf-hdr-right { flex: 1 1 0; width: auto; }
}
/* 1200-1399px: logo, menu and right-hand group share the row by their real widths (the English menu is wider) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .shf-hdr-logo, .shf-hdr-right { flex: 0 0 auto; width: auto; }
  .shf-hdr-nav { flex: 1 1 0; width: auto; min-width: 0; }
  .shf-hdr-nav .at-main-menu nav ul li a { padding-left: 15px; padding-right: 15px; }
}

/* dark mode: the theme inverts header logos ([data-bs-theme=dark] .at-header-logo img { filter: invert(1) }) because it
   ships one black logo; ours has a light and a dark file, and the inverted dark file turned black on black */
[data-bs-theme=dark] .at-header-logo img.shf-logo,
[data-bs-theme=dark] .at-offcanvas-logo img.shf-logo { filter: none; }

/* Arabic headings in the theme's display size (.fz-ds-1) read right to left. shfrah.css sets .fz-ds-1 left-to-right for
   big numbers (the home no longer uses the class); on these pages a big number takes dir="ltr" itself. */
html[dir="rtl"] .fz-ds-1 { direction: rtl; unicode-bidi: normal; }

/* search box: a real search field (type=search) styled like the theme's text field */
.at-search-form-input input[type="search"] { -webkit-appearance: none; appearance: none; }
.at-search-form-input input[type="search"]::-webkit-search-cancel-button,
.at-search-form-input input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

/* search results (search.js), under the box: the theme's pill language, larger */
.shf-search-results { margin-top: 18px; max-height: min(52vh, 480px); overflow-y: auto; overscroll-behavior: contain; }
.shf-search-results[hidden] { display: none; }
.shf-search-results ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.shf-search-results a { display: block; padding: 14px 20px; border-radius: 18px; border: 1px solid var(--at-neutral-100); background: var(--at-neutral-0); color: var(--at-neutral-900); transition: border-color .25s ease, transform .25s ease; }
.shf-search-results a:hover, .shf-search-results a:focus-visible { border-color: var(--at-neutral-900); color: var(--at-neutral-900); outline: none; }
.shf-search-results__t { display: block; font-size: 17px; font-weight: 600; line-height: 1.4; }
.shf-search-results__d { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--at-neutral-500); }
.shf-search-results__none { margin: 0; padding: 6px 2px; font-size: 16px; color: var(--at-neutral-500); }
@media (max-width: 575.98px) {
  .shf-search-results { max-height: 46vh; } .shf-search-results a { padding: 12px 16px; }
  .at-search-form-input input, .at-search-form-input input::placeholder { font-size: 18px; }
}

/* keyboard focus stays visible on the theme's buttons and links */
.at-btn:focus-visible, .shf-lang:focus-visible, .at-header-right button:focus-visible, .at-categories-item:focus-visible,
.hamburger-open-btn:focus-visible, .at-offcanvas-social__link:focus-visible { outline: 2px solid var(--at-neutral-900); outline-offset: 3px; }

/* the full-screen menu (offcanvas 2) on phones and touch screens. The theme reveals it with a growing circle (clip-path,
   .7s) on a layer that also blurs the page behind it (backdrop-filter: blur(20px)). Android Chrome cannot draw the two
   together: frames flip between the whole blurred layer and the page, a flicker on every open and close. There the layer
   covers the screen at 90% white, so the blur showed almost nothing: it goes, and the layer is painted solid.
   On phones the circle grows from the button that opened it (site.js 7 sets --shf-menu-x/y; the theme's corner without). */
@media (max-width: 991.98px), (hover: none) {
  .at-offcanvas-2-area .offcanvas-bg { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(var(--at-neutral-0-rgb)); }
}
@media (max-width: 991.98px) {
  .at-offcanvas-2-area .offcanvas-bg { clip-path: circle(0% at var(--shf-menu-x, calc(100% - 45px)) var(--shf-menu-y, 45px)); }
  .at-offcanvas-2-area.menu-open .offcanvas-bg { clip-path: circle(150% at var(--shf-menu-x, calc(100% - 45px)) var(--shf-menu-y, 45px)); }
}

/* the dark-mode switch: the theme hides its checkbox (display: none), which took it out of the tab order and away from
   screen readers. It stays invisible but focusable (its aria-label names it); the round toggle shows the keyboard focus. */
.dark-light-mode .toggle { position: relative; }
.dark-light-mode .input { display: block; position: absolute; top: 50%; left: 50%; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.dark-light-mode .toggle:has(.input:focus-visible) { outline: 2px solid var(--at-neutral-900); outline-offset: 3px; border-radius: 50%; }

/* reveal-text on touch screens (shfrah.css .shf-reveal): each word or letter starts --shf-step after the one before,
   50ms by default (Arabic: words). English splits into letters; site.js shortens the step so a long title is lit in
   about as long as an Arabic one. */
.shf-reveal .shf-w { transition-delay: calc(var(--shf-i, 0) * var(--shf-step, 50ms)); }

/* ---------------------------------------------------------------- lead forms (contact and landing pages) */
/* error recovery (site.js): the banner above the form and the fields lead.php sent back */
.shf-form-error { margin-bottom: 18px; padding: 14px 18px; border-radius: 14px; border: 1px solid rgba(220, 38, 38, .35); background: rgba(220, 38, 38, .08); color: #b91c1c; font-size: 15px; line-height: 1.6; }
[data-bs-theme=dark] .shf-form-error { color: #fca5a5; background: rgba(220, 38, 38, .14); border-color: rgba(248, 113, 113, .4); }
.shf-invalid, .shf-invalid:focus { border-color: #dc2626 !important; }

/* ---------------------------------------------------------------- our clients (clients.py: the homes and /about/) */
/* The theme's brand module (index-5 .sec-3-home-5): the tag and the line, then the .at-brand-item boxes, side by side
   from 1400px (col-xxl-4 / col-xxl-8). The boxes keep the theme's radius and hairline and take index-15's neutral-50 on
   the white panel; 3:2 instead of the theme's 180px squares, so the rows stay low. 4 x 2 from 768px, 2 x 4 below.
   Each logo is centred at its optical size: --w (its unit, clients.py) x --k (36% of the box's width, at most 84px:
   the files are drawn for 3x that). Light mode shows the black files, dark mode the white ones (the other one is
   display: none, so its lazy image is not fetched). */
.shf-clients__title { text-wrap: balance; }   /* the line in the theme's statement size (h4): one line in Arabic, even lines in English */
.shf-clients__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.shf-clients .shf-clients__item { width: 100%; height: auto; aspect-ratio: 3 / 2; max-height: 152px; padding: 0; background: var(--at-neutral-50); --k: 56px; }   /* wider boxes (the grid under the line at 576-1399px, 1920px screens) stay as low as the logos need */
@supports (width: 1cqw) { .shf-clients .shf-clients__item { container-type: inline-size; --k: min(36cqw, 84px); } }
.shf-clients__logo { display: block; flex: none; width: calc(var(--w) * var(--k)); max-width: 86%; height: auto; }
.shf-clients__logo--dark { display: none; }
[data-bs-theme=dark] .shf-clients__logo--light { display: none; }
[data-bs-theme=dark] .shf-clients__logo--dark { display: block; }
@media (max-width: 767.98px) { .shf-clients__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* the homes' band under the cover (clients.band()): the tag and the line beside one row of logos; 4 x 2 below 1200px */
.shf-clients-band { padding-block: 34px; }
.shf-clients-band__inner { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); align-items: center; gap: 24px 32px; }
.shf-clients-band__head .at-btn { margin-bottom: 6px !important; }
.shf-clients-band__line { color: var(--at-neutral-500); font-size: 15px; line-height: 1.6; text-wrap: balance; }
.shf-clients-band__list { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px 22px; align-items: center; }
.shf-clients-band__item { display: flex; align-items: center; justify-content: center; height: 88px; --k: 58px; }
.shf-clients-band .shf-clients__logo { max-width: 100%; }
@media (max-width: 1199.98px) {
    .shf-clients-band__inner { grid-template-columns: minmax(0, 1fr); }
    .shf-clients-band__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .shf-clients-band__item { height: 84px; --k: 52px; }
}
@media (max-width: 575.98px) {
    .shf-clients-band { padding-block: 26px; }
    .shf-clients-band__list { gap: 6px 10px; }
    .shf-clients-band__item { height: 68px; --k: 40px; }
}

/* ---------------------------------------------------------------- English (LTR) */
/* type: Tajarib (Harf Library, harflibrary.com) for every page, Arabic and English, and for every family the theme,
   Bootstrap and the pages name (headings, body, buttons, code): self-hosted as its original OTF files (its licence allows
   websites; the files are not converted or subset). Weights: 300, 400, 500, 600-700 (bold), 800-900 (black). The regular
   and bold files are preloaded (chrome.FONT_LINKS). Icon fonts keep their own family. */
@font-face { font-family: "Tajarib"; font-weight: 300; font-style: normal; font-display: swap; src: url("/assets/fonts/tajarib/Tajarib_Typeface_Light.otf") format("opentype"); }
@font-face { font-family: "Tajarib"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/tajarib/Tajarib_Typeface_Regular.otf") format("opentype"); }
@font-face { font-family: "Tajarib"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/tajarib/Tajarib_Typeface_Medium.otf") format("opentype"); }
@font-face { font-family: "Tajarib"; font-weight: 600 700; font-style: normal; font-display: swap; src: url("/assets/fonts/tajarib/Tajarib_Typeface_Bold.otf") format("opentype"); }
@font-face { font-family: "Tajarib"; font-weight: 800 900; font-style: normal; font-display: swap; src: url("/assets/fonts/tajarib/Tajarib_Typeface_Black.otf") format("opentype"); }
html[lang] {
  --shf-ff: "Tajarib", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shf-ff-en: var(--shf-ff);
  --at-ff-heading: var(--shf-ff);
  --at-ff-body: var(--shf-ff);
  --at-heading-font: var(--shf-ff);
  --bs-font-sans-serif: var(--shf-ff);
  --bs-body-font-family: var(--shf-ff);
  --bs-font-monospace: var(--shf-ff);
}
/* Tajarib's stretched letters (OpenType ss01 + swsh, the long tails and kashida forms) on Arabic titles and display text:
   every heading and the theme's section titles; body text, menus, buttons and labels keep the plain forms */
html[lang="ar"] :is(h1, h2, h3, .alt-section-title, .section-title) { font-feature-settings: "ss01" 1, "swsh" 1; }
/* the stretched tails hang below a word and past its end: the theme's reveal words (inline blocks, painted in their own
   layer while they animate, which Safari cuts to the word's box) get room around the ink without moving the layout */
html[lang="ar"] .reveal-text div { padding-bottom: .34em; margin-bottom: -.34em; padding-inline-end: .3em; margin-inline-end: -.3em; }
/* home, "how we work": below 575px each step is a centred column, so a text that fits one line shrank to its own width and
   its divider with it (steps 3 and 4); the text block takes the card's full width like the steps that wrap */
@media (max-width: 574.98px) { .card__process-content { align-self: stretch; } }
/* buttons in sentence case ("Start a project"), not the theme's capitalize ("Start A Project"); one line in the header,
   as tall as the Arabic one (the header must not change height when you switch language) */
html[lang="en"] .at-btn { text-transform: none; }
.at-header-right .at-btn { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1599.98px) { html[lang="en"] .at-header-right .at-btn { padding: 17px 18px; } }
/* footer bottom row from 1200px: the theme's 2/7/3 columns left the four English tags one row too narrow ("Experience
   design" wrapped alone at 1440); the copyright and the family line take their own width, the tags the rest */
@media (min-width: 1200px) {
  html[lang="en"] .at-footer-copyright-area .col-xl-2, html[lang="en"] .at-footer-copyright-area .col-xl-3 { flex: 0 0 auto; width: auto; }
  html[lang="en"] .at-footer-copyright-area .col-xl-7 { flex: 1 1 0; width: auto; min-width: 0; }
  html[lang="en"] .at-footer-copyright-area ul { column-gap: 1rem !important; }
}
/* Inter is wider than the theme's DM Sans: its tightest tracking (-0.05em) closes up small text */
html[lang="en"] .at-btn, html[lang="en"] .at-main-menu nav ul li a, html[lang="en"] .at-categories-item { letter-spacing: -0.01em; }

/* a focused dark button keeps its white label: main.css a:focus { color: inherit } (0,1,1) beat .at-btn's #FEFEFE
   (0,1,0) and turned it dark on dark, after a keyboard Tab or a mouse click alike (a WhatsApp link opens a new tab and
   keeps the focus). This rule only ties with main.css's (0,1,1; :where() adds nothing) and wins by coming later, so any
   page rule that colours a button still beats it: a light pill keeps its dark label when focused (.shf-svc-start,
   .shf-lp-wa, .filter-btn, the dark-mode white pills). A light button coloured by a single class (0,1,0) gives its own
   :focus colour (thank-you.css .shf-ty__work). Focus rings on dark panels are white. */
a:focus:where(.at-btn:not(.bg-transparent):not(.common-black)) { color: #FEFEFE; }
.changeless .at-btn:focus-visible, .changeless a:focus-visible, .at-footer-area a:focus-visible { outline: 2px solid #FEFEFE; outline-offset: 3px; }
/* back to top floats over light content and over the dark footer: a white ring with a dark halo reads on both */
.back-to-top-btn:focus-visible { outline: 2px solid #FEFEFE; outline-offset: 2px; box-shadow: 0 0 0 5px var(--at-neutral-900); }
/* the footer's last row clears the back-to-top button: at the end of the page the button (fixed, 44px, 50px above the
   bottom, at the row's reading end) covered the end of the family line («... منذ 2007», "... since 2007"), and the
   theme's 80px blur strip (.px-blur-bottom) blurred the row. The row now ends 106px above the page's end (this padding
   plus the 10px strip under the footer), clear of both, at every width and in both directions. */
.at-footer-area .at-footer-copyright-area { padding-bottom: 96px; }

/* footer quick links: the second column holds the long names («وكلاء الذكاء الاصطناعي», "Custom software"), so it takes
   what the first, short one leaves (chrome.py col-auto / col, the block col-lg-5 col-xl-4); in English a name stays
   on one line (it fits from 320px up): a wrapped name read as two links */
html[lang="en"] .alt-footer-link-item a { white-space: nowrap; }

/* English headings wrap into even lines, as on the English home (tpl/src/ltr.css .reveal-text): the plain wrap often
   left one word alone on a heading's last line ("A system, not loose / screens"). The two-line thank-you title reads
   better with pretty ("Your request / is in."). Generated pages only (body.shf-page-*): the homes keep their rules. */
html[lang="en"] body[class*="shf-page-"] main :is(h1, h2, h3), html[lang="en"] body[class*="shf-page-"] main .reveal-text { text-wrap: balance; }
html[lang="en"] body.shf-page-thank-you main h1.shf-ty__title { text-wrap: pretty; }

/* ---------------------------------------------------------------- contact dock (chrome.contact_dock, site.js 6) */
/* One pill, «تواصل معنا» / "Contact us", in the bottom corner at the reading end: where the theme's back-to-top button
   sits (left on Arabic pages, right on English ones; 50px in from the side and the bottom, 20px under 575px), and the
   button moves up above it while it shows. Black in light mode, white in dark (the tokens invert), the theme's 50px
   button height and pill radius, a hairline ring so it holds its edge over dark pictures in light mode and light ones
   in dark. It opens a white card above it (24px corners, the hairline of the header and the search results, a soft
   shadow) from 768px, and a sheet from the bottom below (full width, a handle, the safe area under it, the theme's
   body-overlay tint behind). It lies over the theme's blurred bottom strip (.px-blur-bottom, z-index 999) and under
   the search overlay; site.js hides it while a menu or the search is open. The pill sits over the card's shadow; on
   phones under the dimmed page and the sheet. Rises use the site's curve. */
:root { --shf-dock-x: 50px; --shf-dock-y: 50px; --shf-dock-h: 50px; --shf-dock-gap: 12px; --shf-dock-ease: cubic-bezier(.2, .8, .2, 1); }
@media (max-width: 574.98px) { :root { --shf-dock-x: 20px; --shf-dock-y: 20px; --shf-dock-gap: 10px; } }

.shf-dock__pill {
  position: fixed; z-index: 1003; right: var(--shf-dock-x); bottom: calc(var(--shf-dock-y) + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px; height: var(--shf-dock-h); margin: 0; padding: 0 22px; padding-inline-start: 18px;
  border: 0; border-radius: 50px; background: var(--at-neutral-900); color: var(--at-neutral-0);
  font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 16px 34px -14px rgba(15, 15, 15, .55), 0 3px 10px -2px rgba(15, 15, 15, .16);
  /* out of sight until site.js shows it (html.shf-dock-on) but still in the Tab order: a keyboard focus brings it up
     (like a skip link), so the last stop of a page is never a control nobody can see. Without JavaScript it is a plain
     link, always there. */
  opacity: 0; pointer-events: none; transform: translate3d(0, 16px, 0) scale(.94);
  transition: opacity .25s ease, transform .35s ease, background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
html.shf-dock-on .shf-dock__pill {
  opacity: 1; pointer-events: auto; transform: none;
  transition: opacity .35s ease, transform .6s var(--shf-dock-ease), background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
@media (scripting: none) { .shf-dock__pill { opacity: 1; pointer-events: auto; transform: none; } }
.shf-dock__pill:hover, .shf-dock__pill:focus { color: var(--at-neutral-0); }   /* main.css a:hover, a:focus { color: inherit } */
html[lang="en"] .shf-dock__pill { letter-spacing: -0.01em; }
@media (hover: hover) {
  html.shf-dock-on .shf-dock__pill:hover { transform: translate3d(0, -2px, 0); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 22px 40px -14px rgba(15, 15, 15, .6), 0 4px 12px -2px rgba(15, 15, 15, .18); }
  html[data-bs-theme=dark].shf-dock-on .shf-dock__pill:hover { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 22px 40px -14px rgba(0, 0, 0, .9), 0 4px 12px -2px rgba(0, 0, 0, .5); }
}
html.shf-dock-on .shf-dock__pill:active { transform: scale(.97); transition: opacity .35s ease, transform .15s ease, background-color .3s ease, color .3s ease, box-shadow .3s ease; }
[data-bs-theme=dark] .shf-dock__pill { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 16px 34px -14px rgba(0, 0, 0, .85), 0 3px 10px -2px rgba(0, 0, 0, .45); }
/* keyboard focus: a band of the page colour, then the ring, so it reads over light and dark content alike */
.shf-dock__pill:focus-visible { outline: 2px solid var(--at-neutral-900); outline-offset: 3px; box-shadow: 0 0 0 3px var(--at-neutral-0), 0 16px 34px -14px rgba(15, 15, 15, .55); }
/* the mark: a speech bubble, a cross while the card is open */
.shf-dock__pill-ico { position: relative; flex: none; width: 20px; height: 20px; }
.shf-dock__pill-ico .shf-ico { position: absolute; top: 0; left: 0; width: 20px; height: 20px; transition: opacity .25s ease, transform .45s var(--shf-dock-ease); }
.shf-dock__pill-ico .shf-ico + .shf-ico { opacity: 0; transform: rotate(-90deg) scale(.5); }
.shf-dock__pill[aria-expanded="true"] .shf-dock__pill-ico .shf-ico:first-child { opacity: 0; transform: rotate(90deg) scale(.5); }
.shf-dock__pill[aria-expanded="true"] .shf-dock__pill-ico .shf-ico + .shf-ico { opacity: 1; transform: none; }
.shf-dock__pill-label { display: block; }
html[lang="ar"] .shf-dock__pill-label { padding-bottom: 2px; }   /* Thmanyah sits high on a line-height of 1 */

/* the theme's back-to-top button moves up above the pill while the pill shows, and steps aside while the card is open */
.back-to-top-wrapper { transition: opacity .3s ease-out, visibility .3s ease-out, bottom .3s ease-out, transform .6s var(--shf-dock-ease); }
html.shf-dock-on .back-to-top-wrapper { transform: translate3d(0, calc(50px - var(--shf-dock-y) - var(--shf-dock-h) - var(--shf-dock-gap)), 0); }
html.shf-dock-open .back-to-top-wrapper.back-to-top-btn-show { opacity: 0; visibility: hidden; }

/* the card: a popover above the pill, its corner at the pill's corner */
.shf-dock__scrim, .shf-dock__grab { display: none; }
.shf-dock__panel {
  position: fixed; z-index: 1002; right: var(--shf-dock-x);
  bottom: calc(var(--shf-dock-y) + var(--shf-dock-h) + 12px + env(safe-area-inset-bottom, 0px));
  width: 352px; max-width: calc(100vw - 2 * var(--shf-dock-x)); max-height: calc(100vh - var(--shf-dock-y) - var(--shf-dock-h) - 36px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: 22px 20px 20px; border: 1px solid var(--at-neutral-100); border-radius: 24px;
  background: var(--at-neutral-0); color: var(--at-neutral-900); text-align: start;
  box-shadow: 0 32px 70px -30px rgba(15, 15, 15, .42), 0 10px 26px -12px rgba(15, 15, 15, .14);
  transform-origin: 100% 100%;
  opacity: 0; visibility: hidden; transform: translate3d(0, 10px, 0) scale(.96);
  transition: opacity .18s ease, transform .25s ease, visibility 0s linear .25s;
}
html[dir="rtl"] .shf-dock__panel { transform-origin: 0 100%; }
html[dir="rtl"] .shf-dock__pill, html[dir="rtl"] .shf-dock__panel { right: auto; left: var(--shf-dock-x); }   /* the reading end */
.shf-dock.is-open .shf-dock__panel { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .5s var(--shf-dock-ease), visibility 0s; }
.shf-dock__panel::-webkit-scrollbar { display: none; }
[data-bs-theme=dark] .shf-dock__panel { box-shadow: 0 32px 70px -24px rgba(0, 0, 0, .75), 0 10px 26px -12px rgba(0, 0, 0, .45); }

.shf-dock__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.shf-dock__titles { flex: 1 1 auto; min-width: 0; }
.shf-dock .shf-dock__title { margin: 0 0 6px; font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: 0; color: var(--at-neutral-900); }
html[lang="en"] .shf-dock .shf-dock__title { font-weight: 600; letter-spacing: -0.02em; }
.shf-dock .shf-dock__lead { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.6; letter-spacing: 0; color: var(--at-neutral-500); }
.shf-dock__close {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: -4px; margin-inline-end: -6px; padding: 0;
  border: 1px solid var(--at-neutral-100); border-radius: 50%; background: transparent; color: var(--at-neutral-900);
  transition: background-color .25s ease, border-color .25s ease;
}
.shf-dock__close .shf-ico { width: 16px; height: 16px; }
.shf-dock__close:focus-visible { outline: 2px solid var(--at-neutral-900); outline-offset: 2px; }

/* the three ways in: a grouped list (the page grey in the white card), each row a white tile on hover */
.shf-dock__list { list-style: none; margin: 0 0 16px; padding: 4px; border-radius: 18px; background: var(--at-neutral-50); }
.shf-dock__list li { margin: 0; padding: 0; transition: none; }
.shf-dock__item {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; padding-inline-start: 8px;
  border-radius: 14px; color: var(--at-neutral-900); text-decoration: none; transition: background-color .25s ease;
}
.shf-dock__item:hover, .shf-dock__item:focus { color: var(--at-neutral-900); }
.shf-dock__item:focus-visible { outline: 2px solid var(--at-neutral-900); outline-offset: 0; }
.shf-dock__ico {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--at-neutral-0); box-shadow: inset 0 0 0 1px var(--at-neutral-100); color: var(--at-neutral-900); transition: background-color .25s ease;
}
.shf-dock__ico .shf-ico { width: 18px; height: 18px; }
.shf-dock__label { font-size: 16px; font-weight: 600; line-height: 1.3; }
html[lang="en"] .shf-dock__label { letter-spacing: -0.01em; }
.shf-dock__val { margin-inline-start: auto; font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--at-neutral-500); white-space: nowrap; }
.shf-dock__end { margin-inline-start: auto; display: inline-flex; color: var(--at-neutral-500); transition: transform .35s var(--shf-dock-ease); }
.shf-dock__end svg { width: 11px; height: 11px; }
@media (hover: hover) {
  .shf-dock__item:hover { background: var(--at-neutral-0); }
  .shf-dock__item:hover .shf-dock__ico { background: var(--at-neutral-50); }
  .shf-dock__item:hover .shf-dock__end { transform: translate3d(2px, -2px, 0); }
  .shf-dock__close:hover { background: var(--at-neutral-50); }
}
/* «ابدأ مشروعك»: the header's button, the card's width; white in dark mode, like the pill */
.shf-dock .shf-dock__cta { display: flex; width: 100%; }
[data-bs-theme=dark] .shf-dock .shf-dock__cta, [data-bs-theme=dark] .shf-dock .shf-dock__cta:hover,
[data-bs-theme=dark] .shf-dock .shf-dock__cta:focus { background: var(--at-neutral-900); color: var(--at-neutral-0); }

/* phones: a sheet from the bottom, the page dimmed behind it (a tap there closes it, so does a swipe down) */
@media (max-width: 767.98px) {
  .shf-dock__pill { z-index: 1001; }
  .shf-dock__scrim {
    display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1002; background: rgba(24, 24, 24, .5); touch-action: none;
    -webkit-tap-highlight-color: transparent; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
  }
  .shf-dock.is-open .shf-dock__scrim { opacity: 1; visibility: visible; transition: opacity .35s ease, visibility 0s; }
  .shf-dock__panel {
    bottom: 0; width: auto; max-width: none; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
    padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: 28px 28px 0 0;
    box-shadow: 0 -20px 50px -24px rgba(15, 15, 15, .35); touch-action: none;
    z-index: 1003; opacity: 1; transform: translate3d(0, 100%, 0); transition: transform .32s cubic-bezier(.4, 0, 1, 1), visibility 0s linear .32s;
  }
  .shf-dock.is-open .shf-dock__panel { opacity: 1; transform: none; transition: transform .55s var(--shf-dock-ease), visibility 0s; }
  html[dir] .shf-dock__panel { right: 0; left: 0; }
  .shf-dock__panel.is-drag { transition: none; }
  .shf-dock__panel.is-scroll { touch-action: pan-y; }   /* a card taller than the screen scrolls; the handle and title still drag */
  .shf-dock__panel.is-scroll .shf-dock__grab, .shf-dock__panel.is-scroll .shf-dock__head { touch-action: none; }
  [data-bs-theme=dark] .shf-dock__panel { box-shadow: 0 -20px 50px -24px rgba(0, 0, 0, .8); }
  .shf-dock__grab { display: block; width: 40px; height: 5px; margin: 0 auto 16px; border-radius: 5px; background: var(--at-neutral-200); }
  .shf-dock__item { min-height: 60px; }
}

/* short screens (a phone on its side): the pill lower, the card compact (no line under the title, smaller rows), so it
   fits without scrolling */
@media (max-height: 560px) {
  :root { --shf-dock-y: 16px; }
  .shf-dock .shf-dock__lead { display: none; }
  .shf-dock__head { align-items: center; margin-bottom: 10px; }
  .shf-dock .shf-dock__title { margin: 0; font-size: 18px; }
  .shf-dock__close { width: 32px; height: 32px; margin: 0; margin-inline-end: -4px; }
  .shf-dock__list { margin-bottom: 10px; }
  .shf-dock__item { min-height: 46px; padding-top: 4px; padding-bottom: 4px; }
  .shf-dock__ico { width: 34px; height: 34px; }
  .shf-dock .shf-dock__cta { padding-top: 14px; padding-bottom: 14px; }
  .shf-dock__grab { margin-bottom: 10px; }
}
@media (max-height: 560px) and (min-width: 768px) {
  .shf-dock__panel { padding: 14px 16px 16px; max-height: calc(100vh - var(--shf-dock-y) - var(--shf-dock-h) - 24px); }
}

/* the strip the pill waits for: from the top of the page to a line 85% of a screen down (site.js: or 15% of one above
   the homes' cover end); the pill shows once it is out of view */
.shf-dock-line { position: absolute; left: 0; top: 0; width: 1px; height: 85vh; pointer-events: none; visibility: hidden; }

/* reduced motion: no rise, scale, slide or turn; things appear and go */
@media (prefers-reduced-motion: reduce) {
  .shf-dock__pill, html.shf-dock-on .shf-dock__pill, html.shf-dock-on .shf-dock__pill:hover, html.shf-dock-on .shf-dock__pill:active { transform: none; }
  .shf-dock__pill, html.shf-dock-on .shf-dock__pill, html.shf-dock-on .shf-dock__pill:active { transition: opacity .15s ease, background-color .3s ease, color .3s ease; }
  .shf-dock__pill-ico .shf-ico, .shf-dock__pill[aria-expanded="true"] .shf-dock__pill-ico .shf-ico { transform: none !important; transition: opacity .15s ease; }
  .shf-dock__panel, .shf-dock.is-open .shf-dock__panel { transform: none; }
  .shf-dock__panel { transition: opacity .15s ease, visibility 0s linear .15s; }
  .shf-dock.is-open .shf-dock__panel { transition: opacity .15s ease, visibility 0s; }
  .shf-dock__end, .shf-dock__item:hover .shf-dock__end { transform: none !important; transition: none; }
  .back-to-top-wrapper { transition: opacity .3s ease-out, visibility .3s ease-out, bottom .3s ease-out; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 767.98px) {
  .shf-dock__panel { opacity: 0; }
  .shf-dock.is-open .shf-dock__panel { opacity: 1; }
}
@media print { .shf-dock, .shf-dock-line { display: none !important; } }
