html {
    scrollbar-gutter: stable;
    scroll-padding-top: 245px;
}

.to-main {
    font-size: 1.5em;
    border-radius: 42.5px;
}

.from-tb {
    display: block;
}

.non-from-tb {
    display: none;
}

h1 {
    width: 292px;
    height: 56px;
    margin: 28px 25px;
}

header {
    &:has(#hmbg-btn) {
        height: 245px;
        pointer-events: none;

        &::before {
            clip-path: shape(from 45.21% 57.35%,
                    curve to 0% 100% with 22.41% 29.43% / 5.57% 74.15%,
                    vline to 0%,
                    hline to 100%,
                    vline to 73.47%,
                    curve to 45.21% 57.35% with 91.23% 79.73% / 68% 85.27%,
                    close);
        }

        nav {
            font-size: 24px;
            width: 545px;
            height: 545px;

            ul {
                margin-top: 82px;
                gap: 50px;
            }
        }

        a {
            pointer-events: auto;
        }
    }
}

#hmbg-btn {
    height: 101px;

    &.open {
        span {
            &:first-of-type {
                translate: 0 26.0869565217px;
            }

            &:last-of-type {
                translate: 0 -26.0869565217px;
            }
        }
    }
}

aside {
    pointer-events: none;

    &:not(.from-tb) {
        top: calc(100svh - 140px);
        z-index: 6;
        height: 140px;
        margin-bottom: -140px;
        background-color: transparent;

        a {
            pointer-events: auto;

            &:first-of-type,
            &:nth-of-type(2) {
                font-size: 24px;
                writing-mode: vertical-rl;
                position: fixed;
                top: anchor(top);
                left: anchor(left);
                width: anchor-size(100%);
                height: anchor-size(100%);
                border-radius: 20px 0 0 20px;
            }

            &:first-of-type {
                position-anchor: --aside-fix-top;
            }

            &:nth-of-type(2) {
                position-anchor: --aside-fix-bottom;
            }
        }
    }

    &.from-tb {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 11;
        height: 100svh;
        width: 77px;
        padding-top: 20svh;

        div {
            width: 100%;
            height: 150px;

            &:first-of-type {
                anchor-name: --aside-fix-top;
            }

            &:last-of-type {
                margin-top: 30px;
                anchor-name: --aside-fix-bottom;
            }
        }
    }
}

#hero {
    position: relative;
    margin-top: calc(-245px + 115px);

    img {
        height: calc(80svh - 115px - 100px);
    }

    strong {
        font-size: 32px;
        -webkit-text-stroke: #fff 2px;
        paint-order: stroke;
        position: relative;
        bottom: 200px;
        z-index: 1;
        justify-content: flex-end;
        width: 100%;
        margin-right: 0;

        &::after {
            height: 245px;
            bottom: calc(99% - 200px);
            z-index: -1;
        }

        span {
            display: contents;
        }
    }
}

#catch {
    padding-right: 0;
    padding-left: 0;

    p {
        width: 554px;
        margin-right: auto;
        margin-left: auto;
        font-size: 24px;
    }

    .img-container {
        img {
            &:first-of-type {
                width: 450px;
            }

            &:last-of-type {
                bottom: 100px;
                width: 313px;
                margin-left: 258px;
            }
        }
    }

    .carousel {
        gap: 36px;
        width: 100%;
        height: 200px;

        &::scroll-marker-group {
            height: 82px;
        }

        .slide {
            width: 429px;

            &::scroll-marker {
                height: 20px;
            }
        }
    }

    .pagination {
        height: 82px;

        button {
            height: 20px;
        }
    }
}

#info {
    .eye-catch {
        align-items: flex-start;
        height: 409px;
        margin-bottom: 220px;

        h2 {
            font-size: 16px;
            line-height: 2em;
            text-align: start;
            anchor-name: --info-h2;
            width: 400px;
            margin: 220px 0 0;
        }
    }

    ul {
        position-anchor: --info-h2;
        position: fixed;
        top: anchor(bottom);
        left: anchor(left);
        margin-top: 10px;
        anchor-name: --info-ul;

        li {
            margin: 0;
        }
    }

    >img {
        position-anchor: --info-ul;
        position: fixed;
        position-area: right;
        width: 87px;
        margin-left: 7px;
    }
}

