@charset "UTF-8";

/* ========================================
   基本設定
======================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-image: url('./img/prof.webp');
    background-repeat: no-repeat;
    min-height: 100svh;

    background-size: cover; /* 画像を画面サイズに合わせて拡大縮小する */
    background-position: center top; /* 画像の位置を中央上にする */
    background-attachment: fixed; /* 背景画像を固定 */
}

/* ========================================
   共通ヘッダー・リボン・ナビ
======================================== */
.header {
    position: fixed; /* ヘッダーを固定位置に設定 */
    top: 0; /* ヘッダーの上端を画面の上端に設定 */
    left: 0; /* ヘッダーの左端を画面の左端に設定 */
    z-index: 100; /* ヘッダーの重なり順序を100に設定 */
    width: 100%; /* ヘッダーの幅を100%に設定 */
}

.ribbon {
    position: relative; /* リボンを相対位置に設定 */
    z-index: 2; /* リボンの重なり順序を2に設定 */
    
    display: block; /* リボンをブロック要素として表示 */
    width: 100%;
    height: auto;
}

.nav {
    position: absolute; /* ナビゲーションを絶対位置に設定 */
    top: clamp(38px, 4.2vw, 60px);
    right: max(5%, calc((100% - 1100px) / 2)); /* ナビゲーションの右端を画面幅に応じて調整 */
    z-index: 3; /* ナビゲーションの重なり順序を3に設定 */ 

    pointer-events: auto; /* ナビゲーションのクリックイベントを有効化 */    
}
.nav-list {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.5vw, 35px);

    margin: 0; /* 上部の余白を0に設定 */
    padding: 0;
    list-style: none;

    font-family: "Alata", sans-serif;
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.2; /* ナビゲーションの行間を1.2に設定 */
}

.nav-list li {
    margin: 0;
    padding: 0;
}

.nav-list a,
.nav-list p {
    display: block;
    margin: 0;
    padding: 0;

    font: inherit; /* 親要素のフォントスタイルを継承 */
    line-height: inherit; /* 親要素の行間を継承 */  
}

.nav-design {
    color: #a0a5a5;

    text-decoration-line: line-through;
    text-decoration-color: #a0a5a5;
    text-decoration-thickness: 2px;
}

.nav-link {
    color: #636f6f;
    text-decoration: none;

    transition:
        color 0.3s,
        opacity 0.3s;
}

.nav-link:visited {
    color: #636f6f;
}

.nav-link:hover {
    color: #087f83;
    opacity: 0.7;
}

.nav-link-current,
.nav-link-current:visited {
    color: #087f83;
}

.nav-link-current:hover {
    color: #636f6f;
    opacity: 0.7;
}

/* ========================================
   メイン・見出し
======================================== */
.workflow-main {
    width: min(1180px, calc(100% - 80px));
    margin: 0 auto;
    padding: clamp(190px, 17vw, 270px) 0 70px;
}

.workflow-title {
    display: flex;
    align-items: center;
    gap: 20px;

    /* 追加：親要素の幅を抜けて画面左端まで移動 */
    margin-top: 80px;
    margin-right: 0;
    margin-bottom: 30px;
    margin-left: calc(50% - 50vw);

    text-shadow: 8px 8px 2px rgba(32, 31, 31, 0.1);
    font-family: "Alata", sans-serif;
    font-size: clamp(40px, 4.5vw, 60px);
    font-weight: 400;
    color: #636f6f;
}

.workflow-title::before {
    content:""; /* アイコンの内容を指定(文字の前のライン) */
    width: clamp(70px, 10vw, 145px); /* アイコンの幅を70pxに設定 */
    border-top: 3px solid #636F6F; /* アイコンの上線の色を#636F6Fに設定 */
    box-shadow: 8px 8px 2px rgba(32, 31, 31, 0.1); /* アイコンに影を追加 */
}

.workflow-lead { 
    margin: clamp(55px, 7vw, 90px) auto 0;
    max-width: 900px;

    font-family: "Noto Sans JP", sans-serif;
    color: #636f6f;
    font-size: clamp(14px, 1.4vw, 17px);
    line-height: 2;
    letter-spacing: 0.04em;
    text-align: center; /* 文字を中央揃えにする */   
}

