:root{
    --ease-gentle: cubic-bezier(.25,.46,.45,.94);
    --ease-soft: cubic-bezier(.22,.61,.36,1);
    --ease-supersoft: cubic-bezier(.18,.72,.12,1);
    --gap: 5px;

    --lbBlur: 0px;
    --lbDim: rgba(0,0,0,.52);
    --lbArrow: #5D6030;
    --lbClose: #ffffff;
    --lbBtnSize: clamp(72px, 10vw, 150px);
    --lbIconSize: clamp(40px, 6vw, 90px);
    --lbW: 900px;
    --lbH: 600px;

    --sat: 0px;
    --sar: 0px;
    --sab: 0px;
    --sal: 0px;

    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: "Calvino", serif;

    font-family: var(--font-sans);
    font-weight: 400;
}

/* Calvino */
@font-face{ font-family:"Calvino"; font-style:normal; font-weight:300; font-display:swap; src:url("fonts/Calvino-Light.woff2") format("woff2"); }
@font-face{ font-family:"Calvino"; font-style:italic; font-weight:400; font-display:swap; src:url("fonts/Calvino-Extralight-Italic.woff2") format("woff2"); }

html{ font-size:100%; scroll-behavior:smooth; font-synthesis:none; }
*, *::before, *::after{ box-sizing:border-box; }

html, body{ overscroll-behavior-y: none; min-height:100%; }

