:root {
    --bf-orange: #ff6600;
    --bf-white: #ffffff;
    --bf-black: #030403;
    --bf-pad: clamp(1.5rem, 6.25vw, 6rem);
    --bf-edge-peek: 32px;
    --bf-featured-w: clamp(19rem, 23vw, 22rem);
    --bf-secondary-w: clamp(14rem, 18vw, 17.5rem);
    --bf-card-h: clamp(20rem, 30vw, 28.75rem);
    --bf-radius: 1.45rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: #080908;
    color: var(--bf-white);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bf-skip-link {
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 1000;
    transform: translateY(-150%);
    background: var(--bf-white);
    color: var(--bf-black);
    padding: .75rem 1rem;
    border-radius: .5rem;
}

.bf-skip-link:focus { transform: translateY(0); }

.bf-hero {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background: var(--bf-black);
}

.bf-hero__bg,
.bf-hero__bg-layer {
    position: absolute;
    inset: 0;
}

.bf-hero__bg-layer {
    opacity: 0;
    background-image: none;
    transform: scale(1.06);
    transition: opacity 620ms ease, transform 1650ms cubic-bezier(.16, .82, .24, 1);
}

.bf-hero__bg-layer.is-active {
    opacity: 1;
    transform: scale(1);
}

.bf-hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .42) 43%, rgba(0, 0, 0, .24) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, .33) 0%, rgba(0, 0, 0, .08) 54%, rgba(0, 0, 0, .22) 100%);
    pointer-events: none;
}

.bf-topnav {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(2rem, 4.7vw, 5rem) var(--bf-pad) 0;
}

.bf-logo {
    color: var(--bf-white);
    text-decoration: none;
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -.018em;
    line-height: 1;
}

.bf-menu {
    display: flex;
    align-items: center;
    gap: clamp(1.15rem, 2vw, 2rem);
    list-style: none;
    padding: 0;
    margin: 0;
}

.bf-menu a {
    color: var(--bf-white);
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(.88rem, .96vw, 1rem);
    letter-spacing: -.006em;
    text-shadow: 0 2px 16px rgba(0,0,0,.38);
}

.bf-hero__content {
    position: relative;
    z-index: 15;
    width: min(47vw, 42rem);
    padding-left: var(--bf-pad);
    padding-top: clamp(6.5rem, 14vh, 9.25rem);
    pointer-events: none;
}

.bf-hero__copy {
    position: relative;
}

.bf-copy-panel {
    transition:
        opacity 300ms ease,
        transform 300ms cubic-bezier(.22, .68, .18, 1);
    will-change: opacity, transform;
}

.bf-copy-panel--current {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.bf-copy-panel--next {
    position: absolute;
    inset: 0 0 auto 0;
    opacity: 0;
    transform: translate3d(0, 0, 0);
    pointer-events: none;
}

.bf-copy-panel--current.is-leaving-left {
    opacity: 0;
    transform: translate3d(-34px, 0, 0);
}

.bf-copy-panel--current.is-leaving-right {
    opacity: 0;
    transform: translate3d(34px, 0, 0);
}

.bf-copy-panel--current.is-preparing-enter {
    opacity: 0;
    transform: translate3d(0, 0, 0);
    transition: none;
}

.bf-hero__title {
    margin: 0;
    font-size: clamp(3.15rem, 5.15vw, 5.25rem);
    line-height: .97;
    font-weight: 700;
    letter-spacing: -.035em;
    text-wrap: balance;
    text-shadow: 0 5px 36px rgba(0,0,0,.34);
}

.bf-hero__text {
    max-width: 40rem;
    margin: clamp(1.6rem, 3.7vh, 2.35rem) 0 0;
    font-size: clamp(1.05rem, 1.45vw, 1.32rem);
    line-height: 1.34;
    font-weight: 400;
    letter-spacing: -.007em;
    text-shadow: 0 2px 20px rgba(0,0,0,.5);
}

.bf-hero__actions {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-top: clamp(2.6rem, 7vh, 4.4rem);
    pointer-events: auto;
}

.bf-hero__controls {
    display: inline-flex;
    align-items: center;
    gap: .86rem;
    min-height: 3rem;
    padding: .65rem 1.1rem;
    border-radius: 999px;
    background: rgba(255,255,255,.17);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 44px rgba(0,0,0,.22);
}

.bf-work-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    min-height: 3rem;
    padding: .65rem 1.8rem;
    border-radius: 999px;
    color: var(--bf-white);
    background: var(--bf-orange);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.008em;
    box-shadow: 0 14px 38px rgba(0,0,0,.22);
}

