/*
 * fleetstracker marketing site — design system.
 * Palette + type deliberately mirror the product UI (frontend/src/index.css) so the site and the
 * app read as one product.
 */

:root {
  --bg: #0b0e13;
  --bg-2: #0f141b;
  --panel: #141b24;
  --panel-2: #1a232e;
  --line: #243140;
  --grid: #33445a;
  --txt: #e7edf3;
  --dim: #8a99a8;
  --faint: #5c6b7a;
  --amber: #ffb020;
  --amber-soft: #3a2c10;
  --green: #3ddc84;
  --green-soft: #10301f;
  --red: #ff5d5d;
  --red-soft: #3a1414;
  --cyan: #46c6ff;
  --cyan-soft: #0d2a3a;
  --sans: 'Archivo', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --r: 14px;
  --maxw: 1140px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  max-width: 100%;
}
a {
  color: inherit;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
section {
  padding: 104px 0;
  position: relative;
}
.alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

/* ---------------- type ---------------- */
h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-weight: 800;
}
h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.1rem);
}
h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
}
h3 {
  font-size: 1.12rem;
  line-height: 1.35;
}
p {
  margin: 0;
  color: var(--dim);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  margin-bottom: 18px;
  display: block;
}
.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  max-width: 62ch;
}
.sec-head {
  max-width: 68ch;
  margin-bottom: 56px;
}
.sec-head p {
  margin-top: 18px;
}
.center {
  margin-inline: auto;
  text-align: center;
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  padding: 13px 22px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, #ffc247, var(--amber));
  color: #1a1204;
  box-shadow: 0 8px 26px rgba(255, 176, 32, 0.24);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(255, 176, 32, 0.34);
}
.btn-ghost {
  border-color: var(--line);
  background: var(--panel);
  color: var(--txt);
}
.btn-ghost:hover {
  border-color: var(--grid);
  transform: translateY(-2px);
}
.btn-sm {
  padding: 10px 16px;
  font-size: 13.5px;
}

/* ---------------- nav ---------------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 19, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 17px;
}
.mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--amber), #ff8a00);
  color: #14100a;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(255, 176, 32, 0.3);
}
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: 26px;
}
.nav-links a {
  text-decoration: none;
  color: var(--dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: var(--txt);
}
.nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------------- hero ---------------- */
.hero {
  padding: 92px 0 84px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -30% 0 auto -10%;
  height: 760px;
  background:
    radial-gradient(760px 420px at 18% 22%, rgba(255, 176, 32, 0.13), transparent 62%),
    radial-gradient(680px 420px at 82% 8%, rgba(70, 198, 255, 0.11), transparent 62%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
}
.hl {
  background: linear-gradient(100deg, var(--amber), #ffd98a 55%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
}
.hero-cta {
  display: flex;
  gap: 13px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.hero-note {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.trust {
  margin-top: 66px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.trust-lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--faint);
}
.trust-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  display: inline-block;
}

/* ---------------- cards / grids ---------------- */
.grid {
  display: grid;
  gap: 18px;
}
.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.g4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
}
.card h3 {
  margin-bottom: 10px;
}
.card p {
  font-size: 14.6px;
}
.ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--amber);
}
.ico svg {
  width: 20px;
  height: 20px;
}
.ico.cy {
  color: var(--cyan);
}
.ico.gr {
  color: var(--green);
}
.ico.rd {
  color: var(--red);
}

/* ---------------- problem list ---------------- */
.pain {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.pain:last-child {
  border-bottom: 0;
}
.pain .x {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--red-soft);
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}
.pain b {
  display: block;
  font-size: 15.5px;
  margin-bottom: 3px;
}
.pain p {
  font-size: 14.4px;
}

/* ---------------- steps ---------------- */
.step-n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--amber);
  margin-bottom: 14px;
  display: block;
  font-weight: 500;
}

