/* BXM Freight Intelligence — core stylesheet */

:root {
  --navy-900: #0a1628;
  --navy-800: #0f2137;
  --navy-700: #16304d;
  --navy-600: #1e4066;
  --line: #e2e8f0;
  --line-dark: #1e3450;

  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --ink-4: #94a3b8;

  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-softer: #fbfcfe;

  --accent: #f59e0b;
  --accent-dark: #d97706;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --red: #dc2626;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 10px 20px -5px rgba(15, 23, 42, .08);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, .08), 0 25px 50px -12px rgba(15, 23, 42, .16);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.35rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: .9rem;
}
.eyebrow.light { color: var(--accent); }

.lede { font-size: 1.13rem; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: .82rem; letter-spacing: -.04em;
}
.brand-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -.02em; }
.brand-sub { display: block; font-size: .68rem; font-weight: 500; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; line-height: 1; margin-top: 2px; }

.nav-links { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--ink-2); font-size: .93rem; font-weight: 500; text-decoration: none;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--ink); font-weight: 600; }

.nav-cta { display: flex; gap: 10px; align-items: center; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 40px; height: 38px; cursor: pointer; color: var(--ink);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: .93rem; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
  font-family: inherit;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.btn-primary { background: var(--navy-900); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }

.btn-accent { background: var(--accent); color: #1a1206; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }

.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: #cbd5e1; background: var(--bg-soft); }

.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); }

