/* ==========================================================================
   Hundredtree Rubber — Industrial Specification Design System
   Tokens, layout architecture, interactive modules, and catalog pages.
   ========================================================================== */

:root {
  /* Core Palette (6 named architectural tones + states) */
  --ink: #0b1724;
  --ink-soft: #1d2f42;
  --ink-panel: #122336;
  --brand: #0870b8;
  --brand-dark: #065894;
  --brand-hover: #044676;
  --surface: #ffffff;
  --canvas: #f4f7fa;
  --canvas-deep: #e9eff5;
  --border: #d7e1eb;
  --border-strong: #b9c9d8;
  --muted: #4a5e72;
  --on-dark: #eef4fa;
  --on-dark-muted: #9eb3c7;
  --on-dark-border: rgba(215, 225, 235, 0.16);

  /* Typography */
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Geometry & Rhythm */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --gutter: clamp(20px, 4vw, 56px);
  --container-max: 1320px;
  --section-py: clamp(64px, 7.5vw, 108px);
  --header-h: 72px;

  /* Elevation & Motion */
  --shadow-sm: 0 1px 2px rgba(11, 23, 36, 0.05);
  --shadow-md: 0 12px 32px rgba(11, 23, 36, 0.08);
  --shadow-dialog: 0 24px 64px rgba(8, 18, 29, 0.34);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
  font-family: var(--font-sans);
  color: var(--ink-soft);
  background: var(--surface);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:root[lang="zh-CN"] {
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", monospace;
}

html[lang="zh-CN"] :is(h1, h2, h3) {
  letter-spacing: normal;
  line-height: 1.28;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.62;
  background: var(--surface);
  color: var(--ink-soft);
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  letter-spacing: -0.028em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 4.2vw, 3.85rem);
  line-height: 1.06;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.75rem, 2.7vw, 2.5rem);
  line-height: 1.14;
  font-weight: 750;
}

h3 {
  font-size: clamp(1.125rem, 1.45vw, 1.32rem);
  line-height: 1.25;
  font-weight: 700;
}

p {
  max-width: 64ch;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

::selection {
  background: rgba(8, 112, 184, 0.16);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

section[id],
div[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* Utilities & Primitives */
.container {
  width: min(calc(100% - var(--gutter) * 2), var(--container-max));
  margin-inline: auto;
}

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.mono {
  font-family: var(--font-mono);
}

.skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--surface);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 100;
}

.skip-link:focus {
  transform: none;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.2;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.button.primary {
  background: var(--brand-dark);
  color: var(--surface);
}

.button.primary:hover {
  background: var(--brand-hover);
}

.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.button.secondary:hover {
  background: var(--canvas);
  border-color: var(--ink);
}

.button.dark {
  background: var(--ink);
  color: var(--surface);
}

.button.dark:hover {
  background: var(--ink-panel);
}

.button.white {
  background: var(--surface);
  color: var(--ink);
}

.button.white:hover {
  background: var(--canvas-deep);
}

.button.ghost-dark {
  background: transparent;
  color: var(--on-dark);
  border-color: var(--on-dark-border);
}

.button.ghost-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 1.15rem;
  flex: none;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.icon-button:hover {
  background: var(--canvas);
  border-color: var(--border);
  color: var(--brand-dark);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--brand-dark);
  white-space: nowrap;
  transition: color 0.16s var(--ease);
}

.text-link:hover {
  color: var(--brand-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ==========================================================================
   Utility Strip & Sticky Header
   ========================================================================== */

.utility {
  background: var(--ink);
  color: var(--on-dark-muted);
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
}

.utility a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--on-dark);
  font-weight: 500;
}

.utility a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.utility-scope {
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 32px);
  min-height: var(--header-h);
}

.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  width: clamp(168px, 14.5vw, 204px);
}

.brand img {
  width: 100%;
  height: auto;
  aspect-ratio: 894 / 236;
  object-fit: contain;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 24px);
}

.primary-nav > a,
.nav-group summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding-inline: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  transition: color 0.16s var(--ease);
}

.primary-nav > a:hover,
.nav-group summary:hover,
.nav-group[open] summary {
  color: var(--brand-dark);
}

.nav-group {
  position: relative;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s var(--ease);
}

.nav-group[open] summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.nav-list {
  position: absolute;
  top: calc(100% + 6px);
  left: -12px;
  z-index: 50;
  min-width: 224px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--ink-soft);
}

.nav-list a:hover {
  background: var(--canvas);
  color: var(--brand-dark);
}

.nav-mobile-cta {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 5px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--brand-dark);
}

