/* ==========================================================================
   Kawasafari Barista's Academy — theme tokens
   Palette: deep espresso + warm caramel accent on cream/white
   ========================================================================== */
:root {
    --espresso: #2a1810;       /* darkest brown — nav, footer, dark sections */
    --espresso-2: #382012;     /* slightly lighter brown for cards on dark */
    --coffee: #5c3a26;         /* mid brown — borders / secondary */
    --caramel: #c9975f;        /* primary accent (buttons, links, icons) */
    --caramel-light: #e3bd8a;  /* accent hover */
    --cream: #faf5ec;          /* light section background */
    --cream-2: #f2e9db;        /* light card background */
    --white: #ffffff;
    --ink: #2b1a10;            /* dark text on light backgrounds */
    --ink-soft: #6b5747;       /* muted text on light backgrounds */
    --paper: #f6efe4;          /* light text on dark backgrounds */
    --paper-soft: rgba(246, 239, 228, 0.72);
    --border-dark: 0.1rem solid rgba(246, 239, 228, 0.18);
    --border-light: 0.1rem solid rgba(43, 26, 16, 0.14);
    --shadow-soft: 0 1.5rem 3.5rem rgba(20, 10, 4, 0.18);
    --shadow-tight: 0 0.8rem 2rem rgba(20, 10, 4, 0.14);
    --radius: 1.4rem;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-transform: capitalize;
    list-style-type: none;
    text-decoration: none;
    border: none;
    outline: none;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
    scroll-padding-top: 10rem;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

html::-webkit-scrollbar {
    width: 0.8rem;
}

html::-webkit-scrollbar-track {
    background: var(--cream);
}

html::-webkit-scrollbar-thumb {
    background: var(--caramel);
    border-radius: 5rem;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--cream);
    color: var(--ink);
    overflow-x: hidden;
}

a,
button {
    transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease),
        transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

img {
    display: block;
    max-width: 100%;
}

h1, h2, h3 {
    font-family: 'Fraunces', 'Roboto', serif;
    letter-spacing: 0.01em;
}

section {
    padding: 8rem 7% 7rem;
    position: relative;
    overflow: hidden;
}

/* Dark / light rhythm across the page — coffee brown alternating with cream */
.home,
#menu,
.review,
.blogs,
.footer {
    background: linear-gradient(180deg, var(--espresso), var(--espresso-2));
    color: var(--paper);
}

.about#about,
.products,
.contact-us,
.faq {
    background: var(--cream);
    color: var(--ink);
}

.heading {
    text-align: center;
    text-transform: uppercase;
    padding-bottom: 1rem;
    font-size: clamp(2.8rem, 4vw, 4.2rem);
    font-weight: 600;
}

.about#about .heading,
.products .heading,
.contact-us .heading,
.faq .heading {
    color: var(--ink);
}

#menu .heading,
.review .heading,
.blogs .heading {
    color: var(--paper);
}

.heading span {
    color: var(--caramel);
    text-transform: uppercase;
}

.eyebrow {
    display: inline-block;
    font-size: 1.3rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--caramel-light);
    font-weight: 500;
    margin-bottom: 1.2rem;
}

button {
    cursor: pointer;
}

.btn {
    margin-top: 1rem;
    display: inline-block;
    padding: 1.1rem 3rem;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    color: var(--espresso);
    background: var(--caramel);
    border-radius: 50px;
    text-decoration: none;
    box-shadow: var(--shadow-tight);
    border: 1px solid transparent;
    font-weight: 600;
    text-transform: uppercase;
}

.btn:hover {
    background: var(--caramel-light);
    transform: translateY(-3px);
    box-shadow: 0 1.2rem 2.4rem rgba(20, 10, 4, 0.28);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-tight);
}

/* light-section buttons stay legible on cream backgrounds */
.about#about .btn,
.products .btn {
    color: var(--espresso);
}

/* ==========================================================================
   Scroll-reveal animation system (JS-driven via IntersectionObserver)
   ========================================================================== */
.reveal,
.autoShow {
    opacity: 0;
    transform: translateY(3.2rem);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    will-change: opacity, transform;
}

