/* DAVZON – finishing layer
   Small, site-wide details loaded after every page's own styles. Each rule
   uses :where() where it can, so any page-specific style still wins. */

/* Text selection in brand colours */
::selection { background: var(--saffron, #F2A93B); color: var(--ink, #0C1B2A); }

/* In-page links land below the fixed header instead of under it */
html { scroll-padding-top: 104px; }
:where([id]) { scroll-margin-top: 104px; }

/* Typography: balanced headings, no single-word last lines in copy,
   proper kerning and ligatures throughout */
body { font-kerning: normal; font-variant-ligatures: common-ligatures contextual; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(p, li, dd, blockquote, figcaption) { text-wrap: pretty; }
:where([data-count], .tabular, td, .price, [class*="price"] b, [class*="stat"] b) { font-variant-numeric: tabular-nums; }

/* Touch: no grey flash on tap, no double-tap zoom delay */
:where(a, button, [role="button"], label, summary) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* Quiet, on-brand scrollbars */
html { scrollbar-color: color-mix(in srgb, var(--ink, #0C1B2A) 32%, transparent) transparent; }
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--ink, #0C1B2A) 32%, transparent) padding-box; }
}

/* Lazy images fade in as they arrive instead of popping in
   (only when polish.js has run, so images never stay hidden without it) */
html.has-img-fade img[loading="lazy"] { transition: opacity 0.7s var(--ease, ease); }
html.has-img-fade img[loading="lazy"]:not(.is-loaded) { opacity: 0; }

/* Looping animations (logo marquee, globe, floating product panels…) rest
   while their section is off screen. Each one cost the browser ~1–1.5ms of
   rendering on every frame even when nobody could see it, which left too
   little of each frame for scrolling. polish.js sets the class. */
.is-offscreen, .is-offscreen *, .is-offscreen *::before, .is-offscreen *::after { animation-play-state: paused !important; }

/* ---------- Final polish pass (Nov 2026) ---------- */

/* Keyboard focus: an Ink ring with a Saffron halo, so it is visible on
   Sand, white cards and Ink panels alike (an Ink ring alone vanished on
   dark sections). Section-specific focus colours still apply on top. */
:focus-visible { outline: 3px solid var(--ink, #0C1B2A); outline-offset: 3px; box-shadow: 0 0 0 7px var(--saffron, #F2A93B); }
:where(.btn, button, summary, [role="tab"]):focus-visible { box-shadow: 0 0 0 7px var(--saffron, #F2A93B); }

/* Eyebrow pills keep one size everywhere: in the FAQ sidebar and cost
   intro a paragraph rule enlarged them to 18–19px */
:is(.us-faq__side, .us-cost__intro) .eyebrow { margin: 0; font-size: 14px; line-height: 1.3; }

/* Text links inside running copy, outside the guides: the same Saffron
   underline the guides use, instead of the browser default */
main :where(p, dd, td) > a:not([class]) {
  text-decoration: underline;
  text-decoration-color: var(--saffron, #F2A93B);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: background-color 0.2s ease;
}
main :where(p, dd, td) > a:not([class]):hover { background: rgba(242, 169, 59, 0.18); }

/* Guide disclaimer: a comfortable reading measure instead of one line
   across the whole page */
.g-disclaimer { padding-right: max(clamp(16px, calc(5 * var(--vw, 1vw)), 120px), calc(100% - 80ch)); line-height: 1.6; }

/* Arrow text links ("Read more client stories →" and similar) get a
   44px touch area on phones, without moving anything */
@media (pointer: coarse) {
  :where(.eor-link, .roles__more, .gl-card__more, .b-main__go, .hf-more) { display: inline-block; padding-block: 9px; margin-block: -9px; }
}

/* Breadcrumb links were 18px tall: a taller tap area (24px+, WCAG 2.2)
   without moving anything */
.crumbs a { display: inline-block; padding-block: 4px; margin-block: -4px; }

/* Footer: a second group of links in the same column (Hire in India,
   Compare) sits a little apart from the first */
.footer__col ul + h2 { margin-top: 28px; }

/* Keyboard focus on dark panels uses Saffron so it stays visible */
:where(.site-footer, [class*="hero"][class*="ink"], .us-hero, .g-hero, .d-hero, .hub-hero, .t-hero, .us-flow, .ab2-prin) :focus-visible { outline-color: var(--saffron, #F2A93B); }

/* Small arrow links get a 44px touch area on phones without moving anything */
@media (pointer: coarse) {
  :where(.pl-run, .eor-link, .quote__more, .gl-card__more) { padding-block: 9px; margin-block: -9px; }
}

/* Motion: respect the visitor's setting for anything this layer adds */
@media (prefers-reduced-motion: reduce) {
  html.has-img-fade img[loading="lazy"] { transition: none; }
  html { scroll-behavior: auto; }
}

/* Print: clean, ink-on-white pages without navigation, video or animation */
@media print {
  :root { zoom: 1 !important; }
  html, body { background: #fff !important; }
  .site-header, .site-footer, .skip-link, .mega, .mobile-menu, video, [class*="cta-band"], [class*="progress"] { display: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; }
  .reveal, [class*="reveal"] { opacity: 1 !important; transform: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #3F4B58; }
  h1, h2, h3 { break-after: avoid; }
  img, table, figure { break-inside: avoid; }
}

/* Download row on the payroll compliance calendar */
.cal-dl { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 8px; }
@media print { .cal-dl, .rs-toc, .us-actions, .rs-related, .icta { display: none !important; } }
