/* ===== RG Home Design — Boffi-inspired editorial light theme ===== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500&display=swap');

@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:300 700;font-display:swap;src:url(/fonts/space-grotesk-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:300 700;font-display:swap;src:url(/fonts/space-grotesk-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

* { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; -webkit-user-drag: none; user-select: none; }

:root {
    --bg: #ffffff;
    --bg-alt: #f5f5f5;
    --bg-card: #ffffff;
    --bg-elevated: #ececec;
    --text: #1a1a1a;
    --text-muted: #7a7a7a;
    --text-dim: #3a3a3a;
    --accent: #1a1a1a;
    --accent-soft: #7a7a7a;
    --wood: #8a5a35;
    --wood-soft: #b98b5e;
    --border: rgba(26,26,26,0.10);
    --border-strong: rgba(26,26,26,0.22);
    --sans: -apple-system, BlinkMacSystemFont, 'Söhne', 'Neue Haas Grotesk', 'Inter', 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
    --serif: -apple-system, BlinkMacSystemFont, 'Söhne', 'Neue Haas Grotesk', 'Inter', 'Helvetica Neue', sans-serif;
    --container: 1440px;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-weight: 300;
    letter-spacing: 0;
}
::selection { background: #111; color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    transition: background .3s ease;
}
.site-header.scrolled {
    background: #ffffff;
    border-bottom-color: var(--border);
}
.header-inner {
    max-width: none;
    margin: 0;
    padding: 0.5rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.8rem;
}
.brand { flex-shrink: 0; gap: 0.55rem; }
.brand-mark { width: 24px; height: 24px; }
.main-nav { flex-shrink: 0; gap: 1.8rem; margin-left: 3rem; }
.header-cta { margin-left: auto; flex-shrink: 0; }
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    transition: opacity .2s;
}
.brand:hover { opacity: 1; }
.brand:hover .brand-name { color: var(--wood); }
.brand:hover .brand-sub { color: var(--wood-soft); }
.brand-mark {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 0;
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand-name {
    font-family: var(--sans);
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
    line-height: 1.1;
}
.brand-sub {
    font-size: 0.58rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.1;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2.2rem;
    list-style: none;
}
.main-nav a {
    font-size: 0.78rem;
    color: var(--text);
    letter-spacing: 0;
    text-transform: none;
    padding: 0.3rem 0;
    position: relative;
    font-weight: 700;
    transition: opacity .25s;
}
.main-nav a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 1px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.main-nav a:hover { opacity: 0.55; }
.main-nav a.active::after { transform: scaleX(1); }

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: transparent;
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    transition: opacity .25s;
    border: 1px solid var(--text);
    border-radius: 999px;
}
.header-cta:hover { opacity: 0.6; }

/* ===== Site search ===== */
.nav-search { display: flex; align-items: center; }
.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: opacity .2s;
}
.search-btn:hover { opacity: 0.6; }
.search-btn svg { width: 18px; height: 18px; }
/* Su desktop la lente sta dentro .main-nav: questa e' la sua gemella mobile,
   che compare solo quando la nav principale e' nascosta. */
.search-btn--mobile { display: none; }
.search-panel {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 1.8rem 1.4rem 1.4rem;
}
.search-panel[hidden] { display: none; }
.search-panel-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 820px;
    margin: 0 auto;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-strong);
}
.search-panel-inner > svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-muted);
}
.search-input {
    flex: 1;
    min-width: 0;
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text);
    background: none;
    border: none;
    outline: none;
    padding: 0.2rem 0;
    -webkit-appearance: none;
    appearance: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    padding: 0 0.2rem;
    transition: color .2s;
}
.search-close:hover { color: var(--text); }
.search-results {
    max-width: 820px;
    margin: 0 auto;
    max-height: 58vh;
    overflow-y: auto;
}
.search-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: opacity .2s;
}
.search-result:hover { opacity: 0.55; }
.search-result-title {
    font-family: var(--sans);
    font-size: 0.92rem;
    font-weight: 500;
}
.search-result-cat {
    font-family: var(--sans);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
}
.search-empty {
    padding: 1.4rem 0;
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-weight: 300;
    font-size: 1.05rem;
    color: var(--text-muted);
}
.menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    background: none;
    border: none;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}
.menu-btn span {
    width: 22px; height: 1px; background: var(--text);
    transition: all .3s ease;
}
.menu-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav overlay — pannello a piena pagina con righe divise da filetti.
   L'header resta visibile sopra (z-index 100 contro 90): il burger diventa X
   e fa da pulsante di chiusura, come nei menu dei siti di arredamento. */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 90;
    display: none;
    flex-direction: column;
    padding: 4.4rem 0 2.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.mobile-nav.open { display: flex; }

.m-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
}
.m-nav-list--secondary { margin-top: 1.75rem; }

/* La riga e' sia <a> (voce diretta) sia <button> (voce che si apre):
   stessa resa visiva per entrambi. */
.m-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1.15rem 1.6rem;
    font-family: var(--sans);
    font-size: 1.02rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    color: var(--text);
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .2s ease;
}
.m-nav-row:active { background: var(--bg-alt); }