.reveal.in-view,
.autoShow.in-view {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.in-view > * {
    transition-delay: calc(var(--stagger-index, 0) * 90ms);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 9rem;
    background: rgba(28, 16, 9, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 0.1rem solid rgba(201, 151, 95, 0.25);
    z-index: 1000;
    transition: box-shadow 0.3s var(--ease);
}

nav.scrolled {
    box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.35);
}

.nav-bar {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-image {
    width: 16rem;
    height: auto;
}

.menu {
    display: flex;
    align-items: center;
}

.menu-top {
    display: none;
}

.toggle-image {
    width: 16rem;
    height: auto;
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links li a {
    position: relative;
    color: var(--paper);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.8rem 1.2rem;
    display: inline-block;
}

.nav-links li a::after {
    content: "";
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 0.35rem;
    height: 0.2rem;
    background: var(--caramel);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.nav-links li a:hover {
    color: var(--caramel-light);
}

.nav-links li a:hover::after,
.nav-links li a.active-link::after {
    transform: scaleX(1);
}

.sidebarOpen,
.closeMenu {
    color: var(--paper);
    font-size: 3rem;
    padding: 0.5rem;
    cursor: pointer;
    display: none;
    line-height: 1;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 2, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
    z-index: 999;
}

nav.active ~ .nav-overlay,
.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Hero / Home
   ========================================================================== */
.home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding-top: 12rem;
}

.home .content {
    max-width: 58rem;
}

.home .content h3 {
    font-size: clamp(3.6rem, 6vw, 6.4rem);
    text-transform: uppercase;
    color: var(--white);
    line-height: 1.1;
}

.home .content p {
    font-size: 1.8rem;
    color: var(--paper-soft);
    font-weight: 300;
    line-height: 1.8;
    padding: 1.6rem 0;
    max-width: 48rem;
}

.home .image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    max-width: 46%;
}

.image-frame {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 0.4rem solid rgba(201, 151, 95, 0.35);
    aspect-ratio: 4 / 5;
    width: 100%;
    max-width: 42rem;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    animation: float 4s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1.4rem); }
}

.image-gallery {
    display: flex;
    justify-content: center;
    margin: 1rem 0 3rem;
    gap: 1.2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.image-gallery .thumbnail {
    width: 8rem;
    height: 8rem;
    object-fit: cover;
    border-radius: 1rem;
    cursor: pointer;
    border: 0.2rem solid rgba(201, 151, 95, 0.3);
    box-shadow: var(--shadow-tight);
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.image-gallery .thumbnail:hover {
    transform: translateY(-0.4rem) scale(1.05);
    border-color: var(--caramel);
}

.image-gallery .thumbnail.active-thumb {
    border-color: var(--caramel);
    box-shadow: 0 0 0 0.3rem rgba(201, 151, 95, 0.35);
}

/* ==========================================================================
   About / Courses shared row layout
   ========================================================================== */
.about .row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 5rem;
}

.about .row:last-child {
    margin-bottom: 0;
}

.about .row .image {
    flex: 1 1 42rem;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-tight);
}

.about .row .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.about .row:hover .image img {
    transform: scale(1.06);
}

.about .row .content {
    flex: 1 1 42rem;
    padding: 3rem;
    border-radius: var(--radius);
}

.about#about .row .content {
    background: var(--white);
    border: var(--border-light);
    box-shadow: var(--shadow-tight);
}

#menu .row .content {
    background: var(--espresso-2);
    border: var(--border-dark);
}

.about .row .content h3 {
    font-size: 2.6rem;
}

.about#about .row .content h3 {
    color: var(--ink);
}

#menu .row .content h3 {
    color: var(--white);
}

.about .row .content p {
    font-size: 1.6rem;
    padding: 0.6rem 0;
    line-height: 1.8;
}

.about#about .row .content p {
    color: var(--ink-soft);
}

#menu .row .content p {
    color: var(--paper-soft);
}

.barista-skills {
    color: var(--caramel-light);
    font-size: clamp(2.2rem, 3vw, 2.8rem);
    margin: 1rem 0 1.6rem;
    font-weight: 600;
}

#menu h1.barista-skills:first-of-type {
    margin-top: 0;
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-cotainer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.gallery-box {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-tight);
    aspect-ratio: 1 / 1;
    position: relative;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: gallery-reveal both;
    animation-timeline: view(50% 10%);
    transition: transform 0.5s var(--ease);
}

.gallery-box:hover .gallery-image {
    transform: scale(1.08);
}

@keyframes gallery-reveal {
    from {
        filter: saturate(0) contrast(1.3) brightness(0.7) blur(6px);
        opacity: 0;
        scale: 0.94;
    }
    to {
        filter: none;
        opacity: 1;
        scale: 1;
    }
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.review .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 2rem;
}

