/* =========================================================
   BeiRoot's Café
   Main Stylesheet — Version 1.0
========================================================= */


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    color: #3d2b1f;
    background: #fffaf3;
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   VARIABLES
========================================================= */

:root {
    --brown: #3d2b1f;
    --brown-light: #6b4a35;
    --cream: #fffaf3;
    --cream-dark: #f4eadc;
    --green: #315c42;
    --green-dark: #244631;
    --gold: #c49352;
    --white: #ffffff;

    --shadow-soft:
        0 10px 35px rgba(61, 43, 31, 0.10);

    --shadow-card:
        0 8px 28px rgba(61, 43, 31, 0.12);

    --radius: 14px;

    --transition:
        all 0.3s ease;
}


/* =========================================================
   GLOBAL CONTAINER
========================================================= */

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}


/* =========================================================
   TYPOGRAPHY
========================================================= */

h1,
h2,
h3 {
    font-family: "Playfair Display", Georgia, serif;
    line-height: 1.2;
    color: var(--brown);
}

h1 {
    font-size: clamp(3rem, 7vw, 5.8rem);
}

h2 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

h3 {
    font-size: 1.45rem;
}

p {
    color: #665449;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 250, 243, 0.97);
    border-bottom: 1px solid rgba(61, 43, 31, 0.08);
    backdrop-filter: blur(10px);
}

.nav-container {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo-link {
    display: flex;
    align-items: center;
}

.site-logo {
    width: 155px;
    height: auto;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    position: relative;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--brown);
    transition: var(--transition);
}

.main-nav a:not(.nav-review)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 0;
    height: 2px;
    background: var(--green);
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--green);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.nav-review {
    padding: 10px 17px;
    border-radius: 50px;
    background: var(--green);
    color: var(--white) !important;
}

.nav-review:hover {
    background: var(--green-dark);
}

.nav-review::after {
    display: none;
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 6px 0;
    background: var(--brown);
    transition: var(--transition);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    min-height: 82vh;
    display: flex;
    align-items: center;

    background-image:
        url("../images/hero.webp");

    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;

    background:
        linear-gradient(
            90deg,
            rgba(35, 24, 17, 0.82) 0%,
            rgba(35, 24, 17, 0.60) 48%,
            rgba(35, 24, 17, 0.20) 100%
        );
}

.hero-content {
    padding: 90px 0;
    color: var(--white);
    max-width: 800px;
}

.hero-kicker {
    margin-bottom: 20px;
    color: #f1d8b3;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 3px;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 25px;
}

.hero-text {
    max-width: 650px;
    color: rgba(255, 255, 255, 0.91);
    font-size: 1.08rem;
    margin-bottom: 34px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 13px 25px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gold);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #b48245;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.btn-light {
    background: var(--white);
    color: var(--brown);
}

.btn-light:hover {
    transform: translateY(-2px);
    background: var(--cream);
}

.btn-dark {
    background: var(--brown);
    color: var(--white);
}

.btn-dark:hover {
    transform: translateY(-2px);
    background: var(--green);
}


/* =========================================================
   SECTIONS
========================================================= */

.section {
    padding: 100px 0;
}

.section-light {
    background: var(--cream-dark);
}

.section-heading {
    max-width: 700px;
    margin: 0 auto 55px;
    text-align: center;
}

.section-heading h2 {
    margin-bottom: 18px;
}

.section-heading > p:last-child {
    max-width: 620px;
    margin: 0 auto;
}

.section-label {
    margin-bottom: 12px;
    color: var(--green);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 2.5px;
}

.light-label {
    color: #e8c58e;
}

.section-button {
    margin-top: 45px;
    text-align: center;
}


/* =========================================================
   INTRO
========================================================= */

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 75px;
}

.intro-image {
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.intro-image img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.intro-image:hover img {
    transform: scale(1.03);
}

.intro-content h2 {
    margin-bottom: 24px;
}

.intro-content p {
    margin-bottom: 18px;
}

.text-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--green);
    font-weight: 600;
    transition: var(--transition);
}

.text-link:hover {
    color: var(--brown);
    transform: translateX(4px);
}


/* =========================================================
   COFFEE / PRODUCT GRID
========================================================= */

.coffee-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product-card {
    overflow: hidden;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-7px);
    box-shadow:
        0 16px 35px rgba(61, 43, 31, 0.16);
}

.product-image {
    overflow: hidden;
}

.product-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.06);
}

.product-content {
    padding: 22px;
}

.product-content h3 {
    margin-bottom: 10px;
}

.product-content p {
    font-size: 0.88rem;
    line-height: 1.6;
}


/* =========================================================
   VALUES
========================================================= */

