/* ==========================================================================
   基本設定
   ========================================================================== */
:root {
    --color-base: #f5f5f5;
    --color-text: #333333;
    --color-accent: #5a768a;
    /* 彩度の低い青 */
    --color-white: #ffffff;
    --color-border: #dddddd;
    --font-heading: 'Noto Serif JP', serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.9;
    color: var(--color-text);
    background-color: var(--color-base);
    background-image: url('../img/paper-texture.png');
    /* ざらついた紙のテクスチャ画像を指定 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.sp-only {
    display: none;
}

/* ==========================================================================
   ヒーローセクション
   ========================================================================== */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 60px 24px;
    text-align: center;
    background-color: #1a1a1a;
    color: var(--color-white);
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/namelessdream.jpg');
    /* ぼかした背景画像 */
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    filter: blur(5px) grayscale(50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeIn 2s ease-in-out;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 40px;
}

.book-cover {
    max-width: 250px;
    margin: 0 auto 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.book-cover img {
    width: 100%;
    /* 親要素(.book-cover)の幅いっぱいに広がるように設定 */
    height: auto;
    /* 幅に合わせて高さを自動調整し、縦横比を維持 */
    display: block;
    /* 画像の下にできる余分な隙間をなくす */
}

.hero-cta {
    font-size: 1rem;
    font-weight: 500;
}

/* ==========================================================================
   セクション共通
   ========================================================================== */
main section {
    padding: 100px 0;
    border-bottom: 1px solid var(--color-border);
}

main section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    text-align: center;
    margin-bottom: 60px;
    font-weight: 400;
}

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

.intro-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 2.2;
    text-align: center;
}

/* ==========================================================================
   読者の悩みセクション
   ========================================================================== */
.concerns-list {
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
}

.concerns-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 20px;
}

.concerns-list li::before {
    content: '・';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

/* ==========================================================================
   書籍紹介セクション
   ========================================================================== */
.book-introduction {
    background-color: var(--color-white);
}

.chapters {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.chapter {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.chapter-number-wrapper {
    flex-shrink: 0;
}

.chapter-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
    opacity: 0.5;
}

.chapter-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.chapter-description {
    font-size: 1rem;
}

/* ==========================================================================
   読者の声セクション
   ========================================================================== */
.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.testimonial {
    border-left: 3px solid var(--color-accent);
    padding-left: 25px;
}

.rating {
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.testimonial-text {
    margin-bottom: 15px;
}

.testimonial cite {
    font-style: normal;
    font-size: 0.9rem;
    color: #777;
}

/* ==========================================================================
   CTAセクション
   ========================================================================== */
.cta-section {
    background-color: var(--color-white);
    text-align: center;
}

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

.cta-button {
    display: inline-block;
    text-decoration: none;
    color: var(--color-text);
    border: 1px solid var(--color-text);
    padding: 15px 40px;
    transition: background-color 0.3s, color 0.3s;
}

.cta-button:hover {
    background-color: var(--color-text);
    color: var(--color-white);
}

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

.ad-section .container {
    min-height: 100px;
}

/* ==========================================================================
   フッター
   ========================================================================== */
.footer {
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #777;
}

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

.social-links a {
    color: #777;
    transition: color 0.3s;
}

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

/* ==========================================================================
   ページトップ戻りボタン
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--color-text);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.back-to-top:hover {
    opacity: 1;
}

/* ==========================================================================
   アニメーション
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

main section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s, transform 0.8s;
}

main section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   レスポンシブ対応
   ========================================================================== */
@media (max-width: 768px) {
    body {
        font-size: 15px;
        line-height: 1.8;
    }

    .sp-only {
        display: block;
    }

    main section {
        padding: 80px 0;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .intro-text {
        font-size: 1.1rem;
        line-height: 2;
    }

    .chapter {
        flex-direction: column;
        gap: 15px;
    }
}