.language-link[lang="zh-CN"] {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

.language-link:hover {
  background: var(--canvas);
}

:is(button[data-quote], button[data-search], button.menu-button):disabled {
  cursor: wait;
  opacity: 0.65;
}

.menu-button {
  display: none;
}

/* ==========================================================================
   Hero — Full-Bleed Widescreen Industrial Banner
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #e6eff7;
  border-bottom: 1px solid var(--border);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(241, 246, 251, 0.84) 0%,
    rgba(241, 246, 251, 0.62) 32%,
    rgba(241, 246, 251, 0.14) 50%,
    transparent 62%
  );
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 52%;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: clamp(360px, 31.5vw, 468px);
  padding-block: clamp(44px, 4.8vw, 68px);
}

.hero-copy {
  width: min(50%, 550px);
  max-width: 550px;
}

.hero h1 {
  font-size: clamp(2.1rem, 3.35vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
  font-weight: 800;
  color: var(--ink);
}

html[lang="zh-CN"] .hero h1 span {
  display: inline-block;
}

.hero-subtitle {
  margin-top: 16px;
  font-size: clamp(0.98rem, 1.16vw, 1.12rem);
  line-height: 1.56;
  color: var(--ink-soft);
  max-width: 44ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-actions .button {
  min-height: 46px;
  padding-inline: 22px;
}

/* ==========================================================================
   Section Headers & Spacing
   ========================================================================== */

.section {
  padding-block: var(--section-py);
}

.section-compact {
  padding-block: clamp(42px, 4.5vw, 64px);
}

.section-canvas {
  background: var(--canvas);
  border-block: 1px solid var(--border);
}

.section-dark {
  background: var(--ink);
  color: var(--on-dark);
}

.section-dark h2,
.section-dark h3 {
  color: var(--surface);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 32px;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

.section-compact .section-header {
  margin-bottom: clamp(22px, 2.4vw, 30px);
}

.section-header p {
  margin-top: 8px;
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 58ch;
}

.section-dark .section-header p {
  color: var(--on-dark-muted);
}

/* ==========================================================================
   Product Categories — 6-Column Scannable Row on Desktop
   ========================================================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.product-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-media {
  aspect-ratio: 16 / 10;
  background: #edf2f7;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 0.32s var(--ease);
}

.product-card:hover .product-media img {
  transform: scale(1.07);
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 15px 16px;
}

.product-body h3 {
  font-size: 0.98rem;
  line-height: 1.25;
  margin-bottom: 6px;
  transition: color 0.16s var(--ease);
}

.product-card:hover .product-body h3 {
  color: var(--brand-dark);
}

.product-body p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.48;
}

/* ==========================================================================
   Material Options — 4-Column Clean High-Res Cards (#materials)
   ========================================================================== */

.materials-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.material-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.material-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.material-media {
  aspect-ratio: 16 / 9;
  background: var(--canvas-deep);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.material-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s var(--ease);
}

.material-card:hover .material-media img {
  transform: scale(1.05);
}

.material-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 18px;
}

.material-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 7px;
}

.material-code {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.16s var(--ease);
}

.material-card:hover .material-code {
  color: var(--brand-dark);
}

.material-sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.material-body p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Shared material facts grid (used on /catalog/nbr.html etc.) */
.material-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-block: 18px;
  border-block: 1px solid var(--border);
  margin-bottom: 20px;
}

.material-facts dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.material-facts dd {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

/* ==========================================================================
   Application Industries — 4-Column Crisp Editorial Cards (Zero Clipping)
   ========================================================================== */

.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.industry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 224px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--border);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.industry-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.industry-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s var(--ease);
}

.industry-card:hover img {
  transform: scale(1.05);
}

.industry-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11, 23, 36, 0.94) 0%,
    rgba(11, 23, 36, 0.56) 46%,
    rgba(11, 23, 36, 0.1) 100%
  );
  pointer-events: none;
}

.industry-content {
  position: relative;
  z-index: 2;
  padding: 18px 20px;
  color: var(--surface);
}

.industry-content h3 {
  color: var(--surface);
  font-size: 1.12rem;
  margin-bottom: 4px;
}

.industry-content p {
  font-size: 0.84rem;
  color: #d6e3f0;
  line-height: 1.44;
}

.industry-card:hover .industry-content h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ==========================================================================
   OEM / ODM Custom Manufacturing & Quality Control (Dark Architectural Band)
   ========================================================================== */

.process-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--on-dark-border);
  border-bottom: 1px solid var(--on-dark-border);
}

.process-step {
  padding: 28px 22px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.process-step + .process-step {
  padding-left: 22px;
  border-left: 1px solid var(--on-dark-border);
}

.process-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #6ab9f2;
  font-weight: 500;
}

.process-step h3 {
  font-size: 1.05rem;
  color: var(--surface);
}

