/* ---------- site header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  /* Opaque on purpose: at 70% alpha over a dark hero the blend came out #b2b4b9,
     dropping the nav links to 3.65:1. Solid --bg-page keeps them at 7.25:1. */
  background: var(--bg-page);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.site-header .wrap-wide { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.brand { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--text); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--asrock) 0%, var(--asrock-hi) 100%); display: grid; place-items: center; color: white; font-weight: 700; font-size: 0.9rem; box-shadow: var(--shadow-sm); }
.brand-name { color: var(--text); }
.brand-name em { color: var(--asrock-text); font-style: normal; }
.brand-logo { height: 24px; width: auto; display: block; }

.nav-primary { display: none; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) { .nav-primary { display: flex; } }
/* :not(.btn) — the header's Contact CTA is an <a class="btn btn-secondary"> inside this
   nav. Without the exclusion `.nav-primary a` (0,1,1) out-specified `.btn-secondary`
   (0,1,0) and repainted the button label slate-600 on brand green = 3.51:1. */
.nav-primary a:not(.btn) { font-size: 0.92rem; color: var(--text-dim); transition: color var(--dur-fast); font-weight: 500; }
.nav-primary a:not(.btn):hover, .nav-primary a:not(.btn).is-active { color: var(--text); }

.lang-toggle { display: flex; align-items: center; gap: var(--space-3); font-size: 0.85rem; color: var(--text-muted); }
.lang-toggle a { color: var(--text-muted); transition: color var(--dur-fast); }
.lang-toggle a:hover { color: var(--text); }
.lang-toggle a.is-active { color: var(--text); font-weight: 600; }
.lang-toggle .sep { color: var(--text-muted); } /* solid tone instead of opacity — keeps ≥4.5:1 */

/* Language dropdown — subpages with 4 locales (.tw / base EN / .jp / .kr).
   No JS: opens on hover and on :focus-within (button click / keyboard focus). */
.lang-menu { position: relative; font-size: 0.85rem; }
.lang-menu-btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-dim);
  font: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.lang-menu:hover .lang-menu-btn,
.lang-menu:focus-within .lang-menu-btn { color: var(--text); border-color: var(--border-strong); }
.lang-menu-caret { font-size: 0.7em; } /* no opacity — WAVE folds element opacity into text color (0.6 → 2.87:1) */
.lang-menu-list {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 8.5rem;
  margin: 0; padding: var(--space-2);
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--dur-fast), transform var(--dur-fast), visibility var(--dur-fast);
  z-index: 60;
}
.lang-menu:hover .lang-menu-list,
.lang-menu:focus-within .lang-menu-list { opacity: 1; visibility: visible; transform: none; }
.lang-menu-list a {
  display: block; padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim); white-space: nowrap;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.lang-menu-list a:hover { color: var(--text); background: var(--bg-card-alt); }
.lang-menu-list a.is-active { color: var(--text); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-base), color var(--dur-fast);
  border: 1px solid transparent;
  white-space: nowrap;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--text);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--accent);
  box-shadow: var(--shadow-glow-blue);
}

.btn-secondary {
  background: var(--asrock);
  color: var(--bg-dark);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}
.btn-secondary:hover { background: var(--asrock-hi); color: white; box-shadow: var(--shadow-glow-green); }

.btn-green {
  background: var(--asrock);
  color: var(--bg-dark);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}
.btn-green:hover { background: var(--asrock-hi); color: white; box-shadow: var(--shadow-glow-green); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-card); border-color: var(--text); }

.btn-on-dark {
  background: white;
  color: var(--text);
}
.btn-on-dark:hover { background: var(--accent); color: white; }

.btn-arrow::after { content: " →"; transition: transform var(--dur-fast); }
.btn-arrow:hover::after { transform: translateX(3px); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.88rem; }

/* ---------- cards (legacy / generic) ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base), box-shadow var(--dur-base);
  box-shadow: var(--shadow-xs);
}
@media (hover: hover) {
  .card.is-interactive:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
  }
}

/* ---------- site footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: var(--space-16) 0 var(--space-10);
  margin-top: var(--space-24);
  color: var(--text-dim);
  font-size: 0.88rem;
}
.site-footer a { color: var(--text-dim); transition: color var(--dur-fast); }
.site-footer a:hover { color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-10); margin-bottom: var(--space-10); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
/* footer column titles.
   v1.17.7: the three column titles became `<h2 class="footer-col-title">`. They
   used to be <h5> directly after the page's last <h2>, which skips two levels
   (h2 → h5) and trips axe/WAVE `heading-order`. The h5 half of this selector is
   kept for the gitignored `index.share*.html` single-file builds, which still
   carry the old markup — do not delete it.

   Two details keep the h2 pixel-identical to the old h5:
   (a) `.footer-col .footer-col-title` is (0,2,0), which outranks the bare
       `.ds-type h2` rules in pages/ai-home.css and pages/ai-hardware.css
       ((0,1,1), loaded later). The h5 selector never needed that.
   (b) The explicit margin-top and line-height restore what the h5 got for free:
       1.67em is the UA default h5 margin-block-start (base.css zeroes the top
       margin for h1–h4 only), and 1.55 is body's inherited line-height (the
       bare `h2` rule in base.css would otherwise impose 1.12). */
.footer-col h5,
.footer-col .footer-col-title { font-family: var(--font-display); font-size: 0.8rem; line-height: 1.55; color: var(--text); text-transform: uppercase; letter-spacing: 0.12em; margin: 1.67em 0 var(--space-4); font-weight: 700; }
.footer-col ul li { margin-bottom: var(--space-2); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; align-items: center; padding-top: var(--space-6); border-top: 1px solid var(--border); color: var(--text-muted); }

/* ---------- breadcrumb ---------- */
.breadcrumb { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.05em; margin-bottom: var(--space-5); }
/* v1.17.7: breadcrumb links are underlined. The crumb links sit inline in a run
   of plain text (the trailing current-page crumb and the `/` separators), and
   colour alone does not mark them: the default pair --text-dim #475569 against
   --text-muted #64748b is 1.59:1, and the dark-hero pair axe actually measured
   (#bdc0c5 link on #8d9299 text) is 1.71:1 — both far under the 3:1 that WCAG
   1.4.1 / axe `link-in-text-block` asks of a colour-only distinction, which is
   why every breadcrumb on the site failed. Underline is the non-colour cue, so the
   link stays identifiable to a colour-blind reader. The per-page hero overrides
   (.product-hero.is-dark, .svcs-hero in pages/*.css) only restyle `color`, so
   they inherit this. */
.breadcrumb a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: from-font; transition: color var(--dur-fast); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { margin: 0 var(--space-2); } /* inherits --text-muted; opacity 0.5 would dilute to ~2.1:1 */

/* ---------- skip link ---------- */
.skip-link { position: absolute; top: -100px; left: var(--space-4); background: var(--accent); color: white; padding: var(--space-3) var(--space-4); border-radius: var(--radius); z-index: 200; }
.skip-link:focus { top: var(--space-4); }
