/* 달빛 카페 메뉴판 스타일 */

/* 색상과 글꼴 변수 */
:root {
    --cream: #FBF4E4;
    --cream-deep: #F3E6C9;
    --card: #FFFBF0;
    --brown: #4A3426;
    --brown-soft: #7A6250;
    --moon: #F2C94C;
    --moon-soft: #FBE9A8;
    --hot: #C4563A;
    --ice: #3F7FA6;
    --line: #E3D2AE;
    --font-title: 'Gowun Batang', 'Noto Serif KR', serif;
    --font-body: 'Noto Sans KR', sans-serif;
}

/* 전체 기본 설정 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--cream);
    color: var(--brown);
    font-family: var(--font-body);
    line-height: 1.6;
}

h1, h2, h3, h4, p, ul, dl, dd {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

/* 상단 이동 메뉴 */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding: 12px 16px;
    background-color: rgba(251, 244, 228, 0.94);
    border-bottom: 1px solid var(--line);
}

.top-nav a {
    color: var(--brown-soft);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.top-nav a:hover {
    color: var(--brown);
    text-decoration: underline;
    text-decoration-color: var(--moon);
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

/* 상단 소개 영역 */
.hero {
    padding: 64px 16px 56px;
    text-align: center;
    background: linear-gradient(180deg, var(--moon-soft) 0%, var(--cream) 100%);
}

.hero-moon {
    color: var(--moon);
    font-size: 56px;
    line-height: 1;
    text-shadow: 0 0 24px rgba(242, 201, 76, 0.8);
}

.hero-title {
    margin-top: 12px;
    font-family: var(--font-title);
    font-size: clamp(44px, 10vw, 76px);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-sub {
    margin-top: 12px;
    color: var(--brown-soft);
    font-size: clamp(16px, 3vw, 19px);
}

/* 본문 구역 공통 */
main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.section {
    padding-top: 56px;
}

.section-title {
    font-family: var(--font-title);
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 700;
}

.section-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    margin-top: 10px;
    border-radius: 2px;
    background-color: var(--moon);
}

.section-lead {
    margin-top: 12px;
    color: var(--brown-soft);
}

.group-title {
    margin: 32px 0 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--line);
    font-family: var(--font-title);
    font-size: 22px;
}

/* 온도와 추천 표시 */
.tag {
    display: inline-block;
    padding: 1px 9px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.6;
    white-space: nowrap;
}

.tag.hot {
    color: var(--hot);
}

.tag.ice {
    color: var(--ice);
}

.tag.best {
    border-color: var(--moon);
    background-color: var(--moon);
    color: var(--brown);
}

.price {
    margin-left: auto;
    font-weight: 700;
    white-space: nowrap;
}

/* 오늘의 추천 카드 */
.card-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.card {
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background-color: var(--card);
    box-shadow: 0 4px 14px rgba(74, 52, 38, 0.07);
}

.card-label {
    align-self: flex-start;
    padding: 2px 10px;
    border-radius: 999px;
    background-color: var(--moon-soft);
    font-size: 12px;
    font-weight: 700;
}

.card-name {
    margin-top: 14px;
    font-family: var(--font-title);
    font-size: 24px;
}

.card-desc {
    margin-top: 6px;
    color: var(--brown-soft);
    font-size: 15px;
}

.card-bottom {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 20px;
}

.card-bottom .price {
    font-size: 18px;
}

/* 할인 메뉴 */
.sale-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.sale-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border: 2px dashed var(--moon);
    border-radius: 14px;
    background-color: var(--card);
}

.sale-name {
    font-size: 18px;
    font-weight: 700;
}

.sale-cond {
    color: var(--brown-soft);
    font-size: 14px;
}

.sale-price {
    text-align: right;
    white-space: nowrap;
}

.sale-price s {
    margin-right: 8px;
    color: var(--brown-soft);
}

.sale-price strong {
    color: var(--hot);
    font-size: 22px;
}

/* 메뉴 목록 */
.menu-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 40px;
}

.menu-item {
    padding: 14px 0;
    border-bottom: 1px dashed var(--line);
}

.menu-head {
    display: flex;
    align-items: center;
    gap: 6px;
}

.menu-name {
    margin-right: 4px;
    font-size: 17px;
    font-weight: 700;
}

.menu-desc {
    margin-top: 2px;
    color: var(--brown-soft);
    font-size: 14px;
}

/* 매장 정보 */
.info-list {
    margin-top: 24px;
    padding: 8px 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background-color: var(--card);
}

