.home-page {
    overflow-x: hidden;
}

.home-experience {
    position: relative;
    isolation: isolate;
}

/* =========================================================
   MECHANISM
   ========================================================= */

.home-mechanism {
    position: fixed;
    z-index: 1;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100svh - var(--header-height));
    pointer-events: none;
}

.home-mechanism canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* =========================================================
   STATES
   ========================================================= */

.home-state {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 84svh;
    padding: clamp(2.5rem, 4.5vh, 4rem) var(--page-gutter);
    pointer-events: none;
}

.home-state--intro {
    min-height: calc(100svh - var(--header-height));
}

.home-state--narrative {
    min-height: 84svh;
}

.home-state--start {
    min-height: 88svh;
    align-items: center;
}

.home-state__frame {
    position: relative;
    width: min(100%, var(--container-width));
    margin-inline: auto;
}

.home-state a,
.home-state button {
    pointer-events: auto;
}

/* =========================================================
   LABELS / COUNTERS
   ========================================================= */

.home-state__label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.35rem;
    color: var(--color-primary-bright);
    font: 700 0.8rem monospace;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.home-state__label::before {
    content: "";
    width: 2.75rem;
    height: 1px;
    background: currentColor;
}

.home-state__counter {
    position: absolute;
    right: var(--page-gutter);
    bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--color-muted);
    font: 0.72rem monospace;
}

.home-state__counter-line {
    width: clamp(3rem, 8vw, 9rem);
    height: 1px;
    background: linear-gradient(
        to right,
        var(--color-primary-bright) 0 35%,
        var(--color-border) 35% 100%
    );
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

.home-intro__title,
.home-copy__title,
.home-start h2 {
    margin: 0;
    font-size: clamp(3.6rem, 4.35vw, 5.25rem);
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: -0.065em;
}

.home-intro__title span,
.home-copy__title span,
.home-start h2 span {
    display: block;
}

.home-intro__title .accent,
.home-copy__title .accent,
.home-start .accent {
    color: var(--color-primary-bright);
}

/* =========================================================
   INTRO
   ========================================================= */

.home-intro {
    display: grid;
    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(18rem, 0.45fr);
    align-items: center;
    justify-content: space-between;
    gap: clamp(4rem, 30vw, 34rem);
}

.home-intro__primary {
    width: 30rem;
    max-width: 32vw;
}

.home-intro__secondary {
    justify-self: end;
    width: min(100%, 21rem);
    padding: 1.25rem 0 1.25rem 1.5rem;
    border-left: 1px solid var(--color-primary);
    background: linear-gradient(
        90deg,
        rgba(32, 35, 50, 0.88),
        transparent
    );
    color: var(--color-muted);
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    line-height: 1.65;
}

.home-intro__system,
.home-intro__status {
    font-family: monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-intro__system {
    margin: 0 0 1rem;
    color: var(--color-primary-bright);
    font-size: 0.72rem;
}

.home-intro__secondary > p:last-of-type {
    margin: 0;
}

.home-intro__status {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 0.62rem;
}

/* =========================================================
   NARRATIVE
   ========================================================= */

.home-copy {
    width: min(45vw, 42rem);
    padding:
        clamp(0.75rem, 1.5vw, 1.5rem)
        clamp(1rem, 2vw, 2rem)
        clamp(0.75rem, 1.5vw, 1.5rem)
        0;
    background: linear-gradient(
        90deg,
        rgba(25, 27, 39, 0.97),
        rgba(25, 27, 39, 0.9) 68%,
        transparent
    );
}

.home-copy__body {
    max-width: 38rem;
    margin: clamp(1rem, 2vh, 1.6rem) 0 0;
    color: var(--color-muted);
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    line-height: 1.65;
}

/* =========================================================
   ACTIONS
   ========================================================= */

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.4rem;
}

.home-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.5rem;
    padding: 0.75rem 1.45rem;
    border: 1px solid var(--color-border);
    background: rgba(32, 35, 50, 0.84);
    color: var(--color-text);
    font: 700 0.75rem monospace;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease;
}

.home-action:hover,
.home-action:focus-visible {
    border-color: var(--color-primary-bright);
    background: var(--color-surface-light);
    color: var(--color-primary-bright);
}

.home-action--primary {
    border-color: var(--color-primary-bright);
}

.home-text-link {
    display: inline-block;
    margin-top: 1.35rem;
    color: var(--color-primary-bright);
    font: 700 0.75rem monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* =========================================================
   CAPABILITIES
   ========================================================= */

.home-capabilities {
    margin-top: 1.4rem;
    border-top: 1px solid var(--color-border);
}

.home-capability {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--color-border);
}

