:root {
    --primary-color: #0072ff;
    --secondary-color: #00c6ff;
    --dark-bg: #0a0e17;
    --light-text: #e0e0e0;
    --accent-red: #ff4b2b;
    --accent-orange: #ff416c;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

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

/* Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
    background: transparent;
    /* 모바일 드롭다운 기준점 */
    overflow: visible;
}

header.scrolled {
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
}

.logo img {
    height: 40px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: stretch;       /* hero-content가 전체 높이를 채우도록 */
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #000;
}

.hero-spline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-spline iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 14, 23, 0.4) 0%, rgba(0, 114, 255, 0.1) 100%);
    z-index: 2;
    pointer-events: none;
    /* Allows mouse events to pass through to the Spline video */
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;  /* 텍스트를 위쪽으로 */
    padding: 14vh 20px 8vh;       /* 위: 텍스트 시작 위치 / 아래: 버튼 여백 */
    width: 100%;
}

/* 버튼 그룹을 아래쪽으로 밀기 */
.hero-buttons {
    margin-top: auto;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    font-family: 'Orbitron', sans-serif;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: #ccc;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 114, 255, 0.5);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    margin-left: 20px;
}

.btn-outline:hover {
    background: #fff;
    color: var(--dark-bg);
}

/* Solutions Section */
.solutions {
    padding: 100px 0;
    background-color: var(--dark-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 15px;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto 20px;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.solution-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.solution-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.solution-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.solution-card.accent .card-icon {
    color: var(--accent-orange);
}

.solution-card.accent:hover {
    border-color: var(--accent-orange);
}

/* Technology Section */
.technology {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--dark-bg) 0%, #161b22 100%);
}

.tech-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.tech-text {
    flex: 1;
}

.tech-text h2 {
    font-size: 2.5rem;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 25px;
}

.tech-list {
    list-style: none;
    margin-top: 30px;
}

.tech-list li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tech-list i {
    color: var(--secondary-color);
}

.tech-image {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.tech-image img {
    width: 100%;
    display: block;
    transition: transform 0.5s;
}

.tech-image:hover img {
    transform: scale(1.05);
}

/* Visual Summary Section */
.visual-summary {
    padding: 100px 0;
    background-color: var(--dark-bg);
}

.visual-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 114, 255, 0.2);
    border: 1px solid var(--glass-border);
}

.visual-container img {
    width: 100%;
    display: block;
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-box {
    background: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
    padding: 60px;
    border-radius: 30px;
    text-align: center;
}

.contact-box h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.contact-box p {
    color: #fff;
    margin-bottom: 40px;
}

#contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

input,
textarea {
    width: 100%;
    padding: 15px 20px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
    font-size: 1rem;
}

textarea {
    height: 120px;
    resize: none;
}

/* Footer */
footer {
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

.footer-logo img {
    height: 30px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-out;
}

.fade-in-delayed {
    animation: fadeIn 1s ease-out 0.5s both;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-down {
    margin-top: 50px;
    display: inline-block;
    color: #fff;
    font-size: 2rem;
    animation: bounce 2s infinite;
    transition: color 0.3s;
    text-decoration: none;
}

.scroll-down:hover {
    color: var(--secondary-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ============================
   Hamburger Button
   (데스크탑에서는 숨김)
   ============================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1100;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.25s ease;
    transform-origin: center;
}

/* 열렸을 때 X 모양 */
.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================
   Mobile Responsive
   ============================ */
@media (max-width: 768px) {

    /* 헤더 */
    header {
        padding: 12px 0;
    }

    header.scrolled {
        padding: 8px 0;
    }

    /* 네브바 레이아웃: 로고 | 햄버거 */
    .navbar-content {
        flex-wrap: nowrap;
        align-items: center;
    }

    /* 햄버거 버튼 표시 */
    .hamburger {
        display: flex;
    }

    /* 모바일 메뉴: 기본 숨김 (max-height 슬라이드) */
    #main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(8, 12, 20, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        z-index: 1050;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        /* 기본 숨김 상태 */
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    /* 열렸을 때 */
    #main-nav.open {
        opacity: 1;
        pointer-events: auto;
    }

    #main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: 100%;
    }

    #main-nav ul li {
        width: 100%;
        text-align: center;
        transform: translateY(20px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    #main-nav.open ul li {
        transform: translateY(0);
        opacity: 1;
    }

    /* 각 항목을 순서대로 딜레이 */
    #main-nav.open ul li:nth-child(1) { transition-delay: 0.05s; }
    #main-nav.open ul li:nth-child(2) { transition-delay: 0.1s; }
    #main-nav.open ul li:nth-child(3) { transition-delay: 0.15s; }
    #main-nav.open ul li:nth-child(4) { transition-delay: 0.2s; }

    #main-nav ul li a {
        display: block;
        padding: 20px 40px;
        font-size: 1.3rem;
        font-weight: 700;
        letter-spacing: 2px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        transition: color 0.2s, background 0.2s;
    }

    #main-nav ul li:last-child a {
        border-bottom: none;
    }

    #main-nav ul li a:hover {
        color: var(--secondary-color);
        background: rgba(255,255,255,0.04);
    }

    /* 햄버거 버튼을 nav 위에 표시 */
    #hamburger-btn {
        position: relative;
        z-index: 1200;
    }

    /* Hero 섹션 모바일 최적화 */
    .hero {
        min-height: 100svh;  /* Safe-area 지원 브라우저용 */
        height: 100vh;
        padding-top: 70px;  /* 헤더 공간 확보 */
    }

    .hero-content {
        padding: 10vh 20px 8vh;   /* 위: 텍스트 공간 / 아래: 버튼 공간 */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;  /* 텍스트를 위로 */
        height: calc(100vh - 70px);   /* 헤더 제외한 전체 높이 */
        width: 100%;
    }

    /* 버튼 그룹을 아래쪽으로 밀기 */
    .hero-buttons {
        margin-top: auto;
    }

    /* 오버레이 더 어둡게 — 텍스트 가독성 향상 */
    .hero-overlay {
        background: linear-gradient(
            135deg,
            rgba(8, 12, 20, 0.65) 0%,
            rgba(0, 70, 160, 0.25) 100%
        );
    }

    /* H1: 폰트 작게 + 줄간격 조정 */
    .hero h1 {
        font-size: 1.55rem;
        line-height: 1.35;
        margin-bottom: 14px;
        word-break: keep-all;  /* 한국어 단어 중간 줄바꿈 방지 */
        letter-spacing: -0.02em;
    }

    /* 설명 문구 */
    .hero p {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 28px;
        color: #bbb;
        word-break: keep-all;
    }

    /* 버튼 세로 배치 */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .btn {
        width: 80%;
        max-width: 280px;
        text-align: center;
        padding: 14px 20px;
    }

    .btn-outline {
        margin-left: 0;
        margin-top: 0;
    }

    .scroll-down {
        margin-top: 30px;
        font-size: 1.5rem;
    }

    /* Tech */
    .tech-content {
        flex-direction: column;
    }

    /* Solutions grid: 1열 */
    .solutions-grid {
        grid-template-columns: 1fr;
    }

    /* Solution card 패딩 축소 */
    .solution-card {
        padding: 28px 24px;
    }

    /* Contact box 패딩 축소 */
    .contact-box {
        padding: 40px 24px;
    }
}