/* Home 누른 경우: 인트로 DOM이 렌더되기 전에 안 보이게 */
html.intro-skip .intro {
    display: none !important;
}

/* 스크롤 잠금도 풀린 상태로 시작 */
html.intro-skip body {
    overflow: auto !important;
}


/* intro */
.intro {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    pointer-events: none;
    background: var(--primary-300);
}

.intro-bg {
    width: 100%;
    height: 100%;
    opacity: 0;
    position: absolute;
}

.intro-bg img {
    object-position: bottom;
}

.intro-filter {
    inset: 0;
    position: absolute;
    top: 0;
    mix-blend-mode: multiply;
}

.intro-overlay {
    inset: 0;
    position: absolute;
    top: 0;
    background: #00000005;
    backdrop-filter: blur(30px);
}

.intro-title {
    font-size: var(--t1);
     font-weight: var(--medium);
    opacity: 0;
    position: relative;
    z-index: 2;
}

.intro-logo {
    width: 100px;
    position: absolute;
}

html:not(.intro-skip) .h_logo,
html:not(.intro-skip) .h_nav {
    transform: translateX(-100%);
    opacity: 0;
}

html:not(.intro-skip) .quick_menu,
html:not(.intro-skip) .h_ham {
    transform: translateX(100%);
    opacity: 0;
}

.wrap.active .h_logo,
.wrap.active .h_nav,
.wrap.active .h_ham,
.wrap.active .quick_menu {
    transform: translateX(0);
    transition: transform .6s ease, opacity .5s ease;
    opacity: 1;
}
.wrap.active .h_ham {
    transition: transform .6s ease, opacity .5s ease, rotate .5s ease;
}
html:not(.intro-skip) .scroll_down {
    opacity: 0;
}
.wrap.active .scroll_down {
    opacity: 1;
}



