/* ==========================================================================
   FONT LOCALI WB_26_portfolio (override dei path relativi di WB_24/css/style.css)
   ========================================================================== */
@font-face {
    font-family: 'Space Grotesk';
    src: url('../assets/font/space_grotesk/static/SpaceGrotesk-Regular.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('../assets/font/space_grotesk/static/SpaceGrotesk-SemiBold.ttf') format('truetype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('../assets/font/space_grotesk/static/SpaceGrotesk-Bold.ttf') format('truetype');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../assets/font/outfit/Outfit/static/Outfit-Light.ttf') format('truetype');
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../assets/font/outfit/Outfit/static/Outfit-Regular.ttf') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../assets/font/outfit/Outfit/static/Outfit-Medium.ttf') format('truetype');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../assets/font/outfit/Outfit/static/Outfit-SemiBold.ttf') format('truetype');
    font-weight: 600; font-style: normal; font-display: swap;
}

/* ==========================================================================
   ESTENSIONE PORTFOLIO SU DESIGN SYSTEM NATIVO DI WB_24/css/style.css
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

/* Rimuove la griglia di sfondo nativa di WB_24 solo nella pagina Portfolio */
body[data-page="portfolio"]::before {
    display: none !important;
}

/* Font display ufficiale Mosaikon (Space Grotesk, coerente 100% con WB_24) */
body[data-page="portfolio"] {
    --font-display: 'Space Grotesk', sans-serif;
    --font-display-tracking: -0.04em;
}
body[data-page="portfolio"] h1,
body[data-page="portfolio"] h2,
body[data-page="portfolio"] h3,
body[data-page="portfolio"] h4 {
    font-family: var(--font-display);
    letter-spacing: var(--font-display-tracking);
}

.page-section.active {
    display: block;
}

/* Hero Portfolio calibrata sulla scala tipografica nativa di WB_24/css/style.css */
.portfolio-hero-compact {
    min-height: auto !important;
    padding: 9.5rem 2rem 2.2rem !important;
}
.portfolio-hero-compact h1 {
    font-size: clamp(2.5rem, 5.5vw, 5.2rem);
    line-height: 1.1;
    margin-bottom: 0.85rem;
}
.portfolio-hero-compact p {
    font-size: clamp(1.3rem, 2.4vw, 1.85rem);
    line-height: 1.45;
    margin-bottom: 0;
}

.portfolio-section {
    padding: 4.5rem 0;
    scroll-margin-top: 6rem;
    position: relative;
    z-index: 2;
}

/* Griglie coerenti con .values-grid nativo */
.sectors-grid-6 {
    grid-template-columns: repeat(3, 1fr) !important;
}
.portfolio-grid-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}
.portfolio-grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.sector-code {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
    display: block;
}

.portfolio-media-empty .empty-placeholder-icon {
    width: 44px !important;
    height: auto !important;
    opacity: 0.25;
    filter: var(--main-logo-filter);
}

.sector-detail-section {
    padding-top: 10rem;
    min-height: 75vh;
}
.back-sectors-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    cursor: pointer;
    margin-bottom: 1.8rem;
    display: inline-block;
    transition: color 0.2s ease;
}
.back-sectors-btn:hover { color: var(--accent-color); }
.sector-view-header { margin-bottom: 2.5rem; }
.sector-view-header .section-title {
    margin-bottom: 0.85rem !important;
}
.sector-view-header p {
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 920px;
    margin-top: 0;
}

/* Card Portfolio che estende .value-card di Mosaikon */
.portfolio-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    border-radius: 20px !important;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.35s ease;
}
.portfolio-card:hover {
    transform: translateY(-4px);
}

.portfolio-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    padding: 0.5rem;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
body.light-theme .portfolio-card-media {
    background: #ffffff;
}
.portfolio-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.portfolio-card:hover .portfolio-card-media img {
    transform: scale(1.04);
}

.portfolio-card h4 {
    font-family: var(--font-display);
    font-size: 1.24rem;
    line-height: 1.32;
    font-weight: 700;
    margin-bottom: 0.55rem;
}
.portfolio-card p {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.4rem;
}
.portfolio-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
}
.portfolio-card-cta .cta-circle {
    background: var(--text-main, #ffffff);
    color: var(--bg-body, #050507);
}
.portfolio-card:hover .portfolio-card-cta .cta-circle {
    background: var(--accent-color);
    color: #ffffff;
    transform: translate(2px, -2px) scale(1.06);
}
.portfolio-card-cta .cta-label {
    color: var(--text-main, #ffffff);
}

/* ==========================================================================
   VISTA INTERNA MONOGRAFICA DEL SINGOLO PROGETTO
   ========================================================================== */
.case-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-body);
    z-index: 900; /* Sotto l'header nativo di Mosaikon (z-index 1000) */
    padding-top: 134px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.case-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.case-back, .case-next {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
}
.case-back:hover, .case-next:hover { color: var(--accent-color); }

.case-scroll {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0.35rem 2.2rem 1rem;
    display: flex;
    flex-direction: column;
}
.case-container {
    width: 100%;
    max-width: 1460px;
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.case-header {
    display: block;
    position: static;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    flex-shrink: 0;
}
.case-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}
.case-nav-left,
.case-nav-right {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
}
.case-kicker {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 1.4px;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}
.case-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 2.8vw, 2.55rem);
    font-weight: 700;
    line-height: 1.14;
    margin: 0;
}
.case-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 800px;
}

.case-hero-block { margin-bottom: 2.5rem; }
.case-view-tabs {
    display: inline-flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    gap: 2rem;
}
.view-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.55rem 0;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.view-tab-btn:hover { color: var(--text-main); }
.view-tab-btn.active {
    color: var(--text-main);
    border-bottom-color: var(--accent-color);
    font-weight: 500;
}

.case-hero-stage {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.case-hero-stage.is-white { background: #ffffff; }
.case-hero-stage img { width: 100%; height: 100%; object-fit: contain; display: block; }

.case-metrics-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}
.metric-cell {
    padding: 1.4rem 1.2rem;
    border-right: 1px solid var(--border-color);
}
.metric-cell:first-child { padding-left: 0; }
.metric-cell:last-child { border-right: none; padding-right: 0; }
.metric-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.metric-value {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}
.metric-note {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.case-story-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.2rem;
    margin-bottom: 3.5rem;
}
.story-col-num {
    display: block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.45rem;
}
.story-col h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 0.65rem; }
.story-col p { font-size: 0.98rem; line-height: 1.68; color: var(--text-muted); }

.case-extra-section { padding-top: 2.5rem; border-top: 1px solid var(--border-color); }
.case-extra-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 1.2rem; }
.case-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.case-img-frame {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.case-img-frame img { max-width: 100%; max-height: 360px; object-fit: contain; }
.case-img-caption { margin-top: 0.9rem; font-size: 0.88rem; color: var(--text-muted); text-align: center; }

.case-cta {
    margin-top: 4rem;
    padding: 2rem 2.2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1.2rem;
}
.case-cta p { font-size: 1.08rem; color: var(--text-main); }

/* ============================================================================
   SHOWCASE MACRO-SEZIONI (Stile Mosaikon ispirato alla reference)
   ============================================================================ */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.showcase-card {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    height: 274px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.35s ease;
    border: 1px solid var(--border-color);
    isolation: isolate;
}
.showcase-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
}
.showcase-card:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

/* Varianti cromatiche Mosaikon */
.showcase-card.card-light {
    background: #ffffff;
    color: #111113;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.showcase-card.card-accent {
    background: linear-gradient(135deg, #ff6a00 0%, #ee4d09 55%, #c93700 100%);
    color: #ffffff;
    border-color: rgba(255, 130, 50, 0.35);
    box-shadow: 0 14px 36px rgba(255, 102, 0, 0.22);
}
body.light-theme .showcase-card.card-accent {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.22);
}
body.light-theme .card-accent .cta-circle {
    color: #2563eb;
}

.showcase-card.card-dark {
    background: var(--card-bg, #0e0e11);
    color: var(--text-main, #ffffff);
    border-color: var(--border-color, rgba(255, 255, 255, 0.1));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

/* Hover identico alle card native di WB_24 (.value-card / .testimonial-card): solo bordo 1px accent + ombra neutra */
.showcase-card:hover,
.showcase-card.card-light:hover,
.showcase-card.card-dark:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}
body.light-theme .showcase-card:hover,
body.light-theme .showcase-card.card-light:hover,
body.light-theme .showcase-card.card-dark:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Colonna sinistra: titolo a 2 righe + CTA circolare */
.showcase-left {
    position: relative;
    z-index: 2;
    flex: 0 0 43%;
    width: 43%;
    max-width: 43%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.85rem 0.6rem 1.85rem 2rem;
}
.showcase-card.is-text-only .showcase-left {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    padding: 1.85rem 2.2rem;
}

.showcase-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.15vw, 2rem);
    line-height: 1.14;
    letter-spacing: -0.02em;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 100%;
    overflow-wrap: break-word;
}
.showcase-title strong {
    font-weight: 700;
    transition: color 0.3s ease;
}
.showcase-title span {
    font-size: clamp(1.05rem, 1.35vw, 1.28rem);
    line-height: 1.32;
    font-weight: 400;
    transition: color 0.3s ease;
}