.works-guide {
    margin-top: 30px;
    text-align: center;
}

.works-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding-bottom: 5px;
    border-bottom: 2px dotted #078783;

    color: #078783;
    font-family: "Noto Sans JP", sans-serif;
    font-size: clamp(13px, 1.3vw, 16px);
    font-weight: 500;
    text-decoration: none;

    transition:
        color 0.3s ease,
        border-color 0.3s ease,
        opacity 0.3s ease;
}

.works-guide-link span {
    transition: transform 0.3s ease;
}

.works-guide-link:hover,
.works-guide-link:focus-visible {
    color: #636f6f;
    border-color: #636f6f;
    opacity: 0.8;
}

.works-guide-link:hover span,
.works-guide-link:focus-visible span {
    transform: translateX(5px);
}

/* ========================================
   上部の工程
======================================== */
.flow-overview {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px;

    margin: clamp(55px, 7vw, 90px) 0 0;
    padding: 0;

    list-style: none;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 23px;
    left: calc(50% + 30px);

    width: calc(100% - 32px);
    border-top: 3px solid #168f91;
}

.flow-number {
    display: block;
    flex-shrink: 0;

    width: clamp(38px, 4vw, 55px);
    height: auto;

    border: none;
    border-radius: 0;
    background: none;
    object-fit: contain;
    overflow: visible;
    margin-bottom: 20px;
}

.flow-label {
    display: grid;
    place-items: center;
    min-height: 44px;
    width: 100%;
    padding: 8px 12px;

    clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%, 7% 50%);
    background: rgba(91, 193, 187, 0.62);
    box-shadow: 0 3px 8px rgba(40, 100, 100, 0.16);

    font-family: "Noto Sans JP", sans-serif;
    color: #526f6f;
    font-size: clamp(9px, 1vw, 13px);
    font-weight: 600; /* フォントの太さを600に設定 */
    line-height: 1.35;
    text-align: center;
}

