@import "brand-tokens.css";

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--brand-font-cn);
  color: var(--brand-ink);
  background: #fff;
  line-height: 1.6;
  font-size: var(--text-base);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}
.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-sm);
}
.section-subtitle {
  font-size: var(--text-md);
  color: var(--brand-muted);
  text-align: center;
  margin-bottom: var(--space-2xl);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-grad));
  color: #fff;
  box-shadow: 0 4px 14px rgba(255,106,0,.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,106,0,.36); }
.btn-outline {
  border: 1.5px solid var(--brand-primary);
  color: var(--brand-primary);
  background: transparent;
}
.btn-outline:hover { background: var(--brand-primary-light); }
.btn-white {
  background: #fff;
  color: var(--brand-primary);
}
.btn-white:hover { background: var(--brand-bg); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 18px; font-size: var(--text-sm); }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--brand-line);
}
.header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.logo img { height: 40px; width: auto; }
.logo-text { font-weight: 700; font-size: var(--text-lg); color: var(--brand-ink); }
.nav { display: flex; align-items: center; gap: var(--space-xl); }
.nav a {
  font-size: var(--text-base);
  color: var(--brand-ink);
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-primary);
  transition: width .2s ease;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: var(--brand-primary); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: var(--space-md); }
.menu-toggle { display: none; font-size: 24px; color: var(--brand-ink); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, var(--brand-bg) 0%, #fff 60%, var(--brand-primary-light) 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  opacity: .08;
  background-image: radial-gradient(circle at 20% 30%, var(--brand-primary) 0, transparent 30%),
                    radial-gradient(circle at 80% 70%, var(--brand-primary-grad) 0, transparent 30%);
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: var(--space-2xl);
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}
.hero h1 {
  font-size: var(--text-4xl);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}
.hero h1 span {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-grad));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: var(--text-md);
  color: var(--brand-muted);
  margin-bottom: var(--space-xl);
  max-width: 520px;
}
.hero-actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
}
.hero-stats .stat strong {
  display: block;
  font-size: var(--text-2xl);
  color: var(--brand-primary);
}
.hero-stats .stat span { font-size: var(--text-sm); color: var(--brand-muted); }
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-phone {
  width: 280px;
  background: var(--brand-ink);
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-float);
  transform: rotate(-6deg);
}
.hero-phone-screen {
  background: linear-gradient(180deg, var(--brand-primary-light), #fff);
  border-radius: 26px;
  aspect-ratio: 9/16;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-lg);
}
.hero-phone-screen img { width: 120px; }
.hero-phone-screen p { font-size: var(--text-sm); color: var(--brand-muted); text-align: center; }
.hero-float-card {
  position: absolute;
  background: #fff;
  border-radius: var(--radius-card);
  padding: var(--space-md);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.hero-float-card.card-1 { right: 0; top: 20%; }
.hero-float-card.card-2 { left: 10%; bottom: 15%; }
.hero-float-card .icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-lg);
}
.hero-float-card .text strong { display: block; font-size: var(--text-base); }
.hero-float-card .text span { font-size: var(--text-xs); color: var(--brand-muted); }

/* ===== Cards ===== */
.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-xl);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); }
.card-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-icon);
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: var(--space-md);
}
.card h3 { font-size: var(--text-lg); margin-bottom: var(--space-xs); }
.card p { font-size: var(--text-sm); color: var(--brand-muted); }

/* ===== Feature grids ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

/* ===== Section: Why us / Data ===== */
.bg-light { background: var(--brand-bg-page); }
.data-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  text-align: center;
}
.data-bar .num {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--brand-primary);
  font-family: var(--brand-font-num);
}
.data-bar .label { color: var(--brand-muted); font-size: var(--text-sm); }

/* ===== Products ===== */
.product-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}
.product-tab {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--brand-line);
  color: var(--brand-muted);
  font-weight: 600;
  cursor: pointer;
}
.product-tab.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}
.product-panel { display: none; }
.product-panel.active { display: block; }
.product-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}
.product-showcase.reverse { direction: rtl; }
.product-showcase.reverse > * { direction: ltr; }
.product-info h3 { font-size: var(--text-xl); margin-bottom: var(--space-md); }
.product-info ul { margin: var(--space-md) 0; }
.product-info li {
  padding: var(--space-xs) 0;
  padding-left: 28px;
  position: relative;
  color: var(--brand-muted);
  font-size: var(--text-base);
}
.product-info li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-success);
  font-weight: 700;
}
.product-shot {
  background: var(--brand-bg-page);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  display: flex;
  justify-content: center;
}
.product-shot img { max-height: 360px; }

