/* R41 工厂案例展示 · 暗黑工业风 P0 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Inter', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  transition: background .3s, color .3s;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

body[data-theme='dark-industrial'] { --primary:#FF6B35; --primary-dim:#FF6B3522; --accent:#FF8C5A; --bg:#0D1117; --bg-card:#161B22; --bg-elevated:#21262D; --text:#E6EDF3; --text-light:#8B949E; --border:#30363D; }
body[data-theme='tech-blue'] { --primary:#3B82F6; --primary-dim:#3B82F622; --accent:#60A5FA; --bg:#0B1220; --bg-card:#111827; --bg-elevated:#1F2937; --text:#F1F5F9; --text-light:#94A3B8; --border:#334155; }
body[data-theme='mfg-orange'] { --primary:#F97316; --primary-dim:#F9731622; --accent:#FB923C; --bg:#1A1208; --bg-card:#231A0F; --bg-elevated:#2D2215; --text:#FFF7ED; --text-light:#FDBA74; --border:#78350F; }
body[data-theme='precision-gray'] { --primary:#94A3B8; --primary-dim:#94A3B822; --accent:#CBD5E1; --bg:#0F1115; --bg-card:#181B21; --bg-elevated:#22262E; --text:#E2E8F0; --text-light:#64748B; --border:#334155; }
body[data-theme='eco-green'] { --primary:#22C55E; --primary-dim:#22C55E22; --accent:#4ADE80; --bg:#0A140E; --bg-card:#0F1A14; --bg-elevated:#16261C; --text:#ECFDF5; --text-light:#86EFAC; --border:#166534; }
body[data-theme='navy'] { --primary:#1E3A8A; --primary-dim:#1E3A8A44; --accent:#3B82F6; --bg:#0A0F1A; --bg-card:#111827; --bg-elevated:#1E293B; --text:#E0E7FF; --text-light:#93C5FD; --border:#1E40AF; }

.page { max-width: 1200px; margin: 0 auto; }
.section { padding: 2rem 1rem; }
.section__title { font-size: 1.2rem; font-weight: 800; margin-bottom: .25rem; }
.section__sub { font-size: .82rem; color: var(--text-light); margin-bottom: 1rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .7rem 1.2rem; border-radius: 8px; font-weight: 600; font-size: .88rem;
  border: none; cursor: pointer; background: var(--primary); color: #fff; min-height: 44px;
}
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline-light { background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.5); color: #fff; }
.btn-sm { padding: .45rem .85rem; font-size: .78rem; min-height: 36px; }
.btn-block { width: 100%; }
.empty { text-align: center; color: var(--text-light); padding: 2rem; }

/* Hero */
.hero { position: relative; min-height: 78vh; color: #fff; overflow: hidden; border-radius: 0 0 1rem 1rem; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity .35s ease; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,17,23,.75) 0%, rgba(13,17,23,.92) 100%); }
.hero__content { position: relative; z-index: 1; padding: 2.5rem 1.25rem 2rem; max-width: 1200px; margin: 0 auto; }
.hero__brand { font-size: .78rem; letter-spacing: .08em; opacity: .85; margin-bottom: .35rem; color: var(--primary); font-weight: 700; }
.hero__title { font-size: clamp(1.35rem, 5vw, 2rem); font-weight: 900; line-height: 1.2; margin-bottom: .45rem; transition: opacity .25s; }
.hero__sub { font-size: .88rem; opacity: .88; max-width: 24rem; margin-bottom: 1.25rem; }
.hero__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .hero__stats { grid-template-columns: repeat(4, 1fr); } }
.hero-stat { text-align: center; padding: .75rem .4rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; }
.hero-stat__val { font-size: 1.45rem; font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; }
.hero-stat__lbl { font-size: .68rem; opacity: .8; margin-top: .15rem; }
.hero__industries { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.hero-ind { padding: .35rem .7rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.25); color: #fff; font-size: .72rem; cursor: pointer; min-height: 44px; }
.hero-ind.active { border-color: var(--tag, var(--primary)); background: color-mix(in srgb, var(--tag, var(--primary)) 25%, transparent); font-weight: 700; }
.hero__btns { display: flex; flex-wrap: wrap; gap: .65rem; }

/* Trust */
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-card { padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; text-align: center; animation: fadeUp .5s ease both; }
.trust-card:nth-child(2) { animation-delay: .08s; }
.trust-card:nth-child(3) { animation-delay: .16s; }
.trust-card:nth-child(4) { animation-delay: .24s; }
.trust-card__icon { font-size: 1.5rem; }
.trust-card__val { font-size: 1.4rem; font-weight: 900; color: var(--primary); margin-top: .25rem; }
.trust-card__lbl { font-size: .72rem; color: var(--text-light); }
.logo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 640px) { .logo-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .logo-grid { grid-template-columns: repeat(4, 1fr); } }
.logo-grid__hint { margin-top: -.75rem; margin-bottom: 1rem; }
.logo-chip {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: .75rem .55rem; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; min-height: 52px; color: var(--text);
  transition: border-color .2s, transform .2s, background .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.logo-chip__name { display: block; font-size: .84rem; font-weight: 700; color: var(--text); line-height: 1.35; letter-spacing: .02em; }
.logo-chip__count { display: block; margin-top: .25rem; font-size: .7rem; font-weight: 600; color: var(--primary); opacity: .95; }
.logo-chip:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); background: color-mix(in srgb, var(--primary) 8%, var(--bg-elevated)); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.logo-chip.active { border-color: var(--primary); background: var(--primary-dim); box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent); }
.logo-chip.active .logo-chip__name { color: #fff; }
.logo-chip.active .logo-chip__count { color: var(--accent); }

/* Filters */
.filter-bar { margin-bottom: 1.25rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .65rem; overflow-x: auto; padding-bottom: .25rem; }
.filter-row--ind { display: none; }
@media (min-width: 768px) { .filter-row--ind, .filter-row--svc { display: flex; } .filter-sheet-btn { display: none !important; } }
.filter-tab, .filter-chip { padding: .45rem .75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font-size: .75rem; cursor: pointer; white-space: nowrap; min-height: 44px; }
.filter-tab.active, .filter-chip.active { background: var(--primary-dim); border-color: var(--primary); color: var(--primary); font-weight: 700; }
.filter-tab em, .filter-chip em { font-style: normal; opacity: .65; margin-left: .15rem; }
.filter-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter-search { flex: 1; min-width: 160px; padding: .55rem .75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); min-height: 44px; }
.filter-clear { font-size: .72rem; color: var(--primary); background: none; border: none; cursor: pointer; }