.card-light .showcase-title strong { color: #111113; }
.card-light .showcase-title span { color: #6e6e73; }

.card-accent .showcase-title strong { color: #ffffff; }
.card-accent .showcase-title span { color: rgba(255, 255, 255, 0.78); }

.card-dark .showcase-title strong { color: var(--text-main, #ffffff); }
.card-dark .showcase-title span { color: var(--text-muted, #86868b); }

/* CTA in basso a sinistra */
.showcase-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.8rem;
}

.cta-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.3s ease,
                color 0.3s ease;
}
.showcase-card:hover .cta-circle {
    transform: translate(2px, -2px) scale(1.06);
    background: var(--accent-color);
    color: #ffffff;
}

.card-light .cta-circle {
    background: #111113;
    color: #ffffff;
}
.card-accent .cta-circle {
    background: #ffffff;
    color: #ee4d09;
}
.card-dark .cta-circle {
    background: #ffffff;
    color: #111113;
}

.cta-label {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}
.card-light .cta-label { color: #1d1d1f; }
.card-accent .cta-label { color: #ffffff; }
.card-dark .cta-label { color: var(--text-main, #ffffff); }
.showcase-card:hover .cta-label { color: var(--accent-color); }

/* Colonna destra: ancorata in assoluto a destra così l'immagine non deforma mai l'altezza della card */
.showcase-visual {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 54%;
    padding: 0.75rem 1rem 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    pointer-events: none;
}

.showcase-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right center;
}

/* Copertine 1:1 a tutta card preparate dall'utente (nessun zoom/ritaglio CSS) */
.showcase-visual.is-cover {
    left: 0;
    width: 100%;
    padding: 0;
}
.showcase-visual img.cover-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    mix-blend-mode: multiply;
    filter: brightness(1.03) contrast(1.05);
    transform: none;
}

/* Render scontornato PNG trasparente: mantiene i colori originali sull'hover arancione/azzurro */
.showcase-visual img.visual-cutout {
    object-fit: contain;
    object-position: right center;
    filter: drop-shadow(-6px 10px 16px rgba(0, 0, 0, 0.22));
}

/* Bianco puro fuso sulla card chiara */
.showcase-visual img.blend-multiply {
    mix-blend-mode: multiply;
    filter: brightness(1.03) contrast(1.06);
}

/* Nero puro fuso sulla card scura (e sull'hover arancione/azzurro) */
.showcase-visual img.blend-screen {
    mix-blend-mode: screen;
    filter: contrast(1.04);
}

/* Immagine scontornata (PNG trasparente) su card */
.showcase-visual img.visual-pop {
    object-fit: contain;
    object-position: right bottom;
    transform: scale(1.06) translate(2%, 4%);
    transform-origin: bottom right;
    filter: drop-shadow(-8px 10px 18px rgba(0, 0, 0, 0.28));
}

/* Foto su card scura con sfumatura morbida verso sinistra */
.showcase-visual img.visual-masked {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.9) 34%, #000 100%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.9) 34%, #000 100%);
}

/* Watermark minimale per le 2 sezioni vuote */
.showcase-visual.visual-minimal {
    align-items: center;
    justify-content: center;
    padding-right: 1.8rem;
}
.showcase-visual img.visual-watermark {
    width: 84px;
    max-height: 84px;
    opacity: 0.14;
    filter: var(--main-logo-filter);
}
.showcase-card:hover .showcase-visual img.visual-watermark {
    opacity: 0.24;
    transform: none;
}

/* Bento intermedio per i progetti dentro ogni settore */
.sector-bento-grid {
    margin-top: 2rem;
}
.showcase-card.bento-featured {
    grid-column: span 2;
    height: 286px;
}
.showcase-card.bento-featured .showcase-left {
    flex: 0 0 46%;
    width: 46%;
    max-width: 46%;
    padding: 2.1rem 1.4rem 2.1rem 2.4rem;
}
.showcase-card.bento-featured .showcase-visual {
    width: 42%;
    right: 2%;
}
.showcase-card.bento-featured .showcase-visual.is-cover {
    left: 0;
    right: 0;
    width: 100%;
    padding: 0;
}
.sector-card-title {
    font-size: clamp(1.45rem, 1.95vw, 1.9rem);
    line-height: 1.2;
    gap: 0.35rem;
}
.sector-card-title span {
    font-size: clamp(1.05rem, 1.3vw, 1.24rem);
    line-height: 1.38;
    font-weight: 400;
}
.showcase-card.bento-featured .sector-card-title {
    font-size: clamp(1.5rem, 2.2vw, 2.05rem);
}

/* ============================================================================
   BENTO GRID INTERNA DEI PROGETTI (#caseOverlay)
   ============================================================================ */
.case-bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
}

.bento-cell {
    background: var(--card-bg, #0e0e11);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.bento-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.85rem;
}

/* 1. Visual Stage principale (8 colonne) */
.bento-cell-visual {
    grid-column: span 8;
    padding: 1.25rem 1.4rem 1.4rem;
}
.bento-visual-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}
.bento-visual-head .bento-label {
    margin-bottom: 0;
}
.bento-visual-head .case-view-tabs {
    margin-bottom: 0;
    border-bottom: none;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.25rem;
}
body.light-theme .bento-visual-head .case-view-tabs {
    background: rgba(0, 0, 0, 0.04);
}
.bento-visual-head .view-tab-btn {
    border-bottom: none;
    border-radius: 999px;
    padding: 0.35rem 0.95rem;
    font-size: 0.84rem;
}
.bento-visual-head .view-tab-btn.active {
    background: var(--accent-color);
    color: #ffffff;
}
.bento-cell-visual .case-hero-stage {
    flex: 1;
    border-radius: 14px;
    padding: 0.6rem;
}

/* 2. Specs / Metriche (4 colonne) */
.bento-cell-specs {
    grid-column: span 4;
    justify-content: space-between;
}
.bento-metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    flex: 1;
}
.bento-metric-item {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}
body.light-theme .bento-metric-item {
    background: rgba(0, 0, 0, 0.025);
}
.bento-metric-item .metric-label {
    font-size: 0.72rem;
    margin-bottom: 0.2rem;
}
.bento-metric-item .metric-value {
    font-size: 1.08rem;
}
.bento-metric-item .metric-note {
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

/* 3. Racconto Tecnico in 3 celle (4 colonne ciascuna) */
.bento-cell-story {
    grid-column: span 4;
    padding: 1.6rem;
}
.bento-cell-story h3 {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}
.bento-cell-story p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}
.bento-cell-highlight {
    border-color: rgba(255, 102, 0, 0.35);
    background: linear-gradient(160deg, rgba(255, 102, 0, 0.08) 0%, var(--card-bg, #0e0e11) 65%);
}

/* 4. Extra tecnici e CTA Bento */
.bento-span-12 { grid-column: span 12; }
.bento-span-7  { grid-column: span 7; }
.bento-span-6  { grid-column: span 6; }
.bento-span-5  { grid-column: span 5; }

.bento-cell-extra {
    margin: 0;
}
.bento-extra-media {
    flex: 1;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bento-extra-media img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

.bento-cell-cta {
    background: linear-gradient(135deg, #ff6a00 0%, #ee4d09 58%, #c93700 100%);
    border-color: rgba(255, 130, 50, 0.4);
    color: #ffffff;
    justify-content: space-between;
    gap: 1.5rem;
}
.bento-cell-cta.bento-span-12 {
    flex-direction: row;
    align-items: center;
}
.bento-cell-cta .bento-label {
    color: rgba(255, 255, 255, 0.85);
}
.bento-cell-cta h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.4rem;
}
.bento-cell-cta p {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.96rem;
    margin: 0;
    max-width: 560px;
}
.bento-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    align-self: flex-start;
    flex-shrink: 0;
}
.bento-cell-cta.bento-span-12 .bento-cta-btn {
    align-self: center;
}
.bento-cta-btn .cta-circle {
    background: #ffffff;
    color: #ee4d09;
}
.bento-cta-btn:hover .cta-circle {
    transform: translate(2px, -2px) scale(1.06);
}
.bento-cta-btn .cta-label {
    color: #ffffff;
}

/* ============================================================================
   BENTO SHOWCASE LAYOUT (Zero-scroll 100vh desktop + FEM integrata)
   ============================================================================ */
.bento-showcase-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 4.8fr 7.2fr;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 0;
}
.bento-showcase-layout.has-fem {
    grid-template-columns: 4fr 4.8fr 3.2fr;
}

.bento-left-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.bento-sub-card {
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.bento-card-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}
.bento-bar-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #3f3f46;
}
.bento-bar-title.bento-bar-accent {
    color: var(--accent-color);
}
.bento-bar-action {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.3rem 0.78rem;
    border-radius: 999px;
    background: #111113;
    color: #ffffff;
}
.bento-bar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.bento-bar-btn {
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.bento-bar-btn:hover {
    background: var(--accent-color);
    color: #ffffff;
}
.bento-3d-host {
    width: 100%;
    height: 100%;
}
.bento-3d-host canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    outline: none;
}
.glb-loading-msg {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
}
.bento-media-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bento-media-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bento-sub-white {
    flex: 0 0 38%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0.95rem 0.85rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.bento-sub-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.bento-sub-dark-stage {
    flex: 0 0 38%;
    background: #000000;
    border: 1px solid var(--border-color);
    padding: 0.75rem 0.95rem 0.85rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.bento-sub-dark-stage:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.bento-sub-dark-stage .bento-bar-title {
    color: var(--text-muted);
}
.bento-sub-dark-stage .bento-bar-action {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.bento-sub-dark {
    background: var(--card-bg, #0e0e11);
    border: 1px solid var(--border-color);
    padding: 1.15rem 1.35rem;
    flex-shrink: 0;
}
.bento-sub-quote {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-main);
}

.bento-sub-orange {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: linear-gradient(145deg, #ff6a00 0%, #ee4d09 60%, #c93700 100%);
    border: 1px solid rgba(255, 130, 50, 0.35);
    padding: 1.25rem 1.4rem;
    color: #ffffff;
    display: flex;
    align-items: flex-start;
    box-shadow: 0 14px 34px rgba(255, 102, 0, 0.18);
}
body.light-theme .bento-sub-orange {
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 60%, #1d4ed8 100%);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.2);
}

.bento-orange-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.bento-orange-list li {
    position: relative;
    padding-left: 1.15rem;
    font-size: clamp(1.06rem, 1.25vw, 1.22rem);
    line-height: 1.52;
    color: rgba(255, 255, 255, 0.96);
}
.bento-orange-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.54em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
}

.bento-right-stage {
    position: relative;
    border-radius: 18px;
    border: none;
    outline: none;
    box-shadow: none;
    background: #ffffff;
    padding: 0.95rem 1.15rem 1.15rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    height: 100%;
}
.bento-right-stage:not(.is-white) {
    background: var(--card-bg, #0e0e11);
    border-color: var(--border-color);
}
.bento-right-stage:not(.is-white) .bento-bar-title {
    color: var(--text-muted);
}

/* Terza colonna FEM integrata nella schermata */
.bento-fem-card {
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    padding: 0.85rem 1rem 0.95rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.bento-fem-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}
.bento-fem-media {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bento-fem-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.bento-fem-caption {
    margin: 0.6rem 0 0;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
    line-height: 1.45;
    color: #3f3f46;
    flex-shrink: 0;
}

.bento-cta-inline {
    background: var(--accent-color);
    padding: 0.42rem 1.1rem 0.42rem 0.45rem;
    border-radius: 999px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bento-cta-inline .cta-circle {
    width: 32px;
    height: 32px;
    font-size: 0.92rem;
    background: #ffffff;
    color: var(--accent-color);
}
.bento-cta-inline .cta-label {
    font-size: 0.86rem;
    color: #ffffff;
}
.bento-cta-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

.case-overlay .case-metrics-strip {
    flex-shrink: 0;
    margin: 0;
}
.case-overlay .metric-cell {
    padding: 0.9rem 1.1rem;
}
.case-overlay .metric-label {
    font-size: 0.88rem;
    margin-bottom: 0.24rem;
}
.case-overlay .metric-value {
    font-size: 1.45rem;
}
.case-overlay .metric-note {
    font-size: 1rem;
    margin-top: 0.18rem;
}

@media (max-height: 760px) {
    .case-scroll {
        overflow-y: auto;
        padding-bottom: 2rem;
    }
    .case-container {
        height: auto;
    }
    .bento-right-stage,
    .bento-fem-card {
        min-height: 360px;
    }
}

@media (max-width: 1100px) {
    .sectors-grid-6, .portfolio-grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
    .showcase-left { padding: 1.6rem 1rem 1.6rem 1.6rem; }
}
@media (max-width: 960px) {
    .case-scroll {
        overflow-y: auto;
        padding: 0.5rem 1.2rem 2.5rem;
    }
    .case-container {
        height: auto;
    }
    .bento-showcase-layout,
    .bento-showcase-layout.has-fem {
        grid-template-columns: 1fr;
    }
    .bento-sub-white {
        flex: none;
        aspect-ratio: 16 / 9;
    }
    .bento-right-stage,
    .bento-fem-card {
        min-height: 280px;
        height: auto;
    }
    .bento-cell-visual,
    .bento-cell-specs,
    .bento-cell-story,
    .bento-span-7,
    .bento-span-6,
    .bento-span-5 {
        grid-column: span 12;
    }
    .bento-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-cell-cta.bento-span-12 {
        flex-direction: column;
        align-items: flex-start;
    }
    .bento-cell-cta.bento-span-12 .bento-cta-btn {
        align-self: flex-start;
    }
}
@media (max-width: 900px) {
    .showcase-grid { grid-template-columns: 1fr; }
    .showcase-card.bento-featured { grid-column: span 1; }
}
@media (max-width: 768px) {
    .sectors-grid-6, .portfolio-grid-3, .portfolio-grid-2 { grid-template-columns: 1fr !important; }
    .showcase-card { height: 210px; }
    .showcase-left { flex: 0 0 48%; width: 48%; max-width: 48%; padding: 1.4rem 0.5rem 1.4rem 1.3rem; }
    .showcase-visual { width: 44%; right: 0; }
    .showcase-visual.is-cover { width: 100%; left: 0; }
    .portfolio-hero-compact { padding-top: 7.5rem !important; min-height: auto !important; }
    .sector-detail-section { padding-top: 7.5rem; }
    .case-overlay { padding-top: 104px; }
    .portfolio-section { padding: 3rem 0; }
    .case-topbar { padding: 0 1.2rem; }
    .case-scroll { padding: 2rem 1.2rem 4rem; }
    .bento-metrics-grid { grid-template-columns: 1fr; }
    .case-metrics-strip { grid-template-columns: 1fr 1fr; }
    .metric-cell { padding: 1rem; border-bottom: 1px solid var(--border-color); }
    .metric-cell:nth-child(2n) { border-right: none; }
    .metric-cell:nth-child(odd) { padding-left: 0; }
    .case-story-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ============================================================================
   WB_26 — SCHEDA INTERNA EDITORIALE FULL-FRAME (ZERO GRIGLIE COMPRESSE)
   ============================================================================ */
.case-overlay.is-editorial {
    padding-top: 0 !important;
}
.case-overlay.is-editorial .case-scroll {
    overflow-y: auto !important;
    height: 100% !important;
    padding: 134px 2.5rem 6rem !important;
}
.case-overlay.is-editorial .case-container {
    height: auto !important;
    max-width: 1420px !important;
    display: block !important;
    margin: 0 auto !important;
}

.ed-page {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

/* Top bar minimale */
.ed-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.ed-topbar-left,
.ed-topbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.ed-contact-pill {
    padding: 0.45rem 1.3rem !important;
    font-size: 0.9rem !important;
}

/* Testata editoriale (scala tipografica calibrata su WB_24) */
.ed-hero-head {
    max-width: 1120px;
    margin-top: 0;
}
.ed-title {
    margin: 0 0 1rem 0;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: var(--text-main);
}
.ed-subtitle {
    margin: 0;
    font-size: clamp(1.22rem, 1.75vw, 1.55rem);
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 68ch;
}

/* Immagine Full-Frame protagonista (edge-to-edge sui 4 bordi del riquadro) */
.ed-fullframe {
    position: relative;
    margin: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 78vh;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ed-fullframe.is-white-studio {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}
.ed-fullframe.is-white-studio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    padding: 0;
    display: block;
    mix-blend-mode: multiply;
}
.ed-fullframe.is-ambient {
    background: #0a0a0d;
}
.ed-fullframe.is-ambient img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.ed-fem-frame {
    aspect-ratio: auto;
    height: min(68vh, 640px);
}
.ed-fem-frame.is-white-studio img {
    object-fit: contain;
    padding: 1rem;
}
.ed-media-tag {
    position: absolute;
    top: 1.15rem;
    left: 1.25rem;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    background: rgba(14, 14, 17, 0.72);
    color: #ffffff;
    
}
.ed-fullframe.is-white-studio .ed-media-tag {
    background: rgba(17, 17, 19, 0.06);
    color: #3f3f46;
}

/* Striscia 4 Specifiche (scala generosa WB_24, solo linee 1px) */
.ed-specs-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.2rem;
    padding: 2.4rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.ed-spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ed-spec-label {
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
}
.ed-spec-value {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.05vw, 1.95rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-main);
}
.ed-spec-note {
    font-size: 1.04rem;
    line-height: 1.4;
    color: var(--text-muted);
}

/* Statement Editoriale Grande (Metodo 1 Magazine) */
.ed-statement {
    max-width: 1080px;
    padding: 1rem 0 0.5rem;
}
.ed-statement-lead {
    margin: 0.65rem 0 0;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.45rem, 2.3vw, 2.15rem);
    font-weight: 400;
    line-height: 1.42;
    letter-spacing: -0.015em;
    color: var(--text-main);
}

/* 2 Colonne Tecniche Pulite (02 Intervento | 03 Risultato) */
.ed-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.5rem;
    padding: 2.5rem 0 0.5rem;
    border-top: 1px solid var(--border-color);
}
.ed-col-block {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.ed-col-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 1.95vw, 1.85rem);
    font-weight: 600;
    line-height: 1.22;
    color: var(--text-main);
}
.ed-col-text {
    margin: 0;
    font-size: clamp(1.12rem, 1.35vw, 1.28rem);
    line-height: 1.65;
    color: var(--text-muted);
}

.ed-section-eyebrow {
    display: block;
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.55rem;
}
.ed-narrative-heading,
.ed-section-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 2.6vw, 2.4rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.ed-story-num {
    display: block;
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}
.ed-story-title {
    margin: 0 0 0.55rem 0;
    font-family: var(--font-display);
    font-size: 1.28rem;
    font-weight: 600;
    color: var(--text-main);
}
.ed-story-text {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.68;
    color: var(--text-muted);
    max-width: 66ch;
}

.ed-bullet-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ed-bullet-list li {
    position: relative;
    padding: 1.15rem 0 1.15rem 1.4rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.06rem;
    line-height: 1.65;
    color: var(--text-muted);
}
.ed-bullet-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
}
.ed-bullet-list li:last-child {
    border-bottom: none;
}

/* Sezioni Media / 3D / FEM Full-Width */
.ed-media-section {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}
.ed-media-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.ed-media-caption-inline {
    font-size: 0.94rem;
    color: var(--text-muted);
    max-width: 52ch;
}
.ed-pill-btn {
    padding: 0.52rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--card-bg, #0e0e11);
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease;
}
.ed-pill-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.ed-3d-stage {
    width: 100%;
    height: min(72vh, 660px);
    min-height: 420px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    transition: background-color 0.3s ease;
}
.ed-3d-stage.is-dark-3d {
    background: radial-gradient(circle at 50% 45%, #191a20 0%, #09090b 100%);
}
.ed-3d-stage.is-white-studio {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Footer Prossimo Progetto */
.ed-next-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.4rem 0 1rem;
    border-top: 1px solid var(--border-color);
    cursor: pointer;
    transition: border-color 0.3s ease;
}
.ed-next-footer:hover {
    border-top-color: var(--accent-color);
}
.ed-next-title {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.5vw, 2.2rem);
    font-weight: 600;
    color: var(--text-main);
    transition: color 0.3s ease;
}
.ed-next-footer:hover .ed-next-title {
    color: var(--accent-color);
}
.ed-next-arrow {
    font-size: 2rem;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
}
.ed-next-footer:hover .ed-next-arrow {
    color: var(--accent-color);
    transform: translateX(10px);
}

@media (max-width: 960px) {
    .case-overlay.is-editorial .case-scroll {
        padding: 112px 1.25rem 4rem !important;
    }
    .ed-specs-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .ed-two-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .ed-fullframe,
    .ed-3d-stage {
        height: 420px;
        min-height: 300px;
    }
}
@media (max-width: 600px) {
    .ed-specs-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   WB_26 — AWWWARDS UNIFIED STAGE 60% + DOSSIER COMPATTO 40%
   (Ispirato a Seed Jewelry / Blunt / Unimatic / Estudio Niksen)
   ============================================================================ */
.pdp-shell {
    width: 100%;
    max-width: 1460px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pdp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.pdp-topbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.pdp-split {
    display: grid;
    grid-template-columns: minmax(0, 1.48fr) minmax(360px, 0.92fr);
    gap: 2.5rem;
    align-items: stretch;
}

/* SINISTRA 60%: UNICO STAGE PROTAGONISTA (proporzione widescreen 16:10 per 0 tagli) */
.pdp-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 460px;
    max-height: calc(100vh - 210px);
    align-self: start;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: #ffffff;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.pdp-stage.is-white-stage {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}
.pdp-stage.is-dark-stage {
    background: #07080b;
    border-color: var(--border-color);
}

.pdp-stage-canvas {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pdp-stage-canvas img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.pdp-stage.is-white-stage .pdp-stage-canvas img {
    object-fit: contain;
    object-position: center;
    padding: 0;
    mix-blend-mode: multiply;
}
.pdp-stage.is-contain .pdp-stage-canvas img {
    object-fit: contain;
    padding: 1.5rem 1.5rem 4.8rem;
}

/* Pillola Dock flottante in basso al centro */
.pdp-dock {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.15rem, 0.6vw, 0.3rem);
    padding: clamp(0.22rem, 0.5vw, 0.36rem);
    width: max-content;
    max-width: calc(100% - 1rem);
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    border-radius: 999px;
    background: rgba(14, 14, 17, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.pdp-dock::-webkit-scrollbar {
    display: none;
}
.pdp-dock-btn {
    flex: 0 0 auto;
    padding: 0.5rem clamp(0.6rem, 1.4vw, 1.15rem);
    border-radius: 999px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.22s ease, color 0.22s ease;
}
.pdp-dock-btn:hover {
    color: #ffffff;
}
.pdp-dock-btn.active {
    background: var(--accent-color);
    color: #000000;
}
body.light-theme .pdp-dock-btn.active {
    color: #ffffff;
}

.pdp-caption-pill {
    position: absolute;
    top: 1.1rem;
    left: 1.1rem;
    z-index: 10;
    max-width: 72%;
    padding: 0.42rem 0.95rem;
    border-radius: 999px;
    background: rgba(14, 14, 17, 0.74);
    color: #ffffff;
    font-size: 0.82rem;
    
}

/* DESTRA 40%: DOSSIER TECNICO COMPATTO (ZERO BOX) */
.pdp-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.4rem;
    padding: 0.25rem 0;
}
.pdp-head {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.pdp-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--text-main);
}
.pdp-sub {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.48;
    color: var(--text-muted);
}

/* Mini-tab orizzontali stile Estudio Niksen */
.pdp-info-tabs {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    border-bottom: 1px solid var(--border-color);
}
.pdp-info-tab {
    position: relative;
    padding: 0.7rem 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease;
}
.pdp-info-tab:hover {
    color: var(--text-main);
}
.pdp-info-tab.active {
    color: var(--text-main);
}
.pdp-info-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--accent-color);
}

.pdp-info-panels {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
}
.pdp-info-panel {
    display: none;
}
.pdp-info-panel.active {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.pdp-lead {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.6;
    color: var(--text-main);
    opacity: 0.92;
}

/* Datasheet compatto Chiave --- Valore */
.pdp-datasheet {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-color);
}
.pdp-spec-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.92rem 0;
    border-bottom: 1px solid var(--border-color);
}
.pdp-spec-k {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
}
.pdp-spec-v {
    text-align: right;
    font-size: 1rem;
    color: var(--text-main);
}
.pdp-spec-v strong {
    font-family: var(--font-display);
    font-weight: 600;
}
.pdp-spec-v em {
    font-style: normal;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tab Dettagli Tecnici */
.pdp-story-stack {
    display: flex;
    flex-direction: column;
}
.pdp-story-item {
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--border-color);
}
.pdp-story-item:first-child { padding-top: 0; }
.pdp-story-item:last-child { border-bottom: none; }
.pdp-story-k {
    display: block;
    font-family: var(--font-display);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}
.pdp-story-t {
    margin: 0 0 0.3rem;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--text-main);
}
.pdp-story-p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.pdp-hl-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pdp-hl-list li {
    position: relative;
    padding: 0.85rem 0 0.85rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--text-muted);
}
.pdp-hl-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
}
.pdp-hl-list li:last-child { border-bottom: none; }

/* Azioni in basso */
.pdp-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.pdp-cta-primary {
    padding: 0.65rem 1.65rem !important;
    font-size: 0.96rem !important;
}
.pdp-cta-next {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}
.pdp-cta-next:hover {
    color: var(--accent-color);
}

@media (max-width: 1080px) {
    .pdp-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .pdp-stage {
        height: 460px;
        min-height: 360px;
    }
}
@media (max-width: 600px) {
    .pdp-stage {
        height: 360px;
        min-height: 300px;
    }
    .pdp-spec-row {
        flex-direction: column;
        gap: 0.2rem;
    }
    .pdp-spec-v {
        text-align: left;
    }
}

/* ============================================================================
   WB_26 EDITORIALE — FLAGSHIP SHOWCASE + ARCHIVIO TECNICO + DOSSIER MONOGRAFICO
   100% Nativo sul Design System Mosaikon WB_24 (Dark #ff6600 / Light #2563eb)
   ============================================================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pf-wrap {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* HERO EDITORIALE COMPATTA */
.pf-hero {
    padding: 6.5rem 0 2.4rem;
    position: relative;
    z-index: 2;
}
.pf-hero-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding-bottom: 2.4rem;
    border-bottom: 1px solid var(--border-color);
}
.pf-hero-top.pf-hero-split {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.15fr);
    align-items: center;
    min-height: calc(100dvh - 14.5rem);
    gap: 2rem 2.5rem;
    padding: 2rem 0 2.2rem;
}
.pf-hero-copy {
    max-width: 760px;
    text-align: left;
}
.pf-eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 1rem;
}
.pf-h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 6.5rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.04em;
    color: var(--text-main);
    margin: 0 0 1.4rem;
}
.pf-lead {
    font-size: clamp(1.4rem, 2.2vw, 2.1rem);
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
    max-width: 44ch;
}
.pf-hero-3d {
    position: relative;
    width: 100%;
    height: clamp(460px, 62dvh, 680px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    background: transparent;
    border: none;
}
.pf-hero-3d-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 310px;
    overflow: hidden;
}
.pf-hero-3d-canvas canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.pf-hero-3d-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}
.pf-hero-3d-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.86rem;
    font-weight: 400;
    color: var(--text-muted);
}
.pf-hero-3d-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-main);
    opacity: 0.82;
    transition: color 0.2s ease, opacity 0.2s ease;
}
.pf-hero-3d-link:hover {
    color: var(--accent-color);
    opacity: 1;
}