/* hero*/
.hero {
    background: var(--primary-300);
}
section.hero {
    margin-top: 0;
}
.hero-bg_wrap {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.hero-bg {
    width: 100%;
    height: auto;
    position: absolute;
    bottom: 0;
}

.wrap.active .hero-bg {
    animation: bg 80s infinite linear;
}

.hero-bg img {
    /* transform: translateY(-100%); */
    transform: translateY(0);
}

@keyframes bg {
    to {
        transform: translateY(50%);
    }
}

.hero-bg_wrap .filter_img {
    inset: 0;
    position: absolute;
    mix-blend-mode: multiply;
}

.hero .inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-sub_title {
    font-size: var(--d1);
}



/* philosophy */
.philosophy {
    background: #6E4E3A;
    /* height: 100vh; */
    padding: var(--sec-gap) 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.philosophy .sec-header {
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.philosophy .sh_r {
    display: flex;
    align-items: start;
    justify-content: space-between;
    flex-direction: column;
    gap: 40px;
    flex-wrap: wrap;
}

.philosophy .sec-title {
    color: white;
}

.philosophy .sec-sub_title {
    color: var(--gray-200);
}

.philosophy .sec-content {
    position: relative;
}

.philosophy-visual {
    height: 400px;
    overflow: hidden;
    object-position: top;
    clip-path: inset(0% 0% 100% 0%)
}

/* programs */
.programs {
    background: #997153;
}
.program {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--con-gap);
    
}


.p_bg {
    inset: 0;
    position: absolute;
    top: 0;
    background: #A08772;
    transition: background .8s ease;
}
.p_bg.bg_0{
    background: #A08772;
}
.p_bg.bg_1 {
    background: #BCA187;
}

.p_bg.bg_2 {
    background: #AA9687;
}

.p_bg.bg_3 {
    background: #C8B3A0;
}

.p_bg.bg_4 {
    background: #BE9570;
}
.p_head-item {
    width: 150px;
    opacity: 0.35;
    transition: opacity .5s ease;
}
.p_head-item.on,
.p_head-item:hover {
    opacity: 1;
}

.program_head {
    display: flex;
    align-items: start;
    justify-content: center;
    gap: var(--con-gap);

}
.p_visual_wrap {
    position: relative;
    margin-bottom: 20px;
}
.program_swiper,
.program_text .p_visual,
.program_text .btn-link {
    display: none;
}
.p_visual {
    width: 100%;
    aspect-ratio: 4 / 5;
    gap: 40px;
    transition: filter .4s ease;
}
.p_visual_wrap:hover .p_visual,
.p_head-item.on .p_visual {
    filter: drop-shadow(0 20px 20px #00000020);
}

.p_visual_wrap .btn-link {
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity .5s ease;
    background: transparent;
}
.p_head-item:hover .p_visual_wrap .btn-link  {
    opacity: 1;
}

.p_title {
    font-size: var(--t2);
    color: white;
    text-align: center;
}
.program_text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.p_text:first-child {
    position: relative;
}

.p_text {
    width: 100%;
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: .5s ease;
}
.p_text.on {
    opacity: 1;
    pointer-events: auto;
}
.p_text * {
    color: white;
}

.p_slogan {
    font-weight: var(--light);
    font-size: var(--d1);
    text-align: center;
    margin-bottom: 40px;
}

.p_desc {
    font-size: var(--d2);
    width: 100%;
    text-align: center;
    font-weight: var(--light);
    opacity: 0.8;
}

main {
    position: relative;
    height: 450vh;
}
.sec_wrap {
    width: 100%;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: hidden;
}
section {
    height: 100vh;
    position: absolute;
    top: 0;
    margin-top: -100vh;
    /* clip-path: inset(0% 0% 100% 0%); */
    overflow: hidden;
}
section .inner,
section .hero-bg_wrap {
    transition: opacity .6s ease;
    opacity: 1;
}

section.hide .inner,
section.hide .hero-bg_wrap {
    opacity: 0;
}

.pin_wrap {
    width: 100%;
    position: absolute;
    top: 0;
    opacity: 0;
    pointer-events: none;
}
.pin {
    height: 100vh;
}
/* doctors */
.doctors {
    padding: var(--sec-gap) 0;
    /* height: 100vh; */
    background: var(--primary-200);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

.doctors .inner {
    width: 100%;
}

.doctors .sec-header {
    margin-bottom: calc(var(--con-gap) / 2);
}

.doctors .sec-title {
    margin-bottom: 40px;
}

.doctors .sec-content {
    display: flex;
    width: 100%;
}

.doctors .sec-content>div {
    width: 50%;
}

.doctors .con_l {
    background: var(--primary-200);
    position: relative;
    z-index: 2;
}

.doctor-info {
    margin-top: 50px;
    border-top: 1px solid var(--primary-400);
    position: relative;
}

.dinfo-item {
    width: 100%;
    opacity: 0;
    /* transform: translateX(14px); */
    pointer-events: none;
    transition: opacity .6s ease, transform .6s ease;
    position: absolute;
    top: 0;
    padding-left: 160px;
    padding-right: 30px;
    padding-top: 14px;
}


.dinfo-item:first-child {
    position: relative;
}

.dinfo-item.active {
    opacity: 1;
    /* transform: translateX(0); */
    pointer-events: auto;
}

.dinfo_t {
    font-size: var(--d2);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
}

.dinfo_t .doctor-img {
    display: none;
}

.dinfo_t .position {
    text-align: right;
}

.dinfo_b {
    margin-top: var(--con-gap);
    padding-left: 50%;
}

.dinfo_b li {
    font-size: var(--d2);
    color: var(--ft-sub);
}

.doctor_swiper {
    overflow: visible;
    width: 450px;
    margin: 0;
}

.doctor-img {
    width: 100%;
    aspect-ratio: 1 / 1.2;
    filter: grayscale(0) blur(0);
    transition: filter .5s ease, opacity .4s ease;
    opacity: 1;
}

.doctor-img.swiper-slide-next {
    /* filter: grayscale(1) blur(20px); */
    opacity: 0.5;
}

.doctor_swiper-btn_wrap {
    width: 100%;
    justify-content: end;
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    top: 0;
    transform: translateY(-100%);
}

.doctors .btn-link {
    display: none;
}

/* contact */
.contact {
    padding: var(--sec-gap) 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.contact * {
    color: white;
}

.contact .sec-header {
    display: flex;
    position: relative;
    padding-bottom: calc(var(--con-gap) / 2);
    margin-bottom: calc(var(--con-gap) / 2);
    gap: 40px;
    flex-wrap: wrap;
}

.contact .sec-title {
    flex-grow: 1;
}

.contact .sec-sub_title {
    color: var(--primary-100);
}

.contact .sec-header::after {
    content: '';
    display: block;
    width: calc(100% + 160px);
    height: 1px;
    background: var(--primary-300);
    position: absolute;
    bottom: 0;
}

.contact .sec-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.contact-visual {
    width: 100%;
    height: auto;
    /* aspect-ratio: 1.684 / 1;     */
}

.contact-info {
    padding-left: var(--con-gap);
}

.contact-title {
    font-size: var(--t3);
    font-weight: var(--medium);
    margin-bottom: 40px;
}

.contact-item {
    font-size: var(--d2);
    font-weight: var(--light);
    color: var(--primary-200);
}

.contact-item li {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    gap: 16px;
}
.contact-item b {
    font-weight: var(--medium);
    margin-right: 10px;
    display: inline-block;
    width: 90px;
    font-weight: var(--semi-bold);
    text-transform: uppercase;
}
.contact-item .closed {
    margin-top: 20px;
}
/* .contact-item .time .line {
    width: 100px;
    height: 1px;
    background: var(--primary-300);
} */

.contact .lunch {
    margin-bottom: 6px;
}

.contact .bold {
    width: 56px;
    margin-right: 4px;
    display: inline-block;
    font-weight: var(--medium);
}

.contact .btn_wrap {
    margin-top: var(--con-gap);
    display: flex;
    align-items: center;
    gap: 40px;
}

/* side-nav */
.side-nav {
    position: fixed;
    left: 20px;
    bottom: 60px;
    z-index: 1000;
    display: flex;
    gap: 20px;
    color: var(--primary-400);
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s ease;
}

.side-nav.show {
    opacity: 1;
    pointer-events: visible;
}

.side-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.side-nav li {
    cursor: pointer;
    transition: color .3s ease;
    padding: 4px 0;
}

.side-nav li.active {
    color: var(--primary-600);
    font-weight: 500;
}

/* 세로 라인 */
.side-line {
    width: 1px;
    background: var(--primary-300);
    position: relative;
}

.side-line-active {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 25%;
    background: var(--primary-600);
}



/* layer */
.layer_wrap {
    width: 100%;
    height: calc(30px * 4);
    position: sticky;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

.layer {
    width: 100%;
    height: 100vh;
    position: absolute;
    bottom: 0;
    opacity: 0;
}

.layer:nth-child(1) {
    background: #997153;
    --i: 1;
    z-index: 4;
}

.layer:nth-child(2) {
    background: #6E4E3A;
    --i: 2;
    z-index: 3;
}

.layer:nth-child(3) {
    background: #E9E1D5;
    --i: 3;
    z-index: 2;
}

.layer:nth-child(4) {
    background: #8A7D70;
    --i: 4;
    z-index: 1;
}

/* .layer.active {
    height: calc(30px * var(--i));
    opacity: 1;
  } */


/* ----------------popup------------------- */
.popup_wrap {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    display: flex;
    transition: opacity .5s ease;
    pointer-events: none;
}

.popup_wrap.show {
    opacity: 1;
    pointer-events: visible;
}

.popup_bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay);
    backdrop-filter: blur(4px);
}

.popup_box {
    width: 100%;
    max-width: 1500px;
    position: relative;
    padding: 20px;
}

.popup_con {
    width: fit-content;
    max-width: 1240px;
    margin: 0 auto;
    text-align: center;
}

.popup_img {
    width: 100%;
    aspect-ratio: 4 / 5;
    /* height: 500px; */
    display: block;
    border-radius: 1px;
}

.popup_bot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
}

.popup_bot .checkbox {
    cursor: pointer;
}

.popup_bot label p {
    font-size: var(--d2);
}

.popup_bot .popup_close {
    padding: 5px 12px;
    cursor: pointer;
    font-size: var(--d2);
}
.popup_bot .popup_close .btn-text {
    color: var(--ft-main);
}
.checkbox span {
    border-color: var(--gray-500);
}

.popup_swiper .popup_slide:last-child {
    margin-right: 0 !important;
}
.popup_swiper-pagination {
    bottom: 0 !important;
    transform: translateY(calc(100% + 10px));
}

.popup_swiper-pagination .swiper-pagination-bullet {
    background: #f9f8f477;
}

.popup_swiper-pagination .swiper-pagination-bullet-active {
    background: #f9f8f4e1;
}


.popup_img {
    width: 100%;
    aspect-ratio: 4 / 5;
    display: block;
    overflow: hidden;
}

.popup_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.popup_slide {
    max-width: 400px;
}

.popup_swiper .swiper-wrapper.center {
    justify-content: center;
}

.popup_swiper .swiper-wrapper {
    display: flex;
}

@media all and (max-width: 1300px) {
    /* doctor */
    .doctor_swiper {
        width: 30.77vw;
        min-width: 340px;
    }
    /* program */
    .p_head {
        top: 40%;
    }
}

@media all and (max-width: 1240px) {
    .popup_con {
        max-width: 840px;
    }
    .program_head {
        gap: 40px;
    }
}

@media all and (max-width: 1000px) {   
    .indicator {
        display: none;
    }
 
}

@media all and (max-width: 960px) {
    section {
        margin-top: 0;
    }

    .pin_wrap {
        display: none;
    }
    /* philosophy */
    .philosophy .sec-header {
        grid-template-columns: 1fr;
        gap: var(--con-gap);
    }

    

    /* doctor */
    .doctors .sec-header {
        margin-bottom: var(--con-gap);
    }
 
    .doctors .sec-content {
        flex-direction: column;
    }

    .doctors .sec-content>div {
        width: 100%;
        z-index: 1;
    }

    .doctors .sec-content {
        flex-direction: column;
        gap: 24px;
    }

    .doctors .sec-content>div {
        width: 100%;
    }


    .doctor_swiper {
        width: 100%;
        padding: 0 40px;
    }
    .doctor_swiper-btn_wrap {
        z-index: 2;
        width: fit-content;
        right: 40px;
    }
    .doctor-img {
        aspect-ratio: 1 / 1.15;
    }


    .doctor-info {
        margin-top: 0;
    }

    .dinfo-item {
        padding: 30px 40px;
    }

    .dinfo-item.active {
        opacity: 1;
        height: auto;
        overflow: visible;
        pointer-events: auto;
    }


    .dinfo_t {
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
        font-size: var(--d2);
    }

    .dinfo_t .position {
        grid-column: 1 / -1;
        text-align: left;
        opacity: .8;
    }

    .dinfo_b {
        display: none;
        padding-left: 0;
    }
  

    /* program */    
    .program_wrap {
        height: calc(100 * var(--vh));
    }
    
    .p_inner {
        gap: var(--con-gap);
        justify-content: start;
        padding-top: var(--sec-gap);
    }
   
    .p_head {
        position: static;
        transform: translate(0, 0);

    }
    .p_text {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 100px;
        grid-template-columns: 1fr;
    }
    .p_slogan {
        margin-bottom: 20px;
    }
    .p_desc{
        text-align: center;
    } 
    .p_l {
        justify-content: center;
    }
    .p_r {
        align-items: center;
        grid-column: unset;
        flex-direction: column-reverse;
    }

    .program {
        height: auto;
        padding: var(--sec-gap) 0;
    }
    .program_head ,
    .program_text:not(.swiper-wrapper) {
        display: none;
    }
    
    .program_swiper {
        width: 100%;
        display: block;
    }
    .program_swiper .swiper-pagination {
        position: static;
        margin-top: 40px;
    }
    .program_text {
        flex-direction: row;
        justify-content: unset;
    }
    .program_text .p_visual {
        display: block;
    }    
    .program_text .btn-link {
        display: flex;
    }
    .p_visual {
        max-width: 200px;
        opacity: 1;
        margin: 0 auto var(--con-gap);
        margin-bottom: 40px;
    }
  
    .p_title {
        margin-bottom: var(--con-gap);
        font-size: var(--t1);
    }
    .p_text {
        position: static;
        opacity: 1;
        pointer-events: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 0;
    }
    .p_desc {
        margin-bottom: var(--con-gap);
    }
    .product_swiper-prev,
    .product_swiper-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    .product_swiper-prev {
        left: 10px;        
    }
    .product_swiper-next {
        right: 10px;        
    }

    /* contact */
    .contact .sec-content {
        grid-template-columns: 1fr;
        gap: var(--con-gap);
    }
    .contact-info {
        padding-left: 0;
    }


    /* main animation */
    main {
        height: auto;
    }
    .sec_wrap {
        position: static;
        height: auto;
    }
    section {
        clip-path: unset;
        position: relative;
        height: auto;
    }
}

@media (max-width: 840px) {
    /* intro */
    .intro-logo {
        width: 80px;
    }

    /* popup */
    .popup_box {
        width: calc(100% - 40px);
        padding: 14px;
    }

    .popup_con {
        width: 100%;
        max-width: 400px;
    }

    .popup_slide {
        max-width: unset;
    }

   
}

@media (max-width: 600px) {
    .dinfo-item {
        padding-left: 20px;
    }
    .doctor_swiper {
        padding: 0 20px;
    }
    .doctor_swiper-btn_wrap {
        right: 20px;
    }
    /* intro */
    html:not(.intro-skip) .quick_menu {
        transform: translateX(0) translateY(100%);
        opacity: 0;
    }
    .wrap.active .quick_menu {
        transform: translateY(0);
    }
    

    /* program */
    .p_text {
        padding-left: 20px;
        padding-right: 20px;
    }
    .p_visual {
        min-width: 100px;
    }
}