/* The home page's behind-the-scenes film (partials/home-team-film): the film stays in view while the lines beside it light up.
   portfolio.css styles the player that opens on a tap. */
.hf{max-width:1440px;margin:0 auto;padding:clamp(48px,7vw,96px) clamp(16px,3.4vw,48px) clamp(40px,6vw,80px);font-family:var(--font-body);color:#131313}
.hf-story{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1fr);gap:clamp(30px,6vw,110px);align-items:start}

/* The film, with a yellow card peeking out behind it. */
.hf-story-film{position:sticky;top:120px;display:grid;justify-items:center;gap:18px}
.hf-frame{position:relative;width:min(90%,380px)}
.hf-frame::before{content:'';position:absolute;inset:0;border-radius:24px;background:var(--yellow);transform:translate(26px,18px) rotate(5deg)}
.hf-film{position:relative;display:block;width:100%;aspect-ratio:9/16;border-radius:22px;overflow:hidden;background:#131313;color:#fff;box-shadow:0 30px 60px #0003}
.hf-film img,.hf-film video{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
.hf-film video{opacity:0;transition:opacity .5s}
.hf-film video.is-playing{opacity:1}
.hf-sound{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);display:flex;align-items:center;gap:10px;padding:11px 18px 11px 12px;border-radius:999px;background:#131313cc;color:#fff;font-size:13px;white-space:nowrap;backdrop-filter:blur(6px);transition:background .2s,color .2s}
.hf-sound b{font-weight:600}
.hf-sound svg{width:16px;height:16px;padding:7px;box-sizing:content-box;border-radius:50%;background:var(--yellow);color:#131313}
@media(hover:hover){.hf-film:hover .hf-sound{background:var(--yellow);color:#131313}.hf-film:hover .hf-sound svg{background:#131313;color:var(--yellow)}}
.hf-film:focus-visible{outline:3px solid #131313;outline-offset:4px}
.hf-film-note{display:flex;align-items:center;gap:8px;margin:14px 0 0;font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:#8c8c80}
.hf-film-note span{width:8px;height:8px;border-radius:50%;background:#ff3b30;animation:hf-rec 1.6s ease-in-out infinite}
@keyframes hf-rec{50%{opacity:.25}}

/* The story: each line is pale until it reaches the middle of the screen, then dark with its note; it ends on "It takes a team." */
.hf-eyebrow{display:block;font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:#8c8c80}
.hf-lines{list-style:none;margin:0;padding:0}
.hf-line{padding-top:clamp(48px,13vh,140px);color:#dcdcd5;transition:color .45s}
.hf-line:first-child{padding-top:clamp(18px,4vh,40px)}
.hf-line b,.hf-line h2{display:block;margin:0;font-size:clamp(44px,6.2vw,94px);font-weight:600;line-height:1.02;letter-spacing:-.045em}
.hf-line small{display:block;margin-top:10px;font-size:16px;font-weight:500;color:#8c8c80;opacity:0;transform:translateY(6px);transition:opacity .45s,transform .45s}
.hf-line.is-lit{color:#131313}
.hf-line.is-lit small{opacity:1;transform:none}
.hf-line.is-final h2 span{position:relative;z-index:0}
.hf-line.is-final h2 span::after{content:'';position:absolute;z-index:-1;left:-.04em;right:-.04em;bottom:.06em;height:.3em;background:var(--yellow);transform:scaleX(0);transform-origin:left;transition:transform .7s ease}
.hf-line.is-final.is-lit h2 span::after{transform:scaleX(1)}
.hf-lead{margin:44px 0 clamp(20px,8vh,80px);max-width:470px;font-size:16px;line-height:1.65;color:#4a4a44}

/* The player shows only the film: no title, arrows or count under it. */
.hf .pf-bar{display:none}
.hf .pf-player{--pf-room-h:calc(100vh - 2*var(--pf-pad))}
@supports(height:100dvh){.hf .pf-player{--pf-room-h:calc(100dvh - 2*var(--pf-pad))}}
.hf .pf-player svg{width:18px;height:18px}

/* Tablets and phones: the story first, then the film, so it ends on the film saying the same words. */
@media(max-width:860px){
    .hf{padding-top:56px}
    .hf-story{grid-template-columns:minmax(0,1fr);gap:34px}
    .hf-story-copy{order:1}
    .hf-story-film{order:2;position:static}
    .hf-frame{width:min(68vw,320px)}
    .hf-frame::before{transform:translate(16px,12px) rotate(4deg)}
    .hf-line{padding-top:30px}
    .hf-line:first-child{padding-top:16px}
    .hf-line b,.hf-line h2{font-size:clamp(38px,10.5vw,58px);letter-spacing:-.04em}
    .hf-line small{margin-top:6px;font-size:14px}
    .hf-lead{margin:26px 0 0;font-size:15px}
}
@media(max-width:600px){
    .hf{padding-inline:22px}
    .hf .pf-player{--pf-room-h:calc(100vh - 90px)}
}
@supports(height:100dvh){@media(max-width:600px){.hf .pf-player{--pf-room-h:calc(100dvh - 90px)}}}
@media(prefers-reduced-motion:reduce){.hf-film video,.hf-line,.hf-line small,.hf-line.is-final h2 span::after{transition:none}.hf-film-note span{animation:none}}
