/* =============================================================
   FENVA PRECISION — Components
   Import AFTER fenva-fonts.css and fenva-tokens.css
   Reusable, semantic component classes for the marketing site.
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--fg-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

/* ---------------------------------------------------------
   TYPOGRAPHY DEFAULTS
   --------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-sans);
  color: var(--fg-1);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
  margin: 0;
}
.display { font-size: var(--text-display); line-height: 1.02; letter-spacing: -0.025em; font-weight: var(--weight-bold); }
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); letter-spacing: var(--tracking-snug); }
h4 { font-size: var(--text-h4); letter-spacing: var(--tracking-snug); line-height: var(--leading-snug); }

p { margin: 0; color: var(--fg-2); line-height: var(--leading-normal); text-wrap: pretty; }
.lead { font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--fg-2); }
.muted { color: var(--fg-3); }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }

strong, b { font-weight: var(--weight-semibold); color: var(--fg-1); }

/* Eyebrow / section label — uppercase, tracked, brand blue */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--blue-500);
  margin: 0;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--accent-500); display: inline-block;
}
.eyebrow.no-tick::before { display: none; }
.on-navy .eyebrow, .eyebrow.on-navy { color: var(--accent-tint); }

/* Mono — part numbers, tolerances, specs */
.mono, code, .spec {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "zero" 1;  /* tabular figures + slashed zero */
  letter-spacing: 0;
}

/* Chinese text helper */
:lang(zh), .lang-cn {
  font-family: var(--font-cn);
  line-height: var(--leading-relaxed);
  letter-spacing: 0;
}

/* Universal visible focus */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

/* ---------------------------------------------------------
   LAYOUT
   --------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section.alt { background: var(--bg-alt); }
.section.navy { background: var(--bg-navy); color: var(--fg-inverse); }

/* Section heading block */
.section-head { max-width: 720px; display: flex; flex-direction: column; gap: var(--space-4); }
.section-head .title-row { display: flex; flex-direction: column; gap: var(--space-3); }
.section-head h2 { color: inherit; }
.section.navy .section-head p, .on-navy p { color: var(--fg-inverse-dim); }

.icon { width: 20px; height: 20px; display: inline-block; flex: none; stroke-width: 1.75; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */
.btn {
  --btn-h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: var(--btn-h); padding-inline: var(--space-6);
  font-family: var(--font-sans); font-size: var(--text-base); font-weight: var(--weight-semibold);
  line-height: 1; letter-spacing: 0;
  border: 1px solid transparent; border-radius: var(--radius-md);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn .icon { width: 18px; height: 18px; }

/* Primary — the single accent action */
.btn-primary { background: var(--action); color: #fff; box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--action-hover); color: #fff; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn-primary:active { background: var(--action-press); transform: translateY(0); box-shadow: none; }

/* Secondary — outline, on light */
.btn-secondary { background: #fff; color: var(--blue-600); border-color: var(--border-strong); }
.btn-secondary:hover { color: var(--blue-700); border-color: var(--blue-400); background: var(--blue-50); transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0); background: var(--blue-100); }

/* Ghost / tertiary text */
.btn-ghost { background: transparent; color: var(--blue-600); padding-inline: var(--space-3); }
.btn-ghost:hover { background: var(--blue-50); color: var(--blue-700); }

/* On navy */
.on-navy .btn-secondary, .btn-secondary.on-navy {
  background: transparent; color: #fff; border-color: rgba(255,255,255,0.35);
}
.on-navy .btn-secondary:hover, .btn-secondary.on-navy:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.6); color: #fff; }

/* Sizes */
.btn-lg { --btn-h: 56px; padding-inline: var(--space-8); font-size: var(--text-lg); }
.btn-sm { --btn-h: 38px; padding-inline: var(--space-4); font-size: var(--text-sm); }

.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--slate-100); color: var(--slate-400); border-color: var(--slate-200);
  cursor: not-allowed; box-shadow: none; transform: none; pointer-events: none;
}

