* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    background: #050608;

    color: #f5f7fa;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    overflow-x: hidden;

    -webkit-font-smoothing: antialiased;

    text-rendering: optimizeLegibility;
}


a {
    color: inherit;

    text-decoration: none;
}


/* =====================================================
   NAVIGATION
===================================================== */

nav {
    width:
        min(
            1100px,
            calc(100% - 40px)
        );

    height: 70px;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    position: relative;

    z-index: 10;
}


.logo {
    display: flex;

    align-items: center;

    font-size: 17px;

    font-weight: 750;

    letter-spacing: -0.6px;
}


.logo-box {
    width: 30px;

    height: 30px;

    margin-right: 9px;

    display: grid;

    place-items: center;

    border-radius: 8px;

    background: #fff;

    color: #050608;

    font-size: 13px;

    font-weight: 900;
}


.logo-ai {
    color: #8f99ff;
}


.home-link {
    color: #858c98;

    font-size: 12px;

    font-weight: 700;

    transition:
        color 0.2s ease;
}


.home-link:hover {
    color: #c5caff;
}


/* =====================================================
   HERO
===================================================== */

.hero {
    min-height: 410px;

    display: flex;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding:
        65px 20px 70px;

    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(92, 105, 255, 0.16),
            transparent 43%
        );
}


.hero-content {
    width: 100%;

    max-width: 800px;
}


.eyebrow {
    margin-bottom: 18px;

    color: #8f99ff;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 2px;
}


.hero h1 {
    font-size:
        clamp(
            52px,
            8vw,
            86px
        );

    line-height: 0.95;

    letter-spacing: -5px;

    font-weight: 800;
}


.hero h1 span {
    display: block;

    background:
        linear-gradient(
            110deg,
            #ffffff,
            #a0aaff,
            #6878ff
        );

    -webkit-background-clip: text;

    background-clip: text;

    color: transparent;
}


.hero p {
    max-width: 620px;

    margin:
        25px auto 0;

    color: #858c98;

    font-size: 14px;

    line-height: 1.7;
}


/* =====================================================
   SEARCH
===================================================== */

.search-form {
    width:
        min(
            650px,
            100%
        );

    height: 60px;

    margin:
        30px auto 0;

    display: flex;

    align-items: center;

    padding: 5px;

    border:
        1px solid
        rgba(
            140,
            150,
            255,
            0.25
        );

    border-radius: 14px;

    background:
        rgba(
            255,
            255,
            255,
            0.045
        );

    box-shadow:
        0 0 35px
        rgba(
            80,
            90,
            255,
            0.07
        );

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.search-form:focus-within {
    border-color:
        rgba(
            140,
            150,
            255,
            0.55
        );

    box-shadow:
        0 0 40px
        rgba(
            80,
            90,
            255,
            0.12
        );
}


.search-form input {
    flex: 1;

    min-width: 0;

    height: 100%;

    padding:
        0 17px;

    border: 0;

    outline: 0;

    background: transparent;

    color: #fff;

    font-family: inherit;

    font-size: 14px;
}


.search-form input::placeholder {
    color: #666d78;
}


.search-form button {
    width: 49px;

    height: 49px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    border: 0;

    border-radius: 10px;

    background: #fff;

    color: #050608;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}


.search-form button:hover {
    transform:
        translateY(-1px);

    background:
        #dfe3ff;
}


.search-form svg {
    width: 20px;

    height: 20px;

    fill: none;

    stroke: currentColor;

    stroke-width: 2;

    stroke-linecap: round;
}


.search-hint {
    margin-top: 12px;

    color: #555c67;

    font-size: 10px;
}


/* =====================================================
   MODELS SECTION
===================================================== */

.models-section {
    width:
        min(
            1100px,
            calc(100% - 40px)
        );

    margin: 0 auto;

    padding:
        20px 0 100px;
}


.results-header {
    display: flex;

    align-items: end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}


.results-header h2 {
    font-size:
        clamp(
            30px,
            5vw,
            44px
        );

    line-height: 1;

    letter-spacing: -2px;
}


.results-header p {
    margin-top: 8px;

    color: #666d78;

    font-size: 11px;
}


/* =====================================================
   CLEAR SEARCH
===================================================== */

.clear-search {
    padding: 0;

    border: 0;

    background: transparent;

    color: #8f99ff;

    font-family: inherit;

    font-size: 11px;

    font-weight: 700;

    text-decoration: underline;

    text-underline-offset: 4px;

    cursor: pointer;
}


.clear-search:hover {
    color: #c5caff;
}


/* =====================================================
   MODEL GRID
===================================================== */

.model-grid {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            1fr
        );

    gap: 14px;
}


/* =====================================================
   MODEL CARD
===================================================== */

.model-card {
    min-height: 245px;

    padding: 18px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.07
        );

    border-radius: 15px;

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.model-card:hover {
    border-color:
        rgba(
            140,
            150,
            255,
            0.35
        );

    background:
        rgba(
            140,
            150,
            255,
            0.06
        );

    transform:
        translateY(-2px);
}


.model-number {
    color: #555c67;

    font-size: 9px;

    font-weight: 700;
}


.model-card-content {
    margin-top: 30px;
}


.model-card h3 {
    font-size: 20px;

    letter-spacing: -0.6px;
}


.model-description {
    margin-top: 9px;

    color: #858c98;

    font-size: 11px;

    line-height: 1.65;
}


.model-link {
    display: inline-flex;

    align-items: center;

    gap: 6px;

    margin-top: 18px;

    color: #8f99ff;

    font-size: 10px;

    font-weight: 750;

    text-decoration: underline;

    text-underline-offset: 3px;
}


.model-link:hover {
    color: #c5caff;
}


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

.state-message {
    padding:
        60px 20px;

    text-align: center;

    color: #666d78;

    font-size: 12px;
}


.error-state {
    color: #ff8f9d;
}


[hidden] {
    display: none !important;
}


/* =====================================================
   FOOTER
===================================================== */

footer {
    width:
        min(
            1100px,
            calc(100% - 40px)
        );

    margin: auto;

    padding:
        25px 0 30px;

    border-top:
        1px solid
        rgba(
            255,
            255,
            255,
            0.06
        );

    display: flex;

    align-items: center;

    justify-content: space-between;

    color: #555c67;

    font-size: 10px;
}


.footer-logo {
    color: #858c98;

    font-weight: 700;
}


.footer-logo span {
    color: #7f8aff;
}


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

@media (max-width: 850px) {

    .model-grid {
        grid-template-columns:
            repeat(
                2,
                1fr
            );
    }

}


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

@media (max-width: 550px) {

    nav {
        width:
            calc(
                100% - 24px
            );

        height: 60px;
    }


    .hero {
        min-height: 380px;

        padding:
            50px 16px 55px;
    }


    .hero h1 {
        letter-spacing: -3px;
    }


    .hero p {
        font-size: 13px;
    }


    .search-form {
        height: 57px;

        border-radius: 13px;
    }


    .search-form button {
        width: 47px;

        height: 47px;
    }


    .models-section {
        width:
            calc(
                100% - 24px
            );

        padding-bottom: 70px;
    }


    .results-header {
        align-items: center;
    }


    .model-grid {
        grid-template-columns: 1fr;
    }


    .model-card {
        min-height: 220px;
    }


    footer {
        width:
            calc(
                100% - 24px
            );

        flex-direction: column;

        gap: 10px;

        text-align: center;
    }

}
