/* ponzio.it — Stile materico brutalista */

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Spectral', serif;
    color: #1A1A1A;
    background: #F4F1EA;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* Noise overlay */
.noise-overlay { position: relative; }
.noise-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.3'/%3E%3C/svg%3E");
    opacity: 0.12;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}
.noise-overlay > * { position: relative; z-index: 2; }

/* Ombra materica */
.ombra-materica {
    box-shadow: 12px 12px 0 rgba(0,0,0,0.08), 24px 24px 0 rgba(0,0,0,0.04);
}

/* Bordo irregolare */
.bordo-irregolare {
    clip-path: polygon(0% 0%, 100% 0%, 100% 97%, 95% 100%, 90% 98%, 85% 100%, 0% 100%);
}

/* Link brutale */
.link-brutale {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    border: 3px solid currentColor;
    padding: 14px 32px;
    position: relative;
    overflow: hidden;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.link-brutale::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #B7410E;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}
.link-brutale:hover::before { transform: scaleX(1); }
.link-brutale-light { color: #F4F1EA; border-color: #F4F1EA; }
.link-brutale-light:hover { color: #F4F1EA; }
.link-brutale-dark { color: #1A1A1A; border-color: #1A1A1A; }
.link-brutale-dark:hover { color: #F4F1EA; }

/* Tag materiale */
.tag-materiale {
    display: inline-block;
    border: 1px solid currentColor;
    padding: 4px 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    margin: 2px;
    opacity: 0.6;
}

/* Puntini placeholder */
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.punto-pulse {
    width: 12px; height: 12px; border-radius: 50%;
    background: #B7410E; display: inline-block;
}
.punto-pulse:nth-child(1) { animation: pulse 1.5s infinite 0s; }
.punto-pulse:nth-child(2) { animation: pulse 1.5s infinite 0.5s; }
.punto-pulse:nth-child(3) { animation: pulse 1.5s infinite 1s; }

/* Barra finale */
.barra-ruggine { height: 8px; background: #B7410E; width: 100%; }

/* Focus visible */
:focus-visible { outline: 3px solid #B7410E; outline-offset: 3px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Mobile overlap fix */
@media (max-width: 767px) {
    .overlap-offset { transform: none !important; }
}

/* Switch lingua */
.lang-switch {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 50;
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(244, 241, 234, 0.15);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.lang-switch:hover {
    background: rgba(26, 26, 26, 0.85);
    border-color: rgba(244, 241, 234, 0.3);
}
.lang-switch img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.lang-switch span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: #F4F1EA;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
