/* ============================================================
   修修匠品牌门户 · 工业工具箱美学
   品牌黄 #FFD900 / 墨黑 #141414 / 信号红 #E60012 / 暖纸白 #FAF7F0
   ============================================================ */
:root {
  --yellow: #FFD900;
  --yellow-deep: #F0C600;
  --ink: #141414;
  --ink-soft: #4a4a4a;
  --red: #E60012;
  --paper: #FAF7F0;
  --white: #fff;
  --line: rgba(20, 20, 20, .14);
  --radius: 14px;
  --shadow-hard: 6px 6px 0 var(--ink);
  --font: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { width: min(1160px, 92%); margin: 0 auto; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }

section { scroll-margin-top: 78px; }
.section { padding: 96px 0; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; border: 2px solid var(--ink);
  font-weight: 700; font-size: 1rem; line-height: 1.4;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-lg { padding: 15px 32px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-red { background: var(--red); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.btn-red:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--yellow); }
.btn-ink { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--yellow); }
.btn-ink:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--yellow); }

.section-head { text-align: center; margin-bottom: 56px; }
.section-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .82rem; font-weight: 700;
  letter-spacing: .22em; color: var(--ink-soft);
}
.section-kicker .ic { color: var(--red); }
.section-head h2, .about-copy h2, .miniapp-copy h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 900; letter-spacing: .04em;
}
.section-sub { margin-top: 10px; color: var(--ink-soft); }

