/* ============================================
   TradeFacts.io — Brand Stylesheet
   Colors: Navy #0F1F3D | Teal #00C2A8 | Pale Blue #D1E0F0 | Off-white #F8F9FB
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Lora:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --navy:      #0F1F3D;
  --navy-mid:  #1a3560;
  --navy-light:#2a4a7f;
  --teal:      #00C2A8;
  --teal-dark: #009e88;
  --pale-blue: #D1E0F0;
  --off-white: #F8F9FB;
  --white:     #FFFFFF;
  --gray-100:  #F0F4F8;
  --gray-200:  #E2E8F0;
  --gray-400:  #94A3B8;
  --gray-600:  #64748B;
  --gray-800:  #334155;
  --text:      #1E293B;
  --radius:    8px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(15,31,61,0.08);
  --shadow-lg: 0 12px 48px rgba(15,31,61,0.14);
  --transition: all 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, serif;
  color: var(--navy);
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { color: var(--gray-800); line-height: 1.75; }

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

code, pre {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88em;
}

/* ---- Layout ---- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }
section.section--tight { padding: 56px 0; }

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav__logo svg { height: 36px; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav__links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--gray-800);
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.nav__links a:hover { color: var(--navy); background: var(--gray-100); }
.nav__links a.active { color: var(--navy); font-weight: 600; }

.nav__cta {
  background: var(--teal) !important;
  color: var(--white) !important;
  padding: 8px 20px !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
}

.nav__cta:hover { background: var(--teal-dark) !important; }

.nav__mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn--primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--white); }

.btn--secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--secondary:hover { background: var(--navy); color: var(--white); }

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn--outline-white:hover { background: rgba(255,255,255,0.1); border-color: var(--white); color: var(--white); }

.btn--lg { padding: 16px 36px; font-size: 1.05rem; }
.btn--sm { padding: 8px 18px; font-size: 0.85rem; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3560 60%, #163354 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(0,194,168,0.12) 0%, transparent 60%);
  pointer-events: none;
}

/* Grid texture overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,194,168,0.15);
  border: 1px solid rgba(0,194,168,0.3);
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 span { color: var(--teal); }

.hero__sub {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero__stat-num {
  font-family: 'Lora', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--teal);
  display: block;
}

.hero__stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Data table visual (hero right side) */
.hero__visual {
  position: relative;
}

.data-table-viz {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.dtv__header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  background: rgba(0,194,168,0.15);
  border-bottom: 1px solid rgba(0,194,168,0.2);
  padding: 12px 16px;
  gap: 8px;
}

.dtv__header span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.dtv__row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 10px 16px;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: var(--transition);
}

.dtv__row:hover { background: rgba(255,255,255,0.03); }

.dtv__row span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dtv__row span.hts { color: rgba(255,255,255,0.95); font-weight: 500; }
.dtv__row span.rate { color: #7dd3c8; }
.dtv__row span.badge {
  display: inline-block;
  background: rgba(0,194,168,0.2);
  color: var(--teal);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}

.dtv__badge-changed {
  background: rgba(251,191,36,0.2) !important;
  color: #fbbf24 !important;
}

.dtv__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0,0,0,0.2);
}

.dtv__footer span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  font-family: 'JetBrains Mono', monospace;
}

.dtv__footer .live {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}

.dtv__footer .live::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ---- Features / Cards ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--teal);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.feature-card:hover::before { opacity: 1; }

.feature-card__icon {
  width: 44px;
  height: 44px;
  background: rgba(0,194,168,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--teal);
}

.feature-card__icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin-bottom: 12px; font-size: 1.15rem; }
.feature-card p { font-size: 0.92rem; color: var(--gray-600); }

/* ---- Section headings ---- */
.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
  font-family: 'DM Sans', sans-serif;
}

.section-heading { margin-bottom: 16px; }
.section-sub { color: var(--gray-600); font-size: 1.05rem; max-width: 540px; }
.section-header { margin-bottom: 56px; }
.section-header.centered { text-align: center; }
.section-header.centered .section-sub { margin: 0 auto; }

