/* ==========================================================================
   Heimdal Stack — v4
   Inter is already loaded by common-23.css — no duplicate @import needed.
   ========================================================================== */

.hstack4,
.hstack4 * {
    box-sizing: border-box;
}

/* component variables */
.hstack4 {
    --hs4-text: #ffffff;
    --hs4-muted: #e8eafd;
    --hs4-dim: #c4d2f0;
    --hs4-accent: #FF2F70;
    --hs4-hover: #8EBEFF;
    --hs4-strip: 3.5rem;
    /* the band under the rail: holds the hover product row, and is the gap
       between the rail and .hstack4__core when nothing is hovered */
    --hs4-cap-gap: 2rem;
    /* must match .hstack4__caps-list padding-bottom — the hover bridge spans it */
    /* the rail's rule, measured off the comp. Deliberately much darker than
       --hs4-pill-stroke: the active marker lights a stretch of it, and that
       reads as a glow only against a dim baseline. */
    --hs4-line: #408BFE;
    --hs4-line-soft: rgba(155, 183, 255, 0.12);
    /* 1px rule that fades out at both ends */
    --hs4-rule: linear-gradient(to right, rgba(64, 139, 254, 0) 0%, rgba(64, 139, 254, 1) 19.7115%, rgba(64, 139, 254, 1) 80%, rgba(64, 139, 254, 0) 100%);
    --hs4-pill-stroke: #408BFE;
    /* width of the 24x7 SOC row; the modes row below it matches */
    --hs4-socMax: 52.75rem;
    --hs4-sectionMax: 87.4375rem;
    /* 1335px */
    --hs4-radius: 1.75rem;
    --hs4-gutter: 4.5rem;
    position: relative;
    width: min(var(--hs4-sectionMax), calc(100% - 2.5rem));
    margin: 6rem auto 0;
    overflow: hidden;
    isolation: isolate;
    font-family: "Inter", sans-serif;
    color: var(--hs4-text);
}

.hstack4__inner {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   CAPABILITY RAIL
   ========================================================================== */
.hstack4__caps {
    position: relative;
    z-index: 3;
    padding-bottom: var(--hs4-strip);
}

/* carousel arrows — only rendered in the sub-1024px carousel mode */
.hstack4__caps-nav {
    display: none;
}

.hstack4__caps-list {
    display: grid;
    /* content-sized columns + space-between so the first item sits flush with
       the start of the rule and the last with its end. Equal 1fr columns would
       centre each item in its track and inset the row from the line. */
    grid-template-columns: repeat(8, minmax(0, max-content));
    justify-content: space-between;
    /* floor only — space-between distributes whatever is left over */
    gap: 1.5rem;
    margin: 0;
    padding: 0 0 var(--hs4-cap-gap);
    /* the rule, as a background rather than a border: the comp's line is blue
       with a white flare near its right end, which a border can't express */
    background-image: linear-gradient(to right, #408BFE, #408BFE);
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 100% 1px;
    list-style: none;
}

.hstack4__cap {
    min-width: 0;
    /* opacity only — a transform here would make the <li> the containing
       block for .hstack4__cap-products and break the reveal band */
    animation: hs4-fade 0.7s ease both;
    animation-delay: calc(var(--hs4-i, 0) * 70ms);
}

.hstack4__cap-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* fill the grid cell so the link box ends flush with the bottom of the
       rail — no dead strip between the label and the hover bridge below it */
    height: 100%;
    gap: 0.4rem;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.25s ease;
}

.hstack4__cap-link:hover,
.hstack4__cap-link:focus-visible {
    color: inherit;
}

/* The hover lift is applied to the icon and the label rather than to the link
   itself, so .hstack4__cap-marker — pinned to the rail's rule — is left where
   it is. Transforming the link would carry the marker along with it.
   Keyed to .hstack4__cap, not .hstack4__cap-link: the product band is a
   sibling of the link, so a link-scoped :hover dropped the icon back down the
   moment the pointer left the label on its way to a product. The lift now
   holds for as long as the pointer is anywhere in the capability's area. */
.hstack4__cap:hover .hstack4__cap-ico,
.hstack4__cap.is-open .hstack4__cap-ico,
.hstack4__cap:hover .hstack4__cap-label,
.hstack4__cap.is-open .hstack4__cap-label,
.hstack4__cap:focus-within .hstack4__cap-ico,
.hstack4__cap:focus-within .hstack4__cap-label {
    transform: translateY(-0.6rem);
}

/* Bridges the 3px lift of the hovered link so the pointer never falls into a
   gap on its way down to the reveal band.
   Only rendered for the open capability: a bridge on every column would be
   crossed on the way to a centred product link and would swap the panel. */
.hstack4__cap:hover .hstack4__cap-link::after,
.hstack4__cap.is-open .hstack4__cap-link::after,
.hstack4__cap:focus-within .hstack4__cap-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    /* the full gap down to the band, plus the 3px hover lift */
    height: calc(var(--hs4-cap-gap) + 0.5rem);
}