body{
    margin:0;
    padding:0;
    background:#f4f3f2;
    color:#111;
    line-height:1.2;
    overflow-x:hidden;
    font-family: var(--font-sans);
    font-weight:400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.lb-open{ overflow:hidden; }
::selection{ color:#fff; background:#000; }

img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
figure{ margin:0; }

h1,h2,h3,h4,h5,h6{ margin:0 0 .75rem; font-weight:400; letter-spacing:-0.02em; }
h1{ font-size:clamp(2.8rem, 6vw, 4.5rem); line-height:1.02; }
h2{ font-size:clamp(1.4rem, 3.2vw, 2.1rem); line-height:1.15; }
p{ margin:0 0 .9rem; font-size:clamp(.9rem, 1.4vw, 1.05rem); line-height:1.4; }

/* ===== HEADER ===== */
.header{
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 9999;
    padding: 2rem;
    background: transparent;
    isolation: isolate;
    backdrop-filter: blur(0px);
    pointer-events: auto;
}

.header::before{
    content:"";
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.65);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    transition: opacity 320ms ease-in-out;
    pointer-events: none;
}

.header.is-glass::before{
    opacity: 1;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(12px);
}

.header.is-glass .menu-row{ mix-blend-mode: normal; }
.header.is-glass .brand a,
.header.is-glass .nav-links li,
.header.is-glass .lang-switch,
.header.is-glass .nav_toggle{
    color:#111;
}
.header.is-glass .nav-links li,
.header.is-glass .lang-switch{
    mix-blend-mode: normal;
}

body.overlay-open .header::before{
    opacity: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.overlay-open .header .menu-row{ mix-blend-mode: normal; }
body.overlay-open .header .brand a,
body.overlay-open .header .nav-links li,
body.overlay-open .header .lang-switch,
body.overlay-open .header .nav_toggle{
    color:#fff;
}



.menu-row{
    position:relative;
    z-index:1;
    pointer-events:auto;
    display:flex;
    align-items:center;
    gap:2rem;
    width:100%;
    mix-blend-mode:exclusion;
    --brand-size: 2rem;
}

.brand{
    flex:0 0 auto;
    font-size: var(--brand-size);
    font-family: var(--font-display);
    font-weight:300;
}

.brand a{ color:#fff; white-space:nowrap; }

.right-controls{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:2.5rem;
    min-width:0;
    font-family: var(--font-display);
    font-size:2rem;
    font-weight:300;
}

.navbar-desktop{ flex:0 1 auto; }

.lang-switch{ margin-left: .5rem; }

@media (min-width:901px){
    .lang-switch{ margin-left: clamp(2rem, 12vw, 20rem); }
}

.nav-links{
    display:flex;
    gap:1.5rem;
    list-style:none;
    padding:0;
    margin:0;
    text-transform:lowercase;
    justify-content:center;
    font-size:2rem;
    font-family: var(--font-display);
    font-weight:300;
}

.nav-links li{
    color:#fff;
    mix-blend-mode:difference;
    will-change:filter, opacity, transform;
    font-size:2rem;
    font-family: var(--font-display);
    font-weight:300;
}

.lang-switch{
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    font-size:2rem;
    color:#fff;
    mix-blend-mode:difference;
    font-family: var(--font-display);
    letter-spacing:-0.01em;
    text-transform: lowercase;
}

.lang-switch a{
    opacity:.45;
    transition: opacity .2s var(--ease-gentle);
}

.lang-switch a.is-active{ opacity:1; }

.lang-switch--menu{
    display:none;
    mix-blend-mode:normal;
    font-size:2rem;
    letter-spacing:.06em;
    text-transform: lowercase;
    margin-top:3rem;
    gap:1.2rem;
    line-height:1.1;
}

#mb_nav .lang-switch--menu a{
    color:#fff;
    opacity:0;
    filter:blur(18px);
    display:inline-block;
    will-change:filter, opacity;
}

#mb_nav .lang-switch--menu span{
    color:rgba(255,255,255,.6);
    opacity:0;
    filter:blur(18px);
    will-change:filter, opacity;
}

@media (hover:hover){
    .lang-switch:hover a{
        opacity:.35;
        filter: blur(3px);
    }
    .lang-switch:hover a:hover{
        opacity:1;
        filter: blur(0px);
    }
}

@media (hover:hover){
    .navbar-desktop .nav-links{ pointer-events:none; }
    .navbar-desktop .nav-links > li{ pointer-events:auto; }
    .navbar-desktop .nav-links > li{
        transition:
            filter .28s var(--ease-gentle),
            opacity .28s var(--ease-gentle),
            transform .28s var(--ease-gentle);
    }
    .navbar-desktop .nav-links:hover > li{
        filter: blur(3px);
        opacity: .38;
    }
    .navbar-desktop .nav-links:hover > li:hover{
        filter: blur(0px);
        opacity: 1;
        transform: translateY(-2px);
    }
}

.nav_toggle{
    font-size: var(--brand-size);
    font-family: var(--font-display);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.02em;
    color:#fff;
    white-space:nowrap;
    border: none;
    background:transparent;
    padding:0;
    cursor:pointer;
    display:none;
}

/* ===== HERO ===== */
.hero{
    position:fixed;
    inset:0;
    width:100%;
    height:100svh;
    height:100dvh;
    height: calc(var(--vh, 1vh) * 100);
    min-height: calc(var(--vh, 1vh) * 100);
    display:grid;
    place-items:center;
    padding-top: var(--sat);
    padding-bottom: var(--sab);
    overflow:hidden;
    z-index:0;
    touch-action: pan-y;
}

.hero-img{
    position:absolute;
    left:50%;
    top:50%;
    width:100%;
    height:100%;
    transform: translate(-50%,-50%) scale(1);
    object-fit:cover;
    z-index:0;
    will-change: transform, opacity;
    backface-visibility: hidden;
    filter: none;
    opacity: 1;
    max-width:none;
    pointer-events: none;
}

@media (min-width: 901px){
    .hero-img{ width:calc(100% + 200px); height:calc(100% + 200px); }
}

.hero-content{
    position:relative;
    z-index:1;
    text-align:center;
    max-width:100%;
    padding-inline:1.5rem;
}

.hero-content h1,
.hero-content h2{
    font-size:clamp(2.4rem, 3.2vw, 4.5rem);
    font-family: var(--font-display);
    margin-bottom:1.25rem;
    color:#fff;
    font-weight:300;
    text-wrap: balance;
}

.hero-content .desktop{ display:block; }
.hero-content .mobile{ display:none; }
.hero-content .mobile span{
    display:block;
    max-width: 28ch;
    margin-inline: auto;
}

.button{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.5rem;
    padding:.85rem 1.4rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius:999px;
    cursor:pointer;
    font-size:clamp(.8rem, 1.2vw, .95rem);
    color:#fff;
    min-width:44px;
    min-height:44px;
    transition:
        transform .2s ease-in-out,
        border-color .2s var(--ease-gentle),
        background-color .2s var(--ease-gentle);
    user-select:none;
    touch-action:manipulation;
}

.button::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;
    background:rgba(255,255,255,.1);
    backdrop-filter:blur(10px);
    z-index:-1;
    transition:background .2s var(--ease-gentle);
}

@media (hover:hover){
    .button:hover{ transform:translateY(-2px); }
    .button:hover::before{ background:rgba(255,255,255,.22); }
}

.hero .contatti{
    position:absolute;
    left:calc(2rem + var(--sal));
    right:calc(2rem + var(--sar));
    bottom:calc(2rem + var(--sab));
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    color:#fff;
    z-index:1;
    transition:opacity .3s var(--ease-gentle);
    font-size:2rem;
    font-family: var(--font-display);
    font-weight:300;
}

