@charset "UTF-8";

/* --- 1. 横揺れ（横スクロール）完全防止の絶対ルール --- */
html,
body {
    overflow-x: hidden;
    /* 横方向のはみ出しを強制的に隠し、スクロールを無効化 */
    width: 100%;
    margin: 0;
    padding: 0;
}

/* --- 2. 要素の幅計算を統一し、はみ出しを根本から防ぐ --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* --- 3. 画像が画面幅を突き破るのを防ぐ --- */
img {
    max-width: 100%;
    height: auto;
}

:root {
    --font-main: 'Inter', sans-serif;
    --bg-color: #FFFFFF;
    --card-bg-color: #F9F9F9;
    --main-text-color: #333333;
    --sub-text-color: #888888;
    --primary-color: #333333;
    --line-color: #E5E5E5;
}

/* --- ユーティリティ --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sp-only {
    display: none;
}

/* サイト全体のタイポグラフィとカラー設定 */
body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    /* 英語はInter、日本語はNoto Sans JPを優先 */
    color: #333333;
    /* JSON定義：textMain */
    background-color: #FFFFFF;
    /* JSON定義：bgMain */
    line-height: 1.8;
    /* 行間を広げて風通しを良くする */
    letter-spacing: 0.04em;
    /* 文字間を少し開けてモダンな印象に */
    -webkit-font-smoothing: antialiased;
    /* 文字の輪郭を滑らかに（Mac/iOS向け） */
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 見出しのスタイル調整 */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--main-text-color);
    line-height: 1.4;
    letter-spacing: 0.05em;
}

/* サブテキスト・補足説明のスタイル */
.section-subtitle,
.text-muted {
    color: var(--sub-text-color);
    font-size: 0.95rem;
}

/* ヘッダーの固定とミニマルデザインの適用 */
header {
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 1000;
    /* サイト内で常に最前面に表示 */
    border-bottom: 1px solid var(--line-color);
    padding: 15px 0;
    /* 上下の余白を少し持たせてスッキリさせる */
    width: 100%;
}

/* Centered Logo Container */
.centered-logo-container {
    text-align: center;
    padding: 0px 0;
    /* Reduced padding */
    margin-top: 0px;
    /* Reduced margin */
}

.centered-logo-container .logo-link {
    display: inline-block;
    /* Allows margin auto to work for centering */
    text-decoration: none;
}

.centered-logo-container .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center items within the flex container */
}

.centered-logo-container .header-favicon {
    width: 96px;
    height: auto;
    margin-right: 10px;
}

.centered-logo-container .main-logo {
    width: 256px;
    height: auto;
}

/* --- Projects Container (インラインスタイルの外部CSS化) --- */
.projects-container {
    text-align: center;
    padding: 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.projects-container .section-title {
    margin-bottom: 50px;
}

/* --- Contact Container (インラインスタイルの外部CSS化) --- */
.contact-container {
    text-align: center;
    padding: 80px 20px;
}

.contact-container .section-title {
    margin-bottom: 10px;
}

.contact-container .section-subtitle {
    margin-bottom: 40px;
    color: #666;
}

.contact-btn-wrapper {
    margin-bottom: 20px;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    /* Fallback */
    min-height: 100svh;
    /* Stable mobile height */
    background-image: url('../images/main_background.JPG');
    /* Path fixed for css folder */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    /* Black color for better visibility */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    /* Lighter text shadow */
    flex-direction: column;
    padding-top: 0;
    /* No fixed header, so no padding needed */
    box-sizing: border-box;
}

.hero-section h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 2.2em;
    /* Increased font size for better visibility */
    font-family: "BIZ UMincho", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
    /* Mincho font */
    font-weight: bold;
    /* Make text bold */
    color: white;
    /* Keep text white */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    /* Slightly stronger text shadow */
}

.ib-text {
    display: inline-block;
}

/* Main Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    /* Center the navigation links */
    background-color: rgba(255, 255, 255, 0.9);
    /* Semi-transparent white background */
    padding: 8px 0;
    /* Reduced padding */
    /* box-shadow: none; */
    /* Removed box-shadow to remove the line */
    z-index: 90;
}

.main-nav a {
    color: var(--main-text-color);
    text-decoration: none;
    padding: 8px 15px;
    /* Slightly smaller padding */
    margin: 0 8px;
    /* Slightly smaller margin */
    font-weight: normal;
    /* Removed bold */
    font-size: 0.9em;
    /* Slightly smaller font size */
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #0056b3;
}

/* Main content styles */
.main-content {
    flex-grow: 1;
    max-width: 960px;
    margin: 40px auto;
    padding: 20px;
    text-align: left;
    box-sizing: border-box;
}

