/* ===========================
   DASHLY — theme.css
   AI-Native Delivery Platform
   =========================== */

:root {
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-card: #1c2128;
  --accent: #a3e635;
  --accent-dim: rgba(163, 230, 53, 0.12);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --border: #30363d;
  --green: #3fb950;
  --orange: #d29922;
  --font-display: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --max-w: 1100px;
  --radius: 12px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ======================
   NAV
   ====================== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(163, 230, 53, 0.5);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.nav-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ======================
   SECTION HELPERS
   ====================== */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.section-sub {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.65;
}

/* ======================
   HERO
   ====================== */
.hero {
  padding: 80px 48px 64px;
  border-bottom: 1px solid var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(163, 230, 53, 0.2);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.hero-label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.hero-headline em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 440px;
  margin-bottom: 40px;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hero-stat-div {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ======================
   HERO MAP
   ====================== */
.hero-map-wrap {
  position: relative;
}
.hero-map-label {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.hero-map-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 320px;
  position: relative;
  overflow: hidden;
}
.map-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
}
.map-element {
  position: absolute;
  inset: 0;
}
.route-line-1 {
  position: absolute;
  top: 20%;
  left: 15%;
  width: 70%;
  height: 60%;
  border: 2px dashed rgba(163, 230, 53, 0.3);
  border-radius: 4px;
  transform: rotate(12deg);
}
.route-stop {
  position: absolute;
  width: 12px;
  height: 12px;
}
.stop-a { top: 25%; left: 20%; }
.stop-b { top: 40%; left: 45%; }
.stop-c { top: 55%; left: 62%; }
.stop-d { top: 68%; left: 80%; }
.stop-dot {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(163, 230, 53, 0.6);
}
.stop-pulse {
  position: absolute;
  width: 20px;
  height: 20px;
  top: -4px;
  left: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ping 1.5s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes ping {
  75%, 100% { transform: scale(2.5); opacity: 0; }
}
.route-driver {
  position: absolute;
  bottom: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(163, 230, 53, 0.3);
  border-radius: 100px;
  padding: 8px 16px 8px 10px;
}
.driver-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
}
.driver-label {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}
.map-overlay-text {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.overlay-metric {
  background: rgba(22, 27, 34, 0.9);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: right;
}
.overlay-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  line-height: 1;
}
.overlay-key {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ======================
   OPERATIONAL
   ====================== */
.operational {
  padding: 96px 48px;
  border-bottom: 1px solid var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
}
.ops-flow {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr 40px 1fr;
  align-items: start;
  gap: 0;
  margin-top: 56px;
}
.ops-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.ops-step-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.ops-step-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(163, 230, 53, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
}
.ops-step-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.ops-step-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.ops-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 60px;
}
.ops-arrow {
  color: var(--text-muted);
}

/* ======================
   AGENT SECTION
   ====================== */
.agent {
  padding: 96px 48px;
  border-bottom: 1px solid var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
}
.agent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 56px;
}
.agent-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.agent-col { }
.agent-col-header {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.agent-col-dashly .agent-col-header { color: var(--accent); }
.agent-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  padding: 8px 0;
}
.agent-item-no { color: var(--text-muted); }
.agent-item-yes { color: var(--text-primary); }
.agent-item svg { flex-shrink: 0; margin-top: 2px; }
.agent-col-legacy .agent-item svg { color: #f85149; }
.agent-col-dashly .agent-item svg { color: var(--accent); }

/* ======================
   AGENT DASHBOARD UI
   ====================== */
.agent-visual {
  position: sticky;
  top: 40px;
}
.agent-dashboard {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.dash-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.dash-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--green);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
.dash-rows {
  padding: 0;
}
.dash-row {
  display: grid;
  grid-template-columns: 1fr 1fr 60px 80px;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.dash-row-header {
  background: var(--bg-card);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 20px;
}
.dash-row-ok { }
.dash-row-warn {
  background: rgba(210, 153, 34, 0.08);
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}
.badge-ok {
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
}
.badge-warn {
  background: rgba(210, 153, 34, 0.15);
  color: var(--orange);
}
.dash-agent-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--accent-dim);
  border-top: 1px solid rgba(163, 230, 53, 0.2);
  font-size: 12px;
  color: var(--accent);
}
.agent-avatar {
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ======================
   OUTCOMES
   ====================== */
.outcomes {
  padding: 96px 48px;
  border-bottom: 1px solid var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
}
.outcomes-intro {
  max-width: 620px;
  margin-bottom: 56px;
}
.outcomes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.outcome {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.outcome-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(163, 230, 53, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}
.outcome-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.outcome-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ======================
   CLOSING
   ====================== */
.closing {
  padding: 112px 48px;
  border-bottom: 1px solid var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
}
.closing-inner {
  max-width: 680px;
}
.closing-headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.closing-sub {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 40px;
}
.closing-vision {
  border-left: 3px solid var(--accent);
  padding-left: 24px;
}
.vision-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}
.closing-vision p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
}

/* ======================
   FOOTER
   ====================== */
.footer {
  padding: 40px 48px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}
.footer-legal {
  width: 100%;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ======================
   RESPONSIVE
   ====================== */
@media (max-width: 900px) {
  .nav { padding: 20px 24px; }
  .hero { padding: 56px 24px 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-map-frame { height: 240px; }
  .ops-flow { grid-template-columns: 1fr; gap: 16px; }
  .ops-connector { display: none; }
  .agent-grid { grid-template-columns: 1fr; }
  .agent-visual { position: static; }
  .operational, .agent, .outcomes, .closing { padding: 64px 24px; }
}
@media (max-width: 600px) {
  .hero-stats { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-stat-div { display: none; }
  .outcomes-grid { grid-template-columns: 1fr; }
}