/* ---------------------------------------------------------
   SITE HEADER (sticky nav)
   --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.site-header.is-scrolled { background: rgba(255,255,255,0.92); border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.site-header .bar {
  height: 76px; display: flex; align-items: center; gap: var(--space-8);
  max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter);
}
.site-header .brand { display: flex; align-items: center; flex: none; }
.site-header .brand img { height: 40px; width: auto; }
.site-header nav { display: flex; align-items: center; gap: var(--space-6); margin-inline-start: var(--space-4); }
.site-header nav a {
  font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--slate-700);
  padding: var(--space-2) 0; position: relative;
}
.site-header nav a:hover { color: var(--blue-600); text-decoration: none; }
.site-header nav a[aria-current="page"] { color: var(--blue-600); }
.site-header nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent-500);
}
.site-header .actions { display: flex; align-items: center; gap: var(--space-4); margin-inline-start: auto; }

/* ---------------------------------------------------------
   MEGA MENU — desktop hover/focus dropdowns (built by fenva.js)
   --------------------------------------------------------- */
.site-header nav a.has-mega { display: inline-flex; align-items: center; gap: 3px; }
.mega-caret { width: 13px; height: 13px; opacity: 0.55; transition: transform var(--dur) var(--ease-out); }
.site-header nav a.has-mega[aria-expanded="true"] .mega-caret { transform: rotate(180deg); opacity: 0.9; }
.mega-root { position: absolute; left: 0; right: 0; top: 100%; z-index: 45; pointer-events: none; }
.mega-panel {
  position: absolute; left: 0; right: 0; top: 0;
  background: rgba(255,255,255,0.985);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
  pointer-events: none;
}
.mega-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.mega-inner { max-width: var(--container); margin-inline: auto; padding: var(--space-10) var(--gutter); display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--space-12); align-items: start; }
.mega-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.mega-col h4 { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--fg-3); margin-bottom: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.mega-col ul { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.mega-col a { display: block; padding: var(--space-2) var(--space-3); margin-inline: calc(var(--space-3) * -1); border-radius: var(--radius-sm); font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--slate-700); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.mega-col a:hover { background: var(--blue-50); color: var(--blue-600); text-decoration: none; }
.mega-promo { display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--slate-50); text-decoration: none; box-shadow: var(--shadow-xs); transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); }
.mega-promo:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--slate-300); text-decoration: none; }
.mega-promo .pm-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--slate-100); }
.mega-promo .pm-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.95); }
.mega-promo .pm-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.mega-promo .pm-title { font-size: var(--text-h4); color: var(--fg-1); line-height: var(--leading-snug); letter-spacing: var(--tracking-snug); }
.mega-promo .pm-text { font-size: var(--text-sm); color: var(--fg-2); line-height: var(--leading-normal); }
.mega-promo .pm-link { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--blue-600); display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-1); }
.mega-promo .pm-link::after { content: "\2192"; transition: transform var(--dur) var(--ease-out); }
.mega-promo:hover .pm-link::after { transform: translateX(3px); }
@media (max-width: 920px) { .mega-root { display: none; } }
@media (prefers-reduced-motion: reduce) { .mega-panel { transition: opacity var(--dur) var(--ease-out); transform: none; } .mega-panel.is-open { transform: none; } }

