.brand-feature {
    background-color: #e6e6ea;
    padding: 200px 0;
}

/* Note: top padding already 200px */

.brand-feature__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 45px;
    background-color: #000;
    box-sizing: border-box;
}

.brand-feature__header {
    display: flex;
    padding-bottom: 30px;
    align-items: stretch;
    position: relative;
}

.brand-feature__header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--brand-color, #FFD204);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s ease-out 0.4s;
}

.brand-feature__header.animate::after {
    transform: scaleX(1);
}

.brand-feature__box {
    flex-shrink: 0;
    padding-right: 30px;
    margin-right: 0;
    border-right: none;
}

.brand-feature__intro {
    flex: 1;
    color: inherit;
    position: relative;
    padding-left: 41px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-feature__intro::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 330px;
    background-color: var(--brand-color, #FFD204);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1.5s ease-out 0.4s;
}

.brand-feature__intro.animate::before {
    transform: scaleY(1);
}

.brand-feature__title {
    font-family: 'IBM Plex Sans JP', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 30px;
    line-height: 39px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease-out 0.7s, transform 0.5s ease-out 0.7s;
}

.brand-feature__intro.animate .brand-feature__title {
    opacity: 1;
    transform: translateX(0);
}

.brand-feature__title-mobile {
    display: none;
}

.brand-feature__description {
    font-family: 'IBM Plex Sans JP', sans-serif;
    font-size: 15px;
    line-height: 33px;
    font-weight: 400;
    margin: 0;
    color: inherit;
    opacity: 0;
    text-align: left;
    text-wrap: wrap;
    transform: translateX(-20px);
    transition: opacity 0.5s ease-out 0.9s, transform 0.5s ease-out 0.9s;
}

.brand-feature__intro.animate .brand-feature__description {
    opacity: 1;
    transform: translateX(0);
}

.brand-feature__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    container-type: inline-size;
    overflow: hidden;
}

.brand-feature__item {
    display: flex;
    flex-direction: column;
    padding: 30px 0;
    width: 100%;
    position: relative;
}

.brand-feature__item:nth-child(3n+1)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 1px;
    background-color: var(--brand-color, #FFD204);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s ease-out 0.4s;
}

.brand-feature__item:nth-child(3n+1).animate::after {
    transform: scaleX(1);
}

.brand-feature__item-content {
    height: 100%;
}

.brand-feature__item:nth-child(3n+1) .brand-feature__item-content {
    padding-right: 30px;
}

.brand-feature__item:nth-child(3n+2) .brand-feature__item-content {
    padding-left: 30px;
    padding-right: 30px;
}

.brand-feature__item:nth-child(3n+2)::before,
.brand-feature__item:nth-child(3n+2)::after {
    content: '';
    position: absolute;
    top: 30px;
    bottom: 30px;
    width: 1px;
    background-color: var(--brand-color, #FFD204);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1.5s ease-out 0.4s;
}

.brand-feature__item:nth-child(3n+2)::before {
    left: 0;
}

.brand-feature__item:nth-child(3n+2)::after {
    right: 0;
}

.brand-feature__item:nth-child(3n+2).animate::before,
.brand-feature__item:nth-child(3n+2).animate::after {
    transform: scaleY(1);
}

.brand-feature__item:nth-child(3n+3) .brand-feature__item-content {
    padding-left: 30px;
}

.brand-feature__image {
    width: 330px;
    height: 330px;
    overflow: hidden;
}

.brand-feature__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.15);
    transition: transform 1.5s ease-out;
}

.brand-feature__item.animate .brand-feature__image img {
    transform: scale(1);
}

.brand-feature__item-title {
    font-family: 'IBM Plex Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: inherit;
    margin: 45px 0 20px;
    line-height: 33px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease-out 0.7s, transform 0.5s ease-out 0.7s;
}

.brand-feature__item.animate .brand-feature__item-title {
    opacity: 1;
    transform: translateX(0);
}

.brand-feature__item-text {
    font-family: 'IBM Plex Sans JP', sans-serif;
    font-size: 13px;
    line-height: 30px;
    font-weight: 400;
    color: inherit;
    margin: 0;
    text-align: justify;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease-out 0.9s, transform 0.5s ease-out 0.9s;
}

