/* HutaoCloud — style.css  |  Design tokens from DESIGN.md */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

:root {
  /* ── Brand palette (from DESIGN.md) ── */
  --primary:       #2563eb;   /* local-accent */
  --primary-dark:  #1d4ed8;   /* text-6 */
  --green:         #168553;   /* local-accent-2 */
  --dark:          #26334a;   /* text-4 */
  --header-bg:     #ffffff;
  --bg:            #ffffff;
  --surface:       #f5f7fb;
  --surface-2:     #eef1f8;
  --text:          #1d1d1f;   /* text-2 */
  --text-muted:    #5f6673;   /* text-3 */
  --text-subtle:   #79859a;   /* text-5 */
  --border:        #d8dee8;   /* local-accent-3 */

  /* ── Radius (from DESIGN.md) ── */
  --radius-sm:  10px;    /* radius-4 */
  --radius-md:  20px;    /* radius-3 */
  --radius-lg:  28px;    /* radius-2 */
  --radius-xl:  999px;   /* radius-1 */

  /* ── Shadow / depth (minimal per DESIGN.md guidance) ── */
  --shadow-card: 0 2px 12px rgba(37,99,235,.08), 0 1px 3px rgba(0,0,0,.05);
  --shadow-lg:   0 8px 32px rgba(37,99,235,.12);

  /* ── Spacing ── */
  --transition:  0.2s ease;
  --space-xs:    8px;
  --space-sm:    16px;
  --space-md:    24px;
  --space-lg:    48px;
  --space-xl:    80px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4 { margin-top: 0; line-height: 1.25; }

/* ─── HEADER ─── */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 var(--space-sm);
  height: 64px; gap: var(--space-sm);
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.logo { height: 36px; width: auto; max-width: 160px; object-fit: contain; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1; justify-content: center;
}
.nav-links > li > a {
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-links > li > a:hover { color: var(--text); background: var(--surface); text-decoration: none; }

.nav-right {
  display: flex; align-items: center; gap: var(--space-sm);
  flex-shrink: 0; margin-left: auto;
}

/* Mobile-only lang row inside menu */
.mobile-lang { display: none; }

/* ─── DROPDOWN / LANG SWITCHER ─── */
.dropdown { position: relative; }
.dropdown-panel {
  position: absolute; top: 100%; right: 0;
  margin-top: 0; padding-top: 8px;
  display: none; min-width: 160px; z-index: 1000;
}
.dropdown-panel-inner {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.dropdown:hover .dropdown-panel,
.dropdown:focus-within .dropdown-panel { display: block; }
.dropdown-panel a {
  display: block; padding: 10px 16px;
  color: var(--text); font-size: 14px;
  transition: background var(--transition);
  white-space: nowrap;
}
.dropdown-panel a:hover { background: var(--surface); text-decoration: none; }

.lang-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); padding: 6px 12px;
  border-radius: var(--radius-xl); cursor: pointer;
  font-size: 13px; display: flex; align-items: center; gap: 6px;
  transition: border-color var(--transition), color var(--transition);
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-btn i { font-size: 11px; }

/* ─── CTA BUTTON ─── */
.btn-cta {
  background: var(--primary); color: #fff;
  padding: 10px 22px; border-radius: var(--radius-xl);
  font-size: 14px; font-weight: 600;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap; display: inline-block;
}
.btn-cta:hover { background: var(--primary-dark); text-decoration: none; transform: translateY(-1px); }

.btn-cta.btn-cta-lg {
  padding: 16px 40px; border-radius: var(--radius-xl);
  font-size: 18px; font-weight: 700;
}

/* ─── HAMBURGER ─── */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text); font-size: 22px; padding: 6px;
  order: 99;
}

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, #0f1b30 0%, #1a2c56 55%, #1e3a8a 100%);
  color: #fff; text-align: center;
  padding: var(--space-xl) var(--space-sm);
  position: relative; overflow: hidden;
}
.hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(37,99,235,.2); border: 1px solid rgba(37,99,235,.45);
  color: #93c5fd; padding: 6px 18px; border-radius: var(--radius-xl);
  font-size: 13px; font-weight: 600; margin-bottom: var(--space-md);
}
.hero h1 {
  font-size: clamp(28px, 5vw, 52px); font-weight: 800;
  margin-bottom: var(--space-sm); color: #fff;
  letter-spacing: -0.5px;
}
.hero .hero-sub {
  font-size: clamp(15px, 2.2vw, 18px); color: rgba(255,255,255,.78);
  margin-bottom: var(--space-lg); max-width: 640px;
  margin-left: auto; margin-right: auto;
}
.hero-cta { display: flex; justify-content: center; }

