/* ========================================
   Chronote フロントページ専用スタイル
   ======================================== */

/* --- リセット・基本 --- */
/* ※ 背景色・レイアウト幅はSWELLフルワイドブロック側で制御 */

/* --- セクション共通 --- */
.front-section__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 80px 24px;
}

.front-section__title {
    font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: 0.05em;
}

/* --- ボタン共通 --- */
.front-btn {
    display: inline-block;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.front-btn--primary {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.front-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: #ffffff;
    text-decoration: none;
}

.front-btn--primary:active {
    transform: translateY(0);
}

/* button要素のリセット */
button.front-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}


/* ========================================
   1. ヒーローセクション
   ======================================== */
.front-hero {
    background: #f9f6f2;
    color: #1a1a1a;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 原稿用紙パターン
   構造: 列幅36px + 列間余白10px = 46px周期
   マス: 縦32px（横線1px含む）
   列間の余白には横線を入れない */
.front-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* 1) 列間の余白をベース色で塗りつぶし（横線を隠す） */
        repeating-linear-gradient(
            to right,
            transparent 0px,
            transparent 37px,
            #f9f6f2 37px,
            #f9f6f2 46px
        ),
        /* 2) 列の縦線（左右） */
        repeating-linear-gradient(
            to right,
            #cdc4b7 0px,
            #cdc4b7 1px,
            transparent 1px,
            transparent 36px,
            #cdc4b7 36px,
            #cdc4b7 37px,
            transparent 37px,
            transparent 46px
        ),
        /* 3) マスの横線（細め・全幅に引くが、1で列間は隠される） */
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 31px,
            #d8d0c5 31px,
            #d8d0c5 32px
        );
    background-size: 46px 32px, 46px 32px, 46px 32px;
    pointer-events: none;
    z-index: 0;
}

/* 天地グラデーション（原稿用紙を背景に溶け込ませる） */
.front-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, #f9f6f2 0%, transparent 12%),
        linear-gradient(to top, #f9f6f2 0%, transparent 12%);
    pointer-events: none;
    z-index: 0;
}

.front-hero__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 100px 24px 80px;
    position: relative;
    z-index: 1;
}

.front-hero__title {
    font-family: "Noto Serif JP", serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    animation: showTitle 0s 0.05s forwards;
}

@keyframes showTitle {
    to { opacity: 1; }
}

.front-hero__subtitle {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 40px;
    color: #555;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 3.2s;
}

.front-hero__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 4s;
}

/* --- ヒーロー アニメーション --- */
.front-hero__char {
    opacity: 0;
    display: inline-block;
    animation: charFadeIn 0.8s ease forwards;
}

@keyframes charFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ========================================
   2. 3ステップ
   ======================================== */

.front-steps__flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.front-steps__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 180px;
}

.front-steps__icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.front-steps__icon svg {
    width: 28px;
    height: 28px;
    stroke: #ffffff;
}

.front-steps__label {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.front-steps__desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.front-steps__arrow {
    display: flex;
    align-items: center;
    padding-top: 18px;
    flex: 0 0 40px;
}

.front-steps__arrow svg {
    width: 24px;
    height: 24px;
    stroke: #ccc;
}


/* ========================================
   3. 特徴4つ
   ======================================== */

.front-features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.front-features__card {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.front-features__card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.front-features__card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #764ba2;
}

.front-features__card-icon svg {
    width: 100%;
    height: 100%;
}

.front-features__card-title {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.front-features__card-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}


/* ========================================
   4. CTA（クロージング） — 原稿用紙 + 縦書き
   ======================================== */
.front-cta {
    background: #f9f6f2;
    color: #1a1a1a;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* --- 原稿用紙パターン（ヒーローと同じ） --- */
.front-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* 1) 列間の余白をベース色で塗りつぶし（横線を隠す） */
        repeating-linear-gradient(
            to right,
            transparent 0px,
            transparent 37px,
            #f9f6f2 37px,
            #f9f6f2 46px
        ),
        /* 2) 列の縦線（左右） */
        repeating-linear-gradient(
            to right,
            #cdc4b7 0px,
            #cdc4b7 1px,
            transparent 1px,
            transparent 36px,
            #cdc4b7 36px,
            #cdc4b7 37px,
            transparent 37px,
            transparent 46px
        ),
        /* 3) マスの横線 */
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 31px,
            #d8d0c5 31px,
            #d8d0c5 32px
        );
    background-size: 46px 32px, 46px 32px, 46px 32px;
    pointer-events: none;
    z-index: 0;
}

