/* CSS Design System - Landing Candele Mendrisio */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary: #d4af37;
    /* Honey Gold */
    --primary-dark: #b8952c;
    --secondary: #1a1a1a;
    /* Deep Charcoal */
    --accent: #fdfaf0;
    /* Silk Cream */
    --text-main: #333333;
    --text-light: #666666;
    --bg-gradient: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--accent);
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 400;
    transition: var(--transition);
}

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

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 80px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0;
    animation: fadeInUp 1s forwards 0.8s;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary);
    opacity: 0;
    animation: fadeInUp 1s forwards 1.1s;
}

.btn:hover {
    background: transparent;
    color: var(--primary);
    transform: scale(1.05);
}

/* Sections General */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.section-title span {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* La Nostra Storia */
.story {
    background: white;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.story-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.story-img {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
}

.story-img img {
    width: 100%;
    display: block;
    transition: var(--transition);
}

.story-img:hover img {
    transform: scale(1.05);
}

/* Products Gallery */
.products {
    background: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--accent);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 350px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-info {
    padding: 25px;
    text-align: center;
}

.product-info h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.product-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: block;
}

/* Reviews */
.reviews {
    background: #fdfaf0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border-bottom: 4px solid var(--primary);
    transition: var(--transition);
}

.review-card:hover {
    transform: translateY(-10px);
}

.stars {
    color: var(--primary);
    margin-bottom: 15px;
}

.review-card p {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 20px;
}

.reviewer {
    font-weight: 600;
    color: var(--secondary);
}

/* Contact Form */
.contact {
    background: var(--bg-gradient);
    color: white;
}

.contact .section-title h2 {
    color: white;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 2;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.contact-form button {
    grid-column: span 2;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.contact-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* Footer */
footer {
    background: #000;
    color: #888;
    padding: 50px 0;
    text-align: center;
}

.footer-logo {
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 20px;
    display: block;
}

.footer-info {
    font-size: 0.9rem;
    margin-top: 20px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    header {
        padding: 12px 0;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-links {
        gap: 24px;
    }

    .nav-links a {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 16px;
    }
    
    header {
        padding: 10px 0;
    }

    .logo {
        font-size: 1rem;
    }

    .nav-links {
        gap: 16px;
        font-size: 0.75rem;
    }

    .nav-links a {
        font-size: 0.75rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .story-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .story-img {
        max-height: 300px;
    }

    .story-img img {
        object-fit: cover;
        height: 100%;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-img {
        height: 280px;
    }

    .contact-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    .contact-form button {
        grid-column: span 1;
        width: 100%;
    }
    
    .container {
        padding: 0 16px;
    }

    footer {
        padding: 40px 0;
    }

    .footer-logo {
        font-size: 1.5rem;
    }

    .footer-info {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 15px;
    }
    
    header {
        padding: 8px 0;
    }

    .logo {
        font-size: 0.9rem;
    }

    .nav-links {
        gap: 12px;
        font-size: 0.65rem;
    }

    .nav-links a {
        font-size: 0.65rem;
    }
    
    .hero-content h1 {
        font-size: 1.875rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .hero-content {
        padding: 80px 16px;
    }

    .container {
        padding: 0 12px;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    .story-grid {
        gap: 20px;
    }

    .story-img {
        max-height: 250px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-img {
        height: 250px;
    }

    .product-info {
        padding: 20px 15px;
    }

    .product-info h3 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    input, textarea, select {
        font-size: 16px;
        padding: 10px 12px;
    }

    footer {
        padding: 1rem 0.75rem !important;
    }
    
    .footer-logo {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    .footer-info {
        font-size: 0.75rem !important;
        margin-top: 0.75rem !important;
    }
    
    .footer-grid {
        gap: 0.5rem !important;
        grid-template-columns: 1fr !important;
    }
    
    .footer-col {
        padding: 0.75rem 0 !important;
        text-align: center !important;
    }

    /* Image Optimization */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Lazy Loading */
    img[loading="lazy"] {
        background: linear-gradient(90deg, #fdfaf0 25%, #f5f1e8 50%, #fdfaf0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
        min-height: 100px;
    }

    @keyframes shimmer {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}