/* ===== Lessons from the most-visited sites: finder, assistant, testimonials, perf ===== */
.bg-soft { background: var(--slate-50); }
.hero video { opacity: 0; transition: opacity .8s ease; }
.hero video.ready { opacity: 1; }

/* Testimonials (shared by home and team) */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi { background: #fff; border: 1px solid var(--slate-100); border-radius: 20px; padding: 30px; display: flex; flex-direction: column; gap: 18px; margin: 0; }
.testi .q { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--navy); color: var(--teal); }
.testi .q svg.i { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.testi blockquote { font-size: 17px; color: var(--navy-900); font-weight: 500; line-height: 1.5; flex: 1; margin: 0; }
.testi .who { display: flex; gap: 12px; align-items: center; padding-top: 16px; border-top: 1px solid var(--slate-100); }
.testi .who i { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-600); font-style: normal; font-weight: 700; font-size: 14px; }
.testi .who b { display: block; font-size: 14.5px; color: var(--navy-900); }
.testi .who span { font-size: 12.5px; color: var(--slate-500); }
#testimonials .center-cta { display: flex; justify-content: center; margin-top: 40px; }

/* Smart finder: one primary box, search-engine style */
.finder { position: relative; display: flex; align-items: center; gap: 10px; max-width: 600px; margin-top: 28px; height: 56px; padding: 0 8px 0 18px; background: #fff; border-radius: 16px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); border: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.finder:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(57,155,128,.25), 0 18px 40px -18px rgba(0,0,0,.6); }
.finder.open { border-radius: 16px 16px 0 0; }
.finder .f-ic { width: 20px; height: 20px; color: var(--slate-400); flex: none; }
.finder input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15.5px; color: var(--ink); }
.finder input::placeholder { color: var(--slate-400); }
.finder kbd { font-family: var(--mono); font-size: 12px; color: var(--slate-500); border: 1px solid var(--slate-200); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; }
.finder .f-go { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 0; background: var(--navy); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.finder .f-go:hover { background: var(--teal-600); }
.finder .f-go svg.i { width: 18px; height: 18px; }
.f-list { position: absolute; left: -1px; right: -1px; top: 100%; z-index: 20; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--teal); border-top: 1px solid var(--slate-100); border-radius: 0 0 16px 16px; box-shadow: 0 30px 50px -20px rgba(4,19,48,.55); max-height: 360px; overflow: auto; }
.f-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; color: var(--ink); }
.f-list li.on, .f-list li[data-i]:hover { background: var(--slate-50); }
.f-list .ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-600); }
.f-list .ic svg.i { width: 17px; height: 17px; }
.f-list .tx { flex: 1; min-width: 0; }
.f-list .tx b { display: block; font-size: 14.5px; color: var(--navy-900); }
.f-list .tx small { display: block; font-size: 12.5px; color: var(--slate-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-list .go { width: 16px; height: 16px; color: var(--slate-400); flex: none; }
.f-list .f-head { cursor: default; padding: 8px 12px 4px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-400); font-weight: 600; }
.f-list .f-empty { cursor: default; font-size: 13.5px; color: var(--slate-500); }
.finder-hints { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: rgba(255,255,255,.6); }
.finder-hints button { font: inherit; font-size: 12.5px; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 4px 12px; cursor: pointer; transition: background .2s; }
.finder-hints button:hover { background: rgba(255,255,255,.16); }
.finder-hints + .trust { margin-top: 28px; }

/* Guided assistant */
.assist { position: fixed; right: 24px; bottom: 24px; z-index: 70; font-size: 14px; }
/* Trucky: round icon-only button in Trucker Space colours (deep blue, aqua glow and icon) */
.assist-fab { display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border-radius: 50%; cursor: pointer; color: #20C5AF;
  background: radial-gradient(120% 140% at 50% 0%, rgba(32,197,175,.30), transparent 60%), linear-gradient(160deg, #0B213D, #00152E);
  border: 1px solid rgba(32,197,175,.55); box-shadow: 0 14px 30px -12px rgba(0,21,46,.85); transition: transform .2s, box-shadow .2s, border-color .2s; }
.assist-fab:hover, .assist-fab:focus-visible { transform: translateY(-2px); border-color: #20C5AF; outline: none; box-shadow: 0 0 0 5px rgba(32,197,175,.18), 0 14px 30px -10px rgba(32,197,175,.65); }
.assist-fab svg.i { width: 30px; height: 30px; color: #20C5AF; --ia: #fff; }
.assist-fab .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.assist.open .assist-fab { display: none; }
.assist-panel { width: 380px; max-width: calc(100vw - 32px); height: min(600px, calc(100vh - 48px)); display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 80px -24px rgba(4,19,48,.55); border: 1px solid var(--slate-100); animation: assistIn .25s ease; }
.assist-panel[hidden] { display: none; }
@keyframes assistIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.assist-panel header { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: var(--navy-950); color: #fff; }
.assist-panel .a-av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--teal); color: var(--navy-950); flex: none; }
.assist-panel .a-av svg.i { width: 20px; height: 20px; }
.assist-panel .hd { flex: 1; min-width: 0; }
.assist-panel .hd b { display: block; font-size: 15px; }
.assist-panel .a-st { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.7); }
.assist-panel .a-st i { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.assist-panel .a-st.off i { background: var(--slate-400); box-shadow: none; }
.assist-panel .x { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; }
.assist-panel .x:hover { background: rgba(255,255,255,.16); }
.assist-panel .log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--slate-25); }
.assist .msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; line-height: 1.5; animation: assistIn .2s ease; }
.assist .msg p { margin: 0; color: inherit; font-size: 14px; }
.assist .msg b { display: block; margin-bottom: 4px; color: var(--navy-900); }
.assist .msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--slate-100); border-bottom-left-radius: 6px; color: var(--ink); }
.assist .msg.me { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 6px; }
.assist .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.assist .acts .btn { height: 36px; padding: 0 14px; font-size: 11.5px; }
.assist .chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.q-chip { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 500; color: var(--navy); background: #fff; border: 1px solid var(--slate-200); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: border-color .2s, background .2s; }
.q-chip:hover { border-color: var(--teal); background: var(--teal-50); }
.q-chip svg.i { width: 15px; height: 15px; color: var(--teal-600); }
.q-chip.resume { background: var(--teal-50); border-color: var(--teal); }
.assist-panel .a-bar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--slate-100); background: #fff; }
.assist-panel .a-bar input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--slate-200); border-radius: 12px; padding: 0 14px; font: inherit; color: var(--ink); outline: 0; }
.assist-panel .a-bar input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(57,155,128,.2); }
.assist-panel .a-bar button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--teal); color: var(--navy-950); display: grid; place-items: center; cursor: pointer; }
.assist-panel .note { display: block; padding: 0 14px 10px; background: #fff; font-family: var(--mono); font-size: 10.5px; color: var(--slate-400); text-align: center; }

@media (max-width: 1080px) {
  .testi-grid { grid-template-columns: repeat(2, 1fr); }
  .assist { right: 16px; bottom: 16px; }
}
@media (max-width: 640px) {
  .testi-grid { grid-template-columns: 1fr; }
  .dock { grid-template-columns: repeat(4, 1fr) !important; }
  /* Phone: Trucky floats above the bottom dock (dock keeps 4 items) */
  .assist { right: 8px; left: 8px; bottom: 8px; }
  .assist-fab { width: 56px; height: 56px; margin: 0 4px 0 auto; }
  .assist-fab svg.i { width: 28px; height: 28px; }
  .assist { transition: bottom .35s ease; pointer-events: none; }
  .assist > .assist-fab, .assist > .assist-panel { pointer-events: auto; }
  body:has(.dock.show) .assist { bottom: 94px; }
  .assist-panel { height: min(78vh, 620px); }
  .finder { height: 52px; }
  .finder kbd { display: none; }
  .finder-hints > span { display: none; }
  .assist-panel { width: 100%; }
  .dock a { font-size: 10px; }
}

/* Finder dropdown must sit above the quick-access cards that overlap the hero */
.hero:has(.finder.open) { overflow: visible; z-index: 5; }

/* Language switch with flags */
.lang button { display: inline-flex; align-items: center; gap: 6px; }
.lang .flag { width: 18px; height: 12px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(15,27,45,.12); }
.lang button.on .flag { box-shadow: 0 0 0 1px rgba(255,255,255,.5); }

/* ===== Top bar: grouped contact info + prominent client actions ===== */
.topbar .container { height: 44px; }
.topbar .left { gap: 18px; }
.topbar .hours { padding: 4px 12px 4px 10px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.85); font-weight: 500; }
.topbar .left > a { color: rgba(255,255,255,.78); }
.topbar .left > a svg.i { color: var(--teal); }
.topbar .right { gap: 8px; }
.topbar .tb-act { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); transition: background .2s, border-color .2s, transform .15s; }
.topbar .tb-act svg.i { color: var(--teal); }
.topbar .tb-act:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.32); transform: translateY(-1px); }
.topbar .tb-act.tb-pay { background: var(--teal); border-color: var(--teal); color: var(--navy-950); }
.topbar .tb-act.tb-pay svg.i { color: var(--navy-950); }
.topbar .tb-act.tb-pay:hover { background: var(--teal-300); border-color: var(--teal-300); color: var(--navy-950); }
@media (max-width: 1080px) {
  .topbar .right { display: flex; }
  .topbar .left .mail, .topbar .left .mail + * { display: none; }
}
@media (max-width: 640px) {
  .topbar .container { justify-content: space-between; height: 42px; }
  .topbar .hours { padding: 3px 10px 3px 8px; font-size: 12px; }
  .topbar .tb-act { height: 28px; padding: 0 11px; font-size: 12px; }
  .topbar .tb-act:not(.tb-pay) { display: none; }
}

