/* Home film: a single opening frame, followed by the existing device scene. */
html body .header-premium.header--hero-film { background:transparent!important; }
html body .header-premium.header--hero-film::before {
    background:var(--bi-paper)!important; transform:none; opacity:var(--film-header-alpha,0);
}
html body #bim-scroll-hero[data-layout="video-first"] { background:var(--bi-paper); }
.perspectiva-film-section { position:relative; isolation:isolate; }
html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__intro {
    position:relative; height:auto; min-height:760px; min-height:max(760px,100svh);
    padding:124px 0 80px; display:flex; align-items:center;
    isolation:isolate; overflow:hidden; pointer-events:auto; background:var(--bi-paper)!important;
}
html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__intro-inner {
    width:min(1320px,calc(100% - 112px)); max-width:none; display:block; text-align:left;
}
.perspectiva-hero-copy { position:relative; z-index:3; width:49%; }
html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__title {
    max-width:660px; margin:0; font-size:clamp(56px,5.5vw,86px); line-height:1.035;
    font-weight:650; letter-spacing:-.04em; text-wrap:balance;
}
html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__subtitle {
    max-width:420px; margin:28px 0 0; font-size:17px; line-height:1.65; color:var(--bi-muted);
}
html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__actions {
    justify-content:flex-start; width:auto; gap:24px; margin-top:32px;
}
html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__actions .btn-primary {
    min-height:56px; padding:16px 24px; background:var(--bi-action-fill)!important; color:#fff!important;
    border-radius:8px; box-shadow:none; font-size:15px; white-space:nowrap;
    transition:background-color .2s,transform .2s;
}
html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__actions .btn-animated-border {
    min-height:48px; padding:12px 0!important; background:none!important; border:0!important;
    border-radius:0!important; box-shadow:none!important; backdrop-filter:none!important;
    font-size:15px!important; color:var(--bi-ink)!important; white-space:nowrap;
}
html body #bim-scroll-hero[data-layout="video-first"] .perspectiva-hero-meta {
    justify-content:flex-start; gap:12px; margin-top:28px; font-size:12px; letter-spacing:0;
}
.perspectiva-hero-media {
    position:absolute; z-index:1; left:var(--film-left,54%); right:var(--film-right,max(56px,calc((100vw - 1320px)/2)));
    top:var(--film-top,104px); bottom:var(--film-bottom,40px); width:auto; margin:0;
    transform:none; opacity:1; overflow:hidden; border-radius:var(--film-radius,12px);
    background:var(--bi-surface);
}
.perspectiva-hero-film { position:relative; width:100%; height:100%; overflow:hidden; }
.perspectiva-hero-film :is(video,img) {
    position:absolute; inset:0; width:100%; height:100%; display:block;
    object-fit:cover; object-position:50% 65%;
}
.perspectiva-hero-film video { opacity:0; transition:opacity .45s ease-out; pointer-events:none; }
.perspectiva-hero-film.is-ready video { opacity:1; }
.perspectiva-hero-film { user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.perspectiva-hero-film img { pointer-events:none; }
.perspectiva-hero-media--static { display:grid; place-items:center; background:transparent; }
.perspectiva-hero-media--static img { width:290px; height:auto; max-width:80%; max-height:100%; object-fit:contain; border-radius:12px; }
html body #bim-scroll-hero[data-layout="video-first"] .perspectiva-scene-heading {
    position:relative; z-index:21; width:100%; margin:-16px 0 0; padding:64px max(56px,calc((100% - 1320px)/2)) 8px;
    background:var(--bi-paper); border-radius:16px 16px 0 0;
}
.perspectiva-scene-heading h2 {
    margin:0 0 20px; max-width:820px; font-size:clamp(36px,4.2vw,60px); line-height:1.08;
    letter-spacing:-.035em; font-weight:600; color:var(--bi-ink); text-wrap:balance;
}
.perspectiva-scene-heading p { margin:0; max-width:600px; color:var(--bi-muted); font-size:17px; line-height:1.65; }
@media(min-width:768px) and (min-height:650px) and (prefers-reduced-motion:no-preference) {
    .perspectiva-film-section.has-film { height:152svh; min-height:1040px; }
    html body #bim-scroll-hero[data-layout="video-first"] .has-film .bim-scroll-hero__intro {
        position:sticky; top:0; height:100svh; min-height:650px;
    }
    .has-film .perspectiva-hero-copy {
        opacity:var(--film-copy-opacity,1); transform:translate3d(0,var(--film-copy-y,0px),0);
    }
}
html body #bim-scroll-hero[data-layout="video-first"]:is([data-hero-state="ready"],.bim-hero--loading) .bim-scroll-hero__stage { --tablet-tail-trim:.60; height:calc(420svh - 100svh * var(--tablet-tail-trim)); margin:0; }
html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__sticky { background:var(--bi-paper); }
html body #bim-scroll-hero[data-layout="video-first"] .bim-hero-loader { left:0; padding-top:0; place-items:center; }
html body #bim-scroll-hero[data-layout="video-first"] .bim-hero-story--floating { display:block; position:absolute; inset:0; }
html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card {
    position:absolute; left:max(56px,calc((100% - 1320px)/2)); right:auto; top:46%;
    width:clamp(230px,24vw,340px); transform:translateY(-50%); margin:0; padding:0;
    background:none; border:0; box-shadow:none; border-radius:0;
}
html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card[hidden] { display:none; }
html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card:not(:first-child) { left:auto; right:max(56px,calc((100% - 1320px)/2)); }
html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card h2 { font-size:clamp(28px,2.7vw,40px); color:var(--bi-ink); line-height:1.12; letter-spacing:-.03em; font-weight:600; }
html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card p { font-size:16px; line-height:1.65; margin:20px 0; color:var(--bi-muted); }
html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card__tag { color:var(--bi-accent); }
html body #bim-scroll-hero[data-layout="video-first"]:is(.bim-hero--unavailable,.bim-hero--static) .perspectiva-scene-heading { display:none; }
@media(hover:hover) and (pointer:fine) {
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__actions .btn-primary:hover { background:var(--bi-action-hover)!important; transform:translateY(-2px); }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__actions .btn-animated-border:hover { color:var(--bi-accent)!important; transform:none!important; }
}
@media(max-width:1099px) {
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__intro { min-height:720px; padding:112px 0 64px; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__intro-inner { width:calc(100% - 64px); }
    .perspectiva-hero-copy { width:49%; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__title { font-size:clamp(42px,5.2vw,58px); }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__actions { flex-direction:column; align-items:flex-start; gap:8px; }
    .perspectiva-hero-media { left:55%; right:20px; top:104px; bottom:32px; }
    html body #bim-scroll-hero[data-layout="video-first"] .perspectiva-scene-heading { padding:64px 32px 8px; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card,
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card:not(:first-child) { left:32px; right:32px; bottom:28px; top:auto; width:auto; max-width:560px; transform:none; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-device { top:39%; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-phone { --device-height:min(540px,58svh); }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-tablet { --device-height:min(460px,51svh,65vw); }
}
@media(max-width:767px) {
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__intro { min-height:0; padding:100px 0 0; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__intro-inner { width:calc(100% - 40px); }
    .perspectiva-hero-copy { width:100%; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__title { font-size:clamp(34px,9.2vw,54px); line-height:1.08; max-width:570px; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__subtitle { font-size:15px; margin-top:20px; max-width:440px; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__actions { flex-direction:row; align-items:center; gap:8px 14px; margin-top:24px; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__actions .btn-primary { width:auto!important; padding:14px 16px; min-height:52px; font-size:13px; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__actions .btn-animated-border { width:auto!important; min-height:44px; font-size:13px!important; }
    html body #bim-scroll-hero[data-layout="video-first"] .perspectiva-hero-meta { display:none; }
    .perspectiva-hero-media { position:relative; inset:auto; width:100%; height:auto; aspect-ratio:4/5; margin:36px 0 0; border-radius:12px; }
    .perspectiva-hero-film { position:absolute; inset:0; }
    .perspectiva-hero-film :is(video,img) { object-position:50% 66%; }
    .perspectiva-hero-media--static { height:440px; }
    html body #bim-scroll-hero[data-layout="video-first"] .perspectiva-scene-heading { margin:0; padding:56px 20px 0; border-radius:0; }
    .perspectiva-scene-heading h2 { font-size:clamp(32px,8.8vw,48px); }
    .perspectiva-scene-heading p { font-size:15px; }
    html body #bim-scroll-hero[data-layout="video-first"]:is([data-hero-state="ready"],.bim-hero--loading) .bim-scroll-hero__stage { --tablet-tail-trim:.55; height:calc(390svh - 100svh * var(--tablet-tail-trim)); }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card,
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card:not(:first-child) { left:20px; right:20px; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card h2 { font-size:28px; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card p { font-size:14px; margin:12px 0; }
}
@media(max-height:650px) and (min-width:768px) {
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-hero__intro { min-height:620px; }
}
@media(max-height:600px) and (min-width:768px) and (max-width:1099px) {
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-device { top:60%; left:73%; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-tablet { --device-height:min(300px,44svh); }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card,
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card:not(:first-child) { top:60%; bottom:auto; right:auto; left:24px; width:42%; transform:translateY(-50%); }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card h2 { font-size:24px; }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card p { font-size:14px; margin:12px 0; }
}
@media(prefers-reduced-motion:reduce) {
    .perspectiva-hero-film video { transition:none; }
    .perspectiva-film-section.has-film { height:auto; min-height:0; }
    .perspectiva-hero-copy { transform:none; opacity:1; }
}
/* Three directly selectable chapters; fixed hit boxes prevent hover jitter. */
html body .bim-scene-nav {
    position:absolute; z-index:24; top:calc(var(--bi-anchor-offset,92px) + 4px);
    left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:24px;
    max-width:calc(100% - 40px); padding:0 4px; border-bottom:1px solid var(--bi-line);
}
html body .bim-scene-nav button {
    position:relative; min-height:44px; padding:10px 0 12px; border:0;
    background:transparent; color:var(--bi-muted); white-space:nowrap;
    font:550 13px/1.4 var(--bi-font); cursor:pointer;
}
html body .bim-scene-nav button::after {
    content:""; position:absolute; bottom:-1px; left:0; right:0; height:2px;
    background:var(--bi-accent); transform:scaleX(0); transform-origin:left;
    transition:transform .22s ease-out; pointer-events:none;
}
html body .bim-scene-nav button[aria-pressed="true"] {color:var(--bi-ink);}
html body .bim-scene-nav button[aria-pressed="true"]::after {transform:scaleX(1);}
html body #bim-scroll-hero:not([data-hero-state="ready"]) .bim-scene-nav {visibility:hidden;}
@media(max-width:767px) {
    html body .bim-scene-nav {gap:26px; top:calc(var(--bi-anchor-offset,76px) + 4px);}
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card,
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card:not(:first-child) {bottom:max(32px,8svh);}
}
@media(prefers-reduced-motion:reduce) {
    html body .bim-scene-nav button::after {transition:none;}
}

/* Measured device space between the chapter controls and the tallest caption. */
@media(max-width:767px), (min-width:768px) and (max-width:1099px) and (min-height:601px) {
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-device {
        top:var(--scene-device-top,36%);
    }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-phone {
        --device-height:min(540px,var(--scene-device-height,42svh));
    }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-scroll-tablet {
        --device-height:min(460px,var(--scene-device-height,42svh),65vw);
    }
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card,
    html body #bim-scroll-hero[data-layout="video-first"] .bim-story-card:not(:first-child) {
        top:var(--scene-caption-top,64%); bottom:auto; transform:none;
    }
}


html body #bim-scroll-hero .bim-scene-nav{width:max-content;box-sizing:border-box;pointer-events:auto}
html body #bim-scroll-hero .bim-scene-nav button{touch-action:manipulation;pointer-events:auto}
@media(max-width:600px){html body #bim-scroll-hero .bim-scene-nav{max-width:calc(100% - 24px);gap:clamp(8px,4vw,20px)}
html body #bim-scroll-hero .bim-scene-nav button{white-space:normal;line-height:1.2}}
html body #bim-scroll-hero .perspectiva-hero-media--static img{display:block;width:100%;max-width:none;height:100%;max-height:none;object-fit:cover;border-radius:inherit}

@media (max-width:767px) and (prefers-reduced-motion:no-preference) {
    html body #bim-scroll-hero .has-film .perspectiva-hero-media {
        width:100vw; max-width:none; left:calc(50% - 50vw); border-radius:0;
        clip-path:inset(0 var(--mobile-film-inset, 20px) round var(--mobile-film-radius,12px));
    }
}

@media(min-width:768px) and (max-width:1099px) and (min-height:650px) and (prefers-reduced-motion:no-preference) {
    .has-film .perspectiva-hero-media{left:var(--film-left,54%);right:var(--film-right,20px);top:var(--film-top,104px);bottom:var(--film-bottom,40px)}
}
