/*
 * Aamin AI home page (HAFR workspace): page.css, the page-wide layer every section shares.
 *
 * Order of the page's stylesheets (build.mjs): tokens.css → /ds/icons/icons.css → /kit/base.css →
 * /characters/characters.css → page.css → sections/<id>/section.css (each scoped under
 * [data-section="<id>"]). Sections build on what is here; they never restyle it globally.
 *
 *   1. Fonts                 the self-hosted faces, each claiming only its own script
 *   2. NEW TOKENS            page values to promote into tokens.css (frame, rhythm, type, grounds)
 *   3. Base                  reset, document, focus, selection, helpers
 *   4. Frame                 .hf-wrap (contained 1200 / wide 1360 / text 760), .hf-sec rhythm
 *   5. Grounds               .hf-ground--pearl | nacre | paper | lustre | sea | night
 *   6. Section head (P03)    .hf-head: label, two-tone heading, one line
 *   7. Buttons, links, pills .hf-btn, .hf-link, .hf-pill, .hf-chip, .hf-st (dot + word), .hf-example
 *   8. Header                .hf-nav (the hero's header, with the interim Aamin AI wordmark)
 *   9. (retired: the walk rail)
 *  10. The call dock         .hf-dock
 *  11. The email area        .hf-mailform (§5.3), .hf-address (mailto), .hf-mail-note
 *  12. Placeholders, reduced motion, hidden tabs, RTL
 *
 * Rules: no glass (no backdrop-filter, no frosted fills), no photographs, no violet; one amber
 * seal per view; one dark ground per page (the Secure night), always full-bleed; text on solid
 * calm grounds; WCAG AA; 44 px targets; status is always a dot and a word.
 */

