/* FleetApex — layout concept: dispatch-board bands. Dark "night shift" hero, light working surface, alert tickets as the signature object. */
:root {
  --bg: #F2F4F6;
  --surface: #FFFFFF;
  --ink: #111820;
  --muted: #4B5765;
  --line: #D6DCE3;
  --night: #0F1A24;
  --night-2: #172533;
  --night-ink: #E8EEF3;
  --night-muted: #9DB0C1;
  --signal: #F2A900;
  --signal-ink: #1B1400;
  --flag: #C2352B;
  --ok: #2C7A57;
  --link: #0B5C8C;

  --f-display: "Barlow Semi Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1218; --surface: #121C26; --ink: #E6ECF1; --muted: #9AA9B6; --line: #243240;
    --night: #070C11; --night-2: #101A23; --night-ink: #E8EEF3; --night-muted: #93A6B7;
    --signal: #F5B526; --signal-ink: #1B1400; --flag: #EE6A5F; --ok: #5DBB8C; --link: #6CB8E6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1218; --surface: #121C26; --ink: #E6ECF1; --muted: #9AA9B6; --line: #243240;
  --night: #070C11; --night-2: #101A23; --night-ink: #E8EEF3; --night-muted: #93A6B7;
  --signal: #F5B526; --signal-ink: #1B1400; --flag: #EE6A5F; --ok: #5DBB8C; --link: #6CB8E6;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 17px; line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--signal); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.005em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--signal); color: var(--signal-ink); padding: 8px 12px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.8em; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }

.eyebrow {
  font-family: var(--f-mono); font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 18px; height: 3px; background: var(--signal); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .01em; }
.brand span b { color: var(--signal); font-weight: 700; }
:root:not([data-theme="dark"]) .brand span b { color: #B57E00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand span b { color: var(--signal); } }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; padding: 8px 10px; border-radius: 4px; }
.nav a:hover { background: var(--bg); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--signal); border-radius: 0; }
.nav .btn { margin-left: 8px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 4px; padding: 8px 12px; font: 600 .9rem var(--f-body); cursor: pointer; }
@media (max-width: 920px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 8px max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 6px; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--signal); padding-left: 14px; }
  .nav .btn { margin: 12px 0 0; text-align: center; border-bottom: 0; }
}

/* Buttons */
.btn {
  display: inline-block; font: 600 1rem var(--f-body); text-decoration: none; cursor: pointer;
  padding: 12px 20px; border-radius: 4px; border: 2px solid transparent; line-height: 1.2;
}
.btn-signal { background: var(--signal); color: var(--signal-ink) !important; }
.btn-signal:hover { filter: brightness(1.06); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Bands */
.band { padding-block: clamp(56px, 8vw, 96px); }
.band-surface { background: var(--surface); border-block: 1px solid var(--line); }
.band-night { background: var(--night); color: var(--night-ink); }
.band-night .eyebrow, .band-night .lede { color: var(--night-muted); }
.band-night a:not(.btn) { color: var(--signal); }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }

/* Hero */
.hero { background: var(--night); color: var(--night-ink); padding-block: clamp(48px, 7vw, 88px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--night-2) 1px, transparent 1px), linear-gradient(90deg, var(--night-2) 1px, transparent 1px);
  background-size: 44px 44px;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero .eyebrow, .hero .lede { color: var(--night-muted); }
