/* Base: reset, body type, container, buttons, focus. Sizes come from tokens.css; no raw lengths here (npm run lint:tokens).
   Layout system: docs/responsive-spec.md. Standard pages are liquid (full-bleed bands, content = viewport minus the page margin,
   capped at --container-wide, with the extra width going to the margins). Product Detail is fixed (--container-fixed, no 1920 step). */
*,
*::before,
*::after { box-sizing: border-box; }

:root {
  /* Content box cap. Liquid pages: --container-wide (1800, reached at 1920). Product Detail swaps in --container-fixed below. */
  --container: var(--container-wide);
  /* Side gutter: the page margin (about 60 at desktop), growing once the viewport is wider than the cap so the content
     box stays centred at the cap. Percentages resolve against the element that uses --gutter (a full-bleed band). */
  --gutter: max(var(--page-margin-x), calc((100% - var(--container)) / 2));
}

/* Product Detail (body.layout-fixed, set in inc/layout.php): the content (.site-main) is a fixed 1320 column, centred, matching
   Figma at 1440, with no type or spacing step at 1920. The header and footer are outside .site-main, so they keep the liquid
   gutter and step like every page. tokens.css redeclares the stepped tokens on this element with every multiplier at 1. */
.layout-fixed .site-main {
  --container: var(--container-fixed);
  --gutter: max(var(--page-margin-x), calc((100% - var(--container)) / 2));
  font-size: var(--type-paragraph-medium-regular-size);
  line-height: var(--type-paragraph-medium-regular-line-height);
}

html { -webkit-text-size-adjust: 100%; }
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--color-bg-canvas);
  color: var(--color-text-primary);
  font-family: var(--type-paragraph-medium-regular-family);
  font-weight: var(--type-paragraph-medium-regular-weight);
  font-size: var(--type-paragraph-medium-regular-size);
  line-height: var(--type-paragraph-medium-regular-line-height);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

/* From the wide step up (where an orphan appeared), headings never end on a single word: balance the lines (the headline
   classes cover headings set in <p>). Below 1920 line breaks stay as built and approved. */
@media (min-width: 1920px) {
  h1, h2, h3, h4, h5, h6, [class*="type-heading-"] { text-wrap: balance; }
}

.container { width: min(calc(100% - 2 * var(--page-margin-x)), var(--container)); margin-inline: auto; }

/* Reading width for running text (about 70ch). */
.measure { max-width: var(--measure-text); }

/* Images. Product cards: square, the whole product visible. Heroes and photo bands: fill the box and keep the focal point
   in view (--focal-x and --focal-y are percentages, set per image from ACF; the default is the centre). */
.media-contain { aspect-ratio: 1 / 1; width: 100%; height: auto; object-fit: contain; }
.media-cover { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal-x, 50%) var(--focal-y, 50%); }
.site-main { padding-block: var(--space-section-sm); min-height: calc(var(--space-section-lg) * 2); }

.screen-reader-text {
  position: absolute;
  width: var(--border-1-pixel);
  height: var(--border-1-pixel);
  margin: calc(-1 * var(--border-1-pixel));
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: var(--space-inset-2xs) var(--space-inset-xs);
  background: var(--color-action-primary);
  color: var(--color-text-inverse);
  transform: translateY(-100%);
}
.skip-link:focus { transform: none; }

:focus-visible { outline: var(--border-2-pixel) solid currentColor; outline-offset: var(--border-2-pixel); }

/* Focus ring for filled controls. currentColor is the label colour, which on a solid button equals the surface around
   it (white text, white page), so the ring vanished. Use a two-tone ring instead: --focus-ring on the outside, with
   --focus-gap filling the offset so it reads on any surface. Dark surfaces (photo, footer, overlay header) flip both. */
:root {
  --focus-ring: var(--color-border-border);
  --focus-gap: var(--color-bg-canvas);
}
.btn--inverse,
.btn--outline-inverse,
.site-header[data-mode="overlay"]:not(.is-open):not(.is-scrolled) {
  --focus-ring: var(--color-border-border-inverse);
  --focus-gap: var(--color-bg-inverse);
}
.btn:focus-visible,
.search-box__submit:focus-visible {
  outline: var(--border-2-pixel) solid var(--focus-ring);
  outline-offset: var(--border-2-pixel);
  box-shadow: 0 0 0 var(--border-2-pixel) var(--focus-gap);
}

/* Buttons (Figma Button 2003:5824): size x fill. Two sizes with explicit heights (tokens.css: --btn-height-lg 67, --btn-height-md 56 at 1440,
   stepping with the inset and button multipliers). EVERY button has a 1px border inside its box (box-sizing: border-box): the colour of
   the ring for outline fills, transparent over the fill for solid ones. So solid and outline are the same height and the same width,
   with the label in the same place; the side padding is the Figma 24 minus the border. */
.btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  border: var(--border-1-pixel) solid var(--btn-ring, transparent);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn--md { height: var(--btn-height-md); padding-inline: calc(var(--space-inset-md) - var(--border-1-pixel)); font: inherit; font-family: var(--type-label-button-md-family); font-weight: var(--type-label-button-md-weight); font-size: var(--type-label-button-md-size); line-height: var(--type-label-button-md-line-height); letter-spacing: var(--type-label-button-md-letter-spacing); }
.btn--lg { height: var(--btn-height-lg); padding-inline: calc(var(--space-inset-md) - var(--border-1-pixel)); font-family: var(--type-label-button-lg-family); font-weight: var(--type-label-button-lg-weight); font-size: var(--type-label-button-lg-size); line-height: var(--type-label-button-lg-line-height); letter-spacing: var(--type-label-button-lg-letter-spacing); }
/* Hover behaviour (the pattern Lance likes on obama.org):
   - solid black on white         -> black outline (white fill, black text)
   - black outline on white       -> filled black (white text)
   - solid white on a photo/dark  -> white outline (transparent fill, white text)
   - white outline on a photo/dark -> filled white (black text)
   The ring of a solid button is its own 1px border (transparent at rest), so a button never changes size on hover. This replaces the grey
   action/*-hover fills from Figma for buttons. A context can retune the colours through the --btn-* custom properties
   (the overlay header does, because its Contact button is solid white). */
.btn {
  background: var(--btn-bg, transparent);
  color: var(--btn-fg, inherit);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.btn:hover {
  background: var(--btn-bg-h, var(--btn-bg, transparent));
  color: var(--btn-fg-h, var(--btn-fg, inherit));
  border-color: var(--btn-ring-h, var(--btn-ring, transparent));
}

/* Solid black (on white): hover = black outline. */
.btn--primary {
  --btn-bg: var(--hdr-btn-bg, var(--color-action-primary));
  --btn-fg: var(--hdr-btn-fg, var(--color-text-inverse));
  --btn-bg-h: var(--hdr-btn-bg-h, transparent); /* Figma Button, Filled Black hover: a black ring, no fill */
  --btn-fg-h: var(--hdr-btn-fg-h, var(--color-text-primary));
  --btn-ring-h: var(--hdr-btn-ring-h, var(--color-border-border));
}
/* Solid white (on a photo or dark): hover = white outline. */
.btn--inverse {
  --btn-bg: var(--color-action-inverse);
  --btn-fg: var(--color-text-primary);
  --btn-bg-h: transparent;
  --btn-fg-h: var(--color-text-inverse);
  --btn-ring-h: var(--color-border-border-inverse);
}
/* Black outline (on white): hover = filled black. */
.btn--outline {
  --btn-ring: var(--color-border-border);
  --btn-fg: var(--color-text-primary);
  --btn-bg-h: var(--color-action-primary);
  --btn-fg-h: var(--color-text-inverse);
}
/* White outline (on a photo or dark): hover = filled white. */
.btn--outline-inverse {
  --btn-ring: var(--color-border-border-inverse);
  --btn-fg: var(--color-text-inverse);
  --btn-bg-h: var(--color-action-inverse);
  --btn-fg-h: var(--color-text-primary);
}
.btn--block { display: flex; width: 100%; }

.logo { display: inline-flex; align-items: center; gap: var(--space-gap-2xs); min-height: var(--tap-min); color: inherit; text-decoration: none; }
/* The logo is one raster image (400 x 80). Its width is the old HTML logo (mark + gap + 5.25em of label-md text) times 1.3
   (Lance, 2026-11-25: 30% wider), so it still follows the type size at every width. Black on white; white where the logo is inverse
   (footer, and the overlay header over a hero photo, see header.css). */
.logo { --logo-scale: 1.3; }
.logo__img { display: block; width: calc((var(--logo-mark-w) + var(--space-gap-2xs) + 5.25 * var(--type-label-md-size)) * var(--logo-scale)); height: auto; flex: none; }
.logo__img--white { display: none; }
.logo--inverse .logo__img--black { display: none; }
.logo--inverse .logo__img--white { display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }

  /* Zeroing durations only makes a hover effect snap, so the decorative transforms and size changes are switched off outright.
     Positioning transforms (the mirrored previous arrow, the skip link, the flag centring) are not decorative and stay. */
  a.link-arrow:hover .icon,
  .category-card:hover .card-arrow .icon,
  .product-card:hover .card-arrow .icon,
  .industry-card:hover .industry-card__arrow .icon,
  .mega-cat__head:hover .mega-cat__arrow,
  .banner-card:hover .banner-card__title .icon,
  .industry-card:hover .media-cover,
  .industry-card:focus-visible .media-cover,
  .category-card:hover .category-card__media img,
  .category-card:focus-visible .category-card__media img,
  .product-card:hover .media-contain,
  .product-card:focus-visible .media-contain,
  .banner-card:hover .banner-card__img,
  .banner-card:focus-visible .banner-card__img,
  .mega-industry__media:hover .mega-industry__img,
  .mega-industry:has(.mega-cat__head:hover) .mega-industry__img,
  .mega-industry:has(.mega-cat__head:focus-visible) .mega-industry__img,
  .mega-industry__media:hover ~ .mega-cat__head .mega-cat__arrow,
  .article-card:hover .article-card__photo .media-cover,
  .article-card:has(.link-arrow:focus-visible) .article-card__photo .media-cover { transform: none !important; }
  a.link-arrow:hover,
  a.link-arrow:focus-visible { font-size: var(--link-size) !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  [data-carousel] .carousel__slide { transform: none !important; animation: none !important; }
}

/* Breadcrumbs (Figma Breadcrumbs 2382:30476): Label/breadcrumbs, a 12px caret between the items, wraps on phones. The links keep a 44px hit area
   without adding height. Shared by Product Detail, the listings and the FAQs page; each page sets its own margins (product.css, page-hero.css). */
.breadcrumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-gap-4xs); margin: 0; padding: 0; list-style: none; }
.breadcrumbs__item { display: inline-flex; align-items: center; gap: var(--space-gap-4xs); }
.breadcrumbs__link { position: relative; color: inherit; text-decoration: none; }
.breadcrumbs__link::before { content: ""; position: absolute; inset-inline: calc(-1 * var(--space-gap-4xs)); inset-block: calc((100% - var(--tap-min)) / 2); }
.breadcrumbs__link:hover { text-decoration: underline; text-underline-offset: var(--space-gap-5xs); }
.breadcrumbs .icon { width: var(--space-gap-2xs); height: var(--space-gap-2xs); flex: none; }

