:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --soft: #eef2f7;
  --line: #e2e8f0;
  --ink: #0f172a;
  --muted: #475569;
  --slate: #0f172a;
  --hud: #18222c;
  --amber: #f59e0b;
  --amber-deep: #d97706;
  --amber-soft: #fffbeb;
  --emerald: #10b981;
  --emerald-deep: #059669;
  --coral: #ef4444;
  --radius: 18px;
  --max-w: 1060px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a:hover {
  text-decoration: underline;
}

/* Bilingual visibility: default EN visible so static crawlers/bots read clean English HTML */
html[data-lang="vi"] .lang-en {
  display: none !important;
}

html:not([data-lang="vi"]) .lang-vi {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
}

.nav-links a {
  color: #cbd5e1;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--amber);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn.active {
  background: var(--amber);
  color: var(--slate);
}

/* Hero Section */
.hero {
  background: radial-gradient(circle at 82% 20%, rgba(245, 158, 11, 0.18), transparent 46%),
    radial-gradient(circle at 18% 90%, rgba(16, 185, 129, 0.14), transparent 44%),
    var(--slate);
  color: #fff;
  padding: 54px 0 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #6ee7b7;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.hero-sub {
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: 17px;
  max-width: 560px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--amber);
  color: var(--slate);
  font-weight: 800;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-primary:hover {
  background: #fbbf24;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 12px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  text-decoration: none;
}

.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: #94a3b8;
}

/* Mock Stamp Card Preview */
.cards-grid > *,
.tiers-grid > * {
  min-width: 0;
}

.phone-preview {
  min-width: 0;
  background: linear-gradient(160deg, #1e293b 0%, #0b1120 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  padding: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.phone-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 12px;
}

.hud-verified {
  color: #6ee7b7;
  font-weight: 700;
}

.viewfinder {
  position: relative;
  border-radius: 18px;
  min-height: 290px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.58) 100%),
    url("/assets/hero-site.jpg") center / cover no-repeat;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stamp-card {
  position: relative;
  z-index: 1;
  background: rgba(15, 23, 42, 0.88);
  border-left: 5px solid var(--amber);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: #e2e8f0;
  backdrop-filter: blur(6px);
}

.stamp-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--amber);
  margin-bottom: 2px;
}

.stamp-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.stamp-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 6px;
}

.stamp-meta {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.5;
}

.stamp-id {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  color: #6ee7b7;
}

/* Sections */
.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--amber-soft);
  color: var(--amber-deep);
  margin-bottom: 12px;
  border: 1px solid #fde68a;
}

.card-icon svg {
  width: 21px;
  height: 21px;
  display: block;
}

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

.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* Pricing / Tiers */
.tiers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.tier {
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.tier-pro {
  background: var(--slate);
  color: #fff;
  border-color: var(--amber);
}

.tier-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  margin-bottom: 10px;
}

.tier-pro .tier-badge {
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber);
}

.tier h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.tier ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 14.5px;
}

.tier-pro ul {
  color: #cbd5e1;
}

/* Legal Document Pages (/privacy, /terms) */
.doc-wrap {
  padding: 42px 0 68px;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px;
  max-width: 840px;
  margin: 0 auto;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04);
  overflow-wrap: break-word;
}

.doc-card a,
.doc-card code {
  overflow-wrap: anywhere;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.doc-card h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.6vw, 34px);
  letter-spacing: -0.02em;
}

.doc-card h2 {
  margin: 28px 0 10px;
  font-size: 19px;
  color: var(--slate);
}

.doc-card p {
  margin: 0 0 12px;
  color: #334155;
}

.doc-card ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #334155;
  display: grid;
  gap: 7px;
}

.callout-box {
  background: var(--amber-soft);
  border: 1px solid #fde68a;
  border-left: 4px solid var(--amber-deep);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 14.5px;
  color: #78350f;
}

.table-wrap {
  overflow-x: auto;
  margin: 14px 0 18px;
}

.table-wrap table {
  min-width: 520px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--soft);
  font-weight: 700;
  color: var(--slate);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Footer */
.footer {
  background: var(--slate);
  color: #94a3b8;
  padding: 28px 0;
  font-size: 13.5px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer a {
  color: #cbd5e1;
}

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

@media (max-width: 860px) {
  .hero-grid,
  .cards-grid,
  .tiers-grid {
    grid-template-columns: 1fr;
  }

  .doc-card {
    padding: 24px 18px;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 16px;
  }

  .topbar-inner {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: 0;
    row-gap: 10px;
  }

  .nav-right {
    display: contents;
  }

  .brand {
    order: 1;
    font-size: 17px;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .lang-switch {
    order: 2;
    margin-left: auto;
  }

  .nav-links {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 16px;
    font-size: 13.5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hero {
    padding: 32px 0 42px;
  }

  .section {
    padding: 40px 0;
  }

  .doc-wrap {
    padding: 20px 0 44px;
  }

  .doc-card {
    padding: 22px 16px;
    border-radius: 16px;
  }

  .doc-card h1 {
    font-size: 24px;
    line-height: 1.25;
  }

  .callout-box {
    padding: 12px 14px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    justify-content: center;
    width: 100%;
  }
}
