/* OGT Solar — pezzi propri del case study, sopra case-study.css.
   Il confronto prima/dopo è lo stesso di iwm.studio. */

.case-study-page.cso { --cso-accent: #F39E15; --cso-blue: #173A63; }
.case-study-page.cso .cs-obj-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) {
    .case-study-page.cso .cs-obj-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .case-study-page.cso .cs-obj-grid { grid-template-columns: 1fr; }
}
.case-study-page.cso .cs-hero-cover { overflow: hidden; }
.case-study-page.cso .cs-hero-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;
    z-index: 0;
    pointer-events: none;
}

.cso-facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
}
.cso-facts li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--glass-border);
}
.cso-facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.cso-facts strong {
    font-family: 'Nunito Sans', sans-serif;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--cs-accent, #F39E15);
    line-height: 1;
}
.cso-facts span {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.cso-break {
    position: relative;
    height: 68vh;
    height: 68svh;
    min-height: 380px;
    background: #070707;
    overflow: hidden;
}
.cso-break-film {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;
    pointer-events: none;
}

.cso-compare { position: relative; }
.cso-hint {
    margin: 12px 0 0;
    max-width: 62ch;
    color: var(--text-muted);
    line-height: 1.5;
}
.cso-scroll { position: relative; height: 320vh; }
.cso-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    display: flex;
    align-items: stretch;
    padding: 150px 0 110px;
    box-sizing: border-box;
}
.cso-stage-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    height: 100%;
    min-height: 0;
}
.cso-prog {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.cso-track {
    width: 120px;
    height: 4px;
    border-radius: 2px;
    background: var(--glass-border);
    overflow: hidden;
}
.cso-track i {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--cs-accent, #F39E15);
    transform-origin: 0 0;
    transform: scaleX(0);
}

.cso-browser {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-primary);
}
.cso-bar {
    height: 42px;
    flex: none;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid var(--glass-border);
}
.cso-dots { display: flex; gap: 6px; }
.cso-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.45;
}
.cso-view {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    touch-action: pan-y;
}
.cso-layer { position: absolute; inset: 0; overflow: hidden; }
.cso-layer--dopo { clip-path: inset(0 0 0 50%); }
.cso-page {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    will-change: transform;
}
.cso-page picture,
.cso-page img { display: block; width: 100%; height: auto; }

.cso-tag {
    position: absolute;
    top: 12px;
    z-index: 3;
    pointer-events: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 6px;
}
.cso-tag--prima { left: 12px; background: #173A63; color: #fff; }
.cso-tag--dopo { right: 12px; background: #F39E15; color: #1a1206; }

.cso-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 48px;
    margin-left: -24px;
    z-index: 4;
    cursor: ew-resize;
    touch-action: none;
    outline: none;
}
.cso-handle::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    margin-left: -1.5px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(23, 58, 99, 0.35);
}
.cso-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    background: #fff;
    color: #173A63;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.cso-knob svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cso-handle:focus-visible .cso-knob { outline: 3px solid #F39E15; outline-offset: 3px; }

.cso-sub {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
    letter-spacing: -0.5px;
    margin: 56px 0 18px;
    color: var(--text-primary);
}
.cso-note { font-size: 0.9rem; line-height: 1.55; color: var(--text-muted); margin: 12px 0 0; }
.cso-more { margin: 36px 0 0; color: var(--text-muted); }