/* ─── PAGE HERO (inner pages) ─── */
.page-hero {
  background: linear-gradient(135deg, #0f1b30 0%, #1a2c56 100%);
  color: #fff; text-align: center;
  padding: 72px var(--space-sm) var(--space-xl);
}
.page-hero-inner { max-width: 700px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(26px, 4vw, 44px); font-weight: 800; margin-bottom: var(--space-sm); color: #fff; }
.page-hero p { font-size: 18px; color: rgba(255,255,255,.8); }

/* ─── SECTION HEAD ─── */
.section-head { text-align: center; margin-bottom: var(--space-lg); }
.section-head h2 {
  font-size: clamp(22px, 3.5vw, 36px); font-weight: 800;
  margin-bottom: 12px; color: var(--text);
}
.section-head p { font-size: 16px; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ─── FEATURE GRID ─── */
.features { padding: var(--space-xl) var(--space-sm); background: var(--surface); }
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md); max-width: 1100px; margin: 0 auto;
}
.feature-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-md);
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.feature-card i { font-size: 28px; color: var(--primary); margin-bottom: var(--space-sm); display: block; }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.65; }

/* ─── USE CASES ─── */
.use-cases { padding: var(--space-xl) var(--space-sm); }
.use-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md); max-width: 1100px; margin: 0 auto;
}
.use-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-md);
  transition: box-shadow var(--transition), transform var(--transition);
}
.use-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.use-card i { font-size: 28px; color: var(--primary); margin-bottom: var(--space-sm); display: block; }
.use-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.use-card p { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.65; }

/* ─── REGIONS ─── */
.regions { padding: var(--space-xl) var(--space-sm); }
.regions-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm); max-width: 900px; margin: 0 auto;
}
.region-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 20px;
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; color: var(--text);
  transition: box-shadow var(--transition), transform var(--transition);
}
.region-card:hover { box-shadow: var(--shadow-card); transform: translateY(-1px); }
.region-card i { color: var(--primary); font-size: 14px; }

/* ─── STEPS ─── */
.steps { padding: var(--space-xl) var(--space-sm); background: var(--surface); }
.steps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md); max-width: 900px; margin: 0 auto;
}
.step { text-align: center; }
.step-num {
  width: 52px; height: 52px; border-radius: var(--radius-xl);
  background: var(--primary); color: #fff;
  font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-sm);
}
.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-muted); }

/* ─── CLIENTS ─── */
.clients { padding: var(--space-xl) var(--space-sm); }
.clients-grid {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center; max-width: 800px; margin: 0 auto;
}
.client-badge {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 10px 20px;
  font-size: 14px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.client-badge i { color: var(--primary); }

/* ─── PRICING ─── */
.pricing { padding: var(--space-xl) var(--space-sm); background: var(--surface); }
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md); max-width: 900px; margin: 0 auto;
}
.pricing-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-md);
  position: relative; transition: box-shadow var(--transition);
}
.pricing-card.pricing-featured {
  border-color: var(--primary); border-width: 2px;
  box-shadow: 0 0 0 4px rgba(37,99,235,.08);
}
.pricing-card:hover { box-shadow: var(--shadow-lg); }
.pricing-badge {
  display: inline-block;
  background: var(--primary); color: #fff;
  padding: 4px 14px; border-radius: var(--radius-xl);
  font-size: 12px; font-weight: 700; margin-bottom: 10px;
}
.pricing-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.price { font-size: 42px; font-weight: 800; color: var(--text); line-height: 1; margin: 12px 0 4px; }
.price-period { font-size: 16px; font-weight: 400; color: var(--text-muted); }
.pricing-features { margin: 16px 0 20px; }
.pricing-features li {
  padding: 7px 0; font-size: 14px; color: var(--text-muted);
  display: flex; gap: 8px; align-items: flex-start;
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li i { color: var(--green); font-size: 13px; flex-shrink: 0; margin-top: 3px; }
.pricing-card .btn-cta { display: block; text-align: center; width: 100%; }

.pricing-note { padding: var(--space-xl) var(--space-sm); }
.pricing-note .feature-grid { max-width: 1100px; margin: 0 auto; }

/* ─── DOWNLOAD ─── */
.download-section { padding: var(--space-xl) var(--space-sm); }
.platform-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md); max-width: 1000px; margin: 0 auto;
}
.platform-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-sm); text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.platform-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.platform-card i { font-size: 36px; color: var(--primary); margin-bottom: var(--space-sm); }
.platform-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.platform-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.platform-card .btn-cta { display: block; text-align: center; }