/* KPI STRIP TABELLARE */
.pf-kpi-strip {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    overflow: hidden;
}
.pf-kpi-item {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border-right: 1px solid var(--border-color);
    min-width: 112px;
}
.pf-kpi-item:last-child {
    border-right: none;
}
.pf-kpi-val {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.05;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.pf-kpi-lbl {
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* BARRA FILTRI SETTORE (1 CLIC) */
.pf-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding-top: 1.6rem;
}
.pf-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.56rem 1.05rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.22s ease, color 0.22s ease, background-color 0.22s ease;
}
.pf-filter-pill:hover {
    border-color: var(--accent-color);
    color: var(--text-main);
}
.pf-filter-pill.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000000;
}
body.light-theme .pf-filter-pill.active {
    color: #ffffff;
}
.pf-filter-num {
    font-size: 0.76rem;
    opacity: 0.65;
    font-variant-numeric: tabular-nums;
}
.pf-filter-pill.active .pf-filter-num {
    opacity: 0.9;
}
.pf-filter-count {
    font-size: 0.76rem;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}
.pf-filter-pill.active .pf-filter-count {
    opacity: 0.95;
}

/* SEZIONI PORTFOLIO */
.pf-section {
    padding: 2.2rem 0 3.2rem;
    position: relative;
    z-index: 2;
}
.pf-section-archive {
    padding-top: 2.8rem;
    padding-bottom: 5rem;
}
.pf-sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.85rem;
}
.pf-sec-kicker {
    display: block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.35rem;
}
.pf-sec-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 3.8vw, 3.6rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.04em;
    color: var(--text-main);
    margin: 0;
}
.pf-sec-actions {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.pf-sec-count {
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.pf-archive-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0.44rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.22s ease, color 0.22s ease;
}
.pf-archive-toggle:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ATTO 1: GRIGLIA FLAGSHIP (2 COLONNE EDITORIALI + HERO FULL-WIDTH QUANDO DISPARI) */
.pf-flagship-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
}