.hero h1 { margin: 16px 0 20px; }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero .btn-row { margin-top: 30px; }
.hero-sub { max-width: 52ch; color: var(--night-muted); font-size: 1.12rem; }
.page-hero { background: var(--night); color: var(--night-ink); padding-block: clamp(44px, 6vw, 76px); }
.page-hero .eyebrow { color: var(--night-muted); }
.page-hero h1 { margin: 14px 0 16px; font-size: clamp(2.2rem, 5vw, 3.5rem); max-width: 22ch; }
.page-hero p { color: var(--night-muted); font-size: 1.15rem; max-width: 62ch; }
.page-hero .btn-row { margin-top: 26px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Alert ticket — signature object */
.ticket {
  background: var(--surface); color: var(--ink); border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0,0,0,.35); overflow: hidden; font-size: .95rem; min-width: 0;
}
.ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--flag); color: #fff; }
.ticket-head strong { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .12em; }
.ticket-head time { font-family: var(--f-mono); font-size: .8rem; opacity: .9; }
.ticket-map { display: block; width: 100%; height: auto; background: var(--bg); border-bottom: 1px solid var(--line); }
.ticket dl { margin: 0; padding: 6px 16px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; }
.ticket dt, .ticket dd { padding: 9px 0; border-bottom: 1px dashed var(--line); margin: 0; }
.ticket dt { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 12px; }
.ticket dd { font-variant-numeric: tabular-nums; min-width: 0; }
.ticket dl > :nth-last-child(-n+2) { border-bottom: 0; }
.ticket .why { padding: 14px 16px 16px; background: var(--bg); border-top: 1px solid var(--line); }
.ticket .why b { display: block; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.ticket-note { margin-top: 10px; font-size: .8rem; color: var(--night-muted); font-family: var(--f-mono); }
.tag { display: inline-block; font-family: var(--f-mono); font-size: .72rem; padding: 2px 7px; border-radius: 3px; border: 1px solid currentColor; margin-left: 6px; vertical-align: 1px; }
.tag-flag { color: var(--flag); }
.tag-ok { color: var(--ok); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.feature { display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 3px solid var(--ink); }
.feature p { color: var(--muted); }
.feature a { font-weight: 600; text-decoration: none; }
.feature a:hover { text-decoration: underline; }
.band-night .feature { border-top-color: var(--signal); }
.band-night .feature p { color: var(--night-muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; align-content: start; }
.card p { color: var(--muted); }

/* Questions list (problem section) */
.qlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.qlist li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 48px 1fr; gap: 12px; font-size: 1.12rem; }
.qlist li span { font-family: var(--f-mono); color: var(--muted); font-size: .85rem; padding-top: 4px; }

/* Steps (real sequence) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: step; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 24px 0; border-top: 1px solid var(--line); }
.steps > li::before {
  content: counter(step, decimal-leading-zero); font-family: var(--f-mono); font-weight: 500; font-size: .9rem;
  width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); }
.band-night .steps > li { border-top-color: var(--night-2); }
.band-night .steps > li::before { border-color: var(--signal); color: var(--signal); }
.band-night .steps p { color: var(--night-muted); }

/* Integration pills */
.providers { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.provider { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 600; }
.provider small { font-family: var(--f-mono); font-weight: 500; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.provider .live { color: var(--ok); }
.provider .soon { color: var(--muted); }

/* Founder strip */
.founder { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: center; }
.founder-mark { aspect-ratio: 1; max-width: 220px; border-radius: 50%; background: var(--night-2); border: 3px solid var(--signal); display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 4rem; color: var(--signal); }
.founder blockquote { margin: 0; font-family: var(--f-display); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; line-height: 1.2; }
.founder cite { display: block; margin-top: 14px; font-style: normal; color: var(--night-muted); }
@media (max-width: 720px) { .founder { grid-template-columns: 1fr; } .founder-mark { max-width: 120px; font-size: 2.6rem; } }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 36px 18px 0; font-weight: 600; font-size: 1.08rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-family: var(--f-mono); font-size: 1.4rem; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 20px; color: var(--muted); max-width: 70ch; }

/* Callout */
.callout { border-left: 4px solid var(--signal); background: var(--surface); padding: 18px 20px; border-radius: 0 var(--radius) var(--radius) 0; }
.callout-flag { border-left-color: var(--flag); }

/* Pattern table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .96rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--f-mono); font-size: .74rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }

/* CTA band */
.cta-band { background: var(--signal); color: var(--signal-ink); padding-block: clamp(44px, 6vw, 72px); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { max-width: 20ch; }
.cta-band p { max-width: 52ch; margin-top: 10px; }
.cta-band .btn { background: var(--signal-ink); color: #FFF4D6; }

/* Forms */
.form { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 11px 12px; width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.form-status { padding: 14px 16px; border-radius: 4px; font-weight: 500; }
.form-status.ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ink); border: 1px solid var(--ok); }
.form-status.err { background: color-mix(in srgb, var(--flag) 12%, var(--surface)); color: var(--ink); border: 1px solid var(--flag); }
.hp { position: absolute; left: -9999px; }

/* Blog */
.post-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.post-item { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.post-item time, .post-meta { font-family: var(--f-mono); font-size: .82rem; color: var(--muted); }
.post-item h2 { font-size: 1.6rem; margin-bottom: 8px; }
.post-item h2 a { color: var(--ink); text-decoration: none; }
.post-item h2 a:hover { text-decoration: underline; }
.post-item p { color: var(--muted); }
@media (max-width: 640px) { .post-item { grid-template-columns: 1fr; gap: 6px; } }
.crumbs { font-family: var(--f-mono); font-size: .8rem; color: var(--night-muted); }
.crumbs a { color: var(--night-muted) !important; }

/* Footer */
.site-footer { background: var(--night); color: var(--night-muted); padding-block: 56px 40px; font-size: .95rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-family: var(--f-mono); font-weight: 500; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--night-ink); margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--night-muted); text-decoration: none; }
.site-footer a:hover { color: var(--night-ink); text-decoration: underline; }
.site-footer .brand { color: var(--night-ink); }
.site-footer .brand span b { color: var(--signal) !important; }
.site-footer .legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--night-2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .85rem; }
@media (max-width: 820px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer .cols { grid-template-columns: 1fr; } }

.mt-s { margin-top: 12px; } .mt-m { margin-top: 24px; } .mt-l { margin-top: 44px; }
.muted { color: var(--muted); }

/* Timeline: minutes vs weeks */
.timeline { list-style: none; margin: 0; padding: 34px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--night-muted) 0 72%, transparent 72%) ; opacity: .35; }
.timeline::after { content: ""; position: absolute; top: 9px; left: 76%; right: 0; border-top: 3px dashed var(--night-muted); opacity: .35; }
.timeline li { position: relative; display: grid; gap: 6px; align-content: start; }
.timeline li::before { content: ""; position: absolute; top: -32px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--night); border: 3px solid var(--night-muted); }
.timeline h3 { font-size: 1.25rem; }
.timeline p { color: var(--night-muted); font-size: .98rem; }
.tl-time { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .06em; color: var(--night-muted); }
.timeline .tl-flag::before { border-color: var(--flag); background: var(--flag); box-shadow: 0 0 0 6px color-mix(in srgb, var(--flag) 30%, transparent); }
.timeline .tl-flag .tl-time { color: var(--flag); }
.timeline .tl-call::before { border-color: var(--signal); background: var(--signal); }
.timeline .tl-call .tl-time { color: var(--signal); }
.timeline .tl-late { opacity: .6; }
.timeline .tl-late::before { border-style: dashed; }
@media (max-width: 820px) {
  .timeline { grid-template-columns: 1fr; padding: 0 0 0 34px; gap: 26px; }
  .timeline::before { top: 0; bottom: 0; left: 8px; right: auto; width: 3px; height: auto; background: var(--night-muted); }
  .timeline::after { display: none; }
  .timeline li::before { top: 2px; left: -34px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ticket .pulse { animation: pulse 1.6s ease-out infinite; transform-origin: 232px 112px; transform-box: view-box; }
  .timeline .tl-flag::before { animation: ping 1.6s ease-out infinite; }
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--flag) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.brand-logo { height: 52px; width: auto; display: block; }
.band:not(.band-night) .founder cite { color: var(--muted); } .band:not(.band-night) .founder-mark { background: var(--night); }

/* Alert ticket v2: mirrors the real FleetApex alert email */
.ticket { font-size: .94rem; }
.ticket-head { justify-content: flex-start; gap: 10px; font-family: var(--f-body); }
.ticket-head strong { font-family: var(--f-body); font-size: .98rem; letter-spacing: .01em; font-weight: 700; }
.ticket-head.lvl-high { background: var(--flag); }
.ticket-head.lvl-med { background: #D4870F; }
.ticket-head .dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; flex: none; }
@media (prefers-reduced-motion: no-preference) { .ticket-head .dot { animation: blink 1.2s ease-in-out infinite; } }
@keyframes blink { 50% { opacity: .25; } }
.ticket-body { padding: 16px 18px 18px; display: grid; gap: 8px; }
.ticket-body h4 { margin: 8px 0 0; font-size: .98rem; font-weight: 700; }
.ticket-lead { line-height: 1.45; }
.ticket-body dl { padding: 4px 0; grid-template-columns: max-content 1fr; column-gap: 20px; }
.ticket-body dt, .ticket-body dd { border-bottom: 0; padding: 4px 0; }
.ticket-body dt { font-family: var(--f-body); font-size: .94rem; letter-spacing: 0; text-transform: none; color: var(--muted); padding-top: 4px; }
.ticket-meta { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
@media (max-width: 420px) { .ticket-body dl { grid-template-columns: 1fr; } .ticket-body dt { padding-bottom: 0; } }
