/* ローディング */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffcc00;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease, visibility 1s ease;
}

#loading.fadeout {
    opacity: 0;
    visibility: hidden;
}

#loading img {
    width: 150px;
    height: auto;
    border: 2px solid #ededed;
}

/* フェードアウト用 */
#loading.fadeout {
    opacity: 0;
    visibility: hidden;
}

#topsection,
#goodssection {
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-content {
    text-align: center;
    line-height: 3;
}

.title-sp-only {
    display: none;
}

@media (max-width: 764px) {
    .title-sp-only {
        display: inline;
        /* 764px以下でのみ改行させる */
    }
}

/* h1 フェード用 */
h1.hidden {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 5s ease, transform 5s ease;
}

h1.show {
    opacity: 1;
    transform: translateY(0);
}

/* scroll フェード用 */
.scroll {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    /* 中央寄せ */
    text-align: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 4s ease, transform 4s ease;
    color: #60605f;
    white-space: nowrap;
}

/* h1 フェード後に表示 */
.scroll.show {
    opacity: 1;
}

/* scroll 縦線アニメーション */
.scroll::after {
    content: '';
    position: absolute;
    top: 90px;
    left: 50%;
    width: 1px;
    height: 60px;
    background-color: #60605f;
    opacity: 0;
    transition: opacity 4s ease, transform 4s ease;
}

/* .scroll.show がついたら縦線も表示 */
.scroll.show::after {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
    animation: scroll 1.8s infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(-50%) scale(1, 0);
        transform-origin: 0 0;
    }

    50% {
        transform: translateX(-50%) scale(1, 1);
        transform-origin: 0 0;
    }

    50.1% {
        transform: translateX(-50%) scale(1, 1);
        transform-origin: 0 100%;
    }

    100% {
        transform: translateX(-50%) scale(1, 0);
        transform-origin: 0 100%;
    }
}


@media (max-width: 764px) {
    #loading img {
        width: 130px;
    }

    .scroll {
        bottom: 100px;
        font-size: 13px;
    }

    .scroll::after {
        top: 130%;
    }
}

@media (max-width: 480px) {
    #loading img {
        width: 100px;
    }
}


/*チモシー入れトップの画像*/
.timothytop {
    position: absolute;
    width: 170px;
    height: auto;
    transform: rotate(70deg);
    left: -28px;
}

.yellowtop {
    bottom: 360px;
}

.bluetop {
    bottom: 180px;
}

.greentop {
    bottom: 0px;
}

@media screen and (max-width: 764px) {
    .timothytop {
        width: 130px;
        left: -22px;
    }

    .yellowtop {
        bottom: 290px;
    }

    .bluetop {
        bottom: 140px;
    }

    .greentop {
        bottom: 0px;
    }
}

@media screen and (max-width: 480px) {
    .timothytop {
        left: -20px;
        width: 100px;
    }

    .yellowtop {
        bottom: 220px;
    }

    .bluetop {
        bottom: 110px;
    }

    .greentop {
        bottom: 0px;
    }
}




/* ナビゲーションを右側に */
.swiper-vertical .swiper-pagination {
    left: auto;
    right: 20px;
    width: auto;
}

/* ドットの基本スタイル */
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ae9f8d;
    position: relative;
    transition: transform 0.3s ease;
}

/* 縦ナビのドット間隔を20pxに*/
.swiper-vertical .swiper-pagination {
    --swiper-pagination-bullet-vertical-gap: 20px;
}

/* アクティブなドット */
.swiper-pagination-bullet-active {
    transform: scale(1.3);
    background: #ae9f8d;
}

/* ナビゲーション文字*/
.swiper-pagination-bullet::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 100%;
    /*右に表示*/
    margin-right: 10px;
    color: #333;
    font-size: 13px;
    white-space: nowrap;
    top: -25%;
}

@media screen and (max-width: 1250px) {
    .swiper-pagination-bullet::after {
        display: none;
    }
}

#logo {
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 2;
    width: 110px;
}

/* ボタン配置 */
#btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #a09281;
    padding: 10px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    z-index: 2;
    /* スライドより前面に表示 */
}

#btn:hover {
    opacity: 0.7;
    transition: 0.5s;
}

@media screen and (max-width: 1250px) {
    #btn {
        right: 80px;
    }
}

@media screen and (max-width: 764px) {
    #logo {
        width: 90px;
    }
}