.pf-card.is-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr);
    align-items: stretch;
}
.pf-card.is-featured .pf-card-media {
    aspect-ratio: 16 / 10;
    height: 100%;
    border-bottom: none;
    border-right: 1px solid var(--border-color);
}
.pf-card.is-featured .pf-card-body {
    padding: 2.2rem 2.35rem 2rem;
    justify-content: space-between;
}
.pf-card.is-featured .pf-card-title {
    font-size: clamp(1.55rem, 2.2vw, 2.05rem);
    line-height: 1.15;
}
.pf-card.is-featured .pf-card-sub {
    font-size: 1.06rem;
    max-width: 44ch;
}

.pf-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    isolation: isolate;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.28s ease,
                box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.pf-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.26);
}
body.light-theme .pf-card:hover {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}
.pf-card:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

/* Frame visivo con color-scheme isolato (evita stacchi bruschi e preserva il blending) */
.pf-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    isolation: isolate;
}
.pf-card-media.is-light-stage {
    color-scheme: only light;
    background: #f5f6f8;
    color: #111113;
    padding: 0;
}
body.light-theme .pf-card-media.is-light-stage {
    background: #ffffff;
}
.pf-card-media.is-dark-stage {
    color-scheme: only dark;
    background: #07080b;
    color: #ffffff;
}
.pf-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.pf-card-media.is-light-stage img {
    object-fit: cover;
}
.pf-card-media.is-dark-stage img {
    object-fit: cover;
}
.pf-card:hover .pf-card-media img {
    transform: scale(1.035);
}

/* Micro-badge discreti sopra lo stage */
.pf-card-badges {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 2;
}
.pf-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.3rem 0.68rem;
    border-radius: 999px;
    background: rgba(12, 12, 15, 0.78);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    
}
.pf-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
    display: inline-block;
    flex-shrink: 0;
}

.pf-card-body {
    padding: 1.65rem 1.8rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.65rem;
}
.pf-card-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.pf-card-sector {
    font-family: 'Outfit', sans-serif;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
}
.pf-card-idx {
    font-family: 'Outfit', sans-serif;
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.pf-card-title {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 1.9vw, 1.85rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: var(--text-main);
    margin: 0;
}
.pf-card-sub {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.18rem, 1.4vw, 1.32rem);
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
    flex: 1;
}
.pf-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.pf-card-spec {
    font-family: 'Outfit', sans-serif;
    font-size: 1.08rem;
    font-weight: 500;
    color: var(--text-main);
    opacity: 0.88;
}
.pf-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.08rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.22s ease;
}
.pf-card:hover .pf-card-cta {
    color: var(--accent-color);
}
.pf-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}
.pf-card:hover .pf-arrow {
    transform: translate(3px, -3px);
}

/* ATTO 2: ARCHIVIO TECNICO (TABELLA SEMANTICA 1PX ALLINEATA A WB_24, ZERO SCROLLBAR SU HOVER) */
.pf-archive-wrap {
    width: 100%;
    overflow: hidden;
    container-type: inline-size;
    border-top: 1px solid var(--border-color);
}
.pf-archive-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}
.pf-archive-table thead th {
    padding: 1.15rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.pf-archive-table thead th:first-child,
.pf-archive-table tbody td:first-child {
    padding-left: 0.4rem;
}
.pf-archive-table thead th:last-child,
.pf-archive-table tbody td:last-child {
    padding-right: 0.85rem;
    text-align: right;
}

.pf-archive-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.pf-archive-row:hover {
    background: var(--glass-bg);
}
.pf-archive-row:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}
.pf-archive-row td,
.pf-archive-row th {
    padding: 1.55rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.pf-archive-row .col-num {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    width: 56px;
}
.pf-archive-row .col-sector {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent-color);
    white-space: nowrap;
}
.pf-archive-row .col-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 1.75vw, 1.68rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-main);
    line-height: 1.25;
}
.pf-archive-row .col-activity {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.18rem, 1.4vw, 1.32rem);
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.45;
}
.pf-tbl-tags {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}
.pf-tbl-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.34rem 0.85rem;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    white-space: nowrap;
}
.pf-tbl-tag.is-3d {
    color: var(--text-main);
    border-color: var(--border-color);
}
.pf-tbl-arrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text-muted);
    transition: transform 0.22s ease, color 0.22s ease;
}
.pf-archive-row:hover .pf-tbl-arrow {
    color: var(--accent-color);
    transform: translate(3px, -3px);
}

/* Trasformazione responsive della tabella via @container */
@container (width < 760px) {
    .pf-archive-table,
    .pf-archive-table tbody,
    .pf-archive-table tr,
    .pf-archive-table th,
    .pf-archive-table td {
        display: block;
    }
    .pf-archive-table thead {
        display: none;
    }
    .pf-archive-row {
        padding: 1.15rem 0;
        border-bottom: 1px solid var(--border-color);
        position: relative;
    }
    .pf-archive-row td,
    .pf-archive-row th {
        padding: 0.25rem 0;
        border-bottom: none;
    }
    .pf-archive-row .col-num {
        display: none;
    }
    .pf-archive-row .col-activity::before {
        content: attr(data-label) ": ";
        font-family: var(--font-display);
        font-size: 0.76rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--text-muted);
    }
    .pf-archive-row .col-arrow {
        position: absolute;
        top: 1.1rem;
        right: 0;
    }
}

/* ============================================================================
   SCHEDA PROGETTO MONOGRAFICA — 100% ALLINEATA A MOSAIKON WB_24
   (Space Grotesk SOLO sui titoli h1-h4, Outfit 300/400/500 su tutti i testi,
    scala rem calibrata su html { font-size: clamp(9px, 1.6dvh, 16px) })
   ============================================================================ */
.case-overlay.is-editorial {
    padding-top: 0 !important;
}
.case-overlay.is-editorial .case-scroll {
    overflow-y: auto !important;
    /* Stesso offset di .pf-hero (9.8rem): ~3rem di respiro netto sotto l'header galleggiante */
    padding: 9.8rem 2rem 6rem !important;
}
.case-overlay.is-editorial .case-container {
    height: auto !important;
    max-width: 1460px;
}

.cs-shell {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.9rem;
}
.cs-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--border-color);
}
.cs-topbar-left {
    display: inline-flex;
    align-items: center;
    gap: 1.4rem;
    flex-wrap: wrap;
}
.case-overlay .case-back,
.case-overlay .case-next {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.08rem;
    font-weight: 500;
    color: var(--accent-color);
    background: var(--btn-outline-bg);
    border: 1px solid var(--btn-outline-border);
    border-radius: 100px;
    padding: 0.52rem 1.2rem;
    line-height: 1.2;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.case-overlay .case-back:hover,
.case-overlay .case-next:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-1px);
}
.case-overlay .case-kicker {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-main);
}