/* Language switch */
.lang-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; }
.lang-switch button {
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium);
  padding: var(--space-2) var(--space-3); background: #fff; color: var(--slate-600);
  border: none; cursor: pointer; line-height: 1.2; transition: background var(--dur) var(--ease-out);
}
.lang-switch button + button { border-inline-start: 1px solid var(--border); }
.lang-switch button[aria-pressed="true"] { background: var(--blue-500); color: #fff; }
.lang-switch button:not([aria-pressed="true"]):hover { background: var(--slate-50); }

/* Hamburger toggle (mobile) */
.nav-toggle {
  display: none; width: 44px; height: 44px; flex: none;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); cursor: pointer; color: var(--slate-800);
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.nav-toggle:hover { background: var(--slate-50); border-color: var(--slate-400); }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out), top var(--dur) var(--ease-out);
}
.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before { content: ""; position: absolute; top: -6px; }
.nav-toggle .bars::after  { content: ""; position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after  { top: 0; transform: rotate(-45deg); }

/* Mobile drawer (populated from the primary nav by fenva.js) */
.nav-drawer { display: none; }
.nav-drawer nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.nav-drawer nav a {
  font-size: var(--text-lg); font-weight: var(--weight-medium); color: var(--slate-800);
  padding: var(--space-4) 0; border-bottom: 1px solid var(--border);
}
.nav-drawer nav a:hover { color: var(--blue-600); text-decoration: none; }
.nav-drawer nav a[aria-current="page"] { color: var(--blue-600); }
.nav-drawer .drawer-actions { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.nav-drawer .drawer-actions .btn { width: 100%; }
.nav-drawer .drawer-lang { display: flex; justify-content: center; }
/* Accordion groups in the mobile drawer */
.nav-drawer .drawer-group { border-bottom: 1px solid var(--border); }
.nav-drawer .drawer-acc { width: 100%; appearance: none; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  font-family: inherit; font-size: var(--text-lg); font-weight: var(--weight-medium); color: var(--slate-800);
  padding: var(--space-4) 0; text-align: left; }
.nav-drawer .drawer-acc:hover { color: var(--blue-600); }
.nav-drawer .drawer-caret { width: 20px; height: 20px; flex: none; transition: transform var(--dur) var(--ease-out); }
.nav-drawer .drawer-group.is-open .drawer-acc { color: var(--blue-600); }
.nav-drawer .drawer-group.is-open .drawer-caret { transform: rotate(180deg); }
.nav-drawer .drawer-sub { display: none; padding: 0 0 var(--space-3) var(--space-3); flex-direction: column; }
.nav-drawer .drawer-group.is-open .drawer-sub { display: flex; }
.nav-drawer .drawer-sub a { font-size: var(--text-base); font-weight: var(--weight-regular); color: var(--slate-700);
  padding: var(--space-3) 0; border-bottom: none; }
.nav-drawer .drawer-sub a:hover { color: var(--blue-600); }
.nav-drawer .drawer-sub .drawer-sub-all { font-weight: var(--weight-semibold); color: var(--blue-600); }
.nav-drawer .drawer-sub .drawer-sub-h { font-size: var(--text-xs); font-weight: var(--weight-semibold);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); padding: var(--space-3) 0 2px; }

@media (max-width: 920px) {
  .site-header nav[aria-label="Primary"] { display: none; }
  .site-header .bar { gap: var(--space-4); }
  .nav-toggle { display: inline-flex; }
  .nav-drawer { display: block; }
  .nav-drawer[hidden] { display: none; }
  .nav-drawer:not([hidden]) {
    position: fixed; inset: 76px 0 0 0; z-index: 49;
    background: rgba(255,255,255,0.98); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    padding: var(--space-6) var(--gutter) var(--space-12);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    animation: drawerIn var(--dur) var(--ease-out);
  }
  body.nav-open { overflow: hidden; }
}
@keyframes drawerIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .nav-drawer:not([hidden]) { animation: none; } }

/* Testimonials strip (Home + Quality) — ONE shared card anatomy for all three
   cards: same surface, same accent bar, same padding and type scale. Equal-height
   cards; the role/region footer is pinned to the bottom so the three footers sit
   on one line. (The contact-page sidebar card is separate; it styles itself.) */
.testi-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); align-items: stretch; }
@media (max-width: 880px){ .testi-strip { grid-template-columns: 1fr; } }
.testi-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); }
.testi-card .stars { color: var(--accent-500); letter-spacing: 2px; font-size: var(--text-sm); }
.testi-card blockquote { margin: 0; font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--fg-1); text-wrap: pretty; }
.testi-card .t-context { font-size: var(--text-sm); color: var(--fg-3); }
.testi-card .who { font-size: var(--text-sm); color: var(--fg-3); margin-top: auto; }
.testi-card.quote-card { border-inline-start: 3px solid var(--accent-500); }

/* Inside the strip the accent bar applies to all three cards identically; the
   card's own padding keeps the text clear of the bar on every side. The context
   line + footer group is pushed to the bottom edge of each card. */
.testi-strip .testi-card { border-inline-start: 3px solid var(--accent-500); }
.testi-strip .t-context { margin-top: auto; }
.testi-strip .t-context + .who { margin-top: 0; }

/* Repeat-customer panel: identical anatomy to its siblings — the badge alone
   marks it as ours-not-a-quote; the statement matches the quote type size. */
.testi-card.fact-panel .repeat-tag { align-self: flex-start; font-size: var(--text-xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue-600); background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius-pill); padding: 4px 12px; }
.testi-card.fact-panel p { margin: 0; font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--fg-1); text-wrap: pretty; }
.testi-provenance { margin-top: var(--space-6); font-size: var(--text-xs); color: var(--fg-3); max-width: 72ch; }