.free-message {
    display: table;
    margin: clamp(60px, 8vw, 100px) auto 65px;
    padding-bottom: 10px;

    border-bottom: 3px dotted #078783;
    color: #078783;
    font-size: clamp(20px, 3vw, 32px);
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* ========================================
   詳細カード
======================================== */
.workflow-details {
    display: grid;
    gap: clamp(42px, 6vw, 70px);
}

.workflow-card {
    width: min(100%, 1040px);
    margin: 0 auto;
    padding: clamp(30px, 4vw, 48px);

    border-radius: 34px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(56, 116, 116, 0.06);
}

.workflow-card h2 {
    display: table;
    margin: 0 0 24px;
    padding-bottom: 7px;

    border-bottom: 3px dotted #168f91;
    font-family: "Noto Sans JP", sans-serif;
    color: #5d6f6f;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.4;
}

.workflow-card p {
    margin: 0;

    font-family: "Noto Sans JP", sans-serif;
    color: #5d6f6f;
    font-size: clamp(14px, 1.35vw, 17px);
    line-height: 1.85;
    letter-spacing: 0.015em;
}

.workflow-card p + p {
    margin-top: 18px;
}

/* ========================================
   CONTACT・追従バッジ・TOPボタン
======================================== */
.contact-button-wrap {
    display: flex;
    justify-content: center;

    margin: clamp(40px, 9vw, 120px) auto 0; /* 上部の余白を40pxに設定 */
}

.contact-button {
    display: grid;
    place-items: center;

    width: min(310px, 80%); /* ボタンの幅を最大310px、画面幅の80%までに設定 */
    min-height: 80px; /* ボタンの高さを80pxに設定 */

    border: 1px solid #636f6f;
    background-color: rgba(91, 193, 187, 0.72);

    color: #637070;
    font-family: "Limelight", serif;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: 0.05em;
    text-decoration: none;

    transform: translateY(0);
    cursor: pointer;

    /* send-buttonと同じ切り替え */
    transition:
        color 0.3s ease,
        background-color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.contact-button:hover,
.contact-button:focus-visible {
    border-color: #008783;
    background-color: #008783;
    color: #ffffff;

    transform: translateY(-3px);
}

.request-badge {
    position: fixed; /* バッジを固定位置に設定 */
    top: 52%; /* バッジの垂直位置を画面中央に設定 */
    right: clamp(60px, 8vw, 130px);
    z-index: 90; /* バッジの重なり順序を90に設定 */

    display: block; /* バッジをブロック要素として表示 */
    width: clamp(130px, 14vw, 190px);
    transform: translateY(-50%); /* バッジの垂直位置を中央に調整 */
    transition: opacity 0.3s ease, transform 0.3s ease; /* バッジのアニメーションをスムーズにするためのトランジション */
}

.request-badge img {
    display: block; /* 画像をブロック要素として表示 */
    width: 100%; /* 画像の幅を100%に設定 */
    height: auto; /* 画像の高さを自動調整してアスペクト比を維持 */

    filter: drop-shadow(3px 6px 4px rgba(50, 80, 80, 0.25)); /* 影を追加して立体感を出す */
    animation: badge-float 3s ease-in-out infinite; /* バッジの浮遊アニメーションを適用 */
}

.request-badge:hover,
.request-badge:focus-visible {
    opacity: 0.82; /* 少し薄くして目立たせる */
    transform: translateY(-50%) scale(1.06); /* 少し拡大して目立たせる */
}

@keyframes badge-float { /* バッジの浮遊アニメーション */
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* ----------------------------
   スクロール追従 TOPボタン
---------------------------- */
.scroll-top {
        position: fixed;
        right: 50px;

        /* Netlify表示やスマホ下部から離す */
        bottom: calc(75px + env(safe-area-inset-bottom));

        z-index: 999;

        /* タップできる範囲を確保 */
        display: grid;
        place-items: center;

        width: 44px;
        height: 44px;
    }

    .scroll-top img {
        display: block;
        width: 30px;
        height: auto;
    }

.scroll-top img {
    display: block;
    width: 50px;
    height: auto;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

/* ホバー時：ふわっと薄く */
.scroll-top:hover img {
  opacity: 0.6;
  transform: translateY(-4px); /* 少し浮かせると上品 */
}

html {
  scroll-behavior: smooth;
}

.footer {
    text-align: center; /* フッターのテキストを中央揃えに設定 */
    font-family:'Zen Kaku Gothic', sans-serif; /* フォントを'Zen Kaku Gothic New'に設定 */
    font-size: 12px; /* フォントサイズを12pxに設定 */
    color: #636F6F; /* フォントカラーを#636F6Fに設定 */
    margin-top: 30px; /* 上部の余白を30pxに設定 */
    margin-bottom: 0; /* 下部の余白を0に設定 */
}

/* ========================================
   スクロール表示アニメーション
======================================== */
.js .reveal {
    opacity: 0;
    transform: translateY(38px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.js .flow-step {
    opacity: 0;
    transform: translateX(-45px);
}

.js .reveal-flow.is-visible .flow-step {
    opacity: 1;
    transform: translateX(0);
    transition:
        opacity 0.7s ease var(--delay),
        transform 0.7s ease var(--delay);
}

/* 動きを減らす設定を使用している方への配慮 */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   スマートフォン
======================================== */
@media screen and (max-width: 768px) {
     body {
        position: relative;
        isolation: isolate;

        min-height: 100svh;

        /* 従来のbody背景を解除 */
        background-image: none;
    }

    /* 背景専用レイヤー */
    body::before {
        content: "";

        position: fixed;
        inset: 0;
        z-index: -1;

        background-image: url("./img/phone-prof.webp");
        background-repeat: no-repeat;
        background-position: center top;
        background-size: cover;

        pointer-events: none;
    }
    /* 固定ヘッダー */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100;

        width: 100%;
        height: 170px;

        pointer-events: none;
    }

    /* リボン */
    .ribbon {
        position: relative;
        top: 0;
        left: 0;
        z-index: 2;

        display: block;
        width: 100%;
        height: auto;

        pointer-events: none;
    }

    /* ナビゲーションの位置 */
    .nav {
        position: absolute;
        top: 100px;
        right: auto;
        left: 50%;
        z-index: 3;

        width: 92%;

        transform: translateX(-50%);
        pointer-events: auto;
    }

    /* ナビゲーション本体 */
    .nav-list {
        display: flex;
        align-items: center;
        justify-content: space-around;
        gap: clamp(4px, 2vw, 8px);

        width: 100%;
        margin: 0;
        padding: 20px 10px;

        list-style: none;
        background-color: rgba(255, 255, 255, 0.55);

        font-size: clamp(13px, 4vw, 17px);
    }

    .nav-list li {
        flex-shrink: 0;
    }

    .nav-list a,
    .nav-list p {
        display: block;
        margin: 0;
        padding: 0;

        white-space: nowrap;
    }

    .workflow-main {
        width: calc(100% - 32px);
        padding: 190px 0 55px;
    }

    .workflow-title {
        gap: 14px;
        font-size: clamp(38px, 12vw, 52px);
    }

    .workflow-title::before {
        width: clamp(45px, 15vw, 75px);
    }

    .workflow-lead {
        margin-top: 45px;
        line-height: 1.9;
    }

    .workflow-lead br {
        display: none;
    }

    .works-guide {
        margin-top: 25px;
    }

    .works-guide-link {
        font-size: 14px;
    }

    /* 工程フロー全体 */
    .flow-overview {
        display: grid;
        grid-template-columns: 1fr;
        gap: 22px;

        width: min(100%, 360px);
        margin: 50px auto 0;
        padding: 0;
    }

    /* 数字画像と工程名を横並びにする */
    .flow-step {
        position: relative;

        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: center;
        gap: 14px;

        width: 100%;
    }

    /* 工程をつなぐ縦線 */
    .flow-step:not(:last-child)::after {
        content: "";

        position: absolute;
        top: 42px;
        left: 19px;
        z-index: 0;

        width: 0;
        height: 24px;

        border-top: 0;
        border-left: 2px solid #168f91;
    }

    /* 工程番号の画像 */
    .flow-number {
        position: relative;
        z-index: 1;

        display: block;
        justify-self: start;

        width: 40px;
        height: auto;
        margin: 0;
    }

    /* 工程名 */
    .flow-label {
        justify-content: start;
        padding: 10px 20px;
        padding-left: clamp(28px, 8vw, 36px); /* 左側の余白を調整して、工程番号の画像と重ならないようにする */
        font-size: clamp(12px, 3vw, 16px); /* フォントサイズを調整して、スマートフォンでも読みやすくする */
        text-align: left;
    }

    .free-message {
        margin: 55px auto 48px;
        font-size: clamp(19px, 5.8vw, 25px);
        text-align: center;
    }

    .workflow-details {
        gap: 34px;
    }

    .workflow-card {
        padding: 28px 22px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.4);
    }

    .workflow-card h2 {
        font-size: clamp(19px, 5.5vw, 23px);
    }

    .contact-button {
        min-height: 68px;
        margin-top: 40px;
        font-size: clamp(28px, 9vw, 38px);
    }

    .request-badge {
        top: auto;
        right: 14px;
        bottom: calc(145px + env(safe-area-inset-bottom));
        width: 82px;
        transform: none;
    }

    .request-badge:hover,
    .request-badge:focus-visible {
        transform: scale(1.05);
    }

    .scroll-top {
        right: 16px;
        bottom: calc(75px + env(safe-area-inset-bottom));
        width: 44px;
        height: 44px;
    }

    .scroll-top img {
        width: 30px;
    }
}

@media screen and (max-width: 768px) {
    .request-badge {
        position: fixed;

        /* ナビの下に配置 */
        top: 175px;
        right: 20px;
        bottom: auto;
        z-index: 90;

        /* バッジを少し大きくする */
        width: clamp(100px, 28vw, 120px);

        /* PC版の中央配置を解除 */
        transform: none;
    }

    .request-badge:hover,
    .request-badge:focus-visible {
        opacity: 0.82;
        transform: scale(1.06);
    }
}