/* Case grid */
.case-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) {
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .case-swipe { display: none !important; }
}
@media (min-width: 1024px) {
  .case-grid { grid-template-columns: repeat(3, 1fr); }
  .case-card--lg { grid-row: span 2; }
}
@media (max-width: 767px) { .case-grid { display: none; } }

.case-swipe { position: relative; margin-bottom: 1rem; }
.case-card--swipe { display: block; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.case-swipe__hint { text-align: center; font-size: .72rem; color: var(--text-light); margin-top: .5rem; }

.case-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform .25s, opacity .25s, box-shadow .25s; }
.case-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.35); border-color: var(--primary); }
.case-card.is-hidden { opacity: 0; transform: scale(.95); pointer-events: none; position: absolute; }
.case-card__img-wrap { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-elevated); }
.case-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.case-card__body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.case-tag { align-self: flex-start; font-size: .65rem; font-weight: 700; padding: .2rem .5rem; border-radius: 4px; }
.case-card h3 { font-size: .92rem; font-weight: 800; line-height: 1.35; }
.case-card__client { font-size: .72rem; color: var(--text-light); }
.case-kpis { display: flex; gap: .75rem; font-size: .72rem; color: var(--text-light); }
.case-kpis strong { color: var(--primary); }
.case-card__sum { font-size: .78rem; color: var(--text-light); margin-top: auto; line-height: 1.45; }

.cta-card { margin-top: 1.5rem; padding: 1.25rem; border: 2px dashed var(--border); border-radius: 12px; text-align: center; }
.cta-card p { font-size: .88rem; margin-bottom: 1rem; color: var(--text-light); }

