/* CSS Document */
@charset "UTF-8";

body {
    margin: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
html {
    scroll-behavior: smooth;
}
* {
    box-sizing: border-box;
}

/* メインビジュアル本アニメーション */
#mv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
    width: 100%;
    height: 1000vh;
    background: #DACDCD;
    z-index: 2;
    position: relative;
}
@media(max-width: 500px) {
    #mv {
        height: 500vh;
    }
}

/* === ドア周辺の立体表示コンテナ === */
.door_container {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    perspective: 1000px;
    z-index: 1;
    pointer-events: none;
}
  /* === ドア本体 === */
.door {
    position: relative;
    width: 330px;
    height: 600px;
    background: #3C3635;
    border-radius: 10px;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    z-index: 1;
    pointer-events: auto;
}
/* === ドア右半分（開閉対象）=== */
.door-right {
    position: absolute;
    top: 0;
    right: -10px;
    width: 350px;
    height: 600px;
    /* background: #332119; */
    background-image: url('../img/home/door-fixed.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform-origin: right center !important;
    transform-style: preserve-3d;
    will-change: transform;
    z-index: 2;
    pointer-events: auto;
}
@media(max-width: 500px) {
    .door {
        width: 220px;
        height: 400px;
    }
    .door-right {
        width: 230px;
        height: 400px;
    }
}


/* スキルのセクション */
#skills {
    position: relative;
    padding: 110px 0;
    width: 100%;
    height: auto;
    background: #3C3635;
    z-index: 30;
}
.coffee.show, .beans.show {
    opacity: 1;
    transform: translateX(0);
}
.beans {
    position: absolute;
    top: -60px;
    right: 5%;
    opacity: 0;
    transform: translateX(30px);
    transition: all 1.0s ease-out;
}
@media(max-width:900px) {
    .beans {
        width: 170px;
        height: auto;
    }
}
.skills_ttl {
    display: flex;
    justify-content: center;
    color: #ECE4E4;
}
.skills_lst {
    display: flex;
    margin-top: 100px;
}
.skills-lst_blk {
    display: flex;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
    margin: 0 auto;
    align-items: center;
    padding: 100px 0 30px 0;
    width: 18.3%;
    height: 300px;
    border-radius: 20px;
    background: #DACDCD;
}
.skills_mrk {
    display: flex;
    position: absolute;
    justify-content: center;
    align-items: center;
    top: -70px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #DACDCD;
}
.skills_mrk > img {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.0s ease-out;
}
.skills_mrk > img.show {
    opacity: 1;
    transform: translateY(0);
}
.skills_nm {
    font-size: 1.875rem;
    font-weight: 500;
    letter-spacing: 3px;
}
@media (max-width: 904px) {
    #skills {
        padding: 80px 0;
    }
    .skills_ttl {
        margin-top: 100px;
    }
    .skills_lst {
        margin-top: 70px;
        flex-direction: column;
    }
    .skills-lst_blk {
        width: 100%;
        margin: 70px auto;
    }
    .skills_mrk {
        top: -50px;
        width: 100px;
        height: 100px;
    }
    .skills_mrk img {
        width: 70px;
    }
}

