/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0f172a;
  --navy-mid:   #1e293b;
  --navy-light: #334155;
  --slate:      #64748b;
  --slate-light:#94a3b8;
  --border:     #e2e8f0;
  --bg:         #f8fafc;
  --white:      #ffffff;
  --green:      #059669;
  --green-light:#d1fae5;
  --green-dark: #047857;
  --text:       #0f172a;
  --text-2:     #475569;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:  0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
  --radius:     8px;
  --radius-lg:  12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

/* ─── Navigation ────────────────────────────────────────────────────────────── */
nav {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 60px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--white); font-weight: 700; font-size: 1rem; letter-spacing: -.01em;
}
.nav-logo .dot { color: var(--green); }
.nav-links {
  display: flex; align-items: center; gap: 28px; list-style: none;
}
.nav-links a {
  color: var(--slate-light); font-size: .875rem; font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--green); color: var(--white) !important;
  padding: 7px 16px; border-radius: 6px; font-weight: 600 !important;
  font-size: .8125rem !important; transition: background .15s !important;
}
.nav-cta:hover { background: var(--green-dark) !important; }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  padding: 88px 24px 80px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(5,150,105,.15); border: 1px solid rgba(5,150,105,.3);
  color: #34d399; font-size: .75rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 12px; border-radius: 20px;
  margin-bottom: 24px;
}
.hero h1 {
  color: var(--white); font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; line-height: 1.18; letter-spacing: -.03em;
  max-width: 760px; margin: 0 auto 20px;
}
.hero h1 span { color: #34d399; }
.hero-sub {
  color: var(--slate-light); font-size: 1.125rem; line-height: 1.7;
  max-width: 620px; margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--green); color: var(--white);
  padding: 13px 28px; border-radius: var(--radius); font-weight: 600;
  font-size: .9375rem; transition: background .15s, transform .1s;
  border: none; cursor: pointer; display: inline-block;
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); color: var(--white); }
.btn-outline {
  background: transparent; color: var(--white);
  padding: 13px 28px; border-radius: var(--radius); font-weight: 600;
  font-size: .9375rem; border: 1.5px solid rgba(255,255,255,.25);
  transition: border-color .15s, background .15s; cursor: pointer; display: inline-block;
}
.btn-outline:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.05); color: var(--white); }

/* ─── Stats Bar ─────────────────────────────────────────────────────────────── */
.stats {
  background: var(--navy-mid);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.stats-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; justify-content: center; flex-wrap: wrap;
  padding: 0 24px;
}
.stat-item {
  padding: 22px 40px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.06);
}
.stat-item:last-child { border-right: none; }
.stat-num { color: #34d399; font-size: 1.625rem; font-weight: 800; letter-spacing: -.02em; }
.stat-label { color: var(--slate-light); font-size: .8125rem; font-weight: 500; margin-top: 2px; }

/* ─── Sections ──────────────────────────────────────────────────────────────── */
section { padding: 80px 24px; }
.section-inner { max-width: 1120px; margin: 0 auto; }
.section-label {
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--green); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.125rem); font-weight: 800;
  letter-spacing: -.025em; color: var(--navy); line-height: 1.25;
  margin-bottom: 16px;
}
.section-sub {
  color: var(--text-2); font-size: 1.0625rem; max-width: 600px;
  line-height: 1.7; margin-bottom: 48px;
}

