/* ============================
   レスポンシブ（Apple Japan ブレークポイント）
   Large: ≥ 1024px（デスクトップ）
   Medium: 834px〜1023px（タブレット）
   Small: 320px〜833px（モバイル）
   ============================ */


/* ============================
   タブレット（max-width: 1023px）
   ============================ */

@media (max-width: 1023px) {

    /* --- ヒーローセクション：1カラム・中央寄せ --- */
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-meta {
        justify-content: center;
    }

    .hero-visual {
        max-width: 480px;
        margin: 0 auto;
    }

    /* --- 問題提起：1カラム --- */
    .problems-grid {
        grid-template-columns: 1fr;
    }

    /* --- 具体例：1カラム --- */
    .examples-grid {
        grid-template-columns: 1fr;
    }

    /* --- 選ばれる理由：2カラム --- */
    .reasons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- 料金プラン：1カラム --- */
    .pricing-main {
        grid-template-columns: 1fr;
    }

    .pricing-additional {
        grid-template-columns: 1fr;
    }

    /* --- 業種別活用シーン：1カラム --- */
    .usecase-list {
        grid-template-columns: 1fr;
    }

    /* --- プロフィール：1カラム・画像中央 --- */
    .profile-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-image {
        margin: 0 auto;
    }

    /* --- フッター：2カラム --- */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .footer-brand {
        grid-column: span 2;
    }

    /* --- 見出しサイズを少し縮小 --- */
    .section-title {
        font-size: 32px;
    }

    /* section-eyebrow はデスクトップ 13px でタブレット以下も同値。
       元の 19px オーバーライドは desktop 21px 時代の名残のため削除相当。 */
    .section-eyebrow,
    .section-label {
        font-size: 13px;
    }

    .section-subtitle {
        font-size: 19px;
    }

    .hero-title {
        font-size: 48px;
    }

    /* --- 最終CTA見出し --- */
    .final-cta-title {
        font-size: 32px;
    }
}


/* ============================
   モバイル（max-width: 833px）
   ============================ */

