:root {
    --bg-main: #FFF9FB;
    --pastel-purple: #CDB4DB;
    --pastel-pink-light: #FFC8DD;
    --pastel-pink-dark: #FFAFCC;
    --pastel-blue-light: #BDE0FE;
    --pastel-blue-dark: #A2D2FF;
    --text-dark: #4A404A;
    --text-light: #7A6C7A;
    
    --font-heading: 'Dancing Script', cursive;
    --font-body: 'Poppins', sans-serif;
    --font-accent: 'Indie Flower', cursive;
    
    --shadow-soft: 0 10px 30px rgba(205, 180, 219, 0.3);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body); color: var(--text-dark);
    background-color: var(--bg-main); line-height: 1.6; overflow-x: hidden;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-logo { width: 180px; margin-bottom: 20px; }

.loader-bar {
    width: 200px; height: 4px; background-color: var(--pastel-pink-light);
    border-radius: 4px; overflow: hidden; position: relative;
}

.loader-progress {
    position: absolute; top: 0; left: 0; height: 100%; width: 0%;
    background-color: var(--pastel-pink-dark);
    animation: fillProgress 1.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fillProgress { 0% { width: 0%; } 100% { width: 100%; } }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; color: var(--pastel-pink-dark); margin-bottom: 1rem; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }
.text-center { text-align: center; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.accent-text { font-family: var(--font-accent); color: var(--pastel-blue-dark); font-size: 1.4rem; }
.relative-container { position: relative; }

.btn {
    display: inline-block; padding: 12px 28px; border-radius: 30px;
    font-family: var(--font-body); font-weight: 500; transition: var(--transition);
    cursor: pointer; border: none; text-align: center;
}
.btn-primary { background-color: var(--pastel-pink-dark); color: white; box-shadow: 0 4px 15px rgba(255, 175, 204, 0.4); }
.btn-secondary { background-color: white; color: var(--pastel-pink-dark); border: 2px solid var(--pastel-pink-dark); }
.btn-sm { padding: 8px 24px; font-size: 0.95rem; }

header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background-color: rgba(255, 249, 251, 0.95); backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); padding: 20px 0; transition: var(--transition);
}
header.scrolled { padding: 10px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.navbar { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 50px; border-radius: 10px; transition: var(--transition); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-weight: 500; transition: var(--transition); color: var(--text-dark); }
.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; }
.menu-toggle .bar { width: 25px; height: 3px; background-color: var(--pastel-pink-dark); border-radius: 3px; transition: var(--transition); }

.mobile-design-by { display: none; }

#hero {
    min-height: 100vh; display: flex; align-items: center;
    background: radial-gradient(circle at top right, var(--pastel-blue-light) 0%, transparent 40%),
                radial-gradient(circle at bottom left, var(--pastel-pink-light) 0%, transparent 40%);
    padding-top: 120px;
}
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-text h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
.hero-text p { font-size: 1.2rem; margin-bottom: 2rem; color: var(--text-light); }
.hero-cta { display: flex; gap: 1rem; }

.hero-blob {
    width: 85%; margin: 0 auto; aspect-ratio: 1; 
    background-color: var(--pastel-purple);
    border: 6px solid var(--pastel-blue-dark); 
    border-radius: 60% 40% 50% 50% / 40% 50% 50% 60%;
    overflow: hidden; box-shadow: var(--shadow-soft);
    animation: morph 8s ease-in-out infinite;
}
.hero-blob .bg-video { width: 100%; height: 100%; object-fit: cover; display: block; object-position: center bottom; }

@keyframes morph {
    0% { border-radius: 60% 40% 50% 50% / 40% 50% 50% 60%; }
    50% { border-radius: 40% 60% 40% 60% / 50% 40% 60% 50%; }
    100% { border-radius: 60% 40% 50% 50% / 40% 50% 50% 60%; }
}

#about { padding: 100px 0; background-color: white; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-img-wrapper { display: flex; justify-content: center; align-items: center; }

.about-blob {
    width: 100%; max-width: 480px; aspect-ratio: 1;
    background-color: var(--pastel-pink-light);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    box-shadow: var(--shadow-soft);
    animation: morphCreative 10s ease-in-out infinite alternate;
    display: flex; align-items: center; justify-content: center; padding: 2.5rem; margin-top: 3rem; 
}
.about-blob .bg-video-small {
    width: 100%; height: 100%; object-fit: cover; object-position: center center; 
    border-radius: 30% 70% 50% 50% / 50% 50% 70% 50%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    animation: morphCreative 8s ease-in-out infinite reverse;
}

@keyframes morphCreative {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    50% { border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%; }
    100% { border-radius: 30% 70% 50% 50% / 60% 40% 50% 60%; }
}
.about-text h2 { font-size: 3.5rem; color: var(--pastel-blue-dark); }