.process-step p {
  font-size: 0.87rem;
  line-height: 1.52;
  color: var(--on-dark-muted);
}

.quality-block {
  margin-top: clamp(48px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.quality-copy p {
  margin-top: 14px;
  color: var(--on-dark-muted);
  font-size: 0.98rem;
}

.quality-points {
  margin-top: 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.quality-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--on-dark);
}

.quality-points .icon {
  color: #6ab9f2;
  margin-top: 3px;
}

.quality-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.quality-figure {
  background: var(--ink-panel);
  border: 1px solid var(--on-dark-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.quality-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.quality-figure figcaption {
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--on-dark-muted);
  line-height: 1.4;
}

.quality-disclaimer {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--on-dark-muted);
  opacity: 0.85;
}

/* ==========================================================================
   Engineering Resources — Editorial Hairline Index (No Box Clutter)
   ========================================================================== */

.resources-split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.resources-intro p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1rem;
}

.resources-intro .text-link {
  margin-top: 20px;
}

.resources-list {
  border-top: 1px solid var(--border);
}

.resource-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 12px 24px;
  align-items: center;
  padding: 22px 12px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.16s var(--ease);
}

.resource-row:hover {
  background: var(--canvas);
}

.resource-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.resource-row strong {
  display: block;
  font-size: 1.08rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.resource-row span.resource-desc {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.48;
}

.resource-action {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--brand-dark);
  white-space: nowrap;
}

.resource-row:hover .resource-action {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   RFQ Callout Band (#contact)
   ========================================================================== */

.rfq-section {
  padding-block: 0 clamp(64px, 7vw, 96px);
}

.rfq-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto;
  gap: 28px 48px;
  align-items: center;
  padding: clamp(32px, 4.5vw, 56px);
  background: linear-gradient(135deg, var(--ink) 0%, #0f2942 100%);
  color: var(--surface);
  border-radius: var(--radius-lg);
}

.rfq-card h2 {
  color: var(--surface);
  font-size: clamp(1.6rem, 2.5vw, 2.25rem);
}

.rfq-card p {
  margin-top: 12px;
  color: var(--on-dark-muted);
  font-size: 1rem;
  max-width: 54ch;
}

.rfq-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   Footer — Clean Dark Architecture (Transparent Brand Lockup)
   ========================================================================== */

.site-footer {
  background: #08121d;
  color: var(--on-dark-muted);
  padding-block: clamp(52px, 6vw, 76px) 32px;
  border-top: 1px solid var(--on-dark-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.55fr) repeat(4, minmax(0, 1fr)) minmax(180px, 1.15fr);
  gap: 32px 24px;
  align-items: start;
}

.footer-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-brand-lockup img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: none;
}

.footer-brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.footer-brand-cn {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--surface);
  letter-spacing: 0.08em;
}

.footer-brand-en {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--on-dark-muted);
  letter-spacing: 0.06em;
  margin-top: 3px;
}

.footer-profile p {
  margin-top: 16px;
  font-size: 0.88rem;
  line-height: 1.58;
  color: var(--on-dark-muted);
  max-width: 30ch;
}

.footer-col h3 {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--surface);
  letter-spacing: 0;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 0.875rem;
  color: var(--on-dark-muted);
  transition: color 0.15s var(--ease);
}

.footer-col a:hover {
  color: var(--surface);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact-cta {
  margin-top: 16px;
}

.footer-contact-cta .button {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.86rem;
}

.footer-bottom {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--on-dark-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 0.8rem;
  color: #7f96ad;
}

/* ==========================================================================
   Dialogs — Search & RFQ Draft Builder
   ========================================================================== */

dialog {
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(640px, calc(100% - 28px));
  max-height: calc(100dvh - 32px);
  box-shadow: var(--shadow-dialog);
  overflow: auto;
}

dialog::backdrop {
  background: rgba(8, 18, 29, 0.62);
  backdrop-filter: blur(4px);
}

body:has(dialog[open]) {
  overflow: hidden;
}

.dialog-content {
  padding: clamp(22px, 3.5vw, 34px);
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.dialog-heading h2 {
  font-size: 1.4rem;
}

.dialog-intro {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 22px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 6px;
}

.field label span {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.35;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

/* Custom select appearance — prevents Chromium ::picker-icon wrap glitch */
.field select {
  display: inline-flex;
  align-items: center;
  appearance: none;
  -webkit-appearance: none;
  height: 44px;
  padding-right: 38px;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231d2f42' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.field select::picker-icon {
  display: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(8, 112, 184, 0.18);
}

.field textarea {
  resize: vertical;
  min-height: 108px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.form-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

#quote-status:empty {
  display: none;
}

#quote-status {
  padding: 10px 12px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 500;
}

.search-results {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  max-height: min(46vh, 380px);
  overflow: auto;
  border-top: 1px solid var(--border);
}

.search-results a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.14s var(--ease);
}

.search-results a:hover,
.search-results a:focus-visible {
  background: var(--canvas);
}

.search-results strong {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
}

.search-results span.search-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.search-results small {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--brand-dark);
  background: #e8f3fb;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  flex: none;
}

