/* VPN Laowang — Design tokens from DESIGN.md */
:root {
  --purple: #6f42c1;
  --purple-hover: #8c68cd;
  --hero-blue: rgba(159,198,231,0.6);
  --white: #ffffff;
  --body-text: #212529;
  --emphasis: #000000;
  --light-gray: #f8f9fa;
  --border: #dee2e6;
  --shadow: 1px 1px 10px -1px rgba(170,170,170,1);

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial, sans-serif;

  --r-sm: 5px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-pill: 30px;
  --r-full: 60px;

  --header-h: 64px;

  /* spacing */
  --sp1: 4px; --sp2: 6px; --sp3: 8px; --sp4: 12px; --sp5: 16px;
  --sp6: 20px; --sp7: 24px; --sp8: 32px; --sp9: 48px; --sp10: 70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; max-width: 100%; }
body { font-family: var(--font); font-size: 16px; line-height: 24px; color: var(--body-text); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp3); padding: 12px 28px; border-radius: var(--r-pill);
  font-size: 20px; font-weight: 500; line-height: 24px; cursor: pointer;
  border: none; transition: background .2s, transform .15s; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { background: var(--purple-hover); }
.btn-outline { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn-outline:hover { background: var(--purple); color: var(--white); }
.btn-sm { padding: 10px 22px; font-size: 16px; }
.btn-lg { padding: 16px 40px; font-size: 20px; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.nav-container { max-width: 1280px; margin: 0 auto; padding: 0 var(--sp7); height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--sp7); }
.nav-logo img { height: 40px; width: auto; }
.nav-links-desktop { display: flex; align-items: center; gap: var(--sp2); flex: 1; }
.nav-link { font-size: 16px; font-weight: 400; color: var(--body-text); padding: 8px var(--sp4); border-radius: var(--r-md); transition: background .15s, color .15s; text-decoration: none; background: none; border: none; cursor: pointer; }
.nav-link:hover, .nav-link.active { background: var(--hero-blue); color: var(--purple); text-decoration: none; }

/* Desktop dropdown */
.nav-dropdown { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 4px; }
.dd-arrow { font-size: 11px; transition: transform .2s; display: inline-block; }
.nav-dropdown.open .dd-arrow { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp3); min-width: 170px; box-shadow: 0 8px 32px rgba(111,66,193,.15);
  display: none; z-index: 200;
}
.nav-dropdown.open .dropdown-menu { display: block; }
.dropdown-item { display: block; padding: 10px var(--sp5); color: var(--body-text); font-size: 14px; font-weight: 400; border-radius: var(--r-sm); white-space: nowrap; }
.dropdown-item:hover { background: var(--hero-blue); color: var(--purple); text-decoration: none; }

.nav-right { display: flex; align-items: center; gap: var(--sp5); flex-shrink: 0; }
.lang-switcher { display: flex; gap: 4px; align-items: center; }
.lang-opt { font-size: 13px; font-weight: 400; color: var(--body-text); padding: 4px var(--sp3); border-radius: var(--r-sm); transition: background .15s; }
.lang-opt:hover { background: var(--hero-blue); text-decoration: none; }
.lang-opt.active { color: var(--purple); font-weight: 600; }
.lang-sep { color: var(--border); font-size: 12px; }

/* Toggle button */
.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--body-text); padding: 8px; line-height: 1; flex-shrink: 0; }

/* ── Mobile Menu ── */
.mobile-menu {
  display: none; position: fixed;
  top: var(--header-h); left: 0; right: 0; bottom: 0;
  width: 100vw; background: var(--white); z-index: 999; overflow-y: auto;
}
.mobile-menu.open { display: flex; flex-direction: column; }
.mobile-menu-inner { display: flex; flex-direction: column; align-items: center; padding: var(--sp8) var(--sp7) var(--sp9); gap: 0; width: 100%; }
.mobile-nav-link { width: 100%; text-align: center; padding: 14px 0; font-size: 18px; font-weight: 400; color: var(--body-text); border-bottom: 1px solid var(--border); display: block; }
.mobile-nav-link:hover { color: var(--purple); text-decoration: none; }

/* Mobile dropdown (Products) */
.mobile-products-btn {
  width: 100%; text-align: center; padding: 14px 0; font-size: 18px; font-weight: 400;
  color: var(--body-text); border-bottom: 1px solid var(--border); border: none;
  background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-bottom: 1px solid var(--border);
}
.mobile-products-btn:hover { color: var(--purple); }
.mobile-products-sub { width: 100%; background: var(--light-gray); border-radius: var(--r-lg); padding: var(--sp3) 0; margin: 0; display: none; }
.mobile-products-sub.open { display: block; }
.mobile-sub-link { display: block; text-align: center; padding: 12px 0; font-size: 16px; color: var(--purple); font-weight: 400; border-bottom: 1px solid var(--border); }
.mobile-sub-link:last-child { border-bottom: none; }
.mobile-sub-link:hover { background: var(--hero-blue); text-decoration: none; }