/* HERO FULL-WIDTH: STAGE 3D CENTRALE GRANDE + TESTATA ORIZZONTALE + SPECIFICHE 4 COLONNE */
.cs-hero-split {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}
.cs-hero-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cs-head {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: flex-start;
}
.cs-head-copy {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
    max-width: 78ch;
}
.cs-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 2.9vw, 3rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--text-main);
    margin: 0;
}
.cs-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.35rem, 1.7vw, 1.6rem);
    font-weight: 300;
    line-height: 1.52;
    color: var(--text-muted);
    margin: 0;
    max-width: 66ch;
}
.cs-tags-row {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}
.cs-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1.05rem;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-muted);
}
.cs-tag.is-3d {
    color: var(--text-main);
}

/* STAGE UNIFICATO FULL-WIDTH CENTRALE (TUTTO VISIBILE SOPRA LA PIEGA, ZERO BOX IN 3D) */
.cs-stage {
    position: relative;
    width: 100%;
    height: clamp(460px, 66dvh, 760px);
    min-height: 460px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease, border-radius 0.3s ease;
    isolation: isolate;
}
.cs-stage.is-3d-active:not(.is-contrast-stage),
.cs-stage.is-studio-stage:not(.is-contrast-stage) {
    border-color: transparent !important;
    border-radius: 0;
    background: transparent !important;
}
.cs-stage.is-studio-stage .cs-stage-canvas img {
    object-fit: contain;
    box-sizing: border-box;
    padding: 6% 9% clamp(4.5rem, 14%, 6rem);
}
body:not(.light-theme) .cs-stage.is-studio-stage.is-dark-stage .cs-stage-canvas img {
    mix-blend-mode: lighten;
}
body.light-theme .cs-stage.is-studio-stage.is-white-stage .cs-stage-canvas img {
    mix-blend-mode: multiply;
}
.cs-stage.is-white-stage {
    color-scheme: only light;
    background: #ffffff;
    color: #111113;
    border-color: rgba(0, 0, 0, 0.1);
}
.cs-stage.is-dark-stage {
    color-scheme: only dark;
    background: #000000;
    color: #ffffff;
    border-color: var(--border-color);
}
.cs-stage-canvas {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cs-stage-canvas img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.cs-stage.is-white-stage .cs-stage-canvas img {
    object-fit: cover;
    padding: 0;
}
.cs-stage.is-contain .cs-stage-canvas img {
    object-fit: contain;
    padding: 1.5rem 2rem 4.8rem;
}

.cs-3d-hint {
    position: absolute;
    left: 1.1rem;
    top: 1.1rem;
    z-index: 10;
    padding: 0.42rem 0.95rem;
    border-radius: 100px;
    background: rgba(14, 14, 17, 0.72);
    color: rgba(255, 255, 255, 0.86);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    
    pointer-events: none;
}

.pdp-dock-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
}
.pdp-dock-btn.active .pf-dot {
    background: #000000;
}
body.light-theme .pdp-dock-btn.active .pf-dot {
    background: #ffffff;
}

/* SPECIFICHE 4 COLONNE ORIZZONTALI SOTTO LO STAGE FULL-WIDTH */
.cs-specs-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.cs-spec-item {
    padding: 1.4rem 1.4rem 1.4rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}
.cs-spec-item:not(:first-child) {
    padding-left: 1.4rem;
    border-left: 1px solid var(--border-color);
}
.cs-spec-item:last-child {
    padding-right: 0;
}
@media (max-width: 960px) {
    .cs-head {
        grid-template-columns: 1fr;
    }
    .cs-title,
    .cs-subtitle,
    .cs-tags-row {
        grid-column: 1;
        grid-row: auto;
    }
    .cs-stage {
        height: min(56vh, 460px);
        min-height: 320px;
    }
    .cs-specs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cs-spec-item {
        padding: 1.15rem 1rem 1.15rem 0;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }
    .cs-spec-item:nth-child(even) {
        padding-left: 1.15rem;
        border-left: 1px solid var(--border-color);
    }
    .cs-spec-item:nth-last-child(-n+2) {
        border-bottom: none;
    }
}
.cs-spec-k {
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
}
.cs-spec-v {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 1.7vw, 1.65rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text-main);
}
.cs-spec-n {
    font-family: 'Outfit', sans-serif;
    font-size: 1.12rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.35;
}

/* PERCORSO TECNICO: 3 .value-card NATIVE DI WB_24 */
.cs-method {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.cs-method-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    color: var(--text-main);
    margin: 0;
}
.cs-story-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
.cs-story-card {
    gap: 0.55rem;
}
.cs-story-num {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
}
.cs-story-card h4 {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 2vw, 1.9rem) !important;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: var(--text-main);
    margin: 0 0 0.35rem !important;
}
.cs-story-card p {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.25rem, 1.55vw, 1.45rem) !important;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* CHIUSURA CTA NATIVA WB_24 */
.cs-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.6rem 0 1rem;
    border-top: 1px solid var(--border-color);
}
.cs-footer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.8rem;
    flex-wrap: wrap;
}
.cs-cta-btn {
    padding: 0.95rem 2.6rem !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.25rem !important;
}
.cs-footer-kicker {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-main);
}
.cs-footer-next {
    background: transparent;
    border: none;
    text-align: right;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}
.cs-footer-next-title {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2vw, 1.85rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-main);
    transition: color 0.22s ease;
}
.cs-footer-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}
.cs-footer-next:hover .cs-footer-next-title {
    color: var(--accent-color);
}
.cs-footer-next:hover .cs-footer-arrow {
    transform: translateX(6px);
}

/* RESPONSIVE */
@media (max-width: 1080px) {
    .cs-hero-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .cs-story-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 960px) {
    .pf-wrap {
        padding: 0 1.25rem;
    }
    .pf-card.is-featured {
        grid-column: 1 / -1;
    }
    .cs-3d-hint {
        display: none !important;
    }
}
/* Mobile (<= 900px / <= 600px): vedi blocco finale "MOBILE MASTER" in fondo al file */
@media (max-width: 480px) {
    body[data-page="portfolio"] .logo-icon-wrapper {
        width: 148px;
    }
    body[data-page="portfolio"] .logo-img {
        height: 104px;
    }
}

/* ==========================================================================
   SEZIONE DEDICATA AI ENGINEERING — BLOCCO ACCENTO PIENO (#ff6600 / #2563eb)
   ========================================================================== */
.pf-filter-pill.pf-filter-ai {
    margin-left: auto;
    border-color: color-mix(in srgb, var(--accent-color) 42%, var(--border-color));
}

.pf-ai-section {
    --ai-fade: clamp(90px, 13vh, 160px);
    position: relative;
    background: linear-gradient(
        180deg,
        #000000 0px,
        rgba(255, 102, 0, calc(0.08 * var(--ai-prog, 1))) calc(var(--ai-fade) * 0.28),
        rgba(255, 102, 0, calc(0.36 * var(--ai-prog, 1))) calc(var(--ai-fade) * 0.56),
        rgba(255, 102, 0, calc(0.76 * var(--ai-prog, 1))) calc(var(--ai-fade) * 0.82),
        rgba(255, 102, 0, calc(0.32 + var(--ai-prog, 1) * 0.68)) var(--ai-fade),
        rgba(255, 102, 0, calc(0.32 + var(--ai-prog, 1) * 0.68)) calc(100% - var(--ai-fade)),
        rgba(255, 102, 0, calc(0.76 * var(--ai-prog, 1))) calc(100% - var(--ai-fade) * 0.82),
        rgba(255, 102, 0, calc(0.36 * var(--ai-prog, 1))) calc(100% - var(--ai-fade) * 0.56),
        rgba(255, 102, 0, calc(0.08 * var(--ai-prog, 1))) calc(100% - var(--ai-fade) * 0.28),
        #000000 100%
    );
    margin: 0.5rem 0;
    padding: calc(var(--ai-fade) + 48px) 0 calc(var(--ai-fade) + 56px);
    scroll-margin-top: -120px;
    overflow: hidden;
}
body.light-theme .pf-ai-section {
    background: linear-gradient(
        180deg,
        #ffffff 0px,
        rgba(37, 99, 235, calc(0.08 * var(--ai-prog, 1))) calc(var(--ai-fade) * 0.28),
        rgba(37, 99, 235, calc(0.36 * var(--ai-prog, 1))) calc(var(--ai-fade) * 0.56),
        rgba(37, 99, 235, calc(0.76 * var(--ai-prog, 1))) calc(var(--ai-fade) * 0.82),
        rgba(37, 99, 235, calc(0.32 + var(--ai-prog, 1) * 0.68)) var(--ai-fade),
        rgba(37, 99, 235, calc(0.32 + var(--ai-prog, 1) * 0.68)) calc(100% - var(--ai-fade)),
        rgba(37, 99, 235, calc(0.76 * var(--ai-prog, 1))) calc(100% - var(--ai-fade) * 0.82),
        rgba(37, 99, 235, calc(0.36 * var(--ai-prog, 1))) calc(100% - var(--ai-fade) * 0.56),
        rgba(37, 99, 235, calc(0.08 * var(--ai-prog, 1))) calc(100% - var(--ai-fade) * 0.28),
        #ffffff 100%
    );
}

