/* ============================================================
   Huachen / SUPERSTOP — site styles
   Minimal editorial system: paper, ink, one copper accent.
   ============================================================ */

:root {
  --ink: #15171a;
  --ink-2: #3a3d42;
  --muted: #77736c;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #e6e2da;
  --line-strong: #d5d0c6;
  --accent: #a4552f;
  --accent-soft: rgba(164, 85, 47, 0.07);
  --max: 1160px;
  --pad: clamp(20px, 5vw, 48px);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "liga" 1;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- typography ---------- */

.eyebrow {
  margin: 0 0 22px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.028em; }

h1 {
  font-size: clamp(38px, 6.2vw, 74px);
  line-height: 1.04;
}

h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.14;
}

h3 {
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.012em;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(17px, 1.55vw, 19px);
  line-height: 1.68;
  color: var(--ink-2);
  max-width: 52ch;
}

.small { font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.accent { color: var(--accent); }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 74px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-right: auto;
}
.brand-mark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand-sub {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav a {
  font-size: 14px;
  color: var(--ink-2);
  padding: 6px 0;
  position: relative;
  transition: color 0.25s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }

.head-cta { margin-left: 8px; }

/* buttons */

.btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  border-radius: 2px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn .arrow,
.btn-ghost .arrow { transition: transform 0.3s ease; }
.btn:hover .arrow,
.btn-ghost:hover .arrow { transform: translateX(4px); }

/* mobile toggle */

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 2px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

/* ---------- sections ---------- */

section { padding: clamp(64px, 9vw, 128px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.bg-surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bg-ink { background: var(--ink); color: var(--paper); }
.bg-ink .eyebrow { color: rgba(251, 250, 247, 0.55); }
.bg-ink .eyebrow::after { background: rgba(251, 250, 247, 0.18); }
.bg-ink .lede { color: rgba(251, 250, 247, 0.78); }

.section-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head .lede { margin-bottom: 4px; }

/* ---------- hero ---------- */

.hero { padding: clamp(80px, 11vw, 156px) 0 clamp(56px, 7vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.hero h1 { max-width: 17ch; }
.hero .lede { margin-top: 30px; }
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.hero-aside {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.hero-aside dl { margin: 0; }
.hero-aside dt {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-aside dd {
  margin: 4px 0 22px;
  font-size: 15px;
  line-height: 1.5;
}
.hero-aside dd:last-child { margin-bottom: 0; }

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 34px 26px 34px 0;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat .figure {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat .figure sup {
  font-size: 0.5em;
  top: -0.65em;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 2px;
}
.stat .label {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 20ch;
}

/* ---------- families ---------- */

.families {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.family {
  padding: clamp(28px, 3.4vw, 44px) clamp(22px, 3vw, 40px) clamp(30px, 3.4vw, 46px) 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  position: relative;
  transition: background 0.35s ease;
}
.family:nth-child(odd) { border-right: 1px solid var(--line); padding-right: clamp(22px, 3vw, 40px); }
.family:nth-child(even) { padding-left: clamp(22px, 3vw, 40px); }
.family:hover { background: var(--accent-soft); }
.family .idx {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-top: 5px;
}
.family p { font-size: 14.5px; color: var(--ink-2); margin-top: 10px; max-width: 40ch; }
.family .tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 11px;
}

/* ---------- matrix table ---------- */

.table-wrap { width: 100%; overflow-x: auto; }
table.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 680px;
}
table.matrix caption {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 14px;
}
table.matrix th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 16px 12px 0;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
table.matrix td {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.matrix td:last-child,
table.matrix th:last-child { padding-right: 0; }
table.matrix tbody tr { transition: background 0.25s ease; }
table.matrix tbody tr:hover { background: var(--accent-soft); }
table.matrix .code { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
table.matrix .code small { color: var(--muted); font-size: 11.5px; display: block; letter-spacing: 0; }
table.matrix .range { color: var(--accent); white-space: nowrap; }

/* ---------- formula rows ---------- */

.formula-list { border-top: 1px solid var(--ink); }
.formula {
  display: grid;
  grid-template-columns: 132px 1fr 168px;
  gap: clamp(16px, 3vw, 40px);
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.formula .code {
  font-size: 15px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.formula .code small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.formula h4 { font-size: 16px; letter-spacing: -0.01em; margin-bottom: 6px; }
.formula p { font-size: 14px; color: var(--ink-2); max-width: 46ch; }
.formula .mileage { text-align: right; font-size: 14px; color: var(--ink-2); }
.formula .mileage strong { display: block; font-size: 17px; font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- process ---------- */

.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.step {
  padding: 30px 26px 34px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: step;
}
.step:nth-child(3n + 2) { padding-left: 26px; border-left: 1px solid var(--line); }
.step:nth-child(3n + 3) { padding-left: 26px; border-left: 1px solid var(--line); }
.step .n {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 14px;
}
.step h4 { font-size: 16px; margin-bottom: 8px; }
.step p { font-size: 13.5px; color: var(--muted); }

/* ---------- split ---------- */

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.split-rev { grid-template-columns: 1.1fr 0.9fr; }

/* ---------- notes / callout ---------- */

.note {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 18px;
  font-size: 13.5px;
  color: var(--ink-2);
  max-width: 62ch;
}

/* ---------- CTA ---------- */

.cta-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.cta-band h2 { max-width: 20ch; }
.cta-band .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta-band .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 15.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--muted);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 14px; font-size: 14px; color: var(--ink-2); max-width: 66ch; }

/* ---------- form ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 26px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 9px 0;
  transition: border-color 0.25s ease;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
.field select { appearance: none; background-image: none; cursor: pointer; }
.form-note { margin-top: 26px; font-size: 12.5px; color: var(--muted); }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  background: var(--paper);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.foot-grid h5 {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { font-size: 14px; margin-bottom: 9px; color: var(--ink-2); }
.foot-grid a:hover { color: var(--accent); }
.foot-base {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
}
.is-in .reveal,
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .hero-grid,
  .split,
  .split-rev,
  .section-head,
  .cta-band { grid-template-columns: 1fr; }
  .hero-aside { margin-top: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1),
  .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .families { grid-template-columns: 1fr; }
  .family:nth-child(odd) { border-right: 0; padding-right: 0; }
  .family:nth-child(even) { padding-left: 0; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(3n + 2),
  .step:nth-child(3n + 3) { padding-left: 0; border-left: 0; }
  .step:nth-child(even) { padding-left: 26px; border-left: 1px solid var(--line); }
  .formula { grid-template-columns: 110px 1fr; }
  .formula .mileage { grid-column: 2; text-align: left; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed;
    inset: 74px 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--pad) 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .head-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .process { grid-template-columns: 1fr; }
  .step,
  .step:nth-child(even) { padding-left: 0; border-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .formula { grid-template-columns: 1fr; gap: 10px; }
  .formula .mileage { grid-column: 1; }
}
