/* Layout concept: a supplier-facing spec sheet. Left-aligned, ruled rows, mono labels, one dark ink band for the hero. */
:root {
  --bg: #f2f5f4;
  --surface: #ffffff;
  --surface-2: #e6ecea;
  --fg: #0f2329;
  --fg-muted: #4a5f64;
  --line: #c6d2cf;
  --link: #0b5c66;
  --accent: #e2a62a;
  --accent-hover: #efb840;
  --on-accent: #0f2329;
  --focus: #0b5c66;
  --hero-bg: #0f2a31;
  --hero-fg: #eef4f3;
  --hero-muted: #a9bfc2;
  --hero-line: rgba(238, 244, 243, 0.2);
  --hero-grid: rgba(238, 244, 243, 0.05);
  --font-display: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1a1f;
    --surface: #12262c;
    --surface-2: #19323a;
    --fg: #e6eeed;
    --fg-muted: #9fb3b6;
    --line: #2a434b;
    --link: #6cc3cc;
    --accent: #e8b23a;
    --accent-hover: #f3c458;
    --on-accent: #0b1a1f;
    --focus: #6cc3cc;
    --hero-bg: #081418;
    --hero-fg: #e6eeed;
    --hero-muted: #9fb3b6;
    --hero-line: rgba(230, 238, 237, 0.2);
    --hero-grid: rgba(230, 238, 237, 0.045);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1a1f;
  --surface: #12262c;
  --surface-2: #19323a;
  --fg: #e6eeed;
  --fg-muted: #9fb3b6;
  --line: #2a434b;
  --link: #6cc3cc;
  --accent: #e8b23a;
  --accent-hover: #f3c458;
  --on-accent: #0b1a1f;
  --focus: #6cc3cc;
  --hero-bg: #081418;
  --hero-fg: #e6eeed;
  --hero-muted: #9fb3b6;
  --hero-line: rgba(230, 238, 237, 0.2);
  --hero-grid: rgba(230, 238, 237, 0.045);
  color-scheme: dark;
}

/* Language switching: English shows by default, Spanish when html[data-lang="es"] */
html:not([data-lang="es"]) [data-l="es"] { display: none !important; }
html[data-lang="es"] [data-l="en"] { display: none !important; }

/* Base */
:root { padding-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; text-wrap: balance; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; max-width: 65ch; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 4px; z-index: 50; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  padding: 0.85em 1.4em;
  border-radius: 4px;
  border: 1.5px solid transparent;
  background: var(--accent); color: var(--on-accent);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.small { font-size: 0.9rem; padding: 0.6em 1em; }
.btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn[aria-disabled="true"]:hover { background: transparent; }
.on-dark .btn.secondary { color: var(--hero-fg); border-color: var(--hero-fg); }
.on-dark .btn.secondary:hover { background: rgba(238, 244, 243, 0.1); }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding-block: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand svg { color: var(--accent); width: 22px; height: 22px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; letter-spacing: 0.14em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; order: 3; width: 100%; }
.site-nav a {
  color: var(--fg); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--fg-muted); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 600; }
.lang { display: inline-flex; border: 1.5px solid var(--fg); border-radius: 4px; overflow: hidden; }
.lang button {
  font: inherit; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em;
  background: transparent; color: var(--fg); border: 0; padding: 7px 12px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.lang button + button { border-left: 1.5px solid var(--fg); }
@media (min-width: 960px) {
  .site-nav { order: 0; width: auto; gap: 4px 28px; }
  .site-header .wrap { flex-wrap: nowrap; }
}

/* Hero */
.hero {
  background-color: var(--hero-bg);
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--hero-fg);
  padding-block: clamp(48px, 8vw, 104px);
}
.hero .grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 40px 64px; align-items: end; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 600; }
.hero .lead { margin-top: 24px; font-size: 1.2rem; color: var(--hero-fg); max-width: 52ch; }
.hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.brief { border: 1px solid var(--hero-line); background: rgba(238, 244, 243, 0.05); padding: 20px 22px 8px; }
.brief .mono-label { color: var(--hero-muted); }
.brief dl { margin: 14px 0 0; }
.brief .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--hero-line); font-size: 0.95rem; }
.brief dt { color: var(--hero-muted); }
.brief dd { margin: 0; font-weight: 500; }
@media (max-width: 860px) { .hero .grid { grid-template-columns: minmax(0, 1fr); } }

