/* ==========================================================================
   System layer: loaded after rhythm.css. Holds the rules that span every area
   stylesheet: large-screen scaling, reading measures and shared control shapes.
   Measured with tools/ui-audit.js (node tools/run-ui-audit.cjs) at 1440, 1920,
   2560 and 3840px. Re-run it after layout changes instead of eyeballing.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Large and 4K screens
   Every size in the theme stopped growing at about 1440px, so on a 2560 or 3840px
   wide screen the site was a 1280px strip with 44px headings in a field of ivory.
   The layout is composed for a ~1920px canvas; above that, scale the whole page
   uniformly so the column, type, spacing, icons and borders keep their proportions.
   Effective canvas at each step stays between 1920 and 2250px.
   -------------------------------------------------------------------------- */
@media (min-width: 2112px) { html { zoom: 1.1; } }
@media (min-width: 2400px) { html { zoom: 1.25; } }
@media (min-width: 2800px) { html { zoom: 1.45; } }
@media (min-width: 3200px) { html { zoom: 1.65; } }
@media (min-width: 3600px) { html { zoom: 1.875; } }

/* --------------------------------------------------------------------------
   Reading measure
   Disclosures, footnotes and the article disclaimer ran the full 1280px column
   (115 to 194 characters a line). Hold them to a readable line and keep them on
   the column's left edge rather than centring them inside a constrained section.
   -------------------------------------------------------------------------- */
.aa-disclosure-wrap :is(p, .aa-disclosure),
.aa-home-pillars .aa-footnote,
.aa-post-disclaimer p,
.aa-footer__legal p { max-width: 88ch; }

.is-layout-constrained > :is(.aa-disclosure, .aa-footnote) {
	margin-left: max(0px, (100% - var(--wp--style--global--wide-size, 1280px)) / 2) !important;
	margin-right: auto !important;
}

/* --------------------------------------------------------------------------
   Gutters (desktop)
   Card grids used 16, 20, 24 and 28px gutters and two-column splits 48 to 86px,
   page by page. One gutter for cards (24px) and one for copy-beside-panel splits
   (64px). Tight tile mosaics (swatches, type specimens, risk scale) keep theirs.
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
	:is(.aa-ir-cards, .aa-ir-platform__pillars, .aa-ir-stats, .aa-pillars--svc, .aa-co-scams, .aa-co-logos,
		.aa-co-dd, .aa-co-report, .aa-values, .aa-bro-hub__grid, .aa-home-cities__grid, .aa-partners__grid,
		.aa-team, .aa-biz-stages, .aa-co-boiler, .aa-elig) { gap: 1.5rem; }

	:is(.aa-home-hero__grid, .aa-svc-hero__grid, .aa-about__grid, .aa-contact__grid, .aa-apply,
		.aa-co-hero__grid, .aa-co-verify, .aa-co-factsheet, .aa-ir-formwrap, .aa-inv-split) { column-gap: 4rem; }
}

/* --------------------------------------------------------------------------
   Secondary buttons
   "Show more" controls were 48px pills while every other button is a 54px,
   2px-radius rectangle. Filter chips stay pills: they are toggles, not actions.
   -------------------------------------------------------------------------- */
.aa-bro-hub__morebtn,
.aa-jobs__morebtn {
	min-height: var(--aa-control-h, 54px);
	border-radius: 2px;
}