.hstack4__cap-ico {
    position: relative;
    display: block;
    line-height: 0;
    transition: transform 0.25s ease;
}

.hstack4 .hstack4__cap-ico img {
    display: block;
    width: 4rem;
    height: auto;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

/* optional blue artwork, cross-faded over the default icon */
.hstack4__cap-ico-hover {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.hstack4__cap:hover .hstack4__cap-ico-hover,
.hstack4__cap.is-open .hstack4__cap-ico-hover,
.hstack4__cap:focus-within .hstack4__cap-ico-hover {
    opacity: 1;
}

/* Only hide the default icon when there really is hover artwork to cross-fade
   to. This used to test :not(:only-child), which stopped meaning "an
   icon_hover exists" the moment .hstack4__cap-ico-m joined the span — the
   base icon then faded out on every hover and nothing replaced it. */
.hstack4__cap:hover .hstack4__cap-ico:has(.hstack4__cap-ico-hover) .hstack4__cap-ico-base,
.hstack4__cap.is-open .hstack4__cap-ico:has(.hstack4__cap-ico-hover) .hstack4__cap-ico-base,
.hstack4__cap:focus-within .hstack4__cap-ico:has(.hstack4__cap-ico-hover) .hstack4__cap-ico-base {
    opacity: 0;
}

/* No capability ships icon_hover artwork today, so the hover state comes from
   recolouring the white silhouette through the SVG filter declared in
   elements/stack-v4.php. The leading .hstack4 is the usual outranking of
   homepage.css; filter is not interpolable between none and url(), so the
   colour flips partway through the 0.25s transition rather than fading. */
.hstack4 .hstack4__cap:hover .hstack4__cap-ico-base,
.hstack4 .hstack4__cap.is-open .hstack4__cap-ico-base,
.hstack4 .hstack4__cap:focus-within .hstack4__cap-ico-base {
    filter: url(#hs4-tint-hover);
}

/* single source of truth for the tint — the filter inherits the custom
   property from .hstack4 */
.hstack4__filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.hstack4__filters feFlood {
    flood-color: var(--hs4-hover);
}

/* card-mode artwork — swapped in below 64rem */
.hstack4 .hstack4__cap-ico img.hstack4__cap-ico-m {
    display: none;
}



.hstack4__cap-label {
    font-size: 1.125rem;
    line-height: normal;
    font-weight: 600;
    text-align: center;
    color: var(--hs4-text);
    /* transform belongs here rather than in a second .hstack4__cap-label rule:
       transition replaces rather than merges, so whichever declaration came
       last would silently drop the other property */
    transition: color 0.25s ease, transform 0.25s ease;
}

.hstack4__cap:hover .hstack4__cap-label,
.hstack4__cap.is-open .hstack4__cap-label,
.hstack4__cap:focus-within .hstack4__cap-label {
    color: var(--hs4-hover);
}

/* ==========================================================================
   HOVER PRODUCT ROW
   Absolutely placed into the strip reserved by .hstack4__caps, so every
   capability reveals its products in the same band under the rule.
   ========================================================================== */
.hstack4__cap-products {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--hs4-strip);

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 2.25rem;
    margin: 0;
    padding: 0;
    list-style: none;

    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.375rem);
    /* Light hover intent, pure CSS: 50ms before a panel opens and a short
       grace period before it closes, so a fast diagonal from a label to one
       of its product links doesn't swap the panel mid-sweep. Kept close to
       the icon/label's 0.25s transition so the two read as one motion. */
    transition: opacity 0.2s ease 0.05s, transform 0.2s ease 0.05s, visibility 0s linear 0.25s;
}

/* Full-width hover bridge across the gap between the rail and the band.
   It belongs to the panel, so it is hidden (and un-hoverable) with it: the
   pointer can travel diagonally to any product without entering a
   neighbouring capability's hover area. */
.hstack4__cap-products::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    /* height: var(--hs4-cap-gap); */
}