#categories { padding: 100px 0; background-color: var(--bg-main); position: relative; }
#categories h2 { font-size: 3.5rem; }
.subtitle-poppins { font-family: var(--font-body); font-size: 1.2rem; color: var(--text-light); }

.thread-bg {
    position: absolute; top: 5%; left: 0; width: 100%; height: 90%;
    z-index: 0; opacity: 0.6; pointer-events: none;
}
.thread-bg path, .thread-horizontal path { stroke-dasharray: 12; animation: sewThread 2s linear infinite; }
@keyframes sewThread { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }

.category-row { display: flex; align-items: center; gap: 4rem; margin-bottom: 6rem; position: relative; z-index: 2; }
.category-row.reverse { flex-direction: row-reverse; }

/* Nuovo Carousel in Dissolvenza (Fade) */
.category-visual {
    flex: 1; position: relative; overflow: hidden;
    box-shadow: var(--shadow-soft); aspect-ratio: 4/3;
    background-color: var(--pastel-purple);
}
.category-visual img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 0.8s ease-in-out;
    z-index: 0;
}
.category-visual img.active {
    opacity: 1; z-index: 1;
}

.creative-shape { border-radius: 50% 50% 40% 60% / 60% 40% 50% 50%; }
.creative-shape-2 { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
.creative-shape-3 { border-radius: 60% 40% 50% 50% / 40% 50% 50% 60%; }
.creative-shape-4 { border-radius: 40% 60% 30% 70% / 50% 60% 40% 50%; }

.category-text { flex: 1; padding: 2rem 0; background: rgba(255,249,251,0.8); border-radius: 20px; }
.category-text h3 { font-size: 2.5rem; color: var(--text-dark); margin-bottom: 1rem; }
.category-flex-content { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.category-flex-content p { flex: 1; font-size: 1.15rem; color: var(--text-light); margin: 0; }
.price-action-box { text-align: right; min-width: 170px; }
.product-price { font-family: var(--font-body); color: var(--pastel-pink-dark); font-size: 1.6rem; font-weight: 700; margin-bottom: 0.5rem; }

.bg-soft-pink { background-color: #FFF2F6; }
#partiamo-assieme { padding: 100px 0; overflow: hidden; }
#partiamo-assieme h2 { font-size: 3.5rem; }

.craft-desk { display: flex; flex-wrap: wrap; justify-content: center; gap: 3rem; padding: 3rem 0; position: relative; }
.thread-horizontal { position: absolute; top: 50%; left: 0; width: 100%; height: 50%; z-index: 0; opacity: 0.5; pointer-events: none; transform: translateY(-50%); }

.polaroid-wrapper { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.polaroid-number { font-family: var(--font-accent); font-size: 3rem; color: var(--pastel-blue-dark); margin-bottom: 5px; z-index: 5; position: relative; text-shadow: 2px 2px 5px rgba(255,255,255,0.8); }

.craft-card {
    background: #ffffff; padding: 1rem 1rem 2rem 1rem; border-radius: 5px; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 260px; position: relative; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.craft-card::before {
    content: ''; position: absolute; top: -12px; left: 50%;
    transform: translateX(-50%) rotate(-3deg); width: 70px; height: 25px;
    background: rgba(255, 200, 221, 0.7); box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    backdrop-filter: blur(2px); border-radius: 2px; z-index: 2;
}
.polaroid-wrapper:nth-child(2) .craft-card { transform: rotate(-4deg); }
.polaroid-wrapper:nth-child(3) .craft-card { transform: rotate(3deg) translateY(10px); }
.polaroid-wrapper:nth-child(4) .craft-card { transform: rotate(-2deg); }
.polaroid-wrapper:nth-child(5) .craft-card { transform: rotate(5deg) translateY(20px); }

.card-image-placeholder { height: 180px; display: flex; align-items: center; justify-content: center; border-radius: 3px; margin-bottom: 1.5rem; box-shadow: inset 0 2px 10px rgba(0,0,0,0.05); }
.card-image-placeholder img { width: 80px; height: 80px; object-fit: contain; }
.card-caption h3 { font-family: var(--font-accent); font-size: 2rem; color: var(--pastel-blue-dark); margin-bottom: 0.5rem; }
.card-caption p { font-size: 0.95rem; color: var(--text-dark); margin: 0; }

footer { background-color: white; padding: 80px 0 30px; border-top: 1px solid var(--pastel-pink-light); position: relative; }
.social-pills-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-bottom: 4rem; max-width: 900px; margin-left: auto; margin-right: auto; }
.social-pill { display: flex; align-items: center; gap: 15px; background: var(--bg-main); padding: 15px 30px; border-radius: 50px; text-decoration: none; box-shadow: 0 5px 15px rgba(0,0,0,0.04); transition: var(--transition); border: 2px solid transparent; }
.social-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.social-icon img { width: 100%; height: 100%; object-fit: contain; }
.social-name { font-size: 1.2rem; font-weight: 600; color: var(--text-dark); }
.copyright { text-align: center; padding-top: 30px; border-top: 1px solid #ddd; color: var(--text-light); font-size: 0.95rem; }
.privacy-container { margin-top: 10px; }
.privacy-link { display: inline-block; color: var(--pastel-blue-dark); text-decoration: underline; font-size: 0.9rem; transition: var(--transition); }
.design-by { text-align: center; margin-top: 50px; }
.design-by img { height: 130px; max-width: 100%; transition: var(--transition); }

.btt-btn { position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; z-index: 9999; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.4s ease; background: none; box-shadow: none; padding: 0; border-radius: 0; }
.btt-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
.btt-btn img { width: 45px; height: auto; margin-bottom: 5px; }
.btt-btn span { font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; color: var(--pastel-pink-dark); text-transform: uppercase; letter-spacing: 1px; }

.fade-section { opacity: 0; transform: translateY(60px); transition: opacity 1.2s cubic-bezier(0.25, 0.8, 0.25, 1), transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1); }
.fade-section.is-visible { opacity: 1; transform: translateY(0); }

/* --- HOVER EFFECTS SOLO SU DESKTOP (Esclude dispositivi touch/mobile) --- */
@media (hover: hover) {
    .nav-links a:hover { color: var(--pastel-pink-dark); }
    .btn-primary:hover { background-color: #ff9cbd; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(255, 175, 204, 0.6); }
    .btn-secondary:hover { background-color: var(--pastel-pink-light); color: white; border-color: var(--pastel-pink-light); transform: translateY(-3px); }
    .craft-card:hover { transform: translateY(-15px) rotate(0deg) scale(1.05); z-index: 10; box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
    .social-pill:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); border-color: var(--pastel-pink-light); background: white; }
    .privacy-link:hover { color: var(--pastel-pink-dark); }
    .design-by img:hover { transform: scale(1.05); }
    .btt-btn:hover { transform: translateY(-5px); }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .hero-text h1 { font-size: 3.5rem; }
    .hero-content, .about-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-cta { justify-content: center; }
    .hero-blob { width: 100%; max-width: 400px; }
    .about-blob { max-width: 400px; margin: 0 auto; }
    .category-row, .category-row.reverse { flex-direction: column; gap: 2rem; text-align: center; margin-bottom: 4rem; }
    .category-visual { width: 100%; max-width: 600px; margin: 0 auto; aspect-ratio: 1; }
    .category-flex-content { flex-direction: column; gap: 1rem; }
    .price-action-box { text-align: center; }
    .thread-bg, .thread-horizontal { display: none; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; z-index: 1001; position: relative; }
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-links { 
        position: fixed; top: 0; left: -100%; width: 100vw; height: 100vh; 
        background-color: var(--bg-main); flex-direction: column; align-items: center; 
        justify-content: center; padding: 0; box-shadow: none; transition: left 0.4s ease-in-out; z-index: 999; 
    }
    .nav-links.active { left: 0; }
    .nav-links a { margin-bottom: 2rem; font-size: 1.8rem; }
    
    .mobile-design-by { display: block; position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); }
    .mobile-design-by img { height: 50px; }
    
    .craft-desk { flex-direction: column; align-items: stretch; padding: 0 20px; gap: 1.5rem; }
    .polaroid-wrapper { flex-direction: row; align-items: flex-start; justify-content: flex-start; margin-bottom: 0; }
    .polaroid-wrapper:nth-child(n) .craft-card { transform: none; }
    .polaroid-number { font-size: 1.8rem; margin: 0; line-height: 1; margin-top: 5px; }
    
    .craft-card { display: flex; flex-direction: row; width: 100%; background: none; box-shadow: none; padding: 0; align-items: center; gap: 15px; }
    .craft-card::before { display: none; }
    .card-image-placeholder { width: 60px; height: 60px; min-width: 60px; margin: 0; border-radius: 8px; box-shadow: inset 0 2px 8px rgba(0,0,0,0.08); }
    .card-image-placeholder img { width: 35px; height: 35px; }
    .card-caption { text-align: left; }
    .card-caption h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
    .card-caption p { font-size: 0.9rem; margin: 0; }
    
    .social-pills-grid { flex-direction: column; padding: 0 20px; }
    .social-pill { justify-content: center; }

    .btt-btn { bottom: 15px; right: 15px; padding: 0; }
    .btt-btn img { width: 35px; }
    .btt-btn span { font-size: 0.65rem; }
    .design-by img { height: 90px; }
}

@media (max-width: 576px) {
    .hero-text h1 { font-size: 2.8rem; }
    .hero-cta { flex-direction: column; }
}