.contatti2{
    position:absolute;
    left:calc(2rem + var(--sal));
    right:calc(2rem + var(--sar));
    bottom:calc(2rem + var(--sab));
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    color:#fff;
    z-index:1;
    transition:opacity .3s var(--ease-gentle);
    font-size:clamp(1rem, 1.3vw, 1.5rem);
    font-family: var(--font-display);
    font-weight:300;
}

.hero-spacer{
    height:100svh;
    height:100dvh;
    height: calc(var(--vh, 1vh) * 100);
}

/* ===== PORTFOLIO ===== */
#portfolio{
    position:relative;
    z-index:2;
    background:#f4f3f2;
    margin-top:0;
    scroll-margin-top: calc(140px + var(--sat));
}

.work{
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
}

.info{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    color:#FBFBF9;
}

.text-xxl{
    font-size:clamp(7rem, 19vw, 18rem);
    margin:0;
    font-family: var(--font-display);
    font-weight:300;
    letter-spacing:-.015em;
    line-height:.72;
    color: #5D6030;
}

/* ===== MARQUEE ===== */
.marquee__wrapper{
    overflow:hidden;
    padding-top:4%;
    display:flex;
    justify-content:flex-start;
    padding-bottom: 4%;
}

.marquee__inner{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    will-change:transform;
}

.marquee{
    display:inline-flex;
    white-space:nowrap;
    width:100%;
    justify-content:center;
    padding-right:5vw;
    will-change:transform;
}

.text-xxl.marquee-line{
    display: inline-flex;
    align-items: center;
    gap: .35em;
    white-space: nowrap;
}

.marquee-icon,
.marquee-icon2{
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 auto;
    display: inline-block;
    padding-bottom: 0.5rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transform: translateY(.02em);
}

.marquee-icon{ background-image: url("svg/marque/marque1.svg"); }
.marquee-icon2{ background-image: url("svg/marque/marque2.svg"); }

/* ===== FILTRI ===== */
.work-filter{
    display:flex;
    gap:3rem;
    justify-content:center;
    flex-wrap:wrap;
    padding-top:2%;
    padding-bottom:3%;
    display: none;
}

.filter-btn{
    font-size:clamp(1rem, 1.3vw, 1.8rem);
    font-family: var(--font-display);
    padding:2rem;
    background:transparent;
    color: #BCBCBC;
    cursor:pointer;
    border: none;
    align-items: start;
    transition: color .2s var(--ease-gentle), filter .2s var(--ease-gentle), opacity .2s var(--ease-gentle);
}

.filter-btn.is-active{ color:black; }
.filter-btn:hover,
.filter-btn:focus-visible{ color:#5D6030; }
.filter-btn.is-active:hover,
.filter-btn.is-active:focus-visible{ color:#5D6030; }

/* ===== MASONRY (CSS columns) ===== */
.gallery-full{
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
    padding:var(--gap) 0;
}

.gallery-masonry{
    column-count:3;
    column-gap:var(--gap);
    font-size:0;
}

.gallery-item{
    display:inline-block;
    width:100%;
    margin:0 0 var(--gap);
    break-inside:avoid;
    background:#e6e6e6;
    cursor:zoom-in;
    vertical-align:top;
    outline:none;
    opacity:1;
    filter:none;
    transform:none;
    pointer-events:auto;
}

.gallery-item img{ width:100%; height:auto; display:block; }

/* ===== LIGHTBOX ===== */
.lightbox{
    position: fixed;
    inset: 0;
    z-index: 10050;
    visibility: hidden;
    pointer-events: none;
}

.lightbox.is-open{
    visibility: visible;
    pointer-events: auto;
}

.lb-blur{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.001);
    backdrop-filter: blur(var(--lbBlur));
    -webkit-backdrop-filter: blur(var(--lbBlur));
    transform: translateZ(0);
}

.lb-dim{
    position: fixed;
    inset: 0;
    background: var(--lbDim);
    opacity: 0;
    will-change: opacity;
    transition: opacity .22s var(--ease-gentle);
}

.lightbox.is-open .lb-dim{ opacity: 1; }

.lb-stage{
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    z-index: 10055;
}

.lb-figure{
    width: var(--lbW);
    max-width: 92vw;
    display: grid;
    grid-template-rows: auto auto;
    gap: 14px;
    align-items: center;
    justify-items: stretch;
}

.lb-canvas{
    position: relative;
    width: var(--lbW);
    height: var(--lbH);
    max-width: 92vw;
    max-height: 80vh;
    touch-action: pan-y;
}

.lb-img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: translateZ(0);
    will-change: opacity, transform;
    -webkit-user-drag: none;
    user-select: none;
}