@media (max-width: 560px) {
  /* keep the quote button labelled at ≤560px (do NOT hide the label) */
  .site-header .actions { gap: var(--space-3); }
}

/* Skip-to-content link — first focusable element on the page */
.skip-link {
  position: absolute; left: var(--space-4); top: -64px; z-index: 100;
  background: var(--blue-900); color: #fff; padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: var(--weight-semibold);
  text-decoration: none; transition: top var(--dur) var(--ease-out);
}
.skip-link:focus-visible {
  top: var(--space-3); color: #fff; text-decoration: none;
  outline: 2px solid #fff; outline-offset: 2px; box-shadow: var(--shadow-md);
}

/* White focus outline on dark surfaces (the cyan ring is invisible on navy) */
.on-navy :focus-visible,
.hero :focus-visible,
.cta-band :focus-visible,
.stat-band :focus-visible,
.contact-card :focus-visible,
.site-footer :focus-visible {
  outline: 2px solid #fff; outline-offset: 2px; box-shadow: none;
}

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */
.hero { position: relative; background: var(--bg-navy); color: #fff; overflow: hidden; isolation: isolate; }
.hero .hero-media { position: absolute; inset: 0; z-index: -2; }
.hero .hero-media img, .hero .hero-media video { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) brightness(0.92); }
.hero .hero-media video { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms var(--ease-out); }
.hero .hero-media video.is-playing { opacity: 1; }
/* navy protection gradient so white text always holds AA over busy shop shots */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(96deg, rgba(16,24,41,0.94) 0%, rgba(16,24,41,0.82) 42%, rgba(16,24,41,0.42) 72%, rgba(16,24,41,0.15) 100%);
}
.hero .container { padding-block: clamp(72px, 11vw, 150px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); max-width: 760px; }
.hero h1.display { color: #fff; }
/* Chinese hero headline: tighten leading to match the EN display (the global .lang-cn 1.72 is for body, too loose for the big title) */
/* ZH hero: hard break at the ；clause boundary (pre-line + &#10; in data-zh) + a slight
   font shrink so each 11-glyph clause fits one line -> clean 2 rows (wraps per-clause on phones) */
.lang-cn .hero h1.display { line-height: 1.1; white-space: pre-line; font-size: calc(var(--text-display) * 0.93); }
.hero .lead { color: var(--fg-inverse-dim); max-width: 560px; }
.hero .hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.hero .hero-meta { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); align-items: center; margin-top: var(--space-2); }
.hero .hero-meta .item { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--fg-inverse-dim); font-size: var(--text-sm); }
.hero .hero-meta .item .icon { color: var(--accent-400); }
.hero .hero-meta .sep { width: 1px; height: 16px; background: var(--border-navy); }

/* ---------------------------------------------------------
   STAT / PROOF BAND
   --------------------------------------------------------- */
.stat-band { background: var(--bg-navy); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat {
  padding: var(--space-2) var(--space-8) var(--space-2) 0;
  border-inline-start: 1px solid var(--border-navy); padding-inline-start: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.stat:first-child { border-inline-start: none; padding-inline-start: 0; }
.stat .stat-num { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 3.5rem); font-weight: var(--weight-bold); line-height: 1; letter-spacing: -0.03em; color: #fff; font-feature-settings: "tnum" 1; }
.stat .stat-num .unit { font-size: 0.5em; font-weight: var(--weight-semibold); color: var(--accent-400); margin-inline-start: 0.15em; letter-spacing: 0; }
.stat .stat-label { font-size: var(--text-sm); color: var(--fg-inverse-dim); line-height: var(--leading-snug); }
@media (max-width: 860px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-10) var(--space-6); }
  .stat { border-inline-start: none; padding-inline-start: 0; }
}
@media (max-width: 460px) { .stat-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------
   CONTENT CARD
   --------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.card.is-interactive:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--slate-300); }
.card .card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); flex: none;
  display: grid; place-items: center; background: var(--blue-50); color: var(--blue-500);
  margin-bottom: var(--space-1);
}
.card h4 { color: var(--fg-1); }
.card p { font-size: var(--text-base); }
.card .card-link { margin-top: var(--space-2); display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--blue-600); }
.card.is-interactive:hover .card-link .icon { transform: translateX(3px); }
.card .card-link .icon { width: 16px; height: 16px; transition: transform var(--dur) var(--ease-out); }

