/* ============================================================
   turnertrack — marketing site styles
   Design tokens mirror the app (Rajdhani, brand red, dark-first)
   ============================================================ */

:root {
  /* Brand */
  --brand-red: #841617;
  --brand-red-hover: #6b1213;
  --brand-red-muted: #561010;

  /* Surfaces (match app dark theme) */
  --bg: #030712;          /* gray-950 */
  --surface: #111827;     /* gray-900 */
  --surface-2: #1f2937;   /* gray-800 */
  --border: #374151;      /* gray-700/800 */

  /* Text */
  --text: #ffffff;
  --text-muted: #9ca3af;  /* gray-400 */
  --text-dim: #6b7280;    /* gray-500 */

  --radius-sm: 0.5rem;
  --radius: 0.75rem;      /* rounded-xl */
  --radius-lg: 1rem;      /* rounded-2xl */

  --maxw: 1180px;
  --ease: 200ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Rajdhani", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

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

/* Hard-hat red stripe at very top of page (app login accent) */
.top-stripe {
  height: 4px;
  background: var(--brand-red);
  width: 100%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand-red); color: #fff; }
.btn-primary:hover { background: var(--brand-red-hover); }

.btn-secondary { background: var(--surface-2); color: #fff; border-color: var(--border); }
.btn-secondary:hover { background: #374151; }

.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: #fff; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 48px; width: auto; }
.brand .wordmark {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  white-space: nowrap;
  line-height: 1;
}
.brand .wordmark .wm-red { color: var(--brand-red); }
.brand .wordmark .tm {
  font-size: 0.42em; font-weight: 600; color: var(--text-dim);
  position: relative; top: -0.85em; margin-left: 1px;
}

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: color var(--ease);
}
.nav-links a:hover { color: #fff; }

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

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 104px;
  overflow: hidden;
}
/* Diagonal "caution-stripe" energy without the kitsch */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 400px at 75% -10%, rgba(132, 22, 23, 0.28), transparent 60%),
    linear-gradient(180deg, transparent, rgba(3, 7, 18, 0.6));
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-red);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-red); }

.hero h1 {
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.hero h1 .accent { color: var(--brand-red); }

.hero .lead {
  margin: 22px 0 32px;
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 520px;
  font-weight: 500;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 0.98rem;
  font-weight: 500;
}

/* Hero visual: stacked "app card" mock */
.hero-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7);
}
.hero-visual .bar {
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.hero-visual .bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-2); }
.hero-visual .bar i:first-child { background: var(--brand-red); }
.mock-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px; border-radius: var(--radius);
  background: var(--surface-2); margin-bottom: 10px;
}
.mock-row .who { display: flex; align-items: center; gap: 11px; }
.mock-row .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-red); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 0.85rem;
}
.mock-row .name { font-weight: 600; }
.mock-row .sub { font-size: 0.82rem; color: var(--text-dim); font-weight: 500; }
.pill {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 5px 11px; border-radius: 999px;
}
.pill.in { background: rgba(34,197,94,0.15); color: #4ade80; }
.pill.out { background: var(--surface); color: var(--text-dim); }

/* Live crew map in the hero (mirrors the app's Crew Map widget) */
.bar-title { margin-left: 8px; font-size: 0.86rem; font-weight: 600; color: var(--text-dim); }
.map-summary {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.98rem; color: var(--text-muted); font-weight: 500;
  margin-bottom: 12px;
}
.map-summary strong { color: #fff; font-weight: 700; }
.map-sep { color: var(--border); }
.demo-badge {
  margin-left: auto; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand-red);
  border: 1px solid var(--border); background: var(--bg);
  padding: 3px 9px; border-radius: 999px;
}
#crewmap {
  height: 330px; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  background: #1a2433;
  position: relative; z-index: 0; /* contain Leaflet's panes so they don't overlap the nav/menu */
}
.leaflet-container, .leaflet-popup-content { font-family: "Rajdhani", system-ui, sans-serif; }
.leaflet-popup-content strong { font-weight: 700; }