.lb-front{ opacity: 1; }

.lb-info{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 0;
    min-height: 2.4em;
    color: #fff;
    font-size: clamp(.8rem, 1.2vw, .95rem);
    text-shadow: 0 2px 12px rgba(0,0,0,.45);
}

.lb-info .lb-name,
.lb-info .lb-desc{
    flex: 1 1 0;
    min-width: 0;
    line-height: 1.25;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.lb-info .lb-name{ text-align: left; padding-right: 8px; }
.lb-info .lb-desc{ opacity: .92; text-align: right; padding-left: 8px; }

.italic{ font-family: var(--font-display); font-style: italic; }

.lb-btn{
    position: fixed;
    z-index: 10060;
    border: 0;
    background: rgba(255,255,255,0);
    width: var(--lbBtnSize);
    height: var(--lbBtnSize);
    display: grid;
    place-items: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform .18s var(--ease-gentle),
    background .18s var(--ease-gentle);
}

.lb-btn:active{ transform: scale(.97); }

.lb-close{ top:16px; right:16px; }
.lb-prev{ top:50%; left:16px; transform:translateY(-50%); }
.lb-next{ top:50%; right:16px; transform:translateY(-50%); }

.lb-close{ color: var(--lbClose); }

.lb-icon-img{
    width: var(--lbIconSize);
    height: var(--lbIconSize);
    display: block;
    pointer-events: none;
}

@media (hover: hover){
    .lb-btn:hover{
        background: rgba(255,255,255,0);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    .lb-prev:hover{ transform:translateY(-50%) scale(1.03); }
    .lb-next:hover{ transform:translateY(-50%) scale(1.03); }
    .lb-close:hover{ transform:scale(1.03); }
}

.lb-btn:focus{ outline: none; }
.lb-btn:focus-visible{
    outline: 3px solid rgba(255,255,255,.85);
    outline-offset: 4px;
}

.lb-prev, .lb-next{ color: var(--lbArrow); }

@media (hover: none) and (pointer: coarse){
    .lb-prev, .lb-next{ display: none !important; }

    :root{
        --lbBtnSize: 64px;
        --lbIconSize: 34px;
    }

    .lb-close{ top: 10px; right: 10px; }
    .lb-stage{ padding: 12px; }
}

@media (max-width:700px){
    .lb-info{ flex-direction: column; gap: 10px; min-height: 0; }
    .lb-info .lb-desc{ text-align: left; padding-left: 0; }
    .lb-info .lb-name{ padding-right: 0; }
}

@media (min-width: 375px) and (max-width: 430px){
    .lb-figure{ width: 80vw; max-width: 80vw; place-self: center; margin-inline: auto; }
    .lb-canvas{ width: 100%; max-width: 80vw; }
}

/* ===== MOBILE MENU (overlay) ===== */
#mb_nav.nav{
    position:fixed;
    inset:0;
    height:100dvh;
    min-height:100svh;
    width:100vw;
    display:none;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    padding:2rem;
    gap:1.25rem;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    backdrop-filter:blur(40px);
    -webkit-backdrop-filter: blur(40px);
    background:rgba(0,0,0,.24);
    z-index:9990;
}

#mb_nav.nav ul{
    list-style:none;
    padding:0;
    margin:0;
    text-align:center;
    display:grid;
    gap:.65rem;
    z-index:1;
    font-size:4rem;
    font-family: var(--font-display);
}

.nav__link{
    color:#fff;
    opacity:0;
    filter:blur(18px);
    display:inline-block;
    will-change:filter, opacity;
}

#mb_nav .ct-link{
    color:#fff;
    text-decoration:none;
    opacity:0;
    filter:blur(18px);
    display:inline-block;
    will-change:filter, opacity, transform;
}

body.overlay-open .hero .contatti{ opacity:0; pointer-events:none; }

.is-hidden{ display:none !important; }

/* ===== FOOTER ===== */
.site-footer{
    position:relative;
    z-index:10;
    color:#fff;
    min-height:75vh;
    padding:2rem;
    overflow:hidden;
    background-color: #5D6030;
    display:grid;
    grid-template-columns:1fr 1fr;
    grid-template-rows:auto 1fr auto;
    grid-template-areas:
        "copy    social"
        "center  center"
        "credits toTop";
    align-items:start;
    scroll-margin-top:140px;
}