/* Animazione editoriale delle scritte (blur-to-sharp + tracking + slide-up) e card a cascata */
.pf-ai-section .pf-ai-kicker {
    opacity: 0;
    transform: translateY(20px);
    letter-spacing: 0.24em;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                letter-spacing 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.pf-ai-section .pf-ai-title {
    opacity: 0;
    transform: translateY(48px);
    
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.05s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
}
.pf-ai-section .pf-ai-lead {
    opacity: 0;
    transform: translateY(34px);
    
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.pf-ai-section .pf-ai-meta-row {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.pf-ai-section .pf-ai-grid .pf-card {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.82s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.92s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.28s ease,
                box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-ai-section.is-in-view .pf-ai-kicker {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: 0.12em;
    transition-delay: 0.05s;
}
.pf-ai-section.is-in-view .pf-ai-title {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition-delay: 0.15s;
}
.pf-ai-section.is-in-view .pf-ai-lead {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition-delay: 0.28s;
}
.pf-ai-section.is-in-view .pf-ai-meta-row {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}
.pf-ai-section.is-in-view .pf-ai-grid .pf-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.pf-ai-section.is-in-view .pf-ai-grid .pf-card:nth-child(1) { transition-delay: 0.46s; }
.pf-ai-section.is-in-view .pf-ai-grid .pf-card:nth-child(2) { transition-delay: 0.58s; }
.pf-ai-section.is-in-view .pf-ai-grid .pf-card:nth-child(3) { transition-delay: 0.7s; }
.pf-ai-section.is-in-view .pf-ai-grid .pf-card:nth-child(n+4) { transition-delay: 0.78s; }
/* Hover immediato senza delay dopo l'ingresso */
.pf-ai-section.is-in-view .pf-ai-grid .pf-card:hover {
    transition-delay: 0s !important;
    transform: translateY(-5px) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .pf-ai-section { --ai-prog: 1; }
    .pf-ai-section .pf-ai-kicker,
    .pf-ai-section .pf-ai-title,
    .pf-ai-section .pf-ai-lead,
    .pf-ai-section .pf-ai-meta-row,
    .pf-ai-section .pf-ai-grid .pf-card {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}

.pf-ai-head {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: end;
    margin-bottom: 2.4rem;
}
.pf-ai-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #000000;
}
.pf-ai-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #000000;
    display: inline-block;
    animation: pfAiBreath 2.8s ease-in-out infinite;
}
@keyframes pfAiBreath {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.42; transform: scale(0.84); }
}
@media (prefers-reduced-motion: reduce) {
    .pf-ai-dot { animation: none; }
}
.pf-ai-title {
    font-size: clamp(2.5rem, 3.8vw, 3.6rem);
    letter-spacing: -0.04em;
    line-height: 1.06;
    color: #000000;
}
.pf-ai-head-side {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}
.pf-ai-lead {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.18rem, 1.35vw, 1.34rem);
    font-weight: 400;
    line-height: 1.58;
    color: rgba(0, 0, 0, 0.82);
    margin: 0;
    max-width: 56ch;
}
.pf-ai-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.pf-ai-section .pf-sec-count {
    color: #000000;
}
.pf-ai-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    padding: 0.34rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.24);
    background: rgba(0, 0, 0, 0.12);
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    color: #000000;
}
.pf-ai-pill .pf-dot {
    background: #000000;
}
.pf-ai-section .pf-card {
    background: #09090b;
    border-color: rgba(0, 0, 0, 0.35);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
}
.pf-ai-section .pf-card:hover {
    border-color: #000000;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}

/* Light theme (sfondo blu #2563eb → testi bianchi nitidi + card bianche) */
body.light-theme .pf-ai-kicker,
body.light-theme .pf-ai-title,
body.light-theme .pf-ai-section .pf-sec-count {
    color: #ffffff;
}
body.light-theme .pf-ai-dot,
body.light-theme .pf-ai-pill .pf-dot {
    background: #ffffff;
}
body.light-theme .pf-ai-lead {
    color: #ffffff;
}
body.light-theme .pf-ai-pill {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.42);
    color: #ffffff;
}
body.light-theme .pf-ai-section .pf-card {
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.24);
}
body.light-theme .pf-ai-section .pf-card:hover {
    border-color: #ffffff;
}

@media (max-width: 900px) {
    .pf-ai-section {
        --ai-fade: 56px;
        padding: 84px 0 88px;
        scroll-margin-top: 0;
    }
    .pf-ai-head {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        align-items: start;
    }
    .pf-filter-pill.pf-filter-ai {
        margin-left: 0;
    }
}


/* ==========================================================================
   VISTA AR / LIDAR MOBILE (BOTTONE DOCK + MODALE QR DESKTOP)
   ========================================================================== */
.pdp-dock-ar {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    margin-left: 0.15rem;
    padding-left: 0.85rem;
}
.pdp-dock-ar svg {
    flex-shrink: 0;
    opacity: 0.9;
}

/* La modale vive fuori da #pdpStage (niente isolation/overflow che la intrappolano).
   .case-overlay (z-index 900) è a sua volta sotto l'header (1000): mentre la modale
   è aperta l'overlay sale sopra a tutto, così la modale copre dock e header. */
.case-overlay:has(.pdp-ar-modal.active) {
    z-index: 99999;
}
.pdp-ar-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(5, 5, 8, 0.84);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
body.light-theme .pdp-ar-modal {
    background: rgba(255, 255, 255, 0.88);
}
.pdp-ar-modal.active {
    display: flex;
}
.pdp-ar-card {
    position: relative;
    width: 100%;
    max-width: 340px;
    padding: 1.85rem 1.75rem 1.6rem;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35);
}
.pdp-ar-close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.pdp-ar-close:hover {
    color: var(--text-main);
    border-color: var(--accent-color);
}
.pdp-ar-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.55rem;
}
.pdp-ar-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.55rem;
}
.pdp-ar-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 0.96rem;
    font-weight: 300;
    line-height: 1.48;
    color: var(--text-muted);
    margin: 0 0 1.15rem;
}
.pdp-ar-qr-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0.9rem;
}
.pdp-ar-qr-box img {
    display: block;
    border-radius: 4px;
}
.pdp-ar-note {
    font-family: 'Outfit', sans-serif;
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.42;
    color: var(--text-muted);
    margin: 0;
}

/* ==========================================================================
   CARD FLAGSHIP & AI — FULL-BLEED CINEMA (PRIORITÀ ASSOLUTA AL RENDER)
   ========================================================================== */
.pf-flagship-grid .pf-card {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
}
.pf-flagship-grid .pf-card.is-featured {
    display: block;
    aspect-ratio: 21 / 9;
    min-height: 360px;
}
.pf-flagship-grid .pf-card .pf-card-media,
.pf-flagship-grid .pf-card.is-featured .pf-card-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-right: none;
    border-bottom: none;
}
.pf-flagship-grid .pf-card .pf-card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.48) 72%, rgba(0, 0, 0, 0.92) 100%);
    pointer-events: none;
}
body.light-theme .pf-flagship-grid .pf-card .pf-card-media::after {
    background: linear-gradient(180deg, transparent 46%, rgba(255, 255, 255, 0.62) 74%, rgba(255, 255, 255, 0.96) 100%);
}
.pf-flagship-grid .pf-card .pf-card-body,
.pf-flagship-grid .pf-card.is-featured .pf-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 1.5rem 1.75rem 1.45rem;
    gap: 0.35rem;
    justify-content: flex-end;
}
.pf-flagship-grid .pf-card .pf-card-sub,
.pf-flagship-grid .pf-card .pf-card-foot {
    display: none;
}
.pf-flagship-grid .pf-card .pf-card-title {
    font-size: clamp(1.45rem, 1.85vw, 1.82rem);
}
@media (max-width: 780px) {
    .pf-flagship-grid .pf-card.is-featured {
        aspect-ratio: 4 / 3;
        min-height: 280px;
    }
}

/* ==========================================================================
   MOBILE MASTER (<= 900px / <= 600px) — UNICA FONTE DI VERITÀ PER IL MOBILE
   Note: su <= 900px l'header nativo WB_24 è FISSO IN BASSO → niente buco in
   alto, aria generosa in fondo. Il root font-size di WB_24 scala con l'altezza
   (dvh), quindi qui le misure critiche sono in px / vw per restare stabili.
   ========================================================================== */
