/* ==========================================
   1. 기본 설정 및 초기화 (Reset & Base)
========================================== */
* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }
html { scroll-behavior: initial; }
body { 
    font-family: 'Pretendard', 'Outfit', sans-serif; 
    background: #F5F4EC; 
    color: #1A1A1A; 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; display: inline-block; }
button { background: none; border: none; outline: none; font-family: inherit; }

/* Lenis 스크롤 라이브러리 필수 CSS */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* ==========================================
   2. 커스텀 커서 & 파티클 & 로더 & Top 버튼
========================================== */
.custom-cursor { 
    position: fixed; top: 0; left: 0; width: 15px; height: 15px; 
    background-color: #E65A45; border-radius: 50%; pointer-events: none; z-index: 9999; 
    transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, background-color 0.3s; 
    display: flex; justify-content: center; align-items: center; 
}
.cursor-text { color: white; font-size: 12px; font-weight: 700; opacity: 0; font-family: 'Outfit', sans-serif; }

#particle-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9998; overflow: hidden; }
.particle { position: absolute; border-radius: 50%; pointer-events: none; mix-blend-mode: multiply; }

.loader { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    background-color: #F2C94C; display: flex; justify-content: center; align-items: center; z-index: 10000; 
}
.loader-text { font-family: 'Outfit', sans-serif; font-size: 6vw; font-weight: 900; color: #425DA8; transform: translateY(-100px); opacity: 0; }

#top-btn {
    position: fixed; bottom: 120px; right: 40px; 
    background-color: #425DA8; color: white; 
    width: 60px; height: 60px; border-radius: 50%; 
    font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem; 
    display: flex; justify-content: center; align-items: center; 
    z-index: 900; opacity: 0; pointer-events: none; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: background-color 0.3s;
}
#top-btn:hover { background-color: #E65A45; }

.close-btn { 
    padding: 12px 30px; border-radius: 30px; background: white; color: #1A1A1A; 
    font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem; 
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); display: inline-block; 
}
.close-btn:hover { background: #E65A45; color: white; transform: scale(0.9) rotate(-5deg); }

/* ==========================================
   3. 하단 고정 네비게이션 & 다국어 토글
========================================== */
.bottom-nav { 
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); 
    width: 95%; max-width: 1200px; background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(15px); 
    border-radius: 60px; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; 
    z-index: 1000; box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}