.cso-logos { display: grid; gap: 24px; }
@media (min-width: 768px) { .cso-logos { grid-template-columns: 1fr 1fr; } }
.cso-logo {
    margin: 0;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 22px;
}
.cso-logo figcaption {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cs-accent, #F39E15);
    margin-bottom: 14px;
}
.cso-logo-light,
.cso-logo-dark { display: grid; place-items: center; padding: 40px 28px; }
.cso-logo-light { background: #f3f5f6; border-radius: 10px 10px 0 0; }
.cso-logo-dark { background: #173A63; border-radius: 0 0 10px 10px; }
.cso-logo-light img,
.cso-logo-dark img { width: min(100%, 320px); height: auto; }
.cso-logo-80 { display: block; width: min(100%, 260px); height: auto; margin-top: 16px; }

.cso-small {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 40px;
    margin-top: 24px;
    padding: 20px 24px;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}
.cso-small-label { font-size: 13px; color: var(--text-muted); }
.cso-small img { width: 120px; height: auto; background: #f3f5f6; padding: 8px 10px; border-radius: 8px; }

.cso-two { display: grid; gap: 32px; margin-top: 36px; }
@media (min-width: 900px) { .cso-two { grid-template-columns: 1fr 1fr; gap: 48px; } }
.cso-two h3 {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 10px;
    color: var(--text-primary);
}

.cso-palettes { display: grid; gap: 32px; }
@media (min-width: 900px) { .cso-palettes { grid-template-columns: 1fr 1fr; gap: 48px; } }
.cso-pal-title { font-weight: 700; margin: 0 0 14px; color: var(--text-primary); }
.cso-swatches {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 16px 12px;
}
.cso-swatches i {
    display: block;
    height: 56px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
}
.cso-swatches code {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    background: none;
    padding: 0;
}
.cso-swatches span { display: block; font-size: 12px; line-height: 1.35; color: var(--text-muted); }

.cso-type { margin: 0; }
.cso-type img,
.cso-apply img { width: 100%; height: auto; border-radius: 12px; display: block; }
.cso-apply { display: grid; gap: 20px; }
.cso-apply figure {
    margin: 0;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px;
}
.cso-apply figcaption { font-size: 0.85rem; color: var(--text-muted); margin-top: 10px; }

.cso-results-intro {
    max-width: 68ch;
    margin: 8px 0 32px;
    color: var(--text-muted);
    line-height: 1.6;
}
.cso-psi { display: grid; gap: 20px; }
@media (min-width: 900px) { .cso-psi { grid-template-columns: 1fr 1fr; } }
.cso-psi-col {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px 22px 8px;
}
.cso-psi-col h3 {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 16px;
    color: var(--text-primary);
}
.cso-scores {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.cso-scores strong {
    display: block;
    font-family: 'Nunito Sans', sans-serif;
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    font-weight: 800;
    line-height: 1;
    color: var(--cs-accent, #F39E15);
}
.cso-scores span {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.cso-agentic {
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.92rem;
    color: var(--text-muted);
}
.cso-agentic strong { color: var(--text-primary); }
.cso-metrics { margin: 4px 0 0; }
.cso-metrics div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}
.cso-metrics dt { font-weight: 600; color: var(--text-primary); }
.cso-metrics dd {
    margin: 0;
    font-weight: 800;
    color: var(--text-primary);
}
.cso-metrics .is-avg dd { color: #E67E22; }
.cso-metrics small {
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cso-table-wrap { overflow-x: auto; margin-top: 8px; }
.cso-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.cso-table th,
.cso-table td {
    text-align: left;
    padding: 14px 16px 14px 0;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: baseline;
}
.cso-table thead th {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}
.cso-table tbody th { font-weight: 600; color: var(--text-primary); }
.cso-table td:last-child { color: var(--cs-accent, #F39E15); font-weight: 700; }

.cso-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 8px;
}
.cso-kpi {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 22px 16px;
    text-align: center;
}
.cso-kpi strong {
    display: block;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--cs-accent, #F39E15);
    line-height: 1;
}
.cso-kpi span {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.cso-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 767px) {
    .cso-bar { display: none; }
    .cso-scroll { height: 280vh; }
    .cso-stage { padding: 96px 0 88px; }
    .cso-hint { display: none; }
    .cso-scores,
    .cso-kpis { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
    .cso-track { width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
    .cso-page { will-change: auto; }
}
