:root {
    --bg-color: #dfd8d1;
    --text-dark: #3a1e16;
    --text-highlight: #925f4b;
    --btn-bg: #401e14;
    --btn-text: #ffffff;
    --logo-bg: #633324;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Navbar styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    position: relative;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-box {
    background-color: var(--logo-bg);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    letter-spacing: 1px;
}

.logo-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
    letter-spacing: 0.5px;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-highlight);
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-highlight);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-dark);
}

.btn-shop,
.btn-menu {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn-shop:hover,
.btn-menu:hover {
    transform: scale(1.05);
    background-color: #2b140e;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem 2rem 6rem;
    flex: 1;
    position: relative;
}

.hero-content {
    max-width: 50%;
    z-index: 10;
    transform: translateY(4rem);
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.hero-title .highlight {
    color: var(--text-highlight);
    font-weight: 400;
}

.btn-menu {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 30px;
}

.hero-image-container {
    position: absolute;
    right: 0%;
    bottom: -10%;
    width: 50%;
    z-index: 1;
    pointer-events: none;
}

.hero-image-bg {
    position: absolute;
    bottom: -162%;
    left: -40%;
    width: 90%;
    height: auto;
    z-index: -1;
    object-fit: cover;
    animation: floatBg 8s ease-in-out infinite;
}

@keyframes floatBg {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(3deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.hero-image {
    width: 75%;
    height: auto;
    object-fit: cover;
    transform: scale(1);
    position: relative;
    top: 16rem;
    left: 8rem;
    z-index: 1;
    animation: slideInRight 1.5s ease-out forwards;
}

@keyframes slideInRight {
    0% {
        transform: translateX(150px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Menu Section */
.menu-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 35rem;
    padding: 10rem 6rem 8rem 6rem;
    gap: 6rem;
    background-color: var(--bg-color);
    /* Matches the same background */
}

.cards-container {
    display: flex;
    gap: 4rem;
}

.coffee-card {
    background-color: #e5dfd8;
    border-radius: 40px;
    padding: 9rem 2rem 5rem 2rem;
    position: relative;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.card-img {
    position: absolute;
    top: -120px;
    width: 260px;
    height: auto;
    border-radius: 50%;
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.2));
}

.img-cappuccino {
    width: 320px;
    top: -140px;
}

.card-content h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.card-content p {
    font-size: 0.8rem;
    color: #553a30;
}

.card-price {
    position: absolute;
    bottom: -20px;
    background-color: var(--btn-bg);
    color: white;
    padding: 0.75rem 2.5rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 400;
}

.menu-text {
    max-width: 40%;
}

.menu-text h2 {
    font-size: 3rem;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.menu-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #553a30;
    margin-bottom: 2rem;
}

.btn-learn {
    background-color: #6a4235;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-learn:hover {
    transform: scale(1.05);
    background-color: #553a30;
}

/* About Section */
.about-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5rem 4rem 4rem 6rem;
    background-color: var(--bg-color);
}

.about-content {
    max-width: 50%;
    z-index: 2;
}

.about-content h2 {
    font-size: 3.5rem;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 2rem;
    font-weight: 700;
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #4a2f26;
    margin-bottom: 2.5rem;
}

.btn-learn-about {
    background-color: #5e3b30;
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-learn-about:hover {
    transform: scale(1.05);
}

.about-image-container {
    position: relative;
    width: 45%;
    display: flex;
    justify-content: center;
    isolation: isolate;
    z-index: 1;
}

.price-tag {
    position: absolute;
    top: 5%;
    right: 5%;
    background-color: #ffffff;
    color: var(--text-dark);
    padding: 1rem 2rem;
    border-radius: 20px;
    font-size: 1.8rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-image {
    width: 80%;
    height: auto;
    object-fit: contain;
    z-index: 10;
    position: relative;
    left: 5%;
    opacity: 0;
}

.about-image.animate {
    animation: slideInLeft 2.5s ease-out forwards;
}

@keyframes slideInLeft {
    0% {
        transform: translateX(-150px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.about-image-bg {
    position: absolute;
    top: 30%;
    left: -10%;
    width: 140%;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transform: scaleX(-1) rotate(-34deg);
}

.about-image-bg.animate {
    animation: slideInBounceBg 2.5s ease-out forwards;
}

@keyframes slideInBounceBg {
    0% {
        transform: translateX(200px) scaleX(-1) rotate(-34deg);
        opacity: 0;
    }

    70% {
        transform: translateX(-30px) scaleX(-1) rotate(-34deg);
        opacity: 1;
    }

    100% {
        transform: translateX(0px) scaleX(-1) rotate(-34deg);
        opacity: 1;
    }
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 6rem 4rem 6rem;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-header {
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-header h2 {
    font-size: 3.5rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

.gallery-header h2 .highlight {
    color: var(--text-highlight);
    font-weight: 400;
}

.gallery-header p {
    font-size: 1.2rem;
    color: #553a30;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    position: relative;
}

.gallery-slider-container {
    overflow: hidden;
    width: 100%;
}

.gallery-grid {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 2rem;
    width: 100%;
}

.gallery-item {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    aspect-ratio: 1 / 1;
    flex: 0 0 calc((100% - 4rem) / 3);
    /* show 3 per view */
}

.slider-btn {
    background-color: var(--btn-bg);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, background-color 0.3s;
    flex-shrink: 0;
}

.slider-btn:hover {
    transform: scale(1.1);
    background-color: #2b140e;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Footer & Reservation Section */
.footer-section {
    padding: 6rem 6rem 4rem 6rem;
    background-color: var(--bg-color);
}

.reservation-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6rem;
}

.reservation-text .subtitle {
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #6a4f44;
    margin-bottom: 0.5rem;
}

.reservation-text h2 {
    font-size: 3rem;
    color: var(--text-dark);
    font-weight: 700;
}

.btn-contact {
    background-color: #3b1c14;
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-contact:hover {
    transform: scale(1.05);
}

.footer-divider {
    border: none;
    height: 1px;
    background-color: #c4b5a9;
    margin-bottom: 5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.brand-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.brand-col .logo-text h1 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.brand-col .logo-text p {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.footer-logo {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    width: 4.5rem;
    height: 4.5rem;
    padding: 0;
}

.footer-col h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
}

.services-title {
    position: relative;
    display: inline-block;
}

.cyan-dot {
    position: absolute;
    top: -5px;
    right: -15px;
    width: 15px;
    height: 15px;
    background-color: #1ec2c2;
    border-radius: 50%;
}

.services-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.services-col a {
    text-decoration: none;
    color: #6a4f44;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.services-col a:hover {
    color: var(--text-dark);
}

.address-col p {
    color: #6a4f44;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    .navbar {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .hero {
        padding: 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 2rem;
        transform: translateY(0);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-image-container {
        position: relative;
        width: 100%;
        display: flex;
        justify-content: flex-start;
        margin-top: 1rem;
        margin-bottom: 4rem;
    }

    .hero-image {
        width: 100%;
        position: relative;
        top: 0;
        left: 0;
    }

    .hero-image-bg {
        width: 110%;
        bottom: auto;
        top: 5%;
        left: -5%;
    }

    .menu-section {
        flex-direction: column-reverse;
        margin-top: 2rem;
        padding: 4rem 2rem;
        gap: 4rem;
    }

    .cards-container {
        flex-direction: column;
        width: 100%;
        margin-top: 8rem;
        gap: 10rem;
    }

    .menu-text {
        max-width: 100%;
    }

    .menu-text h2 {
        font-size: 2.5rem;
    }

    .coffee-card {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }

    .about-section {
        flex-direction: column;
        padding: 4rem 2rem 4rem 2rem; /* increased bottom padding */
        gap: 4rem;
    }

    .about-content {
        max-width: 100%;
    }

    .about-content h2 {
        font-size: 2.5rem;
    }

    .about-image-container {
        width: 100%;
        margin-top: 2rem;
    }

    .about-image {
        width: 100%;
        left: 0;
    }

    .about-image-bg {
        width: 180%;
        top: 10%;
        left: -40%;
    }

    .price-tag {
        top: -10px;
        right: 10px;
        padding: 0.8rem 1.5rem;
        font-size: 1.2rem;
    }

    .gallery-section {
        padding: 6rem 2rem 2rem 2rem; /* increased top padding to avoid overlap */
    }

    .gallery-header h2 {
        font-size: 2.5rem;
    }

    .gallery-grid {
        gap: 2rem; /* Must match JS gap calculation */
    }

    .gallery-item {
        flex: 0 0 100%;
    }

    .slider-btn {
        position: absolute;
        top: auto;
        bottom: -4rem; /* move completely outside the image wrapper */
        transform: none;
        z-index: 10;
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
        opacity: 0.95;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .prev-btn {
        left: calc(50% - 3rem);
    }

    .next-btn {
        right: calc(50% - 3rem);
    }

    .gallery-slider-wrapper {
        gap: 0;
        padding-bottom: 0;
        margin-bottom: 4rem; /* give space for the buttons below it */
        align-items: center; 
    }

    .footer-section {
        padding: 2rem 2rem 2rem 2rem;
    }

    .reservation-box {
        flex-direction: column;
        gap: 2rem;
    }

    .reservation-text h2 {
        font-size: 2.2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 3rem;
    }

    .cyan-dot {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        top: -10px;
    }
}