/* Stella Fire home page (v2): addressable-loop hero, system rail, installer band.
   Loaded only on the home page. Everything is scoped under .home-v2. */

.home-v2 {
    --hv-panel: #1d2329;
    --hv-panel-2: #2a3239;
    --hv-cable: #4a5560;
    --hv-ceiling: #f2f3f1;
    --hv-ink: #1a1f24;
    --hv-steel: #6d7882;
    --hv-red: #e52329;
    --hv-red-deep: #b8151b;
    --hv-led: #42d17c;
    --hv-lcd: #0f1a15;
    --hv-lcd-text: #a6ecc2;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--hv-ink);
    background: #fff;
}

.home-v2 h1,
.home-v2 h2 {
    font-family: "Outfit", Inter, ui-sans-serif, system-ui, sans-serif;
    text-wrap: balance;
    margin: 0;
}

.home-v2 :focus-visible {
    outline: 3px solid var(--hv-red);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Buttons */
.hv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 6px;
    font-weight: 650;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.hv-btn--red { background: var(--hv-red); color: #fff; }
.hv-btn--red:hover { background: var(--hv-red-deep); }
.hv-btn--outline { border: 1.5px solid currentColor; color: inherit; }
.hv-btn--outline:hover { background: rgba(255, 255, 255, .08); }

/* ---------- Savannah banner ---------- */
.hv-banner {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 600px; /* older browsers without clamp() */
    min-height: clamp(540px, 68vh, 720px);
    color: #fff;
    background: #2a1a10;
    overflow: hidden;
}
.hv-banner__media {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -2;
    overflow: hidden;
    transform-origin: 100% 60%;
    animation: hv-settle 2.6s cubic-bezier(.2, .7, .2, 1) both;
}
/* The photo is wider than the banner. It starts right-aligned (whole herd in view)
   and home.js slides it right as you scroll, so the camera sweeps right to left. */
.hv-banner__media img {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: auto;
    min-width: 100%;
    max-width: none;
    aspect-ratio: 2172 / 724;
    object-fit: cover;
    object-position: 100% 50%;
    transform: translate3d(var(--pan, 0px), 0, 0);
    will-change: transform;
}
/* Shade the sky on the left so the lockup reads, and ground the bottom edge */
.hv-banner::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(20, 14, 10, .82) 0%, rgba(20, 14, 10, .62) 34%, rgba(20, 14, 10, .12) 58%, rgba(20, 14, 10, 0) 72%),
        linear-gradient(0deg, rgba(20, 14, 10, .55) 0%, rgba(20, 14, 10, 0) 30%);
}
.hv-banner :focus-visible { outline-color: #fff; }
.hv-banner__inner { padding-top: 80px; padding-bottom: 80px; padding-block: clamp(56px, 8vw, 96px); }
.hv-banner__content {
    max-width: 560px;
    animation: hv-rise .9s .35s cubic-bezier(.2, .7, .2, 1) both;
}

.hv-lockup {
    margin: 0;
    display: inline-grid;
    font-family: "Outfit", Inter, sans-serif;
    line-height: 1;
}
.hv-lockup__mark {
    display: block;
    line-height: 0;
    color: #fff;
}
.hv-lockup__mark .dn-wordmark {
    height: clamp(3.1rem, 6vw, 4.8rem);
    filter: drop-shadow(0 2px 14px rgba(0, 0, 0, .35));
}
.hv-lockup__region {
    justify-self: end;
    margin-top: .2em;
    padding-top: .32em;
    border-top: 3px solid var(--hv-red);
    font-size: clamp(1.25rem, 2.2vw, 1.7rem);
    font-weight: 500;
    letter-spacing: .01em;
    color: #fff;
}

.hv-banner__title {
    margin-top: clamp(28px, 4vw, 44px) !important;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.015em;
    color: #fff;
    max-width: 17ch;
}
.hv-banner__lede {
    margin: 16px 0 0;
    font-size: clamp(1.02rem, 1.3vw, 1.14rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, .86);
    max-width: 32em;
}
.hv-btn--glass {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1.5px solid rgba(255, 255, 255, .7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.hv-btn--glass:hover { background: rgba(255, 255, 255, .22); }

.hv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

@keyframes hv-settle { from { transform: scale(1.07); } to { transform: scale(1); } }
@keyframes hv-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hv-how__more { margin: 24px 0 0; }
.hv-how__more a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--hv-red);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* ---------- How it works (loop) ---------- */
.hv-how {
    --hv-ceiling-tone: #eceeed;
    background: var(--hv-ceiling-tone);
    color: var(--hv-ink);
    padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 7vw, 88px);
    overflow: hidden;
}
.hv-how__grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}
.hv-how__title {
    font-weight: 700;
    font-size: clamp(2.6rem, 5vw, 4.4rem);
    line-height: .98;
    letter-spacing: -.02em;
    color: var(--hv-ink);
    max-width: 8ch;
}
.hv-how__lede {
    margin: 24px 0 0;
    font-size: clamp(1.04rem, 1.3vw, 1.16rem);
    line-height: 1.6;
    max-width: 30em;
    color: #46515a;
}
.hv-how__more { margin: 24px 0 0; }
.hv-how__more a {
    color: var(--hv-ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--hv-red);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* Loop diagram */
.hv-loop { margin: 0; }
.hv-loop__svg { display: block; width: 100%; height: auto; overflow: visible; }
.hv-loop__caption {
    margin-top: 18px;
    color: var(--hv-steel);
    font-size: .95rem;
    line-height: 1.55;
    max-width: 46em;
}
.hv-loop__status {
    display: block;
    margin-bottom: 6px;
    font-family: "Outfit", Inter, sans-serif;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--hv-ink);
    transition: color .25s ease;
}
.hv-loop[data-state="alarm"] .hv-loop__status { color: var(--hv-red-deep); }