.site-footer > *{ position:relative; z-index:1; }


.footer-copy,
.footer-social,
.footer-to-top,
.footer-credits,
.footer-subtitle{
    font-family: var(--font-sans);
    font-weight: 400;
    letter-spacing: 0;
}

.footer-copy{
    grid-area:copy;
    align-self:start;
    justify-self:start;
    font-size: clamp(1rem, 1.35vw, 6rem);
    white-space:nowrap;
    opacity:.92;
}

.footer-social{
    grid-area:social;
    padding-top:20px;
    gap:2rem;
    flex-wrap:wrap;
    font-size: clamp(1rem, 1.35vw, 1.15rem);
}

.footer-center{
    grid-area:center;
    align-self:center;
    justify-self:center;
    text-align:center;
    padding-inline:1.5rem;
}

.footer-cta-image{
    display:block;
    margin: 0 auto 1.4rem;
    width: clamp(120px, 22vw, 240px);
    height: auto;
    opacity: .95;
    pointer-events:none;
    user-select:none;
}

.footer-cta{
    margin:0;
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 6.4vw, 5.4rem);
    line-height:1.03;
    letter-spacing:-0.02em;
    font-weight:300;
}

.footer-cta__link{
    color:inherit;
    text-decoration:none;
    display:inline-block;
    will-change: filter, opacity, transform;
    transition: filter .28s var(--ease-gentle),
    opacity .28s var(--ease-gentle),
    transform .28s var(--ease-gentle);
    font-weight:300;
}

@media (hover:hover){
    .footer-cta__link:hover{
        filter: blur(3px);
        opacity: .38;
        transform: translateY(-2px);
    }
}

.footer-cta__link:focus-visible{
    outline:2px solid currentColor;
    outline-offset:10px;
    border-radius:999px;
}

.footer-subtitle{
    margin:.9rem 0 0;
    font-size: clamp(1.05rem, 1.45vw, 1.2rem);
    line-height:1.4;
    max-width:62ch;
    color:inherit;
    text-decoration:none;
    opacity:.88;
    display:inline-block;
    transition: opacity .2s var(--ease-gentle);
}

@media (hover:hover){
    .footer-subtitle:hover{ opacity: 1; }
}

.footer-subtitle:focus-visible{
    outline:2px solid rgba(255,255,255,.65);
    outline-offset:4px;
    border-radius:6px;
}

.footer-to-top{
    grid-area:toTop;
    justify-self:end;
    align-self:end;
    font-size: clamp(1rem, 1.35vw, 1.15rem);
    white-space:nowrap;
    color:inherit;
    text-decoration:none;
    border-bottom:0;
    padding-bottom:0;
    display:inline-block;
    will-change: filter, opacity, transform;
    transition: filter .25s var(--ease-gentle),
    opacity .25s var(--ease-gentle);
}

.footer-credits{
    grid-area:credits;
    justify-self:start;
    align-self:end;
    text-align:left;
    font-size: clamp(.95rem, 1.2vw, 1.1rem);
    line-height:1.35;
    opacity:.85;
    max-width:52ch;
}

.footer-credits .credit-name{ font-family: var(--font-display); }

.footer-credits a{
    color:inherit;
    text-decoration:none;
}

.footer-sep{
    margin: 0 .5rem;
    opacity:.6;
}

/* ===== LEGAL ===== */
.legal{
    position:relative;
    z-index:2;
    background:#f4f3f2;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
    padding: calc(8rem + var(--sat)) 2rem 3rem;
}

.legal-inner{
    max-width:72ch;
    margin:0 auto;
    display:grid;
    gap:1rem;
}

.legal h1{
    font-family: var(--font-display);
    color:#5D6030;
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    margin:0 0 1rem;
}

.legal h2{
    font-family: var(--font-display);
    color:#5D6030;
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    margin:1.4rem 0 .35rem;
}

.legal p,
.legal li{
    font-family: var(--font-sans);
    color: rgba(17,17,17,.75);
    line-height:1.6;
    font-size: clamp(1rem, 1.4vw, 1.1rem);
}

.legal ul{ padding-left: 1.2rem; margin:0; }
.legal a{ color:inherit; text-decoration:underline; }

.footer-social a,
.footer-to-top{
    color:inherit;
    text-decoration:none;
    border-bottom:0;
    padding-bottom:0;
    display:inline-block;
    will-change: filter, opacity, transform;
    transition: filter .25s var(--ease-gentle),
    opacity .25s var(--ease-gentle);
}