section {
    margin-bottom: 40px;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

section:last-child {
    border-bottom: none;
}

/* .project-card はL370付近で詳細定義済みのため、ここでは省略 */

.main-content h2,
.main-content h3 {
    color: var(--main-text-color);
    text-align: center;
}

p {
    line-height: 1.6;
    margin-bottom: 1em;
}

footer {
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--main-text-color);
    text-align: center;
    padding: 20px;
    margin-top: auto;
    z-index: 90;
}

footer .footer-nav {
    padding-bottom: 15px;
    display: flex;
    justify-content: center;
}

footer .footer-nav a {
    color: var(--main-text-color);
    text-decoration: none;
    padding: 0 10px;
    font-size: 0.9em;
}

footer .footer-nav a:hover {
    color: #0056b3;
}



/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    line-height: 44px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    transition: background-color 0.3s;
}

#back-to-top:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* 共通のボタンスタイル */
.common-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 0;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
    cursor: pointer;
    box-shadow: none;
    box-sizing: border-box;
}

/* ホバー時の共通動作 */
.common-btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(0);
    box-shadow: none;
}

/* お問い合わせボタン（メイン） */
.main-btn {
    padding: 18px 40px;
    width: 100%;
    max-width: 400px;
}

.main-btn .arrow {
    margin-left: 10px;
    font-weight: bold;
}

/* --- Projects Section --- */
/* グリッドレイアウト（PCでは3列、スマホでは1列に自動調整） */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* ミニマル・カードデザイン */
.project-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--line-color);
    border-radius: 0;
    box-shadow: none;
    padding: 40px 30px;
    text-align: left;
    transition: border-color 0.3s ease;
    margin-bottom: 0;
}

.project-card:hover {
    border-color: var(--primary-color);
}

/* プロジェクト名（見出し） */
.project-name {
    font-family: "Inter", sans-serif;
    color: var(--main-text-color);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-flex;
    align-items: center;
    padding-bottom: 8px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.project-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    /* テキストとの間隔 */
    line-height: 1;
    /* アイコンの高さズレ防止 */
}

/* プロジェクト説明文 */
.project-desc {
    color: var(--main-text-color);
    font-size: 14px;
    line-height: 1.8;
    letter-spacing: 0.03em;
}

/* --- Contact Section & Social Buttons --- */

/* 下段：SNSボタンの親要素 */
.social-links-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(24px, 6vw, 60px);
    /* アイコン同士の間隔を画面幅に合わせて可変（最小24px〜最大60px） */
    margin-top: 30px;
    padding: 0;
    flex-wrap: nowrap;
    /* 勝手に折り返さないようにする */
}

/* 下段：SNSボタン（アイコンのみ） */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    /* スマホで指で押しやすい最小サイズを確保 */
    height: 44px;
    min-width: 0;
    color: var(--primary-color);
    font-size: 22px;
    /* アイコンの大きさを統一 */
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.7;
    /* 通常時は少しだけ色を落として控えめに */
    background: transparent;
    /* 以前のボタン背景を完全に消去 */
    border: none;
    /* 以前のボタン枠線を完全に消去 */
    box-shadow: none;
    flex: none;
    padding: 0;
}

/* SVG自体のサイズ調整（フォントサイズ指定だけでは効かない場合のため） */
.social-btn svg {
    width: 24px;
    height: 24px;
}

/* ホバー時の美しいインタラクション */
.social-btn:hover {
    opacity: 1;
    /* マウスを乗せるとくっきり黒になる */
    transform: translateY(-3px);
    /* ほんの少しだけ上にフワッと浮く */
    background-color: transparent;
    color: var(--primary-color);
}

/* スマホ対応 */
@media (max-width: 768px) {

    /* ヘッダー全体の上下余白を最小限にする */
    header {
        padding: 10px 0;
    }

    /* ロゴ画像をコンパクトにする */
    .centered-logo-container .header-favicon,
    .centered-logo-container .main-logo {
        max-height: 40px;
        width: auto;
        margin-bottom: 5px;
    }

    /* ナビゲーションリンクを横一列に並べ、文字を小さくする */
    .main-nav {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        /* リンク同士の隙間を適度に詰める */
        margin: 0;
        padding: 0;
    }

    .main-nav a {
        font-size: 13px;
        /* スマホ用に文字サイズを調整 */
        padding: 5px 0;
        margin: 0;
    }

    .common-btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .sp-only {
        display: block;
    }

    .projects-container {
        padding: 40px 15px;
    }

    .contact-container {
        padding: 40px 15px;
    }

    .centered-logo-container .logo-container {
        padding: 0 10px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1.3rem;
        /* Adjusted for better readability on mobile */
        padding: 0 20px;
        word-wrap: break-word;
        /* Ensure long words don't overflow */
    }

    /* main-btn override for mobile */
    .main-btn {
        width: 100%;
        padding: 18px 20px;
    }

    /* social-btn override for mobile (prevent full width) */
    .social-btn {
        width: 44px;
        max-width: none;
        margin: 0;
        flex: none;
    }
}