.hv-loop__cable { fill: none; stroke: #a7afb5; stroke-width: 3; }
.hv-loop__trace {
    fill: none;
    stroke: var(--hv-red);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .2, 1);
}

.hv-panel__alarm { opacity: 0; transition: opacity .25s ease; }
.hv-panel__lamp { fill: #ff3b33; }

/* Zoom: the whole drawing scales up until the panel screen fills the frame.
   Screen centre is (196, 232); the frame centre is (356, 230). */
.hv-loop__svg { overflow: hidden; border-radius: 12px; }
.hv-stage {
    transform-box: view-box;
    transform-origin: 0 0;
    transform: translate(0px, 0px) scale(1) translate(0px, 0px);
    transition: transform 1.4s cubic-bezier(.65, 0, .25, 1);
}
.hv-loop.is-zoomed .hv-stage { transform: translate(356px, 230px) scale(6.7) translate(-196px, -232px); }

/* Panel screen: alarm banner + floor plan */
.hv-screen text { font-family: "Outfit", Inter, sans-serif; }
.hv-screen__bg { fill: #f2f3ef; }
.hv-screen__bar { fill: #c4141b; }
.hv-screen__fire { fill: #fff; font-size: 5.2px; font-weight: 700; letter-spacing: .06em; }
.hv-screen__where { fill: #fff; font-size: 3.2px; font-weight: 500; }
.hv-plan__shell { fill: #fff; stroke: #39424a; stroke-width: .7; }
.hv-plan__wall { fill: none; stroke: #39424a; stroke-width: .6; stroke-linecap: square; }
.hv-plan__hot { fill: #ffe3e1; }
.hv-plan__room { fill: #6b747b; font-size: 2.6px; font-weight: 500; }
.hv-plan__room--hot { fill: #b8151b; font-weight: 700; }
.hv-plan__dev circle { fill: #8a949b; }
.hv-plan__flame { fill: #e52329; }
.hv-plan__tag { fill: #b8151b; font-size: 3.1px; font-weight: 700; }
.hv-plan__ring {
    fill: none;
    stroke: #e52329;
    stroke-width: .6;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
}
.hv-loop[data-state="alarm"] .hv-plan__flame { animation: hv-flash .9s steps(2, jump-none) infinite; }
.hv-loop[data-state="alarm"] .hv-plan__hot { animation: hv-hot .9s steps(2, jump-none) infinite; }
.hv-loop[data-state="alarm"] .hv-plan__ring { animation: hv-wave 1.6s ease-out infinite; }
.hv-loop[data-state="alarm"] .hv-plan__ring--late { animation-delay: .8s; }
@keyframes hv-flash { 50% { opacity: .15; } }
@keyframes hv-hot { 50% { fill: #fff; } }

.hv-dev__led {
    fill: #9aa3aa;
    stroke: #fff;
    stroke-width: 1.5;
    transition: fill .12s ease;
}
.hv-dev__addr {
    fill: #5d6870;
    font-family: "Outfit", Inter, sans-serif;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
}
.hv-dev__wave {
    fill: none;
    stroke: var(--hv-red);
    stroke-width: 2.5;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
}

/* Polling: a device's LED lights green for a moment as the panel checks it */
.hv-dev.is-polled .hv-dev__led { fill: var(--hv-led); }

/* Alarm state */
.hv-loop[data-state="alarm"] .hv-loop__trace { stroke-dashoffset: 0; }
.hv-loop[data-state="alarm"] .hv-panel__alarm { opacity: 1; }
.hv-loop[data-state="alarm"] .hv-panel__lamp { animation: hv-blink 1s steps(2, jump-none) infinite; }
.hv-loop[data-state="alarm"] .hv-dev--target .hv-dev__led { fill: #ff2a22; }
.hv-loop[data-state="alarm"] .hv-dev--target .hv-dev__addr { fill: var(--hv-red-deep); font-weight: 800; }
.hv-loop[data-state="alarm"] .hv-dev__wave { animation: hv-wave 1.8s ease-out infinite; }
.hv-loop[data-state="alarm"] .hv-dev__wave--late { animation-delay: .9s; }
/* Sounders pulse faster than the detector in alarm */
.hv-loop[data-state="alarm"] .hv-dev--sounder .hv-dev__wave { animation-duration: 1.1s; }
.hv-loop[data-state="alarm"] .hv-dev--sounder .hv-dev__wave--late { animation-delay: .55s; }

@keyframes hv-wave {
    from { transform: scale(1); opacity: .9; }
    to { transform: scale(2.4); opacity: 0; }
}
@keyframes hv-blink {
    50% { fill: #5a1012; }
}

/* ---------- Facts ---------- */
.hv-facts {
    background: #fff;
    border-bottom: 1px solid #e1e4e6;
    padding: clamp(28px, 4vw, 44px) 0;
}
.hv-facts__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.hv-facts__list li {
    padding: 4px 24px;
    border-left: 1px solid #d3d7da;
}
.hv-facts__list li:first-child { border-left: 0; padding-left: 0; }
.hv-facts__list strong {
    display: block;
    font-weight: 700;
    font-size: 1.02rem;
}
.hv-facts__list span {
    display: block;
    margin-top: 6px;
    color: var(--hv-steel);
    font-size: .93rem;
    line-height: 1.5;
}

/* ---------- System rail ---------- */
.hv-system { padding: clamp(56px, 8vw, 104px) 0; }
.hv-system__head {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 24px 72px;
    align-items: end;
    margin-bottom: clamp(32px, 4vw, 52px);
}
.hv-system__head h2,
.hv-installers h2 {
    font-weight: 700;
    font-size: clamp(2rem, 3.8vw, 3.1rem);
    line-height: 1.02;
    letter-spacing: -.02em;
}
.hv-system__head p {
    margin: 0;
    color: var(--hv-steel);
    font-size: 1.08rem;
    line-height: 1.55;
    max-width: 36em;
}

.hv-rail {
    --gap: clamp(14px, 2vw, 24px);
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--gap);
}
.hv-rail__item { position: relative; }
.hv-rail__link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.hv-rail__photo {
    position: relative;
    display: block;
    aspect-ratio: 1;
    background: #fff;
    border: 1.5px solid #d8dbdf;
    border-radius: 12px;
    transition: border-color .2s ease;
}
.hv-rail__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12%;
    border-radius: 12px;
    transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
/* The loop cable running from one device to the next */
.hv-rail__item:not(:last-child) .hv-rail__photo::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: calc(var(--gap) + 3px);
    height: 2px;
    margin-left: -1.5px;
    background: var(--hv-red);
}
.hv-rail__led {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c3c9ce;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.hv-rail__name {
    display: block;
    margin-top: 16px;
    font-weight: 700;
    font-size: 1.12rem;
    line-height: 1.2;
}
.hv-rail__text {
    display: block;
    margin-top: 6px;
    color: var(--hv-steel);
    font-size: .93rem;
    line-height: 1.5;
}
.hv-rail__link:hover .hv-rail__photo,
.hv-rail__link:focus-visible .hv-rail__photo { border-color: var(--hv-ink); }
.hv-rail__link:hover .hv-rail__photo img,
.hv-rail__link:focus-visible .hv-rail__photo img { transform: scale(1.05); }
.hv-rail__link:hover .hv-rail__led,
.hv-rail__link:focus-visible .hv-rail__led {
    background: var(--hv-led);
    box-shadow: 0 0 0 4px rgba(66, 209, 124, .2);
}
.hv-rail__link:hover .hv-rail__name { color: var(--hv-red-deep); }

.hv-system__all { margin: 36px 0 0; }
.hv-system__all a {
    color: var(--hv-ink);
    font-weight: 650;
    text-decoration: underline;
    text-decoration-color: var(--hv-red);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* Addressable / Conventional switch */
.hv-switch {
    position: relative;
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    padding: 5px;
    margin-bottom: clamp(28px, 3.5vw, 40px);
    border-radius: 999px;
    background: #eceeef;
    isolation: isolate;
}
.hv-switch__btn {
    position: relative;
    z-index: 1;
    min-width: 168px;
    min-height: 48px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--hv-steel);
    font: inherit;
    font-weight: 700;
    font-size: 1.02rem;
    cursor: pointer;
    transition: color .25s ease;
}
.hv-switch__btn[aria-selected="true"] { color: #fff; }
.hv-switch__btn:focus-visible { outline: 3px solid var(--hv-red); outline-offset: 2px; }
.hv-switch__thumb {
    position: absolute;
    z-index: 0;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc(50% - 5px);
    border-radius: 999px;
    background: var(--hv-red);
    box-shadow: 0 6px 16px rgba(229, 35, 41, .3);
    transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.hv-switch[data-active="conventional"] .hv-switch__thumb { transform: translateX(100%); }

.hv-syspanel__intro {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto;
    gap: 12px 48px;
    align-items: baseline;
    margin-bottom: clamp(24px, 3vw, 36px);
    padding-bottom: clamp(20px, 2.5vw, 28px);
    border-bottom: 1px solid #e2e5e8;
}
.hv-syspanel__intro h3 {
    margin: 0;
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -.01em;
}
.hv-syspanel__intro p { margin: 0; color: var(--hv-steel); line-height: 1.55; }
.hv-syspanel__all {
    color: var(--hv-red-deep);
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}
.hv-syspanel__all::after { content: " \2192"; }
.hv-syspanel__all:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Rail items rise in one after another when a system is chosen */
.hv-syspanel.is-entering .hv-rail__item {
    animation: hv-rise .55s cubic-bezier(.2, .8, .2, 1) both;
    animation-delay: calc(var(--i, 0) * 70ms);
}
.hv-syspanel.is-entering .hv-syspanel__intro { animation: hv-rise .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes hv-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hv-switch__thumb { transition: none; }
    .hv-syspanel.is-entering .hv-rail__item,
    .hv-syspanel.is-entering .hv-syspanel__intro { animation: none; }
}
@media (max-width: 900px) {
    .hv-syspanel__intro { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .hv-switch { display: grid; width: 100%; }
    .hv-switch__btn { min-width: 0; padding: 0 12px; }
}

/* ---------- Installers ---------- */
.hv-installers {
    background: var(--hv-panel);
    color: var(--hv-ceiling);
    padding: clamp(56px, 8vw, 96px) 0;
}
.hv-installers :focus-visible { outline-color: #fff; }
.hv-installers__grid {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: 40px 72px;
    align-items: start;
}
.hv-installers h2 { color: #fff; max-width: 12ch; }
.hv-installers__grid > div > p {
    margin: 20px 0 0;
    color: #c5ccd1;
    font-size: 1.06rem;
    line-height: 1.6;
    max-width: 34em;
}
.hv-installers__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hv-installers__list li {
    position: relative;
    padding: 18px 0 18px 30px;
    border-top: 1px solid #36404a;
    color: #aeb7be;
    line-height: 1.5;
}
.hv-installers__list li:last-child { border-bottom: 1px solid #36404a; }
.hv-installers__list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 25px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--hv-led);
    box-shadow: 0 0 0 4px rgba(66, 209, 124, .16);
}
.hv-installers__list strong { color: #fff; font-weight: 650; }
.hv-installers__list a { color: #fff; text-underline-offset: 4px; margin-left: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .hv-how__grid,
    .hv-system__head,
    .hv-installers__grid { grid-template-columns: 1fr; }
    .hv-how__title { max-width: none; }
    .hv-loop { max-width: 640px; }
    .hv-facts__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; }
    .hv-facts__list li:nth-child(3) { border-left: 0; padding-left: 0; }
    .hv-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 36px; }
    .hv-rail__item:nth-child(3) .hv-rail__photo::after { display: none; }
}


@media (max-width: 760px) {
    .hv-banner { display: block; min-height: 0; background: #1e1611; }
    .hv-banner::before { display: none; }
    .hv-banner__media { position: relative; top: auto; right: auto; bottom: auto; left: auto; display: block; height: 62.5vw; }
    .hv-banner__inner { padding-top: 32px; padding-bottom: 44px; }
    .hv-lockup__mark .dn-wordmark { height: clamp(2.8rem, 13vw, 3.6rem); }
}

@media (max-width: 600px) {
    .hv-how__title { font-size: clamp(2.6rem, 12vw, 3.4rem); }
    .hv-actions .hv-btn { flex: 1 1 100%; }
    .hv-dev__addr { font-size: 17px; }
    .hv-facts__list { grid-template-columns: 1fr; }
    .hv-facts__list li { border-left: 0; padding: 0; }
    .hv-rail { grid-template-columns: 1fr; --gap: 28px; row-gap: var(--gap); }
    .hv-rail__link {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        column-gap: 18px;
        align-items: center;
    }
    .hv-rail__photo { grid-row: span 2; }
    .hv-rail__name { margin-top: 0; align-self: end; }
    .hv-rail__text { align-self: start; }
    .hv-rail__item:nth-child(3) .hv-rail__photo::after { display: block; }
    .hv-rail__item:not(:last-child) .hv-rail__photo::after {
        top: 100%;
        left: 50%;
        width: 2px;
        height: calc(var(--gap) + 3px);
        margin: -1.5px 0 0 -1px;
    }
    .hv-rail__led { top: 8px; right: 8px; width: 7px; height: 7px; }
}

@media (prefers-reduced-motion: reduce) {
    .home-v2 *,
    .home-v2 *::before,
    .home-v2 *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Reference projects ---------- */
.hv-refs { padding: clamp(56px, 8vw, 104px) 0 0; }
.hv-refs__head {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 24px 72px;
    align-items: end;
    margin-bottom: clamp(28px, 4vw, 48px);
}
.hv-refs__head h2 {
    font-weight: 700;
    font-size: clamp(2rem, 3.8vw, 3.1rem);
    line-height: 1.02;
    letter-spacing: -.02em;
}
.hv-refs__head p {
    margin: 0;
    color: var(--hv-steel);
    font-size: 1.08rem;
    line-height: 1.55;
    max-width: 36em;
}
.hv-refs__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
}
.hv-ref figure { margin: 0; }
.hv-ref--feature { grid-column: span 2; grid-row: span 2; }
.hv-ref__photo {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4 / 3;
    background: #dfe3e6;
}
.hv-ref--feature .hv-ref__photo { aspect-ratio: auto; flex: 1 1 auto; min-height: 320px; }
.hv-ref__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.hv-ref:hover .hv-ref__photo img { transform: scale(1.04); }
.hv-ref figure { height: 100%; display: flex; flex-direction: column; }
.hv-ref figcaption { padding-top: 14px; display: grid; gap: 2px; }
.hv-ref__type { color: var(--hv-steel); font-size: .86rem; }
.hv-ref__name {
    font-family: "Outfit", Inter, sans-serif;
    font-size: 1.14rem;
    font-weight: 650;
    line-height: 1.25;
}
.hv-ref__figure {
    margin-top: 6px;
    font-family: "Outfit", Inter, sans-serif;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--hv-red-deep);
    font-variant-numeric: tabular-nums;
}
.hv-ref__detail { color: var(--hv-steel); font-size: .88rem; line-height: 1.45; }
.hv-ref--feature .hv-ref__name { font-size: 1.5rem; }
.hv-ref--feature .hv-ref__figure { font-size: 1.4rem; }
.hv-refs__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin: 32px 0 0;
    font-size: .9rem;
    color: var(--hv-steel);
}
.hv-refs__foot a {
    color: var(--hv-ink);
    font-weight: 650;
    font-size: 1rem;
    text-decoration: underline;
    text-decoration-color: var(--hv-red);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

@media (max-width: 960px) {
    .hv-refs__head { grid-template-columns: 1fr; }
    .hv-refs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hv-ref--feature { grid-row: auto; }
    .hv-ref--feature .hv-ref__photo { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
    .hv-refs__grid { grid-template-columns: 1fr; }
    .hv-ref--feature { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .hv-ref__photo img { transition: none; }
}