.hstack4__cap:hover .hstack4__cap-products,
.hstack4__cap.is-open .hstack4__cap-products,
.hstack4__cap:focus-within .hstack4__cap-products {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s ease 0.05s, transform 0.2s ease 0.05s, visibility 0s linear 0.05s;
}

/* On a product page the page's own capability starts open — its products are
   on screen without anyone hovering. */
.hstack4__cap.is-active .hstack4__cap-products {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* All eight panels share the one band, so the resting panel has to step aside
   as soon as another column is hovered, or the two would print on top of each
   other. */
.hstack4__caps-list:has(.hstack4__cap:hover) .hstack4__cap.is-active:not(:hover) .hstack4__cap-products,
.hstack4__caps-list:has(.hstack4__cap:focus-within) .hstack4__cap.is-active:not(:focus-within) .hstack4__cap-products,
.hstack4__caps-list:has(.hstack4__cap.is-open) .hstack4__cap.is-active:not(.is-open) .hstack4__cap-products {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

/* The hover bridge spans the full width of the gap row. On the resting panel
   it would be live from the start, so a pointer travelling down to another
   column's products would cross it, register as a hover on the active
   capability and pull its panel back over the one being opened. */
.hstack4__cap.is-active:not(:hover):not(:focus-within):not(.is-open) .hstack4__cap-products::before {
    content: none;
}

.hstack4__cap-product {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

/* leading tick before every product, as in the reference */
.hstack4__cap-product::before {
    content: "";
    flex: 0 0 auto;
    width: 0.125rem;
    height: 0.875rem;
    margin-right: 0.5rem;
    border-radius: 0.0625rem;
    background: #ffffff;
}

.hstack4__cap-product:hover::before {
    background: var(--hs4-hover);
}

.hstack4__cap-product a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hstack4__cap-product:hover a,
.hstack4__cap-product a:focus-visible {
    color: var(--hs4-hover);
}

/* stretch the link over the whole row so the tick is hoverable and clickable
   too, not just the text */
.hstack4__cap-product a::after {
    content: "";
    position: absolute;
    inset: 0;
}


.hstack4__cap.is-active .hstack4__cap-label {
    font-weight: 700;
}

/* Marker centred on the rail's rule under the active capability. It hangs off
   .hstack4__cap-link rather than the <li>: the link is already positioned,
   whereas making the <li> a containing block would trap .hstack4__cap-products
   inside one column and break the full-width reveal band.
   The rule sits --hs4-cap-gap below the link's bottom edge — that is the
   padding .hstack4__caps-list holds above its border. */
.hstack4__cap-marker {
    /* half-width of the bright stretch of rule either side of the marker;
       measured off the comp at ~80px */
    --hs4-marker-reach: 42rem;
    position: absolute;
    left: 50%;
    top: calc(99.5% + var(--hs4-cap-gap));
    z-index: 1;
    display: block;
    line-height: 0;
    color: var(--hs4-text);
    transform: translate(-50%, -50%);
}

/* The rule brightens as it approaches the marker. Drawn as a gradient bar laid
   over the rail's border rather than by restyling the border itself, which is
   one continuous line across all eight columns and cannot be lit locally.
   Both ends are opaque --hs4-line, so the bar joins the rule invisibly; the
   midpoint is the comp's measured peak, a warm grey whose blue channel is
   actually lower than the rule's — which is why this interpolates between two
   solid colours instead of veiling the line with white. */
.hstack4__cap-marker::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 53%;
    width: calc(var(--hs4-marker-reach) * 2);
    height: 1px;
    transform: translate(-50%, -50%);
    background: linear-gradient(90deg,
            var(--hs4-line) 0%,
            #7C8188 50%,
            var(--hs4-line) 100%);
}

/* the glow rides the star only — on the wrapper it would also smear the
   gradient bar */
.hstack4__cap-marker svg {
    position: relative;
    z-index: 1;
    /* resting glow — survives prefers-reduced-motion, which kills the pulse */
    filter: drop-shadow(0 0 0.375rem rgba(255, 255, 255, 0.55));
    animation: hs4-marker-glow 2.6s ease-in-out infinite;
}

/* ==========================================================================
   CORE — rays, logo, title, SOC, modes
   ========================================================================== */
.hstack4__core {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* no padding-top: the 4rem above the top line band is --hs4-strip,
       reserved by .hstack4__caps. 3rem below the bottom band to the rows. */
    padding: 0 0 0;
}

.hstack4__core::before {
    /* content: ""; */
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(55rem, 95%);
    aspect-ratio: 2.3 / 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(closest-side,
            rgba(159, 216, 255, 0.18) 0%,
            rgba(47, 123, 255, 0.10) 45%,
            rgba(10, 26, 102, 0) 100%);
    pointer-events: none;
    animation: hs4-breathe 7s ease-in-out infinite;
}

/* NOTE ON SPECIFICITY
   homepage.css ships `.unified-section img { width: auto }` (0,1,1) and is
   enqueued after this file, while the whole section lives inside
   .unified-section. Every rule below that sizes an <img> is therefore scoped
   with a leading .hstack4 to outrank it — without that the logo, the ray fan,
   the capability icons and the EDR/XDR/MXDR/ITDR marks all fall back to their
   intrinsic size and burst out of the section on small screens.
   ========================================================================== */

/* The two line bands sit in the flow, first and last child of the core, so
   the 4rem above the top one (--hs4-strip, reserved by .hstack4__caps) and the
   3rem below the bottom one (the core's padding) are real gaps rather than
   something to fake around an absolutely placed drawing. */
.hstack4__rays {
    width: 100%;
    pointer-events: none;
    max-width: 1030px;
}

.hstack4__rays.hstack4__rays--bottom {
    margin-top: -4.3rem;
}

.hstack4__rays.hstack4__rays--top {
    margin-bottom: -24px;
    /* decorative, but hoverable: keeps the open capability's products shown
       while the pointer is over the fan (see initHover in the JS) */
    pointer-events: auto;
}

.hstack4__rays picture {
    display: block;
}

.hstack4 .hstack4__rays img {
    display: block;
    width: 100%;
    height: auto;
    animation: hs4-fade 1.2s ease both 0.2s;
}

.hstack4__brand {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
    text-align: center;
}

/* The wrapper owns the entrance (opacity/transform) and the pulsing halo
   (filter). Keeping those off the <img> leaves its own transform and filter
   free for the hover state — a filled animation would otherwise outrank it. */
.hstack4__logo-wrap {
    display: block;
    line-height: 0;
    animation:
        hs4-logo-in 1s cubic-bezier(0.22, 1, 0.36, 1) both 0.15s,
        hs4-logo-glow 5s ease-in-out infinite 1.15s;
}

.hstack4 .hstack4__logo {
    display: block;
    width: 26.25rem;
    max-width: 460px;
    height: auto;
    /* resting glow — survives prefers-reduced-motion, which kills the pulse */
    filter:
        drop-shadow(0 0 0.625rem rgba(168, 208, 255, 0.45)) drop-shadow(0 0 1.75rem rgba(64, 139, 254, 0.35));
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.hstack4__logo:hover {
    transform: scale(1.045);
    filter:
        drop-shadow(0 0 0.75rem rgba(214, 233, 255, 0.75)) drop-shadow(0 0 2.25rem rgba(99, 170, 255, 0.6)) drop-shadow(0 0 4rem rgba(47, 123, 255, 0.45));
}

.hstack4__title {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hs4-text);
    text-shadow: 0 0 1.75rem rgba(99, 170, 255, 0.45);
    animation: hs4-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both 0.35s;
}

/* --- 24x7 SOC --- */
.hstack4__soc {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: var(--hs4-socMax);
    margin-top: 13px;
    animation: hs4-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both 0.5s;
}

.hstack4__soc-rule {
    flex: 1 1 0;
    height: 0.125rem;
    background: linear-gradient(90deg, rgba(155, 183, 255, 0) 0%, #408BFE 100%);
}

.hstack4__soc-rule:last-child {
    background: linear-gradient(90deg, #408BFE 0%, rgba(155, 183, 255, 0) 100%);
}

.hstack4__soc-pill {
    flex: 0 0 auto;
    padding: 1.25rem 2.7rem;
    border: 0.125rem solid var(--hs4-pill-stroke);
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--hs4-text);
    line-height: 0;
}

/* --- EDR / XDR / MXDR / ITDR --- */
.hstack4__modes {
    --hs4-mode-size: 1.4375rem;
    position: relative;
    z-index: 2;
    display: flex;
    /* every mark has its baseline on the bottom edge of its canvas, so
       bottom-aligning puts all four letterforms on one baseline */
    align-items: flex-end;
    /* the row spans the SOC rule above it, EDR flush left and ITDR flush
       right; the gap is only a floor, space-between hands out the rest */
    justify-content: space-between;
    width: 100%;
    max-width: var(--hs4-socMax);
    gap: 3.25rem;
    margin-top: 0.5rem;
    animation: hs4-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both 0.62s;
}

.hstack4__mode {
    display: block;
    line-height: 0;
    transition: transform 0.25s ease, filter 0.25s ease;
}

/* Height drives the sizing and --hs4-mode-scale equalises the cap heights
   (see the note above the nth-of-type block). This is what those variables
   were always for — they were declared but never consumed, which left all
   four marks at intrinsic size regardless of viewport. */
.hstack4 .hstack4__mode img {
    display: block;
    width: auto;
    height: 25px;
}

/* All four marks sit on an identical 77x25 canvas with their baseline on the
   bottom edge, but the letterforms are drawn at different sizes — measured cap
   heights are EDR 17.85, XDR 19.28, MXDR 18.53, ITDR 18.14 user units. Scaling
   each box by (18.46 / its cap height) renders every mark's letters at one
   height; flex-end then lands them on a shared baseline.
   Keyed by position, so the markup order in $modes must not change. */
/* space-between alone would still leave a visible inset at both ends: the four
   marks share a 77x25 canvas with the letterforms centred in it, so each box
   carries dead space the eye reads as padding. Measured left/right padding, in
   canvas units: EDR 13.91, XDR 9.91, MXDR 0.10, ITDR 8.84. The negative
   margins cancel it — (pad / 25) * --hs4-mode-scale, the box being
   --hs4-mode-size * --hs4-mode-scale tall — which pulls the row flush to the
   edges and evens out the six gaps at the same time. */
.hstack4__mode:nth-of-type(1) {
    --hs4-mode-scale: 1.034;
    /* EDR */
    margin-inline: calc(var(--hs4-mode-size) * -0.575);
}

.hstack4__mode:nth-of-type(2) {
    --hs4-mode-scale: 0.958;
    /* XDR */
    margin-inline: calc(var(--hs4-mode-size) * -0.380);
}

.hstack4__mode:nth-of-type(3) {
    --hs4-mode-scale: 0.996;
    /* MXDR */
    margin-inline: calc(var(--hs4-mode-size) * -0.004);
}

.hstack4__mode:nth-of-type(4) {
    --hs4-mode-scale: 1.018;
    /* ITDR */
    margin-inline: calc(var(--hs4-mode-size) * -0.360);
}

.hstack4__mode:hover {
    transform: translateY(-0.125rem);
}

.hstack4__mode:hover img {
    /* filter: drop-shadow(0 0 1.25rem rgba(143, 212, 255, 0.9)); */
}

.hstack4__modes-sep {
    display: inline-flex;
    margin-bottom: calc(var(--hs4-mode-size) * 0.33);
    color: white;
    animation: hs4-twinkle 3.2s ease-in-out infinite;
}

.hstack4__modes-sep:nth-of-type(2) {
    animation-delay: 0.6s;
}

.hstack4__modes-sep:nth-of-type(3) {
    animation-delay: 1.2s;
}

/* ==========================================================================
   FOUNDATION ROWS
   ========================================================================== */
.hstack4__rows {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.hstack4__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    padding: 0.875rem 0;
    /* a border can't fade, so the rule is a 1px gradient pinned to the top */
    background-image: var(--hs4-rule);
    background-repeat: no-repeat;
    background-size: 100% 0.0625rem;
    background-position: 0 0;
}

.hstack4__row:first-child {
    background-image: none;
}

.hstack4__row-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hs4-text);
    text-align: right;
}

.hstack4__row-divider {
    width: 0.125rem;
    height: 1.125rem;
    border-radius: 0.125rem;
    background: var(--hs4-accent);
    box-shadow: 0 0 0.625rem rgba(255, 47, 112, 0.6);
}

.hstack4__row-items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hstack4__row-item {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
}

/* Bullet separator between items. Trailing rather than leading so that when
   the list wraps the bullet stays at the end of the previous line instead of
   indenting the start of the next one. */
.hstack4__row-item:not(:last-child)::after {
    content: "\2022";
    margin: 0 0.5rem;
    color: white;
}

.hstack4__row-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hstack4__row-item a:hover,
.hstack4__row-item a:focus-visible {
    color: #8EBEFF;
}

/* ==========================================================================
   ANIMATION
   ========================================================================== */
@keyframes hs4-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes hs4-rise {
    from {
        opacity: 0;
        transform: translateY(0.875rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes hs4-logo-in {
    from {
        opacity: 0;
        transform: scale(0.94);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* slow halo breathing, layered on top of the logo's own resting glow */
@keyframes hs4-logo-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 1.25rem rgba(64, 139, 254, 0.25));
    }

    50% {
        filter: drop-shadow(0 0 2.75rem rgba(143, 190, 255, 0.55));
    }
}

/* only the filter is animated: the marker's transform carries its centring on
   the rule, and a transform in the keyframes would overwrite it */
@keyframes hs4-marker-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 0.25rem rgba(255, 255, 255, 0.45));
    }

    50% {
        filter: drop-shadow(0 0 0.75rem rgba(255, 255, 255, 0.95));
    }
}

