/* ==========================================================================
   Quik Tek Assembly — site styles
   White surfaces + logo blue (#0C97DF). Lexend (display) / Source Sans 3 (text)
   ========================================================================== */

:root {
  /* Brand */
  --brand: #0c97df;          /* logo blue — accents, large display, icons */
  --brand-600: #0770aa;      /* AA on white (5.4:1) — buttons, links */
  --brand-700: #075e8f;      /* hover / pressed */
  --brand-50: #eaf6fd;
  --brand-100: #d3ecfa;

  /* Neutrals */
  --ink: #0b1b2e;
  --ink-2: #1e2f44;
  --muted: #475569;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --surface: #f5f9fc;
  --white: #ffffff;
  --navy: #071a2c;

  /* Type */
  --font-display: "Lexend", ui-sans-serif, system-ui, sans-serif;
  --font-text: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;

  /* Layout */
  --container: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius-sm: 0.5rem;
  --radius: 0.875rem;
  --radius-lg: 1.375rem;
  --header-h: 4.5rem;

  --shadow-sm: 0 1px 2px rgb(11 27 46 / 0.06);
  --shadow: 0 1px 2px rgb(11 27 46 / 0.05), 0 8px 24px -8px rgb(11 27 46 / 0.12);
  --shadow-lg: 0 2px 4px rgb(11 27 46 / 0.04), 0 24px 48px -16px rgb(11 27 46 / 0.22);

  /* z-index scale */
  --z-header: 50;
  --z-menu: 60;

  color-scheme: light;
}

