/* Home hero montage: three HD photo layers + a card, soft entrance, light scroll depth.
   Geometry mirrors the historical 700x688 collage (Group-2.webp). Visible by default:
   the entrance only runs once the inline guard adds .jib-hm-js (JS on, motion allowed). */
.jib-hm {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin-inline: auto;
    aspect-ratio: 700 / 688;
    container-type: inline-size;
    isolation: isolate;
}
.jib-hm-layer {
    position: absolute;
    will-change: auto;
    transform: translate3d(0, var(--jib-hm-y, 0px), 0);
}
.jib-hm.is-moving .jib-hm-layer { will-change: transform; }
.jib-hm-shot {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3.9cqw;
    box-shadow: 0 1.6cqw 4.6cqw rgba(25, 40, 30, .13), 0 0 0 .55cqw rgba(255, 255, 255, .9);
    background: #eef2ef;
}
.jib-hm-shot img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.jib-hm-bay       { left: 2.1%;  top: 2.2%;  width: 51.9%; height: 52.8%; z-index: 1; }
.jib-hm-residence { left: 46.1%; top: 15.7%; width: 51.9%; height: 52.8%; z-index: 2; }
.jib-hm-interior  { left: 14%;   top: 44.9%; width: 51.9%; height: 52.8%; z-index: 3; }
.jib-hm-card      { left: 3.7%;  top: 72.6%; width: 52.4%; z-index: 4; }
.jib-hm-arrow     { z-index: 0; color: #cfd3d0; }
.jib-hm-arrow svg { display: block; width: 100%; height: auto; overflow: visible; }
.jib-hm-arrow--top    { left: 63.6%; top: 3.6%;  width: 11%; }
.jib-hm-arrow--bottom { left: 69.6%; top: 72.4%; width: 10%; }

.jib-hm-card-in {
    overflow: hidden;
    border-radius: 2.2cqw;
    background: #fff;
    box-shadow: 0 1.4cqw 4cqw rgba(25, 40, 30, .16);
    color: #222;
}
.jib-hm-card-photo { position: relative; margin: 1.1cqw 1.1cqw 0; aspect-ratio: 16 / 6.2; border-radius: 1.6cqw; overflow: hidden; background: #efe9e1; }
.jib-hm-card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jib-hm-tags { position: absolute; top: 1.1cqw; left: 1.1cqw; display: flex; gap: .8cqw; }
.jib-hm-tags span { padding: .45cqw 1.3cqw; border-radius: 99px; background: rgba(34, 34, 34, .78); color: #fff; font-size: max(7px, 1.25cqw); font-weight: 500; line-height: 1.2; }
.jib-hm-chip { position: absolute; left: 0; bottom: 1.1cqw; padding: .6cqw 1.8cqw .6cqw 1.4cqw; border-radius: 0 99px 99px 0; background: #222; color: #fff; font-size: max(8px, 1.6cqw); font-weight: 700; line-height: 1.2; }
.jib-hm-card-body { padding: 1.5cqw 2cqw 1.6cqw; }
.jib-hm-card-title { margin: 0; font-size: max(9px, 1.85cqw); font-weight: 600; line-height: 1.3; }
.jib-hm-card-meta { display: flex; align-items: center; gap: .8cqw; margin: 1cqw 0 0; color: #8a918c; font-size: max(7px, 1.3cqw); line-height: 1.2; }
.jib-hm-card-meta svg { flex: none; width: max(8px, 1.5cqw); height: auto; color: var(--jib-green, #24803a); }

/* Entrance: CSS only, armed by the inline guard; parallax lives on the outer layer. */
@keyframes jib-hm-rise {
    from { opacity: 0; transform: translate3d(var(--jib-hm-dx, 0), var(--jib-hm-dy, 22px), 0) scale(.965); }
    to   { opacity: 1; transform: none; }
}
@keyframes jib-hm-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes jib-hm-fade { from { opacity: 0; } to { opacity: 1; } }
.jib-hm-js .jib-hm-anim {
    animation: jib-hm-rise 950ms cubic-bezier(.22, .72, .2, 1) both;
    animation-delay: var(--jib-hm-delay, 0ms);
}
.jib-hm-js .jib-hm-bay .jib-hm-anim       { --jib-hm-dx: -10px; --jib-hm-delay: 60ms; }
.jib-hm-js .jib-hm-residence .jib-hm-anim { --jib-hm-dx: 10px;  --jib-hm-delay: 200ms; }
.jib-hm-js .jib-hm-interior .jib-hm-anim  { --jib-hm-dy: 28px;  --jib-hm-delay: 340ms; }
.jib-hm-js .jib-hm-card .jib-hm-anim      { --jib-hm-dy: 18px;  --jib-hm-delay: 560ms; }
.jib-hm-js .jib-hm-arrow path { stroke-dasharray: 1; animation: jib-hm-draw 700ms ease-out both; animation-delay: 900ms; }
.jib-hm-js .jib-hm-arrow--bottom path { animation-delay: 1050ms; }

@media (max-width: 767px) {
    /* The card keeps readable type on phones, so it runs a little below the 700x688 frame. */
    .jib-hm { max-width: 520px; margin-bottom: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    .jib-hm-js .jib-hm-anim, .jib-hm-js .jib-hm-arrow path { animation: none; }
    .jib-hm-layer { transform: none !important; }
}
