/* style.css - Piccoenzo S.r.l. */
/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Montserrat', sans-serif;
}

body {
    background: #EDE8DC;
    color: #2a2018;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(140,22,22,0.05) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* Typography */
h1, h2, h3, .serif {
    font-family: 'Cormorant Garamond', serif;
}

/* Header fisso */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem 2.5rem;
    z-index: 10;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    background: rgba(237,232,220,0.92);
    backdrop-filter: blur(4px);
}

.header-brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(42,32,24,0.85);
}

.header-tagline {
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(42,32,24,0.6);
}

/* Hamburger Menu (solo mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 102;
    position: relative;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #2a2018;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.open {
    display: block;
    opacity: 1;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(85%, 300px);
    background: #F7F4EE;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 2rem 1.5rem;
    overflow-y: auto;
    z-index: 101;
}

.mobile-menu-overlay.open .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: rgba(42,32,24,0.6);
    padding: 0.5rem;
}

.mobile-menu-close:hover {
    color: #8c1618;
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2a2018;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background 0.2s;
}

.mobile-menu-item:hover {
    background: rgba(140,22,24,0.08);
}

.mobile-menu-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.mobile-monogram {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 600;
    color: #8c1618;
}

/* Logo Container */
.logo-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

/* Grid 3x3 */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 7px;
    width: 270px;
    height: 270px;
    background: transparent;
}

.sq {
    position: relative;
    background: #8c1618;
    cursor: pointer;
    transition: background 0.25s, transform 0.2s;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sq:not(.sq-center) {
    border-right: 5px solid #1a1a1a;
    border-bottom: 5px solid #1a1a1a;
}

.sq::after {
    content: attr(data-label);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0);
    background: rgba(80,8,8,0);
    transition: color 0.25s, background 0.25s;
    text-align: center;
    padding: 6px;
    line-height: 1.4;
}

.sq:hover {
    background: #a81c1e;
    transform: scale(1.04);
    z-index: 2;
}

.sq:hover::after {
    color: rgba(255,255,255,0.92);
    background: rgba(80,8,8,0.45);
}

.sq:active {
    transform: scale(0.97);
}

.sq-center {
    background: transparent;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sq-center:hover {
    background: #ede8dc;
    transform: scale(1.04);
    z-index: 2;
    opacity: 0.9;
}

.monogram {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.6rem;
    font-weight: 600;
    color: #1a0505;
    letter-spacing: -0.05em;
    line-height: 1;
    user-select: none;
}

.brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(42,32,24,0.92);
    text-align: center;
}

.brand-sub {
    font-size: 0.6rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(42,32,24,0.58);
    margin-top: 0.4rem;
    text-align: center;
}

.hint {
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(42,32,24,0.5);
    margin-top: 0.8rem;
    animation: blink 3s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    z-index: 10;
    background: rgba(237,232,220,0.8);
    backdrop-filter: blur(2px);
}

footer p {
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(42,32,24,0.5);
    text-align: center;
}

/* Overlay laterale (destra) */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s;
}

.overlay.open {
    pointer-events: all;
    opacity: 1;
}

.overlay-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    cursor: pointer;
}

.panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(620px, 100vw);
    background: #F7F4EE;
    color: #1a1208;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.overlay.open .panel {
    transform: translateX(0);
}

.panel-header {
    padding: 2.5rem 2.5rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
}

.panel-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    font-weight: 300;
    color: rgba(140,22,24,0.12);
    line-height: 1;
    flex-shrink: 0;
}

.panel-title-wrap {
    flex: 1;
}

.panel-label {
    font-size: 0.58rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #8c1618;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.panel-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #1a0505;
    line-height: 1.2;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(26,5,5,0.35);
    font-size: 1.6rem;
    padding: 0.2rem;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.close-btn:hover {
    color: #8c1618;
}

.panel-body {
    padding: 2rem 2.5rem 3rem;
    flex: 1;
    font-family: 'Cormorant Garamond', serif;
}

.panel-body p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    line-height: 1.85;
    color: #3a2a1a;
    margin-bottom: 1rem;
    font-weight: 400;
    text-align: justify;
    hyphens: auto;
}

.panel-body p strong {
    font-weight: 600;
    color: #1a0505;
}

.panel-body p em {
    font-size: 1.05rem;
    color: #8c1618;
    font-style: italic;
}

.panel-body h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #8c1618;
    margin: 1.8rem 0 0.7rem;
    letter-spacing: 0.04em;
}

.panel-body ul {
    list-style: none;
    padding: 0;
    margin-bottom: 0.5rem;
}

.panel-body ul li {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #3a2a1a;
    font-weight: 400;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    text-align: justify;
}

.panel-body ul li::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #8c1618;
    border-radius: 50%;
    margin-top: 0.6rem;
    flex-shrink: 0;
}

.contact-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    flex-wrap: wrap;
}

.contact-lbl {
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8c1618;
    font-weight: 500;
    min-width: 90px;
    flex-shrink: 0;
}

.contact-val {
    font-size: 0.86rem;
    color: #1a0505;
    font-weight: 300;
    word-break: break-word;
}

.contact-val a {
    color: #8c1618;
    text-decoration: none;
}

.contact-val a:hover {
    text-decoration: underline;
}

.red-line {
    width: 2.5rem;
    height: 2px;
    background: #8c1618;
    margin: 0.8rem 0 1.6rem;
}

.panel-note {
    font-size: 0.8rem;
    color: #7a6a5a;
    font-style: italic;
    line-height: 1.7;
    margin-top: 1.2rem;
}

/* Seal Overlay (centrale) */
.seal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.seal-overlay.open {
    pointer-events: all;
    opacity: 1;
}

.seal-bg {
    position: absolute;
    inset: 0;
    background: rgba(237,232,220,0.88);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.seal-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.seal-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: rgba(42,32,24,0.4);
    transition: color 0.2s;
}

.seal-close:hover {
    color: rgba(140,22,24,0.7);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    header {
        padding: 1rem 1.2rem;
    }
    
    .header-tagline {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .logo-grid {
        width: 216px;
        height: 216px;
        gap: 5px;
    }
    
    .monogram {
        font-size: 2rem;
    }
    
    .brand-name {
        font-size: 1.2rem;
        letter-spacing: 0.2em;
    }
    
    .brand-sub {
        font-size: 0.55rem;
        letter-spacing: 0.2em;
    }
    
    .hint {
        font-size: 0.5rem;
    }
    
    .panel-header {
        padding: 1.5rem 1.2rem 1rem;
    }
    
    .panel-body {
        padding: 1.2rem 1.2rem 2rem;
    }
    
    .panel-title {
        font-size: 1.5rem;
    }
    
    .panel-number {
        font-size: 3rem;
    }
    
    footer p {
        font-size: 0.5rem;
        letter-spacing: 0.15em;
    }
    
    .contact-row {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .contact-lbl {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .logo-grid {
        width: 180px;
        height: 180px;
        gap: 4px;
    }
    
    .sq::after {
        font-size: 0.45rem;
    }
    
    .monogram {
        font-size: 1.6rem;
    }
}

/* Logo image per quadrato centrale */
.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Logo image per menu mobile */
.mobile-logo-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    display: block;
}