/* =========================================
   Reset & Base
   ========================================= */
:root {
    /* Blue Impulse Soft Theme */
    --color-navy: #002D62;      /* 信頼のネイビー */
    --color-white: #FFFFFF;     /* 清潔な白 */
    --color-lightblue: #E0F2FE; /* 空のライトブルー */
    --color-blue: #0284C7;      /* メインブルー */
    --color-orange: #FF8C00;    /* CTAアクセントのオレンジ */
    --color-dark: #1E293B;
    --color-gray: #475569;
    --color-lightgray: #F8FAFC;
    
    --font-sans: 'Noto Sans JP', 'Inter', sans-serif;
    
    --cta-height: 120px;
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-dark);
    background-color: var(--color-lightgray);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =========================================
   1. トップ層 (Swipe Slider) 
   ========================================= */
.swipe-container {
    display: flex;
    overflow-x: auto;
    width: 100vw;
    height: 100svh; /* モバイルフルスクリーン */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    position: relative;
    z-index: 10;
    cursor: grab;
}
.swipe-container:active {
    cursor: grabbing;
}
.swipe-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.swipe-card {
    flex: 0 0 100vw;
    height: 100svh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    background-color: var(--color-navy); /* 画像がない場合のフォールバック */
}

.swipe-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* テキスト安全領域 (左15%, 下端35%) */
.card-content {
    position: absolute;
    bottom: 35%; 
    left: 15%;
    right: 15%;
    color: var(--color-white);
    background: rgba(0, 45, 98, 0.75); /* ネイビー半透明 */
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--color-white);
    border-bottom: 2px solid var(--color-orange);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.card-points {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.8;
}

.card-points li {
    position: relative;
    padding-left: 1.2rem;
}
.card-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-orange);
    font-weight: bold;
}

/* スワイプ案内 UI */
.swipe-guide {
    position: fixed;
    bottom: 25%;
    right: 5%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    cursor: pointer;
    animation: fadePulse 2s infinite ease-in-out;
}

.swipe-guide-text {
    writing-mode: vertical-rl;
    color: var(--color-white);
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.1em; margin-bottom: 10px;
}

.swipe-guide-arrow {
    width: 24px;
    height: 24px;
    border-top: 3px solid var(--color-white);
    border-right: 3px solid var(--color-white);
    transform: rotate(45deg);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    animation: slideRight 1.5s infinite;
}

@keyframes fadePulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.3; }
}
@keyframes slideRight {
    0% { transform: rotate(45deg) translate(-5px, 5px); opacity: 0;}
    50% { opacity: 1;}
    100% { transform: rotate(45deg) translate(5px, -5px); opacity: 0;}
}



/* =========================================
   2. 中央層 (SEO 本文領域) 
   ========================================= */
.seo-content {
    background-color: var(--color-white);
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 10;
}

.seo-section {
    margin-bottom: 4rem;
}

.seo-section h2 {
    font-size: 1.4rem;
    color: var(--color-navy);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.4;
    border-left: 5px solid var(--color-orange);
    padding-left: 0.8rem;
}

