/*
 * sectors, "How we help" (Home Reframe, chapter 5). The template's chapter intro (lib/story.css) and six
 * equal tiles: 3 x 2 from 1,024 px, 2 x 3 on tablets, one column on phones (icon beside the words).
 * Every rule is scoped to [data-section="sectors"].
 */

/* The body: the same 1,200 px container and side padding as a story row */
[data-section="sectors"] .sx-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);
}

[data-section="sectors"] .sx-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
  margin: 0; padding: 0; list-style: none;
}
[data-section="sectors"] .sx-tile {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-content: start;
  padding: 28px 28px 30px;
  border-radius: 20px;
  background: var(--hf-surface-card);
  box-shadow: 0 0 0 1px var(--hf-line-card), 0 1px 2px rgb(11 13 16 / 0.04);
}
/* a faint corner of the brand's dots, fading out towards the words */
[data-section="sectors"] .sx-tile::after {
  content: ""; position: absolute; z-index: -1; inset-block-start: 0; inset-inline-end: 0;
  inline-size: 170px; block-size: 130px; pointer-events: none;
  background-image: radial-gradient(rgb(11 13 16 / 0.16) 1.1px, transparent 1.6px);
  background-size: 10px 10px;
  -webkit-mask-image: radial-gradient(circle at 100% 0%, #000 0%, transparent 72%);
          mask-image: radial-gradient(circle at 100% 0%, #000 0%, transparent 72%);
}
[dir="rtl"] [data-section="sectors"] .sx-tile::after {
  -webkit-mask-image: radial-gradient(circle at 0% 0%, #000 0%, transparent 72%);
          mask-image: radial-gradient(circle at 0% 0%, #000 0%, transparent 72%);
}
[data-section="sectors"] .sx-tile > .hf-ficon { margin-block-end: 28px; }
[data-section="sectors"] .sx-name {
  margin: 0 0 10px;
  font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em;
  color: var(--hf-color-text-1); text-wrap: balance;
}
[data-section="sectors"] .sx-agent {
  display: flex; align-items: flex-start; gap: 10px; margin: 0;
  font-size: 16px; line-height: 1.5; color: var(--hf-color-text-2); text-wrap: pretty;
}
[data-section="sectors"] .sx-agent > .hf-icon { flex: none; font-size: 20px; margin-block-start: 2px; color: var(--hf-color-sea-600); }
[data-section="sectors"] .sx-agent abbr { text-decoration: none; }

/* Arabic */
[data-section="sectors"]:lang(ar) .sx-name { letter-spacing: 0; line-height: 1.45; font-weight: 600; }
[data-section="sectors"]:lang(ar) .sx-agent { line-height: 1.7; }
[data-section="sectors"]:lang(ar) .sx-agent > .hf-icon { margin-block-start: 5px; }

/* Tablets: two columns */
@media (max-width: 63.99rem) {
  [data-section="sectors"] .sx-body { padding-block-start: 44px; }
  [data-section="sectors"] .sx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
/* Phones: one column, the icon beside the words */
@media (max-width: 47.99rem) {
  [data-section="sectors"] .sx-body { padding-block-start: 36px; }
  [data-section="sectors"] .sx-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  [data-section="sectors"] .sx-tile {
    grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: start;
    padding: 20px 20px 22px; border-radius: 18px;
  }
  [data-section="sectors"] .sx-tile > .hf-ficon { --hf-ficon-size: 48px; grid-row: span 2; margin: 0; }
  [data-section="sectors"] .sx-name { font-size: 18px; margin-block: 2px 6px; }
  [data-section="sectors"] .sx-agent { font-size: 15px; gap: 8px; }
  [data-section="sectors"] .sx-agent > .hf-icon { font-size: 18px; }
  [data-section="sectors"] .sx-tile::after { inline-size: 120px; block-size: 90px; }
}

/* home-bots-pricing (2026-11-28; the founder: "Where are the bots?"): the agent line opens with its bot (52 px; 44 on
   phones) in place of the small agent icon; the icon stays until the bot mounts (section.js adds .has-bot). */
[data-section="sectors"] .sx-agent { align-items: center; gap: 14px; }
[data-section="sectors"] .sx-bot {
  flex: none; display: grid; place-items: center; inline-size: 52px; block-size: 52px; line-height: 0;
  color: var(--hf-color-sea-600);
}
[data-section="sectors"] .sx-bot > .hf-icon { font-size: 20px; }
[data-section="sectors"] .sx-bot.has-bot > .hf-icon { display: none; }
@media (max-width: 47.99rem) {
  [data-section="sectors"] .sx-agent { gap: 10px; }
  [data-section="sectors"] .sx-bot { inline-size: 44px; block-size: 44px; }
}
