/* ==========================================================================
   Beweb Studio v2 — pages.css
   Componenti delle pagine interne (markup generato da tools/build.js).
   Stile editoriale chiaro: righe e tabelle, bordi navy, ombre gialle piene.
   ========================================================================== */

/* ---------- Stati iniziali ---------- */
.has-motion [data-hero-split] { visibility: hidden; }
.has-motion [data-hero-in] { opacity: 0; }
/* niente !important: GSAP Flip deve poter mostrare in linea le righe in uscita */
.pj[hidden], .qstep[hidden] { display: none; }
h2[id] { scroll-margin-top: 110px; }

/* ---------- Hero di pagina ---------- */
.phero { position: relative; overflow: hidden; padding: calc(var(--header-h) + clamp(40px, 7vw, 96px)) 0 clamp(48px, 6vw, 88px); border-bottom: 1.5px solid var(--navy-900); }
.phero__inner { position: relative; z-index: 1; }
.phero__deco { position: absolute; inset: 0; pointer-events: none; }
.phero__deco i { position: absolute; }
.phero__deco i:nth-child(1) { right: 6vw; top: 26%; width: clamp(90px, 13vw, 200px); aspect-ratio: 1; background: var(--yellow); border: 1.5px solid var(--navy-900); transform: rotate(12deg); }
.phero__deco i:nth-child(2) { right: 16vw; top: 52%; width: clamp(70px, 9vw, 140px); aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--navy-900); background: var(--ice); }
.phero__deco i:nth-child(3) { right: 3vw; top: 62%; width: clamp(110px, 16vw, 240px); height: 14px; background: var(--blue); border: 1.5px solid var(--navy-900); transform: rotate(-8deg); }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .8rem; border-top: 1.5px solid var(--navy-900); margin-bottom: clamp(32px, 5vw, 64px); font-family: var(--f-display); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.crumbs a { background: linear-gradient(var(--yellow), var(--yellow)) no-repeat 0 100% / 0 40%; transition: background-size .4s var(--ease); }
.crumbs a:hover { background-size: 100% 40%; }
.crumbs [aria-current] { color: var(--muted); }
.crumbs__sep { color: var(--muted); }
.phero__kicker { display: inline-block; font-family: var(--f-display); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; padding: .3em .6em; background: var(--yellow); border: 1.5px solid var(--navy-900); margin-bottom: 1.4rem; }
.phero__title { font-size: clamp(2.6rem, 1.2rem + 5.6vw, 7.4rem); letter-spacing: -.055em; line-height: .92; max-width: 13ch; }
.phero__title .c { display: inline-block; }
.phero__lead { margin-top: 1.8rem; max-width: 48ch; font-size: clamp(1.05rem, .95rem + .4vw, 1.3rem); color: var(--muted); }
.phero__icon { margin-top: 2rem; }
.phero__icon .svc-icon { width: 72px; height: 72px; padding: 14px; border: 1.5px solid var(--navy-900); border-radius: 50%; background: var(--yellow); }
.phero__tags { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.phero__tags span { padding: .35em .8em; border: 1.5px solid var(--navy-900); border-radius: 99px; font-size: .85rem; background: var(--white); }
.phero--post .phero__title, .phero--project .phero__title { max-width: 18ch; font-size: clamp(2.2rem, 1.2rem + 4.2vw, 6rem); }

/* ---------- Sezioni ---------- */
.psec { position: relative; padding-block: clamp(64px, 8vw, 128px); }
.psec + .psec { border-top: 1px solid var(--line); }
.psec__head { margin-bottom: clamp(32px, 4.5vw, 64px); }
.psec__title { font-size: clamp(2rem, 1.2rem + 3vw, 4.2rem); max-width: 16ch; letter-spacing: -.045em; }
.psec__intro { margin-top: 1rem; max-width: 60ch; color: var(--muted); }
.psec__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 120px); align-items: start; }
.split__side { position: sticky; top: calc(var(--header-h) + 24px); }

.prose { font-size: clamp(1.02rem, .96rem + .25vw, 1.16rem); line-height: 1.75; color: rgba(2, 26, 41, .82); }
.prose p + p { margin-top: 1.1em; }
.prose h2 { margin: 2.2em 0 .7em; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.3rem); color: var(--ink); }
.prose h3 { margin: 1.8em 0 .5em; font-size: 1.25rem; letter-spacing: -.02em; color: var(--ink); }
.prose ul { margin: 1em 0; border-top: 1px solid var(--line); }
.prose ul li { padding: .7em 0 .7em 2rem; border-bottom: 1px solid var(--line); position: relative; }
.prose ul li::before { content: "→"; position: absolute; left: 0; font-family: var(--f-display); font-weight: 700; }
.prose--lead { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.2rem, 1rem + .8vw, 1.7rem); line-height: 1.35; letter-spacing: -.02em; color: var(--ink); }

.ablocks { border-top: 1.5px solid var(--navy-900); }
.ablock { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; padding-block: 1.6rem; border-bottom: 1px solid var(--line); }
.ablock h3 { font-size: 1.3rem; }
.ablock p { color: var(--muted); }