/* 滚动渐显 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease var(--d, 0s), transform .7s ease var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.d1 { --d: .1s; } .d2 { --d: .2s; } .d3 { --d: .3s; } .d4 { --d: .45s; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 240, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(20, 20, 20, .08); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 46px; height: 46px; border-radius: 10px; border: 1.5px solid var(--line); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.32rem; font-weight: 900; letter-spacing: .06em; }
.brand-text em { font-style: normal; font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; color: var(--ink-soft); }

.site-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.site-nav > a { font-weight: 600; font-size: .98rem; position: relative; padding: 4px 0; }
.site-nav > a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px;
  background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.site-nav > a:hover::after { transform: scaleX(1); }
.nav-tel { font-family: var(--mono); font-weight: 700; }
.nav-tel .ic { color: var(--red); }
.nav-cta { padding: 9px 20px; font-size: .95rem; }

.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: 10px; width: 44px; height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; margin-left: auto; }
.nav-toggle span { width: 20px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .5), transparent 42%),
    repeating-linear-gradient(-45deg, rgba(20, 20, 20, .028) 0 2px, transparent 2px 14px),
    var(--yellow);
}
.hero-deco { position: absolute; inset: 0; pointer-events: none; }
.hx {
  position: absolute; border: 3px solid rgba(20, 20, 20, .1); border-radius: 50%/50%;
  transform: rotate(90deg); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.hx-a { width: 220px; height: 220px; top: -70px; left: -60px; }
.hx-b { width: 120px; height: 120px; bottom: 60px; left: 40%; opacity: .7; }
.hx-c { width: 300px; height: 300px; top: 12%; right: -120px; opacity: .55; }

.hero-grid {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center; padding: 84px 0 96px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--yellow);
  font-size: .86rem; font-weight: 700; letter-spacing: .14em;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.7rem, 6vw, 4.4rem); font-weight: 900;
  line-height: 1.16; letter-spacing: .02em;
}
.hero h1 .hl { position: relative; display: inline-block; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: -2%; bottom: .08em; z-index: -1;
  width: 104%; height: .34em; background: var(--white);
  transform: skewX(-8deg);
}
.hero-sub { margin: 26px 0 34px; max-width: 34em; font-size: 1.08rem; color: #33312a; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; }
.hero .btn-ghost { background: rgba(255, 255, 255, .55); }
.hero .btn-ghost:hover { background: var(--ink); color: var(--yellow); }

.hero-stats { display: flex; gap: 44px; margin-top: 44px; }
.hero-stats dt { font-family: var(--mono); font-size: 2rem; font-weight: 900; line-height: 1.1; }
.hero-stats dd { font-size: .9rem; color: #4a4638; font-weight: 600; }

.hero-visual { position: relative; }
.hero-visual img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(1.2deg);
}
.hero-badge {
  position: absolute; left: -18px; bottom: 26px;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  box-shadow: 5px 5px 0 rgba(20, 20, 20, .25);
}
.hero-badge .ic { width: 1.5em; height: 1.5em; color: var(--yellow); }
.hero-badge em { display: block; font-style: normal; font-size: .74rem; color: #b9b9b9; }
.hero-badge strong { font-family: var(--mono); font-size: 1.06rem; letter-spacing: .03em; }

.hazard {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 16px, var(--yellow) 16px 32px);
}

/* ---------- 跑马灯 ---------- */
.ticker { background: var(--ink); overflow: hidden; padding: 15px 0; }
.ticker-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: ticker 22s linear infinite; }
.ticker-track span { color: var(--yellow); font-weight: 800; letter-spacing: .2em; font-size: .95rem; white-space: nowrap; }
.ticker-track i { width: 9px; height: 9px; flex: none; background: var(--red); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- 服务项目 ---------- */
.services { background: var(--paper); }
.service-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.service-group {
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 28px 30px; transition: transform .22s ease, box-shadow .22s ease;
}
.service-group:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-hard); }
.sg-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.sg-no {
  font-family: var(--mono); font-size: 2.1rem; font-weight: 900; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.8px var(--ink);
}
.sg-head h3 { font-size: 1.22rem; font-weight: 900; }
.sg-head p { font-size: .84rem; color: var(--ink-soft); }
.service-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.service-chip {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: 1.6px solid var(--line); border-radius: 11px; background: var(--paper);
  padding: 11px 14px; font-size: .96rem; font-weight: 600; color: var(--ink);
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.service-chip .ic { color: var(--red); }
.service-chip:hover { background: var(--yellow); border-color: var(--ink); transform: translateY(-2px); }
.service-chip.picked { background: var(--yellow); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }

/* ---------- 服务案例 ---------- */
.cases { background: var(--ink); color: #fff; }
.cases .section-kicker { color: #8f8f8f; }
.cases .section-kicker .ic { color: var(--yellow); }
.cases .section-sub { color: #a9a9a9; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.case-card {
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  overflow: hidden; border: 2px solid #000;
  transition: transform .22s ease, box-shadow .22s ease;
}
.case-card:hover { transform: translateY(-5px); box-shadow: 0 0 0 3px var(--yellow); }
.case-card figure { aspect-ratio: 4 / 3; overflow: hidden; background: #fff; }
.case-card img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.case-card:hover img { transform: scale(1.05); }
.case-body { padding: 22px 24px 24px; }
.case-meta { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: .82rem; }
.case-area { background: var(--yellow); padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.case-time { font-family: var(--mono); color: var(--ink-soft); align-self: center; }
.case-body h3 { font-size: 1.18rem; font-weight: 900; margin-bottom: 8px; }
.case-body > p { font-size: .94rem; color: var(--ink-soft); }
.case-rating { display: flex; align-items: flex-start; gap: 3px; margin-top: 14px; padding-top: 14px; border-top: 1.5px dashed var(--line); }
.case-rating .ic { color: var(--yellow-deep); width: 1em; height: 1em; margin-top: 3px; }
.case-rating span { margin-left: 6px; font-size: .88rem; color: var(--ink-soft); font-style: italic; }
.case-note { margin-top: 28px; text-align: center; font-size: .82rem; color: #7c7c7c; }

/* ---------- 关于我们 ---------- */
.about { background: var(--paper); }
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.about-copy p { margin: 18px 0; color: #3d3b34; }
.about-copy strong { color: var(--ink); }
.about-copy .btn { margin-top: 8px; }
.guarantee-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.g-card {
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 26px 22px; transition: transform .2s ease, box-shadow .2s ease;
}
.g-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-hard); }
.g-card .ic {
  width: 30px; height: 30px; padding: 7px; box-sizing: content-box;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 9px;
  margin-bottom: 14px; color: var(--ink);
}
.g-card h3 { font-size: 1.08rem; font-weight: 900; margin-bottom: 4px; }
.g-card p { font-size: .88rem; color: var(--ink-soft); }

/* ---------- 预约 ---------- */
.booking {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, .55), transparent 38%),
    repeating-linear-gradient(-45deg, rgba(20, 20, 20, .028) 0 2px, transparent 2px 14px),
    var(--yellow);
}
.booking-card {
  position: relative; max-width: 760px; margin: 0 auto;
  background: var(--white); border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 10px 10px 0 var(--ink); padding: 44px 48px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { margin-bottom: 22px; }
.form-field label { display: block; font-weight: 800; font-size: .95rem; margin-bottom: 8px; }
.form-field label em { color: var(--red); font-style: normal; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 2px solid var(--line); border-radius: 11px;
  padding: 13px 15px; transition: border-color .18s ease, background .18s ease;
}
.form-field textarea { resize: vertical; min-height: 108px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--ink); background: var(--white);
  box-shadow: 3px 3px 0 var(--yellow);
}
.form-field input.invalid, .form-field textarea.invalid { border-color: var(--red); }
.field-err { min-height: 0; margin-top: 6px; font-size: .82rem; color: var(--red); font-weight: 600; }
.field-err:empty { display: none; }
.form-actions { text-align: center; }
#submitBtn:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.form-tip { margin-top: 12px; font-size: .8rem; color: var(--ink-soft); }

.booking-success { text-align: center; padding: 30px 0 14px; }
.booking-success .big {
  width: 64px; height: 64px; padding: 16px; box-sizing: content-box;
  background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%;
  margin-bottom: 20px; color: var(--ink);
}
.booking-success h3 { font-size: 1.6rem; font-weight: 900; margin-bottom: 10px; }
.booking-success p { color: var(--ink-soft); }
.booking-success strong { color: var(--ink); font-family: var(--mono); font-size: 1.1em; }
.success-tel { margin: 14px 0 24px; }
.success-tel a, .error-tel a { color: var(--red); font-weight: 800; font-family: var(--mono); }

.booking-error {
  margin-top: 22px; padding: 16px 20px; text-align: center;
  background: #fff2f2; border: 2px solid var(--red); border-radius: 12px;
  color: #8f0010; font-weight: 600; font-size: .95rem;
}
.error-tel { margin-top: 6px; font-size: .88rem; }

/* ---------- 小程序 ---------- */
.miniapp { background: var(--ink); color: #fff; }
.miniapp .section-kicker { color: #8f8f8f; }
.miniapp .section-kicker .ic { color: var(--yellow); }
.miniapp-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.qr-card {
  background: var(--white); border: 3px solid var(--yellow); border-radius: 18px;
  padding: 18px; box-shadow: 8px 8px 0 rgba(255, 217, 0, .28);
}
.qr-card img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: contain;
  border-radius: 10px; background: #fff;
}
.miniapp-sub { margin: 18px 0 26px; color: #b9b9b9; max-width: 32em; }
.miniapp-steps { display: grid; gap: 14px; }
.miniapp-steps li { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.miniapp-steps span {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  background: var(--yellow); color: var(--ink); font-family: var(--mono);
  font-weight: 900; border-radius: 9px;
}

/* ---------- Footer ---------- */
.site-footer { background: #0d0d0d; color: #b5b5b5; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-logo { width: 56px; height: 56px; border-radius: 12px; margin-bottom: 14px; }
.footer-slogan { color: var(--yellow); font-weight: 900; font-size: 1.1rem; letter-spacing: .08em; }
.footer-desc { margin-top: 8px; font-size: .9rem; max-width: 24em; }
.footer-col h4 { color: #fff; font-size: 1rem; font-weight: 800; margin-bottom: 14px; }
.footer-col p { font-size: .92rem; margin-bottom: 8px; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid #262626; padding: 20px 0 26px; font-size: .8rem; color: #7c7c7c;
}

/* ---------- 移动端底部悬浮条 ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99;
  display: none; grid-template-columns: 1fr 1.4fr; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(250, 247, 240, .96); backdrop-filter: blur(10px);
  border-top: 1.5px solid var(--line);
}
.mb-tel, .mb-book {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; border-radius: 999px; font-weight: 800; font-size: 1rem;
}
.mb-tel { border: 2px solid var(--ink); background: var(--white); color: var(--ink); }
.mb-tel .ic { color: var(--red); }
.mb-book { background: var(--red); color: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; padding: 64px 0 80px; }
  .hero-visual { max-width: 640px; }
  .hero-badge { left: 10px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .miniapp-grid { grid-template-columns: 1fr; gap: 40px; }
  .qr-card { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 900px) {
  .service-groups, .case-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  body { padding-bottom: 76px; }
  .section { padding: 68px 0; }
  .site-nav {
    position: fixed; inset: 74px 0 auto 0; z-index: 98;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--paper); border-bottom: 2px solid var(--ink);
    padding: 14px 6% 22px; transform: translateY(-130%);
    transition: transform .3s ease; box-shadow: 0 24px 40px rgba(20, 20, 20, .12);
  }
  .site-nav.open { transform: none; }
  .site-nav > a { padding: 13px 6px; font-size: 1.05rem; }
  .site-nav > a::after { display: none; }
  .nav-cta { margin-top: 10px; }
  .nav-toggle { display: flex; }
  .hero-grid { padding: 52px 0 68px; gap: 40px; }
  .hero-stats { gap: 26px; }
  .hero-stats dt { font-size: 1.6rem; }
  .booking-card { padding: 30px 22px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .mobile-bar { display: grid; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
}