/* ==========================================================================
   Catalog Index & Detail Pages (Generated via scripts/build-catalog.mjs)
   ========================================================================== */

.catalog-page {
  padding-block: clamp(32px, 4.5vw, 56px) clamp(64px, 7vw, 100px);
}

.breadcrumb {
  margin-bottom: 28px;
  font-size: 0.86rem;
  color: var(--muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--border-strong);
}

.breadcrumb a {
  color: var(--brand-dark);
}

.breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.catalog-hero {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.catalog-lede {
  margin-top: 14px;
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 60ch;
}

.catalog-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.catalog-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.catalog-jump a:hover {
  border-color: var(--brand);
  background: var(--canvas);
  color: var(--brand-dark);
}

.catalog-group {
  margin-top: clamp(40px, 5vw, 60px);
}

.catalog-group-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.catalog-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.catalog-card-media {
  aspect-ratio: 16 / 10;
  background: #edf2f7;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.catalog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.catalog-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.catalog-card-body strong {
  font-size: 1.04rem;
  color: var(--ink);
}

.catalog-card-body p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.48;
}

.catalog-card-text {
  background: var(--canvas);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: start;
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
}

.detail-guide {
  grid-template-columns: minmax(0, 72ch);
}

.detail-type {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: #e8f3fb;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.detail-specs {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.detail-specs h2 {
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.detail-checklist {
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 28px;
}

.detail-photo {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transform: scale(1.02);
}

.detail-photo figcaption {
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Responsive Breakpoints (1200px / 1160px / 1024px / 768px / 640px)
   ========================================================================== */

@media (max-width: 1160px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .process-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .process-step:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }

  .process-step:nth-child(n + 4) {
    border-top: 1px solid var(--on-dark-border);
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-profile {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1200px) {
  .menu-button {
    display: inline-grid;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    padding: 16px var(--gutter) 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100dvh - var(--header-h));
    overflow: auto;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav > a,
  .nav-group summary {
    width: 100%;
    justify-content: space-between;
    padding: 10px 4px;
    font-size: 0.96rem;
    border-bottom: 1px solid var(--canvas-deep);
  }

  .nav-list {
    position: static;
    min-width: 0;
    border: 0;
    box-shadow: none;
    background: var(--canvas);
    margin: 6px 0 10px;
  }

  .nav-mobile-cta {
    display: flex;
    margin-top: 14px;
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .hero-copy {
    width: min(56%, 540px);
  }

  .hero-media::after {
    background: linear-gradient(
      90deg,
      rgba(241, 246, 251, 0.9) 0%,
      rgba(241, 246, 251, 0.72) 42%,
      rgba(241, 246, 251, 0.16) 62%,
      transparent 74%
    );
  }

  .materials-grid,
  .industry-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quality-block,
  .resources-split,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rfq-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .hero {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #f3f7fb 0%, #e7f0f8 100%);
  }

  .hero-layout {
    order: -1;
    min-height: auto;
    padding-block: 36px 28px;
  }

  .hero-copy {
    width: 100%;
    max-width: none;
  }

  .hero-media {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 8.5;
    max-height: 320px;
    border-top: 1px solid var(--border);
  }

  .hero-media::after {
    content: none;
  }

  .hero-media img {
    object-position: 86% 55%;
  }
}

@media (max-width: 768px) {
  .utility-scope {
    display: none;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .process-step,
  .process-step + .process-step {
    padding: 20px 0;
    border-left: 0;
    border-top: 1px solid var(--on-dark-border);
  }

  .process-step:first-child {
    border-top: 0;
  }

  .resource-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-inline: 0;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .header-quote {
    display: none;
  }

  .brand {
    width: 158px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-body {
    padding: 12px;
  }

  .materials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .material-body {
    padding: 12px 13px 14px;
  }

  .material-head {
    flex-direction: column;
    gap: 2px;
  }

  .catalog-grid,
  .industry-grid,
  .quality-gallery {
    grid-template-columns: 1fr;
  }

  .industry-card {
    min-height: 210px;
  }

  .material-facts,
  .field-row {
    grid-template-columns: 1fr;
  }

  .form-actions .button {
    flex: 1 1 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .brand {
    width: clamp(116px, 36vw, 144px);
  }

  .nav-wrap {
    gap: 8px;
  }

  .nav-actions {
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
