/* ==========================================================================
   恵比寿不動産 アンケート風LP - Style Sheets
   ========================================================================== */

/* Variables & Design Tokens */
:root {
    --primary-color: #0d1e3d; /* 深みのあるロイヤルブルー/ネイビー */
    --primary-light: #1a305c;
    --accent-color: #c5a059; /* 上品なシャンパンゴールド */
    --accent-hover: #b08d47;
    --text-main: #2b3a4a;
    --text-muted: #6b7c90;
    --bg-main: #f4f7fa;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --error-color: #e53e3e;
    --success-color: #38a169;
    
    --font-sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 20px rgba(13, 30, 61, 0.08);
    --shadow-lg: 0 20px 40px rgba(13, 30, 61, 0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: var(--font-sans);
    background-color: #d2deec; /* 背景画像の読み込み前/代替背景色 */
    background-image: url('../images/background.jpg'); /* PC表示用の背景画像 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none !important;
}

/* App Container Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background-color: #ffffff;
    /* box-shadow: 0 0 50px rgba(0, 0, 0, 0.25); */
    position: relative;
}

/* Header Styles */
.main-header {
    background-color: var(--primary-color);
    padding: 0; /* ヘッダー画像を端までピッタリ収めるために余白を除去 */
    position: relative; /* スクロールに合わせて流れるよう固定解除 */
}

.header-image {
    width: 100%;
    height: auto;
    display: block;
}

.logo {
    display: flex;
    flex-direction: column;
    color: #ffffff;
}

.logo-ebisu {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.1;
    color: var(--accent-color);
}

.logo-sub {
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 1px;
    opacity: 0.8;
}

.header-badge {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 0 0 48px; /* 左右のパディングを0にして、ヘッダーとLP画像を画面いっぱいに広げる */
    display: flex;
    flex-direction: column;
}

/* Progress Bar Components */
.progress-container {
    padding: 16px 24px;
    margin: 24px 20px 12px;
    position: relative;
}

.progress-timeline {
    position: relative;
    width: 100%;
}

.timeline-line {
    position: absolute;
    top: 24px; /* Center of a 48px circle */
    left: 24px;
    right: 24px;
    height: 5px;
    background-color: #e2e8f0;
    z-index: 1;
    transform: translateY(-50%);
}

.timeline-progress {
    height: 100%;
    background-color: var(--accent-color); /* Champagne gold */
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 60px;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.check-icon {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
}

.step-label {
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Completed State */
.timeline-step.completed .step-circle {
    background-color: var(--accent-color); /* Champagne gold */
    color: #ffffff;
}

.timeline-step.completed .step-label {
    color: var(--accent-color);
}

/* Active State */
.timeline-step.active .step-circle {
    background-color: var(--accent-color); /* Champagne gold */
    color: #ffffff;
}

.timeline-step.active .step-label {
    color: var(--accent-color);
}

/* Survey Title Section */
.intro-box {
    text-align: center;
    margin-bottom: 24px;
}

.main-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Survey Step Base Styling */
.survey-wrapper {
    position: relative;
    overflow: hidden;
}

.survey-step {
    display: block;
}

.survey-step[data-step="1"] {
    margin-top: 20px;
}

.step-header {
    margin-bottom: 20px;
    text-align: center;
}

.question-number {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
    margin-bottom: 6px;
}



/* Card Layout (Navy Border, Sticky Top Bar) */
.survey-card {
    border: 3px solid var(--primary-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    overflow: hidden;
    /* box-shadow: var(--shadow-lg); */
    margin: 0 20px 20px;
}

.card-header-bar {
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    padding: 14px 0;
    letter-spacing: 1.5px;
    line-height: 1;
}

.card-body {
    padding: 20px 20px 24px;
}

.step-header {
    margin-bottom: 18px;
    text-align: center;
}

.question-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.4;
}

.question-note {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 6px;
    /* font-weight: 500; */
}

/* Input Fields */
.input-container {
    margin-top: 14px;
    margin-bottom: 10px;
}

.text-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 500;
    border: 2px solid #cbd5e1;
    border-radius: 40px;
    outline: none;
    transition: var(--transition-fast);
    color: var(--primary-color);
    text-align: center;
    box-sizing: border-box;
}

.text-input:focus {
    border-color: var(--primary-color);
    background-color: #f8fafc;
}

/* Options List (Capsule Pills) */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 0;
}

.survey-step[data-step="1"] .options-list,
.survey-step[data-step="3"] .options-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.survey-step[data-step="1"] .option-pill,
.survey-step[data-step="3"] .option-pill {
    padding: 12px 8px;
}



.option-pill {
    background-color: #ffffff;
    border: 2px solid #cbd5e1; /* 通常時の明るいグレー枠線 */
    border-radius: 40px; /* しっかり丸みのあるカプセル型 */
    padding: 14px 20px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-fast);
    display: block;
    user-select: none;
}

.option-pill:hover {
    border-color: var(--primary-color);
    background-color: #f8fafc;
}

.option-pill.selected {
    border-color: var(--primary-color);
    background-color: #e8eff9; /* とても薄いブルー */
}

.pill-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

/* Buttons and Navigation */
.step-navigation {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.step-navigation.split {
    justify-content: space-between;
}

.btn {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 28px 28px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    position: relative;
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); */
    line-height: 1;
}

.btn-primary, .btn-accent {
    background-color: var(--accent-color); /* ゴールド */
    color: #ffffff;
    flex: 1;
}

.btn-primary:hover:not(:disabled), .btn-accent:hover:not(:disabled) {
    background-color: var(--accent-hover);
}

.btn-primary::after, .btn-accent::after {
    content: '';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: var(--transition-fast);
}



.btn-primary:disabled {
    background-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary:disabled::after {
    display: none;
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    width: 110px;
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    flex: 1;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
    background-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    width: 100px;
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}


.btn-large {
    width: 100%;
    padding: 18px 32px;
    font-size: 1.1rem;
}

/* Result Section Styling (LINE Lead Page) */
.form-section {
    padding: 0; /* 画像を端までピッタリ収めるために余白を除去 */
}

.result-images-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.result-content-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    box-shadow: none;
}

.line-btn-link {
    display: block;
    width: 100%;
    padding: 0px 20px 40px;
    text-align: center;
    box-sizing: border-box;
    background-color: #ffffff;
}

.result-line-button {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.2s ease;
}

.result-line-button:hover {
    transform: scale(1.03); /* ホバー時の軽いズームアクション */
}

.result-footer-image {
    width: calc(100% - 40px);
    margin: 0 20px 48px;
    display: block;
    height: auto;
}

.pulse {
  animation: pulse 1s infinite;
  overflow: hidden;
}
@keyframes pulse {
  from { transform: scale3d(1, 1, 1); }
  50% { transform: scale3d(1.05, 1.05, 1.05); }
  to { transform: scale3d(1, 1, 1); }
}

/* Footer Styling */
.main-footer {
    background-color: #0b1528;
    color: #ffffff;
    padding: 32px 24px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    font-size: 0.75rem;
    opacity: 0.8;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.copyright {
    font-size: 0.7rem;
    opacity: 0.5;
    letter-spacing: 0.5px;
}

/* Responsive Custom Breakpoints (Specific handling for vertical elements) */
@media (max-width: 480px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .sp-only {
        display: block;
    }
}

/* LP Image Content in Step 1 */
.lp-images-container {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0; /* 画像同士の隙間をゼロにして密着させる */
}

.lp-content-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0; /* 端まで広げるため角丸を解除 */
    box-shadow: none; /* 隙間なく並べるために影を解除 */
}

/* PC Exclusive Elements (Default hidden for Mobile) */
.pc-sidebar-right, .pc-logo-left {
    display: none;
}

/* PC Display Viewport Setup (Visible when screen width >= 850px) */
@media (min-width: 850px) {
    /* Hide Mobile LP Images inside step 1 on PC */
    .lp-images-container {
        display: none !important;
    }

    /* Show PC Sidebar aligned to the right-bottom edge of the browser window */
    .pc-sidebar-right {
        display: block;
        position: fixed;
        right: 0; /* ブラウザウィンドウの右端に寄せる */
        bottom: 0; /* 右下に寄せる */
        z-index: 10;
    }

    .pc-sidebar-inner {
        padding: 0 20px 20px 0;
        width: 320px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .pc-sidebar-image {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 0; /* 角丸なし */
        box-shadow: none; /* 影なし */
    }

    /* Show PC Logo on the left margin of the browser window */
    .pc-logo-left {
        display: block;
        position: fixed;
        left: 0; /* ブラウザウィンドウの左端に寄せる */
        top: 0;
        z-index: 10;
        padding: 24px;
    }

    .pc-logo-image {
        max-width: 200px;
        height: auto;
        display: block;
    }
}

/* Validation Error Styles */
.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 12px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