/* ---------- Numeri ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border-top: 1.5px solid var(--navy-900); border-left: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; gap: 1rem; padding: clamp(24px, 3vw, 40px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); transition: background-color .4s; }
.stat:hover { background: var(--yellow); }
.stat__n { font-family: var(--f-display); font-weight: 700; font-size: clamp(3rem, 1.8rem + 3.6vw, 5.6rem); letter-spacing: -.06em; line-height: .9; }
.stat__n small { font-size: .4em; letter-spacing: -.02em; }
.stat__l { color: var(--muted); max-width: 24ch; }

/* ---------- Valori ---------- */
.vrow { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.5px solid var(--navy-900); }
.vrow__item { padding: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 32px) clamp(24px, 3vw, 40px) 0; border-bottom: 1px solid var(--line); }
.vrow__item + .vrow__item { padding-left: clamp(16px, 2vw, 32px); border-left: 1px solid var(--line); }
.vrow__n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy-900); color: var(--yellow); font-family: var(--f-display); font-weight: 700; font-size: .85rem; transition: transform .6s var(--ease); }
.vrow__item:hover .vrow__n { transform: rotate(-20deg) scale(1.1); }
.vrow__item h3 { margin: 1.6rem 0 .5rem; font-size: var(--fs-h3); }
.vrow__item p { color: var(--muted); }
.vrow__item strong { color: var(--ink); text-transform: uppercase; }

/* ---------- Tag ---------- */
.tagcloud { display: flex; flex-wrap: wrap; gap: .45rem; }
.tagcloud li { padding: .5em 1em; border: 1.5px solid var(--navy-900); border-radius: 99px; background: var(--white); font-family: var(--f-display); font-weight: 500; transition: background-color .3s, transform .4s var(--ease); }
.tagcloud li:hover { background: var(--yellow); transform: rotate(-3deg); }
.psec--work .tagcloud { margin-bottom: clamp(48px, 6vw, 80px); }

/* ---------- Link ai servizi (tabella) ---------- */
.svc-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1.5px solid var(--navy-900); border-left: 1px solid var(--line); }
/* 6 servizi (Chi siamo, 404): due righe da 3 invece di 5 + 1 */
@media (min-width: 761px) { .svc-links:has(> .svc-link:nth-child(6)) { grid-template-columns: repeat(3, 1fr); } }
.svc-link { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: .6rem; min-height: 230px; padding: clamp(20px, 2.4vw, 30px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.svc-link::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--yellow); transform: translateY(101%); transition: transform .55s var(--ease); }
.svc-link:hover::before { transform: translateY(0); }
.svc-icon { width: 44px; height: 44px; fill: none; stroke: var(--navy-900); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease); }
.svc-link:hover .svc-icon { transform: rotate(-10deg) scale(1.1); }
.svc-link__t { margin-top: auto; font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.03em; }
.svc-link__d { color: var(--muted); font-size: .93rem; }
.svc-link__go { position: absolute; top: 18px; right: 18px; font-size: 1.3rem; transition: transform .5s var(--ease); }
.svc-link:hover .svc-link__go { transform: rotate(45deg); }

/* ---------- Indice servizi: righe ---------- */
.svc-rows { border-top: 1.5px solid var(--navy-900); }
.svc-row { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 70px 1.2fr 1fr 60px; align-items: center; gap: 1.5rem; padding-block: clamp(24px, 3.4vw, 48px); border-bottom: 1.5px solid var(--navy-900); }
.svc-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--yellow); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); }
.svc-row:hover::before { transform: scaleY(1); }
.svc-row__n { font-family: var(--f-display); font-size: .85rem; padding-left: .6rem; }
.svc-row__icon { display: none; }
.svc-row__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 1rem + 3.6vw, 5rem); letter-spacing: -.055em; line-height: 1; transition: transform .7s var(--ease); }
.svc-row:hover .svc-row__title { transform: translateX(18px); }
.svc-row__desc { color: var(--muted); }
.svc-row:hover .svc-row__desc { color: var(--ink); }
.svc-row__go { justify-self: end; margin-right: .6rem; font-size: 1.8rem; transition: transform .6s var(--ease); }
.svc-row:hover .svc-row__go { transform: rotate(45deg); }

/* ---------- Duo / trio ---------- */
.duo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.duo--3 { grid-template-columns: repeat(3, 1fr); }
.duo__item { padding: clamp(24px, 3vw, 44px); border: 1.5px solid var(--navy-900); border-radius: var(--r); background: var(--white); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.duo__item:hover { transform: translate(-4px, -4px); box-shadow: 10px 10px 0 var(--yellow); }
.duo__item:nth-child(2) { background: var(--navy-900); color: var(--white); }
.duo__item:nth-child(2) p { color: rgba(206, 239, 255, .75); }
.duo__item:nth-child(2) .duo__n { background: var(--yellow); color: var(--navy-900); }
.duo__n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy-900); color: var(--yellow); font-family: var(--f-display); font-weight: 700; margin-bottom: 2rem; }
.duo__item h3 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2.2rem); margin-bottom: .7rem; }
.duo__item p { color: var(--muted); }

