/* Mill-turn machine site - industrial B2B styles */

:root {
  --ink: #0c1a26;
  --ink-2: #1c2e3d;
  --muted: #5c6d7c;
  --line: #dce3e9;
  --line-soft: #ebeff2;
  --bg: #ffffff;
  --bg-soft: #f4f7f9;
  --bg-dark: #0c1a26;
  --brand: #0a5da8;
  --brand-dark: #073d72;
  --brand-soft: #e8f1fa;
  --accent: #e2622b;
  --accent-soft: #fdf0e9;
  --ok: #1a7a52;
  --ok-soft: #e9f5ef;
  --warn: #a45b09;
  --warn-soft: #fdf4e5;
  --danger: #b3392c;
  --danger-soft: #fbeceb;
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(12, 26, 38, .06), 0 4px 16px rgba(12, 26, 38, .04);
  --shadow-md: 0 12px 40px rgba(12, 26, 38, .10);
  --wrap: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.28; letter-spacing: -.01em; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 12px; top: 12px; }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }
.narrow { width: min(860px, calc(100% - 48px)); margin-inline: auto; }
.section { padding: 82px 0; }
.section.tight { padding: 56px 0; }
/* A content section directly after the page-head band: avoid doubled vertical padding. */
.section.adjacent { padding-top: 44px; }
.section.soft { background: var(--bg-soft); }
.section.dark { background: var(--bg-dark); color: #e8eef3; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark p { color: #b6c5d1; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 800; color: var(--accent); margin: 0 0 14px; }
.eyebrow.blue { color: var(--brand); }
.lede { font-size: 1.07rem; color: var(--muted); max-width: 720px; }
.section-head { margin-bottom: 42px; }
.section-head .lede { margin-bottom: 0; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ---------- compliance ribbon ---------- */
.ribbon { background: var(--ink); color: #d7e2ea; font-size: .8rem; }
.ribbon .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 0; flex-wrap: wrap; }
.ribbon strong { color: #fff; font-weight: 700; }
.ribbon a { color: #ffc49f; text-decoration: underline; text-underline-offset: 2px; }
.ribbon .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; flex: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.site-nav a { padding: 9px 13px; font-size: .9rem; font-weight: 600; color: var(--ink-2); border-radius: 4px; white-space: nowrap; }
.site-nav a:hover { background: var(--bg-soft); color: var(--brand); }
.site-nav a.active { color: var(--brand); background: var(--brand-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.lang-switch button { border: 0; background: #fff; color: var(--muted); font: inherit; font-size: .76rem; font-weight: 700; padding: 6px 9px; cursor: pointer; }
.lang-switch button.is-on { background: var(--ink); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius); padding: 11px 20px; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #c9501d; color: #fff; box-shadow: var(--shadow-md); }
.btn-blue { background: var(--brand); color: #fff; }
.btn-blue:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost-light { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .82rem; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 4px; width: 40px; height: 38px; cursor: pointer; font-size: 1.1rem; color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #0c1a26 0%, #12304b 58%, #0a3d69 100%); color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(110deg, #000 10%, transparent 78%); }
.hero::after { content: ""; position: absolute; right: -160px; top: -140px; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(226,98,43,.20), transparent 68%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 88px 0 92px; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero .kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #ffc49f; border: 1px solid rgba(255,196,159,.35); padding: 6px 12px; border-radius: 99px; margin-bottom: 22px; }
.hero .lede { color: #c3d4e1; font-size: 1.08rem; max-width: 540px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.hero .actions { gap: 12px; margin-top: 30px; }
.hero-visual { position: relative; background: #f3f6f9; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.hero-visual img { width: 100%; display: block; border-radius: 6px; }
.visual-caption { text-align: right; font-size: .72rem; color: #8fa8bb; margin-top: 6px; }
.hero-note { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.16); font-size: .8rem; color: #9fb6c7; max-width: 560px; }

/* ---------- kpi ---------- */
.kpi-band { background: #fff; border-bottom: 1px solid var(--line); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 30px 24px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi b { display: block; font-size: 1.7rem; line-height: 1.15; color: var(--brand); font-variant-numeric: tabular-nums; }
.kpi b.accent { color: var(--accent); }
.kpi span { font-size: .83rem; color: var(--muted); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm); }
.card .icon { width: 42px; height: 42px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.card .icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }
.card-num { font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: var(--accent); display: block; margin-bottom: 12px; }
.feature-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.feature-list li:last-child { border-bottom: 0; }
.feature-list .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: .72rem; font-weight: 900; margin-top: 3px; }
.feature-list b { display: block; font-size: .95rem; }
.feature-list span { color: var(--muted); font-size: .88rem; }
.illustration { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.illustration img { width: 100%; display: block; }

/* ---------- notice ---------- */
.notice { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; font-size: .9rem; margin: 22px 0; }
.notice.warn { border-color: var(--warn); background: var(--warn-soft); }
.notice.danger { border-color: var(--danger); background: var(--danger-soft); }
.notice.ok { border-color: var(--ok); background: var(--ok-soft); }
.notice strong { display: block; margin-bottom: 4px; }
.notice p { margin: 0; color: var(--ink-2); }
.notice.danger p { color: #6f2b22; }
.notice.warn p { color: #6b4312; }

/* ---------- table ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--bg-soft); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.group td { background: #f8fafc; font-weight: 800; color: var(--brand-dark); letter-spacing: .04em; }
td.val { font-family: var(--mono); font-size: .86rem; white-space: nowrap; }
.pending { display: inline-block; font-family: var(--font); font-size: .74rem; font-weight: 700; color: var(--warn); background: var(--warn-soft); border: 1px solid #f0d9ae; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.scroll-x { overflow-x: auto; }

/* ---------- badges, chips ---------- */
.badge { display: inline-block; font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; letter-spacing: .03em; }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.green { background: var(--ok-soft); color: var(--ok); }
.badge.blue { background: var(--brand-soft); color: var(--brand); }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- compliance levels ---------- */
.level-block { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; background: #fff; }
.level-head { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); background: #fff; flex-wrap: wrap; }
.level-head h3 { margin: 0; font-size: 1.02rem; }
.level-head .lvl-desc { color: var(--muted); font-size: .85rem; margin-left: auto; }
.level-body { padding: 18px 22px; }
.level-body p { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: .8rem; padding: 5px 11px; border-radius: 4px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-2); font-weight: 600; }
.level-block.l1 .level-head { border-left: 5px solid var(--danger); }
.level-block.l2 .level-head { border-left: 5px solid var(--warn); }
.level-block.l3 .level-head { border-left: 5px solid var(--ok); }
.level-block.l1 .chip { border-color: #f0cfcb; background: var(--danger-soft); color: #8b3227; }
.level-block.l2 .chip { border-color: #f0dcb6; background: var(--warn-soft); color: #80500f; }

/* ---------- process steps ---------- */
.steps { counter-reset: step; display: grid; gap: 0; }
.step { counter-increment: step; position: relative; padding: 0 0 26px 60px; border-left: 2px solid var(--line); margin-left: 17px; }
.step:last-child { border-left-color: transparent; padding-bottom: 0; }
.step::before { content: counter(step); position: absolute; left: -18px; top: -4px; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .84rem; font-weight: 800; }
.step b { display: block; font-size: 1rem; margin-bottom: 3px; }
.step p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 700; }
.field label .req { color: var(--danger); }
.field input, .field select, .field textarea { font: inherit; font-size: .92rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { min-height: 110px; resize: vertical; }
.field .hint { font-size: .76rem; color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 2px solid var(--brand-soft); }
.check-list { display: grid; gap: 12px; margin: 22px 0; }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: .87rem; }
.check input { margin-top: 5px; width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.check span { color: var(--ink-2); }
.form-foot { border-top: 1px solid var(--line); padding-top: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot small { color: var(--muted); font-size: .78rem; }
#compliance-alert { display: none; }
#compliance-alert.show { display: block; }
.form-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.form-aside { font-size: .88rem; color: var(--muted); }
.form-aside h3 { color: var(--ink); }
.form-aside ul { padding-left: 1.1em; }
.form-aside li { margin-bottom: 8px; }

/* ---------- faq ---------- */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "-"; }
.faq details p { font-size: .9rem; color: var(--muted); padding-bottom: 16px; margin: 0; }

/* ---------- cta band ---------- */
.cta-band { background: var(--brand-dark); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.95rem); }
.cta-inner p { color: #bfd5e8; margin: 6px 0 0; }

/* ---------- footer ---------- */
.site-footer { background: #091620; color: #a8bccb; padding: 62px 0 0; font-size: .87rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #b9cbd8; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand .brand-mark { width: 38px; height: 38px; }
.footer-brand b { color: #fff; font-size: 1.05rem; display: block; }
.footer-brand p { margin: 10px 0 0; max-width: 300px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0 26px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: .78rem; color: #7e96a8; }
.footer-bottom a { display: inline; color: #9db4c5; }

/* ---------- utility ---------- */
.mt-0 { margin-top: 0 !important; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-32 { margin-bottom: 32px; }
.mono { font-family: var(--mono); font-size: .86em; }
.small { font-size: .8rem; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 34px 0; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
.doc-list { display: grid; gap: 10px; margin: 20px 0; }
.doc-list div { display: flex; gap: 12px; align-items: baseline; font-size: .9rem; }
.doc-list .mono { color: var(--brand); flex: none; }

.contact-layout { display: grid; grid-template-columns: 1.65fr .85fr; gap: 38px; align-items: start; }
.form-aside .card { padding: 22px 20px; }

/* ---------- bilingual inline text ---------- */
.en-t { display: none; }
html[lang="en"] .zh-t { display: none; }
html[lang="en"] .en-t { display: inline; }
html[lang="en"] .lede, html[lang="en"] .card p, html[lang="en"] .feature-list span,
html[lang="en"] .small, html[lang="en"] .site-footer { letter-spacing: 0; }
#form-result { display: none; }
#form-result.show { display: block; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.pill-list .chip { font-size: .78rem; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding: 64px 0 70px; }
  .hero-visual { max-width: 620px; }
  .feature-split { grid-template-columns: 1fr; gap: 34px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 780px) {
  .wrap, .narrow { width: min(100% - 32px, 100%); }
  .nav-toggle { display: block; order: 3; }
  .header-actions { order: 2; margin-left: auto; }
  .header-actions .btn { display: none; }
  .site-nav { position: absolute; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 18px; display: none; box-shadow: var(--shadow-md); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 10px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 58px 0; }
  .section.tight { padding: 40px 0; }
  .section.adjacent { padding-top: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 26px; }
  .form-panel { padding: 22px 18px; }
  .level-head .lvl-desc { margin-left: 0; width: 100%; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .ribbon .wrap { font-size: .72rem; }
  .kpi { padding: 22px 14px; }
  .kpi b { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
