/* Annotated homepage: two new sections. All selectors are prefixed .ah- so nothing existing is affected.
   Fonts are the ones the homepage already loads: Instrument Sans, JetBrains Mono. */

.ah-demo,.ah-feat{max-width:1280px;margin:0 auto;padding:0 48px 120px;box-sizing:border-box;display:flex;flex-direction:column;color:#16161a;font-family:'Instrument Sans',sans-serif}
.ah-demo{gap:36px}
.ah-feat{gap:28px}
@media (max-width:640px){.ah-demo,.ah-feat{padding:0 20px 88px}}

.ah-h2{margin:0;font:600 clamp(44px,5.5vw,72px)/.95 'Instrument Sans',sans-serif;letter-spacing:-.045em}
.ah-mark{border-radius:6px;padding:0 .06em}
.ah-lede{margin:0;max-width:380px;font:400 18px/1.5 'Instrument Sans',sans-serif;color:#4a4943;text-wrap:pretty}
.ah-demo__head{display:flex;justify-content:space-between;align-items:flex-end;gap:32px;flex-wrap:wrap}

/* hue cycle: same 5 marker hues + timing as the hero (2.6s, .9s ease) */
.ah-cycle{background-color:#f8ce73;transition:background-color .9s ease}
.ah-cycle-bg{background-color:#f8ce73;transition:background-color .9s ease}

.ah-demo__frame{display:grid;grid-template-columns:clamp(14px,2.2vw,30px) minmax(0,1fr) clamp(14px,2.2vw,30px);gap:clamp(8px,1.4vw,18px);align-items:stretch}
.ah-bracket{width:100%;height:100%;min-height:0;contain:size;overflow:visible}
.ah-bracket path{fill:none;stroke:#16161a;stroke-width:8}
.ah-demo__player{position:relative;width:100%;min-width:0;min-height:0;aspect-ratio:16/9;border-radius:clamp(12px,1.6vw,20px);overflow:hidden;background:#f8ce73}
.ah-demo__player video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.ah-demo__poster{position:absolute;inset:0;border:none;background:#f8ce73 url('/web/media/demo-poster.jpg') center/cover no-repeat;cursor:pointer;display:flex;align-items:flex-end;justify-content:flex-start;padding:clamp(14px,5.2%,50px);color:#f6f5f1}
.ah-demo__poster[hidden]{display:none}
.ah-demo__poster:focus-visible{outline:3px solid #96daff;outline-offset:-6px}
.ah-demo__poster-controls{display:flex;align-items:center;gap:clamp(10px,1.2vw,20px);width:100%}
.ah-demo__btn{width:clamp(48px,9.2%,88px);aspect-ratio:1;flex:none;border-radius:50%;background:#16161a;color:#f6f5f1;display:flex;align-items:center;justify-content:center;font-size:clamp(14px,1.6vw,28px);box-shadow:0 10px 25px rgba(22,22,26,.25);transition:transform .15s ease}
.ah-demo__poster:hover .ah-demo__btn{transform:scale(1.06)}
.ah-demo__label{font:600 12px 'JetBrains Mono',monospace;letter-spacing:.1em;color:#16161a}
@media (max-width:640px){.ah-demo__poster{background-image:url('/web/media/demo-poster-960.jpg')}}
@media (max-width:420px){.ah-demo__label{display:none}}

.ah-feat__bar{display:flex;justify-content:space-between;align-items:baseline;gap:24px;flex-wrap:wrap;border-top:1px solid #e4e2db;padding-top:40px}
.ah-eyebrow{margin:0;font:600 12px 'JetBrains Mono',monospace;letter-spacing:.08em;color:#7a7972}
.ah-count{font:600 12px 'JetBrains Mono',monospace;letter-spacing:.08em;color:#16161a}
.ah-feat__p{margin:0;max-width:1120px;font:500 clamp(28px,3.4vw,46px)/1.42 'Instrument Sans',sans-serif;letter-spacing:-.025em;color:#8f8d84;text-wrap:pretty}

/* marks: hidden highlight -> sweeps in left to right; brackets appear on the newest one */
.ah-m{color:#16161a;background-color:transparent;background-image:linear-gradient(var(--h),var(--h));background-repeat:no-repeat;background-position:0 88%;background-size:0% 78%;transition:background-size .5s cubic-bezier(.2,.8,.2,1);box-decoration-break:clone;-webkit-box-decoration-break:clone}
.ah-m:nth-of-type(5n+1){--h:#ffb5ac}.ah-m:nth-of-type(5n+2){--h:#f8ce73}.ah-m:nth-of-type(5n+3){--h:#99ebaa}.ah-m:nth-of-type(5n+4){--h:#96daff}.ah-m:nth-of-type(5n){--h:#ecbeff}
.ah-m.is-on{background-size:100% 78%}
.ah-m::before,.ah-m::after{display:inline-block;overflow:hidden;vertical-align:bottom;max-width:0;font-weight:700;transition:max-width .25s ease}
.ah-m::before{content:'['}.ah-m::after{content:']'}
.ah-m.is-last::before,.ah-m.is-last::after{max-width:.5em}

/* before JS runs (or if it fails) everything is already marked, so the paragraph is never left blank */
.ah-feat:not(.ah-js) .ah-m{background-size:100% 78%}

@media (prefers-reduced-motion:reduce){
  .ah-m,.ah-cycle,.ah-cycle-bg,.ah-demo__btn{transition:none}
}