.home-capability > span,
.home-product__number,
.home-process span {
    color: var(--color-primary-bright);
    font-family: monospace;
}

.home-capability > span {
    font-size: 0.7rem;
}

.home-capability strong {
    display: block;
    color: var(--color-text);
    font-size: 1rem;
}

.home-capability p {
    margin: 0.25rem 0 0;
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

/* =========================================================
   PRODUCTS
   ========================================================= */

.home-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.4rem;
}

.home-product {
    padding: 1.35rem;
    border: 1px solid var(--color-border);
    background: rgba(32, 35, 50, 0.92);
}

.home-product__number {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
}

.home-product h3 {
    margin: 0 0 0.6rem;
    font-size: clamp(1.6rem, 2.1vw, 2.3rem);
    letter-spacing: -0.04em;
}

.home-product strong {
    font: 0.65rem monospace;
    letter-spacing: 0.08em;
}

.home-product p {
    margin: 0.8rem 0 0;
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* =========================================================
   ENGAGEMENT
   ========================================================= */

.home-process {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 1.4rem 0 0;
    padding: 0;
    list-style: none;
}

.home-process li {
    display: grid;
    grid-template-columns: 2rem 1fr;
    align-items: center;
    min-height: 3.4rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--color-border);
    background: rgba(32, 35, 50, 0.9);
}

.home-process span {
    font-size: 0.68rem;
}

.home-process strong {
    font: 0.72rem monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* =========================================================
   START
   ========================================================= */

.home-start {
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-start__content {
    width: min(100%, 56rem);
    text-align: center;
}

.home-start__content .home-state__label,
.home-actions--center {
    justify-content: center;
}

.home-start__content > p:not(.home-state__label) {
    max-width: 38rem;
    margin: 1.25rem auto 0;
    color: var(--color-muted);
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    line-height: 1.65;
}

/* =========================================================
   NON-DESKTOP
   3D MECHANISM REMOVED
   ========================================================= */

@media (max-width: 1100px) {
    .home-mechanism {
        display: none;
    }

    .home-state,
    .home-state--narrative {
        min-height: auto;
        padding-block: clamp(4rem, 8vh, 6rem);
    }

    .home-state--intro {
        min-height: calc(100svh - var(--header-height));
    }

    .home-state--start {
        min-height: 80svh;
    }

    .home-state__frame {
        width: min(100%, 52rem);
    }

    .home-intro {
        display: block;
    }

    .home-intro__primary {
        width: min(100%, 42rem);
        max-width: 100%;
    }

    .home-intro__secondary {
        justify-self: auto;
        width: min(100%, 36rem);
        margin-top: 2.5rem;
    }

    .home-copy {
        width: min(100%, 46rem);
        padding-right: 0;
        background: linear-gradient(
            90deg,
            rgba(25, 27, 39, 0.97),
            rgba(25, 27, 39, 0.85) 72%,
            transparent
        );
    }
}

/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 900px) {
    .home-state,
    .home-state--narrative {
        padding-block: clamp(3.5rem, 7vh, 5rem);
    }

    .home-state--intro {
        min-height: calc(100svh - var(--header-height));
    }

    .home-state--start {
        min-height: 76svh;
    }

    .home-intro__primary,
    .home-intro__secondary,
    .home-copy {
        width: 100%;
        max-width: 100%;
    }

    .home-intro__secondary {
        margin-top: 2.25rem;
    }

    .home-products {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {
    .home-state,
    .home-state--narrative {
        padding:
            clamp(3rem, 7vh, 4.5rem)
            var(--page-gutter);
    }

    .home-state--intro {
        min-height: calc(100svh - var(--header-height));
    }

    .home-state--start {
        min-height: 72svh;
    }

    .home-intro__title,
    .home-copy__title,
    .home-start h2 {
        font-size: clamp(2.75rem, 13vw, 4.6rem);
    }

    .home-intro__secondary {
        margin-top: 2rem;
        padding: 1.15rem 0 1.15rem 1.25rem;
    }

    .home-products,
    .home-process {
        grid-template-columns: 1fr;
    }

    .home-state__counter {
        display: none;
    }

    .home-action {
        min-height: 3.25rem;
        padding-inline: 1.1rem;
    }
}

/* =========================================================
   SHORT VIEWPORTS
   ========================================================= */

@media (max-height: 720px) and (min-width: 1101px) {
    .home-state,
    .home-state--narrative,
    .home-state--start {
        min-height: 92svh;
        padding-block: 2.25rem;
    }

    .home-state--intro {
        min-height: calc(100svh - var(--header-height));
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .home-mechanism {
        opacity: 0.55;
    }
}