/* Bottom band (BottomBanner 2484:13141, FAQs band 2382:29955), shared by FAQs and Product Detail: full-bleed grey, 75 above, 60 padding, the label in the sidebar column, the heading and
   text, the outlined button at the right. */
.bottom-band { margin-top: var(--space-section-md); background: var(--color-bg-subtle); }
.bottom-band__inner { font-size: var(--type-label-sm-size); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-gap-lg); padding: var(--space-inset-3xl) var(--gutter); align-items: center; }
.bottom-band__eyebrow, .bottom-band__heading, .bottom-band__lead { margin: 0; }
.bottom-band__lead { margin-top: var(--space-gap-xs); color: var(--color-text-light); max-width: var(--measure-text); }
.bottom-band__action { justify-self: start; }
@media (min-width: 1024px) {
  .bottom-band__inner { grid-template-columns: var(--measure-faq-sidebar) minmax(0, 1fr) auto; column-gap: var(--space-gap-2xl); align-items: end; }
  .bottom-band__eyebrow { font-size: var(--type-label-sm-size); align-self: start; }
  .bottom-band__action { justify-self: end; align-self: center; }
}
/* Stacked variant (Product Detail, BottomBanner 2484:13141): the label sits above the heading in one column, the button at the right. */
.bottom-band--stacked .bottom-band__inner { grid-template-columns: minmax(0, 1fr); font-size: inherit; }
.bottom-band--stacked .bottom-band__eyebrow { margin-bottom: var(--space-gap-xs); font-size: inherit; }
@media (min-width: 1024px) {
  .bottom-band--stacked .bottom-band__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .bottom-band--stacked .bottom-band__eyebrow { font-size: var(--type-label-sm-size); }
}
/* Aside variant (Support, "Still need help?" 2382:29136): the label, heading and text stack at the left, the button sits at the right and is centred on them. */
.bottom-band--aside .bottom-band__inner { grid-template-columns: minmax(0, 1fr); font-size: inherit; }
.bottom-band--aside .bottom-band__eyebrow { margin-bottom: var(--space-gap-xs); font-size: inherit; }
@media (min-width: 1024px) {
  .bottom-band--aside .bottom-band__inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 0; align-items: start; }
  .bottom-band--aside .bottom-band__eyebrow { grid-column: 1; grid-row: 1; font-size: var(--type-label-sm-size); }
  .bottom-band--aside .bottom-band__text { grid-column: 1; grid-row: 2; }
  .bottom-band--aside .bottom-band__action { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
.bottom-band--flush { margin-top: 0; }
