/* HITREE Robotics — design tokens taken from the logo (navy + orange). */
:root {
  --navy: #0e2747;
  --navy-2: #173a66;
  --navy-3: #22446f;
  --orange: #ee6a1f;
  --orange-ink: #c2500f;
  --bg: #ffffff;
  --bg-alt: #f2f5f9;
  --surface: #ffffff;
  --line: #d9e0ea;
  --fg: #14233a;
  --muted: #5a6b82;
  --on-dark: #ffffff;
  --on-dark-muted: #b8c6da;
  --band: #0e2747;
  --band-2: #0a1e38;
  --draw: #0e2747;

  --f-display: 'Roboto', 'Roboto Variable', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --f-body: 'Roboto', 'Roboto Variable', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --f-mono: 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1200px;
  --header-h: 76px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.65 var(--f-body); }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.12; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.sec { padding-block: 88px; }
.sec.alt { background: var(--bg-alt); }
.sec.dark { background: var(--band); color: var(--on-dark); }
@media (max-width: 700px) { .sec { padding-block: 60px; } }

.eyebrow {
  font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange-ink); display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--orange); flex: none; }
.dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: #ff9a5c; }

.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin-top: 14px; }
.sec-head p { max-width: 48ch; color: var(--muted); }
.dark .sec-head p { color: var(--on-dark-muted); }

.btn {
  display: inline-flex; align-items: center; gap: 10px; font: 600 15px/1 var(--f-body);
  padding: 15px 24px; border-radius: 2px; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-ink); }
.btn-ghost { border-color: currentColor; color: var(--on-dark); background: transparent; }
.btn-ghost:hover { background: var(--on-dark); color: var(--navy); }
.btn-line { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-line:hover { background: var(--navy); color: #fff; }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
.topbar { background: var(--band-2); color: var(--on-dark-muted); font: 13px/1 var(--f-mono); }
.topbar .wrap { display: flex; justify-content: space-between; gap: 8px 16px; padding-block: 10px; flex-wrap: wrap; }
.topbar b { color: var(--on-dark); font-weight: 500; }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }
.logo { display: block; flex: none; }
.logo img { height: 46px; width: auto; display: block; }
.main-nav > ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--fg); }
.main-nav > ul > li > a { display: inline-block; padding-block: 8px; border-bottom: 2px solid transparent; }
.main-nav > ul > li > a:hover, .main-nav a[aria-current="page"] { border-color: var(--orange); }
.has-sub { position: relative; }
.submenu {
  list-style: none; margin: 0; padding: 8px 0; position: absolute; top: calc(100% + 8px); left: -16px;
  min-width: 300px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(14, 39, 71, .12);
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { display: grid; gap: 2px; padding: 10px 16px; }
.submenu a:hover { background: var(--bg-alt); }
.submenu small { font: 12px var(--f-mono); color: var(--muted); }
.nav-cta { padding: 11px 18px; font-size: 14px; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--fg); width: 44px; height: 44px; border-radius: 2px; cursor: pointer; }
@media (max-width: 960px) {
  .main-nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .main-nav > ul { flex-direction: column; gap: 0; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .main-nav > ul > li > a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; min-width: 0; padding: 0 0 8px 12px; }
  .submenu a { padding: 10px 0; }
  .menu-btn { display: block; }
  .nav-cta { display: none; }
}