/* Cross-document view transitions (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.25s;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
  font-weight: 600;
}
h1 { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.625rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem); }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--brand-600); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-700); }
strong { color: var(--ink); font-weight: 600; }
ul, ol { padding-inline-start: 1.25rem; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { inset-block-start: 1rem; color: var(--white); }

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

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 1.125rem; height: 1.125rem; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--brand-600);
  --btn-fg: var(--white);
  --btn-bd: var(--brand-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.375rem;
  font: 600 1rem/1.2 var(--font-display);
  letter-spacing: -0.005em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1.5px solid var(--btn-bd);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  --btn-bg: var(--brand-700);
  --btn-bd: var(--brand-700);
  color: var(--btn-fg);
  box-shadow: 0 8px 20px -8px rgb(7 112 170 / 0.55);
}
.btn .icon { transition: translate 0.2s ease; }
.btn:hover .icon-arrow { translate: 3px 0; }
.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-2);
}
.btn-ghost:hover {
  --btn-bg: var(--brand-50);
  --btn-bd: var(--brand);
  --btn-fg: var(--ink);
  box-shadow: none;
}
.btn-light {
  --btn-bg: var(--white);
  --btn-fg: var(--brand-700);
  --btn-bd: var(--white);
}
.btn-light:hover {
  --btn-bg: var(--brand-50);
  --btn-bd: var(--brand-50);
  --btn-fg: var(--brand-700);
}
.btn-outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  --btn-bd: rgb(255 255 255 / 0.55);
}
.btn-outline-light:hover {
  --btn-bg: rgb(255 255 255 / 0.12);
  --btn-bd: var(--white);
  --btn-fg: var(--white);
  box-shadow: none;
}
.btn-sm { min-height: 2.5rem; padding: 0.5rem 1.05rem; font-size: 0.9375rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font: 600 0.975rem/1.3 var(--font-display);
  color: var(--brand-600);
  text-decoration: none;
}
.link-arrow .icon { width: 1.1rem; height: 1.1rem; transition: translate 0.2s ease; }
.link-arrow:hover .icon { translate: 3px 0; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-block-end: 1px solid transparent;
}
/* Decorative: gain a hairline + shadow as the page scrolls (no fallback needed) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    @keyframes header-elevate {
      to {
        border-block-end-color: var(--line);
        box-shadow: 0 6px 24px -12px rgb(11 27 46 / 0.18);
      }
    }
    .site-header {
      animation: header-elevate linear both;
      animation-timeline: scroll(block root);
      animation-range: 0px 120px;
    }
  }
}
@supports not ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .site-header { border-block-end-color: var(--line); }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}
.header-inner > * {
  flex-shrink: 0;
  white-space: nowrap;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--ink);
  margin-inline-end: auto;
}
.site-logo img { width: 2.5rem; height: 2.5rem; }
.site-logo .wordmark {
  font: 600 1.125rem/1 var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.site-logo .wordmark span { color: var(--brand); }

.site-nav { display: flex; align-items: center; gap: 0.75rem; }

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  font: 600 0.9375rem/1 var(--font-display);
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  anchor-name: --menu-button;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.menu-button:hover { border-color: var(--brand); background: var(--brand-50); }

.site-menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
}
.site-menu a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  font: 500 1rem/1.2 var(--font-display);
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.site-menu a:hover { color: var(--brand-700); background: var(--brand-50); }
.site-menu a[aria-current="page"] {
  color: var(--brand-700);
  font-weight: 600;
  background: var(--brand-50);
  box-shadow: inset 0 -2px 0 var(--brand);
}
.site-menu .menu-cta { display: none; }

/* Collapsed (default) layout: native popover anchored to the button */
.site-header .site-menu {
  position: fixed;
  inset: auto;
  inset-block-start: calc(var(--header-h) + 0.25rem);
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(80dvw, 22rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 6rem);
  margin: 0.5rem 0 0;
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.site-header .site-menu:is(:popover-open, .\:popover-open) {
  display: grid;
  gap: 0.125rem;
}
.site-header .site-menu .menu-cta {
  display: block;
  margin-block-start: 0.5rem;
  padding-block-start: 0.625rem;
  border-block-start: 1px solid var(--line);
}
.site-header .site-menu .menu-cta a {
  justify-content: center;
  color: var(--white);
  background: var(--brand-600);
  font-weight: 600;
}
.site-header .site-menu .menu-cta a:hover { background: var(--brand-700); color: var(--white); }

@media (prefers-reduced-motion: no-preference) {
  .site-header .site-menu {
    transition: opacity 0.2s ease, translate 0.2s ease, display 0.2s, overlay 0.2s;
    transition-behavior: allow-discrete;
    opacity: 0;
    translate: 0 -6px;
  }
  .site-header .site-menu:is(:popover-open, .\:popover-open) {
    opacity: 1;
    translate: 0 0;
  }
  @starting-style {
    .site-header .site-menu:is(:popover-open, .\:popover-open) {
      opacity: 0;
      translate: 0 -6px;
    }
  }
}

@supports not selector(:popover-open) {
  [popover]:not(.\:popover-open) { display: none; }
}

/* Wide layout: same list inline */
.site-header.is-wide .menu-button { display: none; }
.site-header.is-wide .site-menu {
  position: static;
  display: flex;
  align-items: center;
  gap: 0.125rem;
  inline-size: auto;
  max-inline-size: none;
  block-size: auto;
  max-block-size: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  translate: none;
}
.site-header.is-wide .site-menu::backdrop { display: none; }
/* The logo already links home, so the inline row skips "Home" (it stays in the mobile menu) */
.site-header.is-wide .site-menu .menu-home { display: none; }
.site-header.is-wide .site-menu a { font-size: 0.95rem; padding-inline: 0.7rem; }
.site-header.is-wide .site-menu a[aria-current="page"] {
  position: relative;
  background: transparent;
  box-shadow: none;
}
.site-header.is-wide .site-menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 0.7rem;
  inset-block-end: 0.3rem;
  block-size: 2px;
  border-radius: 2px;
  background: var(--brand);
}
.site-header.is-wide .site-menu .menu-cta {
  display: block;
  margin: 0;
  margin-inline-start: 0.5rem;
  padding: 0;
  border: 0;
}
.site-header.is-wide .site-menu .menu-cta a { padding-inline: 1rem; box-shadow: none; }
.site-header.is-measuring * { transition: none !important; }

@media (max-width: 26rem) {
  .site-logo { gap: 0.5rem; }
  .site-logo img { width: 2.125rem; height: 2.125rem; }
  .site-logo .wordmark { font-size: 0.95rem; letter-spacing: 0.01em; }
  .menu-button { padding-inline: 0.75rem; }
  .menu-button span {
    position: absolute;
    clip-path: inset(50%);
    overflow: hidden;
    width: 1px;
    height: 1px;
    white-space: nowrap;
  }
}

@media (forced-colors: active) {
  .site-menu a[aria-current="page"] { outline: 2px solid CanvasText; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 3rem + 5vw, 7.5rem); }
