/* === 1. GLOBAL STYLES & VARIABLES === */
:root {
    --color-primary: #F15A24;
    --color-secondary: #FCEE21;
    --color-dark: #3C3D42;
    --color-text: #464646;
    --color-light-gray: #E6E7ED;
    --color-white: #FFFFFF;
    
    /* 원본과 가장 유사한 폰트 스택으로 변경 */
    --font-main: 'Spoqa Han Sans Neo', 'Noto Sans KR', sans-serif;
    --font-heading: 'Raleway', sans-serif;
    --font-en-bold: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: hidden;
    font-size: 15px;
    -webkit-font-smoothing: antialiased; /* 폰트 렌더링 개선 */
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

section {
    width: 100%;
    padding: 120px 0;
}

h1, h2, h3, h4, p, span, li, a, button, input, textarea, label {
    word-break: keep-all; /* 가장 중요한 글자 깨짐 방지 속성 */
    letter-spacing: -0.02em; /* 미세 조정 */
}


/* === 2. HEADER & NAVIGATION === */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    background-color: transparent;
    height: 90px;
    display: flex;
    align-items: center;
}

#header.scrolled {
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: block;
    z-index: 1001; /* 다른 요소에 가려지지 않도록 */
}

.logo img {
    height: 44px;
    width: auto;
}

.desktop-nav ul {
    display: flex;
    align-items: center;
}

.desktop-nav li {
    margin-left: 10px;
}

.desktop-nav a {
    display: block;
    padding: 20px 20px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 16px;
    color: var(--color-text);
    transition: color 0.3s, transform 0.3s;
}

.desktop-nav a:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.mobile-nav-toggle, .mobile-nav-wrapper {
    display: none;
}


/* === 3. HOME SECTION (VIDEO) === */
.video-section {
    padding: 0;
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-background iframe {
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}


/* === 4. SECTION TITLE (공통) === */
.section-title {
    text-align: center;
    margin-bottom: 80px;
}

.section-title h2 {
    font-family: var(--font-main);
    font-size: 40px;
    font-weight: 500;
    letter-spacing: 5px;
    margin-bottom: 25px;
}

.section-title .title-bar {
    width: 40px;
    height: 3px;
    background-color: var(--color-text);
    margin: 0 auto;
}


/* === 5. ABOUT SECTION === */
#about {
    background: url('images/타임리미트%20소개서%20copy.png') no-repeat center bottom;
    background-size: contain;
    padding-bottom: 700px; /* 이미지 높이에 따라 조정 */
}
.about-grid {
    display: flex;
    gap: 40px;
    justify-content: space-between;
    margin-bottom: 60px;
}

.about-text-content {
    flex-basis: 55%;
}

.about-text-content h3, .about-text-content .subtitle {
    font-family: var(--font-en-bold);
    font-size: 38px;
    font-weight: bold;
    line-height: 1.2;
}
.about-text-content .subtitle { margin: 10px 0 30px; }
.about-text-content .highlight { color: var(--color-primary); }
.about-text-content .description { line-height: 2; }

.about-award-content { flex-basis: 40%; }
.award-box {
    background-color: var(--color-secondary);
    padding: 40px;
}
.award-box img { margin: 0 auto 20px; height: 80px; }
.award-box h4 { font-size: 16px; font-weight: 700; }
.award-box p { font-size: 16px; font-weight: 700; line-height: 1.5; margin-bottom: 5px; }
.award-box .award-description { display: block; margin-top: 20px; line-height: 1.8; text-align: left; }
.about-image-wrapper { display: none; } /* 배경으로 처리했으므로 숨김 */


/* === 6. SYSTEM SECTION === */
#system { padding-bottom: 0; }
.system-image-wrapper { margin-top: 60px; }


/* === 7. WORKS SECTION === */
#works.gray-bg { background-color: var(--color-light-gray); }
.works-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 60px;
    margin-bottom: 80px;
}
.works-list li { line-height: 2; }