.bf-home-control,
.bf-dot {
    appearance: none;
    border: 0;
    color: var(--bf-white);
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.bf-home-control {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    font-size: 1.18rem;
    line-height: 1;
}

.bf-control-divider {
    width: 1px;
    height: 1.75rem;
    background: rgba(255,255,255,.75);
    margin: 0 .2rem;
}

.bf-dot {
    width: .78rem;
    height: .78rem;
    border-radius: 999px;
    border: 1.7px solid rgba(255,255,255,.9);
}

.bf-dot.is-active,
.bf-home-control.is-active {
    background: var(--bf-white);
    color: var(--bf-black);
    border-radius: 999px;
}

.bf-home-control:focus-visible,
.bf-dot:focus-visible,
.bf-card:focus-visible,
.bf-work-button:focus-visible {
    outline: 3px solid var(--bf-orange);
    outline-offset: 4px;
}

.bf-card-stage {
    position: absolute;
    z-index: 18;
    inset-inline: 0;
    top: clamp(13rem, 24vh, 16rem);
    height: var(--bf-card-h);
    pointer-events: none;
}

.bf-card-track {
    position: absolute;
    inset: 0;
    height: var(--bf-card-h);
    pointer-events: none;
}

.bf-card {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--bf-card-width, var(--bf-secondary-w));
    height: var(--bf-card-h);
    display: flex;
    align-items: flex-end;
    min-width: 0;
    padding: clamp(1.3rem, 2.3vw, 2rem);
    overflow: hidden;
    border: 0;
    border-radius: var(--bf-radius);
    color: var(--bf-white);
    text-align: left;
    background-image: none;
    box-shadow: 0 20px 80px rgba(0,0,0,.34);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(var(--bf-card-x, 120vw), 0, 0);
    will-change: transform, width, opacity;
    transition:
        transform 660ms cubic-bezier(.18, .82, .18, 1),
        width 660ms cubic-bezier(.18, .82, .18, 1),
        opacity 320ms ease,
        box-shadow 620ms ease;
}

.bf-card.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.bf-card.is-departing-to-left,
.bf-card.is-departing-to-right {
    opacity: .12;
}

.bf-card.is-featured {
    --bf-card-width: var(--bf-featured-w);
    z-index: 5;
    box-shadow: 0 30px 110px rgba(0,0,0,.46);
}

.bf-card.is-secondary {
    --bf-card-width: var(--bf-secondary-w);
    z-index: 4;
}

.bf-card.is-left-peek,
.bf-card.is-right-peek {
    --bf-card-width: var(--bf-secondary-w);
    z-index: 3;
    box-shadow: 0 18px 70px rgba(0,0,0,.32);
}

.bf-card__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.03) 0%, rgba(0,0,0,.16) 46%, rgba(0,0,0,.72) 100%);
    pointer-events: none;
}

.bf-card__body {
    position: relative;
    z-index: 2;
    display: block;
    max-width: 100%;
}