.m-nav-chev {
    width: 19px;
    height: 19px;
    flex: none;
    color: var(--text-muted);
    transition: transform .3s ease;
}
.m-nav-row[aria-expanded="true"] .m-nav-chev { transform: rotate(90deg); }

/* Sottovoci: altezza animata via JS (max-height calcolato sullo scrollHeight,
   cosi' funziona anche sui Safari che non interpolano grid-template-rows). */
.m-nav-sub {
    max-height: 0;
    overflow: hidden;
    background: var(--bg-alt);
    transition: max-height .3s ease;
}
.m-nav-sub a {
    display: block;
    padding: 0.85rem 1.6rem 0.85rem 2.7rem;
    font-family: var(--sans);
    font-size: 0.94rem;
    font-weight: 400;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}
.m-nav-sub a:last-child { border-bottom: none; }

.m-nav-foot { padding: 1.9rem 1.6rem 0; }
.m-nav-cta {
    display: block;
    padding: 1rem 1.5rem;
    text-align: center;
    background: var(--text);
    color: #fff;
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: 999px;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-top: 6rem;
    overflow: hidden;
    background: var(--bg);
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to top, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.1) 45%, rgba(0,0,0,0) 100%);
}
.hero-inner {
    position: relative;
    z-index: 1;
    max-width: none;
    margin: 0;
    padding: 3rem 2.2rem 5rem;
    width: 100%;
    color: #fff;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1.8rem;
    font-weight: 500;
    opacity: 0.9;
}
.hero-eyebrow::before {
    content: '';
    display: inline-block;
    width: 2.5rem;
    height: 1px;
    background: #fff;
    border-radius: 0;
    animation: none;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.hero-title {
    font-family: var(--sans);
    font-size: clamp(2.4rem, 5.2vw, 4.6rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1.6rem;
    max-width: 22ch;
    color: #fff;
}
.hero-title em {
    font-style: italic;
    color: #fff;
    font-weight: 400;
}
.hero-desc {
    font-size: 1rem;
    max-width: 52ch;
    color: rgba(255,255,255,0.92);
    margin-bottom: 2.4rem;
    line-height: 1.65;
    font-weight: 400;
}
.hero-actions {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 2rem;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    transition: all .3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary {
    background: #fff;
    color: var(--text);
    border-color: #fff;
}
.btn-primary:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.btn-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.65);
}
.btn-ghost:hover { border-color: #fff; background: #fff; color: var(--text); }
.btn-text {
    background: transparent;
    color: var(--text);
    padding: 1rem 0;
    position: relative;
    border: none;
}
.btn-text::after {
    content: '';
    position: absolute;
    bottom: 0.7rem;
    left: 0; right: 0;
    height: 1px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .4s ease;
}
.btn-text:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.btn-arrow {
    width: 14px; height: 14px;
    transition: transform .3s ease;
}
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-dark {
    background: var(--text);
    color: #fff;
    border: 1px solid var(--text);
}
.btn-dark:hover { background: transparent; color: var(--text); }

/* ===== Section common ===== */
.section {
    padding: 8rem 2.2rem;
    max-width: none;
    margin: 0;
}
.section-alt { background: var(--bg-alt); max-width: none; }
.section-alt > .section-inner {
    max-width: none;
    margin: 0;
    padding: 8rem 2.2rem;
}
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-weight: 500;
}
.section-title {
    font-family: var(--sans);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1.4rem;
    color: var(--text);
    max-width: 24ch;
}
.section-title em {
    font-style: italic;
    color: var(--text);
    font-weight: 400;
}
.section-intro {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 60ch;
    line-height: 1.7;
    margin-bottom: 4rem;
    font-weight: 400;
}

/* ===== Categories grid (home) ===== */
.categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem 2.2rem;
}
.category-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: auto;
    background: transparent;
    display: block;
    color: var(--text);
    border: none;
    transition: none;
}
.category-card:hover { border-color: transparent; }
.category-card > img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: opacity .5s ease;
}
.category-card:hover > img { opacity: 0.85; transform: none; }
.category-card::after { display: none; }
.category-content {
    position: static;
    padding: 1.6rem 0 0;
    z-index: 1;
}
.category-name {
    font-family: var(--sans);
    font-size: clamp(1.2rem, 1.6vw, 1.4rem);
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 0.55rem;
    color: var(--text);
    letter-spacing: 0.02em;
}
.category-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
    line-height: 1.55;
    max-width: 46ch;
    font-weight: 400;
}
.category-link {
    font-size: 0.68rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--text);
    transition: opacity .25s;
    font-weight: 500;
}
.category-card:hover .category-link { opacity: 0.6; }

/* ===== Filosofia (2-col text) ===== */
.filosofia {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}
.filosofia-media {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg-alt);
}
.filosofia-media img { width: 100%; height: 100%; object-fit: cover; }
.fullwidth-photo { width: 100%; overflow: hidden; }
.fullwidth-photo img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: cover; object-position: center; }
.filosofia-text .section-title { margin-bottom: 2rem; }
.filosofia-text p {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1.1rem;
    font-weight: 400;
}
.filosofia-text p:last-of-type { margin-bottom: 2rem; }
.filosofia-sign {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-family: var(--sans);
    font-style: italic;
    font-weight: 400;
    font-size: 1.15rem;
    color: var(--text);
}
.filosofia-sign span {
    font-family: var(--sans);
    font-style: normal;
    font-size: 0.68rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-left: 1.2rem;
    border-left: 1px solid var(--border);
    font-weight: 500;
}

