/* CSS Custom Properties - Premium Palette */
:root {
    --bg-light: #FDFBF7;
    --text-dark: #2A2521;
    --text-muted: #5d534b;
    --coffee-dark: #3E2723;
    --coffee-medium: #8D6E63;
    --gold: #D4AF37;
    --gold-light: #F3E5AB;
    --accent: #E85D04;
    /* A pop of warmth */

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;

    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2.section-title {
    font-size: 2.5rem;
    color: var(--coffee-dark);
}

h3.section-subtitle {
    font-size: 1.25rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    font-family: var(--font-main);
    font-weight: 600;
}

p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.text-light {
    color: var(--bg-light) !important;
}

.text-gold {
    color: var(--gold) !important;
}

/* Layout Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-dark {
    background-color: var(--coffee-dark);
    color: var(--bg-light);
}

.section-dark p {
    color: #e0d8d3;
}

.bg-light {
    background-color: #F8F5F2;
}

.center {
    text-align: center;
}

.section-header.center p {
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-fast);
    padding: 1.5rem 0;
    background: transparent;
}

header.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 0.8rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    transition: var(--transition-fast);
}

header.scrolled .logo img {
    height: 45px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--bg-light);
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    white-space: nowrap;
}

header.scrolled .nav-links a {
    color: var(--coffee-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--gold);
    transition: var(--transition-fast);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--bg-light);
    transition: var(--transition-fast);
}

header.scrolled .menu-toggle span {
    background-color: var(--coffee-dark);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-image: url('assets/images/home_sharpened.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--bg-light);
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(62, 39, 35, 0.8), rgba(62, 39, 35, 0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-logo-wrapper {
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo {
    width: 200px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    display: block;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    color: var(--bg-light);
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition-fast);
    cursor: pointer;
}

.primary-btn {
    background-color: var(--gold);
    color: var(--coffee-dark);
    border: 2px solid var(--gold);
}

.primary-btn:hover {
    background-color: transparent;
    color: var(--gold);
}

/* Grid Layouts for Sections */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.layout-image-left .image-box {
    order: 1;
}

.layout-image-left .text-box {
    order: 2;
}

.layout-image-right .text-box {
    order: 1;
}

.layout-image-right .image-box {
    order: 2;
}

.image-box {
    position: relative;
}

.image-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    aspect-ratio: 4 / 5;
}

.decorative-square {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--gold);
    top: -20px;
    left: -20px;
    z-index: 1;
    border-radius: 8px;
}

.decorative-square.left-bottom {
    top: 20px;
    left: 20px;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--coffee-dark);
    font-weight: 500;
}

.features-list li span {
    color: var(--gold);
}

.caffetteria-logo-wrapper {
    margin-top: 2.5rem;
    display: flex;
    justify-content: flex-start;
}

.caffetteria-illy-logo {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    transition: transform var(--transition-fast);
}

.caffetteria-illy-logo:hover {
    transform: scale(1.05);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transform: translateY(-10px);
}

.card-image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 2.5rem;
}

.card-content h4 {
    font-size: 1.5rem;
    color: var(--coffee-dark);
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background-color: #1a1614;
    color: #e0d8d3;
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 3rem;
}

.footer-logo {
    width: 140px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.footer h4 {
    color: var(--gold);
    font-family: var(--font-main);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.8rem;
}

.footer ul a {
    color: #e0d8d3;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer ul a:hover {
    color: var(--gold);
}

.social-links {
    margin: 0 auto 2rem auto;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--gold);
    color: var(--coffee-dark);
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.staggered-fade {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s forwards;
}

.hero-logo.staggered-fade {
    animation-delay: 0.2s;
}

.hero h1.staggered-fade {
    animation-delay: 0.4s;
}

.hero p.staggered-fade {
    animation-delay: 0.6s;
}

.hero .btn.staggered-fade {
    animation-delay: 0.8s;
}

.illy-logo {
    position: absolute;
    bottom: 30px;
    right: 30px;
    height: 70px;
    width: auto;
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.illy-logo.staggered-fade {
    animation-delay: 1.0s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiveness */
@media screen and (max-width: 900px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .layout-image-left .image-box,
    .layout-image-right .image-box {
        order: -1;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .illy-logo {
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

@media screen and (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--bg-light);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        color: var(--coffee-dark);
        font-size: 1.25rem;
    }

    header.scrolled .menu-toggle span {
        background-color: var(--coffee-dark);
    }
}

/* Gallery Sede */
.sede-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.sede-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease;
}

.sede-gallery img:hover {
    transform: scale(1.03);
}