/* Custom Font */
body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 로고 폰트 스타일 */
.logo-text {
    font-family: 'MuseumCulturalFoundationClassic', serif;
    color: #53789a;
    font-weight: 700;
}

/* 요약메시지 스타일 (나눔명조체) */
.summary-message {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 1.75rem; /* 28px */
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.5px;
    background: radial-gradient(circle, #717171 0%, #232323 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

/* 요약메시지 가운데 정렬 */
.summary-message.text-center {
    display: block;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .summary-message {
        font-size: 2rem; /* 32px */
    }
}

@media (min-width: 1024px) {
    .summary-message {
        font-size: 2.25rem; /* 36px */
    }
}

/* 핵심메시지 스타일 */
.core-message {
    font-family: 'NixgonFont', sans-serif;
    font-weight: 300;
    letter-spacing: -0.5px;
    color: #959595;
    font-size: 1.125rem; /* 18px */
}

@media (min-width: 768px) {
    .core-message {
        font-size: 1.25rem; /* 20px */
    }
}

@media (min-width: 1024px) {
    .core-message {
        font-size: 1.5rem; /* 24px */
    }
}

/* about 섹션 메시지 스타일 */
.about-message {
    letter-spacing: -0.5px;
}

/* 로딩 애니메이션 */
.loader-animation {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 히어로 섹션 배경 이미지 */
.hero-bg {
    background-image: url('../assets/images/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 0;
}

/* z-index 레이어 설정 */
.z-1 {
    z-index: 1;
}

/* 일출 효과 그라데이션 */
.sunrise-gradient {
    background: linear-gradient(
        135deg,
        rgba(255, 184, 77, 0.1) 0%,
        rgba(255, 215, 0, 0.1) 25%,
        rgba(74, 144, 226, 0.1) 50%,
        rgba(255, 184, 77, 0.05) 75%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: sunrise 10s ease-in-out infinite;
}

@keyframes sunrise {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* 스크롤 인디케이터 도트 */
.scroll-dot {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cbd5e0;
    transition: all 0.3s ease;
    position: relative;
}

.scroll-dot:hover {
    background-color: #ff6b35;
    transform: scale(1.3);
}

.scroll-dot.active {
    background-color: #ff6b35;
    transform: scale(1.5);
}

.scroll-dot.active::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #ff6b35;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* 네비게이션 메뉴 스타일 */
.nav-link {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
    color: #d1d5db; /* 밝은 회색 */
    transition: color 0.3s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-link:hover {
    color: #f3f4f6; /* 더 밝은 회색 */
}

.nav-link:focus {
    outline: none;
}

.nav-link.active {
    color: #ff6b35;
    font-weight: 700;
}

/* 모바일 네비게이션 메뉴 스타일 */
.mobile-nav-link {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 1.125rem; /* 18px */
    font-weight: 700;
    color: #d1d5db; /* 밝은 회색 */
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: #f3f4f6; /* 더 밝은 회색 */
    background-color: rgba(255, 255, 255, 0.05);
}

/* 스무스 스크롤 */
html {
    scroll-behavior: smooth;
}

/* 섹션 간격 조정 */
section {
    scroll-margin-top: 80px;
}

/* 반응형 조정 */
@media (max-width: 768px) {
    #scroll-indicator {
        display: none;
    }
    
    .sunrise-gradient {
        animation-duration: 8s;
    }
    
    /* 모바일에서는 배경 고정 해제 */
    .hero-bg {
        background-attachment: scroll;
    }
}

/* 히어로 로고 이미지 기본 스타일 */
.hero-logo {
    max-width: 100%;
    height: auto;
}

/* 작은 화면에서 히어로 로고 이미지 크기 조정 */
@media (max-width: 450px) {
    .hero-logo {
        max-width: 70% !important;
        height: auto;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* 포커스 스타일 개선 (키보드 네비게이션) */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* 로고 및 모바일 메뉴 포커스 테두리 제거 */
.logo-link:focus,
.logo-link:focus-visible,
.mobile-nav-link:focus,
.mobile-nav-link:focus-visible,
#mobile-menu-btn:focus,
#mobile-menu-btn:focus-visible,
#mobile-menu-close:focus,
#mobile-menu-close:focus-visible {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* 이미지 lazy loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Contact 섹션 배경 이미지 */
.contact-bg-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200vmax; /* 충분히 큰 크기 */
    height: 200vmax;
    background-image: url('../assets/images/backgrounds/contact_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    /* 원형으로 번지는 애니메이션 - 기본 상태 */
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    border-radius: 50%;
    overflow: hidden;
    will-change: transform, opacity; /* 성능 최적화 */
}

/* 애니메이션 활성화 클래스 */
.contact-bg-image.animate {
    animation: rippleExpand 4s ease-out forwards;
    -webkit-animation: rippleExpand 4s ease-out forwards; /* Safari 지원 */
}

@keyframes rippleExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Contact 섹션 컨텐츠가 배경 위에 표시되도록 */
#contact .container {
    position: relative;
    z-index: 1;
}