#stable-market {
    h3 {
        font-size: 20px;
        margin-bottom: 130px;
    }

    h4 {
        font-size: 24px;
        color: #fff;
        width: fit-content;
        padding: 7px 30px;
        margin: 0 auto;
        background-color: var(--airconmart-blue);
        translate: 0 50%;
    }

    ol {
        font-size: 24px;
        width: 662px;
        padding-top: 1.5em;
        margin-bottom: 100px;
        border: 3px solid var(--airconmart-blue);
        border-radius: 30px;

        li {
            height: 70px;
            border: none;

            &::before {
                font-size: 40px;
                padding-left: 35px;
            }

            &.active {
                background-color: transparent;
            }
        }
    }

    #stable-carousel {
        anchor-name: --carousel;
        width: 607px;
        padding: unset;

        &::scroll-button(right),
        &::scroll-button(left) {
            content: "";
            position-anchor: --carousel;
            position: absolute;
            top: calc(anchor(top) + 136px);
            display: block;
            aspect-ratio: 1;
            width: 30px;
            background-color: var(--airconmart-l-blue);
            border: none;
        }

        &::scroll-button(right) {
            right: calc(anchor(right) - 50px);
            clip-path: shape(from 0 0,
                    line to 100% 50%,
                    line to 0 100%,
                    close);
        }

        &::scroll-button(left) {
            left: calc(anchor(left) - 50px);
            clip-path: shape(from 100% 0,
                    line to 0 50%,
                    line to 100% 100%,
                    close);
        }

        &::scroll-button(right):not(:disabled):active,
        &::scroll-button(left):not(:disabled):active {
            opacity: .8;
        }

        &::scroll-button(right):disabled,
        &::scroll-button(left):disabled {
            background-color: gray;
        }

        .slide {
            width: 100%;
        }

        p {
            border: none;
        }
    }

    p {
        width: 607px;
        margin: 23px 0 80px;
    }
}

#feature {
    .eye-catch {
        height: 500px;
        display: flex;
        align-items: flex-end;

        &::before {
            top: 23px;
            width: 639px;
        }

        +.img-container {
            width: 624px;
            height: 300px;
            margin: 112px 0 126px auto;
        }

        h2 {
            position: absolute;
            top: 0;
            right: 200px;
        }

        p {
            font-size: 24px;
            text-align: start;
        }
    }
}

#amazing {
    h3 {
        font-size: 20px;

        &::before {
            left: -30px;
        }

        &::after {
            right: -30px;
        }
    }

    ul {
        font-size: 18px;
        display: flex;
        flex-wrap: wrap;
        gap: 23px 57px;
        width: 677px;

        li {
            width: 310px;
            margin: 0;
        }
    }
}

#vacuuming {
    &::before {
        height: 100%;
    }

    h3 {
        font-size: 24px;
    }

    p {
        &:first-of-type {
            font-size: 36px;
            top: 77px;
            left: 70px;
        }

        &:nth-of-type(2) {
            font-size: 20px;
            width: 487px;
            margin-top: 60px;
            margin-right: 77px;
        }
    }

    .img-container {
        &:first-of-type {
            width: 535px;
        }

        &:nth-of-type(2) {
            bottom: unset;
            width: 391px;
            margin-left: 73px;

            &::before {
                width: 238px;
            }
        }

        &:nth-of-type(3) {
            width: 480px;
        }
    }
}

#cant-inherit {
    h3 {
        font-size: 30px;

        span {
            font-size: 50px;
        }
    }

    ul {
        font-size: 24px;
        display: flex;
        flex-wrap: wrap;
        gap: 40px 25px;
        width: 685px;
        margin: 0 auto;

        li {
            width: 330px;
            margin: 0;
        }
    }
}

#check-point {
    +.line {
        &::before {
            left: -40px;
        }

        &::after {
            right: -40px;
        }

        .blue {
            font-size: 32px;
        }
    }

    h3 {
        font-size: 36px;
        width: 712px;
    }

    p {
        width: 712px;
        padding-right: 50px;
        padding-left: 80px;
    }
}

#reality {
    text-align: center;
    background-color: #fff;

    &::before {
        content: "";
        position: absolute;
        inset: 190px 0 0;
        display: block;
        background-color: var(--airconmart-blue);
    }

    article {
        display: inline-block;
        height: 615px;
        vertical-align: middle;

        &:first-of-type {
            margin: 0 56px 116px 0;

            img {
                width: 180px;
                height: 197px;
            }
        }

        &:last-of-type {
            margin-bottom: 116px;

            img {
                width: 292px;
                height: 215px;
            }
        }

        h3 {
            height: 90px;
        }

        ul {
            line-height: 3em;
            text-align: left;
        }
    }

    .carousel {
        position: relative;
        gap: 36px;
        width: 100%;
        height: 260px;

        &::scroll-marker-group {
            gap: 32px;
            height: 100px;
        }

        .slide {
            width: 390px;

            &::scroll-marker {
                height: 20px;
            }
        }
    }

    .pagination {
        gap: 32px;
        height: 100px;

        button {
            height: 20px;
        }
    }
}

