/*
Theme Name: Yoonha Custom Theme
Description: 윤하의 완전 커스텀 포트폴리오 테마
Author: Yoonha
Version: 1.0
License: GPL v2 or later
Text Domain: yoonha-theme
*/

/* =========================
   FONTS
   ========================= */

@font-face {
    font-family: 'Zalando Sans Expanded';
    src: url('./fonts/ZalandoSansExpanded-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

 
/* =========================
   GLOBAL STYLES
   ========================= */

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: 'Zalando Sans Expanded', 'Work Sans', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    font-size: 16px;
    color: #000;
    background: #fff;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

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

/* =========================
   SMOOTH SECTION TRANSITIONS
   ========================= */

section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 100vh;
}

section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* 첫 번째 섹션은 바로 보이도록 */
.section-1 {
    opacity: 1;
    transform: translateY(0);
}

/* 섹션 간 부드러운 전환을 위한 추가 스타일 */
section:not(.section-1) {
    will-change: opacity, transform;
}

/* 스크롤 시 부드러운 요소 이동 */
.text-item, .media-item, .recipe-content, .carousel-slide {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 전체적인 페이지 스무스 효과 */
body.loaded {
    transition: all 0.3s ease;
}

/* 스크롤 진행률에 따른 부드러운 효과 */
@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}

/* =========================
   NAVIGATION - 좌측 상단 햄버거 메뉴
   ========================= */

/* 햄버거 메뉴 버튼 - 좌측 상단 */
.mobile-menu-toggle {
    position: fixed;
    top: 30px;
    left: 30px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #000;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* 활성화 상태 애니메이션 */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
    background-color: #fff;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background-color: #fff;
}

/* 오버레이 네비게이션 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    text-align: center;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-list li {
    margin: 40px 0;
}

.menu-list a {
    color: white;
    text-decoration: none;
    font-size: 3rem;
    font-weight: 300;
    transition: color 0.3s ease;
    display: block;
}

.menu-list a:hover {
    color: #ccc;
}

/* =========================
   HOME PAGE - SECTION 1
   ========================= */

.section-1 {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    /* overflow 제거 - 이미지가 섹션2까지 확장되도록 */
}

.section1-top {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 5cm 20px;
    background: #ffffff00;
}

.main-title {
    font-family: 'Zalando Sans Expanded', sans-serif;
    font-size: 7rem;
    font-weight: 900;
    margin-bottom: 40px;
    line-height: 0.8;
    color: #ffffff !important;
    text-align: left;
}

.main-description {
    width: 100%;
    text-align: left;
}

.main-description p {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #ffffff;
    line-height: 1.8;
    text-align: left;
}

.main-description-2 {
    width: 100%;
    text-align: left;
    margin-top: 0px;
}

.main-description-2 p {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.6;
    text-align: left;
    font-style: italic;
}

.section1-bottom {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0; /* 패딩 제거로 꽉 채우기 */
    background: #fff;
    position: relative;
    z-index: 1;
}

.section1-image {
    width: 100vw;
    height: 200vh; /* 섹션1 + 섹션2까지만 커버 */
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    clip-path: inset(0 0 0 0); /* 섹션3 침범 방지 */
}

.section1-bottom .image-placeholder {
    width: 100vw;
    height: 200vh; /* 섹션1 + 섹션2까지 커버 */
    background: #f8f8f8;
    border: 2px dashed #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s ease;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.image-placeholder:hover {
    background: #f0f0f0;
    border-color: #999;
    color: #333;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.image-placeholder p {
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
    color: #666;
}

/* =========================
   HERO OVERLAY (Section 1)
   ========================= */
.section-1 { position: relative; height: 100vh; overflow: hidden; }
.section1-bottom { position: absolute; inset: 0; height: 100%; padding: 0; background: transparent; z-index: 0; }
.section1-image { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; top: 0; left: 0; opacity: 1; transition: opacity 500ms ease; pointer-events: none; }
.section2-image { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; top: 0; left: 0; opacity: 0; transition: opacity 500ms ease; pointer-events: none; }
.on-section2 .section2-image { opacity: 1; }
.on-section2 .section1-image { opacity: 0; }
.section1-top { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 80px 5cm 20px; background: transparent; z-index: 2; }
.overlay-fixed .section1-top { position: fixed; inset: 0; }
.section1-bottom .image-placeholder { height: 100%; position: absolute; inset: 0; z-index: 0; }
.section-2 { background: transparent; }

/* Section1 text fade-in on first landing */
.section1-top .main-title,
.section1-top .main-description,
.section1-top .main-description-2 {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 600ms ease, transform 600ms ease;
}
body.loaded .section-1 .main-title { opacity: 1; transform: none; transition-delay: 120ms; }
body.loaded .section-1 .main-description { opacity: 1; transform: none; transition-delay: 220ms; }
body.loaded .section-1 .main-description-2 { opacity: 1; transform: none; transition-delay: 320ms; }

/* =========================
   HOME PAGE - SECTION 2
   ========================= */

.section-2 {
    height: 100vh;
    background: transparent; /* 배경을 투명하게 하여 섹션1 이미지가 보이도록 */
    position: relative;
    /* overflow 제거 - 섹션1 이미지가 여기까지 보이도록 */
}


/* =========================
   HOME PAGE - SECTION 3
   ========================= */

.section-3 {
    height: 100vh;
    padding: 40px 3cm;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 5; /* 섹션1 이미지보다 높은 z-index로 침범 방지 */
}

.media-gallery {
    display: flex;
    gap: 10px;
    width: 100%;
    height: 70vh;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.media-item {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateX(100px);
    border: none;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    aspect-ratio: 2/3;
    width: 250px;
    flex-shrink: 0;
}

.media-item:first-child {
    margin-left: 0;
}

.media-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    z-index: 10;
}

.media-item .image-placeholder,
.media-item .media-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    border: none;
    border-radius: 6px;
    position: relative;
}