/* 1. Fonts ------------------------------------------------------------------------------------ */
@font-face {
  font-family: "HF Geist";
  src: url("/assets/fonts/geist@5.3.0/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "HF Geist";
  src: url("/assets/fonts/geist@5.3.0/geist-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "HF Geist Mono";
  src: url("/assets/fonts/geist-mono@5.3.0/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "HF Instrument Serif";
  src: url("/assets/fonts/instrument-serif@5.3.0/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "HF Alexandria";
  src: url("/assets/fonts/alexandria@5.3.0/alexandria-arabic-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  size-adjust: 94.5%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "HF Amiri";
  src: url("/assets/fonts/amiri@5.3.0/amiri-accent.796ab6a6.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  size-adjust: 118%;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "HF Geist Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica");
  size-adjust: 100.9%; ascent-override: 99.6%; descent-override: 29.2%; line-gap-override: 0%;
  unicode-range: U+0000-024F, U+2000-206F, U+20AC, U+2122;
}

/* 2. NEW TOKENS ------------------------------------------------------------------------------- */
:root {
  /* Frame (Section Pattern Library §2.3: margins 80 / 24, contained 1,200, wide 1,360). */
  --hf-side: 24px;
  --hf-wrap: 1200px;
  --hf-wrap-wide: 1360px;
  --hf-wrap-text: 760px;
  --hf-gutter: 24px;
  --hf-nav-h: 64px;
  /* Rhythm: 72 px at 390, 120 px at 1440, 144 px from 1920 (Craft Sheet rule 10, 8 px grid). */
  --hf-sec-pad: clamp(4rem, 2.2rem + 4.4vw, 7.5rem); /* home-refine-1: 64 / 99 / 120 px, a shorter page */
  --hf-sec-pad-tight: clamp(3rem, 2rem + 3vw, 5rem);
  --hf-sec-pad-loose: clamp(6rem, 3rem + 8vw, 12rem);
  --hf-head-gap: clamp(2.5rem, 1.8rem + 2.4vw, 4rem); /* head → content */

  /* Type (P03): H2 32 → 56 px, Geist 500, −0.04 em, leading 1.04; Arabic Alexandria 500, 0, 1.28. */
  --hf-fs-h2: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  --hf-fs-h3: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  --hf-fs-line: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --hf-fs-body: 1.0625rem;
  --hf-fs-label: 0.8125rem;
  --hf-fs-mono: 0.8125rem;
  --hf-lh-h2: 1.04;
  --hf-lh-h2-ar: 1.28;
  --hf-tr-h2: -0.04em;
  --hf-wt-h2: 500;
  --hf-wt-h2-ar: 500;
  --hf-measure: 62ch;

  /* Inks (Craft Sheet rule 11): text-1 for heads and one phrase, text-2 body, text-3 notes. */
  --hf-color-text-tone: #56677D; /* the second tone of a heading on pearl (5.43:1) */

  /* Grounds (Craft Sheet §5.6 recipe, in oklab so no stop passes through violet). */
  --hf-ground-pearl: #F7F7F4;
  --hf-ground-paper: #F5F5F1;
  --hf-ground-nacre: #EEF0EC;
  --hf-ground-night: var(--hf-color-inst-ground);
  --hf-atmos-shell: rgb(244 211 196);
  --hf-atmos-champagne: rgb(243 223 183);
  --hf-atmos-silver: rgb(200 216 242);
  --hf-atmos-sea: rgb(191 230 225);
  --hf-atmos-sea-mist: rgb(210 230 230);

  /* Solid surfaces (no glass). */
  --hf-surface-card: #FFFFFF;
  --hf-surface-inset: #F5F6F3;
  --hf-surface-chip: #FDFDFC;
  --hf-line-card: rgb(11 13 16 / 0.08);
  --hf-ring-soft: 0 0 0 1px rgb(11 13 16 / 0.075);
  --hf-shadow-card: 0 1px 2px rgb(11 13 16 / 0.05), 0 18px 44px -18px rgb(30 42 54 / 0.22), 0 0 0 1px rgb(11 13 16 / 0.05);
  --hf-shadow-float: 0 1px 2px rgb(11 13 16 / 0.06), 0 24px 64px rgb(30 42 54 / 0.08), 0 0 0 1px rgb(11 13 16 / 0.04);
  --hf-shadow-nav: 0 1px 2px rgb(11 13 16 / 0.04), 0 10px 30px -16px rgb(30 42 54 / 0.20), 0 0 0 1px rgb(11 13 16 / 0.06);
  --hf-tint-sea: #E4F0EE;
  --hf-tint-sea-line: rgb(0 103 118 / 0.14);
}
@media (min-width: 48rem) { :root { --hf-side: clamp(32px, 4vw, 48px); } }
@media (min-width: 64rem) { :root { --hf-side: clamp(40px, 5.56vw, 80px); --hf-nav-h: 76px; --hf-gutter: 32px; } }
@media (min-width: 120rem) { :root { --hf-side: clamp(96px, 5vw, 128px); --hf-wrap: 1320px; --hf-wrap-wide: 1560px; --hf-wrap-text: 820px; } }
@media (min-width: 160rem) { :root { --hf-wrap: 1440px; --hf-wrap-wide: 1760px; --hf-wrap-text: 880px; } }

/* 3. Base ------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  background: var(--hf-ground-pearl); color-scheme: light;
  scroll-padding-top: 24px;
}
body {
  margin: 0; min-block-size: 100svh;
  font-family: var(--hf-font-sans);
  font-size: var(--hf-fs-body); line-height: 1.55;
  color: var(--hf-color-text-1);
  background: var(--hf-ground-pearl);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-synthesis: none; font-kerning: normal;
  overflow-x: clip;
}
:lang(ar) body, body:lang(ar) { font-family: "HF Alexandria", "HF Geist", "HF Geist Fallback", var(--hf-font-arabic-system); line-height: 1.75; }
/* Resets carry zero specificity (:where), so any class wins over them. */
:where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd) { margin: 0; }
:where(button) { cursor: pointer; }
:where(ul[class], ol[class], nav ul, nav ol) { padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; }
img, video, canvas { display: block; max-inline-size: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--hf-color-selection); color: var(--hf-color-on-selection); }
:focus-visible { outline: var(--hf-focus-width) solid var(--hf-color-focus); outline-offset: var(--hf-focus-offset); border-radius: 4px; }
.hf-ground--night :focus-visible { outline-color: var(--hf-color-sea-300); }
.hf-sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.hf-visually-hidden { position: absolute !important; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.hf-mono { font-family: var(--hf-font-mono); letter-spacing: 0; font-feature-settings: "zero" 0; }
.hf-ltr { direction: ltr; unicode-bidi: isolate; }
.hf-skip {
  position: fixed; z-index: var(--hf-z-skip); inset-inline-start: 16px; top: 12px;
  padding: 10px 16px; border-radius: var(--hf-radius-pill);
  background: var(--hf-color-inverse); color: var(--hf-color-on-inverse);
  font-size: 14px; font-weight: 500; text-decoration: none;
  transform: translateY(-160%);
}
.hf-skip:focus-visible { transform: none; }
/* Icons inherit from icons.css; the RTL mirror for direction icons. */
[dir="rtl"] .hf-icon--dir { scale: -1 1; }

/* 4. Frame ------------------------------------------------------------------------------------ */
/* Always centred at every width (the D-030 wide-screen bug): margin auto + side padding. */
.hf-wrap {
  inline-size: 100%;
  max-inline-size: calc(var(--hf-wrap) + 2 * var(--hf-side));
  margin-inline: auto;
  padding-inline: var(--hf-side);
}
.hf-wrap--wide { max-inline-size: calc(var(--hf-wrap-wide) + 2 * var(--hf-side)); }
.hf-wrap--text { max-inline-size: calc(var(--hf-wrap-text) + 2 * var(--hf-side)); }
.hf-wrap--full { max-inline-size: none; }
/* A 12-column grid inside a wrap (columns collapse to one below 768 px). */
.hf-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--hf-gutter); row-gap: var(--hf-gutter); }
@media (max-width: 47.99rem) { .hf-grid { grid-template-columns: minmax(0, 1fr); } .hf-grid > * { grid-column: 1 / -1 !important; } }

/* Sections: one rhythm for the page. Every section root is [data-section]; .hf-sec adds the
   padding. Sections that bleed (floor, the night, the map) use .hf-sec--flush and pad inside. */
[data-section] { position: relative; }
.hf-sec { padding-block: var(--hf-sec-pad); }
.hf-sec--tight { padding-block: var(--hf-sec-pad-tight); }
.hf-sec--loose { padding-block: var(--hf-sec-pad-loose); }
.hf-sec--flush { padding-block: 0; }
.hf-sec--top-0 { padding-block-start: 0; }
.hf-sec--bottom-0 { padding-block-end: 0; }


/* 5. Grounds ---------------------------------------------------------------------------------- */
/* Light pearl throughout (§2.3); one dark moment (the Secure night), full-bleed, never a box. */
.hf-ground--pearl { background-color: var(--hf-ground-pearl); }
.hf-ground--paper { background-color: var(--hf-ground-paper); }
.hf-ground--nacre { background-color: var(--hf-ground-nacre); }
/* Lustre (the hero and the closing band): shell + champagne top-left, silver-blue top-right,
   a sea-glass halo; text zones stay at relative luminance ≥ 0.75. */
.hf-ground--lustre {
  background-color: var(--hf-ground-paper);
  background-image:
    radial-gradient(46% 44% at 50% 62% in oklab, rgb(191 230 225 / 0.55) 0%, rgb(210 230 230 / 0.28) 55%, rgb(210 230 230 / 0) 100%),
    radial-gradient(66% 62% at 2% -8% in oklab, rgb(244 211 196 / 0.9) 0%, rgb(243 223 183 / 0.55) 42%, rgb(243 223 183 / 0) 76%),
    radial-gradient(62% 58% at 100% -6% in oklab, rgb(200 216 242 / 0.9) 0%, rgb(210 230 230 / 0.5) 46%, rgb(210 230 230 / 0) 78%),
    linear-gradient(180deg in oklab, #FCFCFA 0%, #F7F7F4 70%, #F5F5F1 100%);
}
/* Sea-glass lustre (the Run stop): the halo centred on the map. */
.hf-ground--sea {
  background-color: var(--hf-ground-pearl);
  background-image:
    radial-gradient(52% 50% at 60% 55% in oklab, rgb(191 230 225 / 0.7) 0%, rgb(210 230 230 / 0.32) 55%, rgb(210 230 230 / 0) 100%),
    radial-gradient(60% 50% at 0% 0% in oklab, rgb(200 216 242 / 0.6) 0%, rgb(200 216 242 / 0) 70%),
    linear-gradient(180deg in oklab, #F7F7F4 0%, #F3F6F4 60%, #F7F7F4 100%);
}
/* The night (Secure): the instrument ground and its inks. Sections inside read the same token
   names, so .hf-head, .hf-btn, .hf-st and .hf-example recolour themselves. */
.hf-ground--night {
  --hf-color-text-1: var(--hf-color-inst-text-1);
  --hf-color-text-2: var(--hf-color-inst-text-2);
  --hf-color-text-3: var(--hf-color-inst-text-3);
  --hf-color-text-tone: var(--hf-color-inst-text-3);
  --hf-color-line: var(--hf-color-inst-line);
  --hf-surface-card: var(--hf-color-inst-panel);
  --hf-surface-chip: var(--hf-color-inst-row);
  --hf-ring-soft: 0 0 0 1px rgb(233 238 244 / 0.09);
  --hf-color-inverse: var(--hf-color-inst-text-1);
  --hf-color-inverse-hover: #FFFFFF;
  --hf-color-on-inverse: var(--hf-color-inst-ground);
  background-color: var(--hf-ground-night);
  color: var(--hf-color-text-1);
  color-scheme: dark;
}
/* A faint dot lattice (the process stage, the call band's edge). */
.hf-dots {
  background-image: radial-gradient(rgb(11 13 16 / 0.07) 1px, transparent 1.4px);
  background-size: 14px 14px;
}

/* 6. Section head (P03, two-tone) --------------------------------------------------------------
   <header class="hf-head">
     <p class="hf-head__label">Services</p>                          (or .hf-head__eyebrow: 01 · Build)
     <h2 class="hf-head__title" id="walk-title">Part one <span class="hf-head__tone">part two.</span></h2>
     <p class="hf-head__line">One line in old-site words.</p>
   </header>
   Modifiers: .hf-head--center, .hf-head--split (title start, line end, ≥ 1024 px). */
.hf-head { display: grid; gap: 20px; max-inline-size: 980px; }
.hf-head + * { margin-block-start: var(--hf-head-gap); }
.hf-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.hf-head__label {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  min-block-size: 30px; padding: 4px 14px 4px 10px;
  border-radius: var(--hf-radius-pill);
  background: var(--hf-surface-chip); box-shadow: var(--hf-ring-soft);
  font-size: var(--hf-fs-label); font-weight: 500; letter-spacing: 0.005em; line-height: 1.2;
  color: var(--hf-color-text-2);
}
.hf-head__label::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 1px; background: currentColor; opacity: 0.55; }
.hf-head--center .hf-head__label { justify-self: center; }
.hf-head__eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--hf-font-mono); font-size: var(--hf-fs-mono); font-weight: 500; letter-spacing: 0.02em;
  color: var(--hf-color-text-2);
}
.hf-head__eyebrow::before { content: ""; inline-size: 24px; block-size: 1px; background: currentColor; opacity: 0.6; }
.hf-head__eyebrow .hf-icon { font-size: 18px; color: var(--hf-color-sea-600); }
.hf-ground--night .hf-head__eyebrow .hf-icon { color: var(--hf-color-sea-300); }
.hf-head__title {
  font-size: var(--hf-fs-h2); font-weight: var(--hf-wt-h2);
  line-height: var(--hf-lh-h2); letter-spacing: var(--hf-tr-h2);
  color: var(--hf-color-text-1);
  text-wrap: balance;
}
.hf-head__tone { color: var(--hf-color-text-tone); }
.hf-head__line {
  max-inline-size: 620px;
  font-size: var(--hf-fs-line); line-height: 1.5; letter-spacing: -0.01em;
  color: var(--hf-color-text-2);
  text-wrap: pretty;
}
.hf-head--center .hf-head__line { margin-inline: auto; }
@media (min-width: 64rem) {
  .hf-head--split { max-inline-size: none; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 64px; align-items: end; }
  .hf-head--split > .hf-head__label, .hf-head--split > .hf-head__eyebrow { grid-column: 1 / -1; }
  .hf-head--split > .hf-head__line { padding-block-end: 0.4em; }
}
/* The amber seal as a full stop (one amber per view). */
.hf-stop {
  display: inline-block; inline-size: var(--hf-size-seal-stop); block-size: var(--hf-size-seal-stop);
  margin-inline-start: 0.06em; border-radius: 8%;
  background: var(--hf-color-seal); vertical-align: 0.02em;
  color: transparent; overflow: hidden; font-size: inherit;
}
:lang(ar) .hf-head__title { font-weight: var(--hf-wt-h2-ar); line-height: var(--hf-lh-h2-ar); letter-spacing: 0; }
:lang(ar) .hf-head__line { letter-spacing: 0; line-height: 1.7; }
:lang(ar) .hf-head__label, :lang(ar) .hf-head__eyebrow { letter-spacing: 0; }

/* 7. Buttons, links, pills, status, Example data ---------------------------------------------- */
.hf-btn {
  --h: 52px; --orb: 40px; --inset: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  block-size: var(--h); min-inline-size: 44px;
  padding-inline: 24px var(--inset);
  border: 0; border-radius: var(--hf-radius-pill);
  font: inherit; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--hf-dur-2) var(--hf-ease-out), box-shadow var(--hf-dur-3) var(--hf-ease-out), transform var(--hf-dur-2) var(--hf-ease-out);
}
.hf-btn:active { transform: scale(var(--hf-scale-press)); }
.hf-btn--sm { --h: 44px; --orb: 34px; --inset: 5px; font-size: 15px; gap: 12px; padding-inline-start: 18px; }
.hf-btn--lg { --h: 52px; }
.hf-btn--ink { background: var(--hf-color-inverse); color: var(--hf-color-on-inverse); box-shadow: 0 1px 2px rgb(11 13 16 / 0.2), 0 10px 24px -12px rgb(11 13 16 / 0.5); }
.hf-btn--ink:hover { background: var(--hf-color-inverse-hover); }
.hf-btn--line { padding-inline: 24px 22px; gap: 10px; background: var(--hf-surface-card); color: var(--hf-color-text-1); box-shadow: 0 1px 2px rgb(11 13 16 / 0.05), 0 0 0 1px rgb(11 13 16 / 0.12); }
.hf-btn--line:hover { box-shadow: 0 1px 2px rgb(11 13 16 / 0.06), 0 0 0 1px rgb(11 13 16 / 0.28); }
.hf-ground--night .hf-btn--line { box-shadow: 0 0 0 1px rgb(233 238 244 / 0.18); }
.hf-btn__orb {
  display: grid; place-items: center; inline-size: var(--orb); block-size: var(--orb);
  border-radius: 50%; background: var(--hf-color-on-inverse); color: var(--hf-color-inverse); font-size: 18px;
}
.hf-btn__orb .hf-icon, .hf-link .hf-icon { transition: translate var(--hf-dur-2) var(--hf-ease-out); }
.hf-btn:is(:hover, :focus-visible) .hf-btn__orb .hf-icon,
.hf-link:is(:hover, :focus-visible) .hf-icon { translate: var(--hf-move-arrow) 0; }
[dir="rtl"] .hf-btn:is(:hover, :focus-visible) .hf-btn__orb .hf-icon,
[dir="rtl"] .hf-link:is(:hover, :focus-visible) .hf-icon { translate: calc(var(--hf-move-arrow) * -1) 0; }
.hf-btn__icon { font-size: 18px; }
/* Arrow link: "AI agents →" */
.hf-link {
  display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px;
  font-weight: 500; color: var(--hf-color-text-1); text-decoration: none;
  text-underline-offset: 4px;
}
.hf-link:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.hf-link .hf-icon { font-size: 18px; }
/* Pill (a label or a tag) and mono chip (a machine string). */
.hf-pill {
  display: inline-flex; align-items: center; gap: 8px; min-block-size: 28px; padding: 4px 12px;
  border-radius: var(--hf-radius-pill); background: var(--hf-surface-chip); box-shadow: var(--hf-ring-soft);
  font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--hf-color-text-2);
}
.hf-chip {
  display: inline-flex; align-items: center; gap: 8px; min-block-size: 28px; padding: 4px 12px 4px 10px;
  border-radius: var(--hf-radius-pill); background: var(--hf-surface-chip); box-shadow: var(--hf-ring-soft);
  font-family: var(--hf-font-mono); font-size: 12.5px; line-height: 1.2; letter-spacing: 0; color: var(--hf-color-text-2);
  direction: ltr; unicode-bidi: isolate;
}
/* Status: always a dot and a word. */
.hf-st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: var(--hf-radius-pill); font-size: 12.5px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.hf-st::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; flex: none; }
.hf-st--ok { color: var(--hf-color-success); background: var(--hf-color-success-tint); box-shadow: inset 0 0 0 1px var(--hf-color-success-line); }
.hf-st--info { color: var(--hf-color-info); background: var(--hf-color-info-tint); box-shadow: inset 0 0 0 1px var(--hf-color-info-line); }
.hf-st--danger { color: var(--hf-color-danger); background: var(--hf-color-danger-tint); box-shadow: inset 0 0 0 1px var(--hf-color-danger-line); }
.hf-st--wait { color: var(--hf-color-warning); background: var(--hf-color-warning-tint); box-shadow: inset 0 0 0 1px var(--hf-color-warning-line); }
.hf-st--region { color: var(--hf-color-sea-600); background: var(--hf-tint-sea); box-shadow: inset 0 0 0 1px var(--hf-tint-sea-line); }
.hf-ground--night .hf-st { background: rgb(233 238 244 / 0.06); box-shadow: inset 0 0 0 1px rgb(233 238 244 / 0.12); }
.hf-ground--night .hf-st--ok { color: #6FE0B8; }
.hf-ground--night .hf-st--info { color: #A9BEFF; }
.hf-ground--night .hf-st--danger { color: #FF9C90; }
.hf-ground--night .hf-st--region { color: var(--hf-color-sea-300); }
/* "Example data" / «بيانات توضيحية»: on every screen, map and mock-up that shows data. */
.hf-example {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--hf-font-mono); font-size: 12px; line-height: 1.2; letter-spacing: 0.01em;
  color: var(--hf-color-text-3);
}
.hf-example::before { content: ""; inline-size: 7px; block-size: 7px; border-radius: 1.5px; box-shadow: inset 0 0 0 1px currentColor; }
:lang(ar) .hf-example { font-family: var(--hf-font-sans); letter-spacing: 0; }
/* A solid light card (no glass). */
.hf-card { background: var(--hf-surface-card); border-radius: var(--hf-radius-lg); box-shadow: var(--hf-shadow-card); }

/* 8. Header (the hero's, with the interim Aamin AI wordmark) ---------------------------------- */
.hf-nav {
  position: fixed; z-index: var(--hf-z-nav); inset-inline: 0; top: 0;
  block-size: var(--hf-nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 24px;
  /* polish 2026-11-28: the header sits on the story column (lib/story.css), so the logo and Book a call
     line up with every chapter, row and the footer under them. */
  padding-inline: var(--hf-story-pad-x, 24px);
  max-inline-size: calc(var(--hf-story-max, 1200px) + 2 * var(--hf-story-pad-x, 24px)); margin-inline: auto;
}
/* The sticky header (home-assemble): it stays at the top of every view. Over the hero's first screen
   it sits on the hero's own light; once the page scrolls (app.js sets data-scrolled on <html>) it
   gets a solid pearl bar with a hairline, full-bleed. Solid, never glass. */
.hf-nav::before {
  content: ""; position: absolute; z-index: -1; inset-block: 0; inset-inline: calc(50% - 50vw);
  background: var(--hf-ground-pearl); box-shadow: 0 1px 0 rgb(11 13 16 / 0.07), 0 12px 28px -24px rgb(30 42 54 / 0.4);
  opacity: 0; transition: opacity var(--hf-dur-3) var(--hf-ease-out);
}
[data-scrolled] .hf-nav::before { opacity: 1; }
[data-scrolled] .hf-nav__pill ul { box-shadow: 0 0 0 1px rgb(11 13 16 / 0.07); background: var(--hf-surface-card); }
/* Anchors land under the header, not behind it. */
[data-section] { scroll-margin-top: var(--hf-nav-h); }
.hf-nav__logo { justify-self: start; display: inline-flex; align-items: center; min-block-size: 44px; color: var(--hf-color-text-1); text-decoration: none; border-radius: 6px; }
.hf-wordmark { display: inline-flex; align-items: baseline; color: var(--hf-color-text-1); }
/* The logo (D-035, brand/aamin/): sized by height so the English and Arabic lockups match. */
.hf-wordmark--img { block-size: 34px; inline-size: auto; }
@media (max-width: 63.99rem) { .hf-wordmark--img { block-size: 30px; } }
.hf-wordmark--text { gap: 0.12em; font-family: var(--hf-font-sans); font-size: 23px; font-weight: 600; letter-spacing: -0.035em; line-height: 1; white-space: nowrap; direction: ltr; }
.hf-wordmark__seal { inline-size: 0.3em; block-size: 0.3em; border-radius: 8%; background: var(--hf-color-seal); }
.hf-nav__pill ul {
  display: flex; align-items: center; gap: 2px; margin: 0; padding: 4px; list-style: none;
  block-size: 52px; border-radius: var(--hf-radius-pill);
  background: var(--hf-surface-card); box-shadow: var(--hf-shadow-nav);
}
.hf-nav__pill a {
  display: inline-flex; align-items: center; block-size: 44px; padding-inline: 16px;
  border-radius: var(--hf-radius-pill);
  font-size: 15px; font-weight: 450; color: var(--hf-color-text-2); text-decoration: none; white-space: nowrap;
  transition: background-color var(--hf-dur-2), color var(--hf-dur-2);
}
.hf-nav__pill a:hover { background: var(--hf-surface-inset); color: var(--hf-color-text-1); }
.hf-nav__end { justify-self: end; display: flex; align-items: center; gap: 18px; }
.hf-nav__lang { display: inline-flex; align-items: center; min-block-size: 44px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--hf-color-text-1); border-radius: 6px; padding-inline: 4px; }
.hf-nav__menu {
  display: none; place-items: center; inline-size: 44px; block-size: 44px; padding: 0;
  border: 0; border-radius: 50%; background: var(--hf-surface-card); color: var(--hf-color-text-1);
  box-shadow: var(--hf-shadow-nav); font-size: 20px; cursor: pointer;
}
@media (max-width: 63.99rem) {
  .hf-nav { grid-template-columns: 1fr auto; }
  .hf-nav__pill, .hf-nav__cta { display: none; }
  .hf-nav__menu { display: grid; }
  .hf-nav__end { gap: 10px; }
  /* The menu sheet (phones): the same links, solid paper, under the bar. */
  [data-menu-open] .hf-nav__pill {
    display: block; position: absolute; inset-inline: var(--hf-story-pad-x, 20px); top: calc(var(--hf-nav-h) - 4px);
  }
  [data-menu-open] .hf-nav__pill ul { flex-direction: column; align-items: stretch; block-size: auto; padding: 8px; border-radius: var(--hf-radius-lg); }
  [data-menu-open] .hf-nav__pill a { block-size: 48px; font-size: 17px; color: var(--hf-color-text-1); }
}
:lang(ar) .hf-nav__pill a, :lang(ar) .hf-nav__lang { letter-spacing: 0; }
/* The header fit (2026-11-28: seven links, as on the old site). lib/app.js wireNavFit() measures the row
   and sets data-nav-fit on <html> at 64rem and up: none = the centred row fits; "dense" = the row spreads to
   the full width with tighter links; "menu" = even that does not fit, so the links move into the menu sheet
   (Book a call stays in the bar). Below 64rem the phone rules above apply. */
@media (min-width: 64rem) {
  [data-nav-fit] .hf-nav { display: flex; justify-content: space-between; max-inline-size: none; }
  [data-nav-fit] .hf-nav__logo, [data-nav-fit] .hf-nav__end { flex-shrink: 0; }
  [data-nav-fit="dense"] .hf-nav__pill a { padding-inline: 12px; font-size: 14.5px; }
  [data-nav-fit="menu"] .hf-nav__pill { display: none; }
  [data-nav-fit="menu"] .hf-nav__menu { display: grid; }
  [data-nav-fit="menu"][data-menu-open] .hf-nav__pill {
    display: block; position: absolute; inset-inline-end: var(--hf-story-pad-x, 24px); top: calc(var(--hf-nav-h) - 4px);
    inline-size: min(340px, calc(100% - 48px));
  }
  [data-nav-fit="menu"][data-menu-open] .hf-nav__pill ul { flex-direction: column; align-items: stretch; block-size: auto; padding: 8px; border-radius: var(--hf-radius-lg); box-shadow: var(--hf-shadow-card); }
  [data-nav-fit="menu"][data-menu-open] .hf-nav__pill a { block-size: 48px; font-size: 16px; color: var(--hf-color-text-1); }
}

/* 9. The walk rail: retired (Home Reframe: the header shows the normal navigation at all times; polish
   2026-11-28 removed its markup, script and styles). */

/* 10. The call dock (P28), phones and tablets (home-refine-1) ----------------------------------
   A 44 px ink pill in the inline-end corner, 16 px from the edges, no amber square. app.js shows it
   only while the visitor scrolls back up or rests, between the hero and the call band. */
.hf-dock {
  position: fixed; z-index: var(--hf-z-dock);
  inset-block-end: max(16px, env(safe-area-inset-bottom)); inset-inline-end: 16px;
  translate: 0 calc(100% + 24px); opacity: 0;
  transition: translate var(--hf-dur-4) var(--hf-ease-out), opacity var(--hf-dur-3) var(--hf-ease-out);
}
.hf-dock[data-on] { translate: 0 0; opacity: 1; }
.hf-dock .hf-btn { --h: 44px; --orb: 34px; font-size: 14.5px; padding-inline-start: 16px; gap: 10px; box-shadow: 0 1px 2px rgb(11 13 16 / 0.12), 0 12px 28px -14px rgb(11 13 16 / 0.45); }
[data-menu-open] .hf-dock { opacity: 0; pointer-events: none; }
/* One floating "Book a call" at a time (rule C): from 1,024 px the sticky header carries it. */
@media (min-width: 64rem) { .hf-dock { display: none; } }

/* 11. The email area (§5.3) -------------------------------------------------------------------
   <form class="hf-mailform" method="post" action="/contact/" data-mail>
     <label class="hf-mailform__label" for="call-email">Work email</label>
     <div class="hf-mailform__row">
       <input class="hf-mailform__input" id="call-email" type="email" name="email" autocomplete="email" inputmode="email" required>
       <button class="hf-btn hf-btn--ink" type="submit"><span class="hf-btn__label">Book a call</span><span class="hf-btn__orb" aria-hidden="true">(arrow icon, dir)</span></button>
     </div>
   </form>
   <p class="hf-address">or write to us at <a href="mailto:aaminai.ae@gmail.com">aaminai.ae@gmail.com</a></p>
   No placeholder text in the field. app.js prevents the submit and says "Prototype: nothing is sent." */
.hf-mailform { display: grid; gap: 8px; inline-size: min(100%, 560px); text-align: start; }
.hf-mailform__label { font-size: 14px; font-weight: 450; color: var(--hf-color-text-2); }
.hf-mailform__row { display: flex; align-items: center; gap: 6px; padding: 0; border-radius: var(--hf-radius-pill); background: var(--hf-surface-chip); box-shadow: 0 0 0 1px rgb(11 13 16 / 0.13), 0 1px 2px rgb(11 13 16 / 0.05); }
.hf-mailform__row:focus-within { box-shadow: 0 0 0 2px var(--hf-color-sea-600); }
.hf-mailform__input {
  flex: 1 1 auto; min-inline-size: 0; block-size: 52px; padding-inline: 22px 8px;
  border: 0; border-radius: var(--hf-radius-pill); background: transparent;
  font-size: 16px; color: var(--hf-color-text-1);
}
.hf-mailform__input:focus { outline: none; }
.hf-mailform__row .hf-btn { margin: 0; box-shadow: none; flex: none; }
[dir="rtl"] .hf-mailform__input { padding-inline: 22px 8px; }
@media (max-width: 47.99rem) {
  .hf-mailform__row { flex-direction: column; align-items: stretch; gap: 10px; padding: 0; background: none; box-shadow: none; }
  .hf-mailform__row:focus-within { box-shadow: none; }
  .hf-mailform__input { block-size: 48px; background: var(--hf-surface-chip); box-shadow: 0 0 0 1px rgb(11 13 16 / 0.13); }
  .hf-mailform__input:focus-visible { box-shadow: 0 0 0 2px var(--hf-color-sea-600); }
  .hf-mailform__row .hf-btn { --h: 48px; justify-content: space-between; }
}
.hf-mail-note { margin-block-start: 10px; font-size: 14px; color: var(--hf-color-text-2); }
.hf-address { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 16px; font-weight: 450; color: var(--hf-color-text-2); }
.hf-address a { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; color: var(--hf-color-text-1); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; direction: ltr; unicode-bidi: isolate; }
.hf-address .hf-icon { font-size: 20px; color: var(--hf-color-sea-600); }

/* Social glyphs (D-027): the official monochrome marks, 20 px, 44 px targets. */
.hf-social { display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 50%; color: var(--hf-color-text-2); }
.hf-social:hover { color: var(--hf-color-text-1); background: var(--hf-surface-inset); }
.hf-social .hf-icon { font-size: 20px; }

/* 13. Device frames: retired 2026-11-28 (home-rows, Home Reframe). Every device is now lib/devices.css (.hf-dev). */

/* 14. Small shared helpers (merged from the sections' candidates) -------------------------------
   The chapter intro is lib/story.css (.hf-chapter); the old hairline marker was removed (polish 2026-11-28). */
/* No-wrap phrase (secure "red-teamed", sectors "mid-market.", build "least-privilege"). */
.hf-nowrap { white-space: nowrap; }
/* Latin standard names inside Arabic sentences never break (MITRE ATLAS, ISO/IEC 42001). */
:lang(ar) .hf-ltr { white-space: nowrap; }
/* Map inks as page tokens (the hero and the Run stop draw the same floor). */
:root { --hf-map-dot: #34404C; --hf-map-edge: #0E6F7C; --hf-map-context: #A3AEB9; --hf-map-sea: #00879B; --hf-map-signal: #0097B1; }
/* Sections far from the viewport skip rendering until they come near (rule D). */
.hf-cv { content-visibility: auto; } /* lib/app.js sets each section's measured contain-intrinsic-size */
/* polish-home (the transitions builder's request, the hairline fixed at its source): a band that skips rendering paints
   only inside its own box, and two neighbours on fractional pixels can leave one row between them where the page
   ground shows (lib/transitions.css closes it with overflow-clip-margin, which Safari lacks). Each band overlaps the
   one before by 1 px, from the first paint (no shift when .hf-cv lands), so there is never a row between them. */
main > [data-section] + [data-section], main + [data-section] { margin-block-start: -1px; }

/* 12. Placeholders, reduced motion, hidden tabs ------------------------------------------------ */
.hf-placeholder { padding-block: 56px; border-block-start: 1px dashed rgb(11 13 16 / 0.12); }
.hf-placeholder__tag { font-family: var(--hf-font-mono); font-size: 13px; color: var(--hf-color-text-3); }
/* A stub section (sections/<id>/ before its builder lands): the message, quietly. */
.hf-stub { border-block-start: 1px dashed rgb(11 13 16 / 0.1); }
.hf-stub__note { margin-block-start: 24px; font-family: var(--hf-font-mono); font-size: 12px; color: var(--hf-color-text-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
html[data-reduced] *, html[data-reduced] *::before, html[data-reduced] *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
/* Hidden tab: CSS loops stop with the GSAP ones (lib/motion.js sets data-hidden). */
html[data-hidden] *, html[data-hidden] *::before, html[data-hidden] *::after { animation-play-state: paused !important; }

@media (forced-colors: active) {
  .hf-stop, .hf-wordmark__seal { background: CanvasText; forced-color-adjust: none; }
}

/* The brief says never "live": two kit screens carry a "live" chip in their headers (kit-owned strings,
   guardrails-log.js and run-monitor.js). The home page does not show it (home-assemble). */
.hf-gl__live, .hf-rm__live { display: none !important; }

/* Rule D (home-refine-1, -2): the reserved heights of the old work screens (.sec-screen, .run-ops__screen,
   .sta-screen, .trust-screen) went with those screens; a device's screen now has a fixed 16:10 or phone box
   (lib/devices.css), so a mount never changes the page's height. Removed in polish 2026-11-28. */

/* Rule D (home-refine-1): the lustre grounds are drawn on their own composited layer, so the soft
   gradients are rasterized once. Painted in the same layer as the section's content, every small
   change inside the section (a screen, an agent) re-rastered the gradient under it: without a GPU
   that cost 250-450 ms a frame across the Run stop. */
.hf-ground--sea, .hf-ground--lustre { position: relative; isolation: isolate; }
.hf-ground--sea::before, .hf-ground--lustre::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: inherit; will-change: transform;
}
.hf-ground--sea, .hf-ground--lustre { background-image: none; }
.hf-ground--sea::before {
  background-image:
    radial-gradient(52% 50% at 60% 55% in oklab, rgb(191 230 225 / 0.7) 0%, rgb(210 230 230 / 0.32) 55%, rgb(210 230 230 / 0) 100%),
    radial-gradient(60% 50% at 0% 0% in oklab, rgb(200 216 242 / 0.6) 0%, rgb(200 216 242 / 0) 70%),
    linear-gradient(180deg in oklab, #F7F7F4 0%, #F3F6F4 60%, #F7F7F4 100%);
}
.hf-ground--lustre::before {
  background-image:
    radial-gradient(46% 44% at 50% 62% in oklab, rgb(191 230 225 / 0.55) 0%, rgb(210 230 230 / 0.28) 55%, rgb(210 230 230 / 0) 100%),
    radial-gradient(66% 62% at 2% -8% in oklab, rgb(244 211 196 / 0.9) 0%, rgb(243 223 183 / 0.55) 42%, rgb(243 223 183 / 0) 76%),
    radial-gradient(62% 58% at 100% -6% in oklab, rgb(200 216 242 / 0.9) 0%, rgb(210 230 230 / 0.5) 46%, rgb(210 230 230 / 0) 78%),
    linear-gradient(180deg in oklab, #FCFCFA 0%, #F7F7F4 70%, #F5F5F1 100%);
}
[data-section="hero"] .hf-hero__atmos, [data-section="secure"] .sec-sky { will-change: transform; }

/* ==============================================================================================
   home-refine-2 (the second blind reading: clarity 8, trust 4)
   ============================================================================================== */

/* Labels the visitor could read: the chapter markers and the stops' eyebrows were 12.5-13 px mono in
   a pale grey. Now the sans at 14-15 px, semibold, in the second ink (AA on every ground). */
:root { --hf-fs-label: 0.875rem; }
.hf-head__eyebrow { font-family: var(--hf-font-sans); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--hf-color-text-1); }
:lang(ar) .hf-head__eyebrow { font-size: 16px; }
.hf-ground--night .hf-head__eyebrow { color: var(--hf-color-inst-text-1); }
.hf-head__label { color: var(--hf-color-text-1); font-weight: 550; }

/* Play / Pause on the live screens: the visitor could not tell what the round button controls. Its
   own name (aria-label, "Pause animation" / "Play animation") shows as a small tip on hover and focus. */
.hf-screen [data-toggle], .hf-screen .hf-screen__toggle { position: relative; }
.hf-screen .hf-screen__ctl { overflow: visible; } /* the kit's own position: absolute holds the tip */
.hf-screen .hf-screen__ctl::after {
  content: attr(aria-label); position: absolute; z-index: 5; top: calc(100% + 8px); inset-inline-end: 0;
  padding: 5px 10px; border-radius: 8px; background: var(--hf-color-text-1); color: #FFFFFF;
  font-family: var(--hf-font-sans); font-size: 12.5px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  opacity: 0; translate: 0 -3px; pointer-events: none;
  transition: opacity var(--hf-dur-2) var(--hf-ease-out), translate var(--hf-dur-2) var(--hf-ease-out);
}
.hf-screen .hf-screen__ctl:hover::after, .hf-screen .hf-screen__ctl:focus-visible::after { opacity: 1; translate: 0 0; }
:lang(ar) .hf-screen .hf-screen__ctl::after { font-size: 13px; }

/* Plain samples (the visitor: "codes like LLM01, ASI06 and LLM06 · ASI02 are noise to an executive";
   "Attack chain · MITRE ATLAS"). On the home page the screens keep the frameworks by name (the Secure
   chips, the screens' "Standards we map to") and drop the per-row codes, the OWASP code grid and the
   ATLAS tactic chain. The kit pages keep them. */
[data-screen="red-team-run"] .hf-rt__refs,
[data-screen="red-team-run"] .hf-rt__card-refs,
[data-screen="red-team-run"] .hf-rt__cover,
[data-screen="red-team-run"] .hf-rt__chain,
[data-screen="guardrails-log"] .hf-gl__refs { display: none !important; }

/* Arabic: Latin names inside Arabic sentences are isolated, so a joining «و» never runs into them
   ("Agentic Top 10وMITRE ATLAS" in the visitor's reading); a no-break space follows the «و». */
:lang(ar) .hf-ltr, :lang(ar) bdi { unicode-bidi: isolate; }
:lang(ar) .hf-ltr { direction: ltr; }
