/* trackingmatix — marketing site. No external fonts/CDNs; system stack. Light + dark via
   prefers-color-scheme. No JavaScript (CSP script-src none). */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #eeece6;
  --ink: #13212c;
  --ink-2: #44525e;
  --muted: #66727c;
  --line: #dcd8cf;
  --brand: #12303f;
  --teal: #0f8a7c;
  --teal-soft: #d6efe9;
  --link: #0b6f64; /* text links: >= 5:1 on white, #f6f5f1 and --teal-soft (AA); --teal is 4.25:1 */
  --amber: #f0a014;
  --amber-ink: #3b2600;
  --focus: #0f8a7c;
  --dark-bg: #0f2531;
  --dark-ink: #e6eef2;
  --dark-muted: #a8bac4;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(19, 33, 44, .06), 0 8px 24px rgba(19, 33, 44, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --map-bg: #e3efec;
  --map-grid: rgba(15, 138, 124, .12);
  --map-road: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1319;
    --surface: #131d25;
    --surface-2: #18242e;
    --ink: #e6edf1;
    --ink-2: #bccad3;
    --muted: #8d9ea9;
    --line: #25333e;
    --brand: #7fd8c9;
    --teal: #4fc9b6;
    --teal-soft: #173a37;
    --link: #4fc9b6;
    --amber: #ffb020;
    --amber-ink: #231500;
    --focus: #7fd8c9;
    --dark-bg: #0f1c25;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --map-bg: #102229;
    --map-grid: rgba(127, 216, 201, .08);
    --map-road: #1f3540;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 62ch; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: .6em 1em; border-radius: 10px; box-shadow: var(--shadow);
}
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: .7em 1.3em; border-radius: 999px;
  font-weight: 650; text-decoration: none; border: 1.5px solid transparent;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--amber) 88%, #000); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-sm { min-height: 38px; padding: .4em 1em; font-size: .95rem; }
.btn-lg { min-height: 54px; padding: .8em 1.8em; font-size: 1.1rem; white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.bm-bg { fill: #12303f; }
.bm-route { fill: none; stroke: #7fd8c9; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.bm-dot { fill: #ffb020; }
.main-nav { display: flex; gap: 22px; margin-left: 12px; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; }
.main-nav a:hover { color: var(--ink); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Language switcher (details/summary, no JS) */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 .8em; border-radius: 999px; border: 1.5px solid var(--line);
  font-weight: 650; font-size: .9rem; color: var(--ink-2);
}
.lang summary::-webkit-details-marker { display: none; }
.lang[open] summary { border-color: var(--ink-2); color: var(--ink); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.lang li a { display: block; padding: .5em .8em; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang li a:hover { background: var(--surface-2); }
.lang li a[aria-current] { font-weight: 700; background: var(--teal-soft); }
.ico-sm { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy h1 { max-width: 16ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { position: relative; }
.hero-art::before {
  content: ""; position: absolute; inset: 8% -6% -6% 8%; border-radius: 32px;
  background: linear-gradient(135deg, var(--teal-soft), transparent 70%); z-index: -1;
}
.map { width: 100%; height: auto; filter: drop-shadow(0 18px 40px rgba(15, 37, 49, .16)); }
.map-bg { fill: var(--map-bg); }
.map-grid { fill: none; stroke: var(--map-grid); stroke-width: 1; }
.map-road { fill: none; stroke: var(--map-road); stroke-width: 16; stroke-linecap: round; }
.map-road-thin { stroke-width: 9; }
.map-route { fill: none; stroke: var(--teal); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 12; }
.pin-origin { fill: var(--surface); stroke: var(--teal); stroke-width: 5; }
.pin-dest path { fill: var(--brand); }
.pin-hole { fill: var(--map-bg); }
.truck-halo { fill: var(--amber); opacity: .25; }
.truck-dot { fill: var(--amber); stroke: var(--surface); stroke-width: 3; }
.card-bg { fill: var(--surface); stroke: var(--line); }
.card-line { fill: var(--surface-2); }
.card-line.strong { fill: var(--ink-2); opacity: .7; }
.card-ok { fill: var(--teal); }
@media (prefers-reduced-motion: reduce) {
  .truck { display: none; }
}

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-title { max-width: 24ch; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 20px; box-shadow: var(--shadow);
}
.feature p { color: var(--ink-2); margin: 0; }
.ico {
  width: 44px; height: 44px; padding: 10px; margin-bottom: 16px; border-radius: 12px;
  fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  background: var(--teal-soft);
}

.section-dark { background: var(--dark-bg); color: var(--dark-ink); }
.section-dark .lead, .section-dark p { color: var(--dark-muted); }
.section-dark h2, .section-dark h3 { color: var(--dark-ink); }
.security-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.security-points { display: grid; gap: 16px; }
.security-points li {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 22px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09);
}
.security-points .ico { margin: 0; stroke: #7fd8c9; background: rgba(127, 216, 201, .12); }
.security-points p { margin: 0; }

.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: clamp(28px, 5vw, 56px); border-radius: 28px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  background-image: radial-gradient(circle at 100% 0, var(--teal-soft), transparent 55%);
}
.cta .muted { margin: 0; }

/* Legal + 404 */
.legal h1 { margin-top: .3em; }
.legal section { margin-top: 2em; }
.legal h2 { font-size: 1.35rem; }
.badge {
  display: inline-block; margin: 0; padding: .2em .8em; border-radius: 999px;
  background: var(--amber); color: var(--amber-ink); font-weight: 700; font-size: .85rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.notice {
  border: 1.5px dashed var(--amber); border-radius: 12px; padding: 14px 18px; margin: 1em 0 1.6em;
  background: color-mix(in srgb, var(--amber) 10%, transparent);
}
.notice p { margin: 0; }
.notfound { text-align: center; }
.notfound .lead { margin-inline: auto; }
.notfound .code {
  font-size: clamp(4rem, 14vw, 8rem); font-weight: 850; line-height: 1; margin: 0 0 .1em;
  color: transparent; -webkit-text-stroke: 2px var(--teal); letter-spacing: -.04em;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 24px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid .muted { margin-top: 12px; max-width: 34ch; }
.footer-h { font-weight: 700; margin: 0 0 .5em; }
.footer-links li, .footer-langs li { margin: .3em 0; }
.footer-links a, .footer-langs a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover, .footer-langs a:hover { color: var(--ink); text-decoration: underline; }
.footer-langs { display: grid; grid-template-columns: repeat(2, max-content); column-gap: 20px; }
.footer-langs a[aria-current] { color: var(--ink); font-weight: 700; }
.footer-base { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.footer-base p { margin: 0; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .security-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 560px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .header-row { flex-wrap: wrap; row-gap: 0; }
  .main-nav { order: 3; width: 100%; margin: 0; padding: 0 0 12px; overflow-x: auto; gap: 20px; font-size: .95rem; }
  .main-nav a { white-space: nowrap; }
  .cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .header-row { column-gap: 8px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { padding: .3em .75em; font-size: .85rem; min-height: 36px; }
  .lang summary { padding: 0 .6em; min-height: 36px; }
  .brand { gap: 8px; }
  .brand span { font-size: 1rem; }
  .brand-mark { width: 28px; height: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-lg { white-space: normal; }
}