@media (hover:hover){
    .footer-social a:not(.is-composed):hover,
    .footer-to-top:not(.is-composed):hover{
        filter: blur(3px);
        opacity: .8;
    }
}

.footer-social a.is-composed,
.footer-to-top.is-composed{
    filter: blur(0px) !important;
    opacity: 1 !important;
}

.footer-social a:focus-visible,
.footer-to-top:focus-visible{
    outline:2px solid rgba(255,255,255,.65);
    outline-offset:4px;
    border-radius:6px;
}

/* ===== 404 ===== */
.page-404-body{
    background:#5D6030;
    color:#fff;
}

.page-404{
    min-height:100svh;
    min-height:100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
    display:flex;
    flex-direction:column;
    padding: calc(7rem + var(--sat)) 1.5rem calc(3rem + var(--sab));
    text-align:center;
    overflow:hidden;
    position:relative;
}

.page-404 .marquee__wrapper{
    padding-top:0;
    padding-bottom:0;
}

.page-404-birds{
    position:absolute;
    inset:0;
    pointer-events:none;
    z-index:0;
    overflow:visible;
}

.page-404-birds .bird-wrap{
    position:absolute;
    left:0;
    top:0;
    opacity: 1;
    will-change: transform;
}

.page-404-birds .bird{
    width: clamp(52px, 10vw, 140px);
    height:auto;
    filter: brightness(0) invert(1);
    animation: birdFlap var(--bird-flap, 1.6s) ease-in-out infinite;
    transform-origin: center;
    will-change: transform;
}

.page-404-marquee{
    width:100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top:auto;
    padding-bottom: calc(0.6rem + var(--sab));
}

.page-404 .marquee__inner{
    justify-content:flex-start;
    width:100%;
}

.page-404 .marquee{
    width: max-content;
    display:inline-flex;
    align-items:center;
    justify-content:flex-start;
    white-space: nowrap;
    animation: marquee404 22s linear infinite;
    will-change: transform;
}

.page-404 .marquee-group{
    display:inline-flex;
    align-items:center;
    gap:.3em;
    padding-right: clamp(2rem, 8vw, 6rem);
    flex: 0 0 auto;
    min-width: max-content;
}

.page-404 .text-xxl{
    color:#f8f7f4;
    font-size: clamp(7rem, 19vw, 18rem);
    line-height:.72;
    letter-spacing:-.015em;
    font-weight:300;
}

.page-404 .marquee-icon,
.page-404 .marquee-icon2{
    filter: brightness(0) invert(1);
}

@keyframes birdFlap{
    0%, 100%{
        transform: scale(var(--bird-scale, 1)) rotate(calc(var(--bird-rot, 0deg) + var(--bird-rot-dyn, 0deg)));
    }
    50%{
        transform: scale(var(--bird-scale-min, 0.96)) rotate(calc(var(--bird-rot, 3deg) + var(--bird-rot-dyn, 0deg)));
    }
}

@keyframes marquee404{
    from{ transform: translateX(0); }
    to{ transform: translateX(calc(-1 * var(--marquee-shift, 50%))); }
}

.page-404-content{
    display:grid;
    gap:1rem;
    justify-items:center;
    flex:1;
    align-content:start;
    padding-top: clamp(1rem, 10vh, 8rem);
    position:relative;
    z-index:1;
}

.page-404 h1{
    font-family: var(--font-display);
    font-weight:300;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    margin:0;
}

.page-404 p{
    font-size: clamp(1rem, 2.4vw, 1.4rem);
    color: rgba(255,255,255,.88);
    margin:0;
    max-width: 34rem;
}

.page-404-actions{
    display:flex;
    gap:1rem;
    justify-content:center;
    flex-wrap:wrap;
    margin-top:.5rem;
}

.page-404-actions .button{
    background-color: rgba(255,255,255,0.18);
}

.page-404-marquee{
    position:relative;
    z-index:1;
}
.page-404-body .menu-row{
    mix-blend-mode: normal;
}

.page-404-body .brand a,
.page-404-body .lang-switch{
    color:#fff;
}

.page-404-body .lang-switch{
    mix-blend-mode: normal;
}

/* ===== ABOUT ===== */
.about-hero{
    position: relative;
    min-height: 100svh;
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: grid;
    place-items: center;
    padding: calc(clamp(7rem, 12vh, 10rem) + var(--sat)) 1.5rem calc(4rem + var(--sab));
    overflow: hidden;
    color: #fff;
    background-image: url("images/hero/about.webp");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.about-hero-inner{
    position: relative;
    z-index: 1;
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    justify-items: center;
    text-align: center;
}

.about-hero-h2{
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.2vw, 3.6rem);
    line-height: 1.05;
    margin: 0;
    font-weight:300;
}