/* ---------------------------------------------------------
   GALLERY CARD (production part)
   --------------------------------------------------------- */
.gallery-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
  display: flex; flex-direction: column;
}
.gallery-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--slate-300); }
.gallery-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--slate-100); position: relative; }
.gallery-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; filter: saturate(0.92); transition: transform var(--dur-slow) var(--ease-out); }
.gallery-card:hover .thumb img { transform: scale(1.04); }
.gallery-card .industry-tag {
  position: absolute; top: var(--space-3); left: var(--space-3);
  font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--blue-700); background: rgba(255,255,255,0.92); padding: 5px var(--space-3); border-radius: var(--radius-sm);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.gallery-card .body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); flex: 1; }
.gallery-card .part-name { font-size: var(--text-h4); font-weight: var(--weight-semibold); color: var(--fg-1); line-height: var(--leading-snug); letter-spacing: var(--tracking-snug); }
.gallery-card .specs { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); margin-top: auto; }
.gallery-card .specs dt { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); align-self: center; }
.gallery-card .specs dd { margin: 0; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--slate-700); font-feature-settings: "tnum" 1, "zero" 1; }

/* ---------------------------------------------------------
   SPEC / COMPARISON TABLE
   --------------------------------------------------------- */
.spec-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); }
table.spec-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.spec-table caption { text-align: left; padding: var(--space-4) var(--space-5); font-size: var(--text-xs); color: var(--fg-3); background: #fff; }
.spec-table thead th {
  text-align: left; font-weight: var(--weight-semibold); color: var(--fg-1); background: var(--slate-100);
  padding: var(--space-3) var(--space-5); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border-strong); white-space: nowrap;
}
.spec-table tbody td, .spec-table tbody th {
  padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle;
}
.spec-table tbody th { font-weight: var(--weight-semibold); color: var(--fg-1); }
.spec-table tbody tr:last-child td, .spec-table tbody tr:last-child th { border-bottom: none; }
.spec-table tbody tr:nth-child(even) { background: var(--slate-50); }
.spec-table .num { font-family: var(--font-mono); color: var(--slate-700); font-feature-settings: "tnum" 1, "zero" 1; white-space: nowrap; }
.spec-table .col-emph { background: var(--accent-tint); }
.spec-table thead th.col-emph { background: #DCE7FC; color: var(--blue-700); }

/* ---------------------------------------------------------
   CERTIFICATION BADGE
   --------------------------------------------------------- */
.cert-badge {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md);
  background: #fff; box-shadow: var(--shadow-xs);
}
.cert-badge .seal {
  width: 40px; height: 40px; flex: none; border-radius: var(--radius-pill);
  display: grid; place-items: center; background: var(--blue-50); color: var(--blue-500);
  border: 1px solid var(--blue-100);
}
.cert-badge .seal .icon { width: 22px; height: 22px; }
.cert-badge .cert-meta { display: flex; flex-direction: column; line-height: 1.25; }
.cert-badge .cert-std { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--fg-1); }
.cert-badge .cert-sub { font-size: var(--text-xs); color: var(--fg-3); }
.on-navy .cert-badge { background: rgba(255,255,255,0.04); border-color: var(--border-navy); }
.on-navy .cert-badge .cert-std { color: #fff; }
.on-navy .cert-badge .cert-sub { color: var(--fg-inverse-dim); }
.on-navy .cert-badge .seal { background: rgba(61,119,238,0.16); color: var(--accent-400); border-color: rgba(61,119,238,0.3); }

/* ---------------------------------------------------------
   FORM FIELDS + DRAG-DROP UPLOAD
   --------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--fg-1); }
.field label .req { color: var(--danger); margin-inline-start: 2px; }
.field .hint { font-size: var(--text-xs); color: var(--fg-3); }
.input, .textarea, .select {
  font-family: var(--font-sans); font-size: var(--text-base); color: var(--fg-1);
  background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  padding: 0 var(--space-4); height: 48px; width: 100%;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.textarea { height: auto; min-height: 120px; padding: var(--space-3) var(--space-4); resize: vertical; line-height: var(--leading-normal); }
.input::placeholder, .textarea::placeholder { color: var(--slate-400); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--slate-400); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent-500); box-shadow: var(--ring); }
.field.invalid .input, .field.invalid .textarea, .field.invalid .select { border-color: var(--danger); }
.field.invalid .dropzone { border-color: var(--danger); }
.field .error { font-size: var(--text-xs); color: var(--danger); display: inline-flex; align-items: center; gap: 6px; }
/* Rule: any element toggled via the hidden attribute must never get a bare display
   value without this paired override — otherwise error spans render permanently. */
.field .error[hidden] { display: none; }

/* Drag-drop file upload */
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--slate-50); padding: var(--space-8) var(--space-6);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center;
  cursor: pointer; transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.dropzone:hover { border-color: var(--accent-500); background: var(--accent-tint); }