/* Sheet */
.sheet { position: fixed; inset: 0; z-index: 950; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg-card); border-radius: 16px 16px 0 0; padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom)); max-height: 75vh; overflow-y: auto; }
.sheet__lbl { font-size: .75rem; color: var(--text-light); margin: .75rem 0 .35rem; }
.sheet__tags { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 960; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal__box { position: relative; width: 100%; max-width: 400px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; display: grid; gap: .65rem; }
.modal__box label { display: flex; flex-direction: column; gap: .25rem; font-size: .78rem; color: var(--text-light); }
.modal__box input, .modal__box textarea { padding: .55rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }

/* Detail page */
.breadcrumb { padding: 1rem; font-size: .78rem; color: var(--text-light); }
.breadcrumb a { color: var(--primary); }
.detail-hero { position: relative; margin: 0 1rem; border-radius: 12px; overflow: hidden; }
.detail-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.detail-hero__overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13,17,23,.95), transparent 60%); display: flex; flex-direction: column; justify-content: flex-end; padding: 1.25rem; }
.detail-hero h1 { font-size: 1.15rem; font-weight: 900; margin: .5rem 0 .25rem; color: #fff; }
.detail-hero p { font-size: .78rem; color: rgba(255,255,255,.8); }
.detail-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; padding: 1rem; }
.detail-kpi { text-align: center; padding: .85rem .35rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.detail-kpi__val { font-size: 1.25rem; font-weight: 900; color: var(--primary); }
.detail-kpi__lbl { font-size: .68rem; color: var(--text-light); }
.detail-nav { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1rem 1rem; position: sticky; top: 0; background: var(--bg); z-index: 10; border-bottom: 1px solid var(--border); }
.detail-nav a { font-size: .75rem; padding: .4rem .65rem; border-radius: 6px; background: var(--bg-card); border: 1px solid var(--border); }
.detail-sec { padding: 1.25rem 1rem; border-bottom: 1px solid var(--border); }
.detail-sec h2 { font-size: 1rem; margin-bottom: .65rem; color: var(--primary); }
.detail-sec p { font-size: .88rem; color: var(--text-light); line-height: 1.65; }
.detail-meta { list-style: none; margin-top: .75rem; font-size: .78rem; color: var(--text-light); }
.detail-meta li { margin-bottom: .25rem; }
.quote { margin-top: 1rem; padding: 1rem; border-left: 3px solid var(--primary); background: var(--bg-card); font-size: .88rem; }
.quote cite { display: block; margin-top: .5rem; font-size: .75rem; color: var(--text-light); font-style: normal; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.spec-table th, .spec-table td { padding: .65rem; border-bottom: 1px solid var(--border); text-align: left; }
.spec-table th { color: var(--text-light); width: 40%; font-weight: 500; }
.detail-pager { display: flex; justify-content: space-between; gap: .5rem; padding: 1rem; }
.detail-cta { padding: 1rem; display: grid; gap: .5rem; }

.page-footer { text-align: center; padding: 2rem 1rem; font-size: .75rem; color: var(--text-light); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.theme-panel { position: fixed; right: .75rem; bottom: calc(5.5rem + env(safe-area-inset-bottom)); z-index: 900; }
.theme-panel__toggle { width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer; background: var(--bg-card); box-shadow: 0 4px 16px rgba(0,0,0,.3); font-size: 1.1rem; }
.theme-panel__list { position: absolute; bottom: 52px; right: 0; display: flex; flex-wrap: wrap; gap: .35rem; width: 150px; padding: .5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.theme-panel__list button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); background: var(--swatch); cursor: pointer; }

.contact-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 800;
  background: rgba(0,0,0,.92); padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom));
}
.contact-footer__btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; max-width: 960px; margin: 0 auto; }
.contact-footer__cta { background: #c41e1e !important; color: #fff !important; text-align: center; padding: .6rem .35rem; border-radius: 6px; font-size: .78rem; font-weight: 700; }
.contact-footer__btn { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; padding: .6rem .35rem; border-radius: 6px; font-size: .78rem; cursor: pointer; text-align: center; }
.contact-footer__brand { text-align: center; font-size: .62rem; color: rgba(255,255,255,.5); margin-top: .4rem; }
