@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #c8922a;
  --primary-light: #e4b85a;
  --primary-dark: #8b5e14;
  --accent: #d4af37;
  --dark: #0c1220;
  --dark-soft: #151d2e;
  --dark-card: #1a2438;
  --text: #1a1f2e;
  --text-muted: #5c6578;
  --text-light: #8b95a8;
  --bg: #f6f8fb;
  --bg-alt: #eef1f6;
  --white: #fff;
  --border: #e2e8f0;
  --footer-bg: #0a0e17;
  --max-width: 1200px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 20, 35, 0.06);
  --shadow: 0 8px 32px rgba(15, 20, 35, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 20, 35, 0.12);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.logo img {
  height: 44px;
  width: auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 4px 6px;
  align-items: center;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.main-nav a:hover {
  color: var(--text);
  background: var(--bg);
}

.main-nav a.active {
  color: var(--primary-dark);
  background: rgba(200, 146, 42, 0.1);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white) !important;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(200, 146, 42, 0.35);
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 146, 42, 0.4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(200, 146, 42, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 146, 42, 0.45);
}

.btn-outline {
  background: var(--white);
  color: var(--primary-dark);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  background: var(--dark) url("../assets/images/hero-bg.jpg") center/cover no-repeat;
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(12, 18, 32, 0.92) 0%, rgba(12, 18, 32, 0.65) 45%, rgba(12, 18, 32, 0.35) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--white), transparent);
}

.hero .container {
  position: relative;
  z-index: 1;
  padding: 100px 24px 120px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  max-width: 580px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 100px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.hero-stat span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* Section common */
.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg);
}

.section-dark {
  background: var(--dark-soft);
  color: var(--white);
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text);
}

.section-dark .section-title {
  color: var(--white);
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.8;
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.65);
}

.section-text {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.9;
}

.text-center { text-align: center; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* Promo banner */
.promo-banner {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-soft) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.promo-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(200, 146, 42, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.promo-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  margin-bottom: 16px;
}

.promo-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.promo-content h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.promo-content p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  max-width: 640px;
}

.promo-action {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Feature cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(200, 146, 42, 0.3);
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(200, 146, 42, 0.15), rgba(200, 146, 42, 0.05));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* About block */
.about-block {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.about-block .section-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 20px;
}

/* Carousel */
.carousel-section .container {
  max-width: 1280px;
}

.carousel-wrap {
  max-width: 100%;
  margin: 0 auto;
  background: linear-gradient(180deg, #1e2a3f 0%, #141c2b 100%);
  border-radius: var(--radius-lg);
  padding: 32px 56px 44px;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.carousel-slide {
  display: none;
  text-align: center;
}

.carousel-slide.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.carousel-slide img {
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
  z-index: 2;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.carousel-btn:hover {
  background: var(--white);
  transform: translateY(-50%) scale(1.05);
}

.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
}

.carousel-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* API cards */
.api-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.api-card {
  background: var(--dark-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}

.api-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-2px);
}

.api-card-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.api-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.api-card p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
}

.api-intro {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.api-intro p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.9;
  max-width: 900px;
  margin: 0 auto;
}

.api-highlight {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-soft) 100%);
  border-radius: var(--radius-lg);
}

.api-highlight h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.api-highlight p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.9;
}

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--dark) 100%);
  padding: 80px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
  font-size: 16px;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--text-light);
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand img {
  max-width: 180px;
  margin-bottom: 20px;
  filter: brightness(1.1);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-light);
}

.footer h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 12px;
  font-size: 14px;
}

.footer li a {
  color: var(--text-light);
  transition: color var(--transition);
}

.footer li a:hover {
  color: var(--accent);
}

.footer-qr img {
  width: 140px;
  border-radius: 8px;
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}

/* Page templates */
.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-soft) 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-content {
  padding: 72px 0;
}

.page-content .container {
  max-width: 760px;
}

.page-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 36px 0 14px;
  color: var(--text);
  padding-left: 14px;
  border-left: 3px solid var(--primary);
}

.page-content p,
.page-content li {
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.85;
  font-size: 15px;
}

.page-content ul {
  padding-left: 20px;
  margin-bottom: 24px;
}

.page-content .content-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 18, 32, 0.7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 340px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: var(--bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background var(--transition);
}

.modal-close:hover {
  background: var(--bg-alt);
}

.modal-box h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-box p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-box img {
  margin: 0 auto;
  width: 200px;
  border-radius: 8px;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .api-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .promo-banner {
    flex-direction: column;
    text-align: center;
    padding: 40px 32px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 16px 24px;
    border-top: 1px solid var(--border);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav a {
    display: block;
  }

  .header-cta-wrap {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero .container {
    padding: 72px 24px 80px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .features-grid,
  .api-cards {
    grid-template-columns: 1fr;
  }

  .api-highlight {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }

  .carousel-wrap {
    padding: 20px 40px 36px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .carousel-prev { left: 6px; }
  .carousel-next { right: 6px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .api-intro {
    padding: 32px 24px;
  }
}