.section-tight { padding-block: clamp(3rem, 2.5rem + 3vw, 5rem); }
.section-surface { background: var(--surface); }
.section-head { max-inline-size: 44rem; margin-block-end: clamp(2.25rem, 2rem + 2vw, 3.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { font-size: 1.15rem; color: var(--muted); margin: 0; }
.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-block-end: clamp(2.25rem, 2rem + 2vw, 3.5rem);
}
.section-head-row .section-head { margin: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-block-end: 1rem;
  font: 600 0.8125rem/1.2 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-600);
}
.eyebrow::before {
  content: "";
  inline-size: 1.5rem;
  block-size: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.section-head.center .eyebrow::before { display: none; }
.lead { font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem); color: var(--muted); line-height: 1.6; }

/* Circuit-trace background motif (echoes the logo) */
.traces {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--brand);
  opacity: 0.11;
  -webkit-mask-image: radial-gradient(ellipse at 20% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 20% 0%, #000 0%, transparent 70%);
}
.traces svg { width: 100%; height: 100%; }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(2.5rem, 2rem + 4vw, 5.5rem) clamp(3.5rem, 3rem + 4vw, 6.5rem);
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--brand-50), transparent 70%),
    var(--white);
}
.hero-grid {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
}
.hero h1 { margin-block-end: 1.25rem; }
.hero h1 .accent { color: var(--brand); }
.hero .lead { max-inline-size: 34rem; margin-block-end: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.75rem 0 0;
  padding: 1.5rem 0 0;
  border-block-start: 1px solid var(--line);
  max-inline-size: 34rem;
}
.hero-facts div { display: grid; gap: 0.25rem; }
.hero-facts dt {
  order: 2;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.35;
}
.hero-facts dd {
  order: 1;
  margin: 0;
  font: 600 clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem)/1.1 var(--font-display);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hero-media { position: relative; }
.hero-media .frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 4.2;
  background: var(--brand-50);
}
.hero-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::before {
  content: "";
  position: absolute;
  inset: -1.25rem -1.25rem auto auto;
  inline-size: 55%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle, var(--brand) 1.5px, transparent 2px) 0 0 / 16px 16px;
  opacity: 0.35;
  z-index: -1;
}
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.9rem 1.1rem;
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-inline-size: 17rem;
}
.float-card .badge-icon { flex-shrink: 0; }
.float-card strong { display: block; font: 600 0.975rem/1.25 var(--font-display); }
.float-card span { display: block; font-size: 0.875rem; color: var(--muted); line-height: 1.35; }
.float-card.bl { inset-block-end: 1.5rem; inset-inline-start: -1.5rem; }
.float-card.tr { inset-block-start: 1.5rem; inset-inline-end: -1rem; }
@media (max-width: 40rem) {
  .float-card.bl { inset-inline-start: 0.75rem; inset-block-end: 0.75rem; }
  .float-card.tr { display: none; }
}

.badge-icon {
  display: grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  border-radius: 0.75rem;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(2.5rem, 2rem + 3vw, 4.5rem);
  background:
    radial-gradient(50rem 24rem at 90% -20%, var(--brand-50), transparent 70%),
    var(--white);
  border-block-end: 1px solid var(--line);
}
.page-hero-grid { position: relative; display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 60rem) {
  .page-hero-grid { grid-template-columns: 1.1fr 1fr; }
}
.page-hero h1 { font-size: clamp(2.125rem, 1.6rem + 2.4vw, 3.25rem); }
.page-hero .lead { max-inline-size: 36rem; margin: 0; }
.page-hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow);
  background: var(--brand-50);
}
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}
.breadcrumb li + li::before { content: "/"; margin-inline-end: 0.375rem; color: var(--line-2); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-600); text-decoration: underline; }

/* Brand duotone treatment for colorful PCB photos */
.duotone { position: relative; isolation: isolate; }
.duotone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-600);
  mix-blend-mode: color;
  pointer-events: none;
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: clamp(1rem, 0.75rem + 1vw, 1.5rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.5rem, 1.25rem + 0.8vw, 2rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card h3 { margin: 0.25rem 0 0; }
.card p { margin: 0; color: var(--muted); }
.card-link { text-decoration: none; color: inherit; cursor: pointer; }
.card-link:hover, .card:has(.stretched:hover) {
  border-color: var(--brand-100);
  box-shadow: var(--shadow);
  color: inherit;
}
.card-link:hover h3 { color: var(--brand-700); }
.card .link-arrow { margin-block-start: auto; padding-block-start: 0.5rem; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* Services bento (home) */
.bento {
  display: grid;
  gap: clamp(1rem, 0.75rem + 1vw, 1.5rem);
  grid-template-columns: 1fr;
}
@media (min-width: 48rem) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .feature { grid-column: 1 / -1; }
}
@media (min-width: 64rem) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento .feature { grid-column: span 2; grid-row: span 2; }
}
.bento .feature {
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(14rem, 1fr) auto;
  gap: 0;
}
.bento .feature .media { position: relative; overflow: hidden; }
.bento .feature .media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.5s ease;
}
.bento .feature:hover .media img { scale: 1.03; }
.bento .feature .body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.5rem, 1.25rem + 0.8vw, 2rem);
}
.bento .feature h3 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
}
.tag-list li {
  padding: 0.3rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 999px;
}