/* Same label as every other button: 13px (12px in cards) tracked uppercase, not 14–15px sentence case. */
.aa-bro-hub__morebtn,
.aa-jobs__morebtn,
.aa-bro-card__get {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.aa-bro-card__get { border-radius: 2px; font-size: 0.75rem; letter-spacing: 0.12em; }

/* ==========================================================================
   Mobile foundations (mobile-ux-audit.md, Phase 0: X4 rhythm, X5 type)
   Measured at 390px: each section spent ~150px on padding, kicker, a 3-line H2,
   a 4-line italic subtitle and the rule before any content; card descriptions
   were 13px and labels 10 to 11px.
   ========================================================================== */

/* Labels, tags and eyebrow-style captions: 12px floor at every width (were 10 to 11px). */
.aa-tag, .aa-pill, .aa-pillar__label, .aa-pillar__tag, .aa-card-post__cat, .aa-citycard__tag,
.aa-shelf__label, .aa-shelf__sub, .aa-home-tools__label, .aa-trust__txt b, .aa-presence figcaption,
.aa-presence__label, .aa-contactlist__label, .aa-insight__label, .aa-timeline-x__tag, .aa-inv-post__cat,
.aa-ir-platform__kicker, .aa-track__dur, .aa-track__label, .aa-jobfilter__label, .aa-job__dept,
.aa-co-dd__verdict, .aa-co-smnav__n, .aa-booklet__pill-touch, .aa-form__ref-label,
.aa-card-post__cat a, .aa-post__cat a, .aa-home-hero__popular p, .aa-insight .aa-insight__label, .aa-office-card__tag,
.aa-co-scam > .aa-co-scam__label, .aa-co-smtile__k, .aa-footer__kicker, .aa-footer__label,
.wp-block-post-author__byline, .aa-co-smsub__t, .aa-co-smstats span { font-size: 0.75rem; }
/* Same floor for labels whose own rule is more specific, or that sit in menus, tabs and job/search cards. */
.aa-author .wp-block-post-author__byline, .aa-facts dt, .aa-appform__role span, .aa-rcard__tag,
.aa-mega__eyebrow, .aa-mega__label, .aa-mega__feature-eyebrow, .aa-mega__feature-call small, .aa-drawer__label,
.aa-search__count, .aa-co-leader__kicker, .aa-co-leader__look .aa-co-leader__label, .aa-co-vstory__area,
.aa-co-vstory__rows dt, .aa-co-scn__tag, .aa-co-pills strong, .aa-co-logotile__type, .aa-topbar__tag,
.aa-compare--stack td::before, .aa-lang__eyebrow, .aa-lang-chip small { font-size: 0.75rem; }

@media (max-width: 781.98px) {
	/* Section head: less air before the content. */
	.aa-head { margin-bottom: 1.5rem; }
	.aa-head h2 { margin-top: 0.4rem; font-size: clamp(1.75rem, 1rem + 3vw, 2.25rem); line-height: 1.15; }
	.aa-head__sub { margin-top: 0.5rem !important; font-size: 1rem; line-height: 1.5; }
	.aa-head::after { margin-top: 1rem; }

	/* Supporting text inside cards and lists: 14px, not 13px. */
	.aa-pillar__txt small, .aa-toollist__txt small, .aa-citycard__areas, .aa-trust__txt, .aa-topcard > span:last-child,
	.aa-topcard p, .aa-footnote, .aa-elig__note, .aa-bro__small, .aa-team__role, .aa-contactlist__note,
	.aa-card-post__excerpt, .aa-steps p { font-size: 0.875rem; line-height: 1.55; }
}

/* --------------------------------------------------------------------------
   Horizontal strips (X10): section nav, FAQ topics, insight categories, brochure
   and job filters, sitemap nav, A to Z. They were clipped at the edge with no cue.
   theme.js sets --aa-fade-l / --aa-fade-r only on the side that has more to show.
   -------------------------------------------------------------------------- */
:is(.aa-svcnav__list, .aa-chips-nav ul, .aa-cat-chips, .aa-bro-hub__chips, .aa-jobfilter__chips, .aa-co-smnav ul, .aa-inv-az ul) {
	scroll-snap-type: x proximity;
	scroll-padding-inline: var(--wp--style--root--padding-left, 1.25rem);
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--aa-fade-l, 0px), #000 calc(100% - var(--aa-fade-r, 0px)), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 var(--aa-fade-l, 0px), #000 calc(100% - var(--aa-fade-r, 0px)), transparent 100%);
}
:is(.aa-svcnav__list, .aa-chips-nav ul, .aa-cat-chips, .aa-bro-hub__chips, .aa-jobfilter__chips, .aa-co-smnav ul, .aa-inv-az ul) > * { scroll-snap-align: start; }

/* --------------------------------------------------------------------------
   Footer on phones (mobile-ux-audit.md X2). Measured 1,508 to 2,387px at 390px.
   Desktop is unchanged; everything here is below 782px.
   -------------------------------------------------------------------------- */