/* AI replies: paragraphs, short lists and a typing indicator */
.assist .msg p + p { margin-top: 8px; }
.assist .msg ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; list-style: disc; }
.assist .msg ul li { margin: 2px 0; }
.assist .msg ul li::marker { color: var(--teal-600); }
.assist .msg p + .acts, .assist .msg ul + .acts { margin-top: 10px; }
.assist .msg .typing { display: inline-flex; align-items: center; gap: 4px; color: var(--slate-500); }
.assist .msg .typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: assistDot 1s infinite ease-in-out; }
.assist .msg .typing span:nth-child(2) { animation-delay: .15s; }
.assist .msg .typing span:nth-child(3) { animation-delay: .3s; }
.assist .msg .typing em { font-style: normal; font-size: 12.5px; margin-left: 6px; }
@keyframes assistDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .assist .msg .typing span { animation: none; opacity: .7; } }

/* Trucky: the agent's icon (ITC Line truck cab) with its smile as the white accent */
.assist-panel .a-av svg.i { width: 24px; height: 24px; --ia: #fff; }

/* ---------- Trucky chat in Trucker Space colours (deep blue #0B213D→#00152E, aqua #20C5AF) ---------- */
.assist { --ts-1: #0B213D; --ts-2: #00152E; --ts-aqua: #20C5AF; --ts-aqua-ink: #0E8C7C; }
.assist-panel { box-shadow: 0 40px 80px -24px rgba(0,21,46,.6); border-color: #DCE7EC; }
.assist-panel header { position: relative; background: radial-gradient(120% 160% at 15% 0%, rgba(32,197,175,.26), transparent 60%), linear-gradient(160deg, var(--ts-1), var(--ts-2)); }
.assist-panel header::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 14px 14px; }
.assist-panel header > * { position: relative; z-index: 1; }
.assist-panel .a-av { background: rgba(32,197,175,.14); border: 1px solid rgba(32,197,175,.55); color: var(--ts-aqua); }
.assist-panel .x:hover { background: rgba(32,197,175,.18); }
.assist .msg.me { background: linear-gradient(160deg, var(--ts-1), var(--ts-2)); }
.assist .msg b { color: var(--ts-1); }
.assist .acts .btn-navy { background: linear-gradient(160deg, var(--ts-1), var(--ts-2)); color: #fff; border: 1px solid rgba(32,197,175,.45); }
.assist .acts .btn-navy:hover { border-color: var(--ts-aqua); box-shadow: 0 0 0 3px rgba(32,197,175,.18); }
.assist .acts .btn-outline { border-color: #CFE3E6; color: var(--ts-1); }
.assist .acts .btn-outline:hover { border-color: var(--ts-aqua); }
.assist .q-chip { color: var(--ts-1); }
.assist .q-chip svg.i { color: var(--ts-aqua-ink); }
.assist .q-chip:hover, .assist .q-chip.resume { border-color: var(--ts-aqua); background: rgba(32,197,175,.08); }
.assist-panel .a-bar input:focus { border-color: var(--ts-aqua); box-shadow: 0 0 0 3px rgba(32,197,175,.2); }
.assist-panel .a-bar button { background: var(--ts-aqua); color: var(--ts-2); transition: filter .2s; }
.assist-panel .a-bar button:hover { filter: brightness(1.08); }
.assist .msg .typing span { background: var(--ts-aqua); }
.assist .msg ul li::marker { color: var(--ts-aqua-ink); }

/* Trucky hover: speech bubble typed live, Trucky hops (Trucker Space colours) */
.tk-bub { position: absolute; right: 74px; bottom: 8px; display: flex; align-items: center; gap: 2px; height: 44px; padding: 0 16px; border-radius: 16px 16px 4px 16px;
  background: radial-gradient(120% 160% at 0% 0%, rgba(32,197,175,.25), transparent 60%), linear-gradient(160deg, #0B213D, #00152E); border: 1px solid rgba(32,197,175,.55);
  color: #fff; font-weight: 600; font-size: 14.5px; white-space: nowrap; box-shadow: 0 16px 34px -14px rgba(0,21,46,.8);
  transform-origin: 100% 100%; transform: scale(.4) translate(20px, 10px); opacity: 0; visibility: hidden;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.35), opacity .2s, visibility 0s .35s; pointer-events: none; }
.tk-bub::after { content: ""; position: absolute; right: -7px; bottom: 10px; width: 12px; height: 12px; background: #00152E; border: 1px solid rgba(32,197,175,.55); border-left: 0; border-bottom: 0; transform: rotate(45deg); }
.tk-bub b { display: inline-block; width: 2px; height: 17px; background: #20C5AF; margin-left: 2px; animation: tkCaret .8s steps(1) infinite; }
.assist.tk-on .tk-bub { transform: none; opacity: 1; visibility: visible; transition: transform .35s cubic-bezier(.2,.9,.3,1.35), opacity .2s, visibility 0s; }
.assist.tk-on .assist-fab svg.i { animation: tkHop .55s cubic-bezier(.3,1.6,.5,1); }
.assist.open .tk-bub { display: none; }
@keyframes tkHop { 0% { transform: translateY(0) scaleY(1); } 30% { transform: translateY(2px) scaleY(.85); } 60% { transform: translateY(-5px) scaleY(1.05); } 100% { transform: none; } }
@keyframes tkCaret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .tk-bub, .assist.tk-on .tk-bub { transition: none; transform: none; }
  .tk-bub b, .assist.tk-on .assist-fab svg.i { animation: none; }
}
@media (max-width: 640px) { .tk-bub { display: none; } }

/* Trucky "typing": its avatar + three bouncing dots before every reply, label underneath */
.assist .tk-typing { align-self: flex-start; display: flex; flex-direction: column; gap: 4px; animation: assistIn .2s ease; }
.assist .tk-row { display: flex; align-items: flex-end; gap: 8px; }
.assist .tk-row .av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(160deg, var(--ts-1), var(--ts-2)); color: var(--ts-aqua); box-shadow: 0 0 0 3px rgba(32,197,175,.18); }
.assist .tk-row .av svg.i { width: 18px; height: 18px; --ia: #fff; }
.assist .tk-row .msg { max-width: none; }
.assist .tk-dots { display: inline-flex; gap: 5px; align-items: center; padding: 3px 2px; }
.assist .tk-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ts-aqua); display: block; animation: assistDot 1s infinite ease-in-out; }
.assist .tk-dots i:nth-child(2) { animation-delay: .15s; }
.assist .tk-dots i:nth-child(3) { animation-delay: .3s; }
.assist .tk-typing small { font-size: 12px; color: var(--slate-500); margin-left: 38px; }
@media (prefers-reduced-motion: reduce) { .assist .tk-dots i { animation: none; opacity: .7; } }
