/* Night stage: dark bands that open and close the page, a rally car that drives down the side as you scroll, and
   motion tied to scrolling. Loaded after site.css. Anything on screen when the page opens is at rest and visible. */
:root {
  --night: #0c0e13; --night-2: #161a23; --night-ink: #f1f2f6; --night-muted: #9aa1b2; --night-line: #2a303c;
}
.night { position: relative; overflow: hidden; background: var(--night); color: var(--night-ink); isolation: isolate; }
.night .lead, .night .fine, .night .ask, .night .muted, .night .answer .yes { color: var(--night-muted); }
.beams { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 8%, color-mix(in srgb, var(--plate) 22%, transparent), transparent 70%),
    radial-gradient(40% 50% at 12% 100%, color-mix(in srgb, var(--red) 20%, transparent), transparent 70%); }
.road { position: absolute; z-index: -1; left: 50%; top: 0; bottom: 0; width: 6px; transform: translateX(-50%); opacity: 0.14;
  background: repeating-linear-gradient(to bottom, var(--night-ink) 0 40px, transparent 40px 90px); animation: lane 1.4s linear infinite; }
@keyframes lane { to { background-position: 0 90px; } }

/* Header: a stage bar fills as you scroll; on narrower screens the car drives along it */
.top { position: sticky; }
.stage-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.stage-bar > i { position: absolute; inset: 0 auto 0 0; width: calc(var(--progress, 0) * 100%); background: linear-gradient(90deg, var(--plate), var(--red)); }
.stage-bar .mini-car { position: absolute; top: -8px; left: calc(var(--progress, 0) * (100% - 32px)); width: 32px; height: 19px; display: none; }
@media (max-width: 1279px) { .stage-bar .mini-car { display: block; } }
.top.scrolled { box-shadow: 0 6px 24px color-mix(in srgb, var(--ink) 10%, transparent); }

/* The rally car on its road down the left of the page */
.side-road { position: fixed; top: 0; bottom: 0; left: 0; width: 76px; z-index: 4; pointer-events: none; display: none; }
.side-road svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.side-road .tarmac { fill: none; stroke: color-mix(in srgb, var(--ink) 9%, transparent); stroke-width: 26; stroke-linecap: round; }
.side-road .centre { fill: none; stroke: color-mix(in srgb, var(--ink) 25%, transparent); stroke-width: 1.5; stroke-dasharray: 8 10; }
.side-road .done { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; opacity: 0.85; }
.side-road .rally-car { position: absolute; left: 0; top: 0; width: 26px; height: 44px; margin: -22px 0 0 -13px; will-change: transform; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); }
@media (min-width: 1280px) { .side-road { display: block; } }