.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(1000px 500px at 78% -10%, rgba(245,158,11,.16), transparent 60%),
    radial-gradient(800px 400px at 8% 10%, rgba(37,99,235,.18), transparent 55%),
    linear-gradient(160deg, var(--navy-900), #071120);
  color: #fff;
  padding: 84px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 25%, #000, transparent 78%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 .hl { color: var(--accent); }
.hero p.lede { color: #b9c8dc; max-width: 56ch; font-size: 1.16rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.hero-note { margin-top: 26px; font-size: .85rem; color: #8ba1bd; display: flex; align-items: center; gap: 8px; }

/* ---------- Query console (visual mock) ---------- */

.console {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: var(--ink);
}
.console-bar {
  background: var(--navy-800);
  padding: 11px 16px;
  display: flex; align-items: center; gap: 8px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.console-bar .label {
  margin-left: 8px; color: #8ba1bd; font-size: .76rem; font-family: var(--mono);
}
.console-body { padding: 20px; }

.field-row { display: flex; gap: 8px; }
.field {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: var(--mono);
  color: var(--ink);
  background: var(--bg-softer);
  width: 100%;
}
.field:focus { outline: 2px solid var(--blue); outline-offset: -1px; background: #fff; }

.result { margin-top: 18px; }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.result-id { font-family: var(--mono); font-size: .88rem; font-weight: 600; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: #fffbeb; color: var(--accent-dark); }
.badge-gray { background: #f1f5f9; color: var(--ink-3); }

.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; margin-bottom: 18px; }
.kv div { min-width: 0; }
.kv dt, .kv .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); font-weight: 600; }
.kv dd, .kv .v { margin: 2px 0 0; font-size: .92rem; font-weight: 600; color: var(--ink); }

.timeline { border-top: 1px solid var(--line); padding-top: 16px; }
.tl-item { display: flex; gap: 12px; padding: 7px 0; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); margin-top: 7px; flex: none; position: relative; }
.tl-item.done .tl-dot { background: var(--green); }
.tl-item.current .tl-dot { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.tl-item:not(:last-child) .tl-dot::after {
  content: ''; position: absolute; left: 50%; top: 12px; width: 1px; height: 24px;
  background: var(--line); transform: translateX(-50%);
}
.tl-body { min-width: 0; }
.tl-title { font-size: .89rem; font-weight: 600; }
.tl-meta { font-size: .78rem; color: var(--ink-3); font-family: var(--mono); }

/* ---------- Sections ---------- */

section { padding: 76px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--navy-900); color: #fff; }
.section-dark h2 { color: #fff; }
.section-dark p { color: #b9c8dc; }

.section-head { max-width: 660px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-2); font-size: .93rem; margin: 0; }
.card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card-icon.amber { background: #fffbeb; color: var(--accent-dark); }
.card-icon.green { background: var(--green-soft); color: var(--green); }
.card-icon.navy { background: #eef2f7; color: var(--navy-700); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.stat-lbl { font-size: .84rem; color: #9fb2c9; }

/* steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: s; content: counter(s);
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy-900); color: #fff;
  font-size: .9rem; font-weight: 700; margin-bottom: 14px;
}

/* ---------- Pricing ---------- */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.plan {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  display: flex; flex-direction: column;
  position: relative;
}
.plan.featured {
  border-color: var(--navy-900);
  box-shadow: var(--shadow-lg);
}
.plan-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #1a1206;
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px; white-space: nowrap;
}
.plan-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.plan-desc { font-size: .88rem; color: var(--ink-3); min-height: 42px; margin-bottom: 18px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.plan-amt { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; }
.plan-per { color: var(--ink-3); font-size: .92rem; font-weight: 500; }
.plan-bill { font-size: .8rem; color: var(--ink-4); margin-bottom: 22px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 26px; }
.plan li {
  font-size: .9rem; color: var(--ink-2);
  padding: 7px 0 7px 26px; position: relative;
}
.plan li::before {
  content: ''; position: absolute; left: 0; top: 13px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.plan .btn { margin-top: auto; }

.checkout-msg {
  margin-top: 12px; font-size: .84rem; text-align: center; min-height: 20px;
}
.checkout-msg.error { color: var(--red); }

.billing-toggle {
  display: inline-flex; background: #fff; border: 1px solid var(--line);
  border-radius: 100px; padding: 4px; gap: 4px; margin: 0 auto 40px; box-shadow: var(--shadow-sm);
}
.billing-toggle button {
  border: 0; background: none; padding: 8px 20px; border-radius: 100px;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink-3); cursor: pointer;
}
.billing-toggle button.on { background: var(--navy-900); color: #fff; }
.save-pill { font-size: .7rem; background: var(--green-soft); color: var(--green); padding: 2px 7px; border-radius: 100px; margin-left: 6px; font-weight: 700; }

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; min-width: 620px; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--mono); }

/* ---------- Legal / prose ---------- */

.page-head {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
}
.page-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: .3rem; }
.page-head p { color: var(--ink-3); margin: 0; }

.prose { padding: 56px 0 80px; }
.prose h2 { font-size: 1.35rem; margin-top: 2.4rem; }
.prose h3 { font-size: 1.05rem; margin-top: 1.7rem; }
.prose p, .prose li { color: var(--ink-2); font-size: .96rem; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: .45rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.callout {
  background: var(--blue-soft);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: .92rem;
}
.callout.amber { background: #fffbeb; border-color: #fde68a; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.form-field input, .form-field textarea, .form-field select {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: .93rem; background: #fff; color: var(--ink); width: 100%;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 2px solid var(--blue); outline-offset: -1px;
}
.form-field textarea { resize: vertical; min-height: 120px; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(140deg, var(--navy-800), #071120);
  color: #fff; text-align: center;
  padding: 72px 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #b9c8dc; max-width: 52ch; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-900);
  color: #93a7c0;
  padding: 60px 0 28px;
  font-size: .9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 {
  color: #fff; font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #93a7c0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-sub { color: #7189a6; }
.footer-addr { font-style: normal; line-height: 1.75; margin-top: 16px; color: #93a7c0; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-dark);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .84rem; color: #7189a6;
}
.pay-marks { display: flex; align-items: center; gap: 10px; color: #7189a6; font-size: .8rem; }

/* ---------- Status pages ---------- */

.status-page { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.status-icon {
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 22px;
}
.status-icon.ok { background: var(--green-soft); color: var(--green); }
.status-icon.warn { background: #fffbeb; color: var(--accent-dark); }

/* ---------- Utilities ---------- */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.flex-row { display: flex; gap: 12px; flex-wrap: wrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .plan.featured { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 18px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 0; border-bottom: 1px solid var(--bg-soft); }
  .nav-toggle { display: block; }
  .nav-cta .btn-outline { display: none; }
  .nav-cta { margin-left: 12px; }
  .grid-2, .grid-3, .grid-4, .steps, .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .hero { padding: 60px 0 68px; }
}
