/* ==============================================
   HERO.CSS - ヒーローセクション関連スタイル
   ============================================== */

/* メインヒーローセクション */
.hero {
    padding-bottom: 0;
    min-height: 100vh; /* 60vhから100vhに拡大 */
    display: flex;
    align-items: flex-start; /* 上部寄せに変更 */
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: var(--space-xl); /* 比率ベースパディング */
}

.hero-content {
    width: 100%; /* 中央カラム幅いっぱいに設定 */
    max-width: 100%; /* 最大幅も100%に設定 */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* 上部寄せに変更 */
    position: relative;
    z-index: 10; /* サークルより前面に表示 */
}

.hero-text {
    margin-top: var(--space-xl); /* 比率ベースマージン */
    position: relative;
    z-index: 5;
    transform: scale(1.5); /* 150%拡大 */
    display: flex;
    flex-flow: column;
}

/* ヒーローキャッチコピー */
.hero-catchcopy {
    font-family: 'Sawarabi Mincho', serif;
    font-size: var(--font-hero); /* 比率ベースサイズ（clamp(1.8rem, 4.5vw, 2.8rem)） */
    font-weight: 300;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    margin-top: 0; /* 上部マージンを削除 */
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: clamp(240px, 25vh, 320px); /* 比率ベース高さ */
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3; /* 行間を調整して改行位置を最適化 */
    white-space: pre-line; /* 改行を保持 */
    transition: font-size var(--transition-normal), 
                height var(--transition-normal),
                writing-mode var(--transition-normal),
                text-orientation var(--transition-normal);
}

/* キャッチコピーの文字アニメーション */
.hero-catchcopy .char {
    display: inline-block;
    opacity: 0;
    filter: blur(20px);
    animation: fadeInChar 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInChar {
    0% {
        opacity: 0;
        filter: blur(20px);
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
        transform: translateY(0);
    }
}

/* ヒーローサブタイトル */
.hero-subtitle {
    font-family: 'Sawarabi Mincho', serif;
    font-size: var(--font-sm); /* 比率ベースサイズ（clamp(1rem, 2.2vw, 1.2rem)） */
    font-weight: 300;
    color: var(--color-text-light);
    line-height: 1.6; /* 2行表示のため行間を調整 */
    margin-top: var(--space-lg); /* 比率ベースマージン */
    max-width: clamp(320px, 50vw, 480px); /* 比率ベース幅 */
    margin-left: auto;
    margin-right: auto;
    white-space: normal; /* 改行を許可して2行表示 */
    transition: font-size var(--transition-normal);
    text-align: center; /* 中央揃えを明示 */
    padding: 0 var(--space-xs); /* 比率ベースパディング */
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(10px);
}

.hero-subtitle.animate {
    animation: fadeInSubtitle 1.0s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    padding: 0 !important;
}

@keyframes fadeInSubtitle {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ヒーロー移行セクション */
.hero-transition-section {
    position: relative;
    z-index: 10;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

.hero-transition-image {
    position: relative;
    z-index: 10;
}

.hero-transition-image img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: bottom; /* 画像下の隙間を除去 */
    position: relative;
    z-index: 10;
}

/* ==============================================
   レスポンシブ対応 - モバイル・タブレット
   ============================================== */

@media (max-width: 1023px) {
    /* スマホ時のヒーローセクション - どのサイズにも対応 */
    .hero {
        height: 100vh; /* ビューポートの高さに合わせる */
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0; /* マージンをリセット */
        width: 100vw; /* 画面幅いっぱい */
        position: relative;
        left: 50%;
        transform: translateX(-50%); /* 中央揃え */
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        width: 100%; /* 親要素の幅に合わせる */
        text-align: center;
        margin-top: -20vh; /* 上のマージンを40%縮める（50vh → 30vh相当） */
        margin-left: 0;
        margin-right: 0;
        padding: 0;
        position: relative;
        left: 0; /* 左位置をリセット */
        transform: none; /* transformをリセット */
        z-index: 10; /* サークルより前面に表示 */
    }

    .hero-text {
        transform: scale(1.0); /* テスト用：固定値でメディアクエリの動作確認 */
        margin-top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: auto;
    }

    .hero-catchcopy {
        writing-mode: vertical-rl; /* 縦書きを維持 */
        text-orientation: mixed;
        height: clamp(240px, 25vh, 320px); /* 比率ベース高さ */
        font-size: var(--font-hero); /* 比率ベースサイズ */
        font-weight: 300;
        margin-bottom: 0;
        line-height: 1.3; /* 行間を調整して改行位置を最適化 */
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        white-space: pre-line; /* 改行を保持 */
    }

    .hero-subtitle {
        font-size: var(--font-sm); /* 比率ベースサイズ */
        margin-top: var(--space-lg); /* 比率ベースマージン */
        max-width: clamp(320px, 50vw, 480px); /* 比率ベース幅 */
        line-height: 1.6;
        text-align: center;
        white-space: normal;
        padding: 0;
        margin-left: auto;
        margin-right: auto;
        transform: scale(0.85); /* タブレット版では85%に縮小 */
        transform-origin: center;
    }

    /* hero-transition-sectionを画面下に配置 */
    .hero-transition-section {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        margin-top: 0 !important;
        z-index: 10;
    }
}

/* 480pxブレークポイント削除: CSS変数で自動対応
   var(--font-sm)とvar(--space-lg)により適切なサイズに自動調整 */ 