.bf-card__title {
    display: block;
    font-size: clamp(1.45rem, 2.05vw, 1.9rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.022em;
    text-shadow: 0 2px 16px rgba(0,0,0,.48);
}

.bf-card__text {
    display: block;
    margin-top: .8rem;
    max-height: 7rem;
    overflow: hidden;
    font-size: clamp(.92rem, 1.03vw, 1rem);
    line-height: 1.25;
    font-weight: 400;
    letter-spacing: -.006em;
    text-shadow: 0 2px 16px rgba(0,0,0,.5);
    opacity: 1;
    transition: none;
}

.bf-card.is-secondary .bf-card__text {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    transition: none;
}

.bf-card.is-left-peek .bf-card__body,
.bf-card.is-right-peek .bf-card__body {
    opacity: 0;
}

.bf-card.is-secondary .bf-card__title {
    font-size: clamp(1.25rem, 1.75vw, 1.55rem);
}

.bf-beta-content {
    background: #101211;
    color: var(--bf-white);
    padding: clamp(3rem, 8vw, 7rem) var(--bf-pad);
}

.bf-beta-panel {
    max-width: 68rem;
    margin: 0 auto 3rem;
    font-size: 1.15rem;
    line-height: 1.55;
}

@media (max-width: 980px) {
    .bf-menu { display: none; }

    .bf-hero {
        min-height: 100svh;
        padding-bottom: 3rem;
    }

    .bf-hero__content {
        width: auto;
        max-width: 44rem;
        padding-right: var(--bf-pad);
        padding-top: clamp(5rem, 12vh, 7rem);
    }

    .bf-hero__title {
        font-size: clamp(2.85rem, 11vw, 4.6rem);
    }

    .bf-hero__actions {
        flex-wrap: wrap;
    }

    .bf-card-stage {
        position: relative;
        z-index: 19;
        top: auto;
        height: 20rem;
        margin-top: 3rem;
    }
}

@media (max-width: 680px) {
    :root {
        --bf-featured-w: 72vw;
        --bf-secondary-w: 58vw;
        --bf-card-h: 19rem;
    }

    .bf-topnav {
        padding-top: 1.5rem;
    }

    .bf-hero__text {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 1ms !important;
        animation-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}


/* v9: single-panel copy transition. The incoming copy fades to the stable base state. */
.bf-copy-panel--next {
    display: none;
}

.bf-hero__text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* v10: freeze the existing left peek during forward/right-card clicks. */
.bf-card.is-frozen-left-peek {
    z-index: 2;
}

.bf-card.bf-no-transition {
    transition: none !important;
}

/* v11: align stable controls with the card baseline, reduce blurb size, and let cards move as a linear carousel. */
:root {
    --bf-card-top: clamp(13rem, 24vh, 16rem);
    --bf-control-h: 3rem;
}

.bf-hero__content {
    position: static;
    z-index: auto;
    width: auto;
    padding: 0;
    pointer-events: none;
}

.bf-hero__copy {
    position: absolute;
    z-index: 15;
    left: var(--bf-pad);
    top: clamp(13.25rem, 22vh, 18rem);
    width: min(47vw, 42rem);
    pointer-events: none;
}

.bf-hero__actions {
    position: absolute;
    z-index: 22;
    left: var(--bf-pad);
    top: calc(var(--bf-card-top) + var(--bf-card-h) - var(--bf-control-h));
    margin-top: 0;
    min-height: var(--bf-control-h);
}

.bf-card-stage {
    top: var(--bf-card-top);
}

.bf-hero__text {
    max-width: 34rem;
    font-size: clamp(.92rem, 1.08vw, 1.06rem);
    line-height: 1.38;
}

.bf-card {
    opacity: 1;
}

.bf-card.is-visible {
    opacity: 1;
}

.bf-card.is-departing-to-left,
.bf-card.is-departing-to-right {
    opacity: .12;
}

@media (max-width: 980px) {
    .bf-hero__content {
        position: relative;
        z-index: 15;
        width: auto;
        max-width: 44rem;
        padding-left: var(--bf-pad);
        padding-right: var(--bf-pad);
        padding-top: clamp(5rem, 12vh, 7rem);
    }

    .bf-hero__copy {
        position: relative;
        left: auto;
        top: auto;
        width: auto;
    }

    .bf-hero__actions {
        position: relative;
        left: auto;
        top: auto;
        margin-top: clamp(2.6rem, 7vh, 4.4rem);
    }
}

/* v12: home participates as a real carousel card, infinite looping is handled in JS, and the background settle motion is slightly longer. */

/* v13: landing starts without a left peek; featured/current card is a visual anchor, not a click target. */
.bf-card.is-featured {
    pointer-events: none;
    cursor: default;
}

.bf-card-track.is-prepping .bf-card {
    transition: none !important;
}

.bf-card:disabled,
.bf-card.is-featured {
    cursor: default;
}

.bf-card:disabled {
    pointer-events: none;
}
/* v26: small-card text stays stable. When any preview card becomes featured,
   the full featured text system uses a one-shot keyframe so it cannot be
   neutralized by class cleanup or transition base-state conflicts. */
.bf-card.is-secondary .bf-card__body {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bf-card.is-secondary .bf-card__title,
.bf-card.is-secondary .bf-card__text {
    transition: none !important;
    animation: none !important;
}

.bf-card.is-featured .bf-card__body {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.bf-card.bf-feature-enter.is-featured .bf-card__body {
    animation: bf-feature-text-rise 760ms cubic-bezier(.18, .82, .18, 1) both;
}

@keyframes bf-feature-text-rise {
    0% {
        opacity: 0;
        transform: translate3d(0, 1.65rem, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}


/* v27: Card text system rebuilt so every card uses identical markup and identical animation.
   Preview title is static on small cards. Featured title + blurb are a separate layer that
   slides up and fades in when the card becomes featured. */
.bf-card__body {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-width: 100%;
}

.bf-card__preview,
.bf-card__feature {
    display: block;
    width: 100%;
}

.bf-card__preview-title,
.bf-card__feature-title {
    display: block;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.022em;
    text-shadow: 0 2px 16px rgba(0,0,0,.48);
}

.bf-card__preview-title {
    font-size: clamp(1.25rem, 1.75vw, 1.55rem);
}

.bf-card__feature-title {
    font-size: clamp(1.45rem, 2.05vw, 1.9rem);
}

.bf-card__feature-text {
    display: block;
    margin-top: .8rem;
    max-height: 7rem;
    overflow: hidden;
    font-size: clamp(.92rem, 1.03vw, 1rem);
    line-height: 1.25;
    font-weight: 400;
    letter-spacing: -.006em;
    text-shadow: 0 2px 16px rgba(0,0,0,.5);
}

.bf-card__feature {
    display: none;
    opacity: 0;
    transform: translate3d(0, 1.65rem, 0);
}

.bf-card.is-featured .bf-card__preview {
    display: none;
}

.bf-card.is-featured .bf-card__feature {
    display: block;
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.bf-card.is-secondary .bf-card__preview,
.bf-card.is-right-peek .bf-card__preview,
.bf-card.is-left-peek .bf-card__preview {
    display: block;
}

.bf-card.is-secondary .bf-card__feature,
.bf-card.is-right-peek .bf-card__feature,
.bf-card.is-left-peek .bf-card__feature {
    display: none;
}

.bf-card.is-left-peek .bf-card__body,
.bf-card.is-right-peek .bf-card__body {
    opacity: 0;
}

.bf-card.bf-feature-enter.is-featured .bf-card__feature {
    animation: bf-feature-text-rise 760ms cubic-bezier(.18, .82, .18, 1) both;
}

.bf-card.bf-feature-enter.is-featured .bf-card__body {
    animation: none !important;
}