/* ─── FAQ ─── */
.faq { padding: var(--space-xl) var(--space-sm); background: var(--surface); }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: none; text-align: left;
  padding: 18px 0; font-size: 16px; font-weight: 600;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  color: var(--text); gap: 12px;
}
.faq-q::after { content: '+'; color: var(--primary); font-size: 22px; flex-shrink: 0; font-weight: 400; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { display: none; padding: 0 0 16px; font-size: 15px; color: var(--text-muted); line-height: 1.75; }
.faq-item.open .faq-a { display: block; }

/* ─── CONTACT ─── */
.contact-section { padding: var(--space-xl) var(--space-sm); }
.contact-grid {
  display: grid; grid-template-columns: 3fr 2fr;
  gap: var(--space-xl); max-width: 1000px; margin: 0 auto;
  align-items: start;
}
.contact-info h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 800; margin-bottom: 12px; }
.contact-info > p { color: var(--text-muted); margin-bottom: var(--space-md); }
.contact-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-sm);
  margin-bottom: 16px;
}
.contact-card i { font-size: 22px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.contact-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.contact-card p { font-size: 13px; color: var(--text-muted); margin: 0; }
.contact-cta-block {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg); padding: var(--space-lg) var(--space-md);
  color: #fff; text-align: center;
}
.contact-cta-block h2 { color: #fff; font-size: 22px; margin-bottom: 12px; }
.contact-cta-block p { color: rgba(255,255,255,.85); font-size: 15px; margin-bottom: var(--space-md); }
.contact-cta-block .btn-cta { background: #fff; color: var(--primary); }
.contact-cta-block .btn-cta:hover { background: rgba(255,255,255,.9); transform: translateY(-1px); }

/* ─── PROSE (privacy / terms) ─── */
.prose { padding: var(--space-xl) var(--space-sm); }
.prose-inner {
  max-width: 800px; margin: 0 auto;
  font-size: 15px; line-height: 1.8; color: var(--text-muted);
}
.prose-inner strong { color: var(--text); }
.prose-inner p { margin-bottom: 16px; }

/* ─── FOOTER ─── */
.site-footer {
  background: #ffffff; color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding: var(--space-xl) var(--space-sm) var(--space-md);
}
.footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg); margin-bottom: var(--space-xl);
}
.footer-brand .logo-footer { height: 36px; width: auto; margin-bottom: var(--space-sm); }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 280px; color: var(--text-muted); }
.footer-col h4 { color: var(--text); font-size: 13px; font-weight: 700; margin-bottom: var(--space-sm); text-transform: uppercase; letter-spacing: .6px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--text-muted); font-size: 14px; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--primary); text-decoration: none; }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  border-top: 1px solid var(--border); padding-top: var(--space-sm);
}
.footer-bottom p { font-size: 13px; margin: 0; text-align: center; color: var(--text-muted); }

/* ─── MOBILE ─── */
@media (max-width: 768px) {
  .regions-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { position: relative; padding: 0 12px; }

  .nav-links {
    display: none;
    position: absolute; top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: center;
    height: auto; max-height: none;
    overflow: visible;
    background: #ffffff;
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 16px rgba(0,0,0,.08);
    padding: 12px 0;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; text-align: center; }
  .nav-links > li > a { display: block; width: 100%; padding: 14px 0; font-size: 17px; color: var(--text-muted); }
  .nav-links > li > a:hover { color: var(--text); background: var(--surface); }

  .nav-right .lang-switcher { display: none; }
  .nav-right .btn-cta { display: none; }
  .nav-toggle { display: block; }

  /* Lang switcher inside mobile menu */
  .mobile-lang {
    display: flex; justify-content: center; gap: 16px;
    padding: 14px 0; border-top: 1px solid var(--border);
    width: 100%;
  }
  .nav-links li.mobile-lang a {
    display: inline-block; width: auto;
    padding: 4px 10px; font-size: 14px; line-height: 1.4;
    white-space: nowrap; color: var(--text-muted);
    border-radius: var(--radius-xl);
  }
  .nav-links li.mobile-lang a.active { color: var(--primary); font-weight: 700; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }

  .btn-cta,
  .hero-cta,
  .cta-button {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    width: max-content;
    max-width: 90%;
  }
  .cta-wrap { display: flex; justify-content: center; width: 100%; }
  .hero-cta { justify-content: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
  .regions-grid { grid-template-columns: repeat(2, 1fr); }

}
