html {
    scroll-behavior: auto;
}

/* Hero section preview */

.hero-img-wrapper {
    overflow: hidden;
}

.preview-section {
    height: 100%;
    width: 100%;
    transform: translateX(10vw);
    opacity: 0;
    animation: fade-move-in 2s ease-in-out forwards;
}

/* Intro section */

.intro-section {
    padding-bottom: 10px;
}

.page-header {
    margin: 0 0 0.4em -0.1em;
}

.intro-paragraph.last {
    margin-top: 1em;
}

.main-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--FS10);
    margin: 2em 0;
}

.main-img-wrapper.come-in .main-img {
    transform: translate(0);
    opacity: 1;
}

.main-img {
    max-height: 700px;
    font-size: var(--FS10);
    filter: drop-shadow(0 0 0.5em var(--shadow-500));
}

/* Sensor Portfolio */

.portfolio-section {
    padding-top: 20px;
}

.section-header-container {
    font-size: var(--FS10);
    margin-bottom: 1.5em;
}

.section-header {
    position: relative;
    display: inline;
    line-height: 1;
    font-size: var(--FS3);
    color: var(--text-color);
    width: fit-content;
    padding-bottom: 0.1em;
}

.section-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80%;
    height: 2px;
    background-color: currentcolor;
    transition: all 0.3s ease;
}

.sensors-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 600px), 1fr));
    font-size: var(--FS11);
    gap: 2em;
    padding: 0 0 1em 0;
}

.sensor-card {
    display: flex;
    justify-content: center;
    height: 100%;
    padding: 2.5em;
    border-radius: 0.3em;
    box-shadow: 0 0 1em var(--shadow-100);
}

.sensor-container.come-in .sensor-card {
    opacity: 1;
    transform: scale(1);
}

.sensor-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
    max-width: 75%;
    padding-right: 3em;
}

.sensor-name {
    font-size: var(--FS8);
    font-weight: 600;
    margin-bottom: 0.3em;
}

.sensor-utility {
    font-size: var(--FS10);
    font-weight: 500;
    margin-bottom: 0.8em;
}

.sensor-text {
    margin-bottom: 1.2em;
}

.UI-container {
    display: flex;
}

.sensor-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    max-height: 15em;
    width: 30%;
}

.sensor-img {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 100%;
}

.new-sigil-container {
    position: absolute;
    right: -4%;
    top: -7%;
    width: 5em;
    height: auto;
    rotate: 5deg;
}

.sensor-img.no-mount {
    max-width: 75%;
    max-height: 85%;
}

/* Attribute section */

.sub-header-2 {
    margin-bottom: 1.5em;
}

/* Media Queries */

@media (prefers-reduced-motion: no-preference) {
    .preview-section {
        transform: translateX(10vw);
        opacity: 0;
        animation: fade-move-in 2s ease-in-out forwards;
    }

    .main-img {
        opacity: 0;
        transform: translate(10vw, 0);
        transition: opacity, transform ease;
        transition-duration: 1.2s, 1.5s;
    }

    .sensor-card {
        opacity: 0;
        transform-origin: top;
        transform: scale(0.6);
        transition: all 0.6s ease;
    }
}

@media (max-width: 1000px) {
    .slide {
        flex-direction: column;
        gap: 2rem;
    }

    .slide-text-container {
        width: 100%;
        height: auto;
    }

    .slide-sensor-text p {
        margin-bottom: 0.5em;
    }

    .slide-img-wrapper {
        width: 100%;
        padding: 0;
        height: fit-content;
        max-height: 300px;
    }

    .slider-UI-top {
        margin-bottom: 0.5em;
    }

    .intro-section {
        padding-bottom: 0;
    }

    .main-img {
        transform: none;
        opacity: 1;
        max-height: 100%;
    }
}

@media (max-width: 680px) {
    .page-header .nowrap {
        white-space: normal;
    }

    /* slider */
    .slide-img-wrapper {
        flex-grow: 1;
        max-height: 250px;
    }

    /* cards */
    .sensor-card {
        flex-direction: column;
    }

    .sensor-info {
        padding-right: 0;
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .sensor-text {
        margin-bottom: 0.7em;
    }

    .sensor-img-container {
        width: 100%;
        max-height: 170px;
    }
}

@media (max-width: 500px) {
    .slider-container {
        padding: 1em 0;
    }
}

@media (max-width: 450px) {
    .main-img-wrapper {
        display: none;
    }
}

@media (max-width: 350px) {
    .sensor-img {
        max-width: 95%;
    }
}
