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

:root {
  --ink: #1B2430;
  --charcoal: #2B3542;
  --paper: #F7F5F0;
  --paper-dim: #EDEAE2;
  --orange: #FF5A1F;
  --orange-dark: #D9490F;
  --slate: #8A94A3;
  --slate-dark: #5C6470;
  --green: #2F8F5B;
  --white: #FFFFFF;
  --line: rgba(27, 36, 48, 0.12);
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--charcoal); }

a { color: inherit; text-decoration: none; }

.mono {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.02em;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

img { max-width: 100%; display: block; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover { background: var(--orange-dark); }

.btn-dark {
  background: var(--ink);
  color: var(--white);
}
.btn-dark:hover { background: var(--charcoal); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-outline-light {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-outline-light:hover { background: var(--white); color: var(--ink); }

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Top bar + Header ---------- */

.topbar {
  background: var(--ink);
  color: var(--slate);
  font-size: 0.82rem;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar strong { color: var(--white); }
.topbar-item { display: inline-flex; align-items: center; gap: 6px; }
.topbar-right { display: flex; gap: 22px; }

header.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}
.logo-mark {
  width: 34px; height: 34px;
  background: var(--orange);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  transform: rotate(0deg);
}
nav.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
nav.main-nav a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--charcoal);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover, nav.main-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--orange);
}
.nav-cta { display: flex; align-items: center; gap: 12px; }

.mobile-toggle { display: none; }

@media (max-width: 860px) {
  .site-header .wrap { flex-wrap: wrap; }
  nav.main-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 14px; padding: 14px 0; }
  nav.main-nav.open { display: flex; }
  .nav-cta { display: none; width: 100%; justify-content: flex-start; margin-top: 10px; }
  .nav-cta.open { display: flex; }
  .mobile-toggle {
    display: inline-flex; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--ink); margin-left: auto;
  }
  .topbar-right { display: none; }
}

/* ---------- Hero / Dispatch board ---------- */

.hero {
  background: var(--ink);
  color: var(--white);
  padding: 72px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 64px);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  position: relative;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--orange);
  border-radius: 50%;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero .lead { color: rgba(255,255,255,0.7); font-size: 1.1rem; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* Dispatch board card */
.board {
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}
.board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.5);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.board-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: 'IBM Plex Mono', monospace;
  color: var(--white);
  font-size: 0.88rem;
}
.board-row:first-of-type { border-top: none; }
.board-status {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  white-space: nowrap;
}
.status-transit { background: rgba(255,90,31,0.18); color: var(--orange); }
.status-delivered { background: rgba(47,143,91,0.18); color: #4ADE80; }
.status-created { background: rgba(138,148,163,0.18); color: var(--slate); }

.board-track {
  margin-top: 20px;
  display: flex;
  gap: 8px;
}
.board-track input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--white);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
}
.board-track input::placeholder { color: rgba(255,255,255,0.35); }

/* ---------- Sections ---------- */

section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--white); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head .eyebrow { color: var(--orange-dark); }
.section-head p { color: var(--slate-dark); font-size: 1.05rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Services grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.card-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.card p:last-child { margin-bottom: 0; color: var(--slate-dark); }

/* Route strip / numbered process (real sequence, so numbering is justified) */
.route {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 8px;
}
.route::before {
  content: '';
  position: absolute;
  top: 20px; left: 0; right: 0;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.route-step {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
  padding: 0 10px;
}
.route-num {
  width: 40px; height: 40px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 0.9rem;
}
.route-step.done .route-num { background: var(--ink); color: var(--white); }
.route-step h4 { font-size: 0.95rem; margin-bottom: 6px; }
.route-step p { font-size: 0.85rem; color: var(--slate-dark); margin: 0; }
@media (max-width: 760px) {
  .route { flex-direction: column; gap: 24px; }
  .route::before { display: none; }
}

/* CTA band */
.cta-band {
  background: var(--ink);
  color: var(--white);
  border-radius: 18px;
  padding: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.65); margin: 0; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--charcoal);
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,90,31,0.15);
}
.field textarea { resize: vertical; min-height: 130px; }

.alert {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.alert-success { background: rgba(47,143,91,0.12); color: var(--green); border: 1px solid rgba(47,143,91,0.3); }
.alert-error { background: rgba(217,73,15,0.1); color: var(--orange-dark); border: 1px solid rgba(217,73,15,0.28); }

/* Tracking result / timeline */
.tracking-result {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  margin-top: 32px;
}
.tr-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.tr-num { font-size: 1.1rem; font-weight: 600; }
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line);
}
.timeline-item { position: relative; padding-bottom: 26px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -28px; top: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--ink);
}
.timeline-item.latest .timeline-dot { background: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.timeline-status { font-weight: 600; font-size: 0.95rem; }
.timeline-meta { font-size: 0.82rem; color: var(--slate-dark); margin-top: 2px; }
.timeline-note { font-size: 0.88rem; color: var(--charcoal); margin-top: 4px; }

/* Footer */
footer.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  padding: 64px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-logo { color: var(--white); font-family: 'Space Grotesk', sans-serif; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* Page hero (inner pages) */
.page-hero {
  background: var(--ink);
  color: var(--white);
  padding: 60px 0;
}
.page-hero h1 { color: var(--white); margin-bottom: 10px; }
.breadcrumb { font-size: 0.85rem; color: var(--slate); }
.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--white); }

.note-box {
  background: var(--paper-dim);
  border: 1px dashed var(--slate);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--slate-dark);
}

/* ---------- Admin ---------- */
.admin-shell { min-height: 100vh; background: var(--paper); }
.admin-header {
  background: var(--ink); color: var(--white);
  padding: 16px 0;
}
.admin-header .wrap { display: flex; justify-content: space-between; align-items: center; }
.admin-main { padding: 40px 0; }
.admin-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}
table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
table.admin-table th { color: var(--slate-dark); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.04em; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-created { background: rgba(138,148,163,0.15); color: var(--slate-dark); }
.badge-transit { background: rgba(255,90,31,0.15); color: var(--orange-dark); }
.badge-delivered { background: rgba(47,143,91,0.15); color: var(--green); }
.badge-exception { background: rgba(217,73,15,0.15); color: #B91C1C; }
.stat-row { display: flex; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.stat-box {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 26px; min-width: 160px;
}
.stat-box .num { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; font-weight: 700; }
.stat-box .label { font-size: 0.8rem; color: var(--slate-dark); }
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--ink);
}
.login-card {
  background: var(--white); border-radius: 14px; padding: 40px; width: 100%; max-width: 380px;
}