@media (max-width: 833px) {

    /* --------------------------------
       ナビゲーション：ハンバーガー表示
       -------------------------------- */

    /* ハンバーガーボタン表示 */
    .mobile-menu-toggle {
        display: flex;
    }

    /* デスクトップナビ非表示 → フルスクリーンオーバーレイ */
    .main-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: #fafafc;
        padding: var(--space-xl) var(--space-lg);
        overflow-y: auto;
        z-index: 999;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .main-nav .nav-list li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .main-nav .nav-list a {
        display: block;
        padding: var(--space-md) 0;
        font-size: var(--font-body);
        opacity: 1;
    }

    .main-nav .nav-list .nav-cta {
        padding-top: var(--space-lg);
        border-bottom: none;
    }

    .main-nav .nav-list .nav-cta .btn {
        width: 100%;
    }

    /* --- ドロップダウン：モバイルではインライン展開 --- */
    .nav-has-dropdown > a .nav-dropdown-arrow {
        display: none;
    }

    .nav-dropdown {
        display: block !important;
        position: static;
        transform: none;
        padding-top: 0;
    }

    .nav-dropdown-inner {
        grid-template-columns: repeat(2, 1fr);
        min-width: auto;
        background: rgba(0, 0, 0, 0.02);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        padding: var(--space-md);
        gap: var(--space-md);
        border-radius: var(--radius-md);
        margin-bottom: var(--space-sm);
    }

    .nav-dropdown-heading {
        font-size: 10px;
    }

    .nav-dropdown a {
        font-size: 13px !important;
        padding: 4px 0;
    }

    /* --------------------------------
       モバイル固定CTAバー表示
       -------------------------------- */
    .mobile-cta-bar {
        display: block;
    }

    /* フッター下部にCTAバー分の余白を確保 */
    .site-footer {
        padding-bottom: calc(var(--space-xl) + 70px);
    }

    /* --------------------------------
       コンテナ：左右余白を縮小
       -------------------------------- */
    .container {
        padding: 0 var(--space-md);
    }

    /* --------------------------------
       見出しサイズ：モバイル用に縮小
       -------------------------------- */
    .hero-title {
        font-size: 32px;
        line-height: 1.15;
    }

    .section-title {
        font-size: 28px;
    }

    .section-eyebrow,
    .section-label {
        font-size: 13px;
    }

    .section-subtitle {
        font-size: 19px;
    }

    .section-header {
        margin-bottom: var(--space-2xl);
    }

    /* --------------------------------
       セクション余白：モバイル用に縮小
       -------------------------------- */
    .section {
        padding: var(--space-3xl) 0;
    }

    /* --------------------------------
       ファーストビュー
       -------------------------------- */
    .hero-section {
        padding: calc(var(--header-height) + var(--space-xl)) 0 var(--space-3xl);
    }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-cta {
        flex-direction: column;
        justify-content: center;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .hero-meta {
        flex-direction: column;
        gap: var(--space-sm);
        justify-content: center;
    }

    /* ヒーローカード：モバイルではテキスト下に縮小表示 */
    .hero-visual {
        display: block;
        margin: var(--space-xl) auto 0;
        max-width: 360px;
    }

    .hero-visual-card {
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }

    .hero-visual-header {
        margin-bottom: var(--space-md);
        padding-bottom: var(--space-sm);
    }

    .hero-task {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-small);
        gap: var(--space-sm);
    }

    .task-check {
        width: 20px;
        height: 20px;
    }

    .task-check svg {
        width: 12px;
        height: 12px;
    }

    .task-status {
        font-size: 10px;
        padding: 2px 8px;
    }

    .hero-floating-badge {
        font-size: 11px;
        padding: var(--space-xs) var(--space-sm);
    }

    .hero-floating-badge.top-right {
        top: -10px;
        right: -8px;
    }

    .hero-floating-badge.bottom-left {
        bottom: -10px;
        left: -8px;
    }

    /* --------------------------------
       全グリッド：1カラム化
       -------------------------------- */
    .problems-grid {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .reasons-grid {
        grid-template-columns: 1fr;
    }

    .pricing-main {
        grid-template-columns: 1fr;
    }

    .pricing-additional {
        grid-template-columns: 1fr;
    }

    .usecase-list {
        grid-template-columns: 1fr;
    }

    /* --------------------------------
       プロフィール：1カラム・中央寄せ
       -------------------------------- */
    .profile-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }

    .profile-image {
        margin: 0 auto;
        width: 160px;
        height: 160px;
    }

    /* --------------------------------
       比較テーブル：横スクロール
       -------------------------------- */
    .comparison-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 calc(-1 * var(--space-md));
        padding: 0 var(--space-md);
    }

    .comparison-table {
        min-width: 600px;
    }

    /* --------------------------------
       CTAボタン：縦積み・フル幅
       -------------------------------- */
    .final-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .final-cta-buttons .btn {
        width: 100%;
        max-width: 320px;
    }

    .final-cta-title {
        font-size: 28px;
    }

    .final-cta-text {
        font-size: var(--font-body);
    }

    /* 中間CTA */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 320px;
    }

    /* --------------------------------
       タブ：小さく・折り返し対応
       -------------------------------- */
    .usecases-tabs {
        gap: var(--space-xs);
    }

    .usecase-tab {
        padding: var(--space-xs) var(--space-md);
        font-size: var(--font-caption);
    }

    /* --------------------------------
       導入の流れ：タイトなギャップ
       -------------------------------- */
    .flow-step {
        gap: var(--space-md);
        padding-bottom: var(--space-xl);
    }

    .flow-step-number {
        width: 40px;
        height: 40px;
        font-size: var(--font-body);
    }

    .flow-timeline::before {
        left: 20px;
    }

    /* --------------------------------
       料金カード：パディング縮小
       -------------------------------- */
    .pricing-card {
        padding: var(--space-xl);
    }

    .pricing-additional .pricing-card {
        padding: var(--space-lg);
    }

    /* --------------------------------
       FAQ：フォントサイズ調整
       -------------------------------- */
    .faq-question {
        font-size: var(--font-caption);
        padding: var(--space-md) 0;
    }

    /* --------------------------------
       フッター：1カラム
       -------------------------------- */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-brand {
        grid-column: span 1;
    }

    /* --------------------------------
       転換点セクション
       -------------------------------- */
    .turning-point-highlight {
        padding: var(--space-lg);
    }

    /* --------------------------------
       ページコンテンツ（汎用）
       -------------------------------- */
    .page-title {
        font-size: 28px;
    }

    .entry-content h2 {
        font-size: var(--font-subtitle-sm);
    }
}