.about-hero-mid{
    width: min(520px, 82vw);
    height: auto;
    display: block;
    border-radius: 18px;
}

.h2-full{
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 2rem;
}

.h2-full h2{
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.2rem);
    color: #5D6030;
    margin: 0;
    text-align: left;
    text-wrap: balance;
    font-weight:300;
}

#about{
    position:relative;
    z-index:2;
    background:#f4f3f2;
    scroll-margin-top: calc(140px + var(--sat));
}

.about-grid4{
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(2rem, 4vw, 5rem);
    font-family: var(--font-sans);
    color: #111;
    background: transparent;
}

.about-col-title{
    margin: 0 0 2rem;
    font-weight: 700;
    font-size: clamp(1.15rem, 1.55vw, 1.45rem);
    line-height: 1.25;
    color: #5D6030;
}

.about-paragraph{
    margin: 0;
    font-weight: 400;
    padding-top: 1rem;
    font-size: clamp(1rem, 1.45vw, 1.1rem);
    line-height: 1.55;
    color: rgba(17,17,17,.55);
}

.about-paragraph em{
    font-weight: 300;
    font-style: italic;
    color: rgba(17,17,17,.55);
}

.about-item{ margin: 0 0 2.25rem; }

.about-item-title{
    margin: 0;
    font-weight: 700;
    font-size: clamp(1.15rem, 1.55vw, 1.45rem);
    line-height: 1.25;
    color: #5D6030;
}

.about-item-sub{
    margin: .15rem 0 0;
    font-weight: 400;
    font-size: clamp(1.1rem, 1.45vw, 1.35rem);
    line-height: 1.25;
    color: rgba(17,17,17,.70);
}

.about-item-meta{
    margin: .35rem 0 0;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 1.25vw, 1.15rem);
    line-height: 1.25;
    color: rgba(17,17,17,.55);
}

.about-col > .about-item:last-child{ margin-bottom: 0; }

/* ===== Safe area ===== */
@supports(padding: max(0px)){
    :root{
        --sat: max(env(safe-area-inset-top), 0px);
        --sar: max(env(safe-area-inset-right), 0px);
        --sab: max(env(safe-area-inset-bottom), 0px);
        --sal: max(env(safe-area-inset-left), 0px);
    }

    .header{ padding-top: calc(2rem + var(--sat)); padding-left: calc(2rem + var(--sal)); padding-right: calc(2rem + var(--sar)); }
    #mb_nav.nav{ padding-top: calc(2rem + var(--sat)); padding-bottom: calc(2rem + var(--sab)); padding-left: calc(2rem + var(--sal)); padding-right: calc(2rem + var(--sar)); }
    .site-footer{ padding-bottom: calc(2rem + var(--sab)); }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce){
    .marquee__inner, .marquee{ animation: none !important; transform: none !important; }
    .gallery-item{ opacity:1 !important; filter:none !important; transform:none !important; transition:none !important; }
    .hero-img{ filter: blur(0px) !important; transition: none !important; }
    .page-404-birds .bird,
    .page-404-birds .bird-wrap{ animation: none !important; }
}

/* ===== Responsive ===== */
@media (max-width:1100px){
    .about-grid4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width:900px){
    .navbar-desktop{ display:none; }
    .nav_toggle{ display:inline-block; }
    .right-controls{ font-size:1rem; }
    .header .lang-switch{ display:inline-flex; }
    .lang-switch--menu{ display:inline-flex; }
    .menu-row{ mix-blend-mode: normal; }
    .nav-links li{ mix-blend-mode: normal; }
    .lang-switch{ mix-blend-mode: normal; }

    .gallery-masonry{ column-count:1; }

    .hero{
        position: fixed;
        inset: 0;
        height: 100svh;
        height: 100dvh;
        height: calc(var(--vh, 1vh) * 100);
        min-height: calc(var(--vh, 1vh) * 100);
    }
    .hero-img{ will-change: auto; }
    .hero-spacer{ display:block; height:100svh; height:100dvh; height: calc(var(--vh, 1vh) * 100); }
    .about-hero{ min-height: calc(var(--vh, 1vh) * 100); }

    .text-xxl{ font-size: 8rem; padding-top: 1.5rem; padding-bottom: 1.5rem; line-height: .82; }
}

@media (max-width:900px){
    .page-404-body .header .lang-switch{ display:inline-flex; }
    .page-404-body .right-controls{ gap: 1rem; }
}

