/* css/style.css */

/* =========== 1. テーマ変数の定義 =========== */
:root {
    /* デフォルト (ダークテーマ) */
    --primary-color: #4f46e5;     /* Indigo */
    --secondary-color: #10b981;   /* Emerald */
    --text-color: #e5e7eb;        /* Gray-200 */
    --bg-main: #1f2937;           /* Gray-800 */
    --bg-card: #374151;           /* Gray-700 */
    --bg-footer: #111827;         /* Gray-900 */
}

/* ライトテーマ用の変数定義 */
body[data-theme="light"] {
    --primary-color: #3b82f6;     /* Blue-500 */
    --secondary-color: #16a34a;   /* Green-600 */
    --text-color: #1f2937;        /* Gray-800 */
    --bg-main: #f3f4f6;           /* Gray-100 */
    --bg-card: #ffffff;           /* White */
    --bg-footer: #e5e7eb;         /* Gray-200 */
}


/* =========== 2. 基本リセットと共通スタイル =========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-main); /* 変数を参照 */
    color: var(--text-color); /* 変数を参照 */
    transition: background-color 0.3s, color 0.3s; /* テーマ切り替え時のアニメーション */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--bg-card);
}

.section h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

/* =========== 3. ヘッダー / ナビゲーション =========== */

#main-header {
    background: var(--bg-main);
    padding: 1rem 0;
    border-bottom: 2px solid var(--primary-color);
    transition: background-color 0.3s, box-shadow 0.3s; 
    position: sticky; /* スクロール時の効果に備え、positionを設定 */
    top: 0;
    z-index: 1000;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--primary-color);
    font-size: 1.5rem;
}

#main-header nav ul {
    list-style: none;
    display: flex;
}

#main-header nav ul li a {
    color: var(--text-color);
    padding: 0 15px;
    text-decoration: none;
    transition: color 0.3s;
}

#main-header nav ul li a:hover {
    color: var(--secondary-color);
}

/* ナビゲーションボタン (ダークモード切り替えボタン) */
.nav-btn {
    background: var(--bg-card);
    color: var(--text-color);
    border: 1px solid var(--bg-card);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* =========== 4. ヒーローセクション =========== */

#hero {
    /* 画像は別途assets/imagesに追加してください */
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('assets/images/hero-bg.jpg') no-repeat center center/cover; 
    min-height: 60vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 5rem 0;
}

#hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

/* =========== 5. プロジェクトセクション (動的) =========== */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.project-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px);
}

/* カード内部のスタイル */
.project-card h4 {
    color: var(--primary-color);
    margin-top: 10px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed var(--text-color);
}

.tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: bold;
}

/* ステータスバッジのスタイル */
.status {
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
}

.status-mvp開発完了 {
    background-color: var(--secondary-color);
    color: #1f2937;
}

.status-開発中 {
    background-color: orange;
    color: #1f2937;
}

.status-計画中 {
    background-color: gray;
    color: white;
}

.card-link {
    display: block;
    margin-top: 10px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    text-align: right;
}

/* =========== 6. フッター =========== */

#main-footer {
    background: var(--bg-footer);
    color: var(--text-color);
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
}

/* =========== 7. メンバー紹介セクションのスタイル =========== */

.text-center {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.member-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--primary-color);
}

.member-card h4 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.member-card .role {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.member-card .tags {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.member-card .tags span {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.tag-mbti {
    background-color: var(--primary-color);
    color: white;
}

.tag-focus {
    background-color: var(--bg-main); /* ダークテーマでは濃い背景 */
    color: var(--text-color);
    border: 1px solid var(--text-color);
}

/* ライトテーマ時の tag-focus の調整 */
body[data-theme="light"] .tag-focus {
    background-color: var(--bg-main); /* ライトテーマでは明るい背景 */
    color: var(--text-color);
    border: 1px solid var(--text-color);
}

.member-card .description {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.85;
}

/* =========== 8. コンタクトフォームのスタイル =========== */

.contact-area {
    max-width: 700px;
    margin: 3rem auto 0 auto;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 10px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--bg-main);
    border-radius: 5px;
    background-color: var(--bg-main);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.required {
    color: var(--secondary-color);
    font-size: 1.1em;
}

.form-submit-btn {
    margin-top: 20px;
    padding: 15px 25px;
    font-size: 1.1rem;
    cursor: pointer;
    align-self: flex-start; /* 左寄せ */
}

.form-note {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
}
