/* =======================================================
   CONNECT 공통 스타일 (style.css)
   - CSS 변수(디자인 토큰)
   - 기본 리셋 & 레이아웃
   - 공통 헤더 & 네비게이션
   - 공통 푸터
   - 페이지 로딩 애니메이션
   - 모바일 반응형
======================================================= */

/* -------------------------------------------------------
   0. 디자인 토큰 (CSS 변수)
------------------------------------------------------- */
:root {
    /* 브랜드 컬러 */
    --c-primary: #007DD7;
    --c-accent: #E87522;

    /* 중립 컬러 */
    --c-dark: #111111;
    --c-text: #333;
    --c-text-secondary: #555555;
    --c-text-muted: #8b95a1;
    --c-text-light: #a1aab2;
    --c-bg: #f8f9fa;
    --c-bg-dark: #111111;
    --c-white: #ffffff;
    --c-border: rgba(128, 128, 128, 0.15);

    /* 레이아웃 */
    --max-width: 1200px;
    --header-px: max(60px, calc((100% - 1150px) / 2));

    /* 타이포그래피 */
    --font-main: 'Pretendard', 'Space Grotesk', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-display: 'Space Grotesk', 'Pretendard', sans-serif;
}

/* -------------------------------------------------------
   1. 리셋 & 기본 레이아웃
------------------------------------------------------- */
html { scroll-behavior: smooth; overflow-x: hidden; overflow-y: scroll; }
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background-color: var(--c-bg);
    color: var(--c-text);
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.1s ease-out;
    /* 페이지 로딩 페이드인 */
    animation: pageLoad 0.4s ease-out;
}
@keyframes pageLoad {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* -------------------------------------------------------
   2. 공통 헤더 & 네비게이션
------------------------------------------------------- */
.header {
    position: fixed; top: 0; left: 0; width: 100%;
    padding-top: 15px; padding-bottom: 15px;
    padding-left: var(--header-px);
    padding-right: var(--header-px);
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--c-border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transition: 0.3s;
}

.logo-link { display: flex; align-items: center; z-index: 1001; }
.logo { height: 50px; object-fit: contain; transition: 0.3s; }

.nav { display: flex; align-items: center; gap: 30px; z-index: 1000; }
.nav-link {
    font-size: 1.125rem; font-weight: 700;
    color: var(--c-text); transition: color 0.1s ease-out, opacity 0.2s; display: block;
}
.nav-link:hover { color: #ccc; opacity: 1; }

/* 현재 페이지 네비게이션 활성 표시 */
.nav-link.is-current { color: var(--c-primary); }
.nav-link.is-current:hover { color: var(--c-primary); opacity: 0.7; }

/* 모바일 햄버거 버튼 */
.menu-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 6px;
    width: 30px; height: 30px; cursor: pointer; z-index: 1001; position: relative;
}
.menu-toggle span {
    display: block; width: 100%; height: 3px; border-radius: 2px;
    background-color: var(--c-text); transition: all 0.3s ease-in-out;
}

/* 서브페이지 전용 헤더 (매트한 연회색, 유리 질감 제거) */
.header-sub {
    background-color: var(--c-bg);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--c-border);
}

/* -------------------------------------------------------
   3. 공통 푸터
------------------------------------------------------- */
.footer {
    background: var(--c-bg-dark); color: #999;
    padding: 30px 0 30px; border-top: 1px solid #2a2a2a;
    flex-shrink: 0; width: 100%;
}
.footer .container { max-width: var(--max-width); margin: 0 auto; padding: 0 60px; }
.footer-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid #2a2a2a;
}
.footer-links { display: flex; gap: 30px; }
.footer-links a { font-size: 0.95rem; font-weight: 500; color: #ddd; transition: color 0.2s; }
.footer-links a:hover { color: #ccc; }
.footer-info { margin-bottom: 30px; }
.footer-info p { font-size: 0.85rem; line-height: 1.8; margin-bottom: 8px; color: #777; }
.info-item { display: inline-block; margin-right: 15px; }
.info-item::after { content: '|'; margin-left: 15px; color: #333; }
.info-item:last-child::after { display: none; }
.footer-bottom { font-size: 0.8rem; color: #555; }

/* -------------------------------------------------------
   4. 공통 페이드업(Reveal) 애니메이션
------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }

/* -------------------------------------------------------
   5. 모바일 반응형
------------------------------------------------------- */
@media (max-width: 768px) {
    .header { padding: 15px 20px; }
    .logo { height: 40px; }
    .menu-toggle { display: flex; }

    .nav {
        position: fixed; top: 0; right: -100%; width: 260px; height: 100vh;
        background-color: var(--c-bg); flex-direction: column;
        align-items: flex-start; justify-content: flex-start;
        padding-top: 80px; gap: 0;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.1s ease-out;
    }
    .nav.active { right: 0; }
    .nav-link {
        width: 100%; padding: 20px 30px;
        border-bottom: 1px solid var(--c-border);
    }

    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .footer .container { padding: 0 30px; }
    .footer-top {
        flex-direction: column; align-items: flex-start; gap: 20px;
        margin-bottom: 24px; padding-bottom: 24px;
    }
    .footer-links { flex-wrap: wrap; gap: 15px 20px; }
    .footer-info p { flex-direction: column; gap: 4px; }
    .info-item { display: block; margin-right: 0; margin-bottom: 4px; }
    .info-item::after { display: none; }
}