.brand-feature__item.animate .brand-feature__item-text {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 1025px) and (min-width: 768px) {
    .brand-feature {
        padding: 0;
    }

    .brand-feature__container {
        --bf-gap: clamp(15px, 2.5vw, 30px);
        max-width: none;
        padding: 45px 30px;
    }

    .brand-feature__header {
        padding-bottom: 25px;
    }

    .brand-feature__box {
        flex: 0 0 calc((100% - 4 * var(--bf-gap)) / 3);
        box-sizing: content-box;
        padding-right: var(--bf-gap);
        margin-right: 0;
    }

    .brand-feature__box .brand-box {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
    }

    .brand-feature__intro {
        padding-left: 26px;
    }

    .brand-feature__intro::before {
        height: 100% !important;
    }

    .brand-feature__title {
        font-size: 18px;
        line-height: 32px;
        font-weight: 700;
        margin-bottom: 20px;
    }

    .brand-feature__description {
        font-size: 14px;
        line-height: 28px;
        font-weight: 500;
        word-break: break-all;
        text-wrap: wrap;
    }

    .brand-feature__grid {
        grid-template-columns:
            calc((100% - 4 * var(--bf-gap)) / 3 + var(--bf-gap))
            calc((100% - 4 * var(--bf-gap)) / 3 + 2 * var(--bf-gap))
            calc((100% - 4 * var(--bf-gap)) / 3 + var(--bf-gap));
    }

    .brand-feature__item {
        padding: 25px 0;
    }

    .brand-feature__item:nth-child(3n+2)::before,
    .brand-feature__item:nth-child(3n+2)::after {
        top: 25px;
        bottom: 25px;
    }

    .brand-feature__item:nth-child(3n+1) .brand-feature__item-content {
        padding-right: var(--bf-gap);
    }

    .brand-feature__item:nth-child(3n+2) .brand-feature__item-content {
        padding-left: var(--bf-gap);
        padding-right: var(--bf-gap);
    }

    .brand-feature__item:nth-child(3n+3) .brand-feature__item-content {
        padding-left: var(--bf-gap);
    }

    .brand-feature__image {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        margin: 0;
    }

    .brand-feature__item-title {
        font-size: 15px;
        font-weight: 700;
        line-height: clamp(24px, 3vw, 33px);
        margin: clamp(25px, 3.5vw, 45px) 0 clamp(12px, 1.8vw, 20px);
        word-break: break-all;
        text-wrap: wrap;
    }

    .brand-feature__item-text {
        font-size: 13px;
        font-weight: 400;
        line-height: clamp(22px, 2.8vw, 30px);
        word-break: break-all;
        text-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .brand-feature {
        padding: 100px 1rem 50px;
    }

    .brand-feature .brand-box__text {
        font-size: 18px;
        font-weight: 800;
    }

    .brand-feature__title-mobile {
        display: flex;
        text-wrap: wrap;
        text-align: left;
        font-size: 16px;
        font-weight: 600;
        line-height: 27px;
        color: #ffffff;
        flex: 1;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 1s ease-out 0.7s, transform 1s ease-out 0.7s;
    }

    .brand-feature__box.animate .brand-feature__title-mobile {
        opacity: 1;
        transform: translateY(0);
    }

    .brand-feature__container {
        padding: 52px 30px;
    }

    .brand-feature__header {
        flex-direction: column;
        padding-bottom: 30px;
        margin-bottom: 30px;
    }

    .brand-feature__box {
        display: flex;
        align-items: center;
        padding-right: 0;
        margin-right: 0;
        margin-bottom: 30px;
        border-right: none;
        gap: 20px;
    }

    .brand-feature__intro {
        padding-left: 22px;
        position: relative;
    }

    .brand-feature__intro::before {
        display: block;
        width: 9px;
        height: 0;
        top: 0;
        left: 0;
        transition: height 2s ease-out 0.4s;
    }

    .brand-feature__intro.animate::before {
        height: 100%;
    }

    .brand-feature__title {
        display: none;
    }

    .brand-feature__description {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 1s ease-out 0.9s, transform 1s ease-out 0.9s;
    }

    .brand-feature__item-title {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 1s ease-out 0.7s, transform 1s ease-out 0.7s;
    }

    .brand-feature__intro.animate .brand-feature__description {
        opacity: 1;
        transform: translateY(0);
    }

    .brand-feature__item.animate .brand-feature__item-title {
        opacity: 1;
        transform: translateY(0);
    }

    .brand-feature__description {
        font-size: 13px;
        line-height: 24px;
        font-weight: 450;
        word-break: break-all;
        text-wrap: wrap;
    }

    .brand-feature__item-text {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 1s ease-out 0.9s, transform 1s ease-out 0.9s;
    }

    .brand-feature__item.animate .brand-feature__item-text {
        opacity: 1;
        transform: translateY(0);
    }

    .brand-feature__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .brand-feature__item {
        padding: 0;
        padding-bottom: 30px;
        background-image: linear-gradient(var(--brand-color, #FFD204), var(--brand-color, #FFD204));
        background-size: 0% 1px;
        background-position: bottom left;
        background-repeat: no-repeat;
        transition: background-size 1.5s ease-out 0.4s;
    }

    .brand-feature__item.animate {
        background-size: 100% 1px;
    }

    .brand-feature__item:nth-child(3n+1)::after {
        display: none;
    }

    .brand-feature__item:last-child {
        padding-bottom: 30px;
    }

    .brand-feature__item:nth-child(3n+1) .brand-feature__item-content,
    .brand-feature__item:nth-child(3n+2) .brand-feature__item-content,
    .brand-feature__item:nth-child(3n+3) .brand-feature__item-content {
        padding: 0;
        border: none;
    }

    .brand-feature__item:nth-child(3n+2)::before,
    .brand-feature__item:nth-child(3n+2)::after {
        display: none;
    }

    .brand-feature__image {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
        max-width: 100%;
    }

    .brand-feature__item-text-wrap {
        position: relative;
        padding-left: 22px;
    }

    .brand-feature__item-text-wrap::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 9px;
        height: 0;
        background-color: var(--brand-color, #FFD204);
        transition: height 2s ease-out 0.4s;
    }

    .brand-feature__item.animate .brand-feature__item-text-wrap::before {
        height: 100%;
    }

    .brand-feature__item-title {
        font-size: 15px;
        font-weight: 600;
        line-height: 27px;
        margin: 20px 0;
        word-break: break-all;
        text-wrap: wrap;
    }

    .brand-feature__item-text {
        font-size: 13px;
        line-height: 24px;
        font-weight: 400;
        word-break: break-all;
        text-wrap: wrap;
    }
}