.nav-logo { font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 1.3rem; color: #425DA8; padding-right: 20px; display: inline-block; }
.marquee-container { flex-grow: 1; overflow: hidden; white-space: nowrap; margin: 0 20px; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-content { display: inline-block; font-weight: 600; color: #666; }
.marquee-content span { padding-right: 50px; }
.nav-menu { display: flex; align-items: center; gap: 5px; }
.menu-btn { font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700; color: #888; padding: 10px 24px; border-radius: 30px; transition: all 0.3s ease; display: inline-block; }
.menu-btn.active, .menu-btn:hover { background-color: #425DA8; color: white; }

.lang-toggle { display: flex; background: rgba(0,0,0,0.05); border-radius: 30px; padding: 4px; margin-left: 10px; }
.lang-btn { padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; color: #888; transition: 0.3s; }
.lang-btn.active { background: #E65A45; color: white; }

/* ==========================================
   4. 메인 스크롤 섹션들
========================================== */
.section { position: relative; width: 100vw; height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; }

/* Section 1: Hero */
.hero-section { background-color: #F5F4EC; }
.top-left-typewriter { position: absolute; top: 40px; left: 40px; font-size: 1.1rem; font-weight: 700; color: #425DA8; z-index: 10; display: flex; align-items: center; gap: 12px; }
.badge { background-color: #F2C94C; padding: 6px 14px; border-radius: 30px; font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 0.9rem; color: #1A1A1A; }

.center-3d-wrapper { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); perspective: 1200px; z-index: 20; width: 100%; text-align: center; }
.tilt-container { position: relative; display: inline-block; transform-style: preserve-3d; transition: transform 0.1s ease-out; }
.text-layer { font-family: 'Outfit', sans-serif; font-size: 12vw; font-weight: 900; letter-spacing: -0.02em; white-space: nowrap; }
.text-layer.front { position: relative; color: #425DA8; transform: translateZ(0); }
.text-layer.depth { position: absolute; top: 0; left: 0; width: 100%; height: 100%; color: #2A3F7A; }
.text-layer.depth:nth-child(2) { transform: translateZ(-6px); }
.text-layer.depth:nth-child(3) { transform: translateZ(-12px); }
.text-layer.depth:nth-child(4) { transform: translateZ(-18px); }
.text-layer.depth:nth-child(5) { transform: translateZ(-24px); }
.text-layer.shadow { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: translateZ(-30px); text-shadow: 0 20px 40px rgba(0,0,0,0.2); color: transparent; }

.click-sticker { position: absolute; top: -30px; right: -50px; background: #F2C94C; color: #1A1A1A; width: 80px; height: 80px; border-radius: 50%; display: flex; justify-content: center; align-items: center; text-align: center; font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 0.9rem; line-height: 1.1; transform: translateZ(50px); animation: spin 10s linear infinite; pointer-events: none; }
@keyframes spin { 100% { transform: translateZ(50px) rotate(360deg); } }

.blob-container { position: absolute; top: 50%; left: 50%; width: 600px; height: 600px; transform: translate(-50%, -50%); z-index: 5; pointer-events: none; }
.blob-svg { width: 100%; height: 100%; animation: rotateBlob 25s infinite linear; opacity: 0.9; }
@keyframes rotateBlob { 100% { transform: rotate(360deg); } }

.about-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #1A1A1A; z-index: 30; opacity: 0; pointer-events: none; }
.about-content h2 { font-family: 'Outfit', sans-serif; font-size: 4rem; margin-bottom: 20px; font-weight: 900; color: #425DA8; }
/* [FIX] 줄바꿈 완벽 적용 */
.about-content p { 
    font-size: 1.2rem; 
    line-height: 1.6; 
    margin-bottom: 40px; 
    font-weight: 500; 
    word-break: keep-all; 
    white-space: pre-line; 
}

/* Section 2: 텍스트 리빌 (단색 배경 + 유기적 도형) */
.text-reveal-section { 
    background-color: #425DA8; 
    color: white; perspective: 1000px; position: relative; 
}

.blob-container-2 { position: absolute; top: 50%; left: 50%; width: 800px; height: 800px; transform: translate(-50%, -50%); z-index: 1; pointer-events: none; }
.blob-svg-2 { width: 100%; height: 100%; animation: rotateBlob2 30s infinite linear reverse; opacity: 0.15; } 
@keyframes rotateBlob2 { 100% { transform: rotate(-360deg); } }

.reveal-text-container { position: relative; z-index: 10; }
.reveal-text { font-size: 3.5rem; font-weight: 700; line-height: 1.3; text-align: center; }

.line-wrapper { display: block; }
.line { display: inline-block; opacity: 0; } 
.spacer { height: 40px; } 

.highlight {
    color: #F2C94C;
    display: inline-block; 
    font-weight: 900;
    opacity: 0; 
}

/* Section 3: 푸터 */
.footer-section { background-color: #1A1A1A; color: white; flex-direction: column; }
.footer-content { text-align: center; }
.footer-title { font-family: 'Outfit', sans-serif; font-size: 5rem; font-weight: 900; margin-bottom: 60px; color: #F2C94C; display: inline-block; }
.footer-info-wrapper { display: flex; gap: 80px; justify-content: center; }
.footer-info { text-align: center; }
.info-label { font-family: 'Outfit', sans-serif; font-size: 1.2rem; color: #888; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 2px; }
.info-value { font-size: 2rem; font-weight: 700; display: inline-block; }

/* ==========================================
   5. 우측 Contact 패널 & 갤러리
========================================== */
.contact-panel { 
    position: fixed; top: 0; right: -100%; width: 100%; max-width: 500px; height: 100vh; 
    background-color: #425DA8; color: white; z-index: 2000; padding: 60px 50px; 
    display: flex; flex-direction: column; justify-content: center; 
    transition: right 0.8s cubic-bezier(0.77, 0, 0.175, 1); box-shadow: -10px 0 30px rgba(0,0,0,0.1); 
}
.contact-panel.open { right: 0; }
.panel-close { position: absolute; top: 40px; right: 40px; }
.panel-content h3 { font-family: 'Outfit', sans-serif; font-size: 4rem; font-weight: 900; color: #F2C94C; margin-bottom: 20px; }
/* [FIX] 줄바꿈 완벽 적용 */
.panel-content p { 
    font-size: 1.2rem; 
    line-height: 1.6; 
    margin-bottom: 40px; 
    opacity: 0.9; 
    word-break: keep-all; 
    white-space: pre-line; 
}
.email-link { font-size: 2rem; font-weight: 700; color: white; margin-bottom: 10px; }
.phone-link { font-size: 1.5rem; font-weight: 500; opacity: 0.8; display: inline-block; }
.panel-anim { opacity: 0; transform: translateY(20px); }

.gallery-section { 
    position: fixed; top: 100vh; left: 0; width: 100vw; height: 100vh; 
    background-color: #1A1A1A; color: white; z-index: 2000; padding: 50px; display: flex; flex-direction: column; 
}
.gallery-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.gallery-header h2 { font-family: 'Outfit', sans-serif; font-size: 3rem; font-weight: 900; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; height: 100%; }
.gallery-item { position: relative; border-radius: 20px; overflow: hidden; display: block; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.item-title { position: absolute; bottom: 20px; left: 20px; font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; background: rgba(0,0,0,0.6); padding: 8px 20px; border-radius: 30px; backdrop-filter: blur(5px); }

.magnetic-item { display: inline-block; }

/* ==========================================
   6. 반응형 미디어 쿼리 (Tablet & Mobile)
========================================== */
.mobile-br { display: none; }

@media screen and (max-width: 1024px) {
    .text-layer { font-size: 18vw; }
    .reveal-text { font-size: 2.5rem; }
    .footer-title { font-size: 4rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .marquee-container { display: none; }
    .bottom-nav { width: 90%; justify-content: center; gap: 20px; }
    .blob-container-2 { width: 600px; height: 600px; }
}

@media screen and (max-width: 768px) {
    .custom-cursor { display: none; }
    * { cursor: auto !important; }
    
    .mobile-br { display: block; }
    
    .top-left-typewriter { top: 20px; left: 20px; font-size: 0.9rem; }
    .text-layer { font-size: 22vw; }
    .click-sticker { width: 60px; height: 60px; font-size: 0.7rem; right: -20px; top: -40px; }
    .blob-container { width: 400px; height: 400px; }
    .blob-container-2 { width: 400px; height: 400px; }
    
    .about-content h2 { font-size: 2.5rem; }
    .about-content p { font-size: 1rem; }
    
    .reveal-text { font-size: 1.8rem; padding: 0 20px; line-height: 1.4; }
    .spacer { height: 20px; }
    
    .footer-title { font-size: 3rem; margin-bottom: 40px; }
    .footer-info-wrapper { flex-direction: column; gap: 30px; }
    .info-value { font-size: 1.5rem; }
    
    .bottom-nav { bottom: 20px; padding: 10px 15px; width: 95%; gap: 5px; }
    .nav-logo { font-size: 1.1rem; padding-right: 0; }
    .menu-btn { padding: 8px 12px; font-size: 0.85rem; }
    .lang-toggle { margin-left: 5px; }
    .lang-btn { padding: 4px 8px; font-size: 0.75rem; }
    
    .contact-panel { padding: 40px 30px; }
    .panel-content h3 { font-size: 3rem; }
    .email-link { font-size: 1.5rem; }
    
    .gallery-section { padding: 20px; }
    .gallery-header h2 { font-size: 2rem; }
    .gallery-grid { grid-template-columns: 1fr; gap: 15px; }
    
    #top-btn { bottom: 90px; right: 20px; width: 50px; height: 50px; font-size: 0.9rem; }
}