@media (max-width: 900px) {
    :root {
        --m-gutter: 24px;
        --m-bottom-safe: calc(112px + env(safe-area-inset-bottom, 0px));
    }

    /* ---------- 0. Guardia overflow orizzontale ---------- */
    #portfolio-home {
        overflow-x: clip;
    }
    .pf-wrap {
        padding: 0 var(--m-gutter);
    }

    /* ---------- 1. HERO ---------- */
    .pf-hero {
        padding: calc(env(safe-area-inset-top, 0px) + 36px) 0 4px;
    }
    .pf-hero-top,
    .pf-hero-top.pf-hero-split {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        gap: 14px;
        padding: 0 0 20px;
    }
    .pf-hero-copy {
        max-width: 100%;
        min-width: 0;
    }
    .pf-eyebrow {
        font-size: 11.5px;
        letter-spacing: 0.14em;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    .pf-h1 {
        font-size: clamp(34px, 9.4vw, 52px);
        line-height: 1.03;
        letter-spacing: -0.04em;
        margin: 0 0 14px;
        overflow-wrap: break-word;
    }
    .pf-lead {
        font-size: 16px;
        line-height: 1.55;
        max-width: 46ch;
    }
    .pf-hero-3d {
        height: 280px;
    }
    .pf-hero-3d-canvas {
        min-height: 240px;
    }
    .pf-hero-3d-meta {
        gap: 12px;
        margin-top: 4px;
    }
    .pf-hero-3d-hint,
    .pf-hero-3d-link {
        font-size: 13px;
    }

    /* ---------- 2. BARRA FILTRI: 1 riga scrollabile edge-to-edge ---------- */
    .pf-filter-bar {
        flex-wrap: nowrap;
        gap: 8px;
        margin: 0 calc(var(--m-gutter) * -1);
        padding: 18px var(--m-gutter) 4px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-padding-inline: var(--m-gutter);
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .pf-filter-bar::-webkit-scrollbar {
        display: none;
    }
    .pf-filter-pill {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 0 15px;
        gap: 7px;
        font-size: 14px;
        line-height: 1;
        white-space: nowrap;
        scroll-snap-align: start;
    }
    .pf-filter-pill.pf-filter-ai {
        margin-left: 0;
    }
    .pf-filter-num,
    .pf-filter-count {
        font-size: 11.5px;
    }

    /* ---------- 3. HEADER DI SEZIONE: titolo pieno + meta sotto ---------- */
    .pf-section {
        padding: 32px 0 40px;
    }
    .pf-section-archive {
        padding: 40px 0 48px;
    }
    .pf-sec-head {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 10px;
        margin-bottom: 20px;
    }
    .pf-sec-head > div:first-child {
        width: 100%;
        min-width: 0;
    }
    .pf-sec-kicker {
        font-size: 11.5px;
        letter-spacing: 0.12em;
        margin-bottom: 8px;
    }
    .pf-sec-title,
    .pf-ai-title {
        font-size: clamp(28px, 7.6vw, 38px);
        line-height: 1.08;
        letter-spacing: -0.035em;
        overflow-wrap: break-word;
    }
    .pf-sec-count {
        font-size: 12px;
        letter-spacing: 0.1em;
        white-space: nowrap;
    }
    .pf-sec-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 12px;
    }
    .pf-archive-toggle {
        min-height: 40px;
        padding: 0 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* ---------- 4. GRIGLIA FLAGSHIP (e AI): 2 colonne su tablet (601-900px), 1 colonna <= 600px ---------- */
    .pf-flagship-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    .pf-flagship-grid .pf-card {
        grid-column: auto;
        display: block;
        aspect-ratio: 4 / 3;
        min-height: 220px;
        border-radius: 16px;
    }
    .pf-flagship-grid .pf-card.is-featured {
        grid-column: 1 / -1;
        display: block;
        aspect-ratio: 16 / 9;
        min-height: 240px;
        border-radius: 16px;
    }
    @media (max-width: 600px) {
        .pf-flagship-grid {
            grid-template-columns: minmax(0, 1fr);
        }
        .pf-flagship-grid .pf-card,
        .pf-flagship-grid .pf-card.is-featured {
            grid-column: auto;
            aspect-ratio: 4 / 3;
            min-height: 264px;
        }
    }
    .pf-flagship-grid .pf-card .pf-card-media::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 24%, transparent 38%, rgba(0, 0, 0, 0.55) 66%, rgba(0, 0, 0, 0.92) 100%);
    }
    body.light-theme .pf-flagship-grid .pf-card .pf-card-media::after {
        background: linear-gradient(180deg, transparent 40%, rgba(255, 255, 255, 0.7) 68%, rgba(255, 255, 255, 0.97) 100%);
    }
    .pf-card-badges {
        top: 12px;
        left: 12px;
        right: 12px;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
    }
    .pf-badge {
        padding: 5px 10px;
        font-size: 10.5px;
        letter-spacing: 0.06em;
        line-height: 1.2;
    }
    .pf-flagship-grid .pf-card .pf-card-body,
    .pf-flagship-grid .pf-card.is-featured .pf-card-body {
        padding: 18px 18px 16px;
        gap: 6px;
    }
    .pf-card-meta-top {
        gap: 12px;
        min-width: 0;
    }
    .pf-card-sector {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11.5px;
        letter-spacing: 0.1em;
    }
    .pf-card-idx {
        flex-shrink: 0;
        font-size: 12px;
    }
    .pf-flagship-grid .pf-card .pf-card-title,
    .pf-flagship-grid .pf-card.is-featured .pf-card-title {
        font-size: clamp(19px, 5.2vw, 24px);
        line-height: 1.2;
        letter-spacing: -0.025em;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    /* ---------- 5. AI ENGINEERING: sfumatura corta, niente bande vuote ---------- */
    .pf-ai-section {
        --ai-fade: 56px;
        margin: 0;
        padding: calc(var(--ai-fade) + 36px) 0 calc(var(--ai-fade) + 44px);
        scroll-margin-top: 0;
    }
    .pf-ai-head {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        align-items: start;
        margin-bottom: 24px;
    }
    .pf-ai-head-side {
        gap: 16px;
    }
    .pf-ai-lead {
        font-size: 16px;
        line-height: 1.55;
        max-width: none;
    }
    .pf-ai-meta-row {
        flex-wrap: nowrap;
        gap: 12px;
    }
    .pf-ai-pill {
        min-height: 32px;
        padding: 0 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    .pf-ai-section .pf-card {
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
    }
    body.light-theme .pf-ai-section .pf-card {
        box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
    }

    /* ---------- 6. ARCHIVIO: vedi @container in fondo; qui solo il wrapper ---------- */
    .pf-archive-wrap {
        overflow: clip;
    }

    /* ---------- 7. FOOTER: l'header WB_24 fisso in basso non copre mai nulla ---------- */
    body[data-page="portfolio"] footer {
        padding-bottom: var(--m-bottom-safe);
    }

    /* ---------- 8. SCHEDA CASO STUDIO (#caseOverlay) ---------- */
    .case-overlay.is-editorial .case-scroll {
        padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px var(--m-bottom-safe) !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain;
    }
    .case-overlay.is-editorial .case-container {
        max-width: 100% !important;
        min-width: 0;
    }
    .cs-shell {
        gap: 28px;
        min-width: 0;
    }

    /* Topbar: [← Indietro .......... Prossimo →] / [SETTORE] */
    .cs-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "back next"
            "kicker kicker";
        align-items: center;
        gap: 6px 16px;
        padding-bottom: 14px;
    }
    .cs-topbar-left {
        display: contents;
    }
    .case-overlay .case-back,
    .case-overlay .case-next {
        min-height: 38px;
        padding: 0 14px;
        display: inline-flex;
        align-items: center;
        font-size: 13.5px;
        line-height: 1.2;
        white-space: nowrap;
    }
    .case-overlay .case-back {
        grid-area: back;
        justify-self: start;
    }
    .case-overlay .case-next {
        grid-area: next;
        justify-self: end;
    }
    .case-overlay .case-kicker {
        grid-area: kicker;
        font-size: 11.5px;
        letter-spacing: 0.12em;
        line-height: 1.35;
        overflow-wrap: break-word;
    }

    /* Testata sopra lo stage */
    .cs-hero-split {
        gap: 20px;
    }
    .cs-head {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .cs-title,
    .cs-subtitle,
    .cs-tags-row {
        grid-column: 1;
        grid-row: auto;
    }
    .cs-title {
        font-size: clamp(26px, 7.2vw, 36px);
        line-height: 1.1;
        letter-spacing: -0.03em;
        overflow-wrap: break-word;
    }
    .cs-subtitle {
        font-size: 16px;
        line-height: 1.5;
    }
    .cs-tags-row {
        gap: 8px;
        margin-top: 4px;
    }
    .cs-tag {
        padding: 6px 12px;
        font-size: 13px;
        line-height: 1.2;
    }

    /* Stage proporzionato */
    .cs-stage {
        height: clamp(300px, 94vw, 440px);
        min-height: 300px;
        border-radius: 14px;
    }
    .cs-stage.is-studio-stage .cs-stage-canvas img {
        padding: 5% 5% 68px;
    }
    .cs-stage.is-contain .cs-stage-canvas img {
        padding: 16px 16px 68px;
    }
    .cs-3d-hint {
        display: none !important;
    }
    .pdp-caption-pill {
        top: 10px;
        left: 10px;
        max-width: calc(100% - 150px);
        padding: 8px 12px;
        font-size: 12.5px;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Dock centrata; scroll orizzontale solo se serve; "Vedi in AR" sempre raggiungibile */
    .pdp-dock {
        left: 50%;
        right: auto;
        bottom: 12px;
        transform: translateX(-50%);
        width: max-content;
        max-width: calc(100% - 20px);
        gap: 4px;
        padding: 4px;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .pdp-dock::-webkit-scrollbar {
        display: none;
    }
    .pdp-dock-btn {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 0 14px;
        font-size: 14px !important;
        line-height: 1;
    }
    .pdp-dock-ar {
        position: static;
        margin-left: 2px;
        padding-left: 12px;
        touch-action: manipulation;
    }

    /* Specifiche 2x2 con separatori puliti */
    .cs-specs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cs-spec-item,
    .cs-spec-item:not(:first-child) {
        min-width: 0;
        padding: 16px 14px 16px 0;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        gap: 4px;
    }
    .cs-spec-item:nth-child(even) {
        padding-left: 14px;
        padding-right: 0;
        border-left: 1px solid var(--border-color);
    }
    .cs-spec-item:nth-last-child(-n+2):nth-child(odd),
    .cs-spec-item:nth-last-child(-n+2):nth-child(odd) ~ .cs-spec-item,
    .cs-spec-item:last-child {
        border-bottom: none;
    }
    .cs-spec-k {
        font-size: 11px;
        letter-spacing: 0.1em;
    }
    .cs-spec-v {
        font-size: clamp(17px, 4.8vw, 21px);
        line-height: 1.2;
        overflow-wrap: anywhere;
    }
    .cs-spec-n {
        font-size: 14px;
        line-height: 1.4;
    }

    /* Percorso tecnico: 1 colonna */
    .cs-method {
        gap: 16px;
    }
    .cs-method-heading {
        font-size: clamp(24px, 6.6vw, 32px);
        line-height: 1.12;
    }
    .cs-story-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .cs-story-card {
        padding: 20px 18px !important;
        gap: 6px;
    }
    .cs-story-num {
        font-size: 11.5px;
    }
    .cs-story-card h4 {
        font-size: clamp(18px, 5vw, 22px) !important;
        line-height: 1.22;
        letter-spacing: -0.025em;
        margin: 0 0 4px !important;
    }
    .cs-story-card p {
        font-size: 15.5px !important;
        line-height: 1.6;
    }
    .case-overlay .ed-bullet-list li {
        padding: 14px 0 14px 18px;
        font-size: 15.5px;
        line-height: 1.6;
    }

    /* Chiusura CTA */
    .cs-footer {
        padding: 28px 0 4px;
    }
    .cs-footer-cta {
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }
    .cs-footer-kicker {
        font-size: 20px;
    }
    .cs-cta-btn {
        min-height: 48px;
        padding: 0 32px !important;
        font-size: 16px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Modale AR: mai sotto la barra fissa in basso */
    .pdp-ar-modal {
        padding: 20px 16px var(--m-bottom-safe);
    }
    .pdp-ar-card {
        max-width: 340px;
        padding: 26px 20px 20px;
    }
    .pdp-ar-close {
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
    }
    .pdp-ar-title {
        font-size: 20px;
    }
    .pdp-ar-desc {
        font-size: 15px;
    }
}

/* Touch: niente hover "appiccicoso" dopo il tap */
@media (max-width: 900px) and (hover: none) {
    .pf-card:hover,
    .pf-ai-section.is-in-view .pf-ai-grid .pf-card:hover {
        transform: none;
    }
    .pf-card:hover .pf-card-media img {
        transform: none;
    }
}

@media (max-width: 600px) {
    :root {
        --m-gutter: 20px;
    }
    .pf-hero {
        padding-top: calc(env(safe-area-inset-top, 0px) + 32px);
    }
    .case-overlay.is-editorial .case-scroll {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .pf-flagship-grid .pf-card,
    .pf-flagship-grid .pf-card.is-featured {
        min-height: 252px;
    }
    /* iPhone 12 mini (375x812): stage + dock interamente sopra l'header fisso in basso */
    .cs-shell {
        gap: 18px;
    }
    .cs-topbar {
        gap: 4px 16px;
        padding-bottom: 8px;
    }
    .cs-hero-split {
        gap: 14px;
    }
    .cs-head {
        gap: 8px;
    }
    .cs-tags-row {
        margin-top: 2px;
    }
    .cs-stage {
        height: clamp(240px, 68vw, 310px);
        min-height: 240px;
    }
}

/* ARCHIVIO TECNICO — righe compatte quando il contenitore è stretto (mobile) */
@container (width < 760px) {
    .pf-archive-table .pf-archive-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 28px;
        column-gap: 12px;
        row-gap: 6px;
        padding: 18px 0;
    }
    .pf-archive-table .pf-archive-row > * {
        grid-column: 1;
        min-width: 0;
        padding: 0;
        border-bottom: none;
        text-align: left;
    }
    .pf-archive-table .pf-archive-row .col-num {
        display: none;
    }
    .pf-archive-table .pf-archive-row .col-sector {
        font-size: 12px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        line-height: 1.3;
        white-space: normal;
    }
    .pf-archive-table .pf-archive-row .col-title {
        font-size: clamp(17px, 4.8vw, 21px);
        line-height: 1.25;
        letter-spacing: -0.02em;
        overflow-wrap: break-word;
    }
    .pf-archive-table .pf-archive-row .col-activity {
        font-size: 15px;
        line-height: 1.5;
    }
    .pf-archive-table .pf-archive-row .col-activity::before {
        font-size: 11px;
        letter-spacing: 0.08em;
    }
    .pf-archive-table .pf-archive-row .col-tags {
        padding-top: 4px;
    }
    .pf-archive-table .pf-tbl-tags {
        gap: 6px;
    }
    .pf-archive-table .pf-tbl-tag {
        padding: 5px 10px;
        font-size: 12.5px;
        line-height: 1.2;
    }
    .pf-archive-table .pf-archive-row .col-arrow {
        position: static;
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: start;
        justify-self: end;
        padding: 0;
        text-align: right;
    }
    .pf-archive-table .pf-tbl-arrow {
        font-size: 18px;
        line-height: 1.3;
    }
}

/* ==========================================================================
   DOCK STAGE ALLINEATA A SINISTRA SOTTO SOTTOTITOLO (320px -> 4K)
   ========================================================================== */
.cs-dock-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin: 0.15rem 0 -0.35rem;
}
.cs-dock-bar .pdp-dock {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    max-width: 100% !important;
    box-sizing: border-box;
    white-space: nowrap;
}
/* Stage libero dalla dock: padding simmetrico senza spazio sprecato in basso */
.cs-stage.is-studio-stage .cs-stage-canvas img {
    object-fit: contain !important;
    max-width: 100%;
    max-height: 100%;
    padding: 3% 6% !important;
}
.cs-stage.is-contain .cs-stage-canvas img {
    padding: 1.25rem 1.75rem !important;
}
.pdp-dock-btn {
    white-space: nowrap;
    flex: 0 0 auto;
}
@media (max-width: 900px) {
    .cs-dock-bar {
        justify-content: flex-start;
        margin: 0.15rem 0 -0.25rem;
    }
    /* Dock pulita: bottoni in fila, nessuno sovrapposto; se non entra scorre in orizzontale
       (safe center: centrata quando entra, mai tagliata a sinistra quando scorre) */
    .cs-dock-bar .pdp-dock {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        justify-content: safe center;
    }
    .pdp-dock-ar {
        position: static !important;
    }
    /* La dock resta scura anche in Light Mode: testo AR sempre chiaro */
    body.light-theme .pdp-dock-ar {
        color: rgba(255, 255, 255, 0.9);
    }
}
@media (max-width: 480px) {
    .pdp-ar-prefix {
        display: none;
    }
    .cs-dock-bar .pdp-dock {
        max-width: 100% !important;
        gap: 3px;
        padding: 3px;
    }
    .pdp-dock-btn {
        min-height: 36px;
        padding: 0 11px;
        font-size: 12.5px !important;
    }
    .pdp-dock-ar {
        padding-left: 10px;
    }
}

/* Light Mode pulita: niente sfumatura mouse dietro il bianco */
body.light-theme .ambient-glow {
    display: none !important;
    opacity: 0 !important;
}

/* HERO CARD COMPLETA A DESTRA (4:3 IDENTICA ALLE ALTRE CARD) */
.pf-hero-top.pf-hero-split-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem; /* = gap .pf-flagship-grid: colonne Hero allineate al pixel con la griglia sotto */
}
.pf-hero-card-slot.pf-flagship-grid {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
}
.pf-hero-card-slot .pf-card {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
}
@media (max-width: 900px) {
    /* La regola split-card sopra (stessa specificità, più in basso) annullava l'1 colonna del Mobile Master */
    .pf-hero-top.pf-hero-split-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .pf-hero-card-slot .pf-card {
        height: auto;
        min-height: 240px;
    }
}
/* Tablet 601–900px: card Hero più bassa e titoli card meno ingombranti */
@media (min-width: 601px) and (max-width: 900px) {
    .pf-hero-card-slot .pf-card {
        aspect-ratio: 16 / 10;
    }
    .pf-flagship-grid .pf-card .pf-card-title {
        font-size: clamp(17px, 2.7vw, 21px);
    }
}

/* Card orfana (es. filtro 03 Impianti): l'ultima card dispari va a tutta larghezza */
#flagshipGrid > .pf-card:last-child:nth-child(odd):not(:only-child) {
    grid-column: 1 / -1;
    aspect-ratio: 21 / 9;
    min-height: 360px;
}
@media (max-width: 600px) {
    #flagshipGrid > .pf-card:last-child:nth-child(odd):not(:only-child) {
        grid-column: auto;
        aspect-ratio: 4 / 3;
        min-height: 264px;
    }
}