.info-row {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row dt {
    flex: 0 0 88px;
    font-weight: 700;
}

.info-row dd {
    color: var(--brown-soft);
}

/* 하단 */
.footer {
    padding: 28px 16px;
    background-color: var(--cream-deep);
    color: var(--brown-soft);
    font-size: 14px;
    text-align: center;
}

/* 폭이 좁아지면 추천 카드를 한 줄에 하나씩 */
@media (max-width: 700px) {
    .card-list {
        grid-template-columns: 1fr;
    }
}

/* 폭이 더 좁아지면 메뉴 목록을 한 줄에 하나씩 */
@media (max-width: 600px) {
    .menu-list {
        grid-template-columns: 1fr;
    }
}

/* 모바일 */
@media (max-width: 520px) {
    .hero {
        padding: 48px 16px 40px;
    }

    .section {
        padding-top: 44px;
    }

    .sale-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .sale-price {
        text-align: left;
    }

    .info-row {
        flex-direction: column;
        gap: 2px;
    }

    .info-row dt {
        flex-basis: auto;
    }
}

/* 음료 영문 이름 */
.name-en {
    display: block;
    color: var(--brown-soft);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.card-name .name-en {
    margin-top: 2px;
    font-family: var(--font-body);
    font-size: 14px;
}

/* ===== 입장 화면: 빛나는 라떼아트 ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* 보이지 않는 체크박스: 라떼 잔(label)을 누르면 켜집니다 */
.enter-toggle {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* 입장 전에는 메뉴판이 스크롤되지 않게 막습니다 */
.site {
    max-height: 100vh;
    overflow: hidden;
}

.enter-toggle:checked ~ .site {
    max-height: none;
    overflow: visible;
}

/* 배경은 메뉴판과 같은 크림색 */
.intro {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--moon-soft) 0%, var(--cream) 55%, var(--cream) 100%);
}

/* 라떼 한 잔 */
.latte {
    position: relative;
    isolation: isolate;
    display: block;
    width: clamp(220px, 46vmin, 380px);
    aspect-ratio: 1;
    cursor: pointer;
    transition: filter 0.3s ease;
}

.latte:hover {
    filter: brightness(1.04);
}

.latte-svg {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 18px rgba(74, 52, 38, 0.22));
}

/* 잔 둘레에서 숨 쉬듯 빛나는 빛무리 */
.latte::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -30%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 226, 150, 0.6) 0%, rgba(255, 226, 150, 0.2) 42%, rgba(255, 226, 150, 0) 70%);
    animation: glowPulse 3.5s ease-in-out infinite;
}

.enter-toggle:focus-visible ~ .intro .latte {
    outline: 3px solid var(--brown);
    outline-offset: 10px;
    border-radius: 50%;
}

.intro-title {
    margin-top: 20px;
    color: var(--brown);
    font-family: var(--font-title);
    font-size: clamp(30px, 6vw, 44px);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.intro-hint {
    color: var(--brown-soft);
    font-size: 15px;
    animation: hintBlink 2.6s ease-in-out infinite;
}

/* 잔을 누르면: 따뜻한 빛이 환하게 퍼지면서 메뉴판이 나타납니다 */
.enter-toggle:checked ~ .intro {
    pointer-events: none;
    animation: introOut 1.8s ease-in forwards;
}

.enter-toggle:checked ~ .intro .latte {
    animation: latteEnter 1.8s ease-in forwards;
}

.enter-toggle:checked ~ .intro .latte::before {
    animation: lightFlood 1.8s ease-in forwards;
}

.enter-toggle:checked ~ .intro .intro-title,
.enter-toggle:checked ~ .intro .intro-hint {
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: none;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

@keyframes hintBlink {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

@keyframes latteEnter {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    30% {
        transform: scale(1.1);
        filter: brightness(1.12);
    }
    100% {
        transform: scale(1.7);
        filter: brightness(1.3);
        opacity: 0;
    }
}

@keyframes lightFlood {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        background: radial-gradient(circle, #FFF3C4 0%, #FFF3C4 45%, rgba(255, 243, 196, 0) 72%);
        transform: scale(16);
    }
}

@keyframes introOut {
    0%, 60% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* 움직임을 줄이는 설정을 쓰는 사람에게는 애니메이션을 끕니다 */
@media (prefers-reduced-motion: reduce) {
    .latte::before,
    .intro-hint {
        animation: none;
    }

    .enter-toggle:checked ~ .intro {
        animation-duration: 0.01s;
    }

    .enter-toggle:checked ~ .intro .latte,
    .enter-toggle:checked ~ .intro .latte::before {
        animation: none;
    }
}