@media screen and (max-width: 480px) {
    #logo {
        width: 65px;
    }

    #btn {
        top: 13px;
        padding: 10px 15px;
        font-size: 12px;
    }
}

/*ハンバーガーメニュー*/
.hamburger-overlay {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1000;
}

.hamburger-overlay__line {
    position: absolute;
    left: 11px;
    width: 26px;
    height: 2px;
    background-color: #a09281;
    transition: all 0.6s;
}

.hamburger-overlay__line:nth-of-type(1) {
    top: 14px;
}

.hamburger-overlay__line:nth-of-type(2) {
    top: 23px;
}

.hamburger-overlay__line:nth-of-type(3) {
    top: 32px;
}

.hamburger-overlay.active .hamburger-overlay__line:nth-of-type(1) {
    transform: translateY(9px) rotate(-45deg);
}

.hamburger-overlay.active .hamburger-overlay__line:nth-of-type(2) {
    opacity: 0;
}

.hamburger-overlay.active .hamburger-overlay__line:nth-of-type(3) {
    transform: translateY(-9px) rotate(45deg);
}

/* ナビオーバーレイ */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #f1e2b7;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s;
    z-index: 900;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-overlay__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
}

.nav-overlay__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 170px);
    gap: 20px 30px;
    justify-content: center;
    justify-items: center;
    align-items: center;
    white-space: nowrap;
}

.nav-overlay__item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s;
}