.mobile-lang { display: flex; gap: var(--sp4); margin-top: var(--sp7); }
.mobile-cta { margin-top: var(--sp7); width: 100%; max-width: 320px; justify-content: center; font-size: 18px; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp7); }
.section { padding: 80px 0; }
.section-sm { padding: var(--sp9) 0; }
.text-center { text-align: center; }

/* ── Hero ── */
.hero { background: var(--hero-blue); padding: 90px 0 80px; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp10); align-items: center; }
.hero-title { font-size: 72px; font-weight: 300; line-height: 86.4px; color: var(--emphasis); margin-bottom: var(--sp7); }
.hero-sub { font-size: 20px; font-weight: 400; line-height: 30px; color: var(--body-text); margin-bottom: var(--sp8); }
.hero-actions { display: flex; gap: var(--sp5); flex-wrap: wrap; align-items: center; }
.hero-img { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }

/* ── Stats ── */
.stats-bar { background: var(--purple); color: var(--white); padding: var(--sp8) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp7); text-align: center; }
.stat-num { font-size: 32px; font-weight: 500; line-height: 38.4px; }
.stat-label { font-size: 14px; font-weight: 400; line-height: 21px; opacity: .85; margin-top: var(--sp1); }

/* ── Features ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp8); margin-top: var(--sp8); }
.feature-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp8); box-shadow: var(--shadow); text-align: center; }
.feature-icon { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-md); margin: 0 auto var(--sp5); }
.feature-img-wrap { width: 100%; height: 160px; overflow: hidden; border-radius: var(--r-lg); margin-bottom: var(--sp6); }
.feature-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.feature-title { font-size: 24px; font-weight: 500; line-height: 28.8px; color: var(--emphasis); margin-bottom: var(--sp4); }
.feature-desc { font-size: 16px; line-height: 24px; color: var(--body-text); }

/* ── Why section ── */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp9); align-items: center; }
.why-list { display: flex; flex-direction: column; gap: var(--sp6); }
.why-item { display: flex; gap: var(--sp5); align-items: flex-start; }
.why-check { color: var(--purple); font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.why-item-title { font-size: 18px; font-weight: 400; line-height: 27px; color: var(--emphasis); margin-bottom: var(--sp1); }
.why-item-desc { font-size: 16px; line-height: 24px; color: var(--body-text); }
.why-img { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.why-img img { width: 100%; object-fit: cover; }

/* ── Platforms ── */
.platforms-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp7); margin-top: var(--sp8); }
.platform-card { background: var(--light-gray); border-radius: var(--r-lg); padding: var(--sp7); text-align: center; border: 1px solid var(--border); transition: box-shadow .2s; }
.platform-card:hover { box-shadow: var(--shadow); }
.platform-icon { font-size: 48px; margin-bottom: var(--sp5); }
.platform-name { font-size: 20px; font-weight: 500; color: var(--emphasis); margin-bottom: var(--sp3); }
.platform-desc { font-size: 14px; color: var(--body-text); line-height: 21px; }
.platform-link { display: inline-block; margin-top: var(--sp5); font-size: 14px; color: var(--purple); font-weight: 500; }

/* ── Testimonials ── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp7); margin-top: var(--sp8); }
.testimonial-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp7); box-shadow: var(--shadow); }
.testimonial-stars { color: var(--purple); font-size: 20px; margin-bottom: var(--sp4); }
.testimonial-text { font-size: 16px; line-height: 24px; color: var(--body-text); margin-bottom: var(--sp5); font-style: italic; }
.testimonial-author { font-size: 14px; font-weight: 500; color: var(--emphasis); }

/* ── FAQ ── */
.faq-list { max-width: 780px; margin: var(--sp8) auto 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; background: none; border: none; text-align: left; padding: var(--sp6) 0; font-size: 18px; font-weight: 400; line-height: 27px; color: var(--body-text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--sp5); }
.faq-q:hover { color: var(--purple); }
.faq-arrow { font-size: 14px; transition: transform .2s; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 0 var(--sp6); font-size: 16px; line-height: 24px; color: var(--body-text); }
.faq-item.open .faq-a { display: block; }

/* ── CTA Banner ── */
.cta-banner { background: var(--purple); color: var(--white); padding: 80px 0; text-align: center; }
.cta-banner h2 { font-size: 32px; font-weight: 500; margin-bottom: var(--sp5); }
.cta-banner p { font-size: 20px; font-weight: 300; margin-bottom: var(--sp8); opacity: .9; }
.btn-white { background: var(--white); color: var(--purple); }
.btn-white:hover { background: var(--light-gray); }

