:root {
  --bg-1: #0c1b2a;
  --bg-2: #142e2a;
  --panel: rgba(245, 247, 250, 0.92);
  --ink: #10233a;
  --ink-soft: #37506f;
  --line: rgba(10, 41, 78, 0.18);
  --accent: #0ea57a;
  --accent-2: #f97316;
  --shadow: 0 18px 42px rgba(2, 12, 26, 0.26);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background: radial-gradient(1200px 600px at 15% 10%, #173d57 0%, transparent 65%),
              radial-gradient(900px 500px at 85% 5%, #1f5d52 0%, transparent 70%),
              linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

.bg {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.shell {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 48px;
  display: grid;
  gap: 16px;
}

.hero h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.05;
  color: #f5f8ff;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9cd5ff;
}

.sub {
  margin: 10px 0 0;
  color: #d6eaff;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  animation: rise 420ms ease both;
}

.card:nth-of-type(2) {
  animation-delay: 80ms;
}

.card:nth-of-type(3) {
  animation-delay: 160ms;
}

h2 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
}

.grid {
  display: grid;
  gap: 10px;
}

.two {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

input,
textarea,
select,
button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  font: inherit;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: 2px solid rgba(14, 165, 122, 0.35);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

.action-row {
  grid-template-columns: 1fr;
}

button {
  border: none;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: linear-gradient(110deg, var(--accent), #14b8a6);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(14, 165, 122, 0.35);
}

#routeBtn {
  background: linear-gradient(110deg, var(--accent-2), #ef4444);
}

#routeBtn:hover {
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.34);
}

.output {
  margin: 12px 0 0;
  min-height: 136px;
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: #0f172a;
  color: #d9f1ff;
  border-radius: 12px;
  padding: 12px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.hint {
  margin: 10px 0 0;
  font-size: 0.83rem;
  color: var(--ink-soft);
}

.subhead {
  margin: 14px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.truck-grid {
  grid-template-columns: 1fr 1fr;
}

.summary {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  background: #f4fbf9;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--ink);
}

.map {
  margin: 12px 0 0;
  height: 360px;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 800px) {
  .shell {
    padding: 36px 22px 56px;
    gap: 20px;
  }

  .card {
    padding: 20px;
  }

  .two {
    grid-template-columns: 1fr 1fr;
  }

  .action-row {
    grid-template-columns: 1fr auto;
  }

  .action-row button {
    min-width: 170px;
  }

  .truck-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .map {
    height: 420px;
  }
}
