:root {
  --primary: #f9be01;
  --primary-hover: #e0aa00;
  --dark: #1b1521;
  --text-dark: #181c32;
  --text-muted: #a1a5b7;
  --gray-600: #7e8299;
  --radius: 6px;
}

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

html, body { overflow-x: hidden; max-width: 100%; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', Helvetica, sans-serif;
  color: var(--text-dark);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.lang-cjk {
  font-family: 'Poppins', 'Noto Sans SC', 'Noto Sans TC', Helvetica, sans-serif;
}
body.lang-cjk[lang="zh-Hant"] {
  font-family: 'Poppins', 'Noto Sans TC', 'Noto Sans SC', Helvetica, sans-serif;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background .2s, color .2s, transform .1s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #000;
  padding: 10px 20px;
  font-size: 14px;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-lg img { height: 18px; width: auto; }

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background .3s, padding .3s, box-shadow .3s;
}
.header.sticky {
  background: #fff;
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand .logo { height: 40px; width: auto; }
.logo-dark { display: none; }
.header.sticky .logo-light { display: none; }
.header.sticky .logo-dark { display: block; }

.header-actions { display: flex; align-items: center; gap: 16px; }

/* Language switch */
.lang-switch {
  display: flex;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  overflow: hidden;
}
.header.sticky .lang-switch { border-color: rgba(0,0,0,.15); }
.lang-switch button {
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.header.sticky .lang-switch button { color: var(--gray-600); }
.lang-switch button.active { background: var(--primary); color: #000; }
.lang-switch button:hover:not(.active) { background: rgba(255,255,255,.12); }
.header.sticky .lang-switch button:hover:not(.active) { background: rgba(0,0,0,.05); }

.nav { display: flex; gap: 4px; }
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 8px 18px;
  transition: color .2s;
}
.header.sticky .nav-link { color: var(--gray-600); }
.nav-link:hover, .nav-link.active { color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: #fff;
  border-radius: 2px;
}
.header.sticky .nav-toggle span { background: var(--text-dark); }

/* Hero */
.hero {
  position: relative;
  background: var(--dark) url('assets/bg.jpg') no-repeat right bottom;
  background-size: contain;
  padding-top: 140px;
  padding-bottom: 90px;
  min-height: 540px;
  display: flex;
  align-items: center;
}
.hero-inner { display: flex; }
.hero-copy { max-width: 560px; }
.hero h1 {
  color: #fff;
  font-size: 39px;
  font-weight: 800;
  line-height: 1.2;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-curve {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  width: 100%;
  height: 70px;
  display: block;
}

/* Section heads */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 60px; }
.section-head h2 {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}
.section-head p { color: var(--text-muted); font-weight: 600; font-size: 18px; }

/* Features */
.features { padding: 80px 0; }
.features-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: center;
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 30px;
}
.feature { display: flex; gap: 18px; align-items: flex-start; }
.feature img { width: 70px; height: 70px; flex-shrink: 0; }
.feature h3 { font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-weight: 600; font-size: 14px; }
.feature-phone img { margin: 0 auto; max-height: 620px; width: auto; }

/* Customize */
.customize { padding: 40px 0 80px; }
.customize-img img { margin: 0 auto; max-width: 1000px; }
.customize-cta { text-align: center; margin-top: 50px; }

/* About */
.about {
  background: var(--dark) url('assets/bg.jpg') no-repeat center bottom;
  background-size: cover;
  padding: 100px 0;
}
.about h2 { color: #fff; font-size: 39px; font-weight: 800; }
.about p {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  max-width: 560px;
  margin: 24px 0 40px;
}

/* Footer */
.footer { background: var(--dark); padding-bottom: 50px; }
.footer-sep { height: 1px; background: rgba(255,255,255,.1); margin-bottom: 60px; }
.footer-logo { height: 50px; width: auto; margin-bottom: 30px; }
.footer-email { color: #fff; font-size: 20px; font-weight: 700; text-decoration: none; display: inline-block; margin-bottom: 24px; }
.footer-email:hover { color: var(--primary); }
.footer-desc { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 50px; }
.footer-copy { color: var(--gray-600); font-size: 14px; font-weight: 600; }

/* Scroll top */
.scrolltop {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #000;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
  z-index: 99;
}
.scrolltop.show { opacity: 1; visibility: visible; }

/* Responsive */
@media (max-width: 992px) {
  .features-layout { grid-template-columns: 1fr; }
  .feature-phone { display: none; }
}
@media (max-width: 768px) {
  .nav, .login-btn { display: none; }
  .nav-toggle { display: flex; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    padding: 16px 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
  }
  .nav.open .nav-link { color: var(--gray-600); }
  .feature-grid { grid-template-columns: 1fr; }
  .hero h1, .about h2 { font-size: 30px; }
  .section-head h2 { font-size: 30px; }
  .header-actions { gap: 8px; }
}

/* Small phones — keep the header on one row without horizontal scroll */
@media (max-width: 480px) {
  .header { padding: 14px 0; }
  .brand .logo { height: 30px; }
  .lang-switch button { padding: 5px 8px; font-size: 12px; }
  .hero { padding-top: 110px; }
  .hero h1, .about h2 { font-size: 26px; }
  .feature { gap: 14px; }
  .feature img { width: 56px; height: 56px; }
  .cookie-banner { padding: 16px; gap: 12px; }
  .cookie-banner p { min-width: 0; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn, .cookie-actions .btn-decline { flex: 1; }
}

/* ===== Footer legal links ===== */
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  margin: 24px 0 0;
}
.footer-legal a { color: var(--gray-600); font-size: 14px; font-weight: 600; text-decoration: none; }
.footer-legal a:hover { color: var(--primary); }

/* ===== Legal pages ===== */
.legal-page { background: #f5f8fa; min-height: 100vh; }
.legal-header {
  background: var(--dark);
  padding: 20px 0;
}
.legal-header .container { display: flex; align-items: center; justify-content: space-between; }
.legal-header .logo { height: 36px; width: auto; }
.legal-header a.back { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; }
.legal-header a.back:hover { color: var(--primary); }
.legal-body {
  max-width: 820px; margin: 0 auto; padding: 56px 20px 80px;
}
.legal-body h1 { font-size: 34px; font-weight: 800; color: var(--text-dark); margin-bottom: 8px; }
.legal-body .updated { color: var(--gray-600); font-size: 14px; margin-bottom: 36px; }
.legal-body h2 { font-size: 20px; font-weight: 700; color: var(--text-dark); margin: 32px 0 12px; }
.legal-body p, .legal-body li { color: #3f4254; font-size: 15px; line-height: 1.75; }
.legal-body ul { margin: 0 0 0 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--primary-hover); }
.legal-footer { text-align: center; padding: 24px; color: var(--gray-600); font-size: 14px; font-weight: 600; }

/* ===== Cookie consent banner ===== */
.cookie-banner {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: calc(100% - 40px); max-width: 720px;
  background: #1b1521; color: #fff;
  border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.3);
  padding: 20px 24px; z-index: 200;
  display: none; align-items: center; gap: 20px; flex-wrap: wrap;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { flex: 1; min-width: 240px; font-size: 14px; line-height: 1.6; color: #d7d8e0; }
.cookie-banner a { color: var(--primary); text-decoration: none; }
.cookie-banner a:hover { text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn-decline {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius); padding: 10px 20px; font-family: inherit;
  font-weight: 600; font-size: 14px; cursor: pointer;
}
.cookie-actions .btn-decline:hover { background: rgba(255,255,255,.1); }
