/* cargo.css — WayDispatch design system (Cargo · Cobalt) */

:root {
  --font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --font-accent: 'Instrument Serif', serif;
  --bg: #f5f3ee;
  --bg-2: #ebe9e2;
  --fg: #0c0c0e;
  --fg-60: rgba(12, 12, 14, 0.72);
  --fg-45: rgba(12, 12, 14, .45);
  --fg-30: rgba(12, 12, 14, .3);
  --rule: rgba(0, 0, 0, .08);
  --rule-strong: rgba(0, 0, 0, .14);
  --card: #ffffff;
  --dark: #0c0c0e;
  --dark-fg: #f5f3ee;
  --dark-fg-60: rgba(245, 243, 238, .6);
  --dark-fg-45: rgba(245, 243, 238, .45);
  --dark-rule: rgba(255, 255, 255, .08);
  --acc: #0066ff;
  --acc-bg: rgba(0, 102, 255, .1);
  --acc-glow: rgba(0, 102, 255, .35);

  --danger: #d92d20;
  --danger-dark: #b42318;
  --warning: #f59e0b;
  --success: #16835b;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --maxw: 1280px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-feature-settings: 'ss01' on, 'cv11' on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
img { display: block; max-width: 100%; }

/* Leaflet layout fallback. Keeps maps usable when the CDN stylesheet is unavailable. */
.leaflet-container {
  position: relative;
  overflow: hidden;
  outline: 0;
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
}
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer {
  position: absolute;
  left: 0;
  top: 0;
}
.leaflet-container img.leaflet-tile {
  width: 256px !important;
  height: 256px !important;
  max-width: none !important;
  max-height: none !important;
}
.leaflet-map-pane { z-index: 2; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}
.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-control-zoom,
.leaflet-control-attribution {
  margin: 10px;
}

@media (max-width: 800px) {
  .route-demo-layout {
    grid-template-columns: 1fr !important;
  }
  .route-demo-map {
    min-height: 340px !important;
  }
  .route-demo-layout > :last-child {
    border-left: 0 !important;
    border-top: 1px solid rgba(0, 0, 0, .08);
  }
}
.leaflet-control-zoom a {
  display: block;
  width: 30px;
  height: 30px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
  color: #111;
  font: 600 20px/30px Arial, sans-serif;
  text-align: center;
}
.leaflet-control-zoom a:first-child { border-radius: 5px 5px 0 0; }
.leaflet-control-zoom a:last-child { border: 0; border-radius: 0 0 5px 5px; }
.leaflet-control-attribution {
  padding: 2px 5px;
  background: rgba(255, 255, 255, .82);
  color: #555;
  font-size: 10px;
}

.italic { font-family: var(--font-accent); font-style: italic; font-weight: 400; }
.mono { font-family: var(--font-mono); }
.acc { color: var(--acc); }

/* ─── LAYOUT ────────────────────────────────────────────── */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 64px; }
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.rule { height: 1px; background: var(--rule); border: 0; }

/* ─── NAV ───────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 48px;
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 243, 238, .8); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav-left { display: flex; align-items: center; gap: 40px; }
.nav-links { display: flex; gap: 28px; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 9px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); }

.link { color: var(--fg-60); font-size: 14px; transition: color .15s; }
.link:hover { color: var(--fg); }
.link.current { color: var(--fg); font-weight: 500; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; }
.link-arrow:hover .arrow { transform: translateX(2px); }
.arrow { transition: transform .15s; display: inline-block; }

/* ─── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px;
  font: 500 14px/1 'Geist', sans-serif;
  cursor: pointer; transition: all .18s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--dark); color: var(--dark-fg); }
.btn-primary:hover { background: #1f1f22; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--fg);
  border-color: var(--rule-strong); }
.btn-ghost:hover { background: rgba(0, 0, 0, .04); }
.btn-light { background: var(--dark-fg); color: var(--dark); }
.btn-light:hover { background: #fff; transform: translateY(-1px); }
.btn-on-dark-ghost { background: transparent; color: var(--dark-fg);
  border-color: rgba(255, 255, 255, .2); }
.btn-on-dark-ghost:hover { background: rgba(255, 255, 255, .06); }
.btn-acc { background: var(--acc); color: #fff; }
.btn-acc:hover { transform: translateY(-1px); filter: brightness(1.08);
  box-shadow: 0 0 24px var(--acc-glow); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-dark); border-color: var(--danger-dark); transform: translateY(-1px); }

/* ─── EYEBROWS / TAGS ───────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Geist Mono', monospace; font-size: 11.5px;
  color: var(--fg-60); letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .04); border: 1px solid var(--rule);
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 99px;
  background: var(--acc); box-shadow: 0 0 10px var(--acc-glow);
}
.eyebrow.on-dark { background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1); color: var(--dark-fg-60); }
.pill {
  font-family: 'Geist Mono', monospace; font-size: 10.5px;
  padding: 3px 8px; border-radius: 999px; letter-spacing: .04em;
  border: 1px solid var(--rule-strong); color: var(--fg-60);
  background: rgba(255,255,255,.5); display: inline-block;
}
.pill-acc { background: var(--acc-bg); border-color: transparent; color: var(--acc); }
.pill.on-dark { background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12); color: var(--dark-fg-60); }
.pill-acc.on-dark { background: var(--acc-bg); border-color: transparent; color: var(--acc); }

/* ─── TYPE SCALE ────────────────────────────────────────── */
.h1 { font-size: 92px; line-height: 0.94; letter-spacing: -0.045em;
  font-weight: 500; margin: 0; }
