/* Include all existing styles */
html,
body {
    width: 100%;
    overflow-x: hidden !important;
    position: relative;
    max-width: 100vw !important;
}

body {
    background-color: #F5F1E8;
    color: #000000;
    font-family: "Roboto", sans-serif;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
}

html {
    scroll-behavior: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F5F1E8;
}

::-webkit-scrollbar-thumb {
    background: #000000;
}

/* 3D Perspective Utilities */
.perspective-container {
    perspective: 1000px;
}

.translate-z-10 {
    transform: translateZ(10px);
}

.translate-z-12 {
    transform: translateZ(12px);
}

/* Base resets & utilities */
.grayscale-hover {
    filter: grayscale(100%);
    transition: filter 0.7s ease, transform 0.7s ease;
}

.group:hover .grayscale-hover {
    filter: grayscale(0%);
}

.loading-screen {
    position: fixed;
    inset: 0;
    background-color: #F5F1E8;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loading-text {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* Typography Split Utilities */
.char,
.word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.char-inner,
.word-inner {
    display: inline-block;
}

/* Custom Animations */
@keyframes shimmer {
    100% {
        transform: translateX(200%);
    }
}

/* Custom Spin Hover */
.spin-infinite {
    transition: transform 0.5s ease-in-out;
}

.group:hover .spin-infinite {
    animation: smoothSpin 6s linear infinite;
}

@keyframes smoothSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ── Loader: Steam wisps ── */
.steam-wsp {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: steamRise 2s ease-in-out infinite;
    transform-origin: center bottom;
}

#s1 {
    animation-delay: 0s;
    animation-duration: 2.0s;
}

#s2 {
    animation-delay: 0.35s;
    animation-duration: 2.3s;
}

#s3 {
    animation-delay: 0.7s;
    animation-duration: 2.1s;
}

@keyframes steamRise {
    0% {
        stroke-dashoffset: 60;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    70% {
        stroke-dashoffset: 0;
        opacity: 0.7;
    }

    100% {
        stroke-dashoffset: -15;
        opacity: 0;
    }
}

/* ── Loader: Dot pulse ── */
.loader-dot {
    animation: dotPulse 1.4s ease-in-out infinite;
    opacity: 0.3;
}

#loaderDots span:nth-child(1) {
    animation-delay: 0s;
}

#loaderDots span:nth-child(2) {
    animation-delay: 0.2s;
}

#loaderDots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    40% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* ── Loader: Cup gentle float ── */
#loaderCup {
    animation: cupFloat 2.8s ease-in-out infinite;
    filter: drop-shadow(0 12px 24px rgba(80, 30, 5, 0.35));
}

@keyframes cupFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ── Popup form inputs ── */
.popup-input {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    transition: border-color 0.3s ease;
}

.popup-input:focus {
    border-bottom-color: #7A4A1E;
}

.popup-input::placeholder {
    color: rgba(0, 0, 0, 0.25);
    font-weight: 300;
}

/* Mobile Menu Toggle Animation */
#mobileMenuBtn {
    cursor: pointer;
    z-index: 10001 !important;
    position: relative;
    pointer-events: auto !important;
}

#mobileMenuBtn.open .line-1 {
    transform: translateY(8px) rotate(45deg);
    background-color: #000000;
}

#mobileMenuBtn.open .line-2 {
    opacity: 0;
}

#mobileMenuBtn.open .line-3 {
    transform: translateY(-8px) rotate(-45deg);
    background-color: #000000;
}

/* Ensure navbar button is always visible even over light backgrounds */
#mobileMenuBtn span {
    display: block;
    height: 3px !important;
    border-radius: 999px;
}

@media (min-width: 1024px) {
    .menu-item {
        width: calc((100vw - 192px) / 4.5) !important;
        min-width: 280px;
    }
}

@media (max-width: 1023px) and (min-width: 768px) {
    .menu-item {
        width: calc((100vw - 128px) / 2.5) !important;
    }
}

/* Fix for Menu card content visibility on smaller vertical screens */
#menu {
    background-color: #F5F1E8 !important;
    background: #F5F1E8 !important;
    border: none !important;
}

#menuPinContainer,
.menu-track-container,
#menuTrack {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.menu-item {
    background-color: #FFFFFF !important;
    border-radius: 2.5rem;
    box-shadow: 0 20px 40px rgba(137, 87, 47, 0.1) !important;
    border: 1px solid rgba(137, 87, 47, 0.05);
}

.menu-track-container {
    overflow: hidden !important;
    touch-action: pan-y;
}

#menuTrack {
    touch-action: pan-y;
}

.menu-item {
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.menu-item .h-56 {
    height: 35vh !important;
    min-height: 140px;
}

@media (max-height: 800px) {
    .menu-item .h-56 {
        height: 30vh !important;
    }

    .menu-item {
        padding: 1.5rem !important;
    }

    .menu-item h3 {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem !important;
    }

    .menu-item p {
        margin-bottom: 0.5rem !important;
    }
}

@media (max-width: 640px) {
    .menu-item .h-56 {
        height: 25vh !important;
    }

    .menu-item {
        padding: 1.25rem !important;
    }
}