/* --- Base Styles --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Montserrat', 'Noto Sans JP', sans-serif; 
    color: #111; 
    line-height: 1.8; 
    background-color: #fff;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- Header --- */
header { 
    position: fixed; 
    top: 0; 
    width: 100%; 
    background: rgba(255, 255, 255, 0.95); 
    z-index: 100; 
    border-bottom: 1px solid #eee;
}
.header-inner { 
    max-width: 1200px; margin: 0 auto; padding: 1rem 5%; 
    display: flex; justify-content: space-between; align-items: center; 
}
.site-logo { height: 30px; width: auto; display: block; }
nav ul { display: flex; gap: 2rem; list-style: none; }
nav a { font-size: 0.8rem; font-weight: 600; }
nav a:hover { color: #0088ff; }

/* ナビゲーション全体の調整 */
nav ul { 
    display: flex; 
    gap: 2rem; 
    list-style: none; 
    align-items: center; /* ボタンが上下中央に来るように追加 */
}

/* お問い合わせボタン固有のスタイル */
nav a.btn-contact {
    background-color: #111; /* 背景色：黒 */
    color: #fff;            /* 文字色：白 */
    padding: 0.8rem 2rem;   /* ボタンのサイズ感 */
    border-radius: 50px;    /* 丸角 */
    font-size: 0.9rem;      /* 文字サイズ微調整 */
    transition: 0.3s;
}

/* ホバー時の挙動（お好みで調整してください） */
nav a.btn-contact:hover {
    background-color: #0088ff; /* 青色に変化 */
    color: #fff;
}

/* モバイル対応：スマホ等でボタンが大きすぎる場合の調整 */
@media (max-width: 768px) {
    nav ul { gap: 1rem; }
    nav a.btn-contact {
        padding: 0.5rem 1.2rem;
        font-size: 0.8rem;
    }
}

/* --- Hero --- */
.hero { 
    height: 80vh; background: #000; color: #fff; 
    display: flex; align-items: center; justify-content: center; text-align: center; 
}
.en-sub { font-size: 1.2rem; letter-spacing: 0.4rem; margin-bottom: 1rem; color: #0088ff; }
h1 { font-size: 2.2rem; font-weight: 300; letter-spacing: 0.2rem; }

/* --- Layout --- */
.container { max-width: 1100px; margin: 0 auto; padding: 8rem 5%; }
.bg-light { background-color: #f4f4f4; }
.section-title { 
    font-size: 0.8rem; 
    letter-spacing: 0.5rem;
    margin-bottom: 5rem;
    color: #666; 
    border-bottom: 1px solid #ddd; 
    display: inline-block; 
    padding-bottom: 0.5rem;
}

/* --- About --- */
.about-grid { display: grid; grid-template-columns: 1.8fr 1fr; gap: 4rem; }

.origin { 
    margin-top: 3rem; 
    /* 上下のパディングを0（または極小）にし、左側にだけ余白を作る */
    padding: 0.1rem 0 0.1rem 1.5rem; 
    background: #fff; 
    border-left: 1px solid #ccc; 
}

.origin h3 { 
    font-size: 0.9rem; 
    /* デフォルトの上の余白を消して、棒の頂点と文字の頭を揃える */
    margin-top: 0; 
    margin-bottom: 0.5rem; 
}

.origin p {
    /* 最後の行の下に余白が残らないようにして、棒の下端を揃える */
    margin-bottom: 0;
}

.profile-card { border-top: 1px solid #111; padding-top: 1rem; }
.name-en {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.name-ja {
    font-size: 0.85rem;
    color: #666;
}

/* --- Works (New) --- */
.works-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.work-item { background: #fff; transition: 0.3s; cursor: pointer; }
.work-item:hover { transform: translateY(-5px); }
.work-img { width: 100%; aspect-ratio: 16/9; background: #ddd; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: #aaa; }
.work-info {
    padding: 0 1.0rem 2rem 1.0rem; /* 上:0, 右:1.5rem, 下:2rem, 左:1.5rem */
}

.work-cat { 
    font-size: 0.7rem; 
    color: #0088ff; 
    margin-top: 1.5rem;   /* 画像との間の余白を少し広げました */
    font-weight: 600; 
    letter-spacing: 0.1rem; 
}

.work-item h3 { 
    font-size: 0.8rem; 
    margin-top: 0.5rem;   /* カテゴリとタイトルの間を少し調整 */
    line-height: 1.6;     /* 複数行になった時のために追加 */
    font-weight: 100;
}

/* YouTube埋め込み用のコンテナ */
.work-video {
    width: 100%;
    aspect-ratio: 16/9; /* HTMLの指定に合わせて16:9を維持 */
    background: #000;
}

.work-video iframe {
    width: 100%;
    height: 100%;
    vertical-align: middle;
}

/* 画像を枠いっぱいに、かつ比率を保って表示する設定 */
.work-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 枠に合わせてトリミングしつつ充填 */
    display: block;
}


/* --- Services --- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 3rem; }
.service-item h3 { margin-bottom: 1rem; font-size: 1.1rem; }

/* --- Tools --- */
.tools-list {
    font-size: 1.2rem;
    letter-spacing: 0.15rem;
    font-weight: 300;
    line-height: 2.2;
}

/* --- Contact (Clean White Design) --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.contact-lead { font-size: 0.95rem; color: #333; }
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.7rem; font-weight: 600; color: #666; }

.privacy-link {
    display: block;
    text-align: center;
    font-size: 0.7rem;
    color: #888;
    text-decoration: underline;
    margin-top: 0.5rem; /* ボタンとの間隔を少し詰める（お好みで） */
    transition: 0.3s;
}

.privacy-link:hover {
    color: #0088ff;
}

/* --- Contact (Placeholder Styling) --- */

/* 全ての入力欄のプレースホルダーを一括設定 */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #bbb;            /* 色を薄く（#aaaより少し明るいグレー） */
    font-weight: 300;       /* フォントを細く */
    opacity: 1;             /* Firefoxでの不透明度をリセット */
}

/* （参考）入力中の文字色も少し調整したい場合はこちら */
.form-group input, 
.form-group textarea { 
    padding: 1rem; 
    border: 1px solid #ddd; 
    background: #fff; 
    font-size: 1rem; 
    font-family: inherit;
    color: #333;            /* 入力した文字は読みやすく */
    font-weight: 500;       /* 入力した文字は少し太めにするなど */
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #0088ff; }

.submit-btn { 
    background: #111; 
    color: #fff; 
    padding: 1rem 4rem;      /* 横のパディングを増やして好みの長さに調整 */
    border: none; 
    border-radius: 50px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.3s;
    letter-spacing: 0.1rem;

    /* --- 追加・変更点 --- */
    align-self: center;      /* フォームの中央に配置 */
    width: auto;             /* 横幅を自動（パディング分）にする */
    min-width: 140px;        /* ボタンが短くなりすぎないよう最小幅を指定（任意） */
}

/* --- Animation: Fade In --- */

/* 最初は透明にしておく（これがふわっと出るための準備です） */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

/* スクロールして画面に入った時に、JSによってこのクラスが付与されます */
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Footer (Black) --- */
.site-footer { background: #000; color: #fff; padding: 4rem 0; text-align: center; }
.copyright { font-size: 0.7rem; color: #666; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .about-grid, .contact-wrapper { grid-template-columns: 1fr; }
    h1 { font-size: 1.5rem; }
    .container { padding: 5rem 5%; }
}


/* ----------フォトギャラリー---------- */

/* オーバーレイ：背景80%黒 */
.overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); 
    z-index: 1000; 
    justify-content: center; 
    align-items: center; 
    flex-direction: column;
}

/* ギャラリーコンテナ */
.gallery-content { 
    width: 90%; 
    max-width: 1000px; 
    text-align: center; 
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* メイン画像表示エリア */
.main-view { 
    width: 100%;
    height: 60vh; 
    margin-bottom: 40px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}
.main-img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
}

/* サムネイルエリア（メイン画像の75%幅に制限） */
.thumb-nav-container { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 75%; 
    margin: 0 auto;
}

/* 矢印：背景なし */
.arrow {
    color: #fff; 
    font-size: 32px; 
    cursor: pointer; 
    user-select: none;
    padding: 0 15px; 
    opacity: 0.5; 
    transition: 0.3s; 
    font-weight: 100;
}
.arrow:hover { opacity: 1; }

/* サムネイル表示窓 */
.thumb-viewport {
    overflow: hidden; 
    white-space: nowrap; 
    scroll-behavior: smooth;
    flex-grow: 1;
}

/* サムネイル単体 */
.thumb {
    width: 120px; 
    height: 80px; 
    object-fit: cover; 
    margin-right: 10px;
    cursor: pointer; 
    opacity: 0.6; 
    transition: 0.5s ease;
}
.thumb.active { opacity: 1; }

/* 極細×ボタン（通常時80%） */
.close-btn { 
    position: absolute; 
    top: -60px; 
    right: 0; 
    width: 30px; 
    height: 30px; 
    cursor: pointer; 
    opacity: 0.8; 
    transition: 0.3s;
}
.close-btn:hover { opacity: 1; }
.close-btn::before, .close-btn::after {
    content: ''; 
    position: absolute; 
    top: 50%; left: 0;
    width: 100%; 
    height: 1px; 
    background-color: #fff;
}
.close-btn::before { transform: rotate(45deg); }
.close-btn::after { transform: rotate(-45deg); }
