@charset "UTF-8";

* {
    box-sizing: border-box;
}

html,body {
    margin: 0;
}

/* ベース（背景画像） */
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%に設定 */

    /* リボンの空白部分で下のフォーム操作を妨げない */
    pointer-events: none;
}

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

    pointer-events: none; /* ナビゲーションのクリックイベントを有効化 */  
}

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

.contact-main {
    position: relative;
    z-index: 1;

    width: min(1100px, calc(100% - 80px));
    min-height: 100svh;
    margin: 0 auto;

    /*
     * 初期表示ではリボンの下に配置。
     * スクロールすると固定リボンの背後へ流れる。
     */
    padding: clamp(180px, 16vw, 260px) 0 80px;
}

.contact-heading { 
    padding-top: 0; 
}

.contact-title {
    margin-top: 100px;

    font-family: 'Alata' , sans-serif;
    font-size: clamp(40px, 4.5vw, 60px); /* フォントサイズを40pxに設定 */
    color: #636F6F;
    font-weight: 500;
    line-height: 1.4;

    text-shadow: 8px 8px 2px rgba(32, 31, 31, 0.1); /* テキストに影を追加 */
}

.contact-title span {
    font-size: 48px;
}

/* contact＋横線 */
.contact-subtitle {
    display: flex;
    align-items: center;
    gap: 20px;

    margin: 55px 0 80px;

    color: #008783;
    font-family: "Alata", sans-serif;
    font-size: 28px;
    line-height: 1;
}

.contact-subtitle::after {
    content: "";

    width: clamp(95px, 10vw, 145px); /* 横線の幅を95pxに設定 */
    border-top: 3px solid #008783;
}

/* ========================================
   フォーム全体
======================================== */

.contact-form-area {
    width: min(820px, 100%);
    padding: clamp(30px, 5vw, 50px)
             clamp(25px, 6vw, 60px);
    margin: 0 auto;

    background-color: rgba(255, 255, 255, 0.55);
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(50, 80, 100, 0.08);
}


.contact-form {
    width: 100%;
}

/* NameとE-mailを横並びにする */
.contact-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 60px;
}

/* 各入力項目 */
.form-field {
    margin-bottom: 50px;
}

.form-field label {
    display: block;

    margin-bottom: 10px;

    color: #636f6f;
    font-family: "Limelight", serif;
    font-size: 31px;
    line-height: 1.2;
}

/* 必須マーク */
.required-mark {
    margin-left: 3px;

    color: #e42a2a;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 18px;
    vertical-align: top;
}

/* 入力欄共通 */
.form-field input,
.form-field select,
.form-field textarea {
    display: block;

    width: 100%;
    margin: 0;
    padding: 8px 4px;

    border: 0;
    border-bottom: 3px solid #636f6f;
    border-radius: 0;
    outline: none;

    color: #4f5d5d;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;

    background-color: transparent;
}

/* Name・E-mail・Category */
.form-field input,
.form-field select {
    min-height: 45px;
}

/* Message */
.form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.form-field select {
    cursor: pointer;
}

/* 入力中の線 */
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-bottom-color: #008783;
    box-shadow: 0 2px 0 rgba(0, 135, 131, 0.18);
}

/* ========================================
   プライバシーポリシー
======================================== */

.privacy-field {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;

    margin-top: -20px;

    color: #636f6f;
    font-size: 15px;
    line-height: 1.8;
}

.privacy-field input {
    flex: 0 0 auto;

    width: 22px;
    height: 22px;
    margin: 2px 0 0;

    accent-color: #008783;
    cursor: pointer;
}

.privacy-link {
    color: #008783;
    text-decoration: none;
}

.privacy-link:hover,
.privacy-link:focus-visible {
    text-decoration: underline;
}

/* ========================================
   送信ボタン
======================================== */

.submit-area {
    display: flex;
    justify-content: center;

    margin-top: 50px;
}

.send-button {
    padding: 10px 15px;

    border: 1px solid #636f6f;

    color: #636f6f;
    font-family: "Limelight", serif;
    font-size: 20px;

    background-color: rgba(137, 222, 217, 0.55);

    cursor: pointer;

    transition:
        color 0.3s ease,
        background-color 0.3s ease,
        transform 0.3s ease;
}

.send-button:hover,
.send-button:focus-visible {
    color: #fff;
    border-color: #008783;
    background-color: #008783;

    transform: translateY(-3px);
}

/* 画面上に表示しない項目 */
.bot-field,
.visually-hidden {
    position: absolute;

    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;

    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;

    border: 0;
}


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

/* ----------------------------
   スクロール追従 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;
}


/* ========================================
   スマートフォン共通
   ヘッダー・ナビ・TOPアイコン
======================================== */

@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;
    }

    /* 現在表示中のページ */
    .nav-list p[aria-current="page"] {
        padding-bottom: 4px;
        border-bottom: 2px dashed #a0a5a5;
    }

     /* NameとE-mailを縦並びにする */
    .contact-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* メイン領域 */
    .contact-main {
        width: calc(100% - 32px);
        min-height: 100svh;
        padding: 180px 0 50px;
    }

    /* Contact見出し */
    .contact-title {
        margin-top: 35px;
        font-size: clamp(36px, 11vw, 48px);
        line-height: 1.25;
    }

    .contact-title span {
        font-size: inherit;
    }

    /* contact＋横線 */
    .contact-subtitle {
        gap: 15px;
        margin: 35px 0 45px;
        font-size: clamp(22px, 7vw, 28px);
    }

    /* フォーム背景 */
    .contact-form-area {
        width: 100%;
        padding: 30px 22px;
    }

    /* NameとE-mailを縦並びにする */
    .contact-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* 各入力項目 */
    .form-field {
        margin-bottom: 38px;
    }

    .form-field label {
        font-size: clamp(24px, 8vw, 31px);
    }

    /* 入力欄の文字サイズ */
    .form-field input,
    .form-field select,
    .form-field textarea {
        font-size: 16px;
    }

    /* プライバシーポリシー */
    .privacy-field {
        justify-content: flex-start;
        gap: 10px;

        margin-top: -10px;
        font-size: clamp(13px, 3.8vw, 15px);
        line-height: 1.7;
    }

    /* 送信ボタン */
    .submit-area {
        margin-top: 40px;
    }

    .send-button {
        min-width: 150px;
        min-height: 44px;
        font-size: 18px;
    }

    .scroll-top {
        position: fixed;
        right: 16px;

        /* 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:hover img {
        opacity: 0.6;
        transform: translateY(-4px);
    }
}