/* Split feature rows */
.split {
  display: grid;
  gap: clamp(2rem, 1.5rem + 3vw, 4.5rem);
  align-items: center;
}
@media (min-width: 56rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse > .split-media { order: 2; }
}
.split-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 5 / 4;
  background: var(--brand-50);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-body h2 { margin-block-end: 1rem; }
.split-body > p { color: var(--muted); font-size: 1.1rem; }

.check-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.check-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}
.check-list .icon {
  inline-size: 1.375rem;
  block-size: 1.375rem;
  padding: 0.2rem;
  margin-block-start: 0.15rem;
  color: var(--white);
  background: var(--brand);
  border-radius: 50%;
  stroke-width: 3;
}

/* Industries */
.industry-grid {
  display: grid;
  gap: 0.875rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.industry {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.375rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.industry strong { font: 600 1.075rem/1.2 var(--font-display); }

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
}
.cert {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.875rem;
  padding: 1.75rem 1.25rem 1.5rem;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cert:hover { border-color: var(--brand-100); box-shadow: var(--shadow); }
.cert img { width: 6.5rem; height: 6.5rem; object-fit: contain; }
.cert strong { font: 600 1.05rem/1.25 var(--font-display); }
.cert span { font-size: 0.925rem; color: var(--muted); line-height: 1.4; }

.cert-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
}
.cert-strip img {
  width: auto;
  height: 5.5rem;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.8;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.cert-strip img:hover { filter: none; opacity: 1; }

/* Standards detail list (quality page) */
.standards-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); }
.standard {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 1.25rem + 1vw, 2.25rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
@media (min-width: 40rem) {
  .standard { grid-template-columns: 6rem 1fr; align-items: start; }
}
.standard img { width: 6rem; height: 6rem; object-fit: contain; }
.standard h3 { margin-block-end: 0.4rem; }
.standard p { margin: 0; color: var(--muted); }
.standard .src { margin-block-start: 0.6rem; font-size: 0.925rem; }

/* Recognition */
.quote-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.quote-card .who { display: flex; align-items: center; gap: 0.875rem; }
.quote-card .who strong { display: block; font: 600 1.05rem/1.2 var(--font-display); }
.quote-card .who span { display: block; font-size: 0.925rem; color: var(--muted); }
.quote-card blockquote {
  margin: 0;
  font: 400 clamp(1.1rem, 1.05rem + 0.3vw, 1.3rem)/1.5 var(--font-display);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.quote-card blockquote::before {
  content: "\201C";
  display: block;
  font-size: 3rem;
  line-height: 0.8;
  color: var(--brand);
}
.quote-card .link-arrow { margin-block-start: auto; }

/* Timeline */
.timeline {
  position: relative;
  display: grid;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.75rem;
}
.timeline::before {
  content: "";
  position: absolute;
  inset-block: 0.5rem 0.5rem;
  inset-inline-start: 0.4rem;
  inline-size: 2px;
  background: linear-gradient(var(--brand), var(--brand-100));
}
.timeline li { position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  inset-inline-start: -1.75rem;
  inset-block-start: 0.3rem;
  inline-size: 0.95rem;
  block-size: 0.95rem;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--brand);
}
.timeline .year {
  display: block;
  font: 600 0.875rem/1.2 var(--font-display);
  letter-spacing: 0.08em;
  color: var(--brand-600);
}
.timeline strong { display: block; font: 600 1.15rem/1.3 var(--font-display); margin-block: 0.2rem; }
.timeline p { margin: 0; color: var(--muted); }

/* Service detail rows (services page) */
.service-row + .service-row { margin-block-start: clamp(3.5rem, 3rem + 4vw, 6.5rem); }
.service-num {
  display: inline-grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  margin-block-end: 1rem;
  font: 600 1rem/1 var(--font-display);
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 0.75rem;
}

.capability {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.capability .media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--brand-50); }
.capability .media img { width: 100%; height: 100%; object-fit: cover; }
.capability .body { padding: 1.5rem; display: grid; gap: 0.5rem; align-content: start; }
.capability h3 { margin: 0; }
.capability p { margin: 0; color: var(--muted); }

