:root {
    --bg-color: #FFFFFF;
    --section-bg: #F5F5F7;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --accent-color: #000000;
    --border-color: #D2D2D7;
    --container-width: 1200px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.center {
    text-align: center;
}

/* Navigation */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
}

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

.hero-overlay-logo {
    position: absolute;
    top: 7%;
    /* Positioned above the "SPORTS SCIENCE COMPOSITE" text area */
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    /* 화면 너비의 45% 정도로 제한 (기존보다 절반 수준) */
    max-width: 250px;
    /* 너무 커지지 않게 최대치 고정 */
    z-index: 5;
    opacity: 0.9;
}

.hero-overlay-logo img {
    height: 45px;
    /* Adjusting to match the visual weight in the reference */
    width: auto;
}

.gallery-item.no-hover:hover .base-img,
.gallery-item.no-hover:hover .hover-img {
    transform: none;
    opacity: 1;
}

.gallery-item.no-hover .play-overlay {
    display: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 햄버거 버튼은 PC에서 숨김 */
.menu-checkbox,
.hamburger {
    display: none;
}

/* Typography */
.section-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.section-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 60px;
}

.tag {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

/* Buttons */
.btn-primary {
    background: var(--accent-color);
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 980px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-secondary {
    color: #0066CC;
    font-weight: 500;
    font-size: 1rem;
}

/* Engine Start (Premium Rectangle) Button Style */
.btn-engine-start {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 85%;
    max-width: 280px;
    padding: 18px 0;
    background: #0a192f;
    /* Deep Navy */
    color: #e0e0e0 !important;
    /* Metallic Silver */
    border-radius: 12px;
    border: 1px solid rgba(192, 192, 192, 0.4);
    /* Silver Border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.4s ease;
    margin: 25px auto 0;
    text-align: center;
    line-height: 1;
    text-decoration: none;
}

.btn-engine-start .small {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 4px;
    margin-bottom: 6px;
    opacity: 0.8;
}

.btn-engine-start .large {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.btn-engine-start:hover {
    background: #0d203d;
    border-color: rgba(192, 192, 192, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 10px rgba(192, 192, 192, 0.2);
    opacity: 1 !important;
}

.btn-engine-start:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Gallery Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.gallery-item {
    background: var(--section-bg);
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gallery-item.full-width {
    grid-column: span 2;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-item .hover-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover .base-img {
    opacity: 0;
}

.gallery-item:hover .hover-img {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    cursor: pointer;
}

.play-overlay span {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    border: 1px solid #fff;
    padding: 10px 20px;
    border-radius: 2px;
}

.gallery-item:hover .play-overlay {
    opacity: 1;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
}

.video-modal .close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 2rem;
    cursor: pointer;
    font-weight: 300;
}

.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Product Display Section */
.products-display,
#products {
    padding: 100px 0;
}

.product-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.product-card {
    text-align: left;
}

.product-card .img-wrap {
    background: var(--section-bg);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.product-card img {
    max-width: 80%;
}

.product-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.product-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 80px 0;
    background: #fff;
    font-size: 0.85rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    color: var(--text-secondary);
}

.footer h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.footer p {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Form Styles */
.contact-form {
    max-width: 600px;
    margin: 100px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
}

/* Responsive */
@media (max-width: 900px) {

    /* 1. 헤더 및 햄버거 버튼 배치 */
    .nav-container {
        justify-content: space-between;
        /* 로고와 햄버거 버튼 양 끝 배치 */
        padding: 0 20px;
    }

    .hamburger {
        display: flex;
        /* 모바일에서만 보이게 설정 */
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1001;
        padding: 5px;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-primary);
        transition: 0.3s;
        border-radius: 2px;
    }

    /* 2. 메뉴 목록 디자인 (평소에는 숨김) */
    .nav-links {
        display: none;
        /* 평소에는 안 보임 */
        position: absolute;
        top: 60px;
        /* 헤더 바로 아래 위치 */
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        /* 배경색 */
        flex-direction: column;
        padding: 30px 0;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        gap: 25px;
        /* 메뉴 사이 간격 넓게 */
    }

    /* 3. 햄버거 버튼 클릭 시 동작 (체크박스 트릭) */
    /* 체크박스가 체크되면(.menu-checkbox:checked) 동생 요소인 메뉴(.nav-links)를 보여줌 */
    .menu-checkbox:checked~.nav-links {
        display: flex;
    }

    /* 햄버거 버튼 애니메이션 (X자로 변신) */
    .menu-checkbox:checked~.hamburger span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-checkbox:checked~.hamburger span:nth-child(2) {
        opacity: 0;
    }

    .menu-checkbox:checked~.hamburger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* 4. 본문 레이아웃 모바일 최적화 */
    .gallery-grid {
        grid-template-columns: 1fr;
        /* 한 줄에 하나씩 */
    }

    .gallery-item.full-width {
        grid-column: auto;
    }

    .product-row {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr;
        /* 푸터도 한 줄로 */
        text-align: center;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .section-title {
        font-size: 2.2rem;
        /* 폰트 크기 조절 */
    }

    .section-desc {
        margin-bottom: 20px !important;
    }

    /* Reduce vertical gaps on mobile */
    .gallery-item {
        padding: 40px 20px;
    }

    #products {
        padding: 50px 0 !important;
    }
}