#craftsman-feedback {
    width: 720px;
    margin-bottom: 200px;

    h3 {
        font-size: 34px;
        padding: 26px 62px;
    }

    article {
        &:nth-of-type(even) {
            .feedback {
                line-height: 2.5em;
                padding: 80px 40px 0 80px;
            }

            .introduce {
                padding: 0 55px 23px 245px;

                img {
                    top: -100px;
                    left: 8px;
                }
            }
        }
    }

    .feedback {
        font-size: 24px;
        line-height: 2.5em;
        width: 591px;
        height: 273px;
        padding: 60px 20px 0 95px;
    }

    .introduce {
        width: 100%;
        padding: 0 230px 30px 50px;
        margin: 132px 0 190px;

        h4 {
            font-size: 30px;
        }

        img {
            top: -100px;
            right: 8px;
            width: 200px;
            height: 200px;
        }
    }
}

#about {
    h2 {
        margin-right: 90px;
    }

    .eye-catch {
        height: 336px;
        background-size: 150%;
        background-position: 80% 20%;
    }
}

#merit {
    display: flex;
    flex-wrap: wrap;
    gap: 95px 30px;
    width: 582px;
    padding: 143px 0 200px;
    margin: 0 auto;

    h3 {
        font-size: 34px;
        width: 100%;
        margin-bottom: 97px;
    }

    dl {
        width: 276px;
        margin: 0;
        border-radius: 18px;

        dt {
            font-size: 30px;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 68px;
        }

        dd {
            font-size: 24px;
            font-weight: 600;
            line-height: 2em;
            text-align: center;
            height: 173px;
        }
    }
}

#dont-worry {
    &::after {
        bottom: -159px;
        width: 577px;
        height: 159px;
    }

    >div {
        font-size: 20px;
        gap: 160px;

        img {
            width: 110px;
            height: 200px;
        }
    }

    p {
        width: fit-content;
        height: 70px;
        padding: 0 82px 0 41px;
        border-width: 2px;
        border-radius: 50px;

        &:last-of-type {
            width: fit-content;
            padding-right: 123px;
        }

        &:has(span) {
            left: 87px;
            display: flex;
            align-items: center;
            width: fit-content;

            &::before {
                width: 26px;
                right: -28px;
                bottom: 26px;
                border-width: 2px;
            }

            &::after {
                width: 16px;
                top: 31px;
                right: -49px;
                border-width: 2px;
            }
        }

        span {
            display: inline;
        }
    }

    h3 {
        font-size: 36px;
        margin: 140px 0 80px;
    }

    ul {
        font-size: 24px;
        width: 682px;

        li {
            height: 57px;
            margin-bottom: 23px;
            box-shadow: 7px 7px var(--airconmart-blue);
        }
    }
}

#course {
    &::after {
        height: 245px;
    }

    h2 {
        font-size: 32px;
        height: 230px;
    }

    .btn-container {
        display: flex;
        justify-content: space-between;
        width: 700px;
        margin: 0 auto 70px;

        div {
            anchor-name: var(--anchor);
            width: 200px;
            height: 90px;
        }
    }

    button {
        font-size: 16px;
        position-anchor: var(--anchor);
        position: absolute;
        top: anchor(top);
        left: anchor(left);
        gap: 20px;
        width: anchor-size(width);
        height: anchor-size(height);
        border-radius: 69px;
        padding-right: 20px;
        padding-left: 34px;
        margin: 0;

        &.open {
            +article {
                margin-block: 0;
            }
        }

        span {
            span {
                display: block;
                margin: 0;
            }
        }
    }

    .course-accordion {
        transition-property: height;

        &:nth-of-type(2),
        &:last-of-type {
            h3 {
                text-align: center;

                span {
                    &:first-of-type {
                        display: inline;
                    }
                }
            }
        }

        h3 {
            font-size: 32px;
            width: 740px;

            span {
                &:first-of-type {
                    font-size: 40px;
                }

                &:last-of-type {
                    font-size: 20px;
                }
            }
        }

        p {
            width: 623px;
        }

        >p {
            font-size: 24px;
            margin-bottom: 48px;
        }

        >ul {
            font-size: 24px;
            width: 718px;

            li {
                padding: 22px 17px;
                margin-block: 28px;
                border-radius: 20px;
            }
        }

        .img-container {
            width: 750px;
            height: 257px;
        }

        >div {
            &:first-of-type {
                font-size: 20px;
                margin-left: 0;

                li {
                    margin-bottom: .25em;
                }
            }

            &:nth-of-type(3) {
                h4 {
                    font-size: 40px;
                    margin-block: 90px 50px;
                }

                ul {
                    margin-bottom: 173px;
                }

                li {
                    font-size: 24px;
                }
            }

            &:last-of-type {
                padding-bottom: 50px;

                h4 {
                    font-size: 32px;
                    width: 100%;
                    height: 80px;
                }

                p {
                    span {
                        text-decoration-thickness: 16px;
                    }
                }

                small {
                    width: 623px;
                    line-height: 2em;
                }
            }
        }
    }
}