.review .box-container .box {
    border: var(--border-dark);
    background: var(--espresso-2);
    text-align: center;
    padding: 3.5rem 2.5rem;
    border-radius: var(--radius);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.review .box-container .box:hover {
    transform: translateY(-0.6rem);
    box-shadow: var(--shadow-soft);
}

.review .box-container .box .quote {
    width: 3.4rem;
    margin: 0 auto 1.5rem;
    opacity: 0.85;
}

.review .box-container .box p {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--paper-soft);
    padding: 1rem 0 2rem;
}

.review .box-container .box .user {
    width: 7rem;
    height: 7rem;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    border: 0.3rem solid var(--caramel);
}

.review .box-container .box h3 {
    padding: 1rem 0 0.4rem;
    font-size: 2rem;
    color: var(--white);
}

.review .box-container .box .stars i {
    font-size: 1.5rem;
    color: var(--caramel);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-us {
    display: flex;
    justify-content: center;
}

.contact-container {
    border: var(--border-light);
    background: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 3.5rem;
    border-radius: var(--radius);
    max-width: 117rem;
    width: 100%;
    box-shadow: var(--shadow-tight);
}

.contact-details {
    flex: 1;
    padding-right: 2rem;
}

.contact-info h2 {
    font-size: 2.4rem;
    margin-bottom: 1.6rem;
    color: var(--coffee);
}

.contact-info p {
    font-size: 1.5rem;
    line-height: 1.6;
    margin: 0.6rem 0 0.2rem;
    color: var(--ink);
    font-weight: 600;
}

.contact-info .info-value {
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.info-adress {
    color: var(--ink-soft);
    font-size: 1.5rem;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--caramel);
}

.info-adress:hover {
    color: var(--coffee);
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form .text-area {
    margin-bottom: 1.6rem;
    padding: 1.1rem 0.5rem;
    border-bottom: 0.15rem solid rgba(43, 26, 16, 0.25);
    background: transparent;
    color: var(--ink);
    font-size: 1.5rem;
}

.contact-form input::placeholder {
    color: var(--ink-soft);
}

.contact-form input:focus,
.contact-form .text-area:focus {
    border-bottom-color: var(--caramel);
}

.contact-form button {
    width: 50%;
    align-self: flex-start;
}

.social-icons {
    flex: 0.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.social-icons a {
    width: 4.6rem;
    height: 4.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--coffee);
    border: 0.15rem solid rgba(92, 58, 38, 0.25);
    border-radius: 50%;
}

.social-icons a:hover {
    transform: scale(1.12) translateY(-0.2rem);
    color: var(--white);
    background: var(--caramel);
    border-color: var(--caramel);
}

/* ==========================================================================
   Blog
   ========================================================================== */
.blogs .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 2.5rem;
}

.blogs .box-container .box {
    border: var(--border-dark);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--espresso-2);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.blogs .box-container .box:hover {
    transform: translateY(-0.6rem);
    box-shadow: var(--shadow-soft);
}

.blogs .box-container .box .image {
    height: 22rem;
    overflow: hidden;
    width: 100%;
}

.blogs .box-container .box .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.blogs .box-container .box:hover .image img {
    transform: scale(1.12);
}

.blogs .box-container .box .content {
    padding: 2.4rem;
}

.blogs .box-container .box .content .title {
    font-size: 2.2rem;
    color: var(--white);
    line-height: 1.4;
    font-weight: 600;
}

.blogs .box-container .box .content .title:hover {
    color: var(--caramel-light);
}

.blogs .box-container .box .content span {
    display: block;
    padding-top: 0.8rem;
    font-size: 1.3rem;
    color: var(--caramel-light);
}

.blogs .box-container .box .content p {
    font-size: 1.5rem;
    color: var(--paper-soft);
    line-height: 1.8;
    padding: 1rem 0;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-item {
    background: var(--white);
    border: var(--border-light);
    border-radius: 1rem;
    margin-bottom: 1.4rem;
    overflow: hidden;
    box-shadow: var(--shadow-tight);
}

.faq-question {
    background: none;
    width: 100%;
    text-align: left;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    padding: 2rem 2.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
}

.faq-question:hover {
    color: var(--coffee);
}

.icon {
    font-size: 2.4rem;
    color: var(--caramel);
    transition: transform 0.3s var(--ease);
    flex-shrink: 0;
}

.faq-question.active .icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease), padding 0.4s var(--ease);
    padding: 0 2.4rem;
    border-top: 0.1rem solid rgba(43, 26, 16, 0.1);
}

