:root {
    --gold: #c5a059;
    --dark: #080808;
    --card-gray: #121212;
    --font-main: 'Pretendard', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--dark);
    color: #fff;
    font-family: var(--font-main);
    overflow-x: hidden;
}

header {
    padding: 100px 20px;
    text-align: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #080808 100%);
}

header h1 {
    font-size: 3.5rem;
    color: var(--gold);
    letter-spacing: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

header p {
    color: #555;
    margin-top: 15px;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* 지역별 실루엣 섹션 */
.region-section {
    margin-bottom: 150px;
    position: relative;
    scroll-margin-top: 120px;
}

.region-visual-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.region-silhouette-img {
    width: 320px;
    height: 320px;
    margin: 0 auto 20px;
    display: block;
    object-fit: contain;   
    filter: sepia(1) saturate(3) hue-rotate(330deg) brightness(1.1) contrast(1.3) drop-shadow(0 0 30px rgba(197, 160, 89, 0.6));
    transform: scale(1.05);
}

.region-silhouette-img:hover {
    filter: sepia(1) saturate(3) hue-rotate(330deg) brightness(1.1) contrast(1.3) drop-shadow(0 0 30px rgba(197, 160, 89, 0.6));
    transform: scale(1.05);
}

.region-name-large {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin-top: -30px;
    position: relative;
    z-index: 1;
}

/* 셰프 카드 그리드 */
.chef-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.card {
    background: var(--card-gray);
    border: 1px solid #1a1a1a;
    transition: all 0.4s ease;
    display: flex;
    min-height: 400px;
    overflow: hidden;
    border-radius: 4px;
}

.card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.card.white-spoon {
    background: #fff;
    color: #000;
}

.card-left,
.card-right {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

.image-container {
    width: 200px;
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .image-container img {
    transform: scale(1.1);
}

.info-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.card-left {
    border-right: 1px solid rgba(197, 160, 89, 0.1);
}

.card-right {
    background: rgba(255, 255, 255, 0.02);
}

.white-spoon .card-right {
    background: rgba(0, 0, 0, 0.02);
}

.spoon-type {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 20px;
    display: block;
}

.black-spoon .spoon-type {
    color: var(--gold);
}

.white-spoon .spoon-type {
    color: #666;
}

.chef-name {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.dish-label {
    font-size: 0.7rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 800;
}

.white-spoon .dish-label {
    color: #666;
}

.dish-name {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.chef-intro {
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.6;
}

.location-meta {
    margin-top: auto;
    padding-top: 25px;
}

.res-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 8px;
    display: block;
}

.white-spoon .res-name {
    color: #000;
    text-decoration: underline;
}

.res-addr {
    font-size: 0.8rem;
    opacity: 0.5;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 1024px) {
    .card {
        flex-direction: column;
    }

    .card-left,
    .card-right {
        flex-direction: row;
    }

    .card-left {
        border-right: none;
        border-bottom: 1px solid rgba(197, 160, 89, 0.1);
    }
}

@media (max-width: 768px) {

    .card-left,
    .card-right {
        flex-direction: column;
    }

    .image-container {
        width: 100%;
        height: 250px;
    }

    .info-content {
        padding: 30px;
    }

    .region-silhouette-img {
        width: 240px;
        height: 240px;
    }
}




/* 1. 글자가 모여있다가 벌어지는 애니메이션 */
@keyframes expand-and-glow {
    from {
        /* 처음엔 글자가 바짝 모여있음 */
        letter-spacing: -2px; 
        transform: scale(0.95);
        color: inherit;
        filter: brightness(1) contrast(1) drop-shadow(0 0 0px transparent);
        text-shadow: none;
    }
    to {
        /* 눈에 들어오면 슥 벌어지며 강조됨 */
        letter-spacing: 8px; 
        transform: scale(1.05);
        color: var(--gold) !important;
        text-shadow: 0 0 14px rgba(197, 160, 89, 0.5);
        /* 요청하신 필터 효과 적용 */
        filter: brightness(1.1) contrast(1.3) drop-shadow(0 0 30px rgba(197, 160, 89, 0.6));
    }

    


}/* 1. 사진과 동일한 필터 수치를 적용한 애니메이션 */
@keyframes expand-and-glow-fixed {
    from {
        letter-spacing: -3px; /* 중앙으로 응축된 상태 */
        opacity: 0.5;
        transform: scale(0.95);
        filter: sepia(0) saturate(1) brightness(1);
    }
    to {
        letter-spacing: 10px; /* 중앙에서 양옆으로 슥 벌어짐 */
        opacity: 1;
        transform: scale(1.05); /* 사진과 동일한 확대 비율 */
        
        /* [핵심] 사진의 효과와 짝을 맞춘 필터 설정 */
        color: #ffc107 !important; /* 기본 골드색 */
        filter: sepia(1) saturate(3) hue-rotate(330deg) brightness(1.1) contrast(1.3) 
                drop-shadow(0 0 30px rgba(197, 160, 89, 0.6));
        text-shadow: 0 0 14px rgba(197, 160, 89, 0.5);
    }
}

.region-name-large {
    /* 중앙 정렬 유지 */
    color: var(--gold) !important;

    display: block;
    text-align: center;
    width: 100%;
    margin: 0 auto;
    white-space: nowrap;

    /* 스크롤 타임라인 설정 */
    view-timeline-name: --text-reveal;
    view-timeline-axis: block;

    /* 애니메이션 연결 */
    animation: expand-and-glow-fixed linear both;
    animation-timeline: --text-reveal;

    /* 스크롤 범위: 화면 하단 10%에서 시작해 50% 지점에서 완성 */
    animation-range: entry 10% cover 50%;
}/* 1. 사진용: 형광 느낌을 뺀 묵직한 골드 애니메이션 */
@keyframes img-gold-premium {
    from {
        opacity: 0.5;
        transform: scale(1);
        filter: sepia(0.3) brightness(0.8) contrast(1.2) drop-shadow(0 0 0px transparent);
    }
    to {
        opacity: 1;
        transform: scale(1.05);
        /* 샛노란 saturate(3)을 낮추고, contrast를 높여 깊이감을 줌 */
        filter: sepia(0.8) saturate(1.5) hue-rotate(340deg) brightness(1.1) contrast(1.4) 
                drop-shadow(0 0 25px rgba(197, 160, 89, 0.5)); /* 후광도 차분한 금색으로 */
    }

/* 2. 사진 스타일 수정 (hover 삭제 및 animation 추가) */
.region-silhouette-img {
    width: 320px;
    height: 320px;
    margin: 0 auto 20px;
    display: block;
    object-fit: contain;
    transition: all 0.5s ease; /* 부드러운 전환을 위해 유지 */

    /* 스크롤 감지 설정 */
    view-timeline-name: --img-reveal;
    view-timeline-axis: block;

    /* 애니메이션 연결 */
    animation: img-glow-scroll linear both;
    animation-timeline: --img-reveal;

    /* [마무리 시점] 글자와 동일하게 화면 하단 30% 지점에서 이미 빛나도록 설정 */
    animation-range: entry 0% cover 30%;
}

/* 강남구 섹션(최상단) 전용: 진짜 천천히 벌어지도록 */
#gn-section .region-name-large {
    /* [수정] exit 20%에서 시작해서 80%까지 아주 길게 펼칩니다. */
    /* 시작점을 더 늦추고(20%), 끝나는 점을 더 뒤로(80%) 보냈습니다. */
    animation-range: exit 20% exit 80%;
}

/* 사진도 텍스트와 보폭을 완벽하게 맞춥니다 */
#gn-section .region-silhouette-img {
    animation-range: exit 200% exit 220%;
}

/* 1. 글자 애니메이션: 크기 확대(scale)를 제거하여 커지지 않게 함 */
@keyframes expand-and-glow-fixed {
    from {
        letter-spacing: -3px;
        opacity: 0.5;
        transform: scale(1); /* 시작 크기 1 */
        filter: sepia(0) saturate(1) brightness(1);
    }
    to {
        letter-spacing: 8px; /* 벌어지는 정도 유지 */
        opacity: 1;
        transform: scale(1); /* 끝 크기도 1 (더 커지지 않음) */
        
        color: #ffc107 !important;
        filter: sepia(1) saturate(3) hue-rotate(330deg) brightness(1.1) contrast(1.3) 
                drop-shadow(0 0 30px rgba(197, 160, 89, 0.6));
        text-shadow: 0 0 14px rgba(197, 160, 89, 0.5);
    }
}

/* 2. 강남구(최상단) 전용 설정: 글자와 사진이 동시에 천천히 작동 */
#gn-section .region-name-large {
    animation-range: exit 20% exit 80% !important;
}

#gn-section .region-silhouette-img {
    /* 기존 200% 오타 수정: 글자와 보폭을 맞춰 20%~80% 사이에서 서서히 빛남 */
    animation-range: exit 20% exit 80% !important;
}

/* 3. 일반 섹션 글자 설정 보완 */
.region-name-large {
    font-size: 2.5rem; /* 현재 크기 유지 */
    transform: scale(1); /* 기본 상태에서 커지지 않게 고정 */
    animation: expand-and-glow-fixed linear both;
}

/* 1. 이탈 시에만 줄어드는 애니메이션 */
@keyframes shrink-only-on-exit {
    /* 0%에서 70%까지는 변화 없이 '최대 상태' 유지 */
    0%, 70% {
        letter-spacing: 8px;
        transform: scale(1);
        opacity: 1;
        color: #ffc107;
        filter: sepia(0.8) saturate(1.8) brightness(1.1) drop-shadow(0 0 25px rgba(197, 160, 89, 0.7));
    }
    /* 70% 이후부터 화면 밖으로 완전히 사라지는 100%까지 줄어듦 */
    100% {
        letter-spacing: 2px;
        transform: scale(0.9);
        opacity: 0;
        filter: brightness(0.5) blur(10px);
    }
}

/* 2. 사진과 글자에 동일한 '고정 후 이탈' 로직 적용 */
.region-name-large, 
.region-silhouette-img {
    view-timeline-name: --section-exit;
    view-timeline-axis: block;

    animation: shrink-only-on-exit linear both;
    animation-timeline: --section-exit;

    /* [핵심] 화면에 완전히 들어온 순간(contain 0%)부터 
       화면 위로 완전히 나가는 순간(exit 100%)까지를 전체 범위로 잡습니다. */
    animation-range: contain 0% exit 100% !important;
}

/* 3. 강남구(최상단) 보정 */
#gn-section .region-name-large,
#gn-section .region-silhouette-img {
    /* 강남구는 이미 화면에 있으므로, 상단으로 빠져나가기 시작할 때만 반응하도록 더 좁게 설정 */
    animation-range: exit 0% exit 100% !important;
}


/* 1. 부모 섹션(지역구 전체)을 스크롤 기준으로 설정 */
.region-section {
    view-timeline-name: --section-main;
    view-timeline-axis: block;
    margin-bottom: 30vh; /* 섹션 사이 간격을 충분히 줌 */
    scroll-margin-top: 100px; /* 링크 클릭 시 멈출 위치 */
}

/* 2. 중앙에서 동시에 터지는 애니메이션 */
@keyframes sync-reveal {
    0% { /* 섹션이 아래에서 올라올 때 */
        opacity: 0;
        transform: scale(0.9);
        letter-spacing: -2px;
        filter: brightness(0.5) blur(10px);
    }
    45%, 55% { /* 섹션이 화면 정중앙에 왔을 때 (정점) */
        opacity: 1;
        transform: scale(1);
        letter-spacing: 8px;
        filter: brightness(1.1) contrast(1.3) drop-shadow(0 0 30px rgba(197, 160, 89, 0.6));
    }
    100% { /* 섹션이 위로 빠져나갈 때 */
        opacity: 0;
        transform: scale(0.9);
        letter-spacing: 2px;
        filter: brightness(0.5) blur(10px);
    }
}

/* 3. 사진과 글자가 부모의 스크롤 타임라인에 맞춰 동시에 춤추게 함 */
.region-silhouette-img,
.region-name-large {
    animation: sync-reveal linear both;
    animation-timeline: --section-main; /* 부모 섹션의 타임라인을 공유 */
    
    /* [핵심] 섹션 전체가 화면 아래(entry 0%)부터 위(exit 100%)까지 갈 때를 기준으로 계산 */
    animation-range: entry 0% exit 100% !important;
}

/* 강남구(최상단)는 이미 중앙에 있으므로 바로 정점이 보이게 예외처리 */
#gn-section .region-silhouette-img,
#gn-section .region-name-large {
    animation-range: cover 0% exit 100% !important;
}


