/* ==========================================================================
   基本設定
   ========================================================================== */
:root {
    --color-base: #f9f9f9;
    --color-text: #2c2c2c;
    /* WCAG準拠のため少し濃く */
    --color-primary: #3a5f9b;
    /* 知性のブルー */
    --color-accent: #c0a062;
    /* 希望のゴールド */
    --color-white: #ffffff;
    --color-light-gray: #f0f0f0;
    --color-link-focus: #1a4480;
    /* フォーカス時の色 */
    --font-heading: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 25px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* ヘッダー固定時のアンカーずれ防止 */
}

body {
    font-family: var(--font-body);
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-base);
    font-size: 16px;
}

/* ==========================================================================
   共通コンポーネント
   ========================================================================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 80px 0;
    overflow: hidden;
    /* アニメーション要素のはみ出し防止 */
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-primary);
}

.section-title span {
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}

.section-title span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), #e0c082);
    border-radius: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.4;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

blockquote {
    font-style: italic;
    margin: 0;
    padding: 0;
}

/* アクセシビリティ: フォーカス表示 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ==========================================================================
   スクロール連動アニメーション
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   プログレスバー
   ========================================================================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    z-index: 2000;
    background-color: transparent;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    transition: width 0.1s linear;
}

/* ==========================================================================
   ヒーローセクション
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, #e9f2ff 0%, #fffaf0 100%);
    padding: 60px 0;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1 1 55%;
}

.hero-image {
    flex: 1 1 45%;
    text-align: center;
    min-height: 460px;
    /* CLS対策 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    max-width: 320px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    transform: rotate(3deg);
}

.hero-catch {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 500;
    color: var(--color-primary);
}

.hero-book-title {
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 800;
    color: var(--color-primary);
    margin: 10px 0;
    line-height: 1.1;
}

.hero-sub-title {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-sub {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 30px;
}

.hero-cta {
    font-size: 1.2rem;
}

/* ==========================================================================
   共感セクション (チェックリスト)
   ========================================================================== */
.empathy-section {
    background-color: var(--color-white);
}

.checklist {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

.checklist li {
    font-size: 1.1rem;
    font-weight: 500;
    background-color: var(--color-base);
    padding: 20px 25px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--color-accent);
    box-shadow: var(--shadow-light);
}

.checklist li i {
    color: var(--color-accent);
    margin-right: 15px;
    font-size: 1.2em;
}

/* ==========================================================================
   購入理由セクション
   ========================================================================== */
.reason-section {
    background-color: var(--color-white);
}

.reason-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-base);
    padding: 30px;
    border-radius: var(--border-radius);
}

.reason-item {
    text-align: center;
    flex: 1;
}

.reason-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    padding: 5px 15px;
    border-radius: 20px;
    color: var(--color-white);
    display: inline-block;
    margin-bottom: 15px;
}

.reason-item.before .reason-label {
    background-color: #e74c3c;
}

.reason-item.after .reason-label {
    background-color: #2ecc71;
}

.reason-arrow {
    font-size: 3rem;
    color: var(--color-accent);
}

/* ==========================================================================
   価値提案セクション
   ========================================================================== */
.value-section {
    background-color: var(--color-base);
}

.value-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.value-card {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.value-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(58, 95, 155, 0.15);
}

.value-card h3 {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.value-card h3 i {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--color-accent);
}

/* ==========================================================================
   独自性・信頼性セクション
   ========================================================================== */
.uniqueness-section {
    background: linear-gradient(160deg, var(--color-primary) 0%, #2c4a8a 100%);
    padding: 80px 0;
}

.section-title-special {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-white);
}

.academic-highlight {
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 40px;
    border-top: 8px solid var(--color-accent);
}

.academic-icon {
    font-size: 5rem;
    color: var(--color-primary);
}

.academic-text h3 {
    font-size: 1.6rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.academic-highlight blockquote {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-primary);
    border-left: 4px solid var(--color-accent);
    padding-left: 20px;
    margin-top: 20px;
}

.academic-highlight blockquote i {
    font-size: 0.8em;
    opacity: 0.7;
}

/* ==========================================================================
   社会的証明（推薦の声）セクション
   ========================================================================== */
.social-proof-section {
    background-color: var(--color-white);
}