.faq-answer.active {
    max-height: 30rem;
    padding: 1.8rem 2.4rem 2.2rem;
}

.faq-answer p {
    font-size: 1.5rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.faq-location {
    text-decoration: underline;
    color: var(--coffee);
    font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    text-align: center;
    padding: 5rem 7% 3rem;
}

.footer .share {
    display: flex;
    justify-content: center;
    gap: 1.6rem;
    padding: 1rem 0 2rem;
    flex-wrap: wrap;
}

.footer .share a {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--paper);
    border: var(--border-dark);
    border-radius: 50%;
}

.footer .share a:hover {
    background: var(--caramel);
    color: var(--espresso);
    transform: translateY(-0.3rem);
}

.footer .links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem 0 2.5rem;
    gap: 1rem;
}

.footer .links a {
    padding: 0.7rem 2rem;
    font-size: 1.4rem;
    color: var(--paper);
    border: var(--border-dark);
    border-radius: 50px;
}

.footer .links a:hover {
    background: var(--caramel);
    color: var(--espresso);
    border-color: var(--caramel);
}

.footer .credit {
    display: block;
    font-size: 1.3rem;
    color: var(--paper-soft);
    font-weight: 300;
    padding: 1.5rem;
}

.footer .credit span {
    color: var(--caramel-light);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 991px) {
    .gallery-cotainer {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 850px) {
    html {
        font-size: 55%;
    }

    section {
        padding: 6rem 2rem 5rem;
    }

    .logo-image {
        width: 13rem;
    }

    .menu {
        position: fixed;
        flex-direction: column;
        align-items: stretch;
        height: 100%;
        width: min(32rem, 82vw);
        right: -100%;
        left: auto;
        top: 0;
        background: var(--espresso);
        z-index: 1001;
        transition: right 0.4s var(--ease);
        box-shadow: -1rem 0 3rem rgba(0, 0, 0, 0.4);
        padding: 2rem 0 3rem;
        overflow-y: auto;
    }

    nav.active .menu {
        right: 0;
    }

    .menu-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 2rem 2rem;
        border-bottom: 0.1rem solid rgba(201, 151, 95, 0.2);
        margin-bottom: 1rem;
    }

    .toggle-image {
        display: block;
        width: 12rem;
    }

    .closeMenu {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.4rem;
        gap: 0.2rem;
    }

    .nav-links li a {
        display: block;
        width: 100%;
        padding: 1.4rem 1rem;
        font-size: 1.7rem;
        border-radius: 0.6rem;
    }

    .nav-links li a::after {
        display: none;
    }

    .nav-links li a:hover,
    .nav-links li a.active-link {
        background: rgba(201, 151, 95, 0.14);
        color: var(--caramel-light);
    }

    .sidebarOpen {
        display: block;
    }

    .gallery-cotainer {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .home {
        flex-direction: column;
        text-align: center;
        padding-top: 11rem;
        gap: 3rem;
    }

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

    .home .content p {
        margin: 0 auto;
    }

    .home .image {
        max-width: 70%;
        justify-content: center;
    }

    .image-frame {
        max-width: 34rem;
    }

    .image-gallery .thumbnail {
        width: 6.4rem;
        height: 6.4rem;
    }

    .contact-container {
        flex-direction: column;
        text-align: center;
        padding: 2.4rem;
    }

    .contact-details {
        padding-right: 0;
    }

    .contact-form {
        width: 100%;
    }

    .contact-form button {
        width: 100%;
        align-self: center;
    }

    .social-icons {
        flex-direction: row;
        margin-top: 1rem;
    }

    .about .row {
        flex-direction: column;
    }

    .about .row .content {
        text-align: center;
    }
}

@media screen and (max-width: 600px) {
    .gallery-cotainer {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .image-gallery .thumbnail {
        width: 5.6rem;
        height: 5.6rem;
    }

    .image-gallery {
        gap: 0.8rem;
    }

    .contact-info h2 {
        font-size: 2rem;
    }

    .social-icons a {
        font-size: 1.8rem;
        width: 4rem;
        height: 4rem;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }

    .gallery-cotainer {
        grid-template-columns: repeat(2, 1fr);
    }
}