/* 1. 중앙에서만 정점을 찍는 애니메이션 */
@keyframes absolute-center-reveal {
    0% { 
        opacity: 0; 
        transform: scale(0.9); 
        letter-spacing: -2px; 
        filter: blur(10px) brightness(0.5);
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
        letter-spacing: 8px; 
        filter: brightness(1.1) contrast(1.3) drop-shadow(0 0 30px rgba(197, 160, 89, 0.6));
    }
}

/* 2. 사진과 글자 통합 적용 */
.region-silhouette-img,
.region-name-large {
    view-timeline-name: --center-gate;
    view-timeline-axis: block;

    /* [비결] 화면 상단 30%, 하단 30%를 제외한 '중앙 40%'에서만 애니메이션이 일어나게 함 */
    view-timeline-inset: 30%; 

    animation: absolute-center-reveal linear both;
    animation-timeline: --center-gate;
    
    /* 화면 아래에서 중앙으로 올 때(entry) 시작해서, 중앙에서 위로 나갈 때(exit) 종료 */
    animation-range: entry 0% exit 100% !important;
}

/* 3. 섹션 사이 간격 확보 (겹침 방지 필수!) */
.region-section {
    padding: 10vh 0; /* 위아래 여백을 줘서 중앙 집중도를 높임 */
    margin-bottom: 20vh;
    scroll-margin-top: 150px; /* 링크 클릭 시 중앙 근처에 멈추게 함 */
}

/* 강남구(최상단) 전용: 처음부터 보여야 하므로 */
#gn-section .region-silhouette-img,
#gn-section .region-name-large {
    animation: none !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    letter-spacing: 8px !important;
    filter: brightness(1.1) contrast(1.3) drop-shadow(0 0 30px rgba(197, 160, 89, 0.6)) !important;
}