/* =============================================================
   ヒーロー再設計用CSS (v2 - 画像デザイン準拠版)
   - 「←今ここ」のラベルは削除
   - 状態の違いは控えめに(色の濃淡、ウェイト、不透明度で表現)
   - 既存のデザインシステムに準拠した余白・角丸・色味
   ============================================================= */

/* ===== 挨拶(ログイン中のみ表示) ===== */
.hero-greeting {
    font-size: 0.85rem;
    color: var(--color-text-light, #6a6a6a);
    margin-bottom: 0.8rem;
    letter-spacing: 0.02em;
    line-height: 1.6;
    font-weight: 400;
    /* デフォルトは非表示。JSで .is-shown を付けると見える */
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin-bottom 0.4s ease;
}
.hero-greeting.is-shown {
    opacity: 1;
    max-height: 3rem;
    margin-bottom: 0.8rem;
}
.hero-greeting-name {
    color: var(--color-primary-dark, #0F6E56);
    font-weight: 600;
}

/* ===== 2ステップカード上のリードテキスト ===== */
.hero-steps-lead {
    font-size: 0.72rem;
    color: var(--color-text-muted, #999);
    letter-spacing: 0.1em;
    margin: 0 0 0.55rem 0.4rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 0.9rem;
}

/* 「✓ 登録不要」「✓ 無料」の控えめなバッジ */
.hero-steps-lead-check {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--color-primary-dark, #0F6E56);
    font-weight: 500;
    letter-spacing: 0.06em;
}

.hero-steps-lead-tick {
    color: var(--color-primary, #1D9E75);
    font-weight: 700;
    margin-right: 1px;
}

/* ===== 2ステップカード (画像デザイン準拠) ===== */
.hero-steps {
    background: var(--color-bg-white, #fff);
    border-radius: 16px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.hero-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.3rem 0;
    transition: opacity 0.3s ease;
}
.hero-step-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-primary-dark, #0F6E56);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en, 'Inter', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    transition: all 0.3s ease;
}
.hero-step-body {
    flex: 1;
    min-width: 0;
    line-height: 1.6;
    padding-top: 0.15rem;
}
.hero-step-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text, #2c2c2c);
    margin-bottom: 0.2rem;
    transition: color 0.3s ease;
}
.hero-step-desc {
    font-size: 0.78rem;
    color: var(--color-text-light, #888);
    line-height: 1.7;
    transition: color 0.3s ease;
}
.hero-step-arrow {
    text-align: center;
    color: var(--color-text-muted, #b8b8b8);
    font-size: 0.9rem;
    margin: 0.3rem 0;
    line-height: 1;
    padding-left: 0.5rem;
    transition: color 0.3s ease;
}

/* --- 状態:完了したステップ(チェックマーク + 「何度でも」バッジ) --- */
/* 「終わり」感を出さず、「やった、また何度でもどうぞ」のトーン */
.hero-step.is-done {
    opacity: 0.75;
}
.hero-step.is-done .hero-step-num {
    background: #fff;
    color: var(--color-primary, #1D9E75);
    border: 1.5px solid var(--color-primary, #1D9E75);
    /* チェックマークを表示するため数字は透明に */
    font-size: 0;
    position: relative;
}
.hero-step.is-done .hero-step-num::before {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary, #1D9E75);
    line-height: 1;
}

/* タイトル行を flex にして「何度でも」バッジを横並びに */
.hero-step .hero-step-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    flex-wrap: wrap;
}
.hero-step-repeat-badge {
    display: none; /* デフォルト非表示。is-done のときだけ表示 */
    font-size: 0.62rem;
    color: var(--color-primary-dark, #0F6E56);
    background: var(--color-primary-bg, #E1F5EE);
    padding: 0.12rem 0.55rem;
    border-radius: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.5;
    flex-shrink: 0;
}
.hero-step.is-done .hero-step-repeat-badge {
    display: inline-block;
}

/* --- 状態:次にやるステップ(自然なハイライト) --- */
/* ラベルを使わず、コントラストと「うっすら背景」で次へ誘導 */
.hero-step.is-next {
    background: linear-gradient(90deg, rgba(29, 158, 117, 0.06), rgba(29, 158, 117, 0));
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
    margin: 0 -0.7rem;
}
.hero-step.is-next .hero-step-num {
    background: var(--color-primary-dark, #0F6E56);
    box-shadow: 0 0 0 4px rgba(29, 158, 117, 0.12);
}
.hero-step.is-next .hero-step-title {
    color: var(--color-primary-dark, #0F6E56);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .hero-steps {
        padding: 1.1rem 1.2rem;
        margin-bottom: 1.4rem;
        border-radius: 14px;
    }
    .hero-step { gap: 0.8rem; }
    .hero-step-num { width: 26px; height: 26px; font-size: 0.78rem; }
    .hero-step.is-done .hero-step-num::before { font-size: 0.78rem; }
    .hero-step-title { font-size: 0.88rem; }
    .hero-step-desc { font-size: 0.74rem; }
    .hero-step.is-next {
        margin: 0 -0.5rem;
        padding: 0.4rem 0.5rem;
    }
}

/* =============================================================
   ステップカードをクリッカブルに(カードタップで該当機能を起動)
   ============================================================= */
.hero-step-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.hero-step-clickable:hover {
    background-color: rgba(29, 158, 117, 0.04);
    border-radius: 10px;
}
/* is-next と組み合わさったときは元のグラデを優先 */
.hero-step-clickable.is-next:hover {
    background: linear-gradient(90deg, rgba(29, 158, 117, 0.10), rgba(29, 158, 117, 0.02));
}
.hero-step-clickable:active {
    transform: scale(0.99);
}
.hero-step-clickable:focus-visible {
    outline: 2px solid var(--color-primary, #1D9E75);
    outline-offset: 2px;
    border-radius: 10px;
}

/* =============================================================
   チャットボット開いている時:右カラムのアニメだけ非表示
   左カラムは元の位置に固定(動きが起きないようにスペースは残す)
   ============================================================= */
.hero-with-demo-right {
    transition: opacity 0.3s ease;
}
body.is-chatbot-open .hero-with-demo-right {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