/* ---------- Caratteristiche: tabella a celle ---------- */
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.5px solid var(--navy-900); border-left: 1px solid var(--line); }
.fcard { padding: clamp(22px, 2.6vw, 34px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); transition: background-color .4s; }
.fcard:hover { background: var(--ice-50); }
.fcard__n { font-family: var(--f-display); font-size: .8rem; padding: .2em .5em; background: var(--yellow); border: 1px solid var(--navy-900); }
.fcard h3 { margin: 1.4rem 0 .4rem; font-size: 1.25rem; letter-spacing: -.03em; }
.psec__gap { height: clamp(40px, 5vw, 72px); }
/* link nei testi (articoli, testi SEO dei casi studio, servizi) */
.prose a, .psec__intro a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow-600); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: background-color .3s; }
.prose a:hover, .psec__intro a:hover { background: var(--yellow); }
/* Icone animate (stile lordicon): si disegnano quando il box entra in vista, si muovono al passaggio del mouse.
   Senza JS o con "riduci movimento" restano ferme e già disegnate. */
.fcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.fcard__top .fcard__n { margin-top: .2rem; }
.fcard__icon { width: 56px; height: 56px; overflow: visible; fill: none; stroke: var(--navy-900); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fcard__icon .ic-2 { stroke: var(--blue-500); }
.fcard__icon .ic-blob { fill: var(--yellow); stroke: none; transform-box: fill-box; transform-origin: center; transition: transform .7s var(--ease) .45s; }
.fcard__icon .ic-g { transform-box: fill-box; transform-origin: 50% 90%; }
/* --len = lunghezza reale del tratto, misurata da pages.js (solo sugli elementi misurati: data-len) */
.fx-icons .fcard__icon [data-len] { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.1s cubic-bezier(.65, 0, .35, 1); }
.fx-icons .fcard__icon .ic-2 { transition-delay: .35s; }
.fx-icons .fcard:not(.is-drawn) .ic-blob { transform: scale(0); transition-delay: 0s; }
.fx-icons .fcard.is-drawn .fcard__icon [data-len] { stroke-dashoffset: 0; }
.fx-icons .fcard.ic-reset .fcard__icon * { transition: none !important; }
.fx-icons .fcard.is-drawn:hover .ic-g { animation: ic-wiggle .9s var(--ease); }
.fx-icons .fcard.is-drawn:hover .ic-blob { animation: ic-pop .9s var(--ease); }
@keyframes ic-wiggle { 0% { transform: none; } 20% { transform: rotate(-9deg) scale(1.08); } 45% { transform: rotate(7deg) scale(1.04); } 70% { transform: rotate(-3deg); } 100% { transform: none; } }
@keyframes ic-pop { 0% { transform: scale(1); } 35% { transform: scale(1.35) translate(-2px, -2px); } 100% { transform: scale(1); } }
.fcard p { color: var(--muted); font-size: .96rem; }

/* ---------- Liste formato ---------- */
.lists { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lists__col { padding: clamp(22px, 3vw, 40px); border: 1.5px solid var(--navy-900); border-radius: var(--r); background: var(--white); }
.lists__col:nth-child(2) { background: var(--ice); }
.lists__col h3 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2.2rem); margin-bottom: 1.4rem; }

/* ---------- Timeline step ---------- */
.tsteps { position: relative; list-style: none; padding: 0; margin: 0; border-top: 1.5px solid var(--navy-900); }
.tsteps__line { display: none; }
.tstep { display: grid; grid-template-columns: minmax(80px, 160px) 1fr; gap: 1.5rem; align-items: baseline; padding-block: clamp(20px, 2.6vw, 32px); border-bottom: 1px solid var(--line); }
.tstep__n { font-family: var(--f-display); font-weight: 700; font-size: clamp(2.6rem, 1.6rem + 3vw, 4.6rem); letter-spacing: -.06em; line-height: .9; color: transparent; -webkit-text-stroke: 1.5px var(--navy-900); transition: color .4s; }
.tstep:hover .tstep__n { color: var(--yellow); }
.tstep h3 { font-size: var(--fs-h3); margin-bottom: .3rem; }
.tstep p { color: var(--muted); max-width: 56ch; }