#distant {
    h3 {
        font-size: 24px;
        padding-right: 77px;

        span {
            font-size: 40px;
        }
    }

    strong {
        font-size: 32px;
        padding: 43px 102px 30px 90px;

        &::before {
            bottom: -25px;
            width: calc(100% + 25px);
        }
    }

    p {
        &:nth-of-type(1) {
            position: relative;
            anchor-name: --distant-p;
            text-align: left;
            width: fit-content;
            margin: 190px 40px 160px auto;

            &::before {
                content: "";
                position: absolute;
                top: -140px;
                left: -250px;
                display: block;
                width: 60px;
                height: 50px;
                background-image: url("../assets/imgs/点線.svg");
                background-position: left bottom;
                background-repeat: no-repeat;
                rotate: 90deg;
                scale: -1 1;
                filter: hue-rotate(-180deg);
            }

            &::after {
                content: "";
                position: absolute;
                bottom: -127px;
                left: -30px;
                display: block;
                width: 157px;
                height: 127px;
                background-image: url("../assets/imgs/点線.svg");
                background-position: left bottom;
                background-repeat: no-repeat;
                scale: -1 1;
                filter: hue-rotate(-180deg);
            }

            span {
                font-size: 26px;
            }
        }
    }

    div {
        img {
            border-radius: 30px;
            align-self: anchor-center;

            &:first-of-type,
            &:last-of-type {
                position: absolute;
                width: 600px;
            }

            &:first-of-type {
                position-anchor: --distant-p;
                right: anchor(left);
                margin-right: 50px;
                transform-origin: right bottom;
            }

            &:last-of-type {
                position-anchor: --distant-ul;
                position: absolute;
                left: anchor(right);
                margin-left: 50px;
                transform-origin: left bottom;
            }
        }
    }

    h4 {
        font-size: 40px;
        margin-left: 55px;
    }

    ul {
        font-size: 20px;

        &:first-of-type {
            position: relative;
            anchor-name: --distant-ul;
            margin-left: 77px;

            &::after {
                content: "";
                position: absolute;
                right: -160px;
                bottom: -160px;
                display: block;
                width: 135px;
                height: 135px;
                background-image: url("../assets/imgs/点線.svg");
                background-position: left bottom;
                background-repeat: no-repeat;
                rotate: 90deg;
                scale: -1 1;
                filter: hue-rotate(-180deg);
            }
        }
    }

    >img {
        width: 670px;
        margin: 170px auto 100px;
    }
}

#management {
    h3 {
        font-size: 20px;
        margin-left: 60px;
        border-left-width: 3px;

        .blue {
            font-size: 32px;
        }
    }

    .flex-box {
        display: flex;
        flex-direction: row-reverse;
    }

    article {
        display: flex;
        flex-direction: column;

        h4 {
            font-size: 32px;
            height: 60px;
        }

        p {
            margin-top: 48px;
        }

        img {
            order: -1;
            margin-bottom: 40px;
        }
    }

    >p {
        font-size: 20px;
        max-width: 1200px;
        margin: 0 auto;
    }
}

#support {
    h3 {
        font-size: 24px;
        height: 137px;
    }

    strong {
        font-size: 19px;

        .bigger {
            font-size: 23px;
        }
    }

    .flex-box {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
        margin: 0 auto;
    }

    .flex {
        color: #fff;
        flex-direction: column;
        width: 210px;
        height: 195px;
        margin: 0;
        border-radius: 18px;

        &:nth-of-type(3) {
            p {
                font-size: 20px;
            }
        }

        img {
            width: 101px;
            height: unset;
        }

        p {
            font-size: 24px;
            width: unset;
            height: 71px;

            span {
                font-size: 16px;
            }
        }
    }
}

#faq {
    h3 {
        font-size: 24px;
        height: 137px;
    }

    button,
    .faq-accordion {
        width: 600px;
    }

    button {
        font-size: 20px;
    }
}

@media (orientation: landscape) {
    #hero {
        height: calc(100svh - 115px - 100px);
    }
}