/* ==========================================================================
   MATRICE DI RISCHIO HTML/CSS NATIVA 100% RESPONSIVE (analisi-rischio)
   ========================================================================== */
.cs-stage.is-html-stage {
    height: auto !important;
    min-height: 0 !important;
    border: none;
    background: var(--bg-color);
    overflow: visible;
}
.cs-stage.is-html-stage .cs-stage-canvas {
    position: static;
    width: 100%;
    height: auto;
    display: block;
}
.rk-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0.25rem 0;
    background: var(--bg-color);
    color: var(--text-main);
}
.rk-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
}
.rk-eyebrow {
    display: block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.35rem;
}
.rk-heading {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 1.95rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0;
    color: var(--text-main);
}
.rk-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.rk-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.85rem;
    border-radius: 9px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid transparent;
}
.rk-board {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}
.rk-panel {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.35rem;
}
.rk-panel-kicker {
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
}
.rk-matrix-panel {
    display: flex;
    flex-direction: column;
}
.rk-matrix {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(11rem, 1.75fr) repeat(5, minmax(0, 1fr));
    grid-template-rows: auto repeat(4, minmax(4.2rem, 1fr));
    gap: 0.6rem;
    align-items: stretch;
}
.rk-colh {
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    padding-bottom: 0.45rem;
}
.rk-rowh {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-right: 0.4rem;
}
.rk-se-num {
    flex: 0 0 auto;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
}
.rk-se-txt {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.rk-se-txt strong {
    font-family: 'Outfit', sans-serif;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}
.rk-se-txt span {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.2;
}
.rk-cell {
    min-height: 4.5rem;
    border-radius: 12px;
    border: 1px solid transparent;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: clamp(0.88rem, 1.05vw, 1.05rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}
/* Palette monocromatica Brand Mosaikon (Dark #ff6600 / Light #2563eb) */
.rk-cell.is-trasc, .rk-pill.is-trasc { background: #0a0a0e; border-color: #2c2c36; color: #a1a1aa; }
.rk-cell.is-low,   .rk-pill.is-low   { background: #2e1606; border-color: #8a360c; color: #fdba74; }
.rk-cell.is-mid,   .rk-pill.is-mid   { background: #8a3307; border-color: #f97316; color: #fff7ed; }
.rk-cell.is-high,  .rk-pill.is-high  { background: #ff6600; border-color: #ff8533; color: #000000; }

body.light-theme .rk-cell.is-trasc, body.light-theme .rk-pill.is-trasc { background: #f8fafc; border-color: #cbd5e1; color: #64748b; }
body.light-theme .rk-cell.is-low,   body.light-theme .rk-pill.is-low   { background: #dbeafe; border-color: #93c5fd; color: #1e3a8a; }
body.light-theme .rk-cell.is-mid,   body.light-theme .rk-pill.is-mid   { background: #60a5fa; border-color: #3b82f6; color: #ffffff; }
body.light-theme .rk-cell.is-high,  body.light-theme .rk-pill.is-high  { background: #2563eb; border-color: #1d4ed8; color: #ffffff; }

.rk-se-legend-mobile {
    display: none;
}
.rk-factors {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.rk-factor-card {
    padding: 0.9rem 1.15rem;
}
.rk-factor-head {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    margin-bottom: 0.6rem;
}
.rk-factor-head strong {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-color);
}
.rk-factor-head span {
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.rk-factor-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.rk-frow {
    display: grid;
    grid-template-columns: minmax(7.8rem, 1fr) minmax(5.5rem, 1.2fr) 1.6rem;
    align-items: center;
    gap: 0.75rem;
}
.rk-flbl {
    font-family: 'Outfit', sans-serif;
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
}
.rk-fbar {
    height: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
body.light-theme .rk-fbar {
    background: rgba(15, 23, 42, 0.1);
}
.rk-fbar span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--accent-color);
}
.rk-fval {
    text-align: right;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}
.rk-foot {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 1080px) {
    .rk-board {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 640px) {
    .rk-panel {
        padding: 14px;
        border-radius: 14px;
    }
    .rk-heading {
        font-size: 20px;
    }
    .rk-eyebrow {
        font-size: 11px;
    }
    .rk-pill {
        font-size: 12px;
        padding: 5px 10px;
    }
    .rk-matrix {
        grid-template-columns: 36px repeat(5, minmax(0, 1fr));
        gap: 5px;
    }
    .rk-colh {
        font-size: 12px;
        padding-bottom: 4px;
    }
    .rk-rowh {
        padding-right: 0;
        justify-content: center;
    }
    .rk-se-txt {
        display: none;
    }
    .rk-se-num {
        width: 34px;
        height: 34px;
        font-size: 14px;
        border-radius: 8px;
    }
    .rk-cell {
        min-height: 46px;
        font-size: 11.5px;
        border-radius: 8px;
    }
    .rk-se-legend-mobile {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
        font-family: 'Outfit', sans-serif;
        font-size: 13px;
        color: var(--text-muted);
    }
    .rk-se-legend-mobile b {
        color: var(--accent-color);
        font-family: var(--font-display);
        margin-right: 4px;
    }
    .rk-frow {
        grid-template-columns: minmax(112px, 1fr) minmax(72px, 1fr) 22px;
        gap: 10px;
    }
    .rk-flbl {
        font-size: 13.5px;
    }
    .rk-fval {
        font-size: 14px;
    }
    .rk-foot {
        font-size: 12.5px;
    }
}

/* ==========================================================================
   FIX HEADER ANTI-SOVRAPPOSIZIONE (6 VOCI MENU SU TABLET/LAPTOP 901–1360px)
   ========================================================================== */
@media (min-width: 901px) and (max-width: 1360px) {
    body[data-page="portfolio"] header {
        padding: 0.85rem 1.75rem;
        gap: 1rem;
    }
    body[data-page="portfolio"] header .logo-icon-wrapper {
        flex: 0 0 auto;
        width: clamp(128px, 13vw, 175px);
    }
    body[data-page="portfolio"] header .logo-img {
        height: clamp(92px, 9.5vw, 124px);
    }
    body[data-page="portfolio"] header nav {
        position: static;
        left: auto;
        transform: none;
        flex: 1 1 auto;
        display: flex;
        justify-content: center;
        min-width: 0;
    }
    body[data-page="portfolio"] header nav ul {
        gap: clamp(0.85rem, 1.8vw, 2.2rem);
    }
    body[data-page="portfolio"] header nav a {
        font-size: clamp(0.92rem, 1.2vw, 1.25rem);
    }
    body[data-page="portfolio"] header .header-actions {
        flex: 0 0 auto;
        gap: 0.7rem;
    }
    body[data-page="portfolio"] header .btn-outline {
        padding: 0.55rem 1.1rem;
        font-size: clamp(0.88rem, 1.1vw, 1rem);
        white-space: nowrap;
    }
}

/* Rimuove griglia di sfondo a puntini ovunque + nasconde dock contatti e sfumatura inferiore nel Portfolio */
body::before { display: none !important; }
body[data-page="portfolio"] .floating-contact-dock,
body[data-page="portfolio"] .bottom-gradient-overlay,
body.case-open .floating-contact-dock { display: none !important; }

/* Toggle 3D 360° inline ESCLUSIVO per la card Hero in Home Portfolio */
.pf-hero-3d-toggle {
    cursor: pointer;
    pointer-events: auto;
    border: 1px solid rgba(255, 102, 0, 0.55);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.pf-hero-3d-toggle:hover {
    border-color: var(--accent-color);
    background: rgba(255, 102, 0, 0.22);
    transform: translateY(-1px);
}
.pf-hero-3d-toggle.is-active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000000;
    font-weight: 600;
}
body.light-theme .pf-hero-3d-toggle {
    border-color: rgba(37, 99, 235, 0.45);
}
body.light-theme .pf-hero-3d-toggle:hover {
    background: rgba(37, 99, 235, 0.14);
}
body.light-theme .pf-hero-3d-toggle.is-active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}
.pf-hero-3d-host {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    background: #000000;
}
body.light-theme .pf-hero-3d-host {
    background: #ffffff;
}
.pf-card.is-hero-3d-on .pf-hero-3d-host {
    display: block;
}
.pf-card.is-hero-3d-on .pf-card-media > img {
    opacity: 0;
    pointer-events: none;
}
.pf-card.is-hero-3d-on .pf-card-badges {
    z-index: 4;
}

/* Mobile (<= 900px): spazio extra in fondo alla scheda progetto così "Hai un progetto simile? + Parliamone" resta sempre sopra l'header in basso */
@media (max-width: 900px) {
    .case-overlay.is-editorial .case-scroll {
        padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .cs-footer {
        margin-bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