/* ===== Values row (clean stat band) ===== */
.values {
    background: var(--bg);
    color: var(--text);
    padding: 6rem 2.2rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.values-inner {
    max-width: none;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: left;
}
.value {
    padding: 0 2rem;
    border-left: 1px solid var(--border);
}
.value:first-child { border-left: none; padding-left: 0; }
.value-num {
    font-family: var(--sans);
    font-size: clamp(2.6rem, 4.5vw, 3.6rem);
    font-weight: 400;
    color: var(--text);
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.value-label {
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== Process steps ===== */
.process {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.process-step {
    background: transparent;
    padding: 2.6rem 2rem;
    border: none;
    border-left: 1px solid var(--border);
    transition: background .3s ease;
}
.process-step:first-child { border-left: none; }
.process-step:hover {
    background: var(--bg-alt);
    transform: none;
    border-color: var(--border);
}
.process-num {
    font-family: var(--sans);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1;
    margin-bottom: 1.6rem;
    font-weight: 500;
}
.process-step h3 {
    font-family: var(--sans);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.7rem;
    color: var(--text);
    letter-spacing: 0.01em;
}
.process-step p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 400;
}

/* ===== Gallery masonry ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}
.gallery-item {
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-alt);
    aspect-ratio: 4/5;
    display: block;
    border: none;
    transition: none;
}
.gallery-item:hover { border-color: transparent; }
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity .5s ease, transform .8s cubic-bezier(0.16,1,0.3,1);
}
.gallery-item:hover img { opacity: 0.9; transform: scale(1.02); }
.gallery-item.wide { grid-column: span 2; aspect-ratio: 8/5; }
.gallery-item.tall { grid-row: span 2; aspect-ratio: 4/10; }

/* ===== Contact form ===== */
.contact-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}
.contact-info h3 {
    font-family: var(--sans);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 0.8rem;
    margin-top: 2.4rem;
    color: var(--text-muted);
}
.contact-info h3:first-child { margin-top: 0; }
.contact-info p, .contact-info a {
    color: var(--text);
    line-height: 1.65;
    font-size: 1rem;
    font-weight: 400;
}
.contact-info a { color: var(--text); border-bottom: 1px solid var(--border-strong); transition: border-color .25s; }
.contact-info a:hover { border-color: var(--text); }
.contact-info .hours { margin-top: 0.5rem; }
.contact-info .hours-row {
    display: flex; justify-content: space-between;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
    font-weight: 400;
}
.contact-info .hours-row .day { color: var(--text-muted); }
.contact-info .hours-row .time { color: var(--text); font-weight: 500; }

.contact-form {
    background: transparent;
    padding: 0;
    border: none;
    border-top: 1px solid var(--text);
    padding-top: 2.5rem;
}
.contact-form h3 {
    font-family: var(--sans);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.01em;
}
.contact-form p.hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2.4rem;
    font-weight: 400;
}
.field {
    margin-bottom: 1.6rem;
}
.field label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
    font-weight: 500;
}
.field input, .field textarea, .field select {
    width: 100%;
    padding: 0.8rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-strong);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 400;
    transition: border-color .25s ease;
    border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--text);
}
.field textarea { min-height: 130px; resize: vertical; }
.field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(-45deg, transparent 50%, var(--text) 50%);
    background-position: calc(100% - 14px) 55%, calc(100% - 8px) 55%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2rem;
}
.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 1.8rem 0;
    line-height: 1.55;
    font-weight: 400;
}
.checkbox-field input { margin-top: 3px; accent-color: var(--text); }
.checkbox-field a { color: var(--text); border-bottom: 1px solid var(--text); }
.form-submit {
    width: 100%;
    padding: 1.15rem 2rem;
    background: var(--text);
    color: #fff;
    border: 1px solid var(--text);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    transition: background .3s ease, color .3s ease;
    cursor: pointer;
}
.form-submit:hover { background: transparent; color: var(--text); }