.h2 { font-size: 56px; line-height: 1.0; letter-spacing: -0.035em;
  font-weight: 500; margin: 0; }
.h3 { font-size: 26px; line-height: 1.15; letter-spacing: -0.02em;
  font-weight: 600; margin: 0; }
.h4 { font-size: 20px; line-height: 1.25; letter-spacing: -0.015em;
  font-weight: 600; margin: 0; }
.lead { font-size: 19px; line-height: 1.5; color: var(--fg-60); }
.body { font-size: 15px; line-height: 1.6; color: var(--fg-60); }

/* ─── CARDS ─────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--r); padding: 28px; transition: all .2s; }
.card:hover { border-color: var(--rule-strong);
  box-shadow: 0 16px 36px -22px rgba(0, 0, 0, .18); transform: translateY(-2px); }
.card-dark { background: var(--dark); color: var(--dark-fg);
  border-radius: var(--r); padding: 28px;
  border: 1px solid var(--dark-rule); }
.card-flat { background: transparent; border: 1px solid var(--rule);
  border-radius: var(--r); padding: 28px; }

/* ─── DARK BAND ─────────────────────────────────────────── */
.dark-band {
  background: var(--dark); color: var(--dark-fg);
  position: relative; overflow: hidden;
}
.dark-band-glow {
  position: absolute; pointer-events: none;
  background: radial-gradient(circle, var(--acc-glow), transparent 65%);
  filter: blur(60px);
}
.dark-band .h2, .dark-band h2 { color: var(--dark-fg); }
.dark-band .body, .dark-band .lead { color: var(--dark-fg-60); }

/* ─── FOOTER ────────────────────────────────────────────── */
.footer { padding: 56px 64px 36px; border-top: 1px solid var(--rule); }
.footer-grid { max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-col-title { font-family: 'Geist Mono', monospace; font-size: 11px;
  font-weight: 600; letter-spacing: .06em; color: var(--fg); text-transform: uppercase; }
.footer-col ul { list-style: none; padding: 0; margin: 14px 0 0;
  display: flex; flex-direction: column; gap: 8px; }
.footer-bottom { max-width: var(--maxw); margin: 40px auto 0; padding-top: 24px;
  border-top: 1px solid var(--rule); display: flex; justify-content: space-between;
  font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--fg-45);
  letter-spacing: .02em; }

/* ─── UTILITIES ─────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.mt-16 { margin-top: 64px; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; }
.stack > * { margin: 0; }
.stack > * + * { margin-top: var(--stack-gap, 16px); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster-gap, 12px); align-items: center; }

.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 production defaults. The exploration canvas intentionally keeps
   its fixed artboard dimensions and does not use this stylesheet. */
@media (max-width: 980px) {
  .nav { padding: 18px 24px; }
  .nav-left { gap: 20px; }
  .nav-links { display: none; }
  .container { padding: 0 28px; }
  .section { padding: 72px 0; }
  .section-tight { padding: 48px 0; }
  .h1 { font-size: 68px; }
  .h2 { font-size: 44px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer { padding: 44px 28px 28px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .hero, .page-hero { padding: 48px 28px 56px !important; }
  .hero-grid, .feat-row2, .featured-case, .faq-row,
  .dark-band .container > .grid, .cta-block {
    grid-template-columns: 1fr !important;
  }
  .logo-strip { padding: 24px 28px !important; }
  .logo-strip-inner { flex-wrap: wrap; justify-content: flex-start !important; gap: 18px 28px; }
  .dark-stats-grid, .tier-grid, .customer-grid, .ind-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .uc-grid, .provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .feat-layout { grid-template-columns: 1fr !important; gap: 24px !important; padding: 20px 28px 72px !important; }
  .feat-layout .toc { display: none; }
  .compare-section, .faq-section, .ind-strip, .logo-wall {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
}

@media (max-width: 680px) {
  .nav { padding: 14px 18px; }
  .nav-right .link { display: none; }
  .container { padding: 0 18px; }
  .section { padding: 56px 0; }
  .h1 { font-size: 48px; line-height: .98; }
  .h2 { font-size: 36px; line-height: 1.04; }
  .h3 { font-size: 23px; }
  .lead { font-size: 17px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card, .card-dark, .card-flat { padding: 22px; }
  .footer { padding: 36px 18px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .hero, .page-hero { padding: 38px 18px 44px !important; }
  .hero-grid { gap: 28px !important; }
  .logo-strip { padding: 20px 18px !important; }
  .dark-stats-grid, .tier-grid, .customer-grid, .ind-grid,
  .uc-grid, .provider-grid, .logo-grid {
    grid-template-columns: 1fr !important;
  }
  .cta-block { padding: 42px 24px !important; }
  .feat-layout { padding: 12px 18px 56px !important; }
  .next-prev { grid-template-columns: 1fr !important; }
  .compare-section, .faq-section, .ind-strip, .logo-wall {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

/* Cargo + Cobalt production layer */
html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

::selection {
  background: var(--acc);
  color: #fff;
}

button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
label,
table {
  font-family: inherit;
}

.italic {
  font-family: var(--font-accent);
}

.mono {
  font-family: var(--font-mono);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(0, 102, 255, .28);
  outline-offset: 3px;
}

.nav {
  border-top: 3px solid var(--dark);
}

.logo svg {
  flex: 0 0 auto;
}

.btn {
  min-height: 42px;
  justify-content: center;
}

.btn:active {
  transform: translateY(0);
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
}

.card,
.card-dark,
.card-flat {
  isolation: isolate;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
