:root {
            --primary-color: #2D63FF;
            --primary-glow: rgba(45, 99, 255, 0.4);
            --bg-color: #000000;
            --surface-color: rgba(20, 20, 22, 0.7);
            --border-color: rgba(255, 255, 255, 0.08);
            --text-main: #f5f5f7;
            --text-muted: #86868b;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-main);
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            overscroll-behavior: none;
        }

        /* 스크롤바 커스텀 */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #000; }
        ::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #555; }

        /* 네비게이션 (Glassmorphism) */
        header {
            position: fixed;
            top: 0; left: 0; width: 100%;
            height: 60px;
            z-index: 1000;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: saturate(180%) blur(20px);
            -webkit-backdrop-filter: saturate(180%) blur(20px);
            border-bottom: 1px solid var(--border-color);
            transition: all 0.3s ease;
        }

        nav {
            max-width: 1200px;
            margin: 0 auto;
            height: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 24px;
        }

        .logo a, .footer-logo a {
            font-family: 'Noto Serif KR', serif;
            font-weight: 600;
            text-decoration: none;
            display: flex;
            align-items: baseline;
            gap: 5px;
            transition: color 0.3s ease;
            z-index: 105;
        }
        .logo a {
    font-size: 28px;
    color: #ffffff;
}

.logo a span {
    font-size: 16px;
    font-weight: 500;
}

        .menu {
            display: flex;
            gap: 32px;
            list-style: none;
        }

        .menu a {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 13px;
            font-weight: 400;
            transition: color 0.3s ease;
        }
        .menu a:hover, .menu li.active a { color: #fff; }

        /* 히어로 3D 섹션 */
        #section-hero {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    background-color: #000;
    z-index: 10;
    overflow: hidden; /* ✨ 이 속성을 반드시 추가해야 아래 영역으로 침범하지 않습니다. */
}

        #canvas-container {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            z-index: 1;
        }

        /* bottom gradient so hero slider text stays readable */
        #section-hero::after {
            content: '';
            position: absolute;
            bottom: 0; left: 0; right: 0;
            height: 38%;
            background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
            z-index: 5;
            pointer-events: none;
        }

        .hero-content {
            position: relative;
            z-index: 10;
            width: 100%;
            max-width: 800px;
            text-align: center;
            padding-bottom: 12vh;
            pointer-events: none; /* 3D 캔버스 조작 방해 금지 */
        }

        .hero-slider {
            position: relative;
            height: 170px;
            margin-bottom: 28px;
        }

        .hero-slide {
            position: absolute;
            top: 0; left: 0; width: 100%;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .hero-slide.active {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        /* --- 메인 텍스트 (모든 영역과 동일한 사이즈 기준) --- */
        .hero-text h1 {
            font-size: 34px;
            font-weight: 600; /* 메인 영역의 메인 문구만 600 */
            line-height: 1.35;
            letter-spacing: -0.03em;
            margin-bottom: 20px;
            background: linear-gradient(135deg, #ffffff 0%, #d1d1d6 45%, #737373 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-rendering: optimizeLegibility;
        }

        .hero-text h1 span {
            background: linear-gradient(135deg, #4facfe 0%, var(--primary-color) 70%, #1a4bd9 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .hero-text p {
            font-size: 18px;
            font-weight: 400;
            letter-spacing: -0.015em;
            margin-bottom: 0;
            background: linear-gradient(180deg, #a1a1a6 0%, #6e6e73 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        /* ------------------------------------------- */

        .primary-btn {
            display: inline-block;
            background: #fff;
            color: #000;
            padding: 14px 28px;
            border-radius: 30px;
            font-weight: 600;
            font-size: 14px;
            text-decoration: none;
            transition: all 0.3s ease;
            pointer-events: auto;
        }
        .primary-btn:hover {
            background: var(--primary-color);
            color: #fff;
            box-shadow: 0 4px 20px var(--primary-glow);
        }

        .hero-controls {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 16px;
            margin-top: 80px;
        }
        .slide-numbers { font-size: 12px; color: var(--text-muted); font-weight: 500; letter-spacing: 2px;}
        .progress-bar { width: 100px; height: 2px; background: rgba(255,255,255,0.2); border-radius: 2px; overflow: hidden; }
        .progress-fill { height: 100%; background: #fff; width: 0; }

        /* 철학 섹션 (Parallax & Canvas) */
        .philosophy-section {
            height: 400vh; /* 스크롤 길이 */
            position: relative;
            background: #000;
        }

        .sticky-wrapper {
            position: sticky;
            top: 0; width: 100%; height: 100vh;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #space-canvas {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            z-index: 1; pointer-events: none;
        }

        .philosophy-container {
            position: relative;
            z-index: 10;
            width: 100%;
            max-width: 1000px;
            height: 300px;
            text-align: center;
        }

        .philosophy-step {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            opacity: 0;
            visibility: hidden;
            will-change: transform, opacity;
        }

        .philosophy-top { font-size: 14px; color: #fff; font-weight: 500; margin-bottom: 18px; letter-spacing: 0.05em; }
        .philosophy-main { font-size: 34px; font-weight: 500; line-height: 1.35; letter-spacing: -0.03em; margin-bottom: 20px; color: var(--primary-color); }
        .philosophy-main span { color: var(--primary-color); }
        .philosophy-bottom p { font-size: 18px; color: var(--text-muted); font-weight: 400; }

        /* 공통 섹션 레이아웃 */
        .reveal { opacity: 0; transform: translateY(40px); transition: all 1s cubic-bezier(0.4, 0, 0.2, 1); }
        .reveal.active { opacity: 1; transform: translateY(0); }

        .section-title {
            font-size: 34px;
            font-weight: 500;
            text-align: center;
            margin-bottom: 60px;
            letter-spacing: -0.02em;
        }

        /* 프로세스 섹션 (애플 스타일 프리미엄 개선) */
        .process-section { padding: 140px 24px; background: #000; position: relative; }
        .container { max-width: 1200px; margin: 0 auto; }

        .process-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 32px;
        }

        .process-card {
            background: linear-gradient(145deg, rgba(30, 30, 32, 0.6) 0%, rgba(15, 15, 16, 0.8) 100%);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 32px;
            padding: 48px 40px;
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            overflow: hidden;
            z-index: 1;
        }
        .process-card::before {
            content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: radial-gradient(circle at top right, rgba(45, 99, 255, 0.15), transparent 50%);
            opacity: 0; transition: opacity 0.6s ease;
            z-index: -1;
        }
        .process-card:hover {
            transform: translateY(-8px) scale(1.02);
            border-color: rgba(255, 255, 255, 0.15);
            box-shadow: 0 30px 60px rgba(0,0,0,0.5);
        }
        .process-card:hover::before { opacity: 1; }

        .step-num {
            display: inline-flex; justify-content: center; align-items: center;
            font-size: 13px; font-weight: 500; color: #fff;
            background: rgba(255, 255, 255, 0.08);
            box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
            padding: 6px 14px; border-radius: 20px;
            margin-bottom: 20px; letter-spacing: 0.05em;
            transition: all 0.4s ease;
        }
        .process-card:hover .step-num {
            background: var(--primary-color);
            box-shadow: 0 0 20px rgba(45, 99, 255, 0.4);
            color: #fff;
        }
        .process-card h4 { font-size: 20px; font-weight: 500; margin-bottom: 14px; letter-spacing: -0.02em; color: #fff;}
        .process-card p { font-size: 15px; color: #a1a1a6; line-height: 1.65; letter-spacing: -0.01em; font-weight: 400; }

        /* 서비스 섹션 (애플 스타일 프리미엄 개선) */
        .services { padding: 140px 24px; background: #000; position: relative; border: none; }
        .services-container { max-width: 1200px; margin: 0 auto; }

        .services-modern-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 32px;
        }

        .service-item {
            background: rgba(22, 22, 24, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 36px;
            padding: 56px 40px;
            display: flex;
            flex-direction: column;
            gap: 32px;
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .service-item:hover {
            background: rgba(32, 32, 35, 0.8);
            border-color: rgba(255,255,255,0.15);
            transform: scale(1.02);
            box-shadow: 0 20px 40px rgba(0,0,0,0.4);
        }
        .service-item.featured {
            background: linear-gradient(180deg, rgba(35, 35, 40, 0.8) 0%, rgba(15, 15, 18, 0.9) 100%);
            border-color: rgba(255, 255, 255, 0.06);
            box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
        }
        .service-item.featured:hover {
            border-color: rgba(255, 255, 255, 0.15);
            box-shadow: 0 40px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
        }

        .service-header { display: flex; flex-direction: column; gap: 24px; }
        .service-icon-bg {
            width: 72px; height: 72px;
            background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.01) 100%);
            border: 1px solid rgba(255,255,255,0.1);
            box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
            border-radius: 22px; color: #fff;
            display: flex; justify-content: center; align-items: center; padding: 18px;
            transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .service-item.featured .service-icon-bg {
            background: linear-gradient(135deg, var(--primary-color) 0%, #1a4bd9 100%);
            border: none;
            box-shadow: 0 10px 20px rgba(45, 99, 255, 0.3), inset 0 1px 1px rgba(255,255,255,0.4);
        }
        .service-item:hover .service-icon-bg { transform: scale(1.05) translateY(-4px); }
        .service-name { font-size: 20px; font-weight: 500; margin-bottom: 8px; letter-spacing: -0.02em; }
        .service-summary { font-size: 14px; color: var(--primary-color); font-weight: 500; letter-spacing: -0.01em;}
        .service-description { font-size: 15px; line-height: 1.65; color: #a1a1a6; margin-bottom: 24px; letter-spacing: -0.01em; font-weight: 400;}
        .service-description strong { color: #fff; font-weight: 600; }

        .service-check-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
        .service-check-list li { font-size: 14px; color: #a1a1a6; display: flex; align-items: flex-start; gap: 12px; letter-spacing: -0.01em; font-weight: 400; }
        .service-check-list li::before {
            content: '✓'; color: #000; font-weight: 600; font-size: 10px;
            background: var(--primary-color); display: flex; justify-content: center; align-items: center;
            width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
            box-shadow: 0 2px 5px rgba(45,99,255,0.3);
        }

        /* 포트폴리오 (수직->가로 스크롤 매핑) */
        .portfolio {
            height: 600vh; /* 카드가 5개이므로 스크롤 공간을 충분히 확보 */
            position: relative;
            background: #050505;
        }

        .portfolio-container {
            position: sticky;
            top: 0; width: 100%; height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .portfolio-container .section-title {
            position: absolute;
            top: 12vh;
            left: 0;
            width: 100%;
            text-align: center;
            margin: 0;
        }

        .portfolio-track {
            display: flex;
            gap: 40px;
            padding: 0 20vw 0 8vw;
            will-change: transform;
            align-items: center;
            margin-top: 10vh;
            transform: translate3d(0, 0, 0);
            backface-visibility: hidden;
        }

        .portfolio-card {
            width: 380px;
            height: 460px;
            flex-shrink: 0;
            background: var(--surface-color);
            border: 1px solid var(--border-color);
            border-radius: 24px;
            overflow: hidden;
            backdrop-filter: blur(20px);
            transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
            display: flex;
            flex-direction: column;
        }
        .portfolio-card:hover { border-color: rgba(45, 99, 255, 0.4); }

        .portfolio-info { padding: 40px 36px; display: flex; flex-direction: column; flex-grow: 1; }
        .portfolio-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
        .portfolio-title { font-size: 20px; font-weight: 500; color: #fff; letter-spacing: -0.02em; }
        .client-tag { font-size: 12px; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 4px 10px; border-radius: 12px; font-weight: 400; }
        .portfolio-period { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; font-weight: 400; letter-spacing: 0.02em; }
        .portfolio-summary { font-size: 14px; color: var(--primary-color); font-weight: 500; margin-bottom: 14px; letter-spacing: -0.01em; }
        .portfolio-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px; flex-grow: 1; font-weight: 400; }

        .portfolio-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
        .portfolio-tags span { font-size: 12px; color: var(--primary-color); background: rgba(45, 99, 255, 0.1); padding: 6px 12px; border-radius: 8px; font-weight: 500; }

        .portfolio-link { color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; transition: gap 0.3s ease; align-self: flex-end; }
        .portfolio-link:hover { gap: 12px; color: var(--primary-color); }

        /* 문의하기 섹션 */
        .contact { padding: 150px 24px; background: #000; position: relative; display: flex; flex-direction: column; align-items: center; }
        .contact-container { width: 100%; max-width: 800px; }

        .contact-form {
            background: var(--surface-color);
            border: 1px solid var(--border-color);
            border-radius: 32px;
            padding: 48px;
            backdrop-filter: blur(20px);
        }

        .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
        .form-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
        .form-group.full { grid-column: 1 / -1; }
        .form-group label { font-size: 14px; font-weight: 500; color: #ddd; }
        .form-group label .required { color: #ff3b30; }

        .form-group input, .form-group select, .form-group textarea {
            width: 100%;
            background: rgba(255,255,255,0.03);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 16px;
            color: #fff;
            font-family: inherit;
            font-size: 15px;
            outline: none;
            transition: all 0.3s ease;
        }
        .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary-color); background: rgba(255,255,255,0.06); }
        .form-group select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            padding-right: 44px;
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23a1a1a6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1l5 5 5-5'/></svg>");
            background-repeat: no-repeat;
            background-position: right 18px center;
            background-size: 12px 8px;
            cursor: pointer;
        }
        .form-group select::-ms-expand { display: none; }
        .form-group select option { background: #111; color: #fff; }
        .form-group textarea { resize: vertical; min-height: 120px; }

        .submit-btn {
            width: 100%;
            background: #fff;
            color: #000;
            border: none;
            padding: 12px 28px;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 600;
            line-height: 1.4;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .submit-btn:hover { background: var(--primary-color); color: #fff; }

        /* 커스텀 모달 (Alert 대체) */
        #custom-modal {
            position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
            background: rgba(0,0,0,0.8); backdrop-filter: blur(10px);
            display: flex; justify-content: center; align-items: center;
            z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s ease;
        }
        #custom-modal.show { opacity: 1; visibility: visible; }
        .modal-content {
            background: #111; border: 1px solid var(--border-color);
            padding: 40px; border-radius: 24px; text-align: center; max-width: 400px;
        }
        .modal-content h3 { font-size: 20px; margin-bottom: 16px; color: #fff; font-weight: 500; }
        .modal-content p { color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; font-weight: 400; }
        .modal-btn { background: var(--primary-color); color: #fff; border: none; padding: 12px 32px; border-radius: 20px; font-weight: 500; cursor: pointer; }

        /* 푸터 */
        footer { padding: 60px 24px; background: #000; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 13px; }
        .footer-container { max-width: 1200px; margin: 0 auto; }
        .footer-logo {
    margin-bottom: 40px;
}

.footer-logo a {
    font-family: 'Noto Serif KR', serif;
    font-weight: 600;
    font-size: 28px;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 8px;
    letter-spacing: -0.03em;
}

.footer-logo a span {
    font-size: 16px;
    font-weight: 400;
}
        .company-details { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
        .detail-row { display: flex; flex-wrap: wrap; gap: 24px; }
        .detail-item .label { color: #555; font-style: normal; margin-right: 8px; font-weight: 500; }
        .footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-color); padding-top: 24px; }
        .footer-legal a { color: var(--text-muted); text-decoration: none; margin-left: 16px; }

        #scrollToTop {
            position: fixed; bottom: 30px; right: 30px;
            width: 48px; height: 48px; border-radius: 24px;
            background: rgba(255,255,255,0.1); color: #fff; border: 1px solid var(--border-color);
            backdrop-filter: blur(10px); cursor: pointer;
            opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1000;
            display: flex; justify-content: center; align-items: center;
        }
        #scrollToTop.show { opacity: 1; visibility: visible; }
        #scrollToTop:hover { background: var(--primary-color); border-color: var(--primary-color); }

        /* =========================================
   반응형 모바일 처리 (Tablet & Mobile)
   ========================================= */

@media (max-width: 1024px) {
    .process-grid, .services-modern-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .portfolio-track { padding: 0 10vw 0 6vw; }
}

@media (max-width: 768px) {
    /* 1. 네비게이션 및 헤더 */
    nav { padding: 0 16px; justify-content: center;}
    .logo a { font-size: 22px; }
    .menu { display: none; } /* 모바일에서는 심플하게 메뉴 숨김 (필요시 햄버거 메뉴 추가) */

    /* 2. 메인 히어로 텍스트 스케일 다운 (전 영역 동일 사이즈) */
    .hero-content { padding-left: 20px; padding-right: 20px; padding-bottom: 20vh; }
    .hero-slider { height: 150px; margin-bottom: 24px; }
    .hero-text h1 { font-size: 26px; margin-bottom: 14px; }
    .hero-text p { font-size: 15px; margin-bottom: 0; }
    .primary-btn { padding: 12px 24px; font-size: 13px; }

    /* 3. 공통 섹션 여백(Padding) 대폭 축소 */
    .process-section, .services, .contact { padding: 80px 20px; }
    .section-title { font-size: 26px; margin-bottom: 40px; }

    /* 4. 철학 섹션 텍스트 최적화 */
    .philosophy-main { font-size: 26px; margin-bottom: 14px; }
    .philosophy-top { font-size: 12px; margin-bottom: 14px; }
    .philosophy-bottom p { font-size: 15px; }

    /* 5. 프로세스 & 서비스 그리드 1열 배치 및 내부 여백 축소 */
    .process-grid, .services-modern-grid, .form-grid { grid-template-columns: 1fr; gap: 20px; }
    .process-card { padding: 32px 24px; }
    .process-card h4 { font-size: 18px; }
    .service-item { padding: 40px 24px; gap: 24px; }
    .service-item .service-header { flex-direction: column; gap: 0; }
    .service-icon-bg { display: none; }
    .service-name { font-size: 18px; }

    /* 6. 포트폴리오 가로 스크롤 카드 화면 꽉 차게 조정 */
    .portfolio-track {
        padding: 0 8vw 0 6vw;
        margin-top: 5vh;
    }
    .portfolio-card {
        width: 82vw;
        height: 440px;
    }
    .portfolio-info { padding: 28px 24px; }
    .portfolio-title { font-size: 18px; }
    .portfolio-summary { font-size: 13px; }
    .portfolio-desc { font-size: 13.5px; margin-bottom: 18px; }

    /* 7. 문의하기 폼 최적화 */
    .contact-form { padding: 32px 20px; border-radius: 24px; }
    .form-group input, .form-group select, .form-group textarea { padding: 14px; font-size: 14px; }

    /* 8. 푸터 모바일 세로 정렬 */
    footer { padding: 40px 20px; }
    .footer-logo a { font-size: 22px; }
    .detail-row { flex-direction: column; gap: 8px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
    .footer-legal { margin-left: 0; display: flex; gap: 16px; }
    .footer-legal a { margin-left: 0; }
}

/* 아주 작은 화면 (아이폰 SE 등) 추가 대응 — 동일 사이즈 통일 */
@media (max-width: 480px) {
    .hero-text h1 { font-size: 22px; }
    .philosophy-main { font-size: 22px; }
    .section-title { font-size: 22px; }
}