/* スキルのセクション 画面切り替え */
/* オーバーレイ全体 */
.skills_overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    position: fixed;
    transform: translateY(100%);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(60, 54, 53, 0.40); /* 半透明の背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999 !important;
}
/* 表示する時のクラス */
.skills_overlay.active {
    opacity: 1;
    transform: translateY(0); /* 表示時のアニメーション */
    pointer-events: auto;
}
/* オーバーレイの中身 */
.overlay_inner {
    display: flex;
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80%;  /* 横幅を調整 */
    background: #DACDCD;
    padding: 30px;
    border-radius: 20px;
    transform: translateY(100%);
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 表示時にスライドアップ */
.skills_overlay.active .overlay_inner {
    transform: translateY(0);
    opacity: 1;
}
/* スキルアイコン */
.overlay_inner > .skills_mrk {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
/* スキル名 */
.overlay_inner > .skills_nm {
    margin: 100px auto 30px auto;
}
/* スキルの説明文 */
.skills_txt {
    margin: 20px auto;
    line-height: 1.5;
    text-align: center;
    padding: 0 20px;
}
/* 使用ソフトのアイコン */
.skills_soft {
    display: flex;
    justify-content: center;
    margin: 20px auto;
    gap: 15px;
}
.close_btn {
    margin: 30px 0 0  0;
}
/* SVGタグに直接幅と高さを設定 */
.skills_soft svg {
    width: 50px;
    height: 50px;
}

@media(max-width: 904px) {
    .skills_soft svg {
        width: 40px;  /* モバイル画面などでサイズを調整 */
    }
    .overlay_inner > .skills_nm {
        margin: 50px auto 30px auto;
    }
    .skills_txt {
        padding: 0;
    }
}

.coffee {
    position: absolute;
    bottom: -90px;
    left: 5%;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 1.0s ease-out;
    z-index: 29;
}
@media(max-width: 900px) {
    .coffee {
        bottom: -50px;
        width: 140px;
        height: auto;
    }
}

  /* ワークのセクション */
#works {
    position: relative;
    margin-bottom: 100px;
    padding: 110px 0;
    width: 100%;
    height: 800px;
    background: #DACDCD;
    z-index: 28;
}
.works_blk {
    display: flex;
}
.works_ttl {
    display: flex;
    justify-content: flex-start;
    position: relative;
    margin-top: 100px;
    margin-left: 50px;
}
.works_ttl >svg {
    position: absolute;
}
.works_ttl_svg path,
.works_ttl_svg circle {
    stroke: #3C3635;
    fill: #3C3635;
}
.wrk-lst_btn {
    position: absolute;
    bottom: 110px;
}
.swiper-container {
    position: absolute;
    bottom: 200px;
    right: 0;
    width: 60vw;
    overflow: hidden;
}
.swiper-wrapper {
    display: flex;
    justify-content: flex-start;
    /* transform: translateX(0) !important; */
    overflow: visible;
    max-width: 100%;
}
.swiper-slide {
    display: flex !important;
    flex-direction: column;
    margin: 20px;
    padding: 20px;
    flex-shrink: 0;
    width: 400px !important;
    height: auto;
    background: #DACDCD;
    background-size: cover;
    background-position: center;
    border: 3px solid #3C3635;
    border-radius: 20px;
    transition: transform 0.3s ease-out;
}
.swiper-slide img {
    display: flex;
    margin: auto;
    border-radius: 20px;
}
.wrk_ttl {
    display: flex;
    margin-top: 20px;
    font-size: 1.25rem;
    font-weight: 500;
}
.wrk_tag {
    display: flex;
    margin-top: 10px;
    gap: 10px;
}
.wrk-itm_blk {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wrk_icon {
    display: flex;
    gap: 10px;
}
.wrk_icon-itm {
    display: flex;
    width: 40px;
    height: 40px;
    background: #ECE4E4;
    border-radius: 50%;
}
.wrk_icon-itm img {
    display: flex;
    margin: auto;
    width: 25px;
    height: auto;
    border-radius: 0;
}

.swiper-notification {
    position: absolute;
    bottom: 170px;
    right: 58%;
    z-index: 13 !important;
}
.swiper-button {
    z-index: 20;
}
.swiper-button-prev , .swiper-button-next {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    width: 60px;
    height: 60px;
    background: #3C3635;
    border-radius: 50%;
    z-index: 13 !important;
}
.swiper-button-prev {
    left: -5px;
}
.swiper-button-next {
    left: 80px;
}
  /* 矢印アイコンのカスタマイズ */
.swiper-button-prev::before, .swiper-button-next::before {
    position: absolute;
    content: "";
    font-family: swiper-icons !important; /* ここでアイコンフォントを設定 */
    font-size: 30px !important; /* サイズを調整 */
    text-transform: none !important;
    letter-spacing: 0;
    font-variant: initial;
    width: 24px;
    height: 3px;
    background: #ECE4E4;
    border-radius: 1px;
    line-height: 1;
}
.swiper-button-prev::after, .swiper-button-next::after {
    position: absolute;
    content: "";
    font-family: swiper-icons !important; /* ここでアイコンフォントを設定 */
    font-size: 30px !important; /* サイズを調整 */
    text-transform: none !important;
    letter-spacing: 0;
    font-variant: initial;
    width: 24px;
    height: 3px;
    background: #ECE4E4;
    border-radius: 1px;
    line-height: 1;
}
.swiper-button-prev::before {
    transform: rotate(-45deg);
    top: 20px;
}
.swiper-button-prev::after {
    transform: rotate(45deg);
    bottom: 21px;
}
.swiper-button-next::before {
    transform: rotate(45deg);
    top: 20px;
}
.swiper-button-next::after {
    transform: rotate(-45deg);
    bottom: 21px;
}
  /* --- スクロールバーとページネーションの位置調整 --- */
.swiper-scrollbar {
    position: absolute;
    bottom: 140px !important;
    left: 58% !important;
    width: 25vw !important;
    height: 4px !important;
    background: #ECE4E4;
    border-radius: 2px;
    z-index: 13 !important;
}
.swiper-scrollbar-drag {
    background: #3C3635;
    height: 4px !important;
}
.swiper-pagination {
    position: absolute;
    bottom: 127px !important; /* スクロールバーと同じ高さ */
    left: 87%;
    color: #3C3635 !important;
    font-weight: 100 !important;
    font-size: 1.25rem !important;
    transform: translateX(30%);
    z-index: 13 !important;
}
.swiper-pagination .current-slide {
    font-size: 20px;
    font-weight: bold;
}

.wrk_overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    transform: translateY(100%);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(60, 54, 53, 0.40); /* 半透明の背景 */
    z-index: 999 !important;
    will-change: opacity, transform; /* パフォーマンス最適化 */
}
.wrk_overlay.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
/* 表示時にスライドアップ */
.wrk_overlay.active .wrk_inner {
    transform: translateY(0);
    opacity: 1;
}
 .wrk_overlay.active {
    transform: translateY(0);
    z-index: 1000 !important;
 }
.wrk_inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative; /* ボタンの位置調整用 */
    width: 80%;  /* 横幅を調整 */
    max-height: 90vh;  /* 最大高さを指定 */
    opacity: 0;
    background: #DACDCD;
    padding: 30px;
    border: 3px solid #3C3635;
    border-radius: 20px;
    overflow-y: auto; /* 縦スクロールを有効に */
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    z-index: 1002 !important; /* 他の要素に隠れないように */
}
 .wrk_inner.active {
    z-index: 1001 !important;
 }
