:root {
  --bg: #f6f8fb;
  --text: #0f1b2d;
  --muted: #5c6678;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(26, 39, 59, 0.12);
  --accent: #0d8cff;
  --accent-2: #18c9a7;
  --accent-3: #ff8a3d;
  --shadow: 0 16px 40px rgba(9, 20, 36, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(24, 201, 167, 0.10), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(13, 140, 255, 0.09), transparent 38%),
    var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0.35;
}

.bg-glow-a {
  width: 320px;
  height: 320px;
  background: var(--accent-2);
  top: -80px;
  right: -40px;
}

.bg-glow-b {
  width: 380px;
  height: 380px;
  background: var(--accent-3);
  bottom: -120px;
  left: -80px;
}

.nav,
main,
.footer {
  position: relative;
  z-index: 2;
}

/* ─── Navigation ─── */

.nav {
  max-width: 1120px;
  margin: 18px auto 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px rgba(13, 140, 255, 0.16);
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 160ms ease;
}

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

/* ─── Language Toggle ─── */

.lang-toggle {
  margin-left: auto;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(13, 140, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  white-space: nowrap;
  font-family: "Sora", "Noto Sans SC", sans-serif;
}

.lang-toggle:hover {
  background: rgba(13, 140, 255, 0.16);
  color: var(--text);
}

/* ─── Layout ─── */

main {
  max-width: 1120px;
  margin: 22px auto 50px;
  padding: 0 14px;
}

/* ─── Hero ─── */

.hero {
  padding: 56px 44px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.70));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.badge {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.08;
}

.sub {
  margin: 18px 0 0;
  max-width: 780px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-meta span {
  font-size: 12px;
  color: #2c3b56;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(13, 140, 255, 0.10);
}

/* ─── Sections ─── */

.section {
  margin-top: 44px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head .eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  font-family: "Sora", "Noto Sans SC", sans-serif;
}

.pricing-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ─── Grid ─── */

.grid {
  display: grid;
  gap: 12px;
}

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

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

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

.pricing-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pricing-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 600px;
}

/* ─── Cards ─── */

.card {
  background: var(--card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(9, 20, 36, 0.08);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

/* ─── Pillar Cards (Three-pillar overview) ─── */

.card.pillar {
  text-align: center;
  padding: 28px 22px;
}

.pillar-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 14px;
  color: var(--accent);
}

.card.pillar h3 {
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: 20px;
  margin-bottom: 4px;
}

.pillar-pos {
  display: inline-block;
  font-size: 12px !important;
  font-weight: 600;
  color: var(--accent) !important;
  background: rgba(13, 140, 255, 0.08);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px !important;
}

.card.pillar > p:last-child {
  margin-top: 10px;
  text-align: left;
}

/* ─── Feature Cards ─── */

.card.feature h3 {
  font-size: 16px;
  font-weight: 700;
}

/* ─── Pricing Cards ─── */

.pricing .plan {
  font-weight: 700;
  color: var(--text);
}

.pricing .price {
  margin-top: 8px;
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: 32px;
  color: #05224a;
}

.price-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.pricing .desc {
  margin: 6px 0 14px;
}

.pricing.featured {
  position: relative;
  border-color: rgba(13, 140, 255, 0.35);
  background:
    linear-gradient(180deg, rgba(13, 140, 255, 0.10), rgba(24, 201, 167, 0.06)),
    rgba(255, 255, 255, 0.78);
}

.featured-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), #0071d8);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ─── FAQ ─── */

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  padding: 12px 14px;
  transition: background 200ms ease;
}

.faq details[open] {
  background: rgba(255, 255, 255, 0.88);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq p {
  margin: 8px 0 2px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-size: 14px;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), #0071d8);
  box-shadow: 0 8px 24px rgba(13, 140, 255, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(13, 140, 255, 0.36);
}

.btn-ghost {
  color: #0d3d78;
  background: rgba(13, 140, 255, 0.10);
  border-color: rgba(13, 140, 255, 0.20);
}

.btn-ghost:hover {
  background: rgba(13, 140, 255, 0.16);
}

.btn.block {
  width: 100%;
}

/* ─── Misc ─── */

.plain-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.plain-list li + li {
  margin-top: 2px;
}

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

/* ─── Footer ─── */

.footer {
  max-width: 1120px;
  margin: 0 auto 20px;
  padding: 0 14px 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

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

/* ─── Reveal animation ─── */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 460ms ease, transform 460ms ease;
}

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

/* ─── Responsive ─── */

@media (max-width: 980px) {
  .cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-3 {
    grid-template-columns: 1fr;
  }

  .cards-2 {
    grid-template-columns: 1fr;
  }

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

  .pricing-grid-2 {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-around;
    margin-left: 0;
  }

  .hero {
    padding: 40px 24px;
  }
}

@media (max-width: 560px) {
  .cards-4 {
    grid-template-columns: 1fr;
  }

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

  .hero-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }

  .featured-tag {
    font-size: 10px;
    padding: 2px 10px;
  }
}

/* ─── Download toast & install modal ─── */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(15, 27, 45, 0.94);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(9, 20, 36, 0.35);
  font-size: 14px;
  max-width: 360px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  pointer-events: none;
}

.toast.in {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.toast-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
}

.toast-body strong {
  font-size: 14px;
  font-weight: 600;
}

.toast-file {
  font-size: 12px;
  opacity: 0.72;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  word-break: break-all;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.modal.in {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 20, 36, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(9, 20, 36, 0.28);
  padding: 32px 32px 28px;
  max-width: 460px;
  width: 100%;
  transform: scale(0.96);
  transition: transform 0.22s ease;
}

.modal.in .modal-card {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}

.modal-close:hover {
  background: rgba(15, 27, 45, 0.06);
  color: var(--text);
}

.modal-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--text);
}

.modal-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.modal-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.step-text code {
  background: rgba(13, 140, 255, 0.10);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.modal-fallback {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.modal-fallback a {
  color: var(--accent);
  margin-left: 4px;
}

@media (max-width: 480px) {
  .toast { left: 16px; right: 16px; max-width: none; }
  .modal-card { padding: 24px 22px 22px; }
  .modal-card h2 { font-size: 20px; }
}

/* ─── Legal pages (privacy / terms) ─── */

.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  color: var(--text);
  line-height: 1.7;
}

.legal h1 {
  font-size: 32px;
  margin: 0 0 8px;
}

.legal .updated {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 32px;
}

.legal h2 {
  font-size: 20px;
  margin: 32px 0 8px;
}

.legal p,
.legal ul {
  font-size: 15px;
  color: var(--text);
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin: 4px 0;
}

.legal a {
  color: var(--accent);
}

.legal .back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.legal .back:hover {
  color: var(--accent);
}