/* ─── Fields Grid ───────────────────────────────────────────────────────────── */
#fields { background: var(--bg); }
.fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.field-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow);
}
.field-name {
  font-size: .875rem; font-weight: 700; color: var(--navy); margin-bottom: 4px;
}
.field-desc { font-size: .8125rem; color: var(--slate); line-height: 1.5; }
.field-tag {
  display: inline-block; margin-top: 8px;
  background: var(--green-light); color: var(--green-dark);
  font-size: .6875rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 4px;
}
.field-tag.unique { background: #fef3c7; color: #92400e; }

/* ─── Sample Table ──────────────────────────────────────────────────────────── */
#sample { background: var(--white); }
.sample-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}
.sample-table {
  width: 100%; border-collapse: collapse; font-size: .8125rem;
  white-space: nowrap;
}
.sample-table thead { background: var(--navy); }
.sample-table thead th {
  color: var(--slate-light); font-weight: 600; font-size: .75rem;
  letter-spacing: .04em; padding: 10px 14px; text-align: left;
}
.sample-table tbody tr { border-bottom: 1px solid var(--border); }
.sample-table tbody tr:last-child { border-bottom: none; }
.sample-table tbody td {
  padding: 9px 14px; color: var(--text-2); background: var(--white);
}
.sample-table tbody tr:hover td { background: var(--bg); }
.badge-co { background: var(--green-light); color: var(--green-dark); padding: 1px 7px; border-radius: 4px; font-size: .7rem; font-weight: 700; }
.badge-ls { background: #fef3c7; color: #92400e; padding: 1px 7px; border-radius: 4px; font-size: .7rem; font-weight: 700; }
.badge-open { background: #d1fae5; color: #065f46; padding: 1px 7px; border-radius: 4px; font-size: .7rem; font-weight: 700; }
.blurred-row td { filter: blur(4px); user-select: none; pointer-events: none; }
.sample-cta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.sample-note { font-size: .875rem; color: var(--slate); }

/* ─── Use Cases ─────────────────────────────────────────────────────────────── */
#usecases { background: var(--bg); }
.usecases-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.usecase-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
  box-shadow: var(--shadow);
}
.usecase-icon {
  font-size: 1.75rem; margin-bottom: 14px;
}
.usecase-card h3 {
  font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px;
}
.usecase-card p { font-size: .875rem; color: var(--text-2); line-height: 1.6; }

/* ─── Pricing ───────────────────────────────────────────────────────────────── */
#pricing { background: var(--white); }
.pricing-tabs {
  display: flex; gap: 0; margin-bottom: 40px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  overflow: hidden; width: fit-content;
}
.pricing-tab {
  padding: 10px 28px; font-size: .9rem; font-weight: 600;
  background: var(--white); color: var(--slate); cursor: pointer;
  border: none; transition: all .15s;
}
.pricing-tab.active { background: var(--navy); color: var(--white); }
.pricing-tab:hover:not(.active) { background: var(--bg); }

.pricing-panel { display: none; }
.pricing-panel.active { display: block; }

/* Downloads */
.dl-featured {
  background: var(--navy); border-radius: var(--radius-lg);
  padding: 32px 36px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
}
.dl-featured-text h3 { color: var(--white); font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.dl-featured-text p { color: var(--slate-light); font-size: .9rem; line-height: 1.6; max-width: 500px; }
.dl-featured-meta { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.dl-meta-item { font-size: .8125rem; color: #34d399; font-weight: 500; }
.dl-featured-price { text-align: right; }
.price-big { color: var(--white); font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em; }
.price-note { color: var(--slate-light); font-size: .8rem; margin-top: 2px; }

.dl-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.dl-card {
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; background: var(--white); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.dl-card h4 { font-size: 1rem; font-weight: 700; color: var(--navy); }
.dl-card .price { font-size: 1.5rem; font-weight: 800; color: var(--green); letter-spacing: -.02em; }
.dl-card .desc { font-size: .8375rem; color: var(--text-2); line-height: 1.5; flex: 1; }
.dl-card ul { list-style: none; }
.dl-card ul li { font-size: .8125rem; color: var(--text-2); padding: 3px 0; }
.dl-card ul li::before { content: "✓ "; color: var(--green); font-weight: 700; }

.state-selector {
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; background: var(--bg);
}
.state-selector h4 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.state-selector p { font-size: .875rem; color: var(--text-2); margin-bottom: 16px; }
.state-selector select {
  padding: 9px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .875rem; color: var(--text); background: var(--white);
  min-width: 220px; margin-right: 10px; cursor: pointer;
  outline: none; appearance: auto;
}
.state-selector select:focus { border-color: var(--green); }

/* API Pricing */
.api-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.api-card {
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 24px; background: var(--white); box-shadow: var(--shadow);
  position: relative; display: flex; flex-direction: column; gap: 16px;
}
.api-card.featured {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(5,150,105,.08);
}
.api-card-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: var(--white);
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 12px; border-radius: 20px;
}
.api-card h4 { font-size: 1rem; font-weight: 700; color: var(--navy); }
.api-card .price { font-size: 1.875rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.api-card .price span { font-size: .875rem; font-weight: 500; color: var(--slate); }
.api-card ul { list-style: none; flex: 1; }
.api-card ul li { font-size: .8375rem; color: var(--text-2); padding: 4px 0; border-bottom: 1px solid var(--bg); }
.api-card ul li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.payg-note {
  margin-top: 24px; padding: 16px 20px;
  background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border);
  font-size: .875rem; color: var(--text-2);
}

/* Country selector */
.country-selector {
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; background: var(--bg); margin-bottom: 16px;
}
.country-selector h4 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.country-selector p { font-size: .875rem; color: var(--text-2); margin-bottom: 16px; }
.country-selector select {
  padding: 9px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: .875rem; color: var(--text); background: var(--white);
  min-width: 260px; margin-right: 10px; cursor: pointer; appearance: auto;
}
#country-price-display {
  display: inline-block; font-weight: 700; color: var(--green);
  font-size: 1.125rem; vertical-align: middle;
}

/* ─── API Docs Preview ──────────────────────────────────────────────────────── */
#api-docs { background: var(--bg); }
.endpoint-block {
  background: var(--navy); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow-md);
}
.endpoint-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.method {
  font-size: .75rem; font-weight: 800; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 4px; font-family: monospace;
}
.method.get { background: rgba(16,185,129,.2); color: #34d399; }
.endpoint-path {
  font-family: 'Fira Code', 'Courier New', monospace;
  color: var(--white); font-size: .875rem;
}
.endpoint-desc { color: var(--slate-light); font-size: .8125rem; margin-left: auto; }
.endpoint-body {
  padding: 16px 20px;
}
pre {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: .8rem; color: #94a3b8;
  white-space: pre-wrap; word-break: break-word;
  line-height: 1.6;
}
pre .key { color: #93c5fd; }
pre .str { color: #86efac; }
pre .num { color: #fdba74; }
pre .bool { color: #c084fc; }

/* ─── FAQ ───────────────────────────────────────────────────────────────────── */
#faq { background: var(--white); }
.faq-list { max-width: 720px; }
.faq-item {
  border-bottom: 1px solid var(--border); padding: 20px 0;
}
.faq-q {
  font-weight: 700; color: var(--navy); font-size: .9375rem;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  user-select: none; gap: 16px;
}
.faq-q::after { content: "+"; color: var(--green); font-size: 1.25rem; flex-shrink: 0; transition: transform .2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; color: var(--text-2); font-size: .9rem; line-height: 1.7; margin-top: 12px; }
.faq-item.open .faq-a { display: block; }

/* ─── Footer ────────────────────────────────────────────────────────────────── */
footer {
  background: var(--navy); color: var(--slate-light);
  padding: 48px 24px 32px;
}
.footer-inner {
  max-width: 1120px; margin: 0 auto;
}
.footer-top {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px;
  margin-bottom: 40px;
}
.footer-brand { max-width: 280px; }
.footer-logo {
  font-size: 1rem; font-weight: 800; color: var(--white); margin-bottom: 10px;
}
.footer-logo .dot { color: var(--green); }
.footer-brand p { font-size: .875rem; line-height: 1.6; }
.footer-links h5 {
  color: var(--white); font-size: .8125rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px;
}
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 8px; }
.footer-links ul a { color: var(--slate-light); font-size: .875rem; }
.footer-links ul a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: .8125rem;
}
.footer-legal { font-size: .75rem; color: var(--navy-light); margin-top: 8px; line-height: 1.5; }

/* ─── Buttons (misc) ────────────────────────────────────────────────────────── */
.btn-sm {
  padding: 8px 18px; font-size: .8375rem; font-weight: 600;
  border-radius: 6px; border: none; cursor: pointer; transition: all .15s;
  display: inline-block;
}
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); color: var(--white); }
.btn-ghost {
  background: transparent; color: var(--green); border: 1.5px solid var(--green);
}
.btn-ghost:hover { background: var(--green-light); }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 64px 20px 56px; }
  .stat-item { padding: 18px 20px; border-right: none; }
  .dl-featured { flex-direction: column; }
  .dl-featured-price { text-align: left; }
  .footer-top { flex-direction: column; }
}