/* ---------- Portfolio: filtri + elenco a righe ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.filter { padding: .55em 1em; border: 1.5px solid var(--navy-900); border-radius: 99px; background: var(--white); font-family: var(--f-display); font-weight: 500; font-size: .9rem; transition: background-color .3s, color .3s; }
.filter sup { font-size: .7em; }
.filter:hover { background: var(--ice-50); }
.filter.is-active { background: var(--navy-900); color: var(--yellow); }
.filters__status { min-height: 1.4em; margin-bottom: 1.4rem; font-size: .9rem; color: var(--muted); }

.pjs { border-top: 1.5px solid var(--navy-900); }
.pj {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 60px 120px 1fr auto 50px; align-items: center; gap: 1.4rem;
  padding-block: clamp(14px, 1.8vw, 22px); border-bottom: 1.5px solid var(--navy-900);
}
.pj::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--yellow); transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease); }
.pj:hover::before { transform: scaleY(1); }
.pj__n { font-family: var(--f-display); font-size: .85rem; padding-left: .6rem; }
.pj__media { display: block; overflow: hidden; aspect-ratio: 4 / 3; border: 1.5px solid var(--navy-900); border-radius: 4px; transition: transform .6s var(--ease); }
.pj__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .5s, transform .9s var(--ease); }
.pj:hover .pj__media { transform: rotate(-4deg) scale(1.08); }
.pj:hover .pj__media img { filter: none; transform: scale(1.08); }
.pj__info { display: contents; }
.pj__title { grid-column: 3; font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, .9rem + 2vw, 3rem); letter-spacing: -.05em; line-height: 1; transition: transform .7s var(--ease); }
.pj:hover .pj__title { transform: translateX(12px); }
.pj__kind { grid-column: 4; grid-row: 1; color: var(--muted); font-size: .92rem; text-align: right; }
.pj:hover .pj__kind { color: var(--ink); }
.pj__arrow { justify-self: end; margin-right: .6rem; font-size: 1.5rem; transition: transform .6s var(--ease); }
.pj:hover .pj__arrow { transform: rotate(45deg); }

/* ---------- Dettaglio progetto ---------- */
.pd-cover { padding-top: clamp(32px, 4vw, 56px); }
.pd-cover__frame { margin: 0; overflow: hidden; aspect-ratio: 16 / 9; border: 1.5px solid var(--navy-900); border-radius: var(--r); box-shadow: 16px 16px 0 var(--yellow); background: var(--ice); }
.pd-cover__frame img { width: 100%; height: 100%; object-fit: cover; }
.pd { display: grid; grid-template-columns: 340px 1fr; gap: clamp(32px, 6vw, 110px); align-items: start; }
.pd__meta { position: sticky; top: calc(var(--header-h) + 24px); }
.pd__meta dl { margin: 0; border-top: 1.5px solid var(--navy-900); }
.pd__meta dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding-block: .9rem; border-bottom: 1px solid var(--line); }
.pd__meta dt { font-family: var(--f-display); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: .2em; }
.pd__meta dd { margin: 0; font-weight: 500; }
.pd__tech { display: flex; flex-wrap: wrap; gap: .3rem; }
.pd__tech li { padding: .15em .6em; border: 1px solid var(--navy-900); border-radius: 99px; font-size: .8rem; }
.pd__h { margin: 3rem 0 1rem; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.3rem); }
.checks { border-top: 1.5px solid var(--navy-900); }
.checks li { display: flex; gap: 1rem; align-items: center; padding-block: .9rem; border-bottom: 1px solid var(--line); font-family: var(--f-display); font-weight: 500; font-size: 1.1rem; }
.checks li::before { content: "✓"; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); border: 1.5px solid var(--navy-900); font-size: .8rem; }

.pd-next { border-top: 1.5px solid var(--navy-900); background: var(--navy-900); color: var(--white); }
.pd-next__prev { display: block; max-width: var(--wrap); margin: 0 auto; padding: 1.4rem var(--pad) 0; font-family: var(--f-display); font-size: .85rem; color: rgba(206, 239, 255, .7); }
.pd-next__prev:hover { color: var(--yellow); }
.pd-next__link { position: relative; display: block; overflow: hidden; max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 7vw, 110px) var(--pad); }
.pd-next__label { display: block; font-family: var(--f-display); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--yellow); margin-bottom: 1rem; }
.pd-next__title { position: relative; z-index: 2; display: block; font-family: var(--f-display); font-weight: 700; font-size: clamp(2.6rem, 1rem + 6.4vw, 8rem); letter-spacing: -.06em; line-height: .9; transition: color .4s; }
.pd-next__link:hover .pd-next__title { color: var(--yellow); }
.pd-next__img { position: absolute; z-index: 1; left: 0; top: 0; width: 280px; aspect-ratio: 4 / 3; margin: -105px 0 0 -140px; overflow: hidden; border: 1.5px solid var(--yellow); border-radius: 4px; pointer-events: none; opacity: 0; scale: .6; rotate: -6deg; transition: opacity .4s, scale .6s var(--ease); }
.pd-next__img img { width: 100%; height: 100%; object-fit: cover; }
.pd-next__link:hover .pd-next__img { opacity: 1; scale: 1; }

/* ---------- Blog: elenco editoriale ---------- */
.pcs { border-top: 1.5px solid var(--navy-900); }
.pc { position: relative; isolation: isolate; display: grid; grid-template-columns: 200px 1fr; gap: clamp(16px, 3vw, 40px); align-items: center; padding-block: clamp(18px, 2.4vw, 28px); border-bottom: 1px solid var(--line); }
.pc::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--pad)); z-index: -1; background: var(--ice-50); opacity: 0; transition: opacity .4s; }
.pc:hover::before { opacity: 1; }
.pc__media { overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; border: 1.5px solid var(--navy-900); border-radius: 4px; font-family: var(--f-display); font-weight: 700; font-size: 2.6rem; letter-spacing: -.05em; line-height: .85; text-align: center; }
.pc__media span { transition: transform .9s var(--ease); }
.pc:hover .pc__media span { transform: scale(1.15) rotate(-4deg); }
.pc__media--1 { background: var(--navy); color: var(--yellow); }
.pc__media--2 { background: var(--ice); color: var(--navy); }
.pc__media--3 { background: var(--yellow); color: var(--navy-900); }
.pc__body { display: flex; flex-direction: column; gap: .5rem; }
.pc__topic { font-family: var(--f-display); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--blue-600); }
.pc__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.6rem); letter-spacing: -.045em; line-height: 1.02; }
.pc__excerpt { color: var(--muted); max-width: 60ch; }
.psec--blog .pc:first-child { grid-template-columns: 1.2fr 1fr; }
.psec--blog .pc:first-child .pc__media { aspect-ratio: 16 / 10; font-size: clamp(4rem, 2rem + 6vw, 8rem); }
.psec--blog .pc:first-child .pc__title { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.8rem); }