.seo-section h3 {
    font-size: 1.15rem;
    color: var(--color-blue);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.seo-section p {
    color: var(--color-gray);
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* つばさ 吹き出し */
.navigator-bubble {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: transparent;
    margin-bottom: 2rem;
}

.bubble-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid var(--color-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background-color: var(--color-navy);
    flex-shrink: 0;
    margin-top: 4px; /* align with top of bubble */
}

/* 吹き出し本体 */
.bubble-text {
    position: relative;
    background-color: var(--color-lightblue);
    border: 2px solid #BAE6FD;
    border-radius: 16px;
    border-top-left-radius: 4px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    color: var(--color-navy) !important;
    font-weight: 500;
    margin: 0 !important;
    line-height: 1.7;
    box-shadow: 0 2px 8px rgba(0, 45, 98, 0.08);
}

/* 吹き出しの三角（しっぽ） */
.bubble-text::before {
    content: '';
    position: absolute;
    top: 12px;
    left: -11px;
    border-width: 7px 10px 7px 0;
    border-style: solid;
    border-color: transparent #BAE6FD transparent transparent;
}
.bubble-text::after {
    content: '';
    position: absolute;
    top: 13px;
    left: -8px;
    border-width: 6px 9px 6px 0;
    border-style: solid;
    border-color: transparent var(--color-lightblue) transparent transparent;
}

/* オレンジ吹き出し (末尾CTA用) */
.bubble-text.orange-bubble {
    background-color: var(--color-orange);
    color: var(--color-white) !important;
    border-color: #f97316; /* オレンジの境界線を少し濃く */
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.2);
}

.bubble-text.orange-bubble::before {
    border-color: transparent #f97316 transparent transparent;
}

.bubble-text.orange-bubble::after {
    border-color: transparent var(--color-orange) transparent transparent;
}

/* Feature Box */
.feature-box {
    background-color: var(--color-lightgray);
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.feature-box li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--color-gray);
}
.feature-box li strong {
    color: var(--color-navy);
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-top: 1.5rem;
}
.comparison-table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.comparison-table th, .comparison-table td {
    border: 1px solid #E2E8F0;
    padding: 1rem;
    text-align: left;
    vertical-align: middle;
}
.comparison-table th {
    background-color: var(--color-lightgray);
    color: var(--color-gray);
    font-weight: 700;
}
.comparison-table .highlight-col {
    background-color: rgba(2, 132, 199, 0.05);
}
.comparison-table td.highlight-col {
    color: var(--color-navy);
}
.small { font-size: 0.75rem; font-weight: normal; }

/* Step List */
.step-list {
    margin-top: 1.5rem;
}
.step-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: var(--color-white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid var(--color-blue);
}
.step-number {
    background-color: var(--color-navy);
    color: var(--color-white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}
.step-text {
    font-size: 0.95rem;
    color: var(--color-gray);
    align-self: center;
}
.step-text strong {
    color: var(--color-navy);
    display: inline;
}

/* FAQ */
.faq-list {
    margin-top: 1.5rem;
}
.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 1.5rem;
}
.faq-q {
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.5rem;
}
.faq-a {
    color: var(--color-gray);
    font-size: 0.95rem;
    padding-left: 1.5rem;
}

.company-info {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-gray);
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #E2E8F0;
}
.company-info a {
    text-decoration: underline;
    color: var(--color-blue);
}

.footer-spacer {
    height: var(--cta-height); /* 固定CTAの被り防止 */
}

/* =========================================
   3. ボトム層 (固定CTA)
   ========================================= */
.cta-layer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--cta-height);
    background: linear-gradient(180deg, rgba(0,45,98,0.95) 0%, var(--color-navy) 100%);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    padding: 0 1rem;
    transition: transform 0.3s ease;
}

.cta-wrapper {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.cta-microcopy {
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.cta-btns-group {
    display: flex;
    gap: 8px;
    width: 100%;
}

.btn-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-white);
    font-size: 1rem;
    font-weight: 800;
    flex: 1;
    padding: 0.85rem 0.25rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-form {
    background-color: var(--color-orange);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
}

.btn-line {
    background-color: #06C755;
    box-shadow: 0 4px 15px rgba(6, 199, 85, 0.4);
}

.btn-cta:active {
    transform: scale(0.98);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 5s infinite;
}

.cta-note {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
    margin-top: 0.5rem;
}

/* Animations */
@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* 5秒おきのパルスアニメーション */
.pulse-anim {
    animation: doublePulse 5s infinite;
}
@keyframes doublePulse {
    0%   { transform: scale(1); }
    5%   { transform: scale(1.05); }
    10%  { transform: scale(1); }
    15%  { transform: scale(1.05); }
    20%  { transform: scale(1); }
    100% { transform: scale(1); }
}

/* 最終カード到達時の強力なシェイク */
.shake-anim {
    animation: strongShake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes strongShake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@media (min-width: 768px) {
    /* PC・タブレット向けの調整 (基本はモバイルUIの維持) */
    .swipe-container {
        max-width: 480px;
        margin: 0 auto;
        border-left: 1px solid #ccc;
        border-right: 1px solid #ccc;
    }
    .swipe-card {
        flex: 0 0 480px;
    }
    .swipe-guide {
        /* 中央寄りに配置（右端から計算してコンテナ枠の内側に設置） */
        right: calc(50% - 240px + 15px);
    }
    .seo-content {
        max-width: 600px;
        margin: 0 auto;
        border-radius: 12px;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    }
}
