/* ============================================================================
   EXPEDITED LOGISTICS — DESIGN SYSTEM
   ============================================================================
   Organized as:
     1. Fonts & tokens
     2. Reset & base
     3. Layout primitives
     4. Navigation
     5. Buttons & inputs
     6. Panels / cards
     7. Utilities (reveal-on-scroll, badges, etc.)
   Page-specific sections live in css/home.css and css/tracking.css.
============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------------------------- 1. TOKENS ---------------------------------- */
:root {
  /* Color */
  --void:        #080D1F;   /* page background */
  --panel:       #0F1B3D;   /* section / raised background */
  --panel-2:     #16234A;   /* card background */
  --line:        #263258;   /* hairline borders */
  --line-soft:   #1C2847;

  --route-blue:  #3D7FFF;   /* primary accent */
  --route-blue-dim: #2A5AD1;
  --checkpoint-cyan: #5EEAD4; /* sparing accent */
  --delivered-green: #34D399;
  --attention-red: #F0563D;

  --text-hi:     #EDF1F8;
  --text-mid:    #B7C0DA;
  --text-low:    #8592B0;
  --text-faint:  #566089;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Layout */
  --max-width: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --ease: cubic-bezier(.16,.8,.24,1);
}

/* ---------------------------- 2. RESET / BASE ----------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

body {
  background: var(--void);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-hi);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

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

:focus-visible {
  outline: 2px solid var(--checkpoint-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Faint coordinate-grid texture, used behind hero/dark sections */
.grid-veil {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 90%);
  pointer-events: none;
}

/* ---------------------------- 3. LAYOUT ----------------------------------- */
.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { position: relative; }

.section-pad { padding-block: clamp(64px, 10vw, 128px); }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--checkpoint-cyan);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  display: block;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 16px;
}

.section-head p {
  font-size: 17px;
  color: var(--text-low);
  max-width: 52ch;
}

/* ---------------------------- 4. NAVIGATION -------------------------------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 13, 31, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(8, 13, 31, 0.85);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--text-hi);
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--route-blue), var(--checkpoint-cyan));
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 16px; height: 16px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 14.5px;
  color: var(--text-mid);
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--text-hi); }

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-hi);
  padding: 6px;
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ---------------------------- 5. BUTTONS / INPUTS -------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--route-blue);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(61,127,255,0);
}
.btn-primary:hover {
  background: #4E8CFF;
  box-shadow: 0 8px 30px -8px rgba(61,127,255,.65);
}

.btn-ghost {
  background: transparent;
  color: var(--text-hi);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--route-blue); background: rgba(61,127,255,.08); }

.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 13.5px; }

.field {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--text-hi);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field::placeholder { color: var(--text-faint); font-family: var(--font-body); letter-spacing: 0; }
.field:focus { border-color: var(--route-blue); background: rgba(61,127,255,.06); outline: none; }

/* ---------------------------- 6. PANELS / CARDS ---------------------------- */
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.panel-glass {
  background: rgba(22, 35, 74, 0.55);
  border: 1px solid rgba(120, 145, 210, 0.16);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-low);
}
.tag-demo { color: var(--text-faint); border-color: var(--line-soft); }

/* Status dot used across the site */
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-blue { background: var(--route-blue); box-shadow: 0 0 0 4px rgba(61,127,255,.18); }
.dot-green { background: var(--delivered-green); box-shadow: 0 0 0 4px rgba(52,211,153,.18); }
.dot-red { background: var(--attention-red); box-shadow: 0 0 0 4px rgba(240,86,61,.18); }

/* Pulse animation for "live/current" markers — used sparingly and only
   where something is genuinely live/current, per the motion principle. */
@keyframes pulse-ring {
  0%   { transform: scale(0.6); opacity: .55; }
  100% { transform: scale(2.2); opacity: 0; }
}
.pulse {
  position: relative;
}
.pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-ring 2.2s var(--ease) infinite;
}

/* ---------------------------- 7. UTILITIES --------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.stagger > * { transition-delay: calc(var(--i, 0) * 70ms); }

.text-mono { font-family: var(--font-mono); }
.text-low { color: var(--text-low); }
.text-faint { color: var(--text-faint); }

.divider {
  height: 1px;
  background: var(--line);
  border: none;
  width: 100%;
}

.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;
}

/* Footer, shared by both pages */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 56px 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-col h4 {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-low);
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: .02em;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 14.5px;
  color: var(--text-low);
  margin-bottom: 10px;
  transition: color .2s var(--ease);
}
.footer-col a:hover { color: var(--text-hi); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