/* ---------- Articolo / legale ---------- */
.read-progress { position: fixed; z-index: 101; top: 0; left: 0; right: 0; height: 5px; pointer-events: none; }
.read-progress i { display: block; height: 100%; background: var(--yellow); border-right: 2px solid var(--navy-900); border-bottom: 1px solid var(--navy-900); transform: scaleX(0); transform-origin: left; }
.post { display: grid; grid-template-columns: 280px minmax(0, 740px); gap: clamp(32px, 6vw, 110px); }
.post__aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: grid; gap: 2rem; }
.toc__title { font-family: var(--f-display); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; border-top: 1.5px solid var(--navy-900); }
.toc li { counter-increment: t; border-bottom: 1px solid var(--line); }
.toc a { display: grid; grid-template-columns: 30px 1fr; padding: .6rem .4rem; font-size: .93rem; line-height: 1.3; transition: background-color .3s; }
.toc a::before { content: counter(t, decimal-leading-zero); font-family: var(--f-display); font-size: .75rem; color: var(--muted); padding-top: .15em; }
.toc a:hover { background: var(--ice-50); }
.toc a.is-active { background: var(--yellow); }
.share { display: flex; flex-direction: column; gap: .3rem; }
.share a { font-family: var(--f-display); font-weight: 500; }
.share a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 4px; }
.post__body > :first-child { margin-top: 0; }
.legal-note { padding: 1rem 1.2rem; border: 1.5px solid var(--navy-900); background: var(--yellow); color: var(--ink); font-size: .95rem; }