@keyframes hs4-breathe {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

@keyframes hs4-twinkle {

    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@media (prefers-reduced-motion: reduce) {

    .hstack4 *,
    .hstack4 *::before,
    .hstack4 *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* ==========================================================================
   CAPABILITY CAROUSEL (< 1024px)
   Touch devices have no reliable :hover, and the shared reveal band sits
   below a wrapped two-row rail where it cannot be reached. Below 1024px the
   rail therefore becomes a scroll-snap carousel: one capability per view,
   products listed inside the card, arrows + native swipe for navigation.

   Metrics below are taken from the supplied design (392px artboard):
   card 309x399 inset 42px, 28px radius, icon badge 100px centred on the
   card's bottom edge, triangle arrows centred in the 42px gutter.
   ========================================================================== */
@media (max-width: 64rem) {

    /* 1024px — no reveal band in carousel mode */
    .hstack4 {
        --hs4-strip: 0rem;
    }

    /* The section itself stays unpadded in carousel mode so the rail can run
       edge to edge; the side inset lives on .hstack4__core / .hstack4__rows
       instead. The rail keeps its own top padding — the cards are bordered
       here, and without it the section's overflow:hidden clips their top
       corners. */
    .hstack4__caps {
        padding: 2.25rem 0 0;
    }

    .hstack4__core {
        padding-inline: 1.25rem;
    }

    .hstack4__rows {
        padding: 0 0 1.75rem;
    }

    .hstack4__caps-viewport {
        /* arrows live in this gutter, clear of the card */
        padding: 0 2.625rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 2.625rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .hstack4__caps-viewport::-webkit-scrollbar {
        display: none;
    }

    .hstack4__caps-list {
        display: flex;
        grid-template-columns: none;
        justify-content: flex-start;
        /* wider than the viewport gutter, so the neighbouring cards sit past
           the scrollport edge and are clipped rather than peeking in */
        gap: 3rem;
        /* room for the half of the icon badge that hangs below the card —
           without it the scroll container's overflow would clip it */
        padding: 0 0 3.25rem;
        border-bottom: 0;
        background-image: none;
    }

    .hstack4__cap {
        /* one card per view; basis resolves against the padded viewport */
        position: relative;
        flex: 0 0 100%;
        scroll-snap-align: start;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.125rem;
        min-height: 24.875rem;
        padding: 2.25rem 1.25rem 4.25rem;
        border: 0.0625rem solid transparent;
        /* measured at ~21.5px in the design, tighter than --hs4-radius (28px) */
        border-radius: 1.375rem;
        /* The design's border is a vertical gradient, deep blue at the top
           fading to near-white at the bottom — hence padding-box/border-box
           rather than a flat border-color. The fill holds its darkest value
           for the top ~47% before ramping. */
        background:
            linear-gradient(180deg, #070f1f 0%, #070f1f 47%, #122957 100%) padding-box,
            linear-gradient(180deg, #014cbe 0%, #0064fb 70%, #bdd7ff 100%) border-box;
    }

    /* the link is now just the card title — the icon is lifted out of flow */
    .hstack4__cap-link {
        position: static;
        display: block;
        height: auto;
    }

    .hstack4__cap-link:hover .hstack4__cap-ico,
    .hstack4__cap-link:hover .hstack4__cap-label,
    .hstack4__cap-link:focus-visible .hstack4__cap-ico,
    .hstack4__cap-link:focus-visible .hstack4__cap-label {
        transform: none;
    }

    /* no hover lift in card mode: the desktop rule moves the whole icon badge
       (and would also drop its centring translate), so pin it back */
    .hstack4__cap:hover .hstack4__cap-label,
    .hstack4__cap:focus-within .hstack4__cap-label {
        transform: none;
    }

    .hstack4__cap .hstack4__cap-ico,
    .hstack4__cap:hover .hstack4__cap-ico,
    .hstack4__cap:focus-within .hstack4__cap-ico {
        transform: translate(-50%, 50%);
        transition: none;
    }

    /* both hover bridges are desktop-only machinery */
    .hstack4__cap:hover .hstack4__cap-link::after,
    .hstack4__cap:focus-within .hstack4__cap-link::after,
    .hstack4__cap-products::before {
        content: none;
    }

    .hstack4__cap-label {
        font-size: 1.125rem;
        font-weight: 700;
        line-height: 1.33;
        text-align: left;
        color: var(--hs4-text);
    }

    /* icon badge: pale disc centred on the card's bottom edge */
    .hstack4__cap-ico {
        position: absolute;
        left: 50%;
        bottom: 0;
        z-index: 2;
        display: grid;
        place-items: center;
        /* width: 29.125rem; */
        /* height: 6.125rem; */
        transform: translate(-50%, 50%);
    }

    .hstack4 .hstack4__cap-ico img {
        width: 6rem;
        /* artwork ships white — darken it for the pale disc */
        filter: brightness(0) saturate(100%);
        opacity: 0.9;
    }

    /* card mode uses its own artwork: hide the rail icons, show the mobile one */
    .hstack4 .hstack4__cap-ico img.hstack4__cap-ico-base,
    .hstack4 .hstack4__cap-ico img.hstack4__cap-ico-hover {
        display: none;
    }

    .hstack4 .hstack4__cap-ico img.hstack4__cap-ico-m {
        display: block;
        position: static;
        /* ships ready for the pale disc — no darkening, full opacity */
        filter: none;
        opacity: 1;
    }

    .hstack4 .hstack4__cap.is-active .hstack4__cap-ico img,
    .hstack4 .hstack4__cap.is-active .hstack4__cap-ico svg {
        filter: brightness(0) saturate(100%);
    }

    .hstack4 .hstack4__cap.is-active .hstack4__cap-ico img.hstack4__cap-ico-m {
        filter: none;
    }

    /* no rail rule in card mode, so nothing for the marker to sit on */
    .hstack4__cap-marker {
        display: none;
    }

    /* every card lists its own products inline, so the shared-band step-aside
       above has nothing to arbitrate here */
    .hstack4__caps-list:has(.hstack4__cap:hover) .hstack4__cap.is-active:not(:hover) .hstack4__cap-products {
        opacity: 1;
        visibility: visible;
    }

    /* products are part of the card now, not an absolutely placed band */
    .hstack4__cap-products,
    .hstack4__cap:hover .hstack4__cap-products,
    .hstack4__cap:focus-within .hstack4__cap-products {
        position: static;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: flex-start;
        justify-content: flex-start;
        height: auto;
        gap: 0.8rem;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .hstack4__cap-product {
        font-size: 0.9375rem;
        font-weight: 400;
        line-height: 1.4;
        white-space: normal;
    }

    .hstack4__cap-product::before {
        width: 0.125rem;
        height: 0.875rem;
        margin-right: 0.75rem;
    }

    /* arrows — bare triangles in the gutter, vertically centred on the card */
    .hstack4__caps-nav {
        position: absolute;
        /* centre on the card, not on the rail: the list reserves 3.25rem at
           the bottom for the overhanging badge, which drags 50% downwards */
        top: calc(50% - 1.625rem);
        z-index: 4;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2.75rem;
        padding: 0;
        transform: translateY(-50%);
        border: 0;
        background: none;
        color: var(--hs4-muted);
        cursor: pointer;
        transition: opacity 0.2s ease;
    }

    .hstack4__caps-nav[disabled] {
        opacity: 0.25;
        cursor: default;
    }

    .hstack4__caps-nav--prev {
        left: 0;
    }

    .hstack4__caps-nav--next {
        right: 0;
    }
}

/* tablets have room for a pair of cards; a single full-width card reads empty */
@media (min-width: 48.0625rem) and (max-width: 64rem) {
    .hstack4__cap {
        flex-basis: calc((100% - 3rem) / 2);
    }
}

@media (max-width: 48rem) {

    /* 768px */
    .hstack4 {
        width: calc(100% - 1.5rem);
        border-radius: 1.25rem;
    }

    /* The design measures its arrow gutter from the section edge, and the
       section is already unpadded in carousel mode — so no negative margin
       here. Pulling the rail further out would push the arrows (pinned to its
       left/right edges) past the section and under its overflow:hidden. */
    .hstack4__caps-viewport {
        padding: 0 1.875rem;
        scroll-padding-inline: 1.875rem;
    }

    /* narrower than the 1.875rem gutter, so the arrow never overlaps the card */
    .hstack4__caps-nav {
        width: 1.75rem;
        outline: none !important;
    }

    .hstack4__caps-nav--prev {
        left: 0;
    }

    .hstack4__caps-nav--next {
        right: 0;
        outline: none !important;
    }


    /* On phones the bands are lifted out of the flow and pinned to the core's
       edges instead, so they sit behind the content rather than pushing it
       apart. The offsets are the knobs for that placement. */
    .hstack4__rays {
        --hs4-rays-top-offset: 0rem;
        --hs4-rays-bottom-offset: 0rem;

        position: absolute;
        left: 0;
        right: 0;
        z-index: 0;
    }

    .hstack4__rays--top {
        top: var(--hs4-rays-top-offset);
    }

    .hstack4__rays--bottom {
        bottom: var(--hs4-rays-bottom-offset);
    }

    .hstack4__core {
        padding: 6rem 0;
    }

    /* The vw terms in the core's clamps only bite on desktop; on a phone they
       all collapse to their floors, which the design shows as too small.
       Values below are measured off the mobile comp. */
    .hstack4 .hstack4__logo {
        width: min(18.75rem, 92%);
        margin: 0 auto;
    }

    .hstack4__title {
        font-size: 1.125rem;
        letter-spacing: 0.1em;
        max-width: 271px;
        line-height: normal;
    }

    /* the comp keeps the rules flanking the pill on mobile, and runs them out
       to the section edge rather than stopping at the padded content box */
    .hstack4__soc {
        width: calc(100% + 2.5rem);
        max-width: none;
        margin-inline: -1.25rem;
    }

    .hstack4__soc-rule {
        display: block;
        background: #408BFE !important;
        height: 2px;
    }

    /* Measured off the comp: a 200x40 pill with a 2px stroke, 15px caps and
       the rule crossing at exactly mid-height. The four corners are not
       uniform and the bottom pair is not circular — the top corners are a 5px
       round-over, the bottom ones sweep 27px wide by ~35px tall. That needs
       the two-value horizontal / vertical radius syntax; a single radius
       cannot express it. Bottom radii are percentages (27/200 of the width,
       35/40 of the height) so the shape holds if the label's width shifts.
       The 85% keeps 5px + 34px under the 40px side, so the browser never
       scales the whole set down to fit. */
    .hstack4__soc-pill {
        font-size: 0.9375rem;
        font-weight: 700;
        line-height: 1;
        padding: 0.625rem 2.5rem;
        border: 2px solid var(--hs4-pill-stroke);
        border-radius: 0.3125rem 0.3125rem 13.5% 13.5% / 0.3125rem 0.3125rem 85% 85%;
    }

    .hstack4__modes {
        /* 5.6vw is the largest size at which the four glyphs, the three 12px
           separators and the comp's gaps still fit the content box
           (100vw minus the section's 24px inset and 40px padding) at 320px */
        --hs4-mode-size: min(1.5rem, 5.6vw);
        flex-wrap: nowrap;
        gap: min(0.5rem, 1.2vw);
    }

    /* Design stacks these left-aligned: accent bar + label on one line, the
       items wrapped onto the next, with the rule above every row. */
    .hstack4__row {
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0.625rem;
        padding: 1.3rem 0;
        text-align: left;
        background-image: none;
        border-top: 1px solid #408BFE;
    }

    .hstack4__row:first-child {
        background-image: none;
        border-top: 1px solid #408BFE;
    }

    .hstack4__row-divider {
        /* markup order is label → divider → items; the design leads with the
           bar, so pull it in front rather than reordering the HTML */
        order: -1;
        width: 0.1875rem;
        height: 1.125rem;
    }

    .hstack4__row-label {
        flex: 1 1 auto;
        font-size: 1.125rem;
        font-weight: 600;
        text-align: left;
    }

    .hstack4__row-items {
        flex: 1 0 100%;
        justify-content: flex-start;
        gap: 0.625rem 0;
    }

    .hstack4__row-item {
        font-size: 1rem;
        font-weight: 500;
    }
}