/* SO CAR Official Website — shared styles
 * Design tokens inspired by secureanypay.com (CSS variables)
 * Color palette: blue trust + orange action (auto industry standard)
 * ============================================================ */

:root {
  /* Brand colors */
  --primary: #0A2540;          /* Deep navy — trust */
  --primary-dark: #061a2e;
  --primary-light: #e8eef5;
  --accent: #DC2626;            /* Red — brand action */
  --accent-dark: #B91C1C;
  --accent-light: #FEE2E2;

  /* Neutrals */
  --text: #1a1a1a;
  --muted: #525252;
  --border: #e5e5e5;
  --bg: #fafafa;
  --white: #ffffff;
  --sidebar: #0A2540;

  /* Effects */
  --shadow: 0 4px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-lg: 16px;

  /* Layout */
  --max-w: 1200px;
  --header-h: 72px;

  /* Typography scale */
  --fs-hero: clamp(2.25rem, 4.5vw, 3.75rem);
  --fs-h1: clamp(1.875rem, 3.5vw, 2.75rem);
  --fs-h2: clamp(1.5rem, 2.5vw, 2rem);
  --fs-h3: 1.25rem;
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Inter, "PingFang TC", "Microsoft JhengHei", "PingFang SC", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
#site-header:empty { min-height: var(--header-h); }
.site-header .header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(16px, 2.5vw, 48px);
  height: var(--header-h);
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; justify-self: start; }
.brand-logo { height: 36px; width: auto; }
.brand-name { font-size: 18px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.brand-tagline { font-size: 10px; font-weight: 600; color: var(--muted); line-height: 1.2; margin-top: 1px; }

.nav-main {
  display: flex; align-items: center; justify-content: space-evenly;
  gap: clamp(2px, 0.4vw, 6px); min-width: 0; width: 100%;
}
.nav-main a {
  padding: 8px clamp(8px, 1.1vw, 14px); border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--muted); transition: all .15s; white-space: nowrap;
}
.nav-main a:hover, .nav-main a.active {
  color: var(--primary); background: var(--primary-light); font-weight: 700;
}

.header-actions {
  display: flex; align-items: center; gap: clamp(8px, 1vw, 14px);
  flex-shrink: 0; justify-self: end;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer; transition: all .2s; border: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--white); color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--primary); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ── Lang switcher ── */
.lang-switcher {
  display: inline-flex; align-items: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}
.lang-btn {
  border: none; background: transparent;
  padding: 4px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--muted); cursor: pointer;
  transition: all .15s;
}
.lang-btn.active { background: var(--white); color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ── Hero ── */
.hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 6vw, 80px);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(220,38,38,.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 64px); align-items: center;
  position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(220,38,38,.2); border: 1px solid rgba(220,38,38,.4);
  font-size: var(--fs-xs); font-weight: 600;
  color: #ffd4c2; margin-bottom: 24px;
}
.hero h1 {
  font-size: var(--fs-hero); font-weight: 800;
  line-height: 1.15; letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--accent); }
.hero-lead { font-size: 1.0625rem; line-height: 1.7; color: #cdd6e0; margin-bottom: 32px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; max-width: 560px;
}
.hero-stat { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.15); }
.hero-stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.hero-stat span { font-size: var(--fs-xs); color: #cdd6e0; }

.hero-visual {
  position: relative;
}
.hero-visual img {
  width: 100%; height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.hero-visual-accent {
  position: absolute; bottom: 20px; left: 20px;
  background: rgba(255,255,255,.95); color: var(--primary);
  padding: 10px 16px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow);
}

/* ── Section ── */
.section { padding: clamp(48px, 6vw, 96px) 0; }
.section-alt { background: var(--white); }
.section-dark { background: var(--primary); color: #fff; }
.section-header { text-align: center; max-width: 720px; margin: 0 auto clamp(32px, 4vw, 56px); }
.section-tag {
  display: inline-block; padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary-light); color: var(--primary);
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px;
}
.section-dark .section-tag { background: rgba(220,38,38,.2); color: var(--accent); }
.section h2 {
  font-size: var(--fs-h1); font-weight: 800;
  letter-spacing: -1px; margin-bottom: 16px;
  color: inherit;
}
.section-header p { color: var(--muted); font-size: 1.0625rem; }
.section-dark .section-header p { color: #cdd6e0; }

/* ── Card Grid ── */
.card-grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all .25s;
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary);
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 1.25rem;
}
.card-icon.accent { background: var(--accent-light); color: var(--accent); }
.card h3 { font-size: var(--fs-h3); font-weight: 700; margin-bottom: 10px; color: var(--primary); }
.card p { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 12px; }
.card ul { list-style: none; padding: 0; }
.card ul li {
  padding-left: 22px; position: relative;
  font-size: var(--fs-sm); color: var(--muted);
  margin-bottom: 6px;
}
.card ul li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--accent); font-weight: 700;
}

