/* Home page set-pieces */

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100dvh; display: grid; align-items: center; padding: 140px 0 80px; overflow: clip; isolation: isolate; }
.hero-wash { position: absolute; inset: 0; z-index: -3; background:
  radial-gradient(900px 600px at 78% 42%, rgba(61,82,146,0.55), transparent 60%),
  radial-gradient(600px 500px at 20% 90%, rgba(145,175,208,0.12), transparent 60%),
  radial-gradient(400px 300px at 88% 85%, rgba(245,181,49,0.10), transparent 60%),
  var(--night); }
.hero-grid { position: absolute; inset: 0; z-index: -2; opacity: 0.35;
  background-image: linear-gradient(rgba(145,175,208,0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(145,175,208,0.09) 1px, transparent 1px);
  background-size: 72px 72px; mask-image: radial-gradient(70% 70% at 60% 50%, #000 30%, transparent 100%); -webkit-mask-image: radial-gradient(70% 70% at 60% 50%, #000 30%, transparent 100%); }
.hero-3d { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-3d canvas { width: 100% !important; height: 100% !important; display: block; }
.hero-3d::before { /* wash that stays if WebGL never mounts */
  content: ""; position: absolute; right: 8%; top: 32%; width: 34vw; max-width: 520px; aspect-ratio: 1.4; border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
  background: radial-gradient(circle at 35% 30%, rgba(145,175,208,0.5), rgba(61,82,146,0.25) 45%, transparent 70%); filter: blur(30px); opacity: 0.9; transition: opacity 1s; }
.hero-3d.has-3d::before { opacity: 0; }

.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: end; }
.hero-copy { display: grid; gap: 28px; max-width: 820px; }
.hero-copy .display { max-width: 15ch; }
.hero-facts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; color: var(--night-ink-2); font-weight: 600; font-size: 15px; }
.hero-facts li { display: flex; align-items: center; gap: 10px; }
.hero-facts svg { width: 18px; height: 18px; color: var(--steel); flex: none; }

.hero-card { justify-self: end; align-self: end; width: min(100%, 360px); background: rgba(255,255,255,0.96); color: var(--ink); border-radius: 20px; padding: 18px; display: grid; gap: 14px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.5) inset; backdrop-filter: blur(10px); transform: translateY(40px); }
.hc-top { display: flex; justify-content: space-between; align-items: center; }
.hc-id { font-weight: 800; color: var(--navy); font-size: 14px; }
.hc-body { display: grid; gap: 2px; }
.hc-body strong { font-size: 16px; letter-spacing: -0.01em; }
.hc-body span { color: var(--ink-2); font-size: 13px; }
.hc-time { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; background: var(--raised); border-radius: 12px; padding: 10px 12px; }
.hc-time small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.hc-time b { font-size: 16px; letter-spacing: -0.02em; }
.hc-sep { width: 28px; height: 2px; background: linear-gradient(90deg, var(--navy), var(--amber)); border-radius: 2px; position: relative; }
.hc-sep::after { content: ""; position: absolute; right: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(245,181,49,0.25); }
.hero-card.is-waiting .hc-sent, .hero-card.is-waiting .hc-pill { opacity: 0; transform: translateY(6px); }
.hc-sent, .hc-pill { transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out); }
.hero-card.is-waiting .hc-sep::after { animation: hcpulse 1s var(--ease-in-out) infinite alternate; }
@keyframes hcpulse { from { transform: translateX(-26px); } to { transform: translateX(0); } }
.hc-foot { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.hc-foot span { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; }
.hc-foot small { font-size: 12px; font-weight: 700; color: var(--ink-3); }

.hero-scroll { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: 24px; height: 40px; border-radius: 14px; border: 1.5px solid rgba(145,175,208,0.4); }
.hero-scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--amber); animation: scrollhint 1.8s var(--ease-in-out) infinite; }
@keyframes scrollhint { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

@media (max-width: 1100px) {
  /* stacked: copy, card, then the bin as its own block so no text sits over it */
  .hero { display: flex; flex-direction: column; justify-content: flex-start; }
  .hero-inner { order: 1; grid-template-columns: 1fr; align-items: start; }
  .hero-card { justify-self: start; transform: none; margin-top: 10px; }
  .hero-3d { order: 2; position: relative; inset: auto; height: 380px; width: 100%; margin-top: -10px; }
  .hero-3d::before { right: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 70vw; }
  .hero-scroll { display: none; }
}
@media (max-width: 640px) {
  .hero { padding-top: 112px; padding-bottom: 60px; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-scroll { display: none; }
}

/* status marquee */
.vocab { padding: 14px 0 26px; border-top: 1px solid var(--night-line); border-bottom: 1px solid var(--night-line); }
.vocab .pill { font-size: 13px; padding: 8px 14px; }

/* ---------- stacked loop ---------- */
.loop { overflow: visible; }
.stack { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.stack-card {
  position: sticky; top: 96px;
  display: grid; grid-template-columns: 90px minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 32px; align-items: center;
  background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 48px);
  box-shadow: 0 -20px 60px -30px rgba(0,0,0,0.7);
  transform-origin: 50% 0;
  overflow: clip;
}
.stack-card::after { content: attr(data-n); position: absolute; right: -0.05em; bottom: -0.32em; font-size: clamp(160px, 24vw, 360px); font-weight: 800; letter-spacing: -0.06em; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(145,175,208,0.22); pointer-events: none; user-select: none; }
.stack-card:nth-child(1) { top: 96px; }
.stack-card:nth-child(2) { top: 112px; }
.stack-card:nth-child(3) { top: 128px; }
.stack-card:nth-child(4) { top: 144px; }
.stack-card:nth-child(5) { top: 160px; }
.stack-n { font-size: clamp(44px, 6vw, 84px); font-weight: 200; letter-spacing: -0.06em; line-height: 1; color: var(--steel); align-self: start; }
.stack-body { display: grid; gap: 14px; }
.stack-body p { color: var(--night-ink-2); font-size: 17px; max-width: 52ch; }
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; font-weight: 600; font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: rgba(52,211,153,0.16); }
.ticks li::after { content: ""; position: absolute; left: 4.5px; top: 8.5px; width: 7px; height: 4px; border-left: 2px solid var(--mint); border-bottom: 2px solid var(--mint); transform: rotate(-45deg); }
.on-canvas .ticks li::before, .on-white .ticks li::before { background: var(--s-delivered-bg); }
.on-canvas .ticks li::after, .on-white .ticks li::after { border-color: var(--s-delivered); }
.stack-art { min-height: 220px; display: grid; place-items: center; border-radius: 18px; background: radial-gradient(400px 260px at 50% 40%, rgba(61,82,146,0.35), transparent 70%); padding: 16px; }
.mini-form { width: min(100%, 320px); background: #fff; color: var(--ink); border-radius: 16px; padding: 14px; display: grid; gap: 8px; box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7); }
.mf-row { display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
.mf-l { color: var(--ink-3); font-weight: 600; } .mf-v { font-weight: 700; }
.mf-btn { margin-top: 4px; background: var(--navy); color: #fff; text-align: center; padding: 12px; border-radius: 10px; font-weight: 800; font-size: 14px; }
.bubble { width: min(100%, 320px); background: #fff; color: var(--ink); border-radius: 18px 18px 18px 4px; padding: 14px 16px; font-size: 14px; line-height: 1.45; box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7); }
.bubble-meta { font-size: 12px; color: var(--night-ink-3); margin-top: 8px; font-weight: 600; justify-self: start; width: min(100%, 320px); }
.steps { width: min(100%, 320px); display: grid; gap: 8px; }
.steps span { padding: 11px 14px; border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid var(--night-line); font-weight: 700; font-size: 13px; }
.steps .done { color: var(--night-ink-2); }
.steps .done::after { content: " ✓"; color: var(--mint); }
.steps .now { background: #fff; color: var(--ink); border-color: #fff; }
.steps-total { width: min(100%, 320px); margin-top: 10px; display: flex; justify-content: space-between; align-items: baseline; background: var(--navy); color: #fff; border-radius: 12px; padding: 12px 14px; }
.steps-total b { font-size: 22px; letter-spacing: -0.03em; }
.steps-total small { font-size: 11px; font-weight: 700; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.08em; }
.run-row { width: min(100%, 340px); display: grid; grid-template-columns: 18px 44px 1fr auto; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin: 4px 0; box-shadow: 0 20px 40px -24px rgba(0,0,0,0.7); }
.rr-h { color: var(--ink-3); font-weight: 800; }
.inv { width: min(100%, 320px); background: #fff; color: var(--ink); border-radius: 16px; padding: 16px; display: grid; gap: 10px; font-size: 13px; box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7); }
.inv-h { display: flex; justify-content: space-between; font-weight: 800; }
.inv-l { display: flex; justify-content: space-between; color: var(--ink-2); }
.inv-t { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; font-weight: 800; font-size: 15px; }

@media (max-width: 900px) {
  .stack-card { grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
  .stack-card { top: 84px !important; }
  .stack-n { font-size: 40px; }
  .stack-art { min-height: 0; }
}

/* ---------- quote ---------- */
.quote-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.quote-copy { display: grid; gap: 24px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.feature-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.feature-list svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--navy-light); color: var(--navy); }
.feature-list div { color: var(--ink-2); font-size: 16px; }
.feature-list strong { color: var(--ink); display: block; margin-bottom: 2px; }
.quote-copy .btn { justify-self: start; }

.quote-stage { position: relative; min-height: 640px; display: grid; place-items: center; }
.quote-stage::before { content: ""; position: absolute; inset: 10% 0; border-radius: 40px; background: radial-gradient(60% 60% at 50% 50%, rgba(61,82,146,0.16), transparent 70%); }
.q-phone { position: relative; z-index: 2; }
.q-thread { gap: 12px; padding-top: 10px; }
.q-sms { background: #fff; border: 1px solid var(--border); border-radius: 18px 18px 18px 4px; padding: 12px 14px; font-size: 12.5px; line-height: 1.45; opacity: 0; transform: translateY(16px) scale(0.96); transform-origin: 0 100%; }
.q-mail { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: grid; gap: 8px; opacity: 0; transform: translateY(20px); }
.qm-h { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); font-weight: 700; }
.qm-from { color: var(--ink); }
.qm-s { font-weight: 800; font-size: 13px; letter-spacing: -0.01em; }
.qm-card { background: var(--canvas); border-radius: 10px; padding: 10px; display: grid; gap: 6px; font-size: 11.5px; }
.qm-row { display: flex; justify-content: space-between; color: var(--ink-2); }
.qm-tot { display: flex; justify-content: space-between; font-weight: 800; border-top: 1px solid var(--border); padding-top: 6px; }
.qm-btn { background: var(--navy); color: #fff; text-align: center; border-radius: 8px; padding: 8px; font-weight: 800; margin-top: 2px; }
.q-ring { position: absolute; z-index: 3; left: 0; top: 11%; width: 150px; height: 150px; display: grid; place-items: center; filter: drop-shadow(0 20px 30px rgba(31,42,74,0.25)); }
.q-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: #fff; stroke: var(--border); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--amber); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; }
.q-ring-label { position: relative; text-align: center; display: grid; gap: 2px; }
.q-ring-label b { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.q-ring-label small { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.q-size { position: absolute; z-index: 3; right: 0; bottom: 10%; background: #fff; border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; box-shadow: 0 30px 60px -30px rgba(31,42,74,0.5), 0 0 0 1px var(--border); opacity: 0; transform: translateY(16px); }
.q-size small { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.q-sizes { display: flex; gap: 6px; }
.q-sizes span { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.q-sizes span b { font-size: 14px; color: var(--ink); }
.q-sizes .on { background: var(--navy); border-color: var(--navy); color: rgba(255,255,255,0.8); }
.q-sizes .on b { color: #fff; }
@media (max-width: 1000px) { .quote-grid { grid-template-columns: 1fr; } .quote-stage { min-height: 600px; } }
@media (max-width: 420px) { .q-ring { width: 120px; height: 120px; top: 4%; } .q-ring-label b { font-size: 24px; } .q-size { right: -4px; bottom: 2%; } .q-sizes span { padding: 6px 8px; } }

/* ---------- dispatch ---------- */
.board { max-width: 1400px; margin-inline: auto; }
.board-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 520px; }
.board-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr); gap: 14px; }
.live-map { position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #f3f6fa; min-height: 240px; }
.map-svg { width: 100%; height: 100%; display: block; }
.map-legend { position: absolute; left: 10px; bottom: 10px; display: grid; gap: 4px; background: rgba(255,255,255,0.9); border-radius: 8px; padding: 8px 10px; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.map-legend span { display: flex; align-items: center; gap: 6px; }
.map-legend i { width: 8px; height: 8px; border-radius: 50%; }
.dispatch-points > div { display: grid; gap: 10px; align-content: start; }
.dispatch-points p { color: var(--ink-2); font-size: 15px; }
.pt-icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--navy-light); color: var(--navy); }
@media (max-width: 1000px) { .board-split { grid-template-columns: 1fr; } .board-grid { grid-template-columns: 170px 1fr; } .ui-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .board-grid { grid-template-columns: 1fr; } .ui-side { display: none; } .ui-row { grid-template-columns: 48px minmax(0, 1fr) auto; } .ui-row > :nth-child(3), .ui-row > :nth-child(4) { display: none; } .ui-row .pill { font-size: 11px; padding: 3px 8px; } }

/* ---------- drivers ---------- */
.drv-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 60px; align-items: center; }
.drv-phone-wrap { position: relative; display: grid; place-items: center; min-height: 680px; }
.drv-phone-wrap::before { content: ""; position: absolute; inset: 8% 0; border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(61,82,146,0.5), transparent 70%); filter: blur(20px); }
.drv-phone { --w: 310px; position: relative; z-index: 2; }
.drv-offline { background: var(--s-today-bg); color: var(--s-today); }
.drv-offline.online { background: var(--s-delivered-bg); color: var(--s-delivered); }
.drv-sync { position: absolute; z-index: 3; right: 4%; top: 18%; opacity: 0; transform: translateY(10px); }
.drv-sync .pill { font-size: 13px; padding: 8px 12px; box-shadow: 0 20px 40px -20px rgba(0,0,0,0.8); }
.drv-copy { display: grid; gap: 24px; }
.drv-cards .card { padding: 22px; gap: 10px; }
.drv-cards .card p { font-size: 15px; }
.drv-copy .btn { justify-self: start; }
@media (max-width: 1000px) { .drv-grid { grid-template-columns: 1fr; } .drv-phone-wrap { min-height: 0; padding: 40px 0; order: 2; } }

/* ---------- money ---------- */
.card.tall { padding: 34px; gap: 16px; }
.card.tall .h3 { font-size: 24px; }

/* ---------- automations ---------- */
.auto-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 60px; align-items: center; }
.auto-board { display: grid; gap: 18px; background: var(--canvas); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.auto-group h3 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { position: relative; padding: 9px 14px 9px 30px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-weight: 700; font-size: 14px; transition: transform 0.4s var(--ease-out), border-color 0.3s; }
.chips span::before, .chips span::after { content: ""; position: absolute; left: 12px; top: 50%; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%); }
.chips span::before { background: var(--navy); left: 11px; margin-top: -4px; }
.chips span::after { background: var(--amber); left: 11px; margin-top: 4px; }
.chips span:hover { transform: translateY(-2px); border-color: var(--muted); }
.auto-legend { display: flex; gap: 18px; font-size: 12px; font-weight: 700; color: var(--ink-3); padding-top: 6px; border-top: 1px solid var(--border); }
.auto-legend span { display: flex; align-items: center; gap: 6px; }
.auto-legend i { width: 8px; height: 8px; border-radius: 50%; }
.auto-legend .sms { background: var(--navy); } .auto-legend .mail { background: var(--amber); }
@media (max-width: 900px) { .auto-grid { grid-template-columns: 1fr; } }

/* ---------- proof ---------- */
.proof { overflow: clip; }
.proof::before { content: ""; position: absolute; right: -10%; top: -30%; width: 50vw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(145,175,208,0.35), transparent 65%); pointer-events: none; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; position: relative; }
.proof-stats { display: grid; gap: 40px; }
.proof .big .to { font-weight: 200; color: var(--amber); margin: 0 0.05em; }
.pbar { display: grid; gap: 6px; margin-top: 10px; max-width: 420px; }
.pbar > span { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,0.18); overflow: hidden; }
.pbar > span::after { content: ""; position: absolute; inset: 0; width: var(--w); background: rgba(255,255,255,0.55); border-radius: 6px; transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.4s var(--ease-out) 0.2s; }
.pbar > span.after::after { background: var(--amber); transition-delay: 0.5s; }
.is-in .pbar > span::after { transform: scaleX(1); }
.pbar small { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
@media (max-width: 900px) { .proof-grid { grid-template-columns: 1fr; } }

/* ---------- integrations ---------- */
.integ-head { display: grid; gap: 14px; max-width: 760px; }
.integ-track span { padding: 14px 24px; border-radius: 999px; border: 1px solid var(--night-line); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--night-ink); white-space: nowrap; }
.integ-track { gap: 12px; animation-duration: 46s; }
.integ-track.rev { animation-direction: reverse; animation-duration: 58s; margin-top: 12px; }
.on-navy-ghost { --fg: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.35); }
.on-navy-ghost:hover { background: rgba(255,255,255,0.1); }
