/* AI Buddy · the final picture ("Your app. Your strings."), the footer and the phone bar
   Not a .sec: the picture fills one window and sets its own spacing; data-sec="fin" brings it under the shared motion off rule.
   Nothing depends on scroll position: the picture does not zoom, the text enters once (assets/kit.js).

   Layout   .end            the section: the picture (.end-img, media/image-3.jpg) covers it, a shade (::before) sits over it
            .end-in         headline + buttons, at the top of the picture, over the empty wall. The robots stand in a row
                            whose faces begin at about 63% of the picture's height, so the block is sized to end above that:
                            the headline shrinks with the window height as well as its width
            .end-foot       the footer: copyright, links, and the motion switch (.mot2, driven by the shell script)
            .end-bar        the sticky "Start for CAD $20" bar on narrow pages
   States   .end-bar.is-gone  set by assets/sec-fin.js while the final picture is on screen; the bar fades away and
                              cannot be reached by keyboard. Without the script the bar simply stays.
   Buttons  .btn2.p, .btn2 .ar and .mot2 were styled only in the old final section's layer (assets/legacy/fin.css),
            and every element that uses them is in this part of the page, so their rules now live here. */

/* the section */
.s5 .after>.end{
  position:relative;display:block;min-height:var(--dvh);overflow:hidden;color:#fff;background:#17110f;
  --end-top:clamp(40px,calc(var(--dvh) * .1),120px);
}
.end-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%;filter:sepia(.18) saturate(1.05) brightness(1.04)}
/* the shade: dark over the wall where the text stands, clear over the robots, warm and dark again into the footer */
.s5 .after>.end::before{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:
    radial-gradient(70% 60% at 30% 28%,rgba(10,8,8,.45),rgba(10,8,8,0) 100%),
    linear-gradient(rgba(10,8,8,.84),rgba(10,8,8,.76) 46%,rgba(10,8,8,.58) 54%,rgba(10,8,8,.14) 61%,rgba(10,8,8,0) 65%,rgba(10,8,8,0) 80%,rgba(23,17,15,.8));
}
.s5 .after>.end>.end-in{position:relative;z-index:2;padding-block:var(--end-top) 0}

/* headline + buttons */
.end-h{
  margin:0;font-family:var(--serif);font-weight:300;line-height:.92;letter-spacing:-.055em;color:#fff;
  font-size:clamp(56px,min(9cqw,calc(var(--dvh) * .27 - 52px)),164px);
}
.end-h em{font-style:normal;color:var(--v2)}
.end-ctas{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:clamp(24px,3cqw,48px)}
.end-ctas .btn2.p{box-shadow:0 0 0 1px rgba(217,198,255,.75),0 0 28px rgba(139,61,255,.45),0 0 90px rgba(139,61,255,.25)}

/* shared button parts (primary button and the arrow chip) */
.btn2.p{background:#f6f6f4;color:var(--ink)}
.btn2.p::before{background:var(--v)}
.btn2.p:hover{color:#fff;box-shadow:0 18px 50px -12px rgba(139,61,255,.9)}
.btn2 .ar{display:grid;place-items:center;width:38px;height:38px;border-radius:7px;overflow:hidden;transition:background .4s}
.btn2 .ar svg{width:15px;height:15px;transition:transform .6s var(--ez)}
.btn2.p .ar{background:var(--ink);color:#fff}
.btn2.p:hover .ar{background:#fff;color:var(--v)}
.btn2:hover .ar svg{animation:arr .7s var(--ez)}
@keyframes arr{0%{transform:none}45%{transform:translateX(160%)}46%{transform:translateX(-160%)}100%{transform:none}}

/* the footer */
.s5 .after>.end-foot{padding:clamp(40px,4cqw,60px) 0;border-top:1px solid var(--ld);background:#17110f;font-size:12px;letter-spacing:.04em;color:#8d8d96}
.end-foot .wrap{display:flex;flex-wrap:wrap;justify-content:space-between;gap:20px}
.end-foot nav{display:flex;flex-wrap:wrap;gap:8px 28px}
.end-foot a{color:inherit;text-decoration:none;background:linear-gradient(currentColor,currentColor) 0 100%/0 1px no-repeat;transition:background-size .5s var(--ez),color .3s}
.end-foot a:hover{color:#fff;background-size:100% 1px}
.end-foot a:focus-visible{outline:2px solid var(--v2);outline-offset:3px}
.mot2{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 4px;border:0;background:none;color:inherit;cursor:pointer;font:inherit;letter-spacing:inherit}
.mot2:hover{color:#fff}
.mot2:focus-visible{outline:2px solid var(--v2,#a875ff);outline-offset:3px}

/* the phone bar: only on narrow pages, stuck to the bottom of the window until the final picture arrives */
.end-bar{display:none}
.end-bar .btn2{transition:opacity .35s ease,transform .45s var(--ease),visibility 0s}
.end-bar.is-gone .btn2{opacity:0;transform:translate3d(0,16px,0);visibility:hidden;pointer-events:none;transition:opacity .3s ease,transform .4s var(--ease),visibility 0s .4s}

@container (max-width:900px){
  .end-bar{display:block;position:sticky;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:30;padding:14px var(--g) 0;pointer-events:none}
  .end-bar .btn2{pointer-events:auto;display:flex;justify-content:center;width:100%;box-shadow:0 14px 40px -12px rgba(0,0,0,.7)}
  .end-foot .wrap{flex-direction:column;align-items:flex-start;gap:14px}
  .end-foot .mot2{display:none}
}

/* motion off: the bar appears and disappears without movement */
html.calm .end-bar .btn2{transition:none !important}
@media (prefers-reduced-motion:reduce){.end-bar .btn2{transition:none !important}}
/* QA audit, 30 Nov 2026: footer links get a 27 px tall tap area (they were 15 px); the underline stays under the words */
.end-foot a{display:inline-block;padding:6px 0;background-origin:content-box;background-clip:content-box}
