.brix-hero {
    background: var(--white);
    color: var(--navy);
}

.brix-hero-inner {
    position: relative;
    display: grid;
    align-items: center;
    min-height: min(660px, calc(100svh - 124px));
    padding-block: 48px;
    isolation: isolate;
}

.brix-hero-image {
    position: absolute;
    inset: 8% 2% 8% auto;
    width: 49%;
    height: 84%;
    object-fit: contain;
}

.brix-hero-copy {
    position: relative;
    max-width: 47%;
}

.brix-page .brix-hero h1 {
    margin: 0;
    color: var(--navy);
    font-size: var(--hero-title-size);
}

.brix-tagline {
    margin: 12px 0;
    font-size: var(--section-title-size);
    line-height: 1.06;
    text-wrap: balance;
}

.brix-hero-copy > p:not(.brix-tagline),
.brix-model-heading p {
    max-width: 41ch;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: var(--text-base);
}

.brix-model {
    position: relative;
    padding-block: 50px 60px;
    background: var(--grey);
}

.brix-model-heading {
    text-align: center;
}

.brix-model-heading p {
    margin: 0 auto;
}

.brix-stage {
    display: grid;
    position: relative;
    place-items: center;
    height: clamp(320px, 59svh, 580px);
    margin: 0 auto;
    width: min(100%, 980px);
    overflow: clip;
}

.brix-stage img {
    width: auto;
    height: 73%;
    max-width: 85%;
    object-fit: contain;
}

.brix-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
}

.brix-stage canvas:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: -2px;
}

.brix-stage canvas.is-over-drawer,
.brix-stage canvas[data-drag="drawer"] {
    cursor: ew-resize;
}

.brix-stage canvas:active:not([data-drag]) {
    cursor: grabbing;
}

.brix-model-status {
    margin: 0 auto;
    padding-inline: 16px;
    text-align: center;
    color: var(--muted);
}

.brix-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 24px;
}

.brix-modes {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.brix-modes button[aria-pressed="true"] {
    background: #263c70;
    border-color: #263c70;
    color: #fff;
}

.brix-drawer-control {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--navy);
}

.brix-drawer-control input {
    margin: 0;
    width: 126px;
    min-height: 44px;
    accent-color: var(--navy);
}

.brix-controls .brix-reset {
    width: 44px;
    min-height: 44px;
    padding: 0;
}

.brix-layout-controls {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.brix-module-select,
.brix-add-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--navy);
}

.brix-module-select select {
    min-height: 44px;
    padding-inline: 10px;
    border: 1px solid var(--grey-strong);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--navy);
    font: inherit;
}

.brix-layout-controls .button:disabled {
    opacity: 0.42;
    cursor: default;
    pointer-events: none;
}

.brix-cushion-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: var(--navy);
}

.brix-cushion-control input {
    margin: 0;
    accent-color: var(--navy);
}

.brix-cushion-control:has(input:disabled) {
    opacity: 0.55;
}

.brix-model [hidden] {
    display: none;
}

.brix-page main .section-kicker {
    display: none;
}

@media (max-width: 640px) {
    .brix-hero-inner {
        min-height: 0;
        padding-block: 32px 28px;
    }

    .brix-hero-copy {
        max-width: none;
        text-align: center;
    }

    .brix-hero-copy > p:not(.brix-tagline) {
        margin-inline: auto;
    }

    .brix-hero-image {
        grid-row: 2;
        position: static;
        justify-self: center;
        width: min(74%, 320px);
        height: 230px;
        margin-top: 22px;
    }

    .brix-model {
        padding-block: 36px 44px;
    }

    .brix-stage {
        height: clamp(285px, 92vw, 400px);
    }

    .brix-controls {
        gap: 8px 14px;
    }

    .brix-modes {
        flex-basis: 100%;
    }
}
