/* Technology overview — mobile-first, BEM */

.technology {
    position: relative;
    background-color: #131315;
    padding: 4rem var(--container-padding) 3.5rem;
    overflow: hidden;
}

.technology::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 36rem);
    height: 28rem;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.technology__inner {
    position: relative;
    z-index: 1;
    max-width: var(--container-max);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.5rem;
}

.technology__diagram {
    position: relative;
    width: 100%;
    max-width: none;
    min-height: 22rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.technology__graphic {
    position: relative;
    z-index: 1;
    width: min(100%, 16rem);
    aspect-ratio: 860 / 1105;
}

.technology__graphic img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.technology__highlights {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.technology__highlight {
    position: absolute;
    display: block;
    width: max-content;
    max-width: calc(50% - 9rem);
}

.technology__pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.625rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 3.125rem;
    background:
        linear-gradient(#1a1a1a, #1a1a1a) padding-box,
        linear-gradient(180deg, #ffffff 0%, #454545 100%) border-box;
    background-clip: padding-box, border-box;
}

.technology__pill-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-text);
}

.technology__pill-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.technology__pill-label {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--color-text);
    white-space: normal;
}

.technology__highlight-frame {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
}

.technology__highlight--1 {
    top: 18%;
    left: 4%;
}

.technology__highlight--2 {
    top: 6%;
    right: 4%;
}

.technology__highlight--3 {
    bottom: 4%;
    left: 4%;
}

.technology__highlight--4 {
    top: 58%;
    right: 4%;
    bottom: auto;
}

.technology__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 40rem;
    text-align: center;
}

.technology__title {
    margin: 0;
    font-family: var(--font-family);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.03125rem;
    color: var(--color-text);
}

.technology__description {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--color-white);
}

.technology__scroll {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.technology__scroll:hover,
.technology__scroll:focus-visible {
    opacity: 1;
    color: #ffffff;
}

.technology__scroll:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
    border-radius: 0.25rem;
}

.technology__scroll svg {
    display: block;
    width: 1.75rem;
    height: 1.75rem;
    animation: technology-scroll-bounce 1.6s ease-in-out infinite;
}

@keyframes technology-scroll-bounce {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.55;
    }

    50% {
        transform: translateY(0.5rem);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .technology__scroll svg {
        animation: none;
        opacity: 0.7;
    }
}

/* Tablet */
@media (min-width: 48rem) {
    .technology {
        padding: 5rem var(--container-padding) 4rem;
    }

    .technology__inner {
        gap: 3.5rem;
    }

    .technology__diagram {
        min-height: 28rem;
    }

    .technology__graphic {
        width: min(58%, 18rem);
    }

    .technology__highlight {
        max-width: calc(50% - 10.5rem);
    }

    .technology__pill {
        padding: 0.6875rem 1.375rem;
        gap: 0.625rem;
    }

    .technology__pill-label {
        font-size: 0.875rem;
    }

    .technology__highlight--1 {
        top: 20%;
        left: 6%;
    }

    .technology__highlight--2 {
        top: 8%;
        right: 6%;
    }

    .technology__highlight--3 {
        bottom: 2%;
        left: 6%;
    }

    .technology__highlight--4 {
        top: 60%;
        right: 6%;
        bottom: auto;
    }

    .technology__title {
        font-size: 2.25rem;
    }

    .technology__description {
        font-size: 1rem;
    }
}

@media (min-width: 48rem) {
    .technology:not(.technology--ready) .technology__highlight {
        opacity: 0;
    }

    .technology--animating .technology__highlight {
        will-change: transform, opacity;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

/* Desktop */
@media (min-width: 64rem) {
    .technology {
        padding: 6.25rem var(--container-padding) 4.5rem;
    }

    .technology__inner {
        gap: 2.5rem;
    }

    .technology__diagram {
        min-height: 32rem;
        margin-bottom: 3.75rem; /* with inner gap → 100px to content */
    }

    .technology__graphic {
        width: 25rem;
    }

    .technology__highlight {
        max-width: calc(50% - 12rem);
    }

    .technology__pill-label {
        font-size: 0.9375rem;
    }

    .technology__highlight--1 {
        top: 22%;
        left: 8%;
    }

    .technology__highlight--2 {
        top: 8%;
        right: 8%;
    }

    .technology__highlight--3 {
        bottom: 0;
        left: 8%;
    }

    .technology__highlight--4 {
        top: 62%;
        right: 8%;
        bottom: auto;
    }

    .technology__title {
        font-size: 2.5rem;
        letter-spacing: -0.05rem;
    }

    .technology__description {
        font-size: 1.0625rem;
    }
}

/* Mobile */
@media (max-width: 47.99rem) {
    .technology__diagram {
        flex-direction: column;
        min-height: auto;
        gap: 3.5rem;
        padding-top: 0.5rem;
    }

    .technology__highlights {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        width: 100%;
        order: 2;
    }

    .technology__highlight {
        position: static;
        display: block;
        width: 100%;
        max-width: none;
    }

    .technology__pill {
        width: 100%;
        justify-content: flex-start;
    }

    .technology__pill-label {
        white-space: normal;
    }

    .technology__graphic {
        order: 1;
        width: min(100%, 14rem);
    }

    .technology__content {
        order: 3;
    }

    .technology__scroll {
        order: 4;
    }
}
