/* ==========================================================================
   STUDIO — agents.css
   Page styles for agents.html ONLY. Everything here is namespaced `ag-`
   except two scoped overrides on kit classes inside this page's grid.

   House rules held: no gradients, hairlines instead of shadows, radii ≤ 12px,
   motion 150–220ms ease-out, logical properties only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   SLIM PAGE HEADER
   `.phead--slim` is a KIT component now (components.css) — products,
   categories, agents and contact all wear the same rationed header, so it is
   defined once instead of four slightly different times. This page adds
   nothing to it.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   COVERAGE STRIP — the network at a glance, directly under the page header.
   A hairline-ruled fact row, not a card. Reads as a spec sheet.
   -------------------------------------------------------------------------- */
.ag-strip { padding-block: var(--sp-6); }

.ag-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5) var(--sp-6);
}
@media (min-width: 720px) {
  .ag-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.ag-fact {
  min-inline-size: 0;
  padding-inline-start: var(--sp-4);
  border-inline-start: 2px solid var(--border);
}
.ag-fact:first-child { border-inline-start-color: var(--accent); }

.ag-fact dt {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--text-muted);
}
[dir="rtl"] .ag-fact dt { text-transform: none; letter-spacing: 0; }

.ag-fact dd {
  margin-block-start: var(--sp-1);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-head);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   SECTION HEAD
   -------------------------------------------------------------------------- */
.ag-head {
  display: grid;
  gap: var(--sp-5);
  align-items: end;
}
@media (min-width: 900px) {
  .ag-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--sp-10);
  }
}
.ag-head__lead { display: grid; gap: var(--sp-3); min-inline-size: 0; }
/* Deliberately BELOW the slim h1 (32px). The kit's --fs-h2 tops out at 42px,
   which would leave the section heading shouting louder than the page's own
   title — an inverted hierarchy the moment the page header went slim. */
.ag-head__title {
  font-size: clamp(1.3125rem, 1.15rem + 0.7vw, 1.75rem);   /* 21 → 28 */
  max-inline-size: 16ch;
}
.ag-head__desc {
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  max-inline-size: 54ch;
}

/* --------------------------------------------------------------------------
   TOOLBAR + REGION CHIPS
   -------------------------------------------------------------------------- */
.ag-toolbar { margin-block-start: var(--sp-8); }

.ag-chips .chip { gap: var(--sp-2); }

/* the count that rides inside a chip — a quiet counterweight, never a badge */
.ag-chip__n {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  transition: color var(--dur-2) var(--ease);
}
.ag-chips .chip[aria-pressed="true"] .ag-chip__n,
.ag-chips .chip.is-active .ag-chip__n { color: inherit; opacity: 0.66; }

/* --------------------------------------------------------------------------
   THE GRID
   `.cells` collapses each card's 1px ring into one shared hairline. Hiding a
   card must therefore remove it from the grid entirely, or the ruling breaks.
   `.agent` sets display:flex, so the [hidden] attribute needs the base.css
   `!important` rule to win — it does, but we state the intent here too.
   -------------------------------------------------------------------------- */
.ag-cells { margin-block-start: var(--sp-2); }
.ag-cells .agent { gap: var(--sp-5); padding: var(--sp-7); }
.ag-cells .agent[hidden] { display: none; }

@media (min-width: 1120px) {
  .ag-cells { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* head-office mark, sitting under the name */
.ag-hq { margin-block-start: var(--sp-2); }

/* --------------------------------------------------------------------------
   THE INVITE CELL — the last cell of the grid. Same ring geometry as .agent,
   dashed instead of solid, so it reads as an opening rather than an office.
   -------------------------------------------------------------------------- */
.ag-invite {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-7);
  background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--border);
  color: var(--text);
  transition: background-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.ag-invite:hover {
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border-strong);
  z-index: 1;
}
.ag-invite:focus-visible { z-index: 1; }

.ag-invite__mark {
  display: grid;
  place-items: center;
  inline-size: 48px;
  block-size: 48px;
  border-radius: var(--r);
  border: 1px dashed var(--border-strong);
  color: var(--accent);
  margin-block-end: var(--sp-1);
}
.ag-invite__mark svg { inline-size: 20px; block-size: 20px; }

.ag-invite__title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-head);
}
.ag-invite__text {
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--text-muted);
}
.ag-invite__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-block-start: auto;
  padding-block-start: var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-accent);
}
.ag-invite:hover .ag-invite__cta .btn__arrow { transform: translateX(3px); }
[dir="rtl"] .ag-invite:hover .ag-invite__cta .btn__arrow { transform: scaleX(-1) translateX(3px); }

/* the contact rows are the card's real payload — give them room to breathe */
.ag-cells .agent__ct { gap: var(--sp-1); }
.ag-cells .agent__row a {
  min-block-size: 36px;
  display: inline-flex;
  align-items: center;
  transition: color var(--dur-2) var(--ease);
}

.ag-empty { margin-block-start: var(--sp-2); }

.ag-note { margin-block-start: var(--sp-8); }

/* --------------------------------------------------------------------------
   BECOME AN AGENT — the closing ink band
   -------------------------------------------------------------------------- */
.ag-join {
  display: grid;
  gap: var(--sp-9);
  align-items: start;
}
@media (min-width: 960px) {
  .ag-join {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--sp-11);
  }
}

.ag-join__lead { display: grid; gap: var(--sp-4); min-inline-size: 0; }
.ag-join__title {
  font-size: var(--fs-h2);
  color: var(--text-on-ink);
  max-inline-size: 14ch;
}
.ag-join__text {
  font-size: var(--fs-lead);
  line-height: var(--lh-snug);
  color: var(--text-on-ink-mut);
  max-inline-size: 46ch;
}

.ag-join__panel {
  display: grid;
  gap: var(--sp-6);
  padding: var(--sp-7);
  border: 1px solid var(--border-on-ink);
  border-radius: var(--r-lg);
  background: transparent;
  min-inline-size: 0;
}

.ag-join__list { display: grid; gap: var(--sp-3); }
.ag-join__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--text-on-ink);
}
.ag-join__list svg {
  inline-size: 16px;
  block-size: 16px;
  flex: none;
  margin-block-start: 4px;
  color: var(--accent);
}

.ag-join__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding-block-start: var(--sp-6);
  border-block-start: 1px solid var(--border-on-ink);
}

.ag-join__note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-on-ink-mut);
}
.ag-join__note svg { inline-size: 18px; block-size: 18px; flex: none; }
.ag-join__note a { color: var(--text-on-ink); font-weight: var(--fw-semibold); }
/* --on-ink-hover, not --c-white: the raw palette value is a LIGHT-mode literal
   and would not track the dark ink band. Every colour on this page is a token. */
.ag-join__note a:hover { color: var(--on-ink-hover); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   SMALL SCREENS
   -------------------------------------------------------------------------- */
@media (max-width: 599px) {
  .ag-cells .agent { padding: var(--sp-6); }
  .ag-join__panel { padding: var(--sp-6); }
  .ag-join__actions .btn { inline-size: 100%; }
}