.values {
    background: var(--cream);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.value-card {
    padding: 32px 25px;
    text-align: center;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 6px 24px rgba(61, 43, 31, 0.07);
}

.value-icon {
    margin-bottom: 18px;
    font-size: 2.3rem;
}

.value-card h3 {
    margin-bottom: 12px;
}

.value-card p {
    font-size: 0.9rem;
}


/* =========================================================
   GALLERY PREVIEW
========================================================= */

.gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.gallery-preview-item {
    overflow: hidden;
    display: block;
    border-radius: 15px;
}

.gallery-preview-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-preview-item:hover img {
    transform: scale(1.06);
}


/* =========================================================
   REVIEW CTA
========================================================= */

.review-cta {
    padding: 95px 0;
    text-align: center;

    background:
        linear-gradient(
            135deg,
            var(--green-dark),
            var(--green)
        );
}

.review-content {
    max-width: 720px;
    margin: 0 auto;
}

.review-content h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.review-content > p:not(.section-label) {
    max-width: 600px;
    margin: 0 auto 30px;
    color: rgba(255, 255, 255, 0.88);
}


/* =========================================================
   CONTACT PREVIEW
========================================================= */

.contact-preview {
    background: var(--cream);
}

.contact-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
}

.contact-preview-grid > div:first-child h2 {
    margin-bottom: 20px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-detail {
    display: flex;
    gap: 17px;
    align-items: flex-start;
}

.contact-detail > span {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--cream-dark);
    font-size: 1.15rem;
}

.contact-detail strong {
    display: block;
    margin-bottom: 3px;
    color: var(--brown);
}

.contact-detail p {
    margin: 0;
}

.contact-detail a {
    transition: var(--transition);
}

.contact-detail a:hover {
    color: var(--green);
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    background: #2a1d15;
    color: rgba(255, 255, 255, 0.78);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1fr;
    gap: 45px;
    padding: 70px 0 55px;
}

.footer-logo {
    width: 160px;
    margin-bottom: 18px;

    /*
       The logo is displayed on the dark footer.
       If your original logo already works on a dark
       background, no additional treatment is needed.
    */
}

.footer-brand p {
    max-width: 280px;
    color: rgba(255, 255, 255, 0.65);
}

.site-footer h3 {
    margin-bottom: 18px;
    color: var(--white);
    font-size: 1.2rem;
}

.footer-links,
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a,
.footer-social a {
    color: rgba(255, 255, 255, 0.68);
    transition: var(--transition);
}

.footer-links a:hover,
.footer-social a:hover {
    color: #e8c58e;
    transform: translateX(3px);
}

.footer-contact p {
    margin-bottom: 9px;
    color: rgba(255, 255, 255, 0.68);
}

.footer-contact a {
    transition: var(--transition);
}

.footer-contact a:hover {
    color: #e8c58e;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-bottom .container {
    padding: 20px 0;
}

.footer-bottom p {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}


/* =========================================================
   FLOATING ACTIONS
========================================================= */

.floating-actions {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 900;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-actions a {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.20);

    transition: var(--transition);
}

.floating-actions a:hover {
    transform: translateY(-3px) scale(1.04);
}

.floating-call {
    background: var(--green);
    color: var(--white);
}

.floating-review {
    background: var(--gold);
    color: var(--white);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .coffee-grid,
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .intro-grid,
    .contact-preview-grid {
        gap: 45px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =========================================================
   MOBILE NAVIGATION
========================================================= */

@media (max-width: 800px) {

    .nav-container {
        min-height: 76px;
    }

    .site-logo {
        width: 135px;
    }

    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1002;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;

        padding: 15px 4% 25px;

        background: var(--cream);

        border-bottom:
            1px solid rgba(61, 43, 31, 0.08);

        box-shadow:
            0 15px 30px rgba(61, 43, 31, 0.10);

        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);

        transition: var(--transition);
    }

    .main-nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav a {
        padding: 13px 8px;
        border-bottom: 1px solid rgba(61, 43, 31, 0.07);
    }

    .main-nav a::after {
        display: none !important;
    }

    .main-nav .nav-review {
        margin-top: 10px;
        text-align: center;
        border-bottom: 0;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        min-height: 76vh;
        background-position: 60% center;
    }

    .hero-overlay {
        background:
            linear-gradient(
                90deg,
                rgba(35, 24, 17, 0.83),
                rgba(35, 24, 17, 0.45)
            );
    }
}


/* =========================================================
   SMALL TABLETS / LARGE PHONES
========================================================= */

@media (max-width: 700px) {

    .section {
        padding: 75px 0;
    }

    .intro-grid,
    .contact-preview-grid {
        grid-template-columns: 1fr;
    }

    .intro-grid {
        gap: 40px;
    }

    .intro-image {
        max-width: 600px;
        margin: 0 auto;
    }

    .coffee-grid,
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-preview-grid {
        grid-template-columns: 1fr;
    }

    .gallery-preview-item img {
        aspect-ratio: 16 / 10;
    }

    .contact-preview-grid {
        gap: 45px;
    }
}


/* =========================================================
   PHONES
========================================================= */

@media (max-width: 520px) {

    .container {
        width: 90%;
    }

    h1 {
        font-size: clamp(2.6rem, 12vw, 4rem);
    }

    h2 {
        font-size: 2.25rem;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        padding: 75px 0;
    }

    .hero-kicker {
        font-size: 0.68rem;
        letter-spacing: 2px;
    }

    .hero-text {
        font-size: 0.98rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .coffee-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }

    .product-image img {
        aspect-ratio: 4 / 3;
    }

    .section-heading {
        margin-bottom: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
        padding: 55px 0 40px;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .floating-actions {
        right: 14px;
        bottom: 14px;
    }

    .floating-actions a {
        width: 44px;
        height: 44px;
    }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}