/*
 * ========================================
 * 1. 기본 설정 및 전역 스타일
 * ========================================
 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --color-primary: #fada5e;
    --color-text: #333;
    --color-text-light: #666;
    --color-white: #fff;
    --color-bg: #ffffff;
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.2;
    overflow-x: hidden;
    position: relative;
    min-height: 90vh;
    
    --header-height: 80px;
    --footer-height: 70px;
    --line-height: 5px;
    --line-gap: 8px;
    --vertical-offset: -30px;
}

body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

img {
  pointer-events: none;
}

/*
 * ========================================
 * 2. 메인 페이지 레이아웃 및 컴포넌트
 * ========================================
 */

/* 헤더 및 내비게이션 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
    padding: 15px 30px;
}

.logo {
    font-family: var(--font-primary);
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: clamp(20px, 2.5vw, 30px);
}

.nav-menu a {
    font-family: var(--font-primary);
    color: var(--color-text);
    text-decoration: none;
    font-size: clamp(14px, 1.8vw, 16px);
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-menu a:hover {
    color: var(--color-text-light);
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 25px;
    height: 20px;
    position: relative;
    background: transparent;
    border: none;
}

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: var(--color-text);
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: absolute;
}

.hamburger-menu .bar:nth-child(1) {
    top: 0;
}
.hamburger-menu .bar:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}
.hamburger-menu .bar:nth-child(3) {
    bottom: 0;
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(calc(20px / 2 - 2.5px / 2)) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(calc(-1 * (20px / 2 - 2.5px / 2))) rotate(-45deg);
}


/* 메인 및 섹션 */
.main {
    margin-top: 80px;
}

.section {
    display: none;
    padding: 10px 10px;
    max-width: 1900px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in-out;
}

.section.active {
    display: block;
}

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

/* 푸터 */
.footer {
    position: absolute;
    bottom: -10px;
    width: 100%;
    height: 70px;
    text-align: center;
    padding-bottom: 20px;
    color: var(--color-text-light);
    font-size: 14px;
}
.footer p {
    margin: 0;
    font-family: var(--font-primary);
}
body {
    padding-bottom: 70px;
}
body.works-active .footer {
    position: static;
    height: auto;
}
body.works-active {
    padding-bottom: 20px;
}

/*
 * ========================================
 * 3. 메인 페이지 노란 선
 * ========================================
 */
body::before {
    content: '';
    position: fixed;
    top: calc((100% - var(--header-height) - var(--footer-height)) / 2 + var(--header-height) + var(--vertical-offset));
    left: 0;
    width: 100%;
    height: var(--line-height);
    background: var(--color-primary);
    z-index: -1;
    box-shadow: 
        0 calc(-1 * (var(--line-gap) + var(--line-height))) 0 var(--color-primary),
        0 calc(var(--line-gap) + var(--line-height)) 0 var(--color-primary);
}

/*
 * ========================================
 * 4. 미디어 쿼리 (Media Queries)
 * ========================================
 */
@media (max-width: 650px) {
    .main {
        margin-top: 80px;
        padding-bottom: 0px;
    }
    .footer {
        font-size: 12px;
    }
    .nav {
    padding: 15px 15px;
}
}

@media (max-width: 450px) {
    .hamburger-menu {
        display: flex;
    }
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        display: none;
        padding: 10px 0;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }
    .nav-menu a {
        font-size: clamp(16px, 4vw, 18px);
    }
}