/* custom-style.css */

/* === 0. 基本的なリセットとタイポグラフィ === */
body {
    /* 画面全体の背景: ピンクベージュのグラデーション */
    background: linear-gradient(135deg, #fcf5ee 0%, #f7e9e5 100%);
    
    /* フォントと行高の基本的な設定 */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    margin: 0;
    padding-top: 0; 
    padding-bottom: 0;
}

/* === 1. 変数定義 (文字色をくすみブラウンに固定) === */
:root {
    --primary: #d46a81;         
    --primary-hover: #c95c73;
    /* 基本の文字色: ブラウン */
    --color: #8f6552; 
    --nav-bg: #fffbf9; 
}

/* === 2. 文字色の絶対適用 (すべての文字色をブラウンに統一) === */
body {
    color: var(--color);
}
/* すべてのテキスト要素にブラウンを適用 */
h1, h2, h3, h4, h5, h6, p, ul, ol, li, span, div, strong, small {
    color: var(--color) !important; /* !important を付けて強制的に適用 */
}
a {
    color: var(--color) !important; /* リンク色もブラウンに統一 */
    text-decoration: none; 
    transition: color 0.15s ease;
}
a:hover {
    color: var(--primary) !important; /* ホバー時のアクセントカラーは維持 */
    text-decoration: underline; 
}

/* === 3. Pico.css代替：コンテナとグリッド === */
.container {
    max-width: 1024px; 
    margin: 0 auto;
    padding: 0 1rem; 
}

main.container {
    padding-top: 8rem; /* アイコンとタイトル全体を下に移動 */
    padding-bottom: 4rem;
    min-height: 80vh; 
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 3rem;
    align-items: center;
}
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}


/* === 4. ヘッダー（ナビゲーション）のスタイル === */
.header-nav {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg); 
    border-bottom: 1px solid #f0e0d0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 0.75rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color); 
    text-decoration: none;
}
.app-title-link:hover {
    text-decoration: none;
    color: var(--primary-hover);
}


/* === 5. 見出しと段落のマージン調整 (Pico代替) === */
h1 { 
    font-size: 2.5rem; 
    margin-top: 0; 
    margin-bottom: 1rem;
}
h2 { font-size: 2rem; margin-bottom: 1rem;}
h3 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 0.5rem;}
p { margin-bottom: 1rem; }
ul { margin-bottom: 1rem; padding-left: 20px;}
li { margin-bottom: 0.5rem; }

/* === 6. トップページ専用のスタイル (アイコン配置・色調整) === */

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center; 
    height: 100%;
    position: relative; 
    text-align: left; 
}

/* ヒーローセクションのタイトル */
.hero-title {
    font-size: 3.5rem; 
    line-height: 1.1;
    margin-bottom: 0.5rem; 
    font-weight: 800;
    padding-top: 0; 
    position: relative; 
    display: block; 
    padding-left: 0; 
}

/* ヒーローセクションのサブタイトル */
.hero-subtitle {
    font-size: 1.35rem; 
    line-height: 1.4; /* 行間を狭める */
    color: var(--color); 
    white-space: pre-line; 
    margin-bottom: 2rem; 
}

/* アプリアイコンのスタイル (ヒーローセクション用) */
.hero-app-icon {
    width: 72px; 
    height: 72px;
    
    position: static; 
    
    margin: 0; 
    margin-bottom: 1.5rem; 
    
    display: block; 
    
    border-radius: 20%; 
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* スクリーンショットとボタンのブロック */
.screenshot-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 3rem; 
}

/* 2つのスクリーンショットを並べるためのラッパー */
.screenshots-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    gap: 1rem; 
    max-width: 100%;
}

/* スクリーンショットのコンテナ */
.screenshot-container {
    margin-bottom: 0;
}
/* 2枚並べるための画像サイズ調整 */
.dual-screenshot {
    max-height: 75vh; 
    max-width: 100%; 
    height: auto;
    border-radius: 25px; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* カスタム App Store ボタンのスタイル */
.download-section {
    margin-top: 2rem; 
    align-self: flex-start; 
}
.download-button-img {
    height: 55px; 
    margin: 0; 
    display: block;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease;
}
.download-button-img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* モバイル時の調整 */
@media (max-width: 768px) {
    .header-nav {
        padding: 0.5rem 0;
    }
    .hero-title {
        font-size: 3rem;
        padding-top: 0; 
        text-align: center; 
        padding-left: 0; 
    }
    .hero-subtitle {
        font-size: 1.1rem;
        text-align: center; 
    }
    main.container {
        padding-top: 4rem;
    }
    .hero-content {
        order: 1; /* 修正: 左の情報ブロックを最初に表示 */
        text-align: center; 
    }
    .screenshot-block {
        order: 2; /* 修正: スクリーンショットブロックを次に表示 */
        padding-top: 0; 
    }
    /* モバイルではスクリーンショットを縦積みに */
    .screenshots-wrapper {
        flex-direction: column; 
        gap: 2rem;
    }
    .dual-screenshot {
        max-height: 50vh; 
    }
    .hero-app-icon {
        position: static; 
        margin: 0 auto 1.5rem auto; 
        transform: none;
    }
    .download-section {
        align-self: center; 
    }
}


/* === 7. フッターのスタイル === */
footer {
    padding: 1.5rem 0;
    border-top: 1px solid #f0e0d0;
    background-color: var(--nav-bg); 
    font-size: 0.85rem;
}
footer .container {
    text-align: center;
}
footer a {
    text-decoration: underline;
}
.footer-links {
    margin-bottom: 8px;
}
.footer-copy {
    display: block;
    margin-top: 5px;
}