/* ---------- Hero (home) ---------- */
.hero, .page-hero { background: var(--band); color: var(--on-dark); position: relative; overflow: hidden; }
.hero::after, .page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-block: 80px 72px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 64px); font-weight: 700; letter-spacing: -.01em; margin: 18px 0 20px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.lead { color: var(--on-dark-muted); font-size: 18px; max-width: 54ch; }
.hero .lead { margin-bottom: 32px; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-specs { display: flex; margin-top: 48px; border-top: 1px solid rgba(255,255,255,.15); flex-wrap: wrap; }
.hero-specs div { padding: 18px 28px 0 0; margin-right: 28px; border-right: 1px solid rgba(255,255,255,.15); }
.hero-specs div:last-child { border-right: 0; }
.hero-specs b { display: block; font: 600 30px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.hero-specs span { font: 12px/1.4 var(--f-mono); color: var(--on-dark-muted); letter-spacing: .06em; text-transform: uppercase; }
.hero-draw { min-width: 0; }
.hero-draw svg { width: 100%; height: auto; display: block; }
.jaw { animation: grip 3.2s ease-in-out infinite; }
.jaw.r { animation-name: gripR; }
@keyframes grip { 0%, 100% { transform: translateX(0); } 45%, 60% { transform: translateX(28px); } }
@keyframes gripR { 0%, 100% { transform: translateX(0); } 45%, 60% { transform: translateX(-28px); } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 56px; }
  .hero-draw { max-width: 440px; }
}

/* ---------- Inner page hero ---------- */
.page-hero .wrap { position: relative; z-index: 1; padding-block: 28px 64px; }
.page-hero h1 { font-size: clamp(34px, 4.8vw, 56px); font-weight: 700; margin: 16px 0 18px; }
.page-hero .lead { margin-bottom: 0; }
.product-hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.product-hero .actions { margin-top: 32px; }
.product-hero .figure-box { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); aspect-ratio: 1; max-width: 100%; display: grid; place-items: center; }
.product-hero .figure-box svg { width: 70%; height: auto; --draw: #c9d6e6; }
.product-hero .figure-box img { width: 100%; height: 100%; object-fit: cover; }
.kw { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; list-style: none; padding: 0; }
.kw li { font: 500 12px/1 var(--f-mono); padding: 7px 10px; border: 1px solid rgba(255,255,255,.22); color: var(--on-dark-muted); border-radius: 2px; }
@media (max-width: 860px) {
  .product-hero .wrap { grid-template-columns: 1fr; }
  .product-hero .figure-box { max-width: 360px; }
}

/* ---------- Breadcrumbs ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font: 13px var(--f-mono); color: var(--on-dark-muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--on-dark); }

/* ---------- Product cards ---------- */
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cat { background: var(--surface); padding: 28px; display: flex; flex-direction: column; gap: 16px; text-decoration: none; transition: background .2s; min-width: 0; }
.cat:hover { background: var(--bg-alt); }
.cat:hover .cat-more { color: var(--orange-ink); }
.cat-fig { height: 160px; background: var(--bg-alt); display: grid; place-items: center; border-radius: 2px; overflow: hidden; }
.cat:hover .cat-fig { background: var(--surface); }
.cat-fig svg { height: 120px; width: auto; }
.cat-fig img { width: 100%; height: 100%; object-fit: cover; }
.cat-code { font: 500 12px/1 var(--f-mono); color: var(--muted); letter-spacing: .08em; }
.cat h3 { font-size: 26px; font-weight: 600; }
.cat p { color: var(--muted); font-size: 15px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 500 12px/1 var(--f-mono); padding: 7px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--bg-alt); }
.cat:hover .chips li { background: var(--surface); }
.spec-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font: 13px/1.4 var(--f-mono); border-top: 1px dashed var(--line); padding-top: 14px; }
.spec-dl dt { color: var(--muted); }
.spec-dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.cat-more { margin-top: auto; font-weight: 600; font-size: 14px; }
@media (max-width: 760px) { .cats { grid-template-columns: 1fr; } }

/* ---------- Feature grid ---------- */
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.adv-item { border-top: 3px solid var(--navy-2); padding-top: 22px; min-width: 0; }
.adv-item:first-child { border-color: var(--orange); }
.adv-item svg { width: 36px; height: 36px; color: var(--orange-ink); }
.adv-item h3 { font-size: 21px; font-weight: 600; margin: 14px 0 10px; }
.adv-item p { color: var(--muted); font-size: 15px; }
@media (max-width: 960px) { .adv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .adv-grid { grid-template-columns: 1fr; } }