/* Hero */
.hero-night { padding-block: 84px 92px; }
.hero-night .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.hero-night .answer { color: var(--night-ink); }
.hero-night .lead { margin-top: 26px; }
.hero-night .ctas { margin-top: 32px; }
.hero-night .fine { margin-top: 16px; font-size: 14px; }
.btn { transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.btn-ghost { border-color: color-mix(in srgb, var(--night-ink) 40%, transparent); color: var(--night-ink); }
.btn-ghost:hover { border-color: var(--night-ink); }
.btn-go:hover { box-shadow: 0 10px 28px color-mix(in srgb, var(--red) 40%, transparent); }
.btn:active { transform: translateY(1px) scale(0.98); }
.hero-copy > * { animation: rise 0.7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.hero-copy > :nth-child(5) { animation-delay: 0.3s; }
@keyframes rise { from { transform: translateY(18px); } }
@media (max-width: 900px) { .hero-night .wrap { grid-template-columns: minmax(0, 1fr); gap: 44px; } }

/* The app window in the hero */
.app-window { margin: 0; background: var(--night-2); border: 1px solid var(--night-line); border-radius: 16px; overflow: hidden; max-width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px color-mix(in srgb, var(--plate) 12%, transparent);
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg) translateY(calc(var(--progress, 0) * -60px)); transition: transform 0.5s ease; }
.app-window:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
@media (max-width: 900px) { .app-window, .app-window:hover { transform: none; } }
.app-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--night-line); font: 700 12px/1 var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--night-muted); }
.app-bar .dots { display: inline-flex; gap: 6px; }
.app-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--night-line); }
.app-bar .live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--plate); }
.app-bar .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--plate); animation: blink 1.6s infinite; }
.app-body { display: grid; gap: 14px; padding: 16px; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feed li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 10px; border: 1px solid transparent; transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease; }
.feed li.is-on { background: color-mix(in srgb, var(--plate) 9%, transparent); border-color: color-mix(in srgb, var(--plate) 35%, transparent); transform: translateX(4px); }
.feed .t { font: 700 12px/1 var(--mono); color: var(--night-muted); }
.feed .what { min-width: 0; }
.feed .what strong { display: block; font-size: 14px; }
.feed .what span { font-size: 12.5px; color: var(--night-muted); }
.draft-card { border: 1px solid var(--night-line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; background: var(--night); min-width: 0; }
.draft-head { display: flex; justify-content: space-between; gap: 10px; font: 500 12px/1.3 var(--mono); color: var(--night-muted); min-width: 0; }
.draft-head span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.draft-text { font-size: 14px; line-height: 1.55; min-height: 6.2em; }
.draft-text.typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--plate); animation: blink 0.8s infinite; }
.draft-actions { display: flex; gap: 8px; justify-content: flex-end; }
.btn-mini { font: 600 12px/1 var(--body); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--night-line); }
.btn-mini.go { background: var(--red); border-color: var(--red); color: var(--red-ink); }
.app-window figcaption { padding: 10px 16px; border-top: 1px solid var(--night-line); font: 500 11px/1.4 var(--mono); color: var(--night-muted); }

/* Pace notes ticker: runs on its own and is pushed along by scrolling */
.pacenotes { overflow: hidden; background: var(--plate); color: var(--plate-ink); }
.pacenotes-track { display: flex; width: max-content; gap: 48px; padding-block: 14px; animation: notes 38s linear infinite; transform: translateX(calc(var(--progress, 0) * -600px)); }
.pacenotes span { font: 800 22px/1 var(--display); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.pacenotes b { color: var(--red); font-weight: 900; }
@keyframes notes { to { translate: -50% 0; } }

/* The promise strip */
.promise { padding-block: 0; border-bottom: 1px solid var(--line); }
.promise .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.promise .lit { border-left: 1px solid var(--line); padding: 34px 22px; display: grid; gap: 10px; align-content: start; }
.promise .lit:first-child { border-left: 0; }
.promise .lit b { font: 900 30px/1 var(--display); text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink); }
.promise .lit.no b { color: var(--red); }
.promise .lit p { color: var(--muted); font-size: 16px; line-height: 1.45; }
@media (max-width: 900px) { .promise .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } .promise .lit:nth-child(3) { border-left: 0; } .promise .lit:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .promise .wrap { grid-template-columns: minmax(0, 1fr); } .promise .lit { border-left: 0; border-top: 1px solid var(--line); } .promise .lit:first-child { border-top: 0; } }