/* ===== Page hero (secondary pages) — Boffi-style centered ===== */
.page-hero {
    position: relative;
    padding: 6rem 2.2rem 3.5rem;
    background: #ffffff;
    border-top: 1px solid #d5d5d5;
    text-align: center;
}
.page-hero-inner {
    max-width: none;
    margin: 0;
}
.page-hero .section-eyebrow {
    text-align: left;
    display: block;
    font-size: 0.78rem;
    color: var(--wood);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 3rem;
    padding: 0;
}
.page-hero .section-eyebrow .crumb-parent { color: #b0b0b0; font-weight: 400; }
.page-hero h1 {
    font-family: var(--sans);
    font-size: 1.5rem;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0 0 1.6rem;
    color: #32373c;
    max-width: none;
}
.page-hero h1 em {
    font-family: var(--sans);
    font-style: normal;
    font-weight: 700;
    color: #32373c;
}
.page-hero p {
    max-width: none;
    margin: 0;
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-size: 1.75rem;
    line-height: 1.35;
    color: #32373c;
    font-weight: 300;
    letter-spacing: -0.005em;
    text-align: left;
}

/* ===== Portfolio grid (category pages) ===== */
.portfolio {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6rem 4.5rem;
    max-width: none;
    margin: 0;
}
.portfolio-item {
    overflow: hidden;
    background: transparent;
    aspect-ratio: auto;
    position: relative;
    cursor: pointer;
    display: block;
    border: none;
    transition: none;
}
.portfolio-item:hover { border-color: transparent; }
.portfolio-item > img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: opacity .5s ease;
}
.portfolio-item:hover > img { opacity: 0.9; transform: none; }
.portfolio-caption {
    position: static;
    padding: 0.45rem 0 0;
    background: none;
    color: #32373c;
}
.portfolio-caption h3 {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.84rem;
    margin-bottom: 0;
    color: #32373c;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.35;
}
.portfolio-caption p { display: none; }

/* Values cards on Chi Siamo */
.value-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.value-card {
    padding: 2.8rem 2.2rem;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    transition: background .3s ease;
}
.value-card:first-child { border-left: none; }
.value-card:hover { border-color: var(--border); transform: none; background: var(--bg-alt); }
.value-card h3 {
    font-family: var(--sans);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-weight: 500;
    letter-spacing: 0.01em;
}
.value-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 400;
}

/* ===== Footer ===== */
.site-footer {
    background: #ffffff;
    color: #32373c;
    padding: 5rem 2.2rem 2rem;
    border-top: 1px solid var(--border);
    font-weight: 600;
}
.footer-inner {
    max-width: none;
    margin: 0;
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
    gap: 4rem 2.5rem;
    padding-bottom: 4rem;
    align-items: start;
}
.footer-brand h4 {
    font-family: var(--sans);
    font-style: normal;
    font-size: 0.88rem;
    color: #32373c;
    margin-bottom: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.footer-brand .brand-sub {
    color: #32373c;
    margin-bottom: 1rem;
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.5;
}
.footer-brand p {
    font-size: 0.82rem;
    line-height: 1.55;
    max-width: 42ch;
    font-weight: 600;
    color: #32373c;
    margin: 0;
}
.footer-col h5 {
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #32373c;
    margin-bottom: 1.6rem;
    font-weight: 700;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a, .footer-col li {
    color: #32373c;
    font-size: 0.82rem;
    font-weight: 600;
    transition: opacity .2s;
    line-height: 1.5;
}
.footer-col a:hover { opacity: 0.55; }
.footer-bottom {
    max-width: none;
    margin: 0;
    padding-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    font-size: 0.8rem;
    color: #32373c;
    font-weight: 600;
    flex-wrap: wrap;
    border-top: none;
}
.social-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    order: -1;
    margin-right: auto;
}
.social-links a {
    width: auto; height: auto;
    border: none;
    color: #32373c;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0;
    transition: opacity .2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
}
.social-links a:hover {
    background: none;
    color: #32373c;
    opacity: 0.55;
}
.social-links svg { width: 14px; height: 14px; }

/* ===== WhatsApp FAB ===== */
.wa-fab {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    width: 54px; height: 54px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 80;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transition: transform .25s;
}
.wa-fab:hover { transform: scale(1.08); }
.wa-fab svg { width: 28px; height: 28px; fill: white; }

/* ===== Lightbox ===== */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(255,255,255,0.98);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    width: 44px; height: 44px;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: 1.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .25s, color .25s;
}
.lightbox-close:hover { background: var(--text); color: #fff; }

/* ===== Hero slider fade ===== */
.hero-bg[data-slider] { position: absolute; inset: 0; }
.hero-bg[data-slider] img {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
}
.hero-bg[data-slider] img.active { opacity: 1; }

/* ===== Mega-menu (dropdown from top-level nav items) ===== */
.main-nav .has-mega { position: static; }
/* Top-level nav item turns grey when its dropdown is open (matches Boffi's active-state behavior) */
.main-nav .has-mega.is-open > a { color: #b0b0b0; }
.mega-menu {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: #ffffff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.8rem 1.4rem 2rem;
    z-index: 90;
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
    pointer-events: none;
}
.has-mega.is-open .mega-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear 0s;
}
/* When switching from one mega to another, kill transitions so the swap is instant */
.main-nav.is-switching .mega-menu,
.main-nav.is-switching .mega-menu * {
    transition: none !important;
    animation: none !important;
}
/* Hide mega on mobile — mobile-nav takes over below 1024px */
@media (max-width: 1024px) {
    .mega-menu { display: none; }
}
.mega-inner {
    display: grid;
    grid-template-columns: 200px 1.1fr 2.1fr;
    gap: 2.5rem;
    max-width: none;
    margin: 0;
    align-items: start;
}
.mega-tabs, .mega-panel { list-style: none; margin: 0; padding: 0; }
.mega-tabs li { margin: 0 0 0.55rem 0; }
.mega-panel li { margin: 0 0 0.35rem 0; }
.mega-tabs a {
    display: block;
    color: #32373c;
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 300;
    letter-spacing: -0.005em;
    line-height: 1.35;
    text-transform: none;
    transition: color .2s, opacity .2s;
    padding: 0;
    cursor: pointer;
}
.mega-tabs a::after { display: none; }
.mega-tabs a.active { color: #b0b0b0; }
.mega-tabs a:hover { color: #b0b0b0; }
/* Panels: hidden by default, only .visible shows */
.mega-panels { position: relative; min-height: 180px; }
.mega-panel {
    display: none;
}
.mega-panel.visible {
    display: block;
    animation: mega-fade .25s ease;
}
@keyframes mega-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.mega-panel a {
    display: block;
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 300;
    color: #32373c;
    letter-spacing: -0.005em;
    line-height: 1.3;
    transition: opacity .2s;
    text-transform: none;
    padding: 0;
}
.mega-panel a::after { display: none; }
.mega-panel a:hover { opacity: 0.55; }
.mega-panel .mega-all {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 0.9rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border);
    display: block;
}
.mega-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 150px));
    gap: 0.8rem;
    justify-content: end;
}
.mega-tile {
    display: block;
    color: #32373c;
    text-decoration: none;
    padding: 0;
    font-size: inherit;
}
.mega-tile::after { display: none; }
.mega-tile img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: opacity .3s;
}
.mega-tile:hover img { opacity: 0.85; }
.mega-tile span {
    display: block;
    padding-top: 0.55rem;
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 300;
    color: #32373c;
    letter-spacing: -0.005em;
    text-transform: none;
    line-height: 1.3;
}