.wrk_img {
    margin-top: 30px;
    width: 60vw;
    height: auto;
}
.wrk_icon {
    margin-top: 10px;
}
.wrk_ttl-nm {
    margin-top: 20px; /* タイトルが隠れないように余白を追加 */
    font-size: 2.5rem;
    text-align: center; /* 中央揃え */
    z-index: 1; /* 他の要素に隠れないように */
}
.wrk_ttl-sub {
    font-size: 1.25rem;
    font-weight: 500;
    text-align: center; /* 中央揃え */
}
.wrk_txt-itm {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 50px;
}
.wrk_url p {
    word-break: break-all; /* 長いURLなどを途中で折り返す */
    overflow-wrap: break-word;
    white-space: normal;
}
.wrk-graph {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 50px;
}
.button.close_btn {
    position: absolute;
    top: 20px;
    right: 20px;  /* ボタンを右上に配置 */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2;  /* 他のコンテンツの上に表示 */
}
.close_btn .x_mrk {
    font-size: 1.5rem;
    color: #3C3635;
    display: block;
}
.flowchart {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    color: #DACDCD;
    padding: 2rem;
    gap: 1rem;
}
.flow_itm {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 20px;
    padding: 20px;
    gap: 20px;
    width: auto;
    height: 110px;
    background: #3C3635;
    position: relative;
}
.flow_itm:not(:first-child) {
    padding: 20px 20px 20px 50px;
}
.flow_itm::before {
        content: "";
        position: absolute;
        right: -40px;
        top: 0;
        border-left: 40px solid #3C3635; /* １番目の三角形は背景色と同じ色を指定 */
        border-top: 54px solid transparent;
        border-bottom: 54px solid transparent;
}
.flow_itm:not(:first-child)::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    border-left: 40px solid #DACDCD;
    border-top: 54px solid transparent;
    border-bottom: 54px solid transparent;
}
.wrk-list_overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(60, 54, 53, 0.40); /* 半透明の背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000 !important;
}
.wrk-list_overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.wrk-overlay_inner {
    width: 80%;  /* 横幅を調整 */
    max-height: 90vh;  /* 最大高さを指定 */
    background: #DACDCD;
    padding: 30px;
    border-radius: 20px;
    overflow-y: auto; /* 縦スクロールを有効に */
    position: relative; /* ボタンの位置調整用 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}
.wrk-list_overlay.active .wrk-overlay_inner {
    transform: translateY(0);
    opacity: 1;
}
.overlay_lst-ttl {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 50px;
}
.overlay-lst {
    display: flex;
    flex-direction: column;
    margin-bottom: 50px;
    /* gap: 30px; */
}
.overlay-lst_itm {
    display: flex;
    justify-content: center; /* 中身の配置にも応じて調整 */
    align-items: center;
    margin: 10px auto;
    width: 80%;
    box-sizing: border-box; /* 念のため */
    padding: 10px 20px;
    border: 3px solid #3C3635;
    border-radius: 20px;
}
.wrk-overlay_lst-itm {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}
.overlay-lst_img {
    margin: 0 auto;
    width: 250px;
    height: auto;
    border-radius: 20px;
}
.wrk_ttl-sub {
    margin-bottom: 20px;
}
.wrk-overlay_lst-itm_blk {
    display: flex;
    align-items: center;
    margin: 0 auto;
    max-width: 600px; /* お好みで調整可能 */
    min-width: 400px; /* コンテンツによって調整 */
}
.wrk_itm_txt {
    flex: 1;
}
.overlay_icn {
    margin-top: 10px;
}
.wrk-overlay_inner .close_btn {
    display: flex;
    margin: 0 auto;
    position: relative;
    max-width: 60px;
    min-height: 60px;
}
@media(max-width:900px) {
    #works {
        height: 900px;
        padding: 80px 0;
        margin-bottom: 70px;
    }
    .works_ttl {
        display: flex;
        justify-content: center;
        margin-top: 50px;
        margin-left: 0;
    }
    .works_blk {
        justify-content: center;
    }
    .wrk_icon-itm {
        width: 30px;
        height: 30px;
    }
    .wrk_icon-itm img {
        width: 20px;
        height: auto;
    }
    .swiper-container {
        bottom: 300px;
        width: 100vw;
        overflow: visible;
    }
    .swiper-slide {
        width: 270px !important;
        height: auto;
    }
    .wrk-img {
        width: 250px;
        height: auto;
    }
    .swiper-notification {
        bottom: 273px;
        right: 94%;
    }
    .swiper-button-prev {
        left: 0;
    }
    .swiper-button-prev::before {
        top: 13px;
        width: 18px;
        height: 2px;
    }
    .swiper-button-prev::after {
        bottom: 13px;
        width: 18px;
        height: 2px;
    }
    .swiper-button-next {
        left: 60px;
    }
    .swiper-button-next::before {
        top: 13px;
        width: 18px;
        height: 2px;
    }
    .swiper-button-next::after {
        bottom: 13px;
        width: 18px;
        height: 2px;
    }
    .swiper-scrollbar {
        bottom: 250px !important;
        left: 40% !important;
        width: 45vw !important;
    }
    .swiper-pagination {
        bottom: 237px !important;
        left: 86%;
    }
    .works_overlay-txt {
        width: 100%;
    }
    .flowchart {
        flex-direction: column;
        align-items: center;
    }
    .flow_itm {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 20px 0;
        padding: 20px;
        gap: 20px;
        width: 220px;
        height: auto;
        background: #3C3635;
        position: relative;
    }
    .flow_itm:not(:first-child) {
        padding: 50px 20px 20px 20px;
    }
    .flow_itm::before {
            content: "";
            position: absolute;
            top: 152px;
            right: 0;
            left: 0;
            border-top: 30px solid #3C3635;
            border-right: 110px solid transparent;
            border-left: 110px solid transparent;
            border-bottom: 110px solid transparent;
    }
    .flow_itm:first-child::before {
        top: 122px;
    }
    .flow_itm:not(:first-child)::after {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        border-top: 30px solid #DACDCD;
        border-right: 110px solid transparent;
        border-left: 110px solid transparent;
        border-bottom: 110px solid transparent;
    }
    .flow_itm p {
        margin-top: 20px;
    }
    .overlay-lst_itm {
        width: 100%;
    }
    .overlay-lst_img {
        width: auto;
    }
    .wrk-overlay_lst-itm {
        flex-direction: column;
    }
    .wrk-overlay_lst-itm {
        margin: auto;
    }
    .wrk-overlay_lst-itm_blk {
        margin: 0;
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
    .wrk-overlay_inner .close_btn {
        max-width: 40px;
        min-height: 40px;
    }
    .wrk_itm_txt {
        margin: 0 10px;
    }
}

/* 非アクティブ時 */
.skills_overlay .overlay_inner {
    transform: translateY(100%);
}
.wrk_overlay .wrk_inner {
    transform: translateY(100%);
}
.wrk-list_overlay .wrk-overlay_inner {
    transform: translateY(100%);
}
/* アクティブ時 */
.skills_overlay.active .overlay_inner {
    transform: translateY(0);
    opacity: 1;
}
.wrk_overlay.active .wrk_inner {
    transform: translateY(0);
    opacity: 1;
}
.wrk-list_overlay.active .wrk-overlay_inner {
    transform: translateY(0);
    opacity: 1;
}

.wrk_url {
    display: inline-block;
    position: relative;
    text-decoration: none;
    color: #3C3635;
    padding-bottom: 3px;
    font-size: 1.25rem;
    background-image: linear-gradient(#3C3635, #3C3635);
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: 0 1px;
    transition: background-size 0.3s ease;
}

.wrk_url:hover {
    background-position: bottom left;
    background-size: 100% 1px;
}