/* The stage route: a road down the middle, the car on it, checkpoints that light up as it passes */
.route { position: relative; }
.route-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 14px; transform: translateX(-50%); border-radius: 7px; background: var(--soft); }
.route-fill { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--route, 0) * 100%); border-radius: 7px; background: linear-gradient(var(--plate), var(--red)); }
.route-line .rally-car { position: absolute; left: 50%; top: calc(var(--route, 0) * 100%); width: 34px; height: 58px; margin: -29px 0 0 -17px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3)); }
.checkpoints { list-style: none; margin: 0; padding: 0; display: grid; gap: 72px; }
.cp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 120px; align-items: center; }
.cp:nth-child(even) .cp-text { order: 2; }
.cp-text { display: grid; gap: 8px; }
.cp:nth-child(odd) .cp-text { text-align: right; justify-items: end; }
.cp-text h3 { font: 900 clamp(40px, 5vw, 60px)/0.95 var(--display); text-transform: uppercase; transition: color 0.3s ease; color: var(--muted); }
.cp-text p { color: var(--muted); max-width: 38ch; }
.note-call { font: 700 12px/1 var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); }
.cp.reached h3 { color: var(--ink); }
.screen { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; min-width: 0;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--ink) 8%, transparent); transition: transform 0.5s cubic-bezier(.2, .7, .2, 1), box-shadow 0.5s ease; transform: scale(0.97); }
.cp.reached .screen { transform: none; box-shadow: 0 24px 60px color-mix(in srgb, var(--ink) 14%, transparent), 0 0 0 2px var(--plate); }
.screen-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; background: var(--soft); font-size: 14px; min-width: 0; }
.screen-mail { font-size: 14px; padding: 10px; border-left: 3px solid var(--plate); background: var(--soft); border-radius: 0 8px 8px 0; }
.meter { flex: 1; max-width: 140px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--plate), var(--red)); }
.pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pipe span { font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.5px; text-align: center; padding: 10px 4px; border-radius: 8px; background: var(--soft); color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.pipe span.on { background: var(--plate); color: var(--plate-ink); }
.route-more { margin-top: 56px; text-align: center; }
@media (max-width: 820px) {
  .route-line { left: 7px; transform: none; }
  .cp { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-left: 44px; }
  .cp:nth-child(even) .cp-text { order: 0; }
  .cp:nth-child(odd) .cp-text { text-align: left; justify-items: start; }
}

/* Statement, lit word by word as you scroll */
.statement { padding-block: 110px; }
.statement .wrap { display: grid; gap: 48px; }
.scrub { font: 800 clamp(36px, 5.6vw, 72px)/1.02 var(--display); text-transform: uppercase; letter-spacing: 0.3px; max-width: 18ch; }
.scrub .w { opacity: var(--o, 1); transition: opacity 0.2s linear, color 0.3s linear; }
.scrub .w.hot { color: var(--plate); }
.checklist.on-night { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
.checklist.on-night li { color: var(--night-muted); }
@media (max-width: 760px) { .checklist.on-night { grid-template-columns: minmax(0, 1fr); } }

/* Showcase cards with screens */
.showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.show { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.show:hover { box-shadow: 0 24px 60px color-mix(in srgb, var(--ink) 12%, transparent); border-color: var(--ink); }
.show-screen { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--soft); margin-bottom: 8px; }
.show-screen .screen-row, .show-screen .screen-mail { background: var(--surface); }
.show .role { font: 700 11px/1 var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--red); }
.show p { font-size: 15px; color: var(--muted); }
@media (max-width: 900px) { .showcase { grid-template-columns: minmax(0, 1fr); } }

/* Price */
.odometer { font: 900 clamp(64px, 9vw, 110px)/0.9 var(--display); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.odometer small { font: 600 18px/1 var(--body); color: var(--muted); letter-spacing: 0; }
.price-lap .quote { font-size: clamp(28px, 3.4vw, 40px); }

/* Finish */
.finish-night { padding-block: 96px; }
.finish-night .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.finish-night .answer { font-size: clamp(56px, 9vw, 116px); color: var(--night-ink); margin-top: 10px; }
.stamp-in.landed { animation: stamp 0.5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes stamp { from { transform: scale(1.18) rotate(-2deg); } }
@media (max-width: 820px) { .finish-night .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Sections glide in as they enter the screen, where the browser can tie animation to scrolling */
@supports (animation-timeline: view()) {
  .rv { animation: glide linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  @keyframes glide { from { opacity: 0.2; transform: translateY(40px); } }
}
@media (prefers-reduced-motion: reduce) {
  .app-window, .show { transform: none !important; }
  .pacenotes-track { transform: none; }
  .rv { animation: none !important; }
}

/* Grow-without-hiring calculator on the pricing page */
.calc-band { padding-block: 96px; }
.calc-band h2 { color: var(--night-ink); }
.calc { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.calc-inputs { display: grid; gap: 18px; }
.calc-inputs label { display: grid; gap: 8px; }
.calc-inputs span { font: 600 15px/1.3 var(--body); color: var(--night-ink); }
.calc-inputs small { font: 500 12px/1.3 var(--mono); color: var(--night-muted); }
.calc-inputs input { font: 700 24px/1 var(--mono); color: var(--night-ink); background: var(--night-2); border: 1px solid var(--night-line); border-radius: 10px; padding: 12px 14px; width: 100%; font-variant-numeric: tabular-nums; }
.calc-inputs input:focus-visible { outline: 3px solid var(--plate); outline-offset: 2px; }
.calc-out { display: grid; gap: 14px; background: var(--night-2); border: 1px solid var(--night-line); border-radius: 16px; padding: 26px; }
.calc-line { font-size: clamp(18px, 2vw, 22px); line-height: 1.4; color: var(--night-muted); }
.calc-line b { color: var(--night-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-verdict { margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--night-line); font: 800 clamp(28px, 3.4vw, 44px)/1.05 var(--display); text-transform: uppercase; letter-spacing: 0.3px; color: var(--night-ink); }
.calc-verdict span { color: var(--plate); display: block; font-size: 1.35em; font-variant-numeric: tabular-nums; }
.calc-note { margin-top: 20px; font: 500 12px/1.5 var(--mono); color: var(--night-muted); }
@media (max-width: 900px) { .calc { grid-template-columns: minmax(0, 1fr); } }

/* Where a salesperson's day goes, without and with LeadRally (proportions only, as a picture) */
.day-split { display: grid; gap: 18px; margin-bottom: 44px; }
.day { display: grid; gap: 8px; }
.day-label { font: 600 15px/1.3 var(--body); color: var(--night-muted); }
.day-label b { color: var(--night-ink); }
.day-bar { display: flex; gap: 4px; min-width: 0; }
.seg { flex: var(--f) 1 0; min-width: 0; padding: 14px 12px; border-radius: 8px; font: 600 13px/1.25 var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg.grind { background: var(--night-2); border: 1px solid var(--night-line); color: var(--night-muted); }
.seg.check { background: color-mix(in srgb, var(--plate) 22%, var(--night-2)); color: var(--night-ink); }
.seg.sell { background: var(--plate); color: var(--plate-ink); font-weight: 700; }
.day-note { color: var(--night-muted); max-width: 70ch; }
@media (max-width: 760px) { .day-bar { flex-direction: column; } .seg { flex: none; white-space: normal; } }

/* One person + LeadRally = three people: the point at a glance */
.equation { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 20px 32px; padding: 34px 20px; margin-bottom: 40px; border: 1px solid var(--night-line); border-radius: 18px; background: var(--night-2); }
.eq-side { display: grid; justify-items: center; gap: 12px; }
.eq-side p { font: 700 13px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 1px; color: var(--night-muted); text-align: center; }
.eq-side.big p { color: var(--plate); }
.eq-figs { display: flex; gap: 10px; align-items: end; height: 84px; }
.person { width: 60px; height: 84px; fill: var(--night-ink); }
.eq-side.big .person { fill: var(--plate); }
.eq-plate { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 16px; background: var(--red); color: var(--red-ink); font: 900 38px/1 var(--display); }
.eq-op { font: 900 clamp(48px, 6vw, 72px)/1 var(--display); color: var(--night-muted); }
@media (max-width: 600px) { .person { width: 42px; height: 59px; } .eq-figs { height: 59px; } .eq-plate { width: 59px; height: 59px; font-size: 28px; } }

/* Real numbers from a company using LeadRally */
.proof { padding-block: 96px; }
.proof h2 { color: var(--night-ink); }
.proof-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--night-line); border-bottom: 1px solid var(--night-line); }
.proof-fig { display: grid; gap: 10px; padding: 30px 24px; border-left: 1px solid var(--night-line); }
.proof-fig:first-child { border-left: 0; padding-left: 0; }
.proof-fig b { font: 900 clamp(56px, 8vw, 104px)/0.9 var(--display); color: var(--plate); font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.proof-fig span { color: var(--night-muted); font-size: 16px; }
.proof-note { margin-top: 20px; font: 500 12px/1.5 var(--mono); color: var(--night-muted); }
@media (max-width: 760px) { .proof-figs { grid-template-columns: minmax(0, 1fr); } .proof-fig { border-left: 0; padding-left: 0; border-top: 1px solid var(--night-line); } .proof-fig:first-child { border-top: 0; } }

/* "Literally", the brand word, in headings */
.lw { color: var(--red); }
.night .lw { color: var(--plate); }