/* Cash flow spotlight chart */
.cf-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.cf-sum { display: flex; gap: 26px; margin: 14px 0; flex-wrap: wrap; }
.cf-sum .k { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 2px; }
.cf-sum .v { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.cf-sum .v.red { color: #ef4444; }
.cf-chart { width: 100%; height: auto; display: block; }
.cf-chart text { font-family: "Rajdhani", system-ui, sans-serif; }

/* Verified Track Record card */
.tr-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.tr-company { font-weight: 700; font-size: 1.5rem; margin: 14px 0 4px; }
.tr-verified { display: flex; align-items: center; gap: 7px; color: #4ade80; font-weight: 600; font-size: 0.9rem; margin-bottom: 18px; }
.tr-verified svg { width: 16px; height: 16px; flex: 0 0 auto; }
.tr-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tr-stats .k { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 3px; }
.tr-stats .v { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.tr-stats .v.green { color: #4ade80; }
.tr-ref { margin-top: 16px; }
.tr-ref-head { font-weight: 600; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 11px; }
.tr-checks { display: flex; flex-wrap: wrap; gap: 9px 16px; }
.tr-checks span { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; font-size: 0.95rem; }
.tr-checks svg { width: 17px; height: 17px; color: #4ade80; flex: 0 0 auto; }

/* FAQ accordion */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 2px; font-weight: 600; font-size: 1.15rem; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--brand-red); font-weight: 400; flex: 0 0 auto; }
.faq-item[open] summary::after { content: "−"; }
.faq-a { padding: 0 2px 22px; }
.faq-a p { color: var(--text-muted); font-weight: 500; font-size: 1.05rem; line-height: 1.7; margin: 0; }
.faq-a a { color: var(--brand-red); }

/* ---------- Logos / trust strip ---------- */
.trust {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 0;
}
.trust .wrap { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.trust span {
  color: var(--text-dim); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.82rem;
}
.trust .stat { color: #fff; font-size: 1.1rem; }
.trust .sep { color: var(--border); }

/* ---------- Section scaffolding ---------- */
section.block { padding: 92px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head .kicker {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--brand-red); font-size: 0.82rem; margin-bottom: 12px;
}
.section-head h2 {
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.05; letter-spacing: -0.01em;
}
.section-head p { margin-top: 14px; color: var(--text-muted); font-size: 1.15rem; font-weight: 500; }

/* ---------- Feature cards ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--ease), transform var(--ease);
}
.card:hover { border-color: var(--brand-red); transform: translateY(-3px); }
.card .icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  background: rgba(132,22,23,0.14); color: var(--brand-red);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 {
  font-weight: 700; text-transform: uppercase; font-size: 1.3rem;
  letter-spacing: 0.01em; margin-bottom: 10px;
}
.card p { color: var(--text-muted); font-weight: 500; }

/* ---------- Split / how it works ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.steps { list-style: none; display: grid; gap: 22px; }
.steps li { display: flex; gap: 18px; }
.steps .num {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: var(--radius);
  background: var(--brand-red); color: #fff; font-weight: 700; font-size: 1.2rem;
  display: grid; place-items: center;
}
.steps h4 { font-weight: 700; text-transform: uppercase; font-size: 1.2rem; margin-bottom: 4px; }
.steps p { color: var(--text-muted); font-weight: 500; }

.split-visual {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
}
.split-visual .big-num {
  font-size: 3.4rem; font-weight: 700; color: var(--brand-red); line-height: 1;
}
.split-visual .big-label { text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 600; margin-top: 6px; }
.split-visual hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; }
.kv .k { color: var(--text-muted); font-weight: 500; }
.kv .v { font-weight: 700; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 820px; margin: 0 auto; }
.tier {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 34px; position: relative;
}
.tier.featured { border-color: var(--brand-red); }
.tier .tag {
  position: absolute; top: -13px; left: 34px;
  background: var(--brand-red); color: #fff; font-weight: 700; font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.1em; padding: 5px 12px; border-radius: 999px;
}
.tier h3 { font-weight: 700; text-transform: uppercase; font-size: 1.6rem; }
.tier .price { font-size: 2.6rem; font-weight: 700; margin: 12px 0 4px; }
.tier .price small { font-size: 1rem; color: var(--text-dim); font-weight: 600; }
.tier .who-for { color: var(--text-muted); font-weight: 500; margin-bottom: 22px; }
.tier ul { list-style: none; display: grid; gap: 12px; margin-bottom: 26px; }
.tier li { display: flex; gap: 10px; color: var(--text); font-weight: 500; }
.tier li svg { width: 20px; height: 20px; color: var(--brand-red); flex: 0 0 auto; }
.tier .btn { width: 100%; justify-content: center; }
.tier .price-model { font-size: 1.4rem; font-weight: 700; margin: 12px 0 6px; }
.tier .price-model small {
  display: block; font-size: 0.78rem; color: var(--text-dim);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px;
}
.price-includes {
  max-width: 720px; margin: 34px auto 0;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 28px;
}
.pi-title { text-align: center; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; color: var(--text-dim); margin-bottom: 18px; }
.pi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px 22px; }
.pi-grid span { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 0.96rem; }
.pi-grid svg { width: 17px; height: 17px; color: var(--brand-red); flex: 0 0 auto; }
@media (max-width: 700px) { .pi-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .pi-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(600px 300px at 50% 0, rgba(132,22,23,0.4), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
  text-align: center;
}
.cta-band h2 {
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05;
}
.cta-band p { color: var(--text-muted); font-size: 1.2rem; font-weight: 500; margin: 14px auto 30px; max-width: 540px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 54px 0 34px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(2, 1fr); gap: 40px; }
.footer-grid p { color: var(--text-muted); font-weight: 500; margin-top: 14px; max-width: 280px; }
.footer-col h5 {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.82rem; color: var(--text-dim); margin-bottom: 16px;
}
.footer-col a { display: block; color: var(--text-muted); font-weight: 500; padding: 5px 0; transition: color var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  color: var(--text-dim); font-weight: 500; font-size: 0.95rem;
}
.footer-legal a { color: var(--text-dim); transition: color var(--ease); }
.footer-legal a:hover { color: #fff; }

/* ---------- Legal pages (privacy, terms) ---------- */
.legal { padding: 56px 0 84px; }
.legal .wrap { max-width: 760px; }
.legal-back {
  display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.86rem;
  margin-bottom: 26px; transition: color var(--ease);
}
.legal-back:hover { color: #fff; }
.legal h1 {
  font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em;
  font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.05;
}
.legal-meta { color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem; margin-top: 12px; }
.legal-rule { height: 3px; width: 64px; background: var(--brand-red); border: 0; margin: 20px 0 30px; }
.legal h2 { font-weight: 700; text-transform: uppercase; font-size: 1.3rem; letter-spacing: 0.01em; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--text-muted); font-weight: 500; font-size: 1.05rem; line-height: 1.75; margin-bottom: 14px; }
.legal .legal-intro { color: var(--text); }
.legal strong { color: #fff; font-weight: 700; }
.legal a { color: var(--brand-red); }
.legal ul { list-style: disc; padding-left: 22px; margin: 0 0 14px; }
.legal ul li { margin-bottom: 8px; }
.legal .caps { font-variant: normal; }

/* ---------- 404 ---------- */
.notfound { padding: 120px 0; text-align: center; }
.notfound .code { font-weight: 700; font-size: clamp(4.5rem, 13vw, 9rem); line-height: 1; color: var(--brand-red); }
.notfound h1 { font-weight: 700; text-transform: uppercase; font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 6px 0 14px; letter-spacing: 0.01em; }
.notfound p { color: var(--text-muted); font-weight: 500; font-size: 1.15rem; margin: 0 auto 30px; max-width: 460px; }

/* Mobile-only CTA inside the nav dropdown (hidden on desktop) */
.nav-demo { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .pricing { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }

  .nav-links, .nav-cta .btn-primary { display: none; }
  .menu-toggle { display: inline-flex; }

  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 16px 24px;
  }
  .nav-links.open a { padding: 10px 0; width: 100%; }
  .nav-links.open .nav-demo {
    display: block; text-align: center; margin-top: 10px;
    background: var(--brand-red); color: #fff;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 14px 0; border-radius: var(--radius);
  }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  section.block { padding: 64px 0; }
  .hero { padding: 64px 0 72px; }
  /* Keep the eyebrow pill on a single line on narrow phones */
  .eyebrow { font-size: 0.62rem; letter-spacing: 0.06em; padding: 6px 12px; }
}