/* =====================================================
   ===== Boffi-style homepage layout (b-* namespace) =====
   ===================================================== */

.b-section {
    padding: 6rem 2.2rem;
    max-width: none;
    margin: 0;
    border-top: 1px solid var(--border);
}
.b-section--narrow { padding: 5rem 2.2rem; }
.b-section--alt { background: var(--bg-alt); }
/* No border on the section that immediately follows the hero */
.b-hero + .b-section { border-top: none; }
.b-heading-center {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 3rem;
}
.b-section-title {
    font-family: var(--sans);
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text);
    line-height: 1.4;
    margin: 0;
}
.b-heading-desc {
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-size: clamp(1.15rem, 1.4vw, 1.4rem);
    line-height: 1.35;
    color: var(--text);
    margin: 1.6rem auto 0;
    font-weight: 300;
    max-width: 820px;
    letter-spacing: -0.005em;
}
.b-link,
.b-btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    font-weight: 500;
    border: 1px solid var(--text);
    background: transparent;
    border-radius: 999px;
    transition: background .25s, color .25s;
}
.b-btn:hover,
.b-link:hover { background: var(--text); color: #fff; }
/* Hero overlay pill on dark image */
.b-hero-overlay .b-link {
    color: #fff;
    border-color: #fff;
}
.b-hero-overlay .b-link:hover { background: #fff; color: var(--text); }
/* Filled variant, for the primary action when two pills sit side by side */
.b-btn--solid { background: var(--text); color: #fff; }
.b-btn--solid:hover { background: transparent; color: var(--text); }
/* Big serif line sitting directly under a section title */
.b-heading-center .b-centered-text { margin-top: 1.2rem; }
.b-center-cta { text-align: center; margin-top: 2.8rem; }
/* Two calls to action on one centred row */
.b-center-cta--pair {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ---------- Hero ---------- */
.b-hero {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    background: #111;
    margin: 0;
}
.b-hero-slider {
    position: absolute; inset: 0;
    z-index: 0;
}
.b-hero-slider img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.6s ease-in-out;
    filter: contrast(1.06) saturate(1.08);
    image-rendering: high-quality;
    -ms-interpolation-mode: bicubic;
}
.b-hero-slider img.active { opacity: 1; }
.b-hero::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.04) 45%, rgba(0,0,0,0) 100%);
    z-index: 1;
    pointer-events: none;
}
.b-hero-overlay {
    position: absolute;
    left: 2.2rem;
    right: 2.2rem;
    bottom: 2.4rem;
    z-index: 2;
    max-width: none;
    color: #fff;
    transition: opacity .4s ease;
}
/* Caption is swapped while hidden, as the slide behind it crossfades */
.b-hero-overlay.is-fading { opacity: 0; }
.b-hero-eyebrow {
    display: block;
    font-family: var(--sans);
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    letter-spacing: -0.01em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1;
    color: #fff;
}
.b-hero-desc {
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-size: clamp(1.3rem, 1.6vw, 1.6rem);
    line-height: 1.3;
    margin-bottom: 1.8rem;
    max-width: none;
    color: #fff;
    font-weight: 300;
    letter-spacing: -0.005em;
}
.b-hero-overlay .b-link {
    color: #fff;
    border-bottom-color: #fff;
}
.b-hero-nav { display: contents; }
.b-hero-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px; height: 40px;
    background: transparent;
    border: none;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity .25s;
    cursor: pointer;
    padding: 0;
    opacity: 0.9;
}
.b-hero-nav button:hover { opacity: 1; }
.b-hero-nav .b-hero-prev { left: 1.4rem; }
.b-hero-nav .b-hero-next { right: 1.4rem; }
.b-hero-nav svg { width: 28px; height: 28px; stroke-width: 1; }