.dropzone.is-dragover { border-color: var(--accent-500); border-style: solid; background: var(--accent-tint); box-shadow: var(--ring); }
.dropzone .dz-icon { width: 48px; height: 48px; border-radius: var(--radius-md); display: grid; place-items: center; background: #fff; color: var(--accent-500); border: 1px solid var(--border); }
.dropzone .dz-title { font-weight: var(--weight-semibold); color: var(--fg-1); font-size: var(--text-base); }
.dropzone .dz-title .link { color: var(--accent-600); text-decoration: underline; text-underline-offset: 2px; }
.dropzone .dz-sub { font-size: var(--text-xs); color: var(--fg-3); }
.dz-file { display: none; align-items: center; gap: var(--space-3); margin-top: var(--space-3); padding: var(--space-3) var(--space-4); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); }
.dz-file.show { display: flex; }
.dz-file .icon { color: var(--blue-500); }
.dz-file .fname { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--fg-1); }
.dz-file .fsize { font-size: var(--text-xs); color: var(--fg-3); margin-inline-start: auto; }

/* ---------------------------------------------------------
   SITE FOOTER
   --------------------------------------------------------- */
.site-footer { background: var(--bg-navy-2); color: var(--fg-inverse-dim); }
.site-footer .footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-12); padding-block: var(--space-20) var(--space-12); }
.site-footer .f-brand img { height: 30px; margin-bottom: var(--space-5); }
.site-footer .f-brand p { color: var(--fg-inverse-dim); max-width: 34ch; font-size: var(--text-sm); }
.site-footer .f-certs { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.site-footer .f-social { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-6); }
.site-footer .f-social a {
  width: 38px; height: 38px; flex: none; border-radius: var(--radius-pill);
  display: grid; place-items: center;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-navy);
  color: var(--fg-inverse-dim); transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.site-footer .f-social a:hover { color: #fff; background: rgba(61,119,238,0.16); border-color: rgba(61,119,238,0.34); }
.site-footer .f-social .icon { width: 18px; height: 18px; }
.site-footer .offices { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.site-footer .office h5 { font-size: var(--text-sm); color: #fff; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-3); font-weight: var(--weight-semibold); }
.site-footer .office address { font-style: normal; font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--fg-inverse-dim); }
.site-footer .office a { color: var(--accent-tint); }
.site-footer .office a:hover { color: #fff; }
.site-footer .f-links h5 { font-size: var(--text-sm); color: #fff; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-4); font-weight: var(--weight-semibold); }
.site-footer .f-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.site-footer .f-links a { color: var(--fg-inverse-dim); font-size: var(--text-sm); }
.site-footer .f-links a:hover { color: #fff; }
.site-footer .footer-bottom {
  border-top: 1px solid var(--border-navy); padding-block: var(--space-6);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6);
  font-size: var(--text-xs); color: var(--fg-inverse-dim);
}
.site-footer .footer-bottom .spacer { margin-inline-start: auto; }
@media (max-width: 860px) {
  .site-footer .footer-top { grid-template-columns: 1fr; gap: var(--space-10); }
  .site-footer .offices { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .site-footer .offices { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* C6: homepage logo renders larger over the hero and settles to standard size on
   scroll. transform-only so the header height and nav layout never shift.
   Mobile gets a gentle 1.2x enlarge so it doesn't crowd the hamburger; desktop
   (>=920px) goes to the fuller 1.5x. */
.site-header .brand img { transition: transform 250ms ease; transform-origin: left center; }
.site-header.is-scrolled .brand img { transform: scale(0.87); }
@media (min-width: 920px) {
  .site-header .brand img { height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .brand img { transition: transform 250ms ease; }
}
