/* The home page only (body.lg-home). Loaded after assets/ledger.css by the home page.
 *
 * From the approved "After" mockup of 11 November 2026. Three jobs:
 *  1. Colour. The bright cyan (#00A8C8, navy #061A33 words) is for the main "Request a free chat" buttons and the
 *     call bar only. Links, option titles, icons, status pills, focus rings and the free website check stop using the
 *     turquoise accent and use the ink colour instead. The site's own dark background, three glows, circuit board
 *     and raised cards are untouched. Other pages keep the turquoise, so this is scoped to this one body class.
 *  2. Shape. The first screen (who, outcome, next step, the example automation over soft light streaks, the 100+
 *     card in front), a proof row that rises into it, and the free estimator.
 *  3. Motion with a job. Lines rise in order on load, the estimator figures count up (assets/ledger-home.js), the
 *     phone bar slides up only once the first-screen buttons have gone. All of it is off for reduced motion.
 * Edit here and in assets/ledger-home.js, and the markup in scripts/ledger/pages/home.mjs. */

/* ---------- 1. colour ---------- */
/* The tokens for this are in assets/ledger-shell.css (the one place colours are stated): body.lg-home sets the bright button
   colour (--cta, navy words --cta-ink, a thin navy ring in the light theme) and points --accent at the ink colour. */