/* === 8. CONTACT SECTION === */
.contact-wrapper { display: flex; gap: 40px; }
.contact-info, .contact-form { flex: 1; }
.contact-info {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
}
.info-item { display: flex; align-items: center; gap: 20px; }
.info-item img { width: 40px; height: 40px; }
.info-item p { font-family: var(--font-main); font-size: 14px; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { display: block; margin-bottom: 8px; font-size: 13px; text-transform: uppercase; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-text);
    background-color: transparent;
    font-family: var(--font-main);
    font-size: 14px;
}
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #999; }
.submit-btn {
    padding: 12px 30px;
    border: 1px solid var(--color-dark);
    background-color: transparent;
    color: var(--color-dark);
    text-transform: uppercase;
    font-family: var(--font-main);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    float: right;
}
.submit-btn:hover { background-color: var(--color-dark); color: var(--color-white); }


/* === 9. FOOTER & BACK TO TOP === */
footer {
    background-color: var(--color-dark);
    color: #aaa;
    text-align: center;
    padding: 40px 20px;
    font-size: 12px;
    line-height: 1.8;
}
footer p { margin-bottom: 10px; }
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #343438;
    color: var(--color-white);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 999;
}
.back-to-top.visible { opacity: 0.6; visibility: visible; }
.back-to-top:hover { opacity: 0.85; transform: translateY(-3px); }


/* === 10. RESPONSIVE STYLES === */
@media (max-width: 1050px) {
    .container, .header-container { padding: 0 30px; }
    #about { padding-bottom: 550px; } /* 태블릿 이미지 크기 반영 */

    .desktop-nav { display: none; }
    .mobile-nav-toggle {
        display: flex; flex-direction: column; justify-content: space-around;
        width: 30px; height: 25px; background: transparent; border: none;
        cursor: pointer; padding: 0; z-index: 1002;
    }
    .mobile-nav-toggle span { display: block; width: 100%; height: 3px; background-color: var(--color-text); border-radius: 3px; }
    
    .mobile-nav-wrapper {
        display: block; position: fixed; top: 0; right: 0;
        width: 250px; height: 100%; background-color: var(--color-dark);
        transform: translateX(100%); transition: transform 0.4s ease-in-out;
        z-index: 1001;
    }
    .mobile-nav-wrapper.open { transform: translateX(0); }
    .mobile-nav { padding-top: 100px; }
    .mobile-nav ul { display: flex; flex-direction: column; }
    .mobile-nav a { display: block; padding: 20px; color: var(--color-white); font-size: 18px; text-align: center; }

    .about-grid { flex-direction: column; align-items: center; text-align: center; }
    .about-text-content, .about-award-content { max-width: 600px; width: 100%; }
    .about-award-content { margin-top: 40px; }
    .award-box .award-description { text-align: center; }
}

@media (max-width: 768px) {
    section { padding: 80px 0; }
    #about { background: none; padding-bottom: 80px; } /* 모바일에서는 배경이미지 제거, 일반 이미지로 표시 */
    .about-image-wrapper { display: block; margin-top: 50px; }

    .section-title h2 { font-size: 30px; letter-spacing: 3px; }
    .about-text-content h3, .about-text-content .subtitle { font-size: 32px; }
    .works-list { grid-template-columns: 1fr; text-align: center; }
    .contact-wrapper { flex-direction: column; }
    .contact-info { text-align: center; }
    .info-item { justify-content: center; }
}

@media (max-width: 480px) {
    .container, .header-container { padding: 0 20px; }
    #header { height: 70px; }
    .logo img { height: 35px; }
    .section-title h2 { font-size: 24px; letter-spacing: 2px; }
    .about-text-content h3, .about-text-content .subtitle { font-size: 28px; }
    .works-list { gap: 10px; }
    .works-list li { line-height: 1.8; }
    footer { font-size: 11px; }
}