/* ── Footer ── */
.site-footer { background: var(--light-gray); border-top: 1px solid var(--border); padding: var(--sp10) 0 var(--sp8); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp9); margin-bottom: var(--sp8); }
.footer-brand img { height: 36px; margin-bottom: var(--sp5); }
.footer-tagline { font-size: 14px; line-height: 21px; color: var(--body-text); max-width: 240px; }
.footer-col-title { font-size: 14px; font-weight: 600; color: var(--emphasis); margin-bottom: var(--sp5); text-transform: uppercase; letter-spacing: .05em; }
.footer-links { display: flex; flex-direction: column; gap: var(--sp3); }
.footer-links a { font-size: 14px; color: var(--body-text); }
.footer-links a:hover { color: var(--purple); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: var(--sp7); display: flex; justify-content: space-between; align-items: center; gap: var(--sp5); flex-wrap: wrap; }
.footer-copy { font-size: 14px; color: var(--body-text); }
.footer-legal { display: flex; gap: var(--sp7); }
.footer-legal a { font-size: 14px; color: var(--body-text); }
.footer-legal a:hover { color: var(--purple); }

/* ── Inner page hero ── */
.page-hero { background: var(--hero-blue); padding: 60px 0 50px; text-align: center; }
.page-hero h1 { font-size: 48px; font-weight: 300; color: var(--emphasis); margin-bottom: var(--sp5); }
.page-hero p { font-size: 20px; font-weight: 300; color: var(--body-text); max-width: 640px; margin: 0 auto var(--sp8); }

/* ── Download page ── */
.download-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp8); margin-top: var(--sp8); }
.download-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp8); box-shadow: var(--shadow); text-align: center; }
.download-card-icon { font-size: 56px; margin-bottom: var(--sp5); }
.download-card h3 { font-size: 24px; font-weight: 500; color: var(--emphasis); margin-bottom: var(--sp4); }
.download-card p { font-size: 16px; color: var(--body-text); margin-bottom: var(--sp7); }

/* ── Support page ── */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp7); margin-top: var(--sp8); }
.support-card { background: var(--light-gray); border-radius: var(--r-lg); padding: var(--sp7); text-align: center; border: 1px solid var(--border); }
.support-icon { font-size: 40px; margin-bottom: var(--sp5); }
.support-card h3 { font-size: 20px; font-weight: 500; color: var(--emphasis); margin-bottom: var(--sp4); }
.support-card p { font-size: 15px; color: var(--body-text); line-height: 22px; margin-bottom: var(--sp5); }

/* ── Privacy/Terms ── */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { font-size: 24px; font-weight: 500; color: var(--emphasis); margin: var(--sp8) 0 var(--sp5); }
.prose p, .prose li { font-size: 16px; line-height: 24px; color: var(--body-text); margin-bottom: var(--sp5); }
.prose ul { list-style: disc; padding-left: var(--sp8); }

/* ── Platform detail page ── */
.platform-detail-hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp9); align-items: center; }
.platform-steps { display: flex; flex-direction: column; gap: var(--sp7); margin-top: var(--sp8); }
.step { display: flex; gap: var(--sp6); align-items: flex-start; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--purple); color: var(--white); font-size: 18px; font-weight: 500; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-content h3 { font-size: 18px; font-weight: 500; color: var(--emphasis); margin-bottom: var(--sp2); }
.step-content p { font-size: 16px; line-height: 24px; color: var(--body-text); }
.specs-table { width: 100%; border-collapse: collapse; margin-top: var(--sp7); }
.specs-table th, .specs-table td { padding: var(--sp5) var(--sp6); border: 1px solid var(--border); font-size: 15px; text-align: left; }
.specs-table th { background: var(--light-gray); font-weight: 500; color: var(--emphasis); }

/* ── Breadcrumb ── */
.breadcrumb { padding: var(--sp5) 0; font-size: 14px; color: var(--body-text); }
.breadcrumb a { color: var(--purple); }
.breadcrumb span { margin: 0 var(--sp3); color: var(--border); }

/* ── Section headings ── */
.section-heading { font-size: 32px; font-weight: 500; line-height: 38.4px; color: var(--emphasis); margin-bottom: var(--sp4); }
.section-sub { font-size: 20px; font-weight: 300; line-height: 30px; color: var(--body-text); max-width: 640px; margin: 0 auto; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-title { font-size: 54px; line-height: 65px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links-desktop { display: none; }
  .nav-right { display: none; }
  .nav-toggle { display: block; }

  .hero { padding: 50px 0 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp8); }
  .hero-title { font-size: 40px; line-height: 50px; }
  .hero-sub { font-size: 18px; }
  .hero-img { display: none; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .why-img { display: none; }
  .platforms-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp7); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-legal { justify-content: center; }
  .platform-detail-hero { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 32px; }

  .section { padding: 50px 0; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 32px; line-height: 40px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .platforms-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
