/* Helix Ribbon Hero (vanilla port). Change the colours here (--hrh-bg is the background, --hrh-fg the text).
   The stage pins for (screens + 1) screen heights; see helix-hero.js. */

.hrh-root {
    --hrh-bg: #ffffff;
    --hrh-fg: #14161a;
    --hrh-h: 100vh;
    --hrh-screens: 5;
    position: relative;
    width: 100%;
    height: calc(var(--hrh-h) * (var(--hrh-screens) + 1));
    isolation: isolate;
}

@supports (height: 100svh) {
    .hrh-root {
        --hrh-h: 100svh;
    }
}

.hrh-root img {
    max-width: none;
    display: block;
}

.hrh-stage {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--hrh-h);
    overflow: hidden;
    color: var(--hrh-fg);
    background: var(--hrh-bg);
    --hrh-g: clamp(16px, 2.2vw, 32px);
    font-family: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
}

.hrh-view {
    position: absolute;
    inset: 0;
    perspective-origin: 50% 50%;
}

.hrh-scene {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
}

.hrh-screw,
.hrh-group {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
}

.hrh-slice {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    background-repeat: no-repeat;
    backface-visibility: hidden;
}

.hrh-line {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    white-space: nowrap;
    font-family: Anton, Impact, "Arial Narrow", sans-serif;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.005em;
    text-transform: uppercase;
    color: inherit;
}

.hrh-ch {
    display: inline-block;
}

.hrh-port {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    background: #1c1c1c;
}

.hrh-port img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* nothing shows until the script has measured the layout */
.hrh-view,
.hrh-count,
.hrh-fade,
.hrh-grid {
    visibility: hidden;
}

.hrh-root[data-ready="true"] .hrh-view,
.hrh-root[data-ready="true"] .hrh-count,
.hrh-root[data-ready="true"] .hrh-fade,
.hrh-root[data-ready="true"] .hrh-grid {
    visibility: visible;
}

.hrh-root[data-ready="true"] .hrh-ch {
    animation: hrh-rise 0.7s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.hrh-root[data-ready="true"] .hrh-port {
    animation: hrh-port 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) 0.32s both;
}

.hrh-root[data-ready="true"] .hrh-fade {
    animation: hrh-fade 0.7s ease-out 0.55s both;
}

.hrh-foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: var(--hrh-g);
}

.hrh-bio {
    margin: 0;
    max-width: 24em;
    font-family: inherit;
    font-size: clamp(14px, 1.3vw, 19px);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.01em;
}

.hrh-hint,
.hrh-count {
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.hrh-count {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
}

.hrh-grid {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.hrh-card {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
}

.hrh-card-img {
    position: relative;
    background: none;
}

/* the logo floats, like the projects page */
.hrh-card-img img {
    position: absolute;
    left: 11%;
    top: 6%;
    width: 78%;
    height: 88%;
    object-fit: contain;
    filter: drop-shadow(0 14px 14px rgba(20, 22, 26, 0.18));
    animation: hrh-float 5s ease-in-out infinite;
}

.hrh-card:nth-child(2n) .hrh-card-img img {
    animation-delay: -1.2s;
}

.hrh-card:nth-child(3n) .hrh-card-img img {
    animation-delay: -2.4s;
}

.hrh-cap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    font-family: inherit;
    text-align: center;
    text-transform: none;
    line-height: 1.3;
}

.hrh-cap-t {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Goldman, "Inter Tight", ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(14px, 1.5vw, 20px);
    font-weight: 400;
    letter-spacing: 0;
}

.hrh-cap-d {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    opacity: 0.65;
}

@media (min-width: 720px) {
    .hrh-cap-d {
        -webkit-line-clamp: 2;
        font-size: 14px;
    }
}

@keyframes hrh-rise {
    from {
        transform: translateY(60%);
        filter: blur(12px);
        opacity: 0;
    }

    60% {
        opacity: 1;
    }

    to {
        transform: none;
        filter: blur(0);
        opacity: 1;
    }
}

@keyframes hrh-port {
    from {
        clip-path: inset(0 0 100% 0);
        filter: blur(8px);
    }

    to {
        clip-path: inset(0 0 0 0);
        filter: blur(0);
    }
}

@keyframes hrh-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hrh-root[data-ready="true"] .hrh-ch,
    .hrh-root[data-ready="true"] .hrh-port,
    .hrh-root[data-ready="true"] .hrh-fade,
    .hrh-card-img img {
        animation: none;
    }
}

/* grid switched off: the next section slides up over the pinned stage, so no empty screen is left after the ribbon */
.hrh-root[data-grid="off"] {
    margin-bottom: calc(var(--hrh-h) * -0.55);
}

.hrh-root[data-grid="off"] ~ section {
    position: relative;
    z-index: 1;
}


@keyframes hrh-float {
    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -10px;
    }
}