@media (max-width: 781.98px) {
	.aa-footer { padding-top: 2.25rem; }

	/* "Get in touch" repeated the contact section shown just above it on most pages, and the
	   action bar already offers Call and WhatsApp. Contact stays in the Company group. */
	.aa-footer__contact > h2:first-child,
	.aa-footer__contact > ul:first-of-type { display: none; }
	.aa-footer .aa-footer__contact { margin-top: 1.5rem; }
	.aa-footer .aa-footer__contact .aa-footer__sub { margin-top: 0; }

	/* Brand: drop the "Follow us" / "Get the app" captions (icons and badges carry their own labels). */
	.aa-footer__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-bottom: 1.5rem; }
	.aa-footer__brand > p { flex-basis: 100%; margin: 0; }
	.aa-footer__brand > .aa-footer__label { display: none; }
	.aa-footer__brand > :is(.aa-social, .aa-apps) { margin: 0 !important; }

	/* Newsletter: once per page. Pages that already show a newsletter card skip the footer copy. */
	body:has(main .aa-nl-card) .aa-footer__newsletter { display: none; }
	.aa-footer__newsletter { margin-top: 1.75rem; padding-top: 1.5rem; }
	.aa-footer .aa-nl-strip__lead { display: none; }

	/* Ad landing pages: legal only (disclaimer, fraud note, legal links, copyright). */
	.page-template-page-landing .aa-footer__grid { display: none; }
}

/* --------------------------------------------------------------------------
   Header hides on scroll down below 1024px (X6; theme.js toggles .aa-header-hidden).
   -------------------------------------------------------------------------- */
@media (max-width: 1023.98px) {
	header.wp-block-template-part { transition: transform 0.28s var(--aa-ease, ease); }
	.aa-header-hidden header.wp-block-template-part { transform: translateY(-100%); }
}
@media (max-width: 1023.98px) and (prefers-reduced-motion: reduce) {
	header.wp-block-template-part { transition: none; }
}

/* --------------------------------------------------------------------------
   Folded secondary forms on phones (X3, theme.js adds .aa-fold and the button).
   -------------------------------------------------------------------------- */
.aa-fold__open { display: none; }
@media (max-width: 781.98px) {
	.aa-fold:not(.is-open) { display: none !important; }
	.aa-fold__open:not([hidden]) { display: flex; width: 100%; margin-top: 1.25rem; border: 0; cursor: pointer; font-family: var(--aa-sans); }
}

/* "All Insights" on investor pages used the dark-section ghost button on ivory: white text,
   near-invisible at every width. Same indigo outline as the other light-surface ghosts. */
.aa-inv-more .aa-btn--ghost { color: var(--aa-indigo); border-color: var(--aa-indigo); }
.aa-inv-more .aa-btn--ghost:hover,
.aa-inv-more .aa-btn--ghost:focus-visible { background: var(--aa-indigo); color: #fff; }

/* Home brochure shelf captions: 70% opacity lavender on indigo measured 3.67:1. Full opacity: 6:1. */
.aa-shelf__sub { color: rgb(169 165 194); }

/* --------------------------------------------------------------------------
   Landing template (ad pages). Their footer hides the sitemap columns on purpose,
   which left "Get in touch" alone in a narrow column beside a large empty area
   on desktop. Contacts now run as a row: three people, then email and address.
   -------------------------------------------------------------------------- */
@media (min-width: 782px) {
	/* One full-width column: between 782 and 1023px the grid still had several tracks and the
	   contact block was squeezed into one of them. */
	.page-template-page-landing .aa-footer .aa-footer__grid { grid-template-columns: minmax(0, 1fr) !important; }
	.page-template-page-landing .aa-footer .aa-footer__contact { grid-column: 1 / -1; margin-top: 0; }
	.page-template-page-landing .aa-footer__contact li { min-width: 0; overflow-wrap: anywhere; }
	.page-template-page-landing .aa-footer__contact > ul:first-of-type {
		display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 2rem;
	}
	.page-template-page-landing .aa-footer__contact > ul:first-of-type > li:nth-child(5) { grid-column: span 2; }
}
@media (min-width: 1200px) {
	.page-template-page-landing .aa-footer__contact > ul:first-of-type { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1fr) minmax(0, 1.6fr); }
	.page-template-page-landing .aa-footer__contact > ul:first-of-type > li:nth-child(5) { grid-column: auto; }
}
/* An ad page should not send visitors off to other services: "Also explore" stays on the main
   service pages only. */
.page-template-page-landing .aa-related-svc { display: none; }

/* Brochure card followed by FAQs on the same background: the same-colour rule removed the FAQ
   section's top padding, leaving the FAQ heading tight under the card. */
.aa-bro-sec + .aa-section:not(.aa-section--white):not(.aa-section--dark) { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

/* Service pages: "Read more on …" related Insights. Hidden when no article matches and on /lp/
   copies (the shortcode renders nothing there). */
.aa-svc-guides:not(:has(.aa-inv-posts)) { display: none; }