.nav-overlay.active .nav-overlay__item:nth-child(1) {
    transition-delay: 0.1s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-overlay__item:nth-child(2) {
    transition-delay: 0.2s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-overlay__item:nth-child(3) {
    transition-delay: 0.3s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-overlay__item:nth-child(4) {
    transition-delay: 0.4s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-overlay__item:nth-child(5) {
    transition-delay: 0.5s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-overlay__item:nth-child(6) {
    transition-delay: 0.6s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-overlay__item:nth-child(7) {
    transition-delay: 0.7s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-overlay__item:nth-child(8) {
    transition-delay: 0.8s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-overlay__item:nth-child(9) {
    transition-delay: 0.9s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-overlay__item:nth-child(10) {
    transition-delay: 1s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.active .nav-overlay__item:nth-child(11) {
    transition-delay: 1.1s;
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay__link {
    display: inline-block;
    padding: 20px;
    font-size: 18px;
    color: #7c6b59;
    text-decoration: none;
    transition: opacity .3s;
}

.nav-overlay__link:hover {
    opacity: 0.5;
}

/* PCでは非表示 */
@media screen and (min-width: 1251px) {
    .header {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .hamburger-overlay__line:nth-of-type(1) {
        top: 2px;
    }

    .hamburger-overlay__line:nth-of-type(2) {
        top: 11px;
    }

    .hamburger-overlay__line:nth-of-type(3) {
        top: 21px;
    }

    .hamburger-overlay.active .hamburger-overlay__line:nth-of-type(1) {
        transform: translateY(9.5px) rotate(-45deg);
    }

    .hamburger-overlay.active .hamburger-overlay__line:nth-of-type(3) {
        transform: translateY(-9.5px) rotate(45deg);
    }

    .nav-overlay__list {
        grid-template-columns: repeat(2, 130px);

    }

    .nav-overlay__link {
        font-size: 15px;
    }
}




/* スワイプ*/
.swiper {
    width: 100%;
    height: 100dvh;
}

.swiper-slide {
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
}

/*左下のチモシー入れ*/
.timothyunder {
    position: absolute;
    width: 170px;
    height: auto;
    transform: rotate(70deg);
    left: -8px;
    bottom: -20px;
    z-index: 3;
    animation: leftright 3s linear infinite;
}

@keyframes leftright {

    0%,
    100% {
        transform: rotate(70deg);
    }

    50% {
        transform: rotate(60deg);
    }
}

@media screen and (max-width: 764px) {
    .timothyunder {
        display: none;
    }
}

/*自動スライド*/
.auto-slider {
    width: 100%;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.auto-slider .slides {
    display: flex;
    will-change: transform;
}

.auto-slider .slides img {
    flex-shrink: 0;
    object-fit: contain;
    transition: transform 0.3s;
}

/* 中央画像を拡大 */
.auto-slider .slides img.active {
    transform: scale(1.2);
    z-index: 2;
}

.slider-buttons {
    position: absolute;
    bottom: -75px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.slider-buttons button {
    background-color: rgba(174, 159, 141, 0.2);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    transition: all 0.3s;
    cursor: pointer;
}

.slider-buttons button.active {
    width: 16px;
    height: 16px;
    background-color: #ae9f8d;
}

@media screen and (min-width: 765px) {
    .auto-slider .slides img {
        width: calc(100% / 3);
    }
}

@media screen and (max-width: 764px) {
    .auto-slider {
        width: 75%;
        min-width: 450px;
    }

    .auto-slider .slides img {
        width: 70%;
    }
}

@media screen and (max-width: 480px) {
    .auto-slider {
        width: 80%;
        min-width: 0px;
    }

    .auto-slider .slides img {
        width: 90%;
    }
}




/*3セクション目から*/
.section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 左右2カラム均等 */
    align-items: center;
    width: 80%;
    gap: 40px;
}

@media screen and (max-width: 764px) {
    .container {
        grid-template-columns: 1fr;
        /* 1カラムにする */
        gap: 20px;
        /* 縦の間隔を調整 */
        text-align: center;
    }
}

@media screen and (max-width: 764px) {
    .container {
        width: 100%;
    }
}

.reason-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.reason-wrapper h2 {
    position: relative;
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
    transition-delay: 0.3s;
    white-space: nowrap;
}

.reason-wrapper h2.show {
    opacity: 1;
    transform: translateY(0);
}

.reason-wrapper h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.1em;
    transform: translateX(-50%) scaleX(0);
    transform-origin: left center;
    width: 120%;
    height: 0.4em;
    background: #f7d465;
    z-index: -1;
    border-radius: 4px;
    transition: transform 0.8s ease;
    transition-delay: 0.3s;
}

.reason-wrapper h2.show::after {
    transform: translateX(-50%) scaleX(1);
}

.img-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.reason-rightphoto {
    width: 85%;
    min-width: 350px;
    height: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.reason-wrapper::after {
    content: "SIZE";
    position: absolute;
    top: 40.5%;
    /* h2 の中央くらいに合わせる */
    left: 24%;
    transform: translateX(-50%);
    /* 水平だけ中央揃え */
    font-size: 8vw;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.03);
    z-index: 1;
    /* h2 の背面に */
    pointer-events: none;
    white-space: nowrap;
}

.reason::after {
    content: "REASON";
}

.problem::after {
    content: "PROBLEM";
}

.size::after {
    content: "SIZE";
}

.docterevaluation::after {
    content: "COMMENT";
}


.evaluation::after {
    content: "EVALUATION";
}

.comparison::after {
    content: "COMPARISON";
}

.impression::after {
    content: "IMPRESSION";
}

.review::after {
    content: "REVIEW";
}

.warranty::after {
    content: "WARRANTY";
}

@media screen and (min-width: 1400px) {

    .reason-wrapper::after,
    #size::after {
        font-size: 92px;
    }
}

@media screen and (max-width: 764px) {
    .reason-wrapper::after {
        top: -5.2%;
        left: 50%;
        transform: translateX(-50%);
        font-size: 58px;
    }

    .reason-rightphoto {
        width: 50%;
    }
}

@media screen and (max-width: 480px) {
    .reason-wrapper::after {
        top: -4%;
        font-size: 52px;
    }

    .reason-rightphoto {
        width: 80%;
        min-width: 0px;
    }
}




/*ラストセクション*/
#lastsection {
    position: relative;
    display: flex;
    flex-direction: column;
    /* 縦に積む */
    justify-content: center;
    align-items: center;
    text-align: center;
}

#last-wrapper {
    width: 90%;
}

#last-h3 {
    margin: 0 0 40px 0;
    line-height: 1.5;
}


#last-p {
    margin: 0 0 0px 0;
    font-size: 16px;
    color: #60605f;
}

#last-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    display: flex;
}

#last-btn {
    width: auto;
    background-color: #a09281;
    padding: 15px 25px;
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    z-index: 2;
    animation: btn_animation 2s infinite;
}

#last-btn:hover {
    opacity: 0.7;
    transition: 0.5s;
}

@keyframes btn_animation {
    0% {
        transform: translate(2px, 0px);
    }

    5% {
        transform: translate(-2px, 0px);
    }

    10% {
        transform: translate(2px, 0px);
    }

    15% {
        transform: translate(-2px, 0px);
    }

    20% {
        transform: translate(2px, 0px);
    }

    25% {
        transform: translate(-2px, 0px);
    }

    30% {
        transform: translate(0px, 0px);
    }
}


/* ラストセクション順番に表示フェードイン用 */
.fade-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 4000ms ease, transform 4000ms ease;
    will-change: opacity, transform;
}

/* 表示状態 */
.fade-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 要素ごとに遅延を調整 */
#last-img.fade-item.visible {
    transition-delay: 1s;
}

#last-h3.fade-item.visible {
    transition-delay: 1.5s;
}

#last-p.fade-item.visible {
    transition-delay: 2s;
}

