/* ═══════════════════════════════════════════════════════════════════════
 * WaADesk — Landing & Pricing
 * ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #070d11;
  --bg-elevated: #0d181e;
  --bg-card: #111c23;
  --border: rgba(255, 255, 255, 0.07);
  --text: #e9edef;
  --text-secondary: #7a998c;
  --text-muted: #4a6760;
  --accent: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.25);
  --green: #00a884;
  --radius: 10px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ═══ Navigation ═══ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 13, 17, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
}

.logo {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-a {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* Language switcher */

.lang-switch {
  padding: 7px 12px 7px 32px;
  background: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a998c' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  max-width: 160px;
  appearance: none;
  -webkit-appearance: none;
}

.lang-switch:hover, .lang-switch:focus {
  border-color: var(--accent);
  background-color: rgba(0, 212, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.lang-switch option {
  background: #111c23;
  color: var(--text);
  font-size: 12px;
  padding: 8px;
}

/* ═══ Hero ═══ */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 90px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 680px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.text-accent {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.hero-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* ═══ Buttons ═══ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #000 !important;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: #00b8e0;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary) !important;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text) !important;
}

/* ═══ Sections ═══ */

.section {
  padding: 80px 24px;
}

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

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

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
}

.section-header h2 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ═══ Advantages ═══ */

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

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto;
}

.advantage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.advantage-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.advantage-card:hover {
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.advantage-card:hover::before {
  opacity: 1;
}

.advantage-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.advantage-card h3 {
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

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

/* ═══ Features Grid ═══ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-card:hover {
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.06);
  border-radius: 10px;
}

.feature-text h3 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 6px;
}

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

/* ═══ FAQ ═══ */

.faq-list {
  max-width: 660px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 20px;
  background: var(--bg-card);
  transition: border-color 0.15s;
}

.faq-item[open] {
  border-color: rgba(0, 212, 255, 0.2);
}

.faq-item summary {
  padding: 16px 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.15s;
}

.faq-item[open] summary::after {
  content: "−";
  color: var(--accent);
}

.faq-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-bottom: 16px;
}

/* ═══ Pricing ═══ */

.pricing-hero {
  text-align: center;
  padding: 80px 24px 40px;
}

.pricing-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 750;
  margin: 12px 0 16px;
  letter-spacing: -0.01em;
}

.pricing-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.plans-section {
  padding: 0 24px 80px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  transition: border-color 0.2s, transform 0.15s;
}

.plan-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.plan-recommended {
  border-color: rgba(0, 212, 255, 0.3);
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.04) 0%, var(--bg-card) 20%);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #000;
  font-size: 12px;
  font-weight: 650;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.plan-header h3 {
  font-size: 18px;
  font-weight: 650;
  margin-bottom: 4px;
}

.plan-price {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.plan-period {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.plan-features li {
  font-size: 14px;
  color: var(--text-secondary);
  padding-left: 22px;
  position: relative;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 12px;
}

.plan-features li.feat-no::before {
  content: "—";
  color: var(--text-muted);
}

.plan-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: -8px;
}

.btn-plan {
  display: block;
  text-align: center;
  padding: 13px 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}

.btn-plan.btn-primary {
  background: var(--accent);
  color: #000 !important;
}

.btn-plan.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-secondary) !important;
}

.btn-plan:active {
  transform: scale(0.97);
}

/* ═══ Credit pack ═══ */

.credit-pack {
  text-align: center;
  margin-top: 48px;
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-card);
}

.credit-pack h3 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 6px;
}

.credit-pack p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

/* ═══ Comparison table ═══ */

.comparison {
  padding: 0 24px 80px;
  text-align: center;
}

.comparison h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 32px;
}

.table-wrap {
  overflow-x: auto;
  max-width: 800px;
  margin: 0 auto 16px;
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.comp-table th,
.comp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.comp-table thead th {
  font-weight: 650;
  color: var(--text);
  font-size: 13px;
}

.comp-table thead th:first-child {
  color: var(--text-muted);
}

.comp-table tbody td {
  color: var(--text-secondary);
}

.comp-table tbody td:first-child {
  font-weight: 500;
  color: var(--text);
}

.table-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ═══ Footer ═══ */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px 36px;
  text-align: center;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 8px 0 12px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 16px 0 8px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ═══ Legal Pages ═══ */

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.legal-title {
  font-size: 32px;
  font-weight: 750;
  margin-bottom: 8px;
}

.legal-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-content h3 {
  font-size: 16px;
  font-weight: 650;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.legal-content p, .legal-content li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-content ul li {
  margin-bottom: 6px;
}

.legal-content strong {
  color: var(--text);
}

/* Language visibility (pre-JS fallback; i18n.js handles full visibility) */

.lang-en, .lang-zh-CN, .lang-zh-TW, .lang-hi, .lang-pt, .lang-id, .lang-es { display: none; }

html[lang="en"] .lang-en,
html[lang="zh-CN"] .lang-zh-CN,
html[lang="zh-TW"] .lang-zh-TW { display: block; }

/* fallback for non-JS: show EN for latin langs */
html[lang="hi"] .lang-en,
html[lang="pt"] .lang-en,
html[lang="id"] .lang-en,
html[lang="es"] .lang-en { display: block; }

/* ═══ Responsive ═══ */

@media (max-width: 640px) {
  .hero {
    padding: 60px 20px 50px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
  }
  .nav-links {
    gap: 16px;
  }
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .advantages-grid {
    grid-template-columns: 1fr;
  }
  .feature-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .lang-switch {
    max-width: 120px;
    font-size: 11px;
  }
}