.lg-home .btn:not(.ghost),.lg-home .lg-btn{box-shadow:inset 0 0 0 1.5px var(--cta-ring)}
.lg-home .btn:not(.ghost):hover,.lg-home .lg-btn:hover{filter:brightness(1.07)}
.lg-home .seg button[aria-pressed="true"],.lg-home .seg button[aria-selected="true"]{background:var(--ink);color:var(--bg)}
body.lg-home .chipb[aria-pressed="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
body.lg-home .chipb[aria-pressed="true"] small{color:var(--bg)}
.lg-home .pill.go,.lg-home .pill.ok{color:var(--ink);border-color:var(--ink)}
.lg-home .steps li.done .dot{background:var(--ink);border-color:var(--ink)}
.lg-home .steps li.now .dot{border-color:var(--ink);box-shadow:0 0 0 4px color-mix(in srgb,var(--ink) 18%,transparent)}
/* The Automation service card was a solid turquoise block; it is a raised card like the others. */
.lg-home .sp.k2{background:linear-gradient(var(--panel-2),var(--panel));color:var(--ink);border:1px solid color-mix(in oklch,var(--ink) 9%,var(--line));box-shadow:var(--raise-shadow)}
.lg-home .sp.k2 p{color:var(--muted)}
.lg-home .urlin{background:var(--bg);color:var(--ink);border:1.5px solid var(--line)}
.lg-home .urlin::placeholder{color:var(--muted)}
.lg-home .lg-skip:focus{background:var(--ink);color:var(--bg)}

/* ---------- 2a. first screen ---------- */
.lg-home .heroP.hh{padding-block:clamp(14px,2.4vw,30px) 150px;position:relative}
.hh-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:clamp(28px,4vw,56px);align-items:center}
.hh-copy{gap:0;align-content:center}
body.lg .hh-copy .hx{margin:0;font-size:clamp(1.5rem,3.4vw,2.9rem)}
/* The name is part of the headline (16 November 2026), in the same type. It stays on one line so it never splits as "Bots &" / "Pieces:". */
.hx-brand{white-space:nowrap}
.hh-copy .sub2{margin-top:18px}
.hh-copy .lede{margin-top:14px;max-width:50ch}
.hh-copy .cta{margin-top:26px}
.hh-copy .cap{margin-top:14px;max-width:54ch}
.hh-copy .cta .btn{white-space:nowrap}
.hh-vis{position:relative;padding:8px 0 4px}
.hh-back{position:absolute;inset:0;pointer-events:none;z-index:0}
/* Soft angled light behind the card: three rotated bands, faded out with a round mask. No box, outline or grid. */
.streaks{position:absolute;inset:-40px -70px -70px -50px;overflow:hidden;-webkit-mask-image:radial-gradient(closest-side at 52% 50%,#000 52%,transparent 100%);mask-image:radial-gradient(closest-side at 52% 50%,#000 52%,transparent 100%)}
.streaks::before{content:"";position:absolute;inset:0;background:radial-gradient(260px at 58% 46%,oklch(0.48 0.1 190 / .34),transparent 72%),radial-gradient(240px at 92% 70%,oklch(0.4 0.11 250 / .3),transparent 72%)}
.streaks i{position:absolute;left:-10%;width:130%;height:64px;border-radius:12px;transform:rotate(-17deg);background:linear-gradient(90deg,transparent,oklch(0.55 0.09 195 / .4) 30%,oklch(0.45 0.11 250 / .55) 70%,transparent)}
.streaks i:nth-child(1){top:14%}
.streaks i:nth-child(2){top:44%;height:44px;opacity:.8}
.streaks i:nth-child(3){top:72%;height:76px;opacity:.65}
:root[data-theme="light"] .streaks{opacity:.55}
.hh-card.runbox{position:relative;z-index:2;width:85%;transform:rotate(-1.2deg);transition:transform .25s cubic-bezier(.16,1,.3,1)}
.hh-card.runbox:hover{transform:rotate(-1.2deg) translateY(-3px)}
.hh-stat{position:absolute;right:-8px;bottom:-56px;width:200px;z-index:3;padding:14px 18px;border-radius:22px;background:linear-gradient(var(--panel-2),var(--panel));border:1px solid color-mix(in oklch,var(--ink) 9%,var(--line));box-shadow:var(--raise-shadow);transition:transform .25s cubic-bezier(.16,1,.3,1)}
.hh-stat:hover{transform:translateY(-4px)}
.hh-stat .big{display:block;font:500 2.8rem/1 var(--font-d);letter-spacing:-.03em}
.hh-stat p{font-size:.92rem;line-height:1.35;margin-top:8px;color:var(--ink)}
.hh-stat small{display:block;color:var(--muted);font-size:.8rem;margin-top:4px}

/* ---------- 2b. proof row (rises into the first screen by 72px) ---------- */
.proof-wrap{position:relative;z-index:5;margin-top:-72px}
.proof{display:grid;grid-template-columns:1fr 1fr 2.2fr;gap:16px}
.proof .pf{padding:20px 22px;gap:0;justify-content:center}
.pf .big{display:block;font:500 clamp(1.9rem,3.4vw,2.5rem)/1.05 var(--font-d);letter-spacing:-.02em}
.pf>p{font-size:.92rem;line-height:1.35;margin-top:8px;color:var(--muted)}
/* .proof .pf sets gap:0 for the number cells; the quote card needs room between the site picture and the words
   (Jacob, 12 Nov 2026: "image is too close to text"), so this rule is scoped to win over it. */
.proof .pf-quote{margin:0;flex-direction:row;align-items:center;gap:clamp(20px,2.4vw,30px)}
.pf-img{width:150px;flex:none;aspect-ratio:16/10;border-radius:12px}
.pf-text{display:grid;gap:8px;min-width:0}
.pf-text blockquote{margin:0}
.pf-text q{font:500 clamp(1.1rem,1.7vw,1.3rem)/1.3 var(--font-d);letter-spacing:-.01em;quotes:"\201C" "\201D"}
.pf-text .cap{font-size:.84rem;line-height:1.4}

/* ---------- 2c. estimator ---------- */
.lg-home .est{padding-block:clamp(40px,6vw,84px) 0}
.lg-home .est-panel{padding:clamp(20px,3.4vw,40px);gap:0}
.lg-home .est-panel h2{font:500 clamp(1.6rem,3.2vw,2.4rem)/1.1 var(--font-d);letter-spacing:-.01em}
.est-lede{margin-top:10px;max-width:62ch;font-size:.98rem}
.est-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:26px;align-items:stretch}
.efld{margin-bottom:22px}
.efld:last-child{margin-bottom:0}
.efld label{display:block;font:500 1rem var(--font-d);margin-bottom:8px}
.erow{display:flex;align-items:center;gap:14px}
.ein{font:400 1.1rem var(--font-b);color:var(--ink);background:var(--bg);border:1.5px solid var(--line);border-radius:14px;padding:.6em .8em;text-align:right;min-height:48px}
.ew1{width:96px}.ew2{width:120px}.ew3{width:84px;text-align:center}
.erange{flex:1;min-width:0;accent-color:var(--ink);height:6px}
.estep{flex:none;width:48px;height:48px;border-radius:50%;border:1.5px solid var(--line);background:transparent;color:var(--ink);font-size:1.4rem;line-height:1;cursor:pointer;transition:background .2s,transform .2s}
.estep:hover{background:var(--panel-2);transform:translateY(-2px)}
.estep:active{transform:scale(.96)}
.eunit{color:var(--muted);font-size:.95rem}
.est-res{background:var(--bg);border:1px solid var(--line);border-radius:24px;padding:clamp(18px,2.6vw,26px);display:flex;flex-direction:column;gap:14px;box-shadow:var(--raise-shadow);position:relative;min-width:0}
.est-tag{align-self:flex-start}
.est-out{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0}
.est-out>div{min-width:0}
.est-out dt{font-size:.86rem;color:var(--muted)}
.est-out dd{margin:0;font:500 clamp(1.8rem,4vw,2.9rem)/1.05 var(--font-d);letter-spacing:-.02em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.est-sum,.est-empty{font-size:.9rem;line-height:1.5;color:var(--muted)}
.est-empty{font:500 1.05rem var(--font-d);color:var(--ink)}
.est-res .btn{align-self:flex-start;margin-top:auto}
.est-res .btn.is-off{opacity:.4;cursor:not-allowed;transform:none;filter:none;pointer-events:none}
.est-quiz{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}
.js .est-quiz.needs-js{display:block}
.est-quiz .lab{font:500 1rem var(--font-d);letter-spacing:0;text-transform:none;color:var(--ink)}
.est-quiz .chips{margin-top:12px}
.est-match{margin-top:12px;min-height:1.5em;font-size:.95rem}
.est-match b{color:var(--ink);font-family:var(--font-d);font-weight:500}
.est-skip{margin-top:16px}
.est-skip a{color:var(--ink)}

/* ---------- 3a. motion with a job (no scroll listeners; reduced motion switches all of it off) ---------- */
@keyframes hhRise{from{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}
@media (prefers-reduced-motion:no-preference){
  .lg-home .hh-copy .cap{animation:hhRise .7s cubic-bezier(.16,1,.3,1) .95s backwards}
  .lg-home .hh-card.runbox{animation:hhRise .8s cubic-bezier(.16,1,.3,1) .5s backwards}
  .lg-home .hh-stat{animation:hhRise .8s cubic-bezier(.16,1,.3,1) .8s backwards}
}
@media (prefers-reduced-motion:reduce){
  .lg-home .hh-card.runbox,.lg-home .hh-stat,.estep{transition:none}
}

/* ---------- 3b. phone bottom bar: its styles live in assets/ledger-shell.css (the footer test keeps every call bar
   rule in that one sheet). It shows only after the first-screen buttons have scrolled out and not while the enquiry box is on
   screen; assets/ledger-home.js sets body.mcta-managed and body.mcta-on. ---------- */

/* ---------- 4. phone and narrow windows (the real phone layout, not a shrunk desktop) ---------- */
@media (max-width:860px){
  /* The floating call pill from glass.js sat on top of the example card; the phone bar below does its job. */
  .lg-home .bp-callbar{display:none}
  .lg-home .heroP.hh{padding-block:10px 56px}
  .hh-grid{grid-template-columns:1fr;gap:26px}
  .hh-copy .cta{flex-direction:column;align-items:stretch;width:100%}
  .hh-copy .cta .btn{width:100%;white-space:normal;text-align:center}
  .streaks{inset:-24px -30px -60px -20px}
  .hh-card.runbox{width:96%}
  .hh-vis{padding-bottom:0}
  .hh-stat{position:relative;right:auto;bottom:auto;width:min(230px,78%);margin:14px 0 0 auto;padding:12px 16px}
  .hh-stat .big{font-size:2.2rem}
  .proof-wrap{margin-top:-6px}
  .proof{grid-template-columns:1fr 1fr;gap:12px}
  .proof .pf-quote{grid-column:1/-1}
  .proof .pf{padding:16px}
  .pf-img{display:none}
  .est-grid{grid-template-columns:1fr;gap:18px;margin-top:20px}
  .est-out dd{font-size:2rem}
  .est-res .btn{align-self:stretch}
  .lg-home .est-panel{padding:20px 16px}
}
@media (max-width:520px){
  .est-out{grid-template-columns:1fr}
}

/* The streaks bleed past the card on purpose; clip them at the first-screen section so they never widen the page
   (found by check-hero.cjs: the page scrolled sideways by 10 to 50px). */
.lg-home .heroP.hh{overflow-x:clip}