/* ---------- Horizontal scroller (continuous marquee) ---------- */
.b-scroller-wrap {
    position: relative;
    overflow: hidden;
    margin: 0 -2.2rem;
    padding: 0 2.2rem 0.5rem;
}
.b-scroller {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: b-scroll 60s linear infinite;
    will-change: transform;
}
.b-scroller-item {
    flex: 0 0 auto;
    width: calc((100vw - 2.2rem * 2 - 1rem * 3) / 4);
    display: block;
    color: var(--text);
}
@keyframes b-scroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}
.b-scroller-item img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    transition: opacity .5s ease;
}
.b-scroller-item:hover img { opacity: 0.85; }
.b-tile-caption {
    display: block;
    margin-top: 0.9rem;
    font-size: 0.82rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
    font-weight: 400;
}

/* ---------- Feature media (bottega) ---------- */
.b-feature {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #111;
}
/* Shorter cut, for when the photo sits inside a text section */
.b-feature--short { aspect-ratio: 2.6/1; margin-top: 3rem; }
.b-feature > img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: 50% 22%;
}
.b-feature-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 86px; height: 86px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .25s, transform .25s;
}
.b-feature-play:hover {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.06);
}
.b-feature-play svg { width: 26px; height: 26px; margin-left: 4px; }

/* ---------- Filosofia centered text ---------- */
.b-centered-text {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-size: clamp(1.3rem, 1.6vw, 1.55rem);
    line-height: 1.35;
    color: var(--text);
    font-weight: 300;
    letter-spacing: -0.005em;
}

/* ---------- Brand-tiles 3-col ---------- */
.b-brand-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.b-brand-tile {
    display: block;
    color: var(--text);
}
.b-brand-tile-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-alt);
}
.b-brand-tile-media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity .5s ease;
}
.b-brand-tile:hover .b-brand-tile-media img { opacity: 0.9; }
.b-brand-tile-media::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.42) 100%);
    z-index: 1;
}
.b-brand-tile-label {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: var(--sans);
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    z-index: 2;
    text-align: center;
    line-height: 1.05;
}
.b-brand-tile > .b-tile-caption {
    font-family: var(--sans);
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}
.b-brand-tile > .b-tile-caption {
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.55;
    padding-top: 1.2rem;
    margin-top: 0;
    max-width: 42ch;
}

/* ---------- Projects 2-col ---------- */
.b-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
}
.b-project {
    display: block;
    color: var(--text);
}
.b-project img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: opacity .5s ease;
}
.b-project:hover img { opacity: 0.88; }
.b-project-loc {
    display: block;
    padding-top: 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ---------- Catalog / Materiali 2-col ---------- */
.b-catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem 1rem;
    max-width: none;
    margin: 0;
}
.b-catalog-item {
    display: block;
    color: var(--text);
    text-align: left;
}
.b-catalog-cover {
    width: 100%;
    aspect-ratio: 3/4;
    background: #1a1a1a;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.14), 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow .35s ease, transform .35s ease;
}
.b-catalog-item:hover .b-catalog-cover {
    box-shadow: 0 14px 32px rgba(0,0,0,0.22), 0 2px 6px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}
/* Softly-blurred cover photo — hints at contents without competing with the number */
.b-catalog-cover img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(3px) brightness(0.78) saturate(1.05) contrast(1.02);
    transform: scale(1.06);
    z-index: 0;
}
/* Subtle darkening so the number stays legible */
.b-catalog-cover::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.28) 100%);
    z-index: 1;
}
.b-catalog-cover-big-num {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -52%);
    z-index: 2;
    font-family: var(--sans);
    font-size: clamp(4rem, 9vw, 7.5rem);
    font-weight: 300;
    line-height: 1;
    color: #fff;
    letter-spacing: -0.05em;
    user-select: none;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
/* Page-corner peel animation */
.b-catalog-cover::after {
    content: '';
    position: absolute;
    right: 0; bottom: 0;
    width: 28px; height: 28px;
    background:
        linear-gradient(135deg,
            transparent 0%,
            transparent 48%,
            rgba(255,255,255,0.35) 49%,
            #f5f2ea 55%,
            #ffffff 100%);
    box-shadow: -4px -4px 8px rgba(0,0,0,0.35);
    z-index: 4;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
    transition: width .55s cubic-bezier(0.16, 1, 0.3, 1),
                height .55s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.b-catalog-item:hover .b-catalog-cover::after {
    width: 96px;
    height: 96px;
}
/* Cover text elements */
.b-catalog-cover-num {
    position: absolute;
    top: 1.1rem;
    left: 1.2rem;
    z-index: 2;
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.72);
    font-weight: 500;
}
.b-catalog-cover-text {
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1.1rem;
    z-index: 2;
}
.b-catalog-cover-title {
    display: block;
    font-family: var(--sans);
    font-size: clamp(1.3rem, 1.8vw, 1.8rem);
    font-weight: 500;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 0.45rem;
}
.b-catalog-cover-line {
    display: block;
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.72);
    font-weight: 500;
    line-height: 1.4;
}
.b-catalog-name {
    display: block;
    padding-top: 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--text);
}
.b-catalog-sub {
    display: block;
    padding-top: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ---------- News 3-col ---------- */
.b-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}
.b-news-item { color: var(--text); }
.b-news-item img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    margin-bottom: 1.2rem;
}
.b-news-item h3 {
    font-family: var(--sans);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.9rem;
    color: var(--text);
    line-height: 1.35;
}
.b-news-item p {
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--text);
    font-weight: 300;
    letter-spacing: -0.005em;
}