/* ===== Franchise ===== */
.price-card {
  border: 2px solid var(--brand-line);
  border-radius: var(--radius-card);
  padding: var(--space-2xl);
  text-align: center;
  position: relative;
  background: #fff;
}
.price-card.featured {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-float);
}
.price-card .tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-primary);
  color: #fff;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
}
.price-card h3 { font-size: var(--text-xl); margin-bottom: var(--space-sm); }
.price-card .price {
  font-size: var(--text-3xl);
  color: var(--brand-price);
  font-weight: 700;
}
.price-card .price small { font-size: var(--text-sm); color: var(--brand-muted); font-weight: 400; }
.price-card ul { text-align: left; margin: var(--space-lg) 0; }
.price-card li {
  padding: var(--space-xs) 0;
  color: var(--brand-muted);
  font-size: var(--text-base);
}

/* ===== Forms ===== */
.form-group { margin-bottom: var(--space-md); }
.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 600;
}
.form-group label .required { color: var(--brand-price); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-card);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(255,106,0,.12);
}
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-tip {
  font-size: var(--text-xs);
  color: var(--brand-muted);
  margin-top: var(--space-xs);
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-2xl);
}
.contact-info h3 { font-size: var(--text-xl); margin-bottom: var(--space-md); }
.contact-info .info-item {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.contact-info .info-item .icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-lg);
  flex-shrink: 0;
}
.contact-info .info-item h4 { font-size: var(--text-base); margin-bottom: 2px; }
.contact-info .info-item p { font-size: var(--text-sm); color: var(--brand-muted); }
.map-placeholder {
  width: 100%;
  height: 220px;
  background: var(--brand-bg-page);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-muted);
  margin-top: var(--space-md);
}

/* ===== News / Careers list ===== */
.list-card {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-md);
  transition: box-shadow .2s ease;
}
.list-card:hover { box-shadow: var(--shadow-float); }
.list-card .date {
  width: 70px;
  text-align: center;
  flex-shrink: 0;
}
.list-card .date .day { font-size: var(--text-xl); font-weight: 700; color: var(--brand-primary); }
.list-card .date .month { font-size: var(--text-xs); color: var(--brand-muted); }
.list-card .body { flex: 1; }
.list-card .body h4 { font-size: var(--text-md); margin-bottom: 4px; }
.list-card .body p { font-size: var(--text-sm); color: var(--brand-muted); }
.list-card .tag {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  height: fit-content;
}

/* ===== Timeline / Milestones ===== */
.timeline {
  position: relative;
  padding-left: 30px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--brand-line);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--space-xl);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand-primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--brand-primary-light);
}
.timeline-item h4 { font-size: var(--text-md); margin-bottom: 4px; }
.timeline-item p { font-size: var(--text-sm); color: var(--brand-muted); }

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-grad));
  color: #fff;
  text-align: center;
  padding: var(--space-3xl) 0;
}
.cta-section h2 { font-size: var(--text-2xl); margin-bottom: var(--space-md); }
.cta-section p { opacity: .9; margin-bottom: var(--space-xl); }

/* ===== Footer ===== */
.footer {
  background: var(--brand-ink);
  color: rgba(255,255,255,.7);
  padding: var(--space-3xl) 0 var(--space-xl);
  font-size: var(--text-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}
.footer-brand img { height: 40px; margin-bottom: var(--space-md); }
.footer-brand p { line-height: 1.8; }
.footer h4 {
  color: #fff;
  font-size: var(--text-base);
  margin-bottom: var(--space-md);
}
.footer a { display: block; padding: 4px 0; transition: color .2s ease; }
.footer a:hover { color: var(--brand-primary-grad); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer-bottom a { display: inline; padding: 0; }

/* ===== Mobile Nav ===== */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(43,33,24,.5);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: #fff;
  padding: var(--space-xl);
  transform: translateX(100%);
  transition: transform .2s ease;
}
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav a {
  display: block;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--brand-line);
  font-size: var(--text-md);
}
.mobile-nav-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: 28px;
  color: var(--brand-ink);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--brand-ink);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --text-4xl: 36px; --text-3xl: 32px; --text-2xl: 26px; }
  .nav { display: none; }
  .menu-toggle { display: block; }
  .header-actions .btn { display: none; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .grid-3, .grid-2, .data-bar { grid-template-columns: 1fr; }
  .product-showcase { grid-template-columns: 1fr; }
  .product-showcase.reverse { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ===== WeChat one-click login ===== */
.wx-login { margin-bottom: var(--space-lg); }
.btn-wx {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  background: #07C160;
  color: #fff;
  font-weight: 600;
  font-size: var(--text-base);
  box-shadow: 0 4px 14px rgba(7,193,96,.25);
  transition: all .2s ease;
}
.btn-wx:hover { background: #06ad56; transform: translateY(-1px); }
.btn-wx .wx-icon { font-size: 18px; }
.wx-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding: 10px 14px;
  background: var(--brand-bg-page);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-card);
}
.wx-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #ddd; }
.wx-name { font-weight: 600; flex: 1; color: var(--brand-ink); }
.wx-switch { color: var(--brand-muted); font-size: var(--text-sm); text-decoration: underline; }