.media-item .placeholder-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.6;
}

.media-item p {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.8;
    text-align: center;
    color: #666;
}

.media-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.media-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.media-placeholder {
    width: 100%;
    height: 100%;
    background: #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* =========================
   RECIPE SECTIONS (4, 5, 6)
   ========================= */

.recipe-section {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0.5cm 0;
    background: #fff;
}

.recipe-section .container {
    padding: 0;
    max-width: none;
}

.recipe-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    height: calc(100vh - 1cm);
    padding: 0 3cm;
}

/* 섹션 4, 6: 이미지가 우측에 있어서 우측 여백 추가 */
.section-4 .recipe-content,
.section-6 .recipe-content {
    padding: 0 5cm 0 3cm;
}

/* 섹션 5: 이미지가 좌측에 있어서 좌측 여백 추가 */
.section-5 .recipe-content {
    padding: 0 3cm 0 5cm;
}

.recipe-section.reverse .recipe-content {
    grid-template-columns: 1fr 1fr;
}

.recipe-text {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
    position: absolute;
    right: calc(50% + 4.5cm);
    width: calc(50% - 1.5cm);
    max-width: 400px;
    padding-top: calc((100vh - 80vh) / 2);
}

.recipe-section.reverse .recipe-text {
    left: calc(50% + 4.5cm);
    right: auto;
    text-align: right;
}

/* 섹션 4, 6: 이미지를 우측에서 더 멀리 */
.section-4 .recipe-image,
.section-6 .recipe-image {
    height: 100%;
    display: flex;
    align-items: center;
    position: absolute;
    right: 5cm;
    width: calc(50% - 6.5cm);
    min-width: 300px;
}

/* 섹션 5: 이미지를 좌측에서 더 멀리 */
.section-5 .recipe-image {
    height: 100%;
    display: flex;
    align-items: center;
    position: absolute;
    left: 5cm;
    width: calc(50% - 6.5cm);
    min-width: 300px;
}

/* 반응형: 화면이 좁아질 때 */
@media (max-width: 1200px) {
    .recipe-text {
        width: calc(50% - 1.5cm);
        right: calc(50% + 4.5cm);
        left: auto;
    }
    
    .recipe-section.reverse .recipe-text {
        width: calc(50% - 1.5cm);
        left: calc(50% + 4.5cm);
        right: auto;
    }
    
    .recipe-text h2 {
        font-size: 2.5rem;
    }
    
    .recipe-text p {
        font-size: 1.1rem;
    }
    
    .recipe-image {
        width: calc(50% - 4.5cm);
        right: 3cm;
    }
    
    .recipe-section.reverse .recipe-image {
        left: 3cm;
        right: auto;
        width: calc(50% - 4.5cm);
    }
}

@media (max-width: 768px) {
    .recipe-text h2 {
        font-size: 2rem;
    }
    
    .recipe-text p {
        font-size: 1rem;
    }
}

