/*
Theme Name: suddesign
Theme URI: http://suddesign.it
Description: Tema figlio di Twenty Twenty-Five personalizzato per suddesign.
Author: Francesco Sommacal
Template: twentytwentyfive
Version: 1.0.0
*/

/* ==========================================================================
   1. GENERAL & NAVIGATION
   ========================================================================== */

header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: transparent;
    mix-blend-mode: difference;
    filter: invert(1);
    color: #000000 !important;
}

/* Rimuove l'outline di focus dai blocchi per un design più pulito */
:where(.wp-site-blocks :focus) {
    outline: none !important;
}

body {
    background: #ededed;
    color: #2c2c2c;
    transition: background 0.6s ease, color 0.6s ease;
}

p, a, h1, h2, h3, h4, h5, h6, .wp-block-heading {
    transition: color 0.4s ease;
}

.wp-block-button__link {
    transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* ==========================================================================
   2. DARK MODE & SVG EFFECTS
   ========================================================================== */

body.dark-mode {
    background: #2c2c2c;
    color: #ededed;
}

body.dark-mode :is(h1, h2, h3, h4, h5, h6, .wp-block-heading) {
    color: #ededed;
}

body.dark-mode .wp-block-button__link {
    background: #ededed;
    color: #2c2c2c;
}

.img-svg {
    transition: filter 0.4s ease;
}

body.dark-mode .img-svg {
    filter: invert(1);
}

#occhio {
    width: 100%;
    height: auto;
}

#occhio path {
    transform-origin: center;
    will-change: transform;
}

/* ==========================================================================
   3. HOME - ANIMATIONS & COMPASS
   ========================================================================== */

.compass-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: auto;
    aspect-ratio: 1/1;
}

.compass-base, .compass-needle {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
}

.compass-needle {
    transform-origin: 50% 50%;
    will-change: transform;
}

/* Parallax Area */
.parallax-area {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: auto;
    aspect-ratio: 16/9;
}

.parallax-item {
    position: absolute;
    width: 30%;
    max-width: 100%;
    height: auto;
    will-change: transform;
    transition: transform 0.2s ease-out;
    border-radius: 6px;
}

/* Posizionamento Foto */
.p1 { top: 5%; left: -10%; }
.p2 { top: 25%; left: 20%; }
.p3 { top: -15%; left: 60%; }
.p4 { top: 15%; left: 36%; }
.p5 { top: -5%; left: -5%; }
.p6 { top: -20%; left: 30%; }
.p7 { top: 3%; left: 70%; }
.p8 { top: 5%; left: 50%; }
.p9 { top: -30%; left: -25%; width: 100% !important; }

/* Pulse Animation */
.wp-block-group.contatto {
    position: relative;
    overflow: visible;
}

.cerchio-bg {
    position: absolute !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: #ffffff;
    animation: pulse 6s ease-in-out infinite;
    z-index: -1 !important;
}

.wp-block-group.contatto > * {
    position: relative;
    z-index: 1 !important;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* ==========================================================================
   4. SERVIZI & STACKING METHOD
   ========================================================================== */

/* Method Stacking Section */
.method-wrapper {
    position: relative;
    padding: 0px 20px;
}

.method-step {
    position: sticky;
    top: 300px;
    background: #ededed;
    padding: 60px 40px;
    margin-bottom: 300px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.4s ease, transform 1.4s ease;
}

.method-step.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ordinamento Z-index per lo stacking */
.method-step:nth-child(1) { z-index: 1; }
.method-step:nth-child(2) { z-index: 2; }
.method-step:nth-child(3) { z-index: 3; }
.method-step:nth-child(4) { z-index: 4; }
.method-step:nth-child(5) { z-index: 5; }

/* ==========================================================================
   5. FOOTER, 404 & LOGO
   ========================================================================== */

.logo-lungo { margin: 0 !important; }

/* 404 Rotation */
.rotazione {
    animation: spin 0.2s linear infinite;
}

@keyframes spin {
    0%, 100% { transform: rotate(10deg); }
    50% { transform: rotate(13deg); }
}

/* ==========================================================================
   6. RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */

@media (max-width: 1024px) {
    .cerchio-bg { width: 250px; height: 250px; }
}

@media (max-width: 781px) {
    /* Layout */
    .colonna { display: none; }
    .colonnatre { flex-basis: 50% !important; }
    .spazio90 { height: 90px !important; }
    .spazio140 { height: 140px !important; }
    .centered, .centered-footer { text-align: center !important; }
    .centered-footer { flex-basis: 100% !important; display: block !important; }

    /* Logo & Elementi */
    .cerchio-bg { width: 150px; height: 150px; }
    
    /* Parallax & Images Mobile */
    .parallax-item { width: 60% !important; }
    .p9 { top: -23%; left: 20% !important; }
    .scroll-img { height: 80% !important; }
    
    /* Spazi Colonne */
    .foto-prodotto, .foto-grafica { padding: 0 !important; }

    /* Reverse Column Mobile */
    .reverse-mobile {
        display: flex;
        flex-direction: column;
    }
    .reverse-mobile > .wp-block-column:first-child { order: 2; }
    .reverse-mobile > .wp-block-column:last-child { order: 1; }
}