/* 기본 변수 */
:root {
    /* 브랜드 컬러 */
    --color-ivory: #FFFFF0;
    --color-ivory-light: #fdfbf6;
    --color-ivory-dark: #F5F5DC;
    --color-brown: #8B7355;
    --color-brown-light: #A0522D;
    --color-brown-dark: #6d5a43;
    --color-text: #4A4A4A;
    
    /* 레이아웃 */
    --header-height: 80px;
    --max-width: 1400px;
    --container-padding: 2rem;
    
    /* 타이포그래피 */
    --font-family-main: 'MaruBuri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-accent: 'Cormorant Garamond', serif;
    
    /* 트랜지션 */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 그림자 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

/* 기본 리셋 및 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-main);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-ivory-light);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 이미지 최적화 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 컨테이너 */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* 페이지 전환 애니메이션 */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp var(--transition-normal) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 이미지 레이지 로딩 */
.lazy-image {
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.lazy-image.loaded {
    opacity: 1;
}

/* 공통 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-family: var(--font-family-main);
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-brown);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-brown-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 반응형 유틸리티 */
@media (max-width: 1200px) {
    :root {
        --container-padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    html {
        font-size: 14px;
    }
}

/* 성능 최적화를 위한 will-change 속성 */
.will-animate {
    will-change: transform, opacity;
}

/* 스켈레톤 로딩 애니메이션 */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, 
        var(--color-ivory-dark) 25%, 
        var(--color-ivory-light) 50%, 
        var(--color-ivory-dark) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* 기본 스타일 */
:root {
    /* 브랜드 컬러 - 주황계열 */
    --brand-50: #fff7ed;
    --brand-100: #ffedd5;
    --brand-200: #fed7aa;
    --brand-300: #fdba74;
    --brand-400: #fb923c;
    --brand-500: #f97316;
    --brand-600: #ea580c;
    --brand-700: #c2410c;
    
    /* 보조 컬러 - 파랑계열 */
    --accent-50: #f0f9ff;
    --accent-100: #e0f2fe;
    --accent-200: #bae6fd;
    --accent-300: #7dd3fc;
    --accent-400: #38bdf8;
    --accent-500: #0ea5e9;
    --accent-600: #0284c7;
    --accent-700: #0369a1;
    
    /* 중립 컬러 */
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    
    /* 배경색 */
    --bg-primary: var(--neutral-50);
    --bg-secondary: white;
    
    /* 텍스트 색상 */
    --text-primary: var(--neutral-900);
    --text-secondary: var(--neutral-600);
    --text-tertiary: var(--neutral-500);
    
    /* 기타 변수들 */
    --max-width: 1280px;
    --border-radius: 8px;
    
    /* 간격 */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* 폰트 크기 */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    
    /* 폰트 두께 */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-bold: 700;
    
    /* Colors */
    --color-ivory: #FFFFF0;
    --color-ivory-dark: #F5F5DC;
    --color-brown: #8B7355;
    --color-brown-light: #A0522D;
    --color-text: #4A4A4A;
    
    /* Spacing */
    --nav-height: 80px;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-32: 8rem;
    
    /* Font sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    
    /* Font family */
    --font-family: 'MaruBuri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 기본 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-weight: 300;
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--color-ivory);
    letter-spacing: -0.015em;
}

/* 컨테이너 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* 헤더 */
.header {
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--neutral-200);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* 메인 컨텐츠 */
.main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* 공통 섹션 스타일 */
.section {
    padding: var(--space-16) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-title h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.section-title p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
}

/* 공통 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--border-radius);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--brand-600);
    color: white;
}

.btn-primary:hover {
    background-color: var(--brand-700);
}

.btn-secondary {
    background-color: var(--accent-600);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--accent-700);
}

/* 공통 카드 스타일 */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* 공통 그리드 스타일 */
.grid {
    display: grid;
    gap: var(--space-8);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Main Content */
main {
    padding-top: var(--nav-height);
    min-height: 100vh;
    flex: 1;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --space-32: 6rem;
        --space-20: 4rem;
        --space-16: 3rem;
    }
}

/* 반응형 타이포그래피 */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.site-footer {
    background-color: var(--color-ivory-light);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo-img {
    height: 120px;
    width: auto;
}

.footer-info {
    flex-grow: 1;
}

.info-group {
    margin-bottom: 2rem;
}

.info-group h3 {
    font-family: 'MaruBuri', serif;
    font-size: 1.2rem;
    color: var(--color-brown);
    margin-bottom: 1rem;
}

.info-group p {
    font-family: 'MaruBuri', serif;
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    .footer-logo-img {
        height: 80px;
    }

    .info-group p {
        justify-content: center;
    }
}