/* Sections */
.section { padding-block: clamp(44px, 6vw, 88px); border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 20px 64px; }
.split h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }

.index { list-style: none; margin: 28px 0 32px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 1px solid var(--line); }
.index li { border-bottom: 1px solid var(--line); }
.index a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 0; color: var(--fg); text-decoration: none; font-weight: 500;
}
.index a::after { content: "\2192"; color: var(--fg-muted); transition: transform 0.15s ease, color 0.15s ease; }
.index a:hover { color: var(--link); }
.index a:hover::after { transform: translateX(4px); color: var(--link); }
@media (max-width: 700px) { .index { grid-template-columns: minmax(0, 1fr); } }

.ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; margin-top: 28px; }
.ops > div { border-top: 2px solid var(--fg); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 700px) { .ops { grid-template-columns: minmax(0, 1fr); } }

.cta-band { background: var(--surface-2); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.cta-band h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta-band p { margin-top: 10px; }

/* Page title block */
.page-head { padding-block: clamp(40px, 6vw, 80px) clamp(24px, 3vw, 40px); }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.page-head p { margin-top: 20px; font-size: 1.1rem; }
.page-head .jump { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.88rem; font-weight: 500; text-decoration: none; color: var(--fg);
  border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 4px;
}
.chip:hover { border-color: var(--fg); }

/* Industries */
.industry {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 56px;
  padding-block: 40px; border-top: 1px solid var(--line); scroll-margin-top: 120px;
}
.industry h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.industry .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.industry .context { margin-top: 14px; color: var(--fg-muted); }
.tag {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--fg-muted); padding: 3px 9px; border-radius: 3px; font-weight: 500;
}
.tag.exploring { border-color: var(--accent); color: var(--fg); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.items { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--line); }
.items li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.98rem; }
@media (max-width: 860px) { .industry { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 32px; } }
@media (max-width: 560px) { .items { grid-template-columns: minmax(0, 1fr); } }
.new-products { background: var(--surface-2); }
.new-products .inner { max-width: 70ch; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.new-products h2 { font-size: 1.35rem; }

/* About */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 760px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.steps li::before { content: counter(step); font-family: var(--font-mono); font-weight: 500; color: var(--fg-muted); font-size: 0.95rem; }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 8px; }
@media (max-width: 760px) { .people { grid-template-columns: minmax(0, 1fr); } }
.person { background: var(--surface); border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.person .top { display: flex; gap: 16px; align-items: center; }
.monogram {
  width: 56px; height: 56px; flex: none; border-radius: 50%;
  background: var(--hero-bg); color: var(--accent);
  display: grid; place-items: center; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.04em;
}
.person h3 { font-size: 1.35rem; }
.person .role { font-size: 0.98rem; font-weight: 500; }
.person .where { font-size: 0.9rem; color: var(--fg-muted); }
.person .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Dialogs */
dialog { border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 24px; width: min(92vw, 380px); border-radius: 6px; }
dialog::backdrop { background: rgba(8, 20, 24, 0.6); }
dialog .close-row { display: flex; justify-content: flex-end; margin: -8px -8px 0 0; }
dialog .close { font: inherit; font-size: 1.6rem; line-height: 1; background: transparent; border: 0; color: var(--fg); cursor: pointer; padding: 4px 10px; }
dialog h3 { font-size: 1.3rem; }
dialog .role { margin-top: 4px; font-size: 0.95rem; color: var(--fg-muted); }
.qr-frame { background: #ffffff; padding: 20px; margin: 18px 0 12px; display: grid; place-items: center; border: 1px solid var(--line); }
.qr-frame img { display: block; width: 100%; max-width: 290px; height: auto; }
dialog .caption { font-size: 0.95rem; }
.card-lines { margin: 16px 0; padding: 12px 14px; background: var(--surface-2); font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
dialog .note { font-size: 0.88rem; color: var(--fg-muted); margin-top: 12px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 72px; padding-block: clamp(40px, 6vw, 80px); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-grid h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.contact-grid .intro { margin-top: 20px; font-size: 1.1rem; }
.contact-grid .direct { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.98rem; }
.form { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .opt { font-weight: 400; color: var(--fg-muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--fg); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 4px; padding: 0.7em 0.8em; width: 100%; min-width: 0;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--fg-muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--fg); }
.field textarea { min-height: 110px; resize: vertical; }
.field .help { font-size: 0.88rem; color: var(--fg-muted); max-width: 60ch; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 560px) { .two { grid-template-columns: minmax(0, 1fr); } }
.status { padding: 14px 16px; border: 1.5px solid var(--fg); background: var(--surface); font-weight: 500; }
.status.error { border-color: #b3261e; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Footer */
.site-footer { background: var(--hero-bg); color: var(--hero-fg); padding-block: 48px 40px; margin-top: 0; }
.site-footer .grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: 28px 64px; }
.site-footer p { color: var(--hero-fg); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-content: flex-start; }
.site-footer a { color: var(--hero-fg); text-underline-offset: 3px; font-size: 0.95rem; }
.site-footer .legal { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--hero-line); font-size: 0.85rem; color: var(--hero-muted); max-width: none; }
@media (max-width: 760px) { .site-footer .grid { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---- Refresh: motion, WeChat-first contact, route diagram ---- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; }
.site-header { view-transition-name: site-header; }

.head-actions { display: flex; align-items: center; gap: 12px; }
.wechat-btn { display: none; }
@media (min-width: 960px) { .wechat-btn { display: inline-flex; } }

.route { display: block; width: 100%; height: auto; margin: 0 0 12px; }
.route .arc { fill: none; stroke-linecap: round; }
.route .arc.base { stroke: var(--hero-line); stroke-width: 1.5; }
.route .arc.flow { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 1 11; }
.route .node { fill: var(--hero-bg); stroke: var(--accent); stroke-width: 2; }
.route .node.src { fill: var(--accent); }
.route text { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; fill: var(--hero-muted); font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
  .route .arc.flow { animation: flow 2.4s linear infinite; }
  @keyframes flow { to { stroke-dashoffset: -48; } }
}

.actions-row { display: flex; flex-wrap: wrap; gap: 12px; }

.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--bg); border-top: 1px solid var(--line);
}
.bottom-bar .btn { padding-inline: 0.6em; font-size: 0.95rem; }
@media (min-width: 960px) { .bottom-bar { display: none; } }
@media (max-width: 959px) { .site-footer { padding-bottom: calc(40px + 76px + env(safe-area-inset-bottom, 0px)); } }

dialog.wide { width: min(94vw, 600px); max-height: 92vh; overflow: auto; }
.qr-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0 12px; }
@media (max-width: 340px) { .qr-cards { grid-template-columns: minmax(0, 1fr); } }
.qr-cards .qr-frame { padding: 10px; }
.qr-cards { gap: 12px; }
.qr-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.qr-card .qr-frame { margin: 0; }
.qr-card .qr-frame img { max-width: 220px; }
.qr-card figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 0.92rem; }
.qr-card figcaption strong { font-size: 1.02rem; }
.qr-card figcaption span { color: var(--fg-muted); }
.wechat-block { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.wechat-block h2 { font-size: 1.3rem; }
.wechat-block .help-text { font-size: 0.88rem; color: var(--fg-muted); }
.actions-row .btn { white-space: normal; }
