/*
 * Aamin AI inner pages (HAFR workspace): pages/css/services.css, the six service pages
 * (pages/templates/service.mjs links it). Owner: pages-services, 2026-11-28.
 *
 * The frame is the home's one template (lib/story.css: .hf-chapter, .hf-row, .hf-eyebrow) and the shared
 * inner-page pieces (pages/pages.css, .pg-*). This file only adds the service pages' own pieces (.svc-*):
 *   the bot stage (a dotted tile with the agent and its old-site name), the hero's answer card, the
 *   numbered deliverables beside their sample, the "how long" line, the three roles (people only), the
 *   big dotted figure, the OWASP list with its codes, country cards, two-column checks, the who-tiles and
 *   the short reading list.
 * Plain CSS, tokens from tokens.css / page.css. Motion: only transform and opacity (lib/transitions.js
 * does the entrances); nothing here moves under prefers-reduced-motion.
 */

/* NEW TOKENS */
:root {
  --svc-dot: rgb(11 13 16 / 0.16);           /* the dotted grounds (bot stage, answer card) */
  --svc-dot-ink: #1C232B;                    /* the big dotted figure */
  --svc-dot-tone: #7C8B99;                   /* its second tone (the % sign) */
  --svc-line: rgb(11 13 16 / 0.1);
  --svc-card-radius: 24px;
}

/* ---------------------------------------------------------------- the bot stage */
.svc-stage {
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  inline-size: min(100%, 440px); aspect-ratio: 1 / 1;
  padding: 32px 24px 28px;
  border-radius: var(--svc-card-radius);
  background: var(--hf-surface-card, #FFFFFF);
  box-shadow: var(--hf-shadow-card, var(--hf-shadow-1));
}
.svc-stage::before {                         /* the dotted ground, fading to the edges */
  content: ""; position: absolute; inset: 10px; z-index: -1; border-radius: calc(var(--svc-card-radius) - 8px);
  background: radial-gradient(circle, var(--svc-dot) 1.1px, transparent 1.5px) center / 16px 16px;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
}
.svc-stage .pg-bot { gap: 20px; }
.svc-stage .pg-bot__name { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.svc-stage .pg-bot__role { max-inline-size: 28ch; font-size: 14.5px; color: var(--hf-color-text-2); }
.svc-stage--hero { inline-size: min(100%, 460px); }

/* a cast of bots on one stage (ai-agents: the typical first agents) */
.svc-stage--cast {
  aspect-ratio: auto; inline-size: min(100%, 600px); min-block-size: 340px;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: center; padding: 40px 20px;
}
.svc-stage--cast .pg-bot { gap: 14px; }
.svc-stage--cast .pg-bot__name { font-size: 15px; font-weight: 600; max-inline-size: 13ch; margin-inline: auto; text-wrap: balance; }

/* the hero's H1: the old second tone on its own quieter line (pages.css .pg-tone--sub), a little larger here */
.pg--service .pg-hero__title .pg-tone--sub { margin-block-start: 12px; font-size: 0.62em; line-height: 1.15; letter-spacing: -0.025em; }
:lang(ar) .pg--service .pg-hero__title .pg-tone--sub { letter-spacing: 0; line-height: 1.4; }

/* ---------------------------------------------------------------- the hero's answer card */
.svc-define {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; gap: 16px; align-content: start;
  inline-size: min(100%, 520px); padding: 36px 36px 32px;
  border-radius: var(--svc-card-radius);
  background: var(--hf-surface-card, #FFFFFF);
  box-shadow: var(--hf-shadow-card, var(--hf-shadow-1));
}
.svc-define::before {                        /* a quiet dotted corner */
  content: ""; position: absolute; inset-block-start: 0; inset-inline-end: 0; z-index: -1;
  inline-size: 62%; block-size: 70%;
  background: radial-gradient(circle, var(--svc-dot) 1.1px, transparent 1.5px) 0 0 / 14px 14px;
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 70%);
}
[dir="rtl"] .svc-define::before {
  -webkit-mask-image: radial-gradient(ellipse at 0% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at 0% 0%, #000 0%, transparent 70%);
}
.svc-define__label { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; color: var(--hf-color-text-3); }
.svc-define__text { margin: 0; font-size: 19px; line-height: 1.55; letter-spacing: -0.005em; color: var(--hf-color-text-1); text-wrap: pretty; }
.svc-define .pg-pills { margin-block-start: 6px; }
.svc-hero--define .pg-hero__visual { justify-content: flex-end; }

/* ---------------------------------------------------------------- what we deliver */
.svc-del .hf-chapter { padding-block-end: 0; }
.svc-del__row { padding-block-start: 64px; }
.svc-del__list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.svc-del__item {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; align-items: start;
  padding-block: 16px; border-block-start: 1px solid var(--svc-line);
}
.svc-del__item:first-child { border-block-start: 0; padding-block-start: 0; }
.svc-del__n { padding-block-start: 3px; font: 500 13px/1.4 var(--hf-font-mono); letter-spacing: 0.02em; color: var(--hf-color-text-3); }
.svc-del__t { margin: 0 0 4px; font-size: 17.5px; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; color: var(--hf-color-text-1); }
.svc-del__d { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--hf-color-text-2); text-wrap: pretty; }
.svc-del .hf-row__visual { align-self: center; }
/* one amber accent per view: where the sample is a live screen (its own seal), the eyebrow wears a quiet square */
.svc-has-device .hf-eyebrow::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--hf-color-text-3); }