/* ---------- Contatti ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.contact__info { display: grid; gap: 12px; }
.ccard { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: .3rem; padding: clamp(20px, 2.4vw, 30px); border: 1.5px solid var(--navy-900); border-radius: var(--r); background: var(--white); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.ccard:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--yellow); }
.ccard__l { font-family: var(--f-display); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ccard__v { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.15rem, 1rem + .6vw, 1.6rem); letter-spacing: -.03em; }
.ccard__more { margin-top: .4rem; font-size: .88rem; }
.ccard--map { min-height: 300px; justify-content: flex-end; }
.ccard--map .ccard__l, .ccard--map .ccard__v, .ccard--map .ccard__more { position: relative; background: var(--white); align-self: flex-start; padding: 0 .3em; }
.map { position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(115deg, transparent 47%, var(--yellow) 47% 50%, transparent 50%),
    linear-gradient(20deg, transparent 60%, rgba(29, 152, 198, .45) 60% 61.5%, transparent 61.5%),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(3, 51, 79, .07) 30px 31px),
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(3, 51, 79, .07) 30px 31px),
    var(--ice-50);
}
.map__pin { position: absolute; left: 60%; top: 34%; width: 22px; height: 22px; margin: -22px 0 0 -11px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--navy-900); border: 3px solid var(--yellow); }
.map__ring { position: absolute; left: 60%; top: 34%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; border: 1.5px solid var(--navy-900); animation: map-pulse 2.4s var(--ease) infinite; }
@keyframes map-pulse { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* ---------- Form ---------- */
.pform, .stepper { display: grid; gap: 1.2rem; padding: clamp(22px, 3vw, 44px); background: var(--white); border: 1.5px solid var(--navy-900); border-radius: var(--r); box-shadow: 14px 14px 0 var(--yellow); }
.pform__title { font-size: var(--fs-h3); }
.pform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.pf { display: grid; gap: .3rem; }
.pf span { font-family: var(--f-display); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pf input, .pf textarea { width: 100%; padding: .85rem 1rem; font: inherit; color: var(--ink); background: var(--ice-25); border: 1.5px solid var(--line); border-radius: var(--r); resize: vertical; transition: border-color .3s, background-color .3s, box-shadow .3s; }
.pf input:focus, .pf textarea:focus { outline: none; border-color: var(--navy-900); background: var(--white); box-shadow: 4px 4px 0 var(--yellow); }
.pcheck { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.pcheck input { width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--navy-900); }
.form-status { min-height: 1.4em; font-size: .95rem; color: var(--blue-600); }
.form-status.is-error { color: #B3261E; }
.form-note { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--muted); }

/* Pagine legali (Privacy Policy, Cookie Policy) */
.legal-meta { display: inline-block; margin: 0 0 1rem; padding: .3em .6em; font-family: var(--f-display); font-size: .8rem; letter-spacing: .04em; border: 1.5px solid var(--navy-900); background: var(--paper); }
.legal ul { padding-left: 1.2em; }
.legal li { margin: .35em 0; }
.legal a:not(.btn) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal .todo { padding: .05em .3em; background: var(--yellow); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--navy-900); }
.legal-prefs { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.legal-btn { margin-top: .4rem; }
.legal-table { margin: 1.2rem 0; overflow-x: auto; border: 1.5px solid var(--navy-900); background: var(--paper); }
.legal-table table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .92rem; line-height: 1.5; }
.legal-table th, .legal-table td { padding: .7rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal-table th { font-family: var(--f-display); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; background: var(--yellow); color: var(--ink); border-bottom: 1.5px solid var(--navy-900); }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table code { font-size: .88em; padding: .1em .35em; background: var(--ice-25, #F3FAFE); border: 1px solid var(--line); }
.pform .btn { justify-self: start; }
.btn--ghost { background: var(--white); color: var(--navy-900); }
.btn--ghost:hover { color: var(--white); }

/* ---------- Preventivo a step ---------- */
.stepper { max-width: 1000px; margin-inline: auto; }
.stepper__nav { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.5px solid var(--navy-900); }
.stepper__nav li { display: flex; align-items: baseline; gap: .6rem; padding: .9rem .4rem; font-family: var(--f-display); font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); transition: background-color .4s, color .4s; }
.stepper__nav span { font-weight: 700; font-size: 1.6rem; letter-spacing: -.05em; }
.stepper__nav li.is-active { background: var(--yellow); color: var(--ink); }
.stepper__nav li.is-done { color: var(--ink); }
.stepper__bar { height: 4px; background: var(--ice-50); border: 1px solid var(--line); }
.stepper__bar i { display: block; height: 100%; background: var(--navy-900); transform-origin: left; transition: transform .7s var(--ease); }
.qstep { border: 0; margin: 0; padding: 0; display: grid; gap: 1.4rem; min-width: 0; }
.qstep__title { padding: 0; font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.6rem); letter-spacing: -.04em; }
.qstep__hint { color: var(--muted); margin-top: -.8rem; }
.optgroup h3 { font-size: 1.05rem; margin-bottom: .7rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.opts { display: flex; flex-wrap: wrap; gap: .45rem; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-block; padding: .5em .95em; border: 1.5px solid var(--navy-900); border-radius: 99px; font-size: .9rem; cursor: pointer; transition: background-color .3s, transform .3s var(--ease); }
.opt span:hover { background: var(--ice-50); }
.opt input:checked + span { background: var(--yellow); }
.opt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.opt span:active { transform: scale(.94); }
.qstep__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .4rem; }
.summary { border-top: 1.5px solid var(--navy-900); }
.summary__row { display: grid; grid-template-columns: 170px 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.summary__row strong { font-family: var(--f-display); }
.summary__row span { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Banda CTA (gialla) ---------- */
.cta-band { position: relative; z-index: 1; overflow: hidden; padding-block: clamp(72px, 9vw, 140px); background: var(--yellow); border-top: 1.5px solid var(--navy-900); }
.cta-band__glow { display: none; }
.cta-band__inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: end; }
.cta-band__title { font-size: clamp(2.6rem, 1.2rem + 5vw, 6.6rem); letter-spacing: -.06em; line-height: .9; }
.cta-band__side { display: grid; gap: 1.4rem; justify-items: start; }
.cta-band__side p { font-size: 1.1rem; }
.cta-band .btn--yellow { background: var(--navy-900); color: var(--yellow); }
.cta-band .btn--yellow::before { background: var(--white); }
.cta-band .btn--yellow:hover { color: var(--navy-900); }

/* ---------- Footer: 4 colonne nelle pagine interne ---------- */
.footer__grid--4 { grid-template-columns: 1.4fr 1fr 1fr 1fr; }

/* ---------- Griglie a box bilanciate (niente box isolati in fondo) ----------
   Desktop: 6 colonne, ogni box ne occupa 2 (= 3 per riga); gli avanzi dell'ultima riga
   si dividono lo spazio: 4 → 2+2, 5 → 3+2, 7 → 3+2+2, 8 → 3+3+2.
   Tablet: 2 per riga, l'ultimo box dispari prende tutta la larghezza. */
@media (min-width: 1101px) {
  .fgrid, .svc-links { grid-template-columns: repeat(6, 1fr); }
  .svc-links:has(> .svc-link:nth-child(6)) { grid-template-columns: repeat(6, 1fr); }
  :is(.fcard, .svc-link) { grid-column: span 2; }
  :is(.fcard, .svc-link):nth-child(3n+1):nth-last-child(2),
  :is(.fcard, .svc-link):nth-child(3n+1):nth-last-child(2) ~ *,
  :is(.fcard, .svc-link):nth-child(3n+1):nth-last-child(4),
  :is(.fcard, .svc-link):nth-child(3n+1):nth-last-child(4) ~ * { grid-column: span 3; }
  :is(.fcard, .svc-link):only-child { grid-column: 1 / -1; }
}
@media (min-width: 601px) and (max-width: 1100px) {
  .fgrid, .svc-links, .svc-links:has(> .svc-link:nth-child(6)) { grid-template-columns: repeat(2, 1fr); }
  :is(.fcard, .svc-link):nth-child(odd):last-child { grid-column: 1 / -1; }
}
/* i casi studio hanno già le loro colonne (data-cols in case.css) */
.cs-work .fgrid > .fcard { grid-column: auto !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .fgrid { grid-template-columns: repeat(2, 1fr); }
  .duo--3 { grid-template-columns: 1fr; }
  .pj { grid-template-columns: 50px 100px 1fr 40px; }
  .pj__kind { grid-column: 3; grid-row: 2; text-align: left; }
  .pj__arrow { grid-column: 4; grid-row: 1 / 3; }
  .pj__media { grid-row: 1 / 3; }
  .pj__n { grid-row: 1 / 3; }
  .footer__grid--4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .split, .pd, .contact, .post, .cta-band__inner { grid-template-columns: 1fr; }
  .split__side, .pd__meta, .post__aside { position: static; }
  .vrow, .lists, .duo { grid-template-columns: 1fr; }
  .vrow__item + .vrow__item { padding-left: 0; border-left: 0; }
  .ablock { grid-template-columns: 1fr; gap: .4rem; }
  .svc-row { grid-template-columns: 1fr 40px; gap: .5rem 1rem; }
  .svc-row__n { display: none; }
  .svc-row__desc { grid-column: 1; }
  .svc-row__go { grid-column: 2; grid-row: 1; }
  .psec--blog .pc:first-child { grid-template-columns: 1fr; }
  .post__aside .share { display: none; }
  .phero__deco { opacity: .35; }
  .pd-next__img { display: none; }
}
@media (max-width: 600px) {
  .fgrid, .pform__row { grid-template-columns: 1fr; }
  .pj { grid-template-columns: 84px 1fr 28px; gap: .4rem .9rem; }
  .pj__n { display: none; }
  .pj__media { grid-column: 1; }
  .pj__title { grid-column: 2; }
  .pj__kind { grid-column: 2; }
  .pj__arrow { grid-column: 3; }
  .pc { grid-template-columns: 96px 1fr; }
  .pc__media { font-size: 1.6rem; }
  .pc__excerpt { display: none; }
  .psec--blog .pc:first-child .pc__excerpt { display: block; }
  .stepper__nav { grid-template-columns: 1fr; }
  .stepper__nav li:not(.is-active) { display: none; }
  .summary__row { grid-template-columns: 1fr; gap: .2rem; }
  .tstep { grid-template-columns: 1fr; gap: .3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .map__ring { animation: none; }
}

/* ==========================================================================
   CASO STUDIO — interpretazione v2: rivista, carta chiara + giallo fluo
   (struttura in css/case.css)
   ========================================================================== */
.page--case {
  --cs-display: var(--f-display);
  --cs-body: var(--f-body);
  --cs-ink: var(--ink);
  --cs-muted: var(--muted);
  --cs-line: var(--line);
  --cs-accent: var(--navy-900);
  --cs-fill: var(--navy-900);
  --cs-ghost: rgba(3, 51, 79, .1);
  --cs-section: var(--section);
  --cs-header: var(--header-h);
  --cs-gutter: var(--pad);
  --cs-ease: var(--ease);
}
/* Hero: titolo enorme sopra, immagine intera sotto (proporzioni dello screenshot, niente striscia tagliata)
   che con lo scroll passa dal bianco e nero al colore */
.cs-hero {
  display: grid; grid-template-rows: auto auto; align-items: start;
  height: auto; min-height: 0; padding-bottom: clamp(48px, 8vh, 96px);
  background: var(--bg); color: var(--ink); border-bottom: 1.5px solid var(--navy-900);
}
.cs-hero__inner { order: -1; padding-bottom: clamp(28px, 5vh, 56px); }
.cs-hero__media {
  position: relative; inset: auto; justify-self: center;
  width: min(calc(100% - 2 * var(--pad)), calc(78vh * 4 / 3), 1200px); aspect-ratio: 4 / 3;
  clip-path: none; border: 1.5px solid var(--navy-900); border-radius: var(--r);
  box-shadow: 14px 14px 0 var(--yellow);
}
@media (max-width: 700px) { .cs-hero__media { width: calc(100% - 2 * var(--pad) - 8px); justify-self: start; margin-left: var(--pad); box-shadow: 8px 8px 0 var(--yellow); } }
.cs-hero__media::after { background: none; }
.cs-hero__media img { position: absolute; inset: 0; object-position: 50% 30%; filter: grayscale(calc(1 - var(--p, 0))) contrast(1.04); transform: scale(calc(1.08 - var(--p, 0) * .08)); }
.cs-hero__mask { display: none; }
.cs-hero__kicker { font-family: var(--f-display); font-weight: 500; }
.cs-hero__kicker span { padding: .2em .55em; background: var(--yellow); color: var(--navy-900); }
.cs-hero__title { max-width: none; margin-bottom: clamp(20px, 3vh, 36px); font-size: clamp(3rem, .6rem + 8.6vw, 11rem); font-weight: 700; line-height: .84; letter-spacing: -.065em; }
.cs-meta { border-top: 1.5px solid var(--navy-900); padding-top: 14px; }
.cs-meta dt { font-family: var(--f-display); opacity: .55; }

.cs-intro { border-bottom: 1px solid var(--line); }
.cs-statement { max-width: 20ch; font-weight: 500; letter-spacing: -.05em; }
.cs-statement em { font-style: normal; background: var(--yellow); padding-inline: .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.cs-chapters__sticky { border-top: 1.5px solid var(--navy-900); }
.cs-chapters__n { font-weight: 700; letter-spacing: -.08em; }
.cs-chapters__names a.is-active { box-shadow: inset 0 -.5em 0 var(--yellow); }
.cs-ch { border-top: 1.5px solid var(--navy-900); }
.cs-ch__title { letter-spacing: -.045em; }

/* Vetrina: blocco navy, dispositivi con ombra piena gialla */
.cs-show { background: var(--navy-900); color: var(--white); }
.cs-show .label { color: var(--yellow); }
.cs-show__title { color: var(--white); letter-spacing: -.05em; }
.cs-browser { border-radius: var(--r); box-shadow: 14px 14px 0 var(--yellow); }
.cs-phone { border-radius: 26px; box-shadow: 8px 8px 0 var(--yellow); }

.cs-values { background: var(--yellow); border-block: 1.5px solid var(--navy-900); }
.cs-values__line { font-weight: 700; letter-spacing: -.07em; line-height: .92; }
.cs-values__line span { --cs-ghost: rgba(3, 51, 79, .14); }
.cs-values__text { color: var(--navy-900); }

.cs-next { border-top: 1.5px solid var(--navy-900); }
.cs-next__title { font-weight: 700; letter-spacing: -.065em; }

/* ---------- Mockup servizi (struttura in css/mockups.css) ---------- */
.ms { --ms-font: var(--f-body); --ms-acc: var(--blue-500); --ms-glow: radial-gradient(circle, rgba(228, 255, 26, .7), rgba(228, 255, 26, .2) 55%, transparent 72%); }

/* ---------- SEO locale: punti di forza, zone, FAQ, CTA in hero ---------- */
.vrow--4 { grid-template-columns: repeat(4, 1fr); }
.phero__cta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2rem; }
.area-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; }
.area-links a { display: inline-flex; align-items: center; gap: .5em; padding: .6em 1.1em; border: 1.5px solid var(--navy-900); border-radius: 99px; background: var(--white); font-family: var(--f-display); font-weight: 500; transition: background-color .3s, transform .4s var(--ease); }
.area-links a::after { content: "→"; }
.area-links a:hover { background: var(--yellow); transform: rotate(-2deg); }
.faq { border-top: 1.5px solid var(--navy-900); max-width: 1100px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.4rem 0; cursor: pointer; list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.6rem); font-weight: 500; letter-spacing: -.02em; }
.faq__q i { position: relative; flex: none; width: 36px; height: 36px; border: 1.5px solid var(--navy-900); border-radius: 50%; background: var(--white); transition: background-color .3s; }
.faq__item[open] .faq__q i { background: var(--yellow); }
.faq__q i::before, .faq__q i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.8px; background: var(--navy-900); translate: -50% -50%; transition: rotate .35s var(--ease); }
.faq__q i::after { rotate: 90deg; }
.faq__item[open] .faq__q i::after { rotate: 0deg; }
.faq__a { padding: 0 0 1.5rem; max-width: 72ch; color: var(--muted); }
.footer__zones { margin: 2rem 0 0; color: var(--muted); font-family: var(--f-display); font-size: .92rem; }
.footer__zones a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow-600); text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (max-width: 1000px) { .vrow--4 { grid-template-columns: 1fr 1fr; } .vrow--4 .vrow__item:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 640px) { .vrow--4 { grid-template-columns: 1fr; } .vrow--4 .vrow__item { padding-left: 0 !important; border-left: 0 !important; } }

/* v4-fable — preventivo: le aree si aprono una alla volta, con il numero di voci scelte */
details.optgroup { border: 1.5px solid var(--navy-900); border-radius: var(--r); background: var(--paper); }
details.optgroup + details.optgroup { margin-top: -.4rem; }
details.optgroup summary { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; cursor: pointer; list-style: none; font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; }
details.optgroup summary::-webkit-details-marker { display: none; }
details.optgroup summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.optgroup__t { flex: 1; }
.optgroup__n { font-size: .78rem; font-weight: 500; padding: .25em .7em; border-radius: 99px; background: var(--yellow); border: 1.5px solid var(--navy-900); }
.optgroup__n:empty { display: none; }
.optgroup__chev { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1.5px solid var(--navy-900); border-radius: 50%; font-weight: 500; transition: transform .35s var(--ease), background-color .3s; }
details.optgroup[open] .optgroup__chev { transform: rotate(45deg); background: var(--yellow); }
details.optgroup .opts { padding: 0 1.1rem 1.1rem; }
.opt--help { align-self: flex-start; }
.opt--help span { border-style: dashed; }
.qstep__hint { margin-top: -.3rem; }