/* ── Platform Hub (核心 6 大业务图) ── */
.platform-hub {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}
.platform-hub-top {
  display: grid; grid-template-columns: auto auto 1fr;
  gap: 24px; align-items: center; margin-bottom: 32px;
}
.platform-hub-ends { display: grid; gap: 12px; }
.platform-hub-end {
  background: var(--primary-light); color: var(--primary);
  padding: 12px 16px; border-radius: var(--radius);
  font-size: var(--fs-sm); font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.platform-hub-end.accent { background: var(--accent-light); color: var(--accent); }
.platform-hub-arrow {
  font-size: 1.5rem; color: var(--muted); font-weight: 700;
}
.platform-hub-account {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; padding: 24px; border-radius: var(--radius);
}
.platform-hub-account .hub-label {
  font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent); margin-bottom: 8px;
}
.platform-hub-account h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.platform-hub-account p { color: #cdd6e0; font-size: var(--fs-sm); margin-bottom: 12px; }
.platform-hub-layers { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-hub-layers span {
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.1); font-size: var(--fs-xs);
  font-weight: 600;
}

.platform-hub-flow {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.platform-hub-node {
  background: var(--bg); padding: 16px 12px;
  border-radius: var(--radius); text-align: center;
  border: 1px solid var(--border);
  transition: all .2s;
}
.platform-hub-node:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.platform-hub-node-icon {
  width: 36px; height: 36px; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary);
  border-radius: var(--radius); font-size: .9rem;
}
.platform-hub-node.hub-center .platform-hub-node-icon { background: var(--accent); color: #fff; }
.platform-hub-node h4 { font-size: var(--fs-sm); font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.platform-hub-node p { font-size: var(--fs-xs); color: var(--muted); }

/* ── Timeline ── */
.timeline {
  display: grid; gap: 20px;
  counter-reset: step;
}
.timeline-item {
  display: grid; grid-template-columns: 56px 1fr;
  gap: 16px; align-items: start;
  background: var(--white); padding: 20px;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.timeline-num {
  width: 40px; height: 40px;
  background: var(--accent); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.125rem;
}
.timeline-item h4 { font-size: 1.0625rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.timeline-item p { font-size: var(--fs-sm); color: var(--muted); }

/* ── CTA Section ── */
.cta-section {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; padding: clamp(48px, 6vw, 80px) 0;
  text-align: center;
}
.cta-section h2 { font-size: var(--fs-h1); font-weight: 800; margin-bottom: 16px; }
.cta-section p { font-size: 1.125rem; color: #ffe2d3; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-section .btn { background: #fff; color: var(--accent); }
.cta-section .btn:hover { background: var(--primary); color: #fff; }

/* ── Stats band ── */
.stats-band {
  background: var(--primary); color: #fff;
  padding: 48px 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center;
}
.stat-item strong {
  display: block; font-size: 2.25rem; font-weight: 800;
  color: var(--accent); margin-bottom: 4px;
}
.stat-item span { color: #cdd6e0; font-size: var(--fs-sm); }

/* ── FAQ ── */
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.faq-q {
  width: 100%; background: transparent; border: none;
  padding: 18px 24px; text-align: left;
  font-size: 1rem; font-weight: 600; color: var(--primary);
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 16px;
}
.faq-q::after { content: '+'; font-size: 1.5rem; color: var(--accent); transition: transform .2s; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { padding: 0 24px; max-height: 0; overflow: hidden; transition: all .3s; color: var(--muted); font-size: var(--fs-sm); }
.faq-item.open .faq-a { padding: 0 24px 18px; max-height: 500px; }

/* ── Form ── */
.form {
  background: var(--white); padding: 32px;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  display: grid; gap: 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { font-size: var(--fs-sm); font-weight: 600; color: var(--primary); margin-bottom: 6px; display: block; }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: var(--fs-body); font-family: inherit;
  transition: border .15s; background: var(--white);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--accent);
}
.form textarea { min-height: 120px; resize: vertical; }
.form-submit { display: flex; justify-content: flex-end; margin-top: 8px; }
.form-feedback { padding: 12px 16px; border-radius: var(--radius); font-size: var(--fs-sm); }
.form-feedback--success { background: #e8f7ee; color: #166534; }
.form-feedback--error { background: #fef2f2; color: #991b1b; }

/* ── Footer ── */
.site-footer {
  background: var(--primary-dark); color: #cdd6e0;
  padding: 56px 0 24px; margin-top: 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px; margin-bottom: 40px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand .brand-name { color: #fff; font-size: 22px; }
.footer-brand p { color: #8e9aab; font-size: var(--fs-sm); line-height: 1.7; }
.footer-col h5 {
  color: #fff; font-size: var(--fs-sm); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: #8e9aab; font-size: var(--fs-sm); transition: color .15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: var(--fs-xs); color: #8e9aab;
}
.footer-bottom a { color: #cdd6e0; }

/* ── Mobile nav ── */
.nav-toggle {
  display: none; background: transparent; border: none;
  font-size: 1.25rem; color: var(--primary); cursor: pointer; padding: 8px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .platform-hub-flow { grid-template-columns: repeat(3, 1fr); }
  .platform-hub-top { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-main { display: none; }
  .nav-main.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--white); padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-toggle { display: inline-flex; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-3, .card-grid.cols-4, .card-grid.cols-2 { grid-template-columns: 1fr; }
  .platform-hub-flow { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-actions .btn-ghost { display: none; }
}

/* ── WeChat Mini Program QR card ── */
.mini-qr-card {
  border-color: #c9e9cf;
  background: linear-gradient(135deg, #f5fbf7 0%, #eaf6ee 100%);
}
.mini-qr-block {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.mini-qr-frame {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #d6e9dc;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(7, 193, 96, 0.12);
}
.mini-qr-img {
  width: 160px;
  height: 160px;
  display: block;
  border-radius: 6px;
}
.mini-qr-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.mini-qr-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
}
.mini-qr-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.mini-qr-hint i {
  color: #07c160;
  font-size: 1.05rem;
}
.mini-qr-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e6f7ec;
  color: #07a550;
  font-size: var(--fs-xs);
  font-weight: 700;
  border: 1px solid #b8e6c8;
}
@media (max-width: 768px) {
  .mini-qr-block { justify-content: center; text-align: center; }
  .mini-qr-info { align-items: center; }
}

/* ── Footer mini icon hover popover ── */
.footer-mini-wrap { position: relative; display: inline-flex; }
.footer-mini-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 50;
  white-space: nowrap;
}
.footer-mini-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}
.footer-mini-popover img {
  width: 140px;
  height: 140px;
  display: block;
  border-radius: 6px;
}
.footer-mini-popover .footer-mini-caption {
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}
.footer-mini-wrap:hover .footer-mini-popover,
.footer-mini-wrap:focus-within .footer-mini-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ── Utility ── */
.text-center { text-align: center; }
.mb-8 { margin-bottom: 32px; }
.mb-16 { margin-bottom: 64px; }
.fade-in {
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }