/* ========================================
   컬러 변수 정의
======================================== */
:root {
    --color-primary: #001a3d;      /* Deep Authority (심해의 신뢰) */
    --color-background: #f1f5f9;   /* Clean Canvas (정돈된 이성) */
    --color-accent: #ff4e3a;       /* Realistic Alert (뼈아픈 진실) */
    --color-text-dark: #1e293b;
    --color-text-light: #64748b;
    --color-white: #ffffff;
    --color-success: #10b981;
    --color-blur: rgba(0, 26, 61, 0.1);
}

/* ========================================
   기본 스타일
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--color-text-dark);
    background: var(--color-background);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   헤더
======================================== */
header {
    background: var(--color-white);
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 26, 61, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.beta-badge {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ========================================
   히어로 섹션
======================================== */
.hero-section {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #002855 100%);
    color: var(--color-white);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title .highlight {
    color: #60a5fa;
    display: block;
    margin-top: 10px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 40px;
}

.cta-button {
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    padding: 18px 48px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(255, 78, 58, 0.3);
}

.cta-button:hover {
    background: #e63e2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 78, 58, 0.4);
}

/* ========================================
   특징 카드 섹션
======================================== */
.features-section {
    padding: 60px 20px;
    background: var(--color-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--color-background);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px rgba(0, 26, 61, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.feature-icon.icon-speed { color: #3b82f6; }
.feature-icon.icon-price { color: #10b981; }
.feature-icon.icon-plan { color: #8b5cf6; }

.feature-card h3 {
    font-size: 1.375rem;
    color: var(--color-text-dark);
    margin-bottom: 15px;
    font-weight: 700;
}

.feature-card p {
    color: var(--color-text-light);
    line-height: 1.8;
}

.feature-highlight {
    color: var(--color-accent);
    font-weight: 600;
}

/* ========================================
   업종 선택 섹션
======================================== */
.industry-section {
    padding: 80px 20px;
    background: linear-gradient(180deg, var(--color-primary) 0%, #003366 100%);
    color: var(--color-white);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.section-subtitle {
    text-align: center;
    color: #cbd5e1;
    margin-bottom: 50px;
    font-size: 1.125rem;
}

.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.industry-button {
    background: var(--color-white);
    border: 3px solid transparent;
    padding: 40px 20px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.industry-button:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.industry-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.industry-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* ========================================
   폼 스타일
======================================== */
.form-section {
    background: var(--color-white);
    border-radius: 20px;
    padding: 40px;
    margin: 40px auto;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0, 26, 61, 0.08);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group label .required {
    color: var(--color-accent);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 26, 61, 0.1);
}

/* 체크박스 그룹 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 버튼 */
.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 16px 40px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.btn-primary:hover {
    background: #002855;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 26, 61, 0.2);
}

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

/* ========================================
   결과 화면 (블러 처리)
======================================== */
.result-section {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

.result-card {
    background: var(--color-white);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.result-card.blurred .result-content {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(241, 245, 249, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 10;
}

.unlock-button {
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    padding: 16px 40px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unlock-button:hover {
    background: #e63e2e;
    transform: translateY(-2px);
}

.free-code-button {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.free-code-button:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ========================================
   로딩 상태
======================================== */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--color-background);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   모달 (업종 선택 팝업)
======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 26, 61, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--color-white);
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--color-text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--color-accent);
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   유틸리티 클래스
======================================== */
.hidden {
    display: none !important;
}

/* ========================================
   모달 (Phase 2 신규)
======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 26, 61, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 26, 61, 0.3);
    z-index: 1001;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--color-background);
    color: var(--color-primary);
}

.modal-content h2 {
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
}

.modal-industry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ========================================
   블러 효과 (Phase 2 결제 화면)
======================================== */
.blurred-section {
    position: relative;
}

/* 블러를 card의 자식들에게만 적용 */
.blurred-section.card > h3,
.blurred-section.card > div:not(.unlock-overlay) {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.unlock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    z-index: 100;
    gap: 20px;
    padding: 40px;
    border-radius: 15px;
}

.unlock-overlay h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
    text-align: center;
}

.payment-button {
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.payment-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.free-code-button {
    padding: 12px 30px;
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.free-code-button:hover {
    background: var(--color-primary);
    color: white;
}

.code-input-section {
    margin-top: 20px;
    text-align: center;
}

.code-input {
    padding: 12px 20px;
    border: 2px solid var(--color-text-light);
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    width: 200px;
    margin-right: 10px;
}

.code-submit-btn {
    padding: 12px 30px;
    background: var(--color-success);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.code-submit-btn:hover {
    background: #059669;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-40 {
    margin-top: 40px;
}

/* ========================================
   반응형
======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .features-grid,
    .industry-grid {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        padding: 25px 20px;
    }
    
    .cta-button,
    .btn-primary {
        padding: 14px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}