.recipe-text h2 {
    font-family: 'Zalando Sans Expanded', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.4;
    color: #000;
    text-align: left;
}

.recipe-text p {
    font-size: 1rem;
    line-height: 1.6;
    color: #000;
    text-align: left;
}


.recipe-image img {
    width: 100%;
    height: calc(100vh - 1cm);
    border-radius: 0;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.recipe-image .image-placeholder {
    background: #f8f8f8;
    border: 2px dashed #ddd;
    border-radius: 8px;
    height: 75vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.recipe-image .image-placeholder:hover {
    background: #f0f0f0;
    border-color: #999;
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}

.recipe-image .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.6;
}

.recipe-image .image-placeholder p {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
    color: #666;
}

/* =========================
   HOME PAGE - SECTION 7 (CAROUSEL)
   ========================= */

.section-7 {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 3cm;
    background: #fff;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 70vh;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 100%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.carousel-slide {
    display: none;
    position: relative;
    height: 100%;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide .image-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    border: none;
    border-radius: 0;
}

.carousel-slide .placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.carousel-slide .image-placeholder p {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.8;
    color: #666;
}

.carousel-indicator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.carousel-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 30px 20px 20px;
    text-align: left;
}

.carousel-text h3 {
    font-size: 1.8rem;
    font-weight: 300;
    text-align: left;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.carousel-prev,
.carousel-next {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: white;
}

/* =========================
   STORY & STORE PAGES
   ========================= */

.story-page,
.store-page {
    padding-top: 0;
    background: #fff;
}

.story-section-1,
.story-section-2,
.story-section-3,
.store-section-1,
.store-section-2,
.store-section-3 {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 3cm;
    background: #fff;
}

.story-content,
.store-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    width: 100%;
    height: 80vh;
}

.story-content > div,
.store-content > div {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.story-content h1,
.story-content h2,
.store-content h1,
.store-content h2 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 30px;
    line-height: 1.2;
    color: #000;
    text-align: left;
}

.story-content p,
.store-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #000;
    text-align: left;
}

.story-image,
.store-image {
    height: 100%;
    display: flex;
    align-items: center;
}

.story-image img,
.store-image img {
    width: 100%;
    height: 80vh;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.story-image .image-placeholder,
.store-image .image-placeholder {
    height: 80vh;
    width: 100%;
    background: #f8f8f8;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
    background: #000;
    color: white;
    padding: 60px 0 40px;
}

.footer-content {
    text-align: center;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #ccc;
}

.footer-text {
    margin-bottom: 40px;
}

.footer-text p {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: #666;
}

/* =========================
   MODAL
   ========================= */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #ccc;
}

.modal-media img,
.modal-media video {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* =========================
   RESPONSIVE DESIGN
   ========================= */

@media (max-width: 768px) {
    .container {
        padding: 0 1cm;
    }
    
    .section1-top,
    .section1-bottom,
    .section2-text-container,
    .section-3,
    .recipe-section,
    .section-7,
    .story-section-1,
    .story-section-2,
    .story-section-3,
    .store-section-1,
    .store-section-2,
    .store-section-3 {
        padding-left: 1cm;
        padding-right: 1cm;
    }
    
    .main-title {
        font-size: 5rem;
    }
    
    .section1-top {
        height: 60vh;
    }
    
    .section1-bottom {
        height: 40vh;
    }
    
    /* Section1 hero overlay mobile adjustments */
    .section1-top { padding: 40px 1cm 20px; }
    
    .recipe-content,
    .story-content,
    .store-content {
        grid-template-columns: 1fr;
        gap: 40px;
        height: 100vh;
        padding: 20px 0;
    }
    
    .recipe-image img,
    .story-image img,
    .store-image img {
        height: 40vh;
    }
    
    .recipe-image .image-placeholder,
    .story-image .image-placeholder,
    .store-image .image-placeholder {
        height: 40vh;
    }
    
    .text-item {
        text-align: left;
    }
    
    .media-gallery {
        flex-direction: column;
        gap: 20px;
        height: 90vh;
    }
    
    .media-item {
        margin-left: 0;
        height: auto;
        min-height: 120px;
    }
    
    .carousel-container {
        height: 70vh;
    }
    
    .footer-nav ul {
        flex-direction: column;
        gap: 20px;
    }
    
    .menu-list a {
        font-size: 2rem;
    }
}