/* 天地グラデーション（原稿用紙を背景に溶け込ませる・ヒーローより狭めて表示範囲を広く） */
.front-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, #f9f6f2 0%, transparent 12%),
        linear-gradient(to top, #f9f6f2 0%, transparent 12%);
    pointer-events: none;
    z-index: 0;
}

/* --- CTAコンテンツ --- */
.front-cta .front-section__inner {
    padding: 120px 24px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* --- 縦書きメッセージ（背景装飾・マス目合わせ） ---
   原稿用紙: 列幅36px, マス高32px（横線1px含む）
   縦書き時: font-sizeが文字の幅・高さに対応
   font-size 26px + letter-spacing 6px = 32px（マス1つ分） */
.front-cta__tategaki {
    position: absolute;
    right: calc(50% - 380px);
    top: 50%;
    transform: translateY(calc(-50% - 6px));
    writing-mode: vertical-rl;
    height: 192px; /* 6文字 × 32px（マス1つ分） */
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}

.front-cta__tategaki-line {
    display: block;
    font-family: "Noto Serif JP", serif;
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 6px;
    line-height: 25px;
    color: #1a1a1a;
    white-space: nowrap;
}

/* 2行目「あなたの物語」行頭1文字空け + 行間 */
.front-cta__tategaki-line:nth-child(2) {
    padding-top: 32px; /* マス1つ分 */
    margin-right: 20px; /* 列間余白（vertical-rlでは右=前の列との間） */
}

/* --- ボタン・リンク（メイン） --- */
.front-cta__buttons {
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.front-cta__detail-link {
    display: inline-block;
    color: #998877;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.front-cta__detail-link:hover {
    color: #665544;
    text-decoration: none;
    transform: translateY(2px);
}


/* ========================================
   レスポンシブ
   ======================================== */

/* タブレット */
@media (max-width: 768px) {
    .front-section__inner {
        padding: 60px 20px;
    }

    .front-section__title {
        font-size: 24px;
        margin-bottom: 36px;
    }

    /* ヒーロー */
    .front-hero__inner {
        padding: 72px 20px 60px;
    }

    .front-hero__title {
        font-size: 32px;
    }

    .front-hero__subtitle {
        font-size: 15px;
    }

    /* ステップ: 横→縦 */
    .front-steps__flow {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .front-steps__item {
        flex: none;
        width: 100%;
        max-width: 260px;
    }

    .front-steps__arrow {
        padding-top: 0;
        transform: rotate(90deg);
        flex: 0 0 32px;
    }

    /* 特徴: 4列→2列 */
    .front-features__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* CTA */
    .front-cta .front-section__inner {
        padding: 80px 20px;
        min-height: 260px;
    }

    .front-cta__tategaki {
        right: calc(50% - 180px);
    }

    .front-cta__tategaki-line {
        font-size: 22px;
        letter-spacing: 10px;
        line-height: 30px;
    }
}

/* モバイル */
@media (max-width: 480px) {
    .front-section__inner {
        padding: 48px 16px;
    }

    .front-section__title {
        font-size: 22px;
        margin-bottom: 28px;
    }

    /* ヒーロー */
    .front-hero__inner {
        padding: 56px 16px 48px;
    }

    .front-hero__title {
        font-size: 28px;
    }

    .front-hero__subtitle {
        font-size: 14px;
    }

    .front-btn {
        padding: 14px 32px;
        font-size: 15px;
    }

    /* 特徴: 2列→1列 */
    .front-features__grid {
        grid-template-columns: 1fr;
    }

    .front-features__card {
        padding: 28px 20px;
    }

    /* CTA */
    .front-cta .front-section__inner {
        padding: 64px 16px;
        min-height: 220px;
    }

    .front-cta__tategaki {
        right: 34px;
    }

    .front-cta__tategaki-line {
        font-size: 18px;
        letter-spacing: 14px;
        line-height: 26px;
    }

    .front-cta__tategaki-line:nth-child(2) {
        margin-right: 6px;
    }
}