/* ---- Code blocks ---- */
.code-block {
  background: var(--navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.code-block__lang {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.code-block__dots { display: flex; gap: 6px; }
.code-block__dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.code-block__dot:nth-child(1) { background: #ff5f57; }
.code-block__dot:nth-child(2) { background: #febc2e; }
.code-block__dot:nth-child(3) { background: #28c840; }

.code-block__body {
  padding: 20px 24px;
  overflow-x: auto;
}

.code-block__body pre {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  line-height: 1.7;
  white-space: pre;
}

.code-block__body .tok-comment { color: #6a9955; }
.code-block__body .tok-key { color: #9cdcfe; }
.code-block__body .tok-str { color: #ce9178; }
.code-block__body .tok-num { color: #b5cea8; }
.code-block__body .tok-kw { color: var(--teal); }
.code-block__body .tok-url { color: #d4a0ff; }

/* ---- Pricing ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.pricing-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px;
  background: var(--white);
  position: relative;
  transition: var(--transition);
}

.pricing-card--featured {
  border-color: var(--teal);
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 100px;
}

.pricing-card__tier {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.pricing-card h3 {
  color: inherit;
  margin-bottom: 8px;
}

.pricing-card--featured h3 { color: var(--white); }

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 24px 0;
}

.pricing-card__amount {
  font-family: 'Lora', serif;
  font-size: 3rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}

.pricing-card--featured .pricing-card__amount { color: var(--white); }

.pricing-card__currency {
  font-size: 1.2rem;
  color: var(--gray-600);
  align-self: flex-start;
  margin-top: 8px;
}

.pricing-card--featured .pricing-card__currency { color: rgba(255,255,255,0.6); }

.pricing-card__period {
  font-size: 0.88rem;
  color: var(--gray-600);
}

.pricing-card--featured .pricing-card__period { color: rgba(255,255,255,0.5); }

.pricing-card__desc {
  font-size: 0.92rem;
  color: var(--gray-600);
  margin-bottom: 28px;
  line-height: 1.6;
}

.pricing-card--featured .pricing-card__desc { color: rgba(255,255,255,0.65); }

.pricing-card__features {
  list-style: none;
  margin-bottom: 32px;
}

.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.92rem;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
}

.pricing-card--featured .pricing-card__features li {
  color: rgba(255,255,255,0.8);
  border-bottom-color: rgba(255,255,255,0.08);
}

.pricing-card__features li::before {
  content: '✓';
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- CTA Banner ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3560 100%);
  border-radius: var(--radius-lg);
  padding: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(0,194,168,0.15) 0%, transparent 60%);
}

.cta-banner h2 { color: var(--white); position: relative; margin-bottom: 16px; }
.cta-banner p { color: rgba(255,255,255,0.65); position: relative; margin-bottom: 32px; font-size: 1.05rem; }
.cta-banner .btn-group { display: flex; gap: 14px; justify-content: center; position: relative; }

/* ---- Trust bar ---- */
.trust-bar {
  background: var(--gray-100);
  padding: 20px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.trust-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
}

.trust-item svg { color: var(--teal); width: 16px; height: 16px; }

/* ---- Footer ---- */
.footer {
  background: var(--navy);
  padding: 60px 0 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  margin-top: 16px;
  line-height: 1.7;
  max-width: 260px;
}

.footer__col h4 {
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer__col ul { list-style: none; }

.footer__col ul li { margin-bottom: 10px; }

.footer__col ul li a {
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer__col ul li a:hover { color: var(--teal); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__bottom p {
  color: rgba(255,255,255,0.3);
  font-size: 0.82rem;
}

.footer__bottom a { color: rgba(255,255,255,0.3); }
.footer__bottom a:hover { color: var(--teal); }

/* ---- Page header (inner pages) ---- */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3560 100%);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.page-header__inner { position: relative; z-index: 1; }
.page-header h1 { color: var(--white); margin-bottom: 12px; }
.page-header p { color: rgba(255,255,255,0.65); font-size: 1.1rem; max-width: 560px; }

/* ---- Tables ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  background: var(--navy);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-800);
  vertical-align: top;
}

.data-table tr:hover td { background: var(--gray-100); }

.data-table code {
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--navy);
}

/* ---- Badges / Pills ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge--teal { background: rgba(0,194,168,0.1); color: var(--teal-dark); }
.badge--navy { background: rgba(15,31,61,0.08); color: var(--navy); }
.badge--gray { background: var(--gray-200); color: var(--gray-600); }

/* ---- Form ---- */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,194,168,0.12);
}

.form-group textarea { min-height: 120px; resize: vertical; }

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  section { padding: 56px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 40px 24px; }
  .cta-banner .btn-group { flex-direction: column; align-items: center; }
  .nav__links { display: none; }
  .nav__mobile-toggle { display: block; }
  .trust-bar__inner { gap: 24px; }
}

/* ---- Utilities ---- */
.text-teal { color: var(--teal); }
.text-navy { color: var(--navy); }
.text-muted { color: var(--gray-600); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.bg-gray { background: var(--gray-100); }
.bg-off-white { background: var(--off-white); }
.rounded { border-radius: var(--radius-lg); }
.p-8 { padding: 32px; }