.testimonial-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--color-base);
    padding: 30px;
    border-left: 5px solid var(--color-accent);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.testimonial-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: 700;
    text-align: right;
    color: var(--color-primary);
}

/* ==========================================================================
   立ち読みセクション
   ========================================================================== */
.preview-section {
    background: linear-gradient(135deg, #e9f2ff 0%, #fffaf0 100%);
}

.preview-content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.preview-content h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.preview-content blockquote {
    line-height: 2;
    font-size: 1.1rem;
}

/* ==========================================================================
   目次セクション
   ========================================================================== */
.contents-section {
    background-color: var(--color-base);
}

.contents-box {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--color-white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.contents-list {
    list-style-position: inside;
    font-size: 1.1rem;
}

.contents-list li {
    margin-bottom: 15px;
    padding-left: 10px;
}

.contents-list li::marker {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
}

.case-studies {
    margin-top: 10px;
    padding-left: 40px;
    list-style-type: none;
}

.case-studies li {
    color: var(--color-primary);
    font-style: italic;
    position: relative;
    padding-left: 25px;
    font-size: 1rem;
}

.case-studies li::before {
    content: '→';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--color-accent);
}

/* ==========================================================================
   FAQセクション
   ========================================================================== */
.faq-section {
    background-color: var(--color-white);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #ddd;
}

.faq-question {
    font-size: 1.2rem;
    padding: 20px 0;
    cursor: pointer;
    position: relative;
    color: var(--color-primary);
    font-weight: 700;
}

.faq-question::after {
    content: '\f067';
    /* Font Awesome Plus */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding-bottom: 20px;
    line-height: 1.8;
}

/* ==========================================================================
   著者紹介セクション
   ========================================================================== */
.author-section {
    background-color: var(--color-base);
}

.author-card {
    display: flex;
    align-items: center;
    gap: 40px;
    background-color: var(--color-white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.author-image {
    flex-shrink: 0;
}

.author-image img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.author-info p {
    margin-bottom: 15px;
}

/* ==========================================================================
   CTAセクション
   ========================================================================== */
.cta-section {
    background: linear-gradient(135deg, #e9f2ff 0%, #fffaf0 100%);
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: var(--color-primary);
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, var(--color-accent), #d4b57a);
    color: white;
    padding: 20px 40px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(192, 160, 98, 0.4);
    transition: all 0.3s ease;
    min-height: 44px;
    /* タップターゲット確保 */
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(192, 160, 98, 0.5);
}

.cta-button i {
    margin-right: 10px;
}

/* ==========================================================================
   AdSense広告エリア
   ========================================================================== */
.ad-section {
    padding: 40px 0;
    text-align: center;
    background-color: var(--color-base);
}

.ad-section .container {
    min-height: 100px;
    /* 広告ロード失敗時のがたつき防止 */
}

/* ==========================================================================
   フッター
   ========================================================================== */
.footer {
    background-color: #2c3e50;
    color: var(--color-light-gray);
    padding: 40px 0;
    text-align: center;
}

.footer-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    color: var(--color-white);
    font-size: 1.8rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--color-accent);
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==========================================================================
   ページトップ戻りボタン
   ========================================================================== */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    z-index: 1000;
    text-align: center;
    line-height: 50px;
    text-decoration: none;
    box-shadow: var(--shadow-light);
    transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
}

.back-to-top-btn:hover {
    background-color: var(--color-primary);
    transform: scale(1.1);
}

/* ==========================================================================
   レスポンシブ対応
   ========================================================================== */
@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-image {
        margin-top: 40px;
        min-height: auto;
    }

    .hero-image img {
        max-width: 280px;
    }

    .academic-highlight,
    .author-card {
        flex-direction: column;
        text-align: center;
    }

    .academic-icon,
    .author-image {
        margin-bottom: 20px;
    }

    .reason-box {
        flex-direction: column;
    }

    .reason-arrow {
        transform: rotate(90deg);
        margin: 20px 0;
    }

    /* モバイルでのカードスワイプ */
    .value-cards {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        /* iOSでの慣性スクロール */
        gap: 20px;
    }

    .value-card {
        flex: 0 0 80%;
        scroll-snap-align: center;
    }

    .cta-button {
        padding: 18px 35px;
        font-size: 1.2rem;
    }
}