/* no old-site sample fits (penetration-testing, readiness; polish-pages 2026-11-28): the deliverables stand alone
   in two columns under the chapter, the old FAQ's "How long" beside the last ones */
.svc-del__row--solo { grid-template-columns: minmax(0, 1fr); max-inline-size: calc(980px + 2 * var(--hf-story-pad-x)); }
.svc-del__row--solo .svc-del__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); }
.svc-del__row--solo .svc-del__item:nth-child(2) { border-block-start: 0; padding-block-start: 0; }
.svc-del__row--solo .svc-time { max-inline-size: 620px; margin-inline: auto; }

/* how long it takes (the old FAQ's own answer, moved here) */
.svc-time {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start;
  margin-block-start: 20px; padding: 18px 20px 18px 16px;
  border-radius: 16px; background: var(--hf-surface-inset, rgb(11 13 16 / 0.04));
}
.svc-time__icon { display: grid; place-items: center; inline-size: 36px; block-size: 36px; border-radius: 50%; background: var(--hf-surface-card, #FFF); box-shadow: var(--hf-ring-soft); color: var(--hf-color-text-1); }
.svc-time__icon .hf-icon { inline-size: 20px; block-size: 20px; }
.svc-time__q { margin: 0 0 4px; font-size: 15px; font-weight: 650; line-height: 1.35; color: var(--hf-color-text-1); }
.svc-time__a { margin: 0; font-size: 15px; line-height: 1.55; color: var(--hf-color-text-2); text-wrap: pretty; }

/* the three roles (fractional-cto: people only) */
.svc-people {
  margin: 0; display: grid; gap: 14px; inline-size: min(100%, 520px);
  padding: 32px; border-radius: var(--svc-card-radius);
  background: var(--hf-surface-card, #FFFFFF); box-shadow: var(--hf-shadow-card, var(--hf-shadow-1));
  scroll-margin-top: calc(var(--hf-nav-h, 72px) + 24px);
}
.svc-people__title { margin: 0; font-size: 22px; font-weight: 650; line-height: 1.25; letter-spacing: -0.015em; color: var(--hf-color-text-1); text-wrap: balance; }
.svc-people__lead { margin: 0 0 6px; font-size: 15.5px; line-height: 1.5; color: var(--hf-color-text-3); }
.svc-people__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.svc-people__seat {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 16px; background: var(--hf-surface-inset, rgb(11 13 16 / 0.04));
}
.svc-people__avatar {
  position: relative; display: grid; place-items: center; inline-size: 52px; block-size: 52px; border-radius: 50%;
  background: var(--hf-surface-card, #FFF); box-shadow: var(--hf-ring-soft); color: var(--hf-color-text-1);
}
.svc-people__avatar::after {                 /* a dotted ring: the house's dots */
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: radial-gradient(circle, var(--svc-dot) 1px, transparent 1.4px) 0 0 / 6px 6px;
  -webkit-mask-image: radial-gradient(circle, transparent 60%, #000 62%, #000 100%);
          mask-image: radial-gradient(circle, transparent 60%, #000 62%, #000 100%);
  z-index: -1;
}
.svc-people__avatar { isolation: isolate; }
.svc-people__avatar .hf-icon { inline-size: 24px; block-size: 24px; }
.svc-people__txt { display: grid; gap: 2px; min-inline-size: 0; }
.svc-people__role { font-size: 16px; font-weight: 650; line-height: 1.3; color: var(--hf-color-text-1); }
.svc-people__scope { font-size: 14.5px; line-height: 1.45; color: var(--hf-color-text-2); }

/* ---------------------------------------------------------------- the big dotted figure (a percentage from the old text) */
.svc-figure { margin: 0; display: grid; justify-items: center; gap: 18px; text-align: center; }
.svc-figure__num {
  margin: 0; display: flex; align-items: baseline; gap: 0.02em;
  font: 800 clamp(150px, 17vw, 248px)/0.9 var(--hf-font-sans); letter-spacing: -0.06em;
  color: transparent;
  background: radial-gradient(circle, var(--svc-dot-ink) 2px, transparent 2.5px) 0 0 / 7px 7px;
  -webkit-background-clip: text; background-clip: text;
  padding-inline: 0.04em;                    /* the clip keeps the last glyph's dots */
}
.svc-figure__unit {
  font-size: 0.62em;
  background: radial-gradient(circle, var(--svc-dot-tone) 2px, transparent 2.5px) 0 0 / 7px 7px;
  -webkit-background-clip: text; background-clip: text;
}
.svc-figure__cap { max-inline-size: 36ch; font-size: 15px; line-height: 1.55; color: var(--hf-color-text-2); text-wrap: pretty; }
.svc-row__p { margin: 0 0 16px; max-inline-size: 46ch; font-size: 16.5px; line-height: 1.6; color: var(--hf-color-text-1); text-wrap: pretty; }

/* ---------------------------------------------------------------- chapter bodies */
.svc-sec > .hf-chapter { padding-block-end: 0; }
.svc-body {
  max-inline-size: calc(var(--hf-story-max) + 2 * var(--hf-story-pad-x)); margin-inline: auto;
  padding: 56px var(--hf-story-pad-x) var(--hf-row-pad-y);
}

/* the OWASP list: two columns, the code as quiet mono texture */
.svc-codes {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 4vw, 64px);
  max-inline-size: 980px; margin: 0 auto; padding: 0; list-style: none;
}
.svc-codes__item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: baseline;
  padding-block: 16px; border-block-start: 1px solid var(--svc-line);
}
.svc-codes__code { font: 500 12.5px/1.2 var(--hf-font-mono); letter-spacing: 0.02em; color: var(--hf-color-text-3); }
.svc-codes__t { font-size: 16.5px; line-height: 1.45; color: var(--hf-color-text-1); }

/* country cards ("UAE: …") */
.svc-rules { display: grid; grid-template-columns: repeat(var(--svc-cols, 4), minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.svc-rules--n2 { --svc-cols: 2; } .svc-rules--n3 { --svc-cols: 3; }
.svc-rules__item {
  display: grid; align-content: start; gap: 10px; padding: 26px 24px 28px;
  border-radius: var(--pg-card-radius, 20px); background: var(--hf-surface-card, #FFF); box-shadow: var(--hf-ring-soft);
}
.svc-rules__t { margin: 0; font-size: 19px; font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; color: var(--hf-color-text-1); }
.svc-rules__d { margin: 0; font-size: 15px; line-height: 1.6; color: var(--hf-color-text-2); text-wrap: pretty; }

/* the standards row under "Standards we map to" */
.svc-standards { display: flex; justify-content: center; }
.svc-standards .pg-pills { justify-content: center; max-inline-size: 760px; }

/* two columns of checks */
.svc-checks {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px clamp(32px, 4vw, 56px);
  max-inline-size: 920px; margin: 0 auto; padding: 0; list-style: none;
}
.svc-checks li { display: flex; align-items: flex-start; gap: 12px; font-size: 16.5px; line-height: 1.5; color: var(--hf-color-text-1); }
.svc-checks li > .hf-icon { flex: none; inline-size: 22px; block-size: 22px; margin-block-start: 1px; color: var(--hf-color-sea-600, #006776); }

/* the map row: the map takes the wider column */
.svc-sec--map .hf-row__visual { align-self: center; }
.svc-sec--map .hf-row__points li span { color: var(--hf-color-text-2); }
.svc-sec--map .hf-row__points li b { color: var(--hf-color-text-1); }

/* ---------------------------------------------------------------- who this is for */
.svc-who .hf-chapter { padding-block-end: 0; }
.svc-who__list {
  display: grid; grid-template-columns: repeat(var(--svc-cols, 4), minmax(0, 1fr)); gap: 20px;
  max-inline-size: calc(var(--hf-story-max) + 2 * var(--hf-story-pad-x)); margin: 0 auto;
  padding: 56px var(--hf-story-pad-x) var(--hf-row-pad-y); list-style: none;
}
.svc-who__list--n3 { --svc-cols: 3; } .svc-who__list--n2 { --svc-cols: 2; }
.svc-who__item {
  display: grid; align-content: start; gap: 18px; padding: 24px 24px 28px;
  border-radius: var(--pg-card-radius, 20px); background: var(--hf-surface-card, #FFF); box-shadow: var(--hf-ring-soft);
}
.svc-who__line {
  display: grid; place-items: center; inline-size: 48px; block-size: 48px; border-radius: var(--hf-radius-md, 14px);
  background: var(--hf-color-surface, #FFF); box-shadow: var(--hf-shadow-1); color: var(--hf-color-text-1);
}
.svc-who__line .hf-icon { inline-size: 24px; block-size: 24px; }
.svc-who__t { margin: 0; font-size: 16.5px; font-weight: 550; line-height: 1.45; color: var(--hf-color-text-1); text-wrap: pretty; }

/* ---------------------------------------------------------------- often combined with + related reading: one closing band */
.svc-related { padding-block-end: 24px; }
.svc-reading .hf-chapter { padding-block-start: 64px; }
/* one amber accent per view: "Related reading" sits right under "Often combined with", so its label wears the quiet square */
.svc-reading .hf-eyebrow::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--hf-color-text-3); }
.svc-reading .hf-chapter__title { font-size: clamp(26px, 2.6vw, 34px); }
.svc-reading__list {
  display: grid; gap: 0; max-inline-size: calc(980px + 2 * var(--hf-story-pad-x)); margin: 32px auto 0;
  padding: 0 var(--hf-story-pad-x) var(--hf-row-pad-y); list-style: none;
}
.svc-reading__list li { border-block-start: 1px solid var(--svc-line); }
.svc-reading__list li:last-child { border-block-end: 1px solid var(--svc-line); }
.svc-reading__a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-block-size: 64px; padding-block: 14px;
  color: var(--hf-color-text-1); text-decoration: none; font-size: 17px; font-weight: 600; line-height: 1.4;
}
.svc-reading__a .hf-icon { flex: none; inline-size: 20px; block-size: 20px; color: var(--hf-color-text-3); transition: transform var(--hf-dur-2, 180ms) var(--hf-ease-out, ease-out); }
.svc-reading__a:hover .svc-reading__t { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.svc-reading__a:hover .hf-icon { transform: translateX(3px); }   /* inside the RTL mirror (scale: -1 1) this moves it left */

/* ---------------------------------------------------------------- Arabic */
:lang(ar) .svc-del__t, :lang(ar) .svc-rules__t, :lang(ar) .svc-people__title, :lang(ar) .svc-people__role,
:lang(ar) .svc-time__q, :lang(ar) .svc-stage .pg-bot__name { letter-spacing: 0; line-height: 1.45; font-weight: 700; }
:lang(ar) .svc-del__d, :lang(ar) .svc-define__text, :lang(ar) .svc-rules__d, :lang(ar) .svc-time__a,
:lang(ar) .svc-codes__t, :lang(ar) .svc-checks li, :lang(ar) .svc-who__t, :lang(ar) .svc-figure__cap,
:lang(ar) .svc-row__p, :lang(ar) .svc-people__scope { line-height: 1.8; }
:lang(ar) .svc-define__text, :lang(ar) .svc-define__label { letter-spacing: 0; }
:lang(ar) .svc-reading__a { font-weight: 600; line-height: 1.6; }

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 63.99rem) {
  .svc-del__row { padding-block-start: 48px; }
  .svc-rules, .svc-who__list { --svc-cols: 2; }
  .svc-hero--define .pg-hero__visual { justify-content: flex-start; }
  .svc-stage--hero { inline-size: min(100%, 420px); }
}
@media (max-width: 47.99rem) {
  .svc-codes, .svc-checks { grid-template-columns: minmax(0, 1fr); }
  .svc-del__row--solo .svc-del__list { grid-template-columns: minmax(0, 1fr); }
  .svc-del__row--solo .svc-del__item:nth-child(2) { border-block-start: 1px solid var(--svc-line); padding-block-start: 16px; }
  .svc-rules, .svc-who__list { --svc-cols: 1 !important; }
  .svc-who__item { grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 16px; padding: 18px 18px; }
  .svc-define { padding: 28px 24px 24px; }
  .svc-define__text { font-size: 17.5px; }
  .svc-people { padding: 24px 20px; }
  .svc-stage { inline-size: 100%; max-inline-size: 360px; aspect-ratio: auto; padding: 28px 20px 24px; }
  .svc-stage--hero { margin-inline: auto; }
  .svc-stage--cast { max-inline-size: none; min-block-size: 0; padding: 28px 8px; gap: 4px; }
  .svc-stage--cast .pg-bot__name { font-size: 13.5px; }
  .svc-figure__num { font-size: clamp(120px, 36vw, 168px); }
  .svc-body { padding-block-start: 40px; }
  .svc-who__list { padding-block-start: 40px; }
  .svc-reading__a { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .svc-reading__a .hf-icon { transition: none; }
}

/* v7 book (2026-11-28): the offer's action row at the foot of "What we deliver" (templates/_book.mjs, lib/book.css) */
.svc-act { margin-block-start: 28px; }
.svc-del__row--solo .svc-act { justify-content: center; }