@media (max-width:700px){
    .page-404-body .header .lang-switch{
        font-size: 1.3rem;
        line-height: 1;
    }
    .page-404-content{
        align-content:start;
        padding-top: clamp(1rem, 12vh, 5rem);
    }
    .page-404 .marquee{
        animation-duration: 28s;
    }
    .page-404 .marquee-group{
        padding-right: clamp(3rem, 16vw, 10rem);
        gap: .25em;
    }
    .page-404 .text-xxl{
        font-size: clamp(7.5rem, 26vw, 20rem);
    }
    .page-404-birds .bird{
        width: clamp(38px, 14vw, 110px);
    }
}

@media (max-width:700px){
    .header{ padding: 1rem 1rem; }
    .menu-row{ gap: 1rem; }
    .menu-row{ --brand-size: 1.3rem; }
    .right-controls{ gap: 1rem; font-size: 1.3rem; }
    .header .lang-switch{ display:none; }

    .hero-content .desktop{ display: none; }
    .hero-content .mobile{ display: block; }
    .hero-content .mobile span{ max-width: 24ch; }

    .h2-full{ padding: 1rem; }
    .about-grid4{ padding: 1rem; grid-template-columns: 1fr; gap: 2rem; }

    .hero-content{ padding-inline: 1rem; }
    .hero-content h1,
    .hero-content h2{ font-size: clamp(2rem, 7.2vw, 3rem); margin-bottom: 1rem; }

    .button{ font-size: .95rem; padding: .75rem 1rem; min-width: 44px; min-height: 44px; }
    .hero .button{
        background-color:#5D6030;
        color:#fff;
        border:1px solid rgba(255,255,255,.2);
        backdrop-filter:none;
        -webkit-backdrop-filter:none;
    }
    .hero .button::before{ background: rgba(255,255,255,.08); }

    .hero .contatti,
    .contatti2{
        left: calc(1rem + var(--sal));
        right: calc(1rem + var(--sar));
        bottom: calc(1rem + var(--sab));
        font-size: 1.3rem;
    }

    .work,
    .gallery-full,
    .h2-full{ margin-left: 0; margin-right: 0; width: 100%; }

    .gallery-full{ padding: 0; }

    #portfolio{ scroll-margin-top: calc(96px + var(--sat)); }

    .marquee__wrapper{ padding-top: 1.5rem; padding-bottom: 1.5rem; }

    .site-footer{
        min-height: auto;
        height: auto;
        padding: 2rem 1.4rem;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "copy    toTop"
            "center  center"
            "social  social"
            "credits credits";
        row-gap: 2rem;
        column-gap: 1.15rem;
        align-items: start;
    }

    .footer-copy{ justify-self:start; align-self:start; white-space:nowrap; }
    .footer-to-top{ justify-self:end; align-self:start; white-space:nowrap; }
    .footer-center{ justify-self:center; text-align:center; padding-top: 2rem; }
    .footer-cta-image{ width: 8rem; max-width: 70vw; }
    .footer-subtitle{ margin-bottom: 2rem; }
    .footer-social{ justify-self:center; gap: 1.6rem; padding-bottom: 2rem; }
    .footer-credits{ justify-self:center; text-align:center; margin-top:.15rem; }

    .about-paragraph{ font-size: 1.25rem; line-height: 1.6; }
    .about-item-title{ font-size: 1.35rem; }
    .about-item-sub{ font-size: 1.25rem; }
    .about-item-meta{ font-size: 1.1rem; }

    .legal{ padding: calc(7rem + var(--sat)) 1rem 2rem; }
}

@media (max-width:430px){
    #mb_nav.nav{ padding: 1.25rem; }
    #mb_nav.nav ul{ font-size: 3rem; gap: .75rem; }

    .footer-cta{ font-size: clamp(2.2rem, 9vw, 3.2rem); line-height: 1.05; }
    .footer-subtitle{ font-size: 1rem; max-width: 52ch; }
    .footer-copy,
    .footer-to-top{ font-size: .95rem; }
    .hero-content .mobile span{ max-width: 21ch; }
}

@media (max-width:360px){
    .header{ padding: 1rem 1rem; }
    .menu-row{ --brand-size: 1.2rem; }
    .hero .contatti{ font-size: 1rem; }
    .hero-content h1,
    .hero-content h2{ font-size: clamp(1.85rem, 8vw, 2.6rem); }
    .footer-cta{ font-size: clamp(2rem, 9vw, 2.8rem); }
    .lb-stage{ padding: 12px; }
}