#last-btn-wrapper.fade-item.visible {
    transition-delay: 2.5s;
}


/*ラストセクション画像*/
#last-img {
    display: flex;
    justify-content: center;
}

#lasttimothy {
    position: absolute;
    bottom: -70px;
    width: 80%;
    max-width: 800px;
}

.bound-animation {
    animation: bound 3s forwards;
}

@keyframes bound {
    0% {
        transform: translateY(0);
    }

    20% {
        transform: translateY(-25px);
    }

    25% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-15px);
    }

    50% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(0);
    }
}


@media screen and (max-width: 1250px) {
    #last-btn {
        right: 80px;
    }
}

@media screen and (min-width: 920px) {
    #lasttimothy {
        position: absolute;
        bottom: -120px;
    }
}

@media screen and (max-width: 764px) {
    #last-btn {
        padding: 14px 20px;
    }

    #lasttimothy {
        bottom: -40px;
        width: 80%;
        min-width: 450px;
    }
}

@media screen and (max-width: 480px) {
    #last-p {
        font-size: 13px;
    }

    #lasttimothy {
        bottom: -40px;
        width: 90%;
        min-width: 0px;
    }

    #last-btn {
        top: 13px;
        padding: 13px 19px;
        font-size: 14px;
    }
}




/*blobアニメーション*/
.wave {
    position: absolute;
    background-color: #f7d465;
    opacity: 0.5;
    border-radius: 50%;
    filter: blur(15px);
    animation: morph 20s ease-in-out infinite;
}

/* 個別設定 */
.wave1 {
    width: 40%;
    height: 20%;
    top: 0%;
    left: 0%;
    animation-duration: 20s;
    background-color: rgba(255, 255, 255, 0.5);
}

.wave2 {
    width: 20%;
    height: 20%;
    top: 0%;
    left: 0%;
    animation-duration: 10s;
    background-color: rgba(255, 255, 255, 0.6);
}

.wave3 {
    width: 50%;
    height: 60%;
    top: 60%;
    left: 0%;
    animation-duration: 10s;
    background-color: rgba(255, 255, 255, 1);
}

.wave4 {
    width: 30%;
    height: 30%;
    top: 60%;
    left: 0%;
    animation-duration: 10s;
    background-color: rgba(255, 255, 255, 0.65);
}


/*これ入れるとフラッシュとスマホ時にスクロールするとエラー起きる。rightにしないようにする*/
.wave5 {
    width: 50%;
    height: 50%;
    top: -5%;
    left: 80%;
    animation-duration: 10s;
    background-color: rgba(255, 255, 255, 0.8);
}

.wave6 {
    width: 30%;
    height: 30%;
    bottom: 0%;
    left: 80%;
    animation-duration: 10s;
    background-color: rgba(255, 255, 255, 0.4);
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 50% 50% / 50% 40% 60% 50%;
        transform: translate(0px, 0px) rotate(0deg) scale(1);
    }

    15% {
        border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
        transform: translate(30px, -20px) rotate(10deg) scale(1.05);
    }

    30% {
        border-radius: 50% 50% 45% 55% / 45% 50% 55% 50%;
        transform: translate(-20px, 30px) rotate(-10deg) scale(0.95);
    }

    50% {
        border-radius: 45% 55% 50% 50% / 50% 45% 55% 50%;
        transform: translate(40px, -30px) rotate(15deg) scale(1.1);
    }

    70% {
        border-radius: 50% 50% 55% 45% / 50% 55% 50% 45%;
        transform: translate(-30px, 20px) rotate(-15deg) scale(0.9);
    }

    85% {
        border-radius: 55% 45% 50% 50% / 50% 40% 60% 50%;
        transform: translate(20px, -10px) rotate(5deg) scale(1.05);
    }

    100% {
        border-radius: 40% 60% 50% 50% / 50% 40% 60% 50%;
        transform: translate(0px, 0px) rotate(0deg) scale(1);
    }
}