/* ---------------- demo board ---------------- */
.demo-shell {
  border: 1px solid var(--grid);
  border-radius: 16px;
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.55);
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.dots {
  display: flex;
  gap: 6px;
}
.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a3744;
  display: block;
}
.demo-url {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--faint);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 12px;
}
.live-tag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green);
}
.live-tag i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
.demo-body {
  padding: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  padding: 9px 12px;
}
.stat .l {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat .l i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.stat .v {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.stat.alert {
  border-color: rgba(255, 93, 93, 0.45);
}

.tbl-wrap {
  border: 1px solid var(--grid);
  border-radius: 10px;
  overflow-x: auto;
  background: var(--panel);
}
table.board {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 760px;
}
.board thead th {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--faint);
  text-align: left;
  padding: 9px;
  background: #10161e;
  border-bottom: 1px solid var(--grid);
  font-weight: 500;
  white-space: nowrap;
}
.board td {
  padding: 9px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--grid);
  white-space: nowrap;
  vertical-align: middle;
}
.board tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}
.board tbody tr:hover td {
  background: var(--panel-2);
}
.board tbody tr[data-band] td:first-child {
  border-left: 4px solid var(--band);
}
.truck-c {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
}
.mv {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
}
.mv.driving {
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(70, 198, 255, 0.6);
}
.mv.parked {
  background: #4a5a6b;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 30px;
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--mono);
  white-space: nowrap;
}
.pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.pill.recv {
  background: var(--amber-soft);
  color: var(--amber);
}
.pill.recv::before {
  background: var(--amber);
}
.pill.ship {
  background: var(--cyan-soft);
  color: var(--cyan);
}
.pill.ship::before {
  background: var(--cyan);
}
.note {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  color: var(--dim);
  min-width: 220px;
}
.note.green {
  color: var(--green);
}
.note.amber {
  color: var(--amber);
}
.note.red {
  color: var(--red);
}
.temp {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.temp.dim {
  color: var(--dim);
  font-weight: 500;
}
.act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
}
.act.ok {
  color: var(--green);
}
.act.watch {
  background: var(--amber-soft);
  color: var(--amber);
}
.act.bad {
  background: var(--red-soft);
  color: var(--red);
}

/* toast that fires when the demo alert triggers */
.toast-area {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
  z-index: 5;
}
.toast {
  background: var(--panel-2);
  border: 1px solid var(--red);
  border-left-width: 3px;
  border-radius: 10px;
  padding: 11px 15px;
  max-width: 320px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  animation: slidein 0.35s ease;
  font-size: 13px;
}
.toast.mail {
  border-color: var(--green);
}
.toast.watch {
  border-color: var(--amber);
}
.toast b {
  display: block;
  font-size: 12.5px;
  margin-bottom: 2px;
}
.toast span {
  color: var(--dim);
  font-size: 12.5px;
}
@keyframes slidein {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.demo-cap {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--faint);
}

/* ---------------- email sample ---------------- */
.mail-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden;
}
.mail-head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.mail-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
  padding: 2px 0;
}
.mail-row span:first-child {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: 58px;
  flex-shrink: 0;
  padding-top: 2px;
}
.mail-body {
  padding: 20px;
  font-size: 14.2px;
  line-height: 1.75;
  color: var(--dim);
}
.mail-body .sig {
  color: var(--faint);
  font-size: 12px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* ---------------- feature list ---------------- */
.feat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feat .tick {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  margin-top: 2px;
}
.feat .tick svg {
  width: 13px;
  height: 13px;
}
.feat b {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}
.feat p {
  font-size: 14.2px;
}

/* ---------------- faq ---------------- */
details.faq {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
details.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
}
details.faq summary::-webkit-details-marker {
  display: none;
}
details.faq summary::after {
  content: '+';
  margin-left: auto;
  color: var(--amber);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}
details.faq[open] summary::after {
  content: '\2212';
}
details.faq p {
  margin-top: 12px;
  font-size: 14.8px;
  max-width: 78ch;
}

/* ---------------- final cta ---------------- */
.cta-box {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 62px 40px;
  text-align: center;
  background:
    radial-gradient(620px 300px at 50% 0%, rgba(255, 176, 32, 0.12), transparent 65%),
    linear-gradient(180deg, var(--panel), var(--bg-2));
}
.cta-box .hero-cta {
  justify-content: center;
}

/* ---------------- footer ---------------- */
footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  background: var(--bg-2);
}
.foot-in {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.foot-in p {
  font-size: 13px;
  color: var(--faint);
}
.foot-links {
  margin-left: auto;
  display: flex;
  gap: 22px;
}
.foot-links a {
  font-size: 13px;
  color: var(--dim);
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--txt);
}

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  section {
    padding: 72px 0;
  }
  .g4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .g3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-links {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 620px) {
  body {
    font-size: 16px;
  }
  section {
    padding: 58px 0;
  }
  .hero {
    padding: 58px 0 52px;
  }
  .g2,
  .g3,
  .g4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .card {
    padding: 22px;
  }
  .cta-box {
    padding: 42px 22px;
  }
  .btn {
    padding: 12px 18px;
  }
  .hero-cta .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .toast-area {
    right: 12px;
    bottom: 12px;
  }
  .toast {
    max-width: 260px;
  }
  .demo-url {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}