/* ---------- Applications mosaic ---------- */
.apps { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 16px; }
.app { position: relative; overflow: hidden; border-radius: 2px; background: var(--navy); color: #fff; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; text-decoration: none; }
.app:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.app:nth-child(2) { background: var(--navy-2); }
.app:nth-child(4) { background: var(--navy-3); }
.app:nth-child(5) { background: var(--orange); }
.app svg.bg { position: absolute; right: -10px; top: -10px; width: 62%; height: auto; opacity: .18; }
.app:nth-child(1) svg.bg { width: 58%; right: 16px; top: 16px; }
.app h3 { font-size: 24px; font-weight: 600; position: relative; }
.app:nth-child(1) h3 { font-size: 34px; }
.app p { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.85); position: relative; max-width: 44ch; }
.app .tag { font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.75); position: relative; margin-bottom: 10px; }
@media (max-width: 860px) { .apps { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; } }
@media (max-width: 520px) { .apps { grid-template-columns: 1fr; } .app:nth-child(n) { grid-column: auto; grid-row: auto; } }

/* ---------- About / stats ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split > * { min-width: 0; }
.prose-block h2 { font-size: clamp(28px, 4vw, 44px); margin-top: 14px; }
.prose-block p { color: var(--muted); margin-top: 18px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: var(--surface); }
.stat { padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n+2) { border-bottom: 0; }
.stat b { font: 700 46px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat b sup { font-size: 22px; color: var(--orange); }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; }
.certs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.certs span { font: 500 12px/1 var(--f-mono); border: 1px solid var(--line); padding: 9px 12px; border-radius: 2px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { padding: 26px 24px 0 0; border-top: 2px solid rgba(255,255,255,.2); position: relative; counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); font: 500 13px/1 var(--f-mono); color: var(--orange); display: block; margin-bottom: 16px; }
.steps li::after { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; background: var(--orange); }
.steps h3 { font-size: 22px; font-weight: 600; }
.steps p { color: var(--on-dark-muted); font-size: 15px; margin-top: 10px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Product detail ---------- */
.variants { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.variant { background: var(--surface); padding: 26px 28px; }
.variant h3 { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.variant h3::before { content: ""; width: 8px; height: 8px; background: var(--orange); flex: none; }
.variant p { color: var(--muted); margin-top: 10px; font-size: 15px; }
@media (max-width: 700px) { .variants { grid-template-columns: 1fr; } }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table.specs { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.specs caption { text-align: left; padding: 16px 18px; font: 600 15px var(--f-body); border-bottom: 1px solid var(--line); caption-side: top; }
table.specs th, table.specs td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.specs thead th { font: 500 12px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg-alt); }
table.specs tbody td { font-variant-numeric: tabular-nums; }
table.specs tbody td:first-child { font-family: var(--f-mono); font-weight: 500; }
table.specs tbody tr:last-child td { border-bottom: 0; }
table.specs tbody tr:hover td { background: var(--bg-alt); }
.table-note { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 80ch; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.two-col > * { min-width: 0; }
.two-col h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 14px 0 22px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.check-list li::before { content: ""; width: 10px; height: 10px; border: 2px solid var(--orange); flex: none; transform: translateY(1px); }
.sel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: sel; }
.sel-list li { counter-increment: sel; display: grid; grid-template-columns: 36px 1fr; gap: 4px 12px; }
.sel-list li::before { content: counter(sel); grid-row: span 2; width: 30px; height: 30px; display: grid; place-items: center; background: var(--navy); color: #fff; font: 600 14px var(--f-mono); }
.sel-list b { font-family: var(--f-display); font-size: 19px; font-weight: 600; }
.sel-list p { color: var(--muted); font-size: 15px; }
.guide-link { display: inline-block; margin-top: 22px; font-weight: 600; color: var(--orange-ink); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 40px; } }

.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font: 600 19px/1.35 var(--f-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 26px/1 var(--f-body); color: var(--orange); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 20px; max-width: 70ch; }

/* ---------- Blog ---------- */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; min-width: 0; }
.post-card time, .post-meta { font: 12px/1 var(--f-mono); color: var(--muted); letter-spacing: .06em; }
.post-card .kind { color: var(--orange-ink); }
.post-card h3 { font-size: 22px; font-weight: 600; }
.post-card:hover h3 { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 4px; }
.post-card p { color: var(--muted); font-size: 15px; }
.post-card .bar { height: 4px; background: var(--line); }
.post-card:hover .bar { background: var(--orange); }
@media (max-width: 860px) { .news { grid-template-columns: 1fr; } }

.article { max-width: 760px; }
.article > * + * { margin-top: 1.1em; }
.article h2 { font-size: 30px; margin-top: 1.8em; }
.article h3 { font-size: 22px; margin-top: 1.5em; }
.article p, .article li { color: var(--fg); font-size: 17px; }
.article ul, .article ol { padding-left: 1.3em; }
.article li + li { margin-top: .4em; }
.article code { font-family: var(--f-mono); font-size: .9em; background: var(--bg-alt); padding: 2px 6px; }
.article pre { background: var(--bg-alt); padding: 16px 18px; overflow-x: auto; border-left: 3px solid var(--orange); }
.article pre code { background: none; padding: 0; }
.article table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.article th, .article td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; white-space: nowrap; }
.article th { background: var(--bg-alt); font: 500 12px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; }
.article blockquote { margin-left: 0; padding: 14px 18px; background: var(--bg-alt); border-left: 3px solid var(--navy); }
.article a { color: var(--orange-ink); }
.post-cta { margin-top: 48px; padding: 28px; background: var(--band); color: var(--on-dark); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.post-cta h2 { font-size: 26px; margin: 0; }
.post-cta p { color: var(--on-dark-muted); margin-top: 6px; }

/* ---------- Contact / form ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; }
.contact-grid > * { min-width: 0; }
.contact-info h2 { font-size: clamp(28px, 4vw, 44px); margin: 14px 0 16px; }
.contact-info > p { color: var(--muted); }
.ci { display: grid; gap: 16px; margin: 28px 0 0; }
.ci div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.ci dt { font: 12px/1.7 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ci dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.ci a { text-decoration: none; }
.ci a:hover { color: var(--orange-ink); }
.inquiry { background: var(--surface); border: 1px solid var(--line); padding: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.inquiry .full { grid-column: 1 / -1; }
.inquiry label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.inquiry input, .inquiry select, .inquiry textarea { font: 15px var(--f-body); padding: 12px 14px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 2px; width: 100%; }
.inquiry textarea { min-height: 130px; resize: vertical; }
.inquiry input:focus, .inquiry select:focus, .inquiry textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: transparent; }
.inquiry .note { font-size: 13px; color: var(--muted); }
.inquiry .status { padding: 14px 16px; font-size: 14px; background: var(--bg-alt); border-left: 3px solid var(--orange); }
.inquiry .status.ok { border-color: #1f8a4c; }
.hp-field { position: absolute; left: -9999px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .inquiry { grid-template-columns: 1fr; padding: 22px; } .ci div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--orange); color: #fff; }
.cta-band .wrap { padding-block: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 36px); }
.cta-band p { opacity: .9; margin-top: 6px; }
.cta-band .btn { background: var(--navy); color: #fff; }
.cta-band .btn:hover { background: var(--band-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--band-2); color: var(--on-dark-muted); font-size: 14px; }
.site-footer .wrap { padding-block: 56px 28px; }
.f-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.f-grid > * { min-width: 0; }
.f-grid img { height: 44px; width: auto; }
.f-grid h2 { font: 600 15px/1 var(--f-display); color: var(--on-dark); letter-spacing: .06em; text-transform: uppercase; margin: 6px 0 16px; }
.f-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.f-grid a { text-decoration: none; }
.f-grid a:hover { color: var(--on-dark); }
.f-grid li { overflow-wrap: anywhere; }
.f-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 12px var(--f-mono); }
.f-bottom a { text-decoration: none; }
@media (max-width: 860px) { .f-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .f-grid { grid-template-columns: 1fr; } }

/* ---------- Contact links in top bar ---------- */
.topbar a { text-decoration: none; }
.topbar a:hover b { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  --wa: #25d366;
  position: fixed; z-index: 70;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 20px 0 15px; border-radius: 28px;
  background: var(--wa); color: #fff; text-decoration: none;
  font: 600 15px/1 var(--f-body);
  box-shadow: 0 8px 24px rgba(14, 39, 71, .25);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.wa-float:hover { background: #1ebe5b; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(14, 39, 71, .3); }
.wa-float:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
@media (max-width: 640px) {
  .wa-float { width: 56px; padding: 0; justify-content: center; }
  .wa-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
/* Keep the footer's last line clear of the button */
.site-footer .wrap { padding-bottom: 96px; }

/* ---------- About: product categories & industries ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cat-box { background: var(--surface); padding: 26px 28px; min-width: 0; }
.cat-box h3 { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.cat-box h3::before { content: ""; width: 8px; height: 8px; background: var(--orange); flex: none; }
.cat-box h3 a { text-decoration: none; }
.cat-box h3 a:hover { color: var(--orange-ink); }
.cat-box ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
.cat-box p { margin-top: 10px; color: var(--muted); }
.cat-box-custom { grid-column: 1 / -1; background: var(--bg-alt); }
@media (max-width: 700px) { .cat-grid { grid-template-columns: 1fr; } }

.industry-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.industry-list li { border-top: 3px solid var(--navy-2); padding-top: 18px; display: grid; gap: 8px; }
.industry-list li:first-child { border-color: var(--orange); }
.industry-list b { font: 600 20px/1.2 var(--f-display); }
.industry-list span { color: var(--muted); font-size: 15px; }

/* Odd number of type cards: let the last one span the row */
.variants > .variant:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- Parts catalog ---------- */
.parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; }
.part { display: flex; flex-direction: column; gap: 10px; min-width: 0; scroll-margin-top: calc(var(--header-h) + 24px); }
.part-img { aspect-ratio: 4 / 3; max-width: 100%; background: var(--bg-alt); border: 1px solid var(--line); overflow: hidden; margin-bottom: 6px; }
.part-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.part-ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px; background-position: center;
}
.part-ph span { font: 600 44px/1 var(--f-display); color: var(--navy-2); background: var(--bg-alt); padding: 6px 14px; border: 2px solid var(--orange); }
.part-no { font: 500 12px/1 var(--f-mono); color: var(--orange-ink); letter-spacing: .08em; }
.part h2 { font-size: 21px; font-weight: 600; }
.part p { color: var(--muted); font-size: 15px; }
.part-actions { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.part-actions .btn { padding: 10px 14px; font-size: 13px; }
.part:target .part-img { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.kw a { text-decoration: none; color: inherit; }
.kw a:hover { color: var(--on-dark); }
.cat-box ul a { color: inherit; text-decoration: none; }
.cat-box ul a:hover { color: var(--orange-ink); text-decoration: underline; }
@media (max-width: 1000px) { .parts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .parts { grid-template-columns: 1fr; } }

/* Products hub: catalog sections */
.hub-cat + .hub-cat { margin-top: 56px; }
.hub-cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--navy); padding-bottom: 12px; margin-bottom: 20px; }
.hub-cat-head h2 { font-size: clamp(24px, 3vw, 32px); }
.hub-cat-head a { font-weight: 600; color: var(--orange-ink); }
.hub-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 24px; }
.hub-list li { border-bottom: 1px solid var(--line); min-width: 0; }
.hub-list a { display: flex; gap: 12px; padding: 12px 0; text-decoration: none; }
.hub-list a:hover b { color: var(--orange-ink); }
.hub-list span { font: 500 12px/1.6 var(--f-mono); color: var(--muted); flex: none; }
.hub-list b { font-weight: 500; }
@media (max-width: 1000px) { .hub-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .hub-list { grid-template-columns: 1fr; } }

.submenu-sep { height: 1px; background: var(--line); margin: 6px 16px; }
@media (max-width: 960px) { .submenu-sep { margin: 6px 0; } }

/* Three-column catalog boxes on the home page */
.cat-grid.three { grid-template-columns: repeat(3, 1fr); }
.cat-box-more { display: inline-block; margin-top: 16px; font-weight: 600; font-size: 14px; color: var(--orange-ink); }
@media (max-width: 900px) { .cat-grid.three { grid-template-columns: 1fr; } }

/* Line drawings in the parts catalog (src/data/part-icons.ts) */
.part-img:has(.part-svg) { background: var(--surface); }
.part-svg { width: 100%; height: 100%; display: block; padding: 6%; fill: none; stroke: var(--draw); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.part-svg .a { stroke: var(--orange); }
.part-svg .f { fill: var(--bg-alt); }
.part-svg .t { stroke-width: 1.2; }
.part-svg .bg { stroke: var(--surface); }
