/*
 * MindFin Design System v4.0
 * Theme: Standard Chartered Inspired — Teal & White
 * Last Updated: 2026-03-21
 */

/* 1. Premium Font Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.css');

/* 2. Color & Typography Variables */
:root {
    /* Brand Color Palette — Teal/Green primary */
    --color-teal: #00847F;
    --color-teal-light: #0ABFB8;
    --color-teal-dark: #006660;
    --color-navy: #003B5C;
    --color-amber: #F59E0B;

    /* Background Colors */
    --color-background: #FFFFFF;
    --color-background-alt: #F5F7FA;
    --color-background-card: #FFFFFF;
    --color-background-card-hover: #F0FAFA;

    /* Text Colors */
    --color-text-primary: #1A202C;
    --color-text-secondary: #4A5568;
    --color-text-muted: #718096;

    /* Border & Accent */
    --color-border: rgba(0, 132, 127, 0.2);
    --color-border-hover: rgba(0, 132, 127, 0.5);
    --color-border-light: #E2E8F0;
    --color-accent: #00847F;

    /* Legacy aliases (backward compat) */
    --color-gold: #00847F;
    --color-gold-light: #0ABFB8;
    --color-gold-dark: #006660;

    /* Font Families — Pretendard 우선 (한글 최적화) */
    --font-serif: 'Pretendard Variable', 'Plus Jakarta Sans', sans-serif;
    --font-garamond: 'Pretendard Variable', 'DM Sans', sans-serif;
    --font-korean: 'Pretendard Variable', sans-serif;
}