.compare {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.compare .card { background: var(--white); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  border-radius: calc(var(--radius-lg) + 0.25rem);
  color: var(--white);
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgb(255 255 255 / 0.18), transparent 60%),
    linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle, rgb(255 255 255 / 0.22) 1.2px, transparent 1.6px) 0 0 / 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000);
  mask-image: linear-gradient(90deg, transparent 35%, #000);
}
.cta-band-inner {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
@media (min-width: 56rem) {
  .cta-band-inner { grid-template-columns: 1fr auto; }
}
.cta-band h2 { color: var(--white); margin-block-end: 0.5rem; }
.cta-band p { margin: 0; color: rgb(255 255 255 / 0.9); font-size: 1.15rem; max-inline-size: 38rem; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: clamp(2rem, 1.5rem + 3vw, 4rem);
  align-items: start;
}
@media (min-width: 60rem) {
  .contact-grid { grid-template-columns: 1.35fr 1fr; }
}
.form-card {
  padding: clamp(1.5rem, 1.25rem + 1.5vw, 2.75rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.form-card h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem); }
.form-intro { color: var(--muted); margin-block-end: 1.75rem; }
.form-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 40rem) { .form-row { grid-template-columns: 1fr 1fr; } }
.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-block-end: 1.375rem;
}
.field label, .field legend {
  font: 600 0.975rem/1.3 var(--font-display);
  color: var(--ink);
}
.field .req { color: var(--brand-700); }
.field .hint { font-size: 0.925rem; color: var(--muted); }
.field input[type="text"],
.field input[type="email"],
.field textarea {
  inline-size: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: max(1rem, 1em);
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid #8492a6;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 4px rgb(12 151 223 / 0.22);
}
.field input:user-invalid, .field textarea:user-invalid,
.field [aria-invalid="true"] {
  border-color: #b42318;
}
.field .error {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: #b42318;
}
.field .error:empty { display: none; }
.field .error::before { content: "!"; display: inline-grid; place-items: center; inline-size: 1.1rem; block-size: 1.1rem; font-size: 0.75rem; color: var(--white); background: #b42318; border-radius: 50%; }

fieldset.field { border: 0; padding: 0; margin-inline: 0; min-inline-size: 0; }
fieldset.field legend { padding: 0; margin-block-end: 0.5rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.choice { position: relative; }
.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.choice label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  font: 500 0.975rem/1.2 var(--font-text);
  color: var(--ink-2);
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.choice label::before {
  content: "";
  inline-size: 1rem;
  block-size: 1rem;
  border-radius: 50%;
  border: 2px solid #8492a6;
  transition: border 0.15s ease;
}
.choice input:hover + label { border-color: var(--brand); }
.choice input:checked + label {
  color: var(--brand-700);
  font-weight: 600;
  background: var(--brand-50);
  border-color: var(--brand-600);
}
.choice input:checked + label::before { border: 5px solid var(--brand-600); }
.choice input:focus-visible + label { outline: 3px solid var(--brand); outline-offset: 2px; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-block-start: 0.5rem;
}
.form-note { margin: 0; font-size: 0.925rem; color: var(--muted); }
.form-status {
  margin-block-start: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--ink);
  font-size: 0.975rem;
}
.form-status:empty { display: none; }
.form-status:focus { outline: none; }
.form-status.is-ok { background: #ecfdf3; border-color: #a6e9c1; color: #05603a; }
.form-status.is-error { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.hp { position: absolute; inset-inline-start: -10000px; }

.info-stack { display: grid; gap: 1rem; }
.info-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.info-card h3 { font-size: 1.075rem; margin: 0 0 0.25rem; }
.info-card p, .info-card address { margin: 0; color: var(--muted); font-style: normal; }
.info-card .email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.info-card .email-row a { font-weight: 600; word-break: break-all; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0.3rem 0.7rem;
  font: 600 0.85rem/1 var(--font-display);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.copy-btn:hover { background: var(--brand-50); border-color: var(--brand); }
.copy-btn .icon { width: 0.95rem; height: 0.95rem; }

.socials { display: flex; gap: 0.5rem; list-style: none; margin: 0.5rem 0 0; padding: 0; }
.socials a {
  display: grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  border-radius: 50%;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.socials a:hover { color: var(--white); background: var(--brand-600); border-color: var(--brand-600); }
.socials .icon { width: 1.15rem; height: 1.15rem; }

/* ---------- Prose (legal) ---------- */
.prose { max-inline-size: 48rem; }
.prose h2 {
  font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  margin: 2.5rem 0 0.75rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--line);
}
.prose h2:first-of-type { border: 0; padding: 0; margin-block-start: 1.5rem; }
.prose ol { padding-inline-start: 0; list-style: none; display: grid; gap: 0.75rem; }
.prose ol li { display: grid; grid-template-columns: 3rem 1fr; }
.prose ol li > span:first-child { font: 600 0.95rem/1.65 var(--font-display); color: var(--brand-600); }
.prose p, .prose li { color: var(--ink-2); }
.prose address { font-style: normal; padding: 1rem 1.25rem; background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--line); margin-block: 0.75rem; }
.toc {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.toc h2 { font-size: 1rem; margin: 0 0 0.75rem; }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.95rem; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand-600); text-decoration: underline; }
.legal-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 64rem) { .legal-grid { grid-template-columns: 16rem 1fr; } }
@media (max-width: 63.99rem) { .toc { position: static; } }

.credits-table { inline-size: 100%; border-collapse: collapse; font-size: 0.975rem; }
.credits-table caption { text-align: start; color: var(--muted); padding-block-end: 0.75rem; }
.credits-table th, .credits-table td { text-align: start; padding: 0.8rem 0.9rem; border-block-end: 1px solid var(--line); vertical-align: middle; }
.credits-table th { font: 600 0.9rem/1.2 var(--font-display); color: var(--ink); background: var(--surface); }
.credits-table img { inline-size: 5.5rem; block-size: 3.6rem; object-fit: cover; border-radius: 0.4rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Footer ---------- */
.site-footer {
  color: rgb(255 255 255 / 0.78);
  background: var(--navy);
}
.site-footer a { color: rgb(255 255 255 / 0.85); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-top {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(3rem, 2.5rem + 3vw, 4.5rem);
}
@media (min-width: 56rem) {
  .footer-top { grid-template-columns: 1.5fr 1fr 1fr 1.25fr; }
}
.footer-brand .site-logo { color: var(--white); margin-block-end: 1rem; }
.footer-brand p { max-inline-size: 22rem; font-size: 0.975rem; }
.site-footer h2 {
  font: 600 0.8125rem/1.2 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer .socials { display: flex; margin-block-start: 1.25rem; }
.site-footer .socials a { color: var(--white); background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.14); }
.site-footer .socials a:hover { background: var(--brand-600); border-color: var(--brand-600); text-decoration: none; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem;
  font-size: 0.9rem;
  border-block-start: 1px solid rgb(255 255 255 / 0.12);
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ---------- Scroll reveal (decorative, progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-up {
      from { opacity: 0; translate: 0 28px; }
    }
    .reveal {
      animation: reveal-up auto cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }

  @keyframes hero-in {
    from { opacity: 0; translate: 0 16px; }
  }
  .hero-copy > * { animation: hero-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.24s; }
  .hero-media { animation: hero-in 0.9s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
}

/* ---------- Print (e.g. Terms & Conditions) ---------- */
@media print {
  .site-header, .site-footer, .skip-link, .toc, .breadcrumb, .traces, .cta-band { display: none !important; }
  body { font-size: 11pt; color: #000; }
  .page-hero, .section { padding-block: 0.5rem; border: 0; background: none; }
  .legal-grid { display: block; }
  .prose { max-inline-size: none; }
  .prose h2 { break-after: avoid; }
  a { color: #000; }
}

/* ---------- Utilities (replace inline styles; keeps CSP strict) ---------- */
.mt-lg { margin-block-start: 1.75rem; }
.industry-grid.spaced { margin-block: 1.75rem; }
.cert-row { margin-block-start: clamp(3rem, 2rem + 4vw, 5rem); }
.jump-list { margin-block-start: 1.5rem; }
.tag-list a { color: inherit; text-decoration: none; }
.tag-list a:hover { text-decoration: underline; }
.section-head.sub-head { margin-block: clamp(3rem, 2.5rem + 3vw, 5rem) 1.75rem; }
.section-head.tight { margin-block-end: 1.5rem; }
.h-sub { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.85rem); }
.card-accent { background: var(--brand-50); border-color: var(--brand-100); }
.card-accent .badge-icon { background: var(--white); }
.badge-xl { inline-size: 6rem; block-size: 6rem; border-radius: 1.25rem; }
.badge-xl .icon { inline-size: 2rem; block-size: 2rem; }