/* ===== Contatti page (Boffi-style) ===== */
.c-page-head {
    padding: 5rem 2.2rem 3.5rem;
    background: var(--bg-alt);
    text-align: center;
    border-top: 1px solid #d5d5d5;
    border-bottom: 1px solid #d5d5d5;
}
.c-breadcrumb {
    text-align: left;
    font-size: 0.78rem;
    color: #32373c;
    font-weight: 600;
    margin-bottom: 3rem;
    letter-spacing: 0;
}
.c-page-title {
    font-family: var(--sans);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
    color: #32373c;
    line-height: 1.4;
    margin: 0 0 2rem;
}
.c-page-intro {
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-size: 1.35rem;
    line-height: 1.4;
    color: #32373c;
    font-weight: 300;
    letter-spacing: -0.005em;
}
.c-info-block {
    padding: 4rem 2.2rem;
    background: var(--bg-alt);
    border-bottom: 1px solid #d5d5d5;
}
.c-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
.c-info-col h4 {
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #32373c;
    margin-bottom: 1.2rem;
}
.c-info-col p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #32373c;
    font-weight: 400;
}
.c-info-col a {
    color: #32373c;
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.c-info-col a:hover { border-bottom-color: #32373c; }

/* Form block */
.c-form-block {
    padding: 5rem 2.2rem 4rem;
    background: #ffffff;
    border-bottom: 1px solid #d5d5d5;
}
.c-form-block .c-page-title {
    margin-bottom: 3rem;
    text-align: center;
}
.c-form {
    max-width: 1000px;
    margin: 0 auto;
}
.c-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
}
.c-field { position: relative; }
.c-field--full { grid-column: 1 / -1; }
.c-field label {
    display: block;
    font-size: 0.85rem;
    color: #32373c;
    font-weight: 400;
    margin-bottom: 0.4rem;
    letter-spacing: 0;
    text-transform: none;
}
.c-field input,
.c-field select,
.c-field textarea {
    width: 100%;
    padding: 0.6rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(50,55,60,0.35);
    color: #32373c;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 400;
    border-radius: 0;
    transition: border-color .25s;
}
.c-field input:focus,
.c-field select:focus,
.c-field textarea:focus {
    outline: none;
    border-bottom-color: #32373c;
}
.c-field textarea { min-height: 100px; resize: vertical; }
.c-field select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #32373c 50%),
        linear-gradient(-45deg, transparent 50%, #32373c 50%);
    background-position: calc(100% - 14px) 55%, calc(100% - 8px) 55%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2rem;
}
.c-form-note {
    margin-top: 2.5rem;
    font-size: 0.8rem;
    color: #32373c;
    font-weight: 400;
    letter-spacing: 0;
}
.c-form-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 1rem 0 2rem;
    font-size: 0.85rem;
    color: #32373c;
    line-height: 1.5;
    font-weight: 400;
}
.c-form-consent input { margin-top: 4px; accent-color: #32373c; flex-shrink: 0; }
.c-form-consent a {
    color: #32373c;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.c-form-submit {
    display: inline-block;
    padding: 0.85rem 2.2rem;
    background: transparent;
    color: #32373c;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid #32373c;
    border-radius: 999px;
    cursor: pointer;
    transition: background .25s, color .25s;
}
.c-form-submit:hover { background: #32373c; color: #fff; }

.c-privacy {
    padding: 4rem 2.2rem;
    background: var(--bg-alt);
    border-top: 1px solid #d5d5d5;
    border-bottom: 1px solid #d5d5d5;
}
.c-privacy-inner {
    max-width: 800px;
    margin: 0 auto;
}
.c-privacy h4 {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #32373c;
    margin-bottom: 1.2rem;
}
.c-privacy p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #32373c;
    font-weight: 400;
    margin-bottom: 0.9rem;
}
@media (max-width: 900px) {
    .c-info-grid { grid-template-columns: 1fr; gap: 2rem; }
    .c-form-grid { grid-template-columns: 1fr; }
    .c-page-head { padding: 5rem 1.6rem 2rem; }
    .c-info-block, .c-form-block, .c-privacy { padding-left: 1.6rem; padding-right: 1.6rem; }
    .c-page-intro { font-size: 1.1rem; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .main-nav, .header-cta { display: none; }
    /* Lente e burger vanno a fondo destra, affiancati: il margin-left auto
       sulla lente spinge la coppia contro il bordo. */
    .header-inner { gap: 0.2rem; }
    .search-btn--mobile { display: inline-flex; margin-left: auto; }
    .menu-btn { display: flex; margin-right: -12px; }
    .categories { grid-template-columns: 1fr; gap: 2.5rem; }
    .filosofia { grid-template-columns: 1fr; gap: 3rem; }
    .contact-block { grid-template-columns: 1fr; gap: 3rem; }
    .values-inner { grid-template-columns: 1fr 1fr; gap: 0; }
    .value { border-left: 1px solid var(--border); padding: 1.5rem 1.5rem; }
    .value:nth-child(odd) { border-left: none; padding-left: 0; }
    .value:nth-child(n+3) { border-top: 1px solid var(--border); padding-top: 2.5rem; margin-top: 1rem; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .portfolio { grid-template-columns: repeat(2, 1fr); gap: 4.5rem 3rem; }
    .process { grid-template-columns: 1fr 1fr; }
    .process-step:nth-child(1), .process-step:nth-child(2) { border-left: none; }
    .process-step:nth-child(2) { border-left: 1px solid var(--border); }
    .process-step:nth-child(n+3) { border-top: 1px solid var(--border); }
    .value-cards { grid-template-columns: 1fr; }
    .value-card { border-left: none; border-top: 1px solid var(--border); }
    .value-card:first-child { border-top: none; }
    .section, .section-alt > .section-inner { padding: 5rem 1.6rem; }
    .hero-inner { padding: 2rem 1.6rem 4rem; }
    .header-inner { padding: 0.9rem 1.6rem; }
    /* Boffi-style tablet */
    .b-section { padding: 5rem 1.6rem; }
    .b-scroller-wrap { margin: 0 -1.6rem; padding: 0 1.6rem 0.5rem; }
    .b-scroller-item { width: calc((100vw - 1.6rem * 2 - 1rem) / 2); }
    .b-brand-tiles { grid-template-columns: 1fr; gap: 2rem; }
    .b-news-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .b-feature { aspect-ratio: 16/10; }
    .b-feature--short { aspect-ratio: 2.2/1; }
    .b-hero-overlay { left: 1.6rem; bottom: 1.8rem; }
    .b-hero-nav { right: 1.6rem; bottom: 1.8rem; }
    .b-catalog-grid { max-width: none; }
}
@media (max-width: 640px) {
    .header-inner { padding: 0.9rem 1.2rem; gap: 1rem; }
    .brand-mark { width: 30px; height: 30px; }
    .brand-name { font-size: 0.85rem; }
    .brand-sub { font-size: 0.5rem; }
    .hero { min-height: 88vh; }
    .hero-inner { padding: 2rem 1.2rem 3.5rem; }
    .section, .section-alt > .section-inner { padding: 4rem 1.2rem; }
    .categories { gap: 2rem; }
    .category-content { padding: 1.2rem 0 0; }
    .values { padding: 3rem 1.2rem; }
    .values-inner { grid-template-columns: 1fr; }
    .value { border-left: none; padding: 1.6rem 0; border-top: 1px solid var(--border); }
    .value:first-child { border-top: none; padding-top: 0; }
    .value:nth-child(n+3) { border-top: 1px solid var(--border); padding-top: 1.6rem; margin-top: 0; }
    .value-num { font-size: 2.5rem; margin-bottom: 0.6rem; }
    .gallery { grid-template-columns: 1fr; gap: 0.8rem; }
    .gallery-item.wide, .gallery-item.tall { grid-column: auto; grid-row: auto; aspect-ratio: 4/5; }
    .portfolio { grid-template-columns: 1fr; gap: 4rem; }
    .process { grid-template-columns: 1fr; }
    .process-step { border-left: none !important; border-top: 1px solid var(--border); padding: 2rem 0; }
    .process-step:first-child { border-top: none; padding-top: 0; }
    .footer-inner { grid-template-columns: 1fr; gap: 2rem; padding-bottom: 2.5rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; padding-top: 1.6rem; }
    .page-hero { padding: 9rem 1.2rem 3.5rem; }
    .contact-form { padding-top: 2rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn { justify-content: center; }
    /* Boffi-style mobile */
    .b-section { padding: 4rem 1.2rem; }
    .b-scroller-wrap { margin: 0 -1.2rem; padding: 0 1.2rem 0.5rem; }
    .b-scroller-item { width: 78vw; }
    .b-hero { height: 82vh; min-height: 500px; }
    .b-hero-overlay { left: 1.2rem; bottom: 1.4rem; max-width: 82%; }
    .b-hero-nav { right: 1.2rem; bottom: 1.4rem; }
    .b-hero-nav button { width: 40px; height: 40px; }
    .b-projects-grid, .b-catalog-grid { grid-template-columns: 1fr; gap: 2rem; }
    .b-feature { aspect-ratio: 4/3; }
    .b-feature--short { aspect-ratio: 16/10; }
    .b-feature-play { width: 60px; height: 60px; }
    .b-feature-play svg { width: 20px; height: 20px; }
    .b-catalog-cover-title { font-size: 2rem; }
    .b-heading-center { margin-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