/* 3. Global Styles */
body {
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F7FA 50%, #FFFFFF 100%);
    color: var(--color-text-primary);
    font-family: 'Pretendard Variable', 'Plus Jakarta Sans', 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.7;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Better Korean Text Rendering */
:lang(ko) {
    font-family: var(--font-korean);
    word-break: keep-all;
}

/* 4. Typography Classes */
.font-serif {
    font-family: var(--font-serif);
}

.font-garamond {
    font-family: var(--font-garamond);
}

/* Teal Gradient Text (replaces gold) */
.text-gold,
.text-teal,
.main-gradient-text {
    background: linear-gradient(135deg, #00847F 0%, #0ABFB8 50%, #00847F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-right: 0.2em;
    padding-top: 0.1em;
    display: inline-block;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--color-text-primary);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

/* Body Text */
p {
    font-family: var(--font-garamond);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

/* 5. Navigation */
.nav-link {
    color: var(--color-text-secondary);
    font-family: var(--font-garamond);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-teal);
}

/* Navigation 3D Effect */
.nav-link-3d {
    position: relative;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #374151;
}

.nav-link-3d:hover {
    transform: translateY(-2px);
    color: #00847F !important;
    -webkit-text-fill-color: #00847F;
    text-shadow: 0 2px 8px rgba(0, 132, 127, 0.2);
}

.nav-link-3d::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00847F, transparent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link-3d:hover::after {
    width: 100%;
}

/* Nav Login Button */
.nav-btn-3d {
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: transparent !important;
    border: 2px solid #00847F !important;
    border-radius: 6px;
    padding: 8px 20px !important;
    color: #00847F !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    letter-spacing: 0.08em;
}

.nav-btn-3d:hover {
    transform: translateY(-2px);
    background: #00847F !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(0, 132, 127, 0.3);
    -webkit-text-fill-color: #FFFFFF;
}

/* User nav link */
.nav-user-link {
    color: var(--color-navy) !important;
    font-weight: 700 !important;
    text-decoration: none;
}

.nav-user-link .user-name {
    color: var(--color-teal) !important;
    font-weight: 800 !important;
}

/* ============================================
   3D Button Effect
   ============================================ */
.btn-3d {
    position: relative;
    display: inline-block;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-garamond);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-3d:hover {
    transform: translateY(-4px) scale(1.08);
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF;
    text-shadow:
        0 1px 0 #009990,
        0 2px 0 #008880,
        0 3px 0 #007770,
        0 4px 0 #006660,
        0 5px 0 #005550,
        0 6px 1px rgba(0,0,0,.1),
        0 0 10px rgba(0,132,127,.5),
        0 2px 5px rgba(0,132,127,.3),
        0 5px 10px rgba(0,0,0,.2),
        0 10px 20px rgba(0,0,0,.15);
}

/* Teal 버튼 (주요 액션) */
.btn-3d-gold {
    color: #00847F;
}

.btn-3d-gold:hover {
    color: #FFFFFF !important;
    text-shadow:
        0 1px 0 #00847F,
        0 2px 0 #007572,
        0 3px 0 #006660,
        0 4px 0 #005750,
        0 5px 0 #004840,
        0 8px 1px rgba(0,0,0,.15),
        0 0 12px rgba(0,132,127,.7),
        0 2px 6px rgba(0,132,127,.5),
        0 5px 15px rgba(0,132,127,.4),
        0 10px 20px rgba(0,0,0,.2);
}

/* 일반 버튼 */
.btn-3d-normal {
    color: #4A5568;
}

.btn-3d-normal:hover {
    color: #1A202C !important;
}

/* 삭제 버튼 */
.btn-3d-danger {
    color: #EF4444;
}

.btn-3d-danger:hover {
    color: #FFFFFF !important;
    text-shadow:
        0 1px 0 #ef4444,
        0 2px 0 #dc3c3c,
        0 3px 0 #c93434,
        0 8px 1px rgba(0,0,0,.15),
        0 0 12px rgba(239,68,68,.7);
}

/* 경고 버튼 */
.btn-3d-warning {
    color: #F59E0B;
}

.btn-3d-warning:hover {
    color: #FFFFFF !important;
    text-shadow:
        0 1px 0 #f59e0b,
        0 2px 0 #e09009,
        0 8px 1px rgba(0,0,0,.15),
        0 0 12px rgba(245,158,11,.7);
}

/* CTA 버튼 */
.btn-3d-cta {
    color: #00847F;
    font-size: 1rem;
    font-weight: 500;
    padding: 16px 32px;
}

.btn-3d-cta:hover {
    transform: translateY(-6px) scale(1.12);
    color: #FFFFFF !important;
    text-shadow:
        0 1px 0 #00847F,
        0 2px 0 #007572,
        0 3px 0 #006660,
        0 4px 0 #005550,
        0 5px 0 #004440,
        0 10px 1px rgba(0,0,0,.2),
        0 0 15px rgba(0,132,127,.8),
        0 3px 8px rgba(0,132,127,.6),
        0 8px 20px rgba(0,132,127,.4),
        0 15px 30px rgba(0,0,0,.25);
}

/* 6. Premium Buttons */
.cta-button-primary {
    display: inline-block;
    background: linear-gradient(135deg, #00847F 0%, #006660 100%);
    color: #FFFFFF;
    padding: 16px 40px;
    font-family: var(--font-garamond);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #00847F;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 132, 127, 0.25);
    border-radius: 4px;
}

.cta-button-primary:hover {
    background: linear-gradient(135deg, #0ABFB8 0%, #00847F 100%);
    box-shadow: 0 8px 30px rgba(0, 132, 127, 0.35);
    transform: translateY(-2px);
    color: #FFFFFF;
}

.cta-button-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(0);
}

.cta-button-secondary {
    display: inline-block;
    background: transparent;
    color: #00847F;
    padding: 14px 36px;
    font-family: var(--font-garamond);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid rgba(0, 132, 127, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.cta-button-secondary:hover {
    background: rgba(0, 132, 127, 0.08);
    border-color: #00847F;
}

.cta-button-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 7. Card Component */
.card,
.luxury-card {
    background: #FFFFFF;
    padding: 40px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover,
.luxury-card:hover {
    box-shadow: 0 8px 32px rgba(0, 132, 127, 0.12);
    border-color: rgba(0, 132, 127, 0.3);
}

/* 8. Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--font-garamond);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #00847F;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: #FFFFFF;
    border: 1px solid #CBD5E0;
    color: var(--color-text-primary);
    font-family: var(--font-garamond);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    border-radius: 6px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #00847F;
    box-shadow: 0 0 0 3px rgba(0, 132, 127, 0.1);
}

.form-group input::placeholder {
    color: #A0AEC0;
    opacity: 1;
}

.form-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00847F 0%, #006660 100%);
    color: #FFFFFF;
    font-family: var(--font-garamond);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid #00847F;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.form-button:hover {
    background: linear-gradient(135deg, #0ABFB8 0%, #00847F 100%);
    box-shadow: 0 4px 16px rgba(0, 132, 127, 0.3);
}

/* 9. Test Page Styles */
.question-card {
    display: none;
    padding: 2.5rem;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.5s ease-in-out;
    position: absolute;
    width: 100%;
}

.question-card.active {
    display: block;
}

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

.question-text {
    font-family: var(--font-garamond);
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--color-text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.ox-button-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.ox-button {
    width: 100px;
    height: 100px;
    border: 2px solid #CBD5E0;
    background: #F5F7FA;
    color: #00847F;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.ox-button:hover {
    border-color: #00847F;
    background: rgba(0, 132, 127, 0.08);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 132, 127, 0.2);
}

.ox-button.selected {
    background: rgba(0, 132, 127, 0.12);
    border-color: #00847F;
    box-shadow: 0 0 20px rgba(0, 132, 127, 0.25);
}

/* 10. Store Page Styles */
.store-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
}

.price-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.price-card:hover {
    box-shadow: 0 8px 32px rgba(0, 132, 127, 0.12);
    border-color: rgba(0, 132, 127, 0.3);
    transform: translateY(-2px);
}

.price-card.premium {
    border: 2px solid #00847F;
    background: linear-gradient(145deg, #F0FAFA, #FFFFFF);
    box-shadow: 0 4px 24px rgba(0, 132, 127, 0.15);
}

.price-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #00847F 0%, #006660 100%);
    color: #FFFFFF;
    padding: 6px 16px;
    font-family: var(--font-garamond);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 20px;
}

.price-card h3 {
    font-family: var(--font-serif);
    color: #00847F;
    margin-bottom: 12px;
}

.price-card .price {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 24px;
}

.price-card .features {
    list-style: none;
    padding: 0;
    margin-bottom: 28px;
    text-align: left;
    color: var(--color-text-secondary);
    font-family: var(--font-garamond);
}

.price-card .features li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.price-card .features li::before {
    content: '◇';
    position: absolute;
    left: 0;
    color: #00847F;
    font-size: 0.75rem;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00847F 0%, #006660 100%);
    border: 1px solid #00847F;
    color: #FFFFFF;
    font-family: var(--font-garamond);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0ABFB8 0%, #00847F 100%);
    box-shadow: 0 4px 16px rgba(0, 132, 127, 0.3);
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid #CBD5E0;
    color: #4A5568;
    font-family: var(--font-garamond);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.btn-secondary:hover {
    border-color: #00847F;
    color: #00847F;
    background: rgba(0, 132, 127, 0.05);
}

.btn-outline {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid rgba(0, 132, 127, 0.5);
    color: #00847F;
    font-family: var(--font-garamond);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.btn-outline:hover {
    background: rgba(0, 132, 127, 0.08);
    border-color: #00847F;
}

/* 11. Decorative Elements */
.gold-line {
    width: 64px;
    height: 2px;
    background: linear-gradient(90deg, #00847F, #0ABFB8);
    margin: 0 auto;
    border-radius: 2px;
}

.gold-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00847F, transparent);
}

/* 12. Animation Classes */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.shimmer {
    background: linear-gradient(90deg, #00847F 0%, #0ABFB8 50%, #00847F 100%);
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
}

/* 13. Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2.25rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    p {
        font-size: 1rem !important;
        line-height: 1.8 !important;
    }

    .cta-button-primary {
        padding: 14px 28px;
        font-size: 0.8rem;
    }

    .cta-button-secondary {
        padding: 12px 24px;
        font-size: 0.8rem;
    }

    .card,
    .luxury-card {
        padding: 24px;
    }

    .question-text {
        font-size: 1.25rem;
    }

    .ox-button {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

/* 14. Utility Classes */
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }
.tracking-widest { letter-spacing: 0.15em; }
.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Border Teal Classes (replaces border-gold) */
.border-gold,
.border-teal { border-color: #00847F !important; }
.border-gold\/10 { border-color: rgba(0, 132, 127, 0.1) !important; }
.border-gold\/20 { border-color: rgba(0, 132, 127, 0.2) !important; }
.border-gold\/30 { border-color: rgba(0, 132, 127, 0.3) !important; }
.border-gold\/50 { border-color: rgba(0, 132, 127, 0.5) !important; }

/* Background Teal Classes (replaces bg-gold) */
.bg-gold,
.bg-teal { background-color: #00847F !important; }
.bg-gold\/10 { background-color: rgba(0, 132, 127, 0.08) !important; }
.bg-gold\/20 { background-color: rgba(0, 132, 127, 0.12) !important; }
.bg-gold\/30 { background-color: rgba(0, 132, 127, 0.18) !important; }

/* Site Background */
.luxury-bg {
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F7FA 50%, #FFFFFF 100%);
}

/* Section alternating bg */
.section-alt {
    background-color: #F5F7FA;
}

/* 15. Print Styles */
@media print {
    .no-pdf {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .card,
    .luxury-card {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}
