/* ==========================================================================
   Beweb Studio — case.css (comune a v1, v2 e v3, copiato da tools/case.css)
   --------------------------------------------------------------------------
   Struttura del template "caso studio" delle pagine progetto.
   Qui solo layout e meccanica: colori, font e carattere li decide il
   css/pages.css di ogni versione impostando le variabili --cs-* su .page--case
   (e sovrascrivendo dove serve).

   --p (0→1) viene impostata da js/pages.js con lo scroll su .cs-hero e .cs-next.
   ========================================================================== */

.page--case {
  --cs-display: system-ui, sans-serif;
  --cs-body: system-ui, sans-serif;
  --cs-ink: #021A29;
  --cs-muted: rgba(3, 51, 79, .66);
  --cs-line: rgba(3, 51, 79, .14);
  --cs-accent: #1D98C6;
  --cs-fill: #021A29;
  --cs-ghost: rgba(3, 51, 79, .12);
  --cs-section: clamp(88px, 11vw, 160px);
  --cs-header: 80px;
  --cs-gutter: clamp(16px, 4vw, 56px);
  --cs-ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- 1. Hero a tutto schermo ---------- */
.cs-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: #000;
  color: #fff;
}
.cs-hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* cornice che si stringe con lo scroll: i valori li sceglie ogni versione */
  clip-path: inset(calc(var(--p, 0) * var(--cs-frame-y, 0%)) calc(var(--p, 0) * var(--cs-frame-x, 0%)) round calc(var(--p, 0) * var(--cs-frame-r, 0px)));
}
.cs-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(calc(1 + var(--p, 0) * var(--cs-zoom, 0)));
}
.cs-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cs-hero-shade, linear-gradient(to top, rgba(0, 0, 0, .86), rgba(0, 0, 0, .15) 58%, rgba(0, 0, 0, .5)));
}
.cs-hero__mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--cs-accent);
  transform: scaleX(0);
  pointer-events: none;
}
.cs-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: calc(var(--cs-header) + 24px);
  padding-bottom: clamp(28px, 6vh, 64px);
  transform: translateY(calc(var(--p, 0) * var(--cs-lift, 0vh)));
}
.cs-hero .crumbs { color: inherit; }
.cs-hero__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1rem;
  margin: 1.4rem 0 .9rem;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cs-hero__title {
  max-width: 12ch;
  margin: 0 0 clamp(28px, 5vh, 56px);
  font-family: var(--cs-display);
  font-size: clamp(3rem, 1rem + 8vw, 10rem);
  line-height: .92;
  letter-spacing: -.045em;
}
.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px clamp(16px, 3vw, 48px);
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .24);
}
.cs-meta dt {
  margin-bottom: .35rem;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .62;
}
.cs-meta dd { margin: 0; font-size: .98rem; line-height: 1.45; }

/* ---------- 2. Frase manifesto + numeri ---------- */
.cs-intro { padding-block: var(--cs-section); }
.cs-statement {
  max-width: 18ch;
  margin: 1.2rem 0 clamp(48px, 6vw, 96px);
  font-family: var(--cs-display);
  font-size: clamp(2.1rem, 1rem + 4vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -.035em;
}

/* ---------- 3. Capitoli: sfida / idea / soluzione ---------- */
.cs-chapters { padding-block: calc(var(--cs-section) * .6); }
.cs-chapters__grid { display: grid; grid-template-columns: 1fr; }
.cs-chapters__aside { display: none; }
.has-motion .cs-chapters__grid { grid-template-columns: minmax(0, .75fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 120px); }
.has-motion .cs-chapters__aside { display: block; }
.cs-chapters__sticky { position: sticky; top: 24vh; display: grid; justify-items: start; gap: .5rem; padding-block: clamp(40px, 8vh, 90px); }
.cs-chapters__n {
  display: block;
  height: 1em;
  overflow: hidden;
  font-family: var(--cs-display);
  font-size: clamp(4.5rem, 2rem + 8vw, 11rem);
  line-height: 1;
  letter-spacing: -.05em;
}
.cs-chapters__reel { display: block; transform: translateY(calc(var(--i, 0) * -1em)); transition: transform .9s var(--cs-ease); }
.cs-chapters__reel i { display: block; height: 1em; font-style: normal; }
.cs-chapters__tot { font-size: .9rem; color: var(--cs-muted); }
.cs-chapters__names { display: grid; justify-items: start; gap: .35rem; margin-top: 1.4rem; }
.cs-chapters__names a { font-weight: 500; color: var(--cs-muted); opacity: .6; text-decoration: none; cursor: pointer; transition: opacity .4s, color .4s, transform .4s var(--cs-ease, ease); }
.cs-chapters__names a:hover, .cs-chapters__names a:focus-visible { opacity: 1; color: var(--cs-ink); transform: translateX(6px); }
.cs-chapters__names a.is-active { color: var(--cs-ink); opacity: 1; }
.cs-ch { scroll-margin-top: calc(var(--cs-header, 80px) + 24px); }
.cs-ch {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 62vh;
  padding-block: clamp(40px, 8vh, 90px);
  border-top: 1px solid var(--cs-line);
}
.cs-ch:first-child { border-top: 0; }
.cs-ch__label { margin: 0; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cs-muted); }
.cs-ch__label span { color: var(--cs-accent); font-weight: 700; }
.cs-ch__title { max-width: 18ch; margin: .8rem 0 1.3rem; font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3.8rem); line-height: 1.04; }
.cs-ch__text { max-width: 58ch; margin: 0; font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); color: var(--cs-muted); }

/* ---------- 4. Vetrina: browser + telefoni ---------- */
.cs-show { position: relative; padding-block: var(--cs-section); overflow-x: clip; }
.cs-show__head { margin-bottom: clamp(24px, 4vw, 56px); }
.cs-show__title { max-width: 16ch; margin: .8rem 0 0; font-size: clamp(2rem, 1.2rem + 3vw, 4.4rem); line-height: 1; }
.cs-show__stage {
  position: relative;
  width: min(100%, calc(72vh * 1.62));
  margin-inline: auto;
  padding-block: clamp(20px, 3vw, 40px);
}
.cs-browser { position: relative; z-index: 1; margin: 0; overflow: hidden; border-radius: 14px; background: #1c1e21; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .6); }
.cs-browser__bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: #26292d; }
.cs-browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #4a4f55; }
.cs-browser__bar span {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 340px;
  height: 22px;
  margin-left: 14px;
  padding-inline: 10px;
  border-radius: 6px;
  background: #1c1e21;
  color: #9aa1a8;
  font: 12px/1 system-ui, sans-serif;
  white-space: nowrap;
  overflow: hidden;
}
.cs-browser__screen { position: relative; aspect-ratio: 16 / 9.2; overflow: hidden; background: #0c0c0d; }
.cs-scrollpage { container-type: inline-size; will-change: transform; }
.cs-scrollpage > img { display: block; width: 100%; height: auto; }
.cs-phone {
  position: absolute;
  z-index: 2;
  width: clamp(110px, 17%, 220px);
  aspect-ratio: 9 / 19;
  margin: 0;
  padding: 7px;
  border-radius: 30px;
  background: #16181b;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.cs-phone__screen { width: 100%; height: 100%; overflow: hidden; border-radius: 24px; background: #0c0c0d; }
.cs-phone--a { left: -7%; bottom: -4%; }
.cs-phone--b { right: -7%; top: 16%; }
/* Progetti non web: mockup in HTML/CSS (plancia affissioni + telefoni feed/storia) */
.cs-mocks { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(14px, 2vw, 28px); margin-bottom: clamp(48px, 7vw, 110px); }
.cs-mock { margin: 0; }
.cs-mock figcaption { display: flex; flex-direction: column; gap: .2rem; margin-top: .9rem; font-size: .92rem; }
.cs-mock figcaption span { opacity: .65; }
/* strada: cielo, muro di paese, plancia su pali, marciapiede */
.mk-street { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: linear-gradient(180deg, #8ec9ea 0%, #cfe9f6 46%, #e9dfcc 46.2%); box-shadow: 0 24px 50px rgba(0, 0, 0, .25); }
.mk-street__wall { position: absolute; left: 0; right: 0; top: 30%; bottom: 14%; background:
  repeating-linear-gradient(0deg, transparent 0 26px, rgba(120, 95, 60, .12) 26px 27px),
  repeating-linear-gradient(90deg, transparent 0 58px, rgba(120, 95, 60, .08) 58px 59px),
  linear-gradient(180deg, #e7d6b8, #d8c3a0); }
.mk-street__wall::before { content: ""; position: absolute; left: 6%; top: -18%; width: 16%; height: 118%; background: linear-gradient(180deg, #c9b08a, #bba078); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.mk-street__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 14%; background: linear-gradient(180deg, #9a958c, #7f7a72); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25); }
.mk-board { position: absolute; left: 50%; bottom: 10%; width: 64%; translate: -50% 0; z-index: 1; }
.mk-board__frame { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px; background: #4a5148; border-radius: 3px; box-shadow: 0 18px 30px rgba(0, 0, 0, .3), inset 0 0 0 2px #5d655b; }
.mk-board__poster { position: relative; display: block; overflow: hidden; background: #fff; }
.mk-board__poster img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
/* carta incollata: leggera lucidità e piega */
.mk-board__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .18) 0%, transparent 35%, transparent 65%, rgba(0, 0, 0, .1) 100%), linear-gradient(90deg, transparent 49.6%, rgba(0, 0, 0, .06) 50%, transparent 50.4%); mix-blend-mode: multiply; }
.mk-board__pole { position: absolute; bottom: -24%; width: 3.5%; height: 30%; background: linear-gradient(90deg, #3b4139, #59615a, #3b4139); }
.mk-board__pole:first-of-type { left: 14%; } .mk-board__pole:last-of-type { right: 14%; }
/* telefoni */
.mk-phones { position: relative; aspect-ratio: 0.99; border-radius: 14px; background: radial-gradient(120% 90% at 30% 20%, #ffe36b 0%, #f5c518 55%, #e2a90c 100%); overflow: hidden; box-shadow: 0 24px 50px rgba(0, 0, 0, .25); }
.mk-ph { position: absolute; top: 9%; left: 9%; width: 46%; aspect-ratio: 9 / 19; padding: 2.2%; border-radius: 26px; background: #0d0f12; box-shadow: 0 24px 40px rgba(0, 0, 0, .35), inset 0 0 0 1.5px #2a2e35; container-type: inline-size; }
.mk-ph--story { left: auto; right: 7%; top: 19%; width: 40%; rotate: 5deg; }
.mk-ph__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 20px; background: #fff; }
.mk-feed { display: flex; flex-direction: column; color: #111; font-family: system-ui, sans-serif; }
.mk-feed__top { display: flex; align-items: center; gap: 4cqw; padding: 13cqw 5cqw 4cqw; font-size: 5.2cqw; line-height: 1.15; }
.mk-feed__top small { display: block; font-size: 4.4cqw; color: #666; }
.mk-feed__top i { margin-left: auto; font-style: normal; color: #444; }
.mk-feed__av { display: inline-grid; place-items: center; flex: none; width: 11cqw; height: 11cqw; border-radius: 50%; background: #111; color: #fff; font-size: 4cqw; font-weight: 700; box-shadow: 0 0 0 1.2cqw #fff, 0 0 0 2cqw #e1306c; }
.mk-feed img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.mk-feed__act { display: flex; align-items: center; gap: 4cqw; padding: 3.5cqw 5cqw 2cqw; }
.mk-feed__act svg { width: 8cqw; height: 8cqw; fill: none; stroke: #111; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.mk-feed__act svg:first-child { fill: #e0245e; stroke: #e0245e; }
.mk-feed__act span { flex: 1; }
.mk-feed__cap { margin: 0; padding: 0 5cqw; font-size: 4.6cqw; line-height: 1.35; }
.mk-feed__cta { display: flex; justify-content: space-between; margin: 3cqw 5cqw 0; padding: 2.5cqw 3.5cqw; border-radius: 2cqw; background: #f2f2f2; font-size: 4.6cqw; font-weight: 600; }
.mk-feed__cta i { font-style: normal; }
.mk-story img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-story__bars { position: absolute; left: 4cqw; right: 4cqw; top: 6cqw; display: flex; gap: 1.5cqw; }
.mk-story__bars i { flex: 1; height: 1cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .5); }
.mk-story__bars i:first-child { background: #fff; }
.mk-story__who { position: absolute; left: 4cqw; top: 11cqw; display: flex; align-items: center; gap: 3cqw; color: #fff; font: 600 5cqw/1 system-ui, sans-serif; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.mk-story__who .mk-feed__av { width: 9cqw; height: 9cqw; box-shadow: 0 0 0 1cqw #fff; }
@media (max-width: 900px) { .cs-mocks { grid-template-columns: 1fr; } .mk-phones { aspect-ratio: 4 / 3.6; } .mk-ph { width: 40%; left: 10%; } .mk-ph.mk-ph--story { width: 34%; left: auto; right: 10%; } }

/* Progetti non web: grafiche della campagna a "bacheca" (prime due grandi, poi tre per riga) */
.cs-gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); align-items: start; }
.cs-gallery__item { grid-column: span 2; margin: 0; }
.cs-gallery__item:nth-child(-n+2) { grid-column: span 3; }
.cs-gallery__item:nth-child(2) { margin-top: clamp(28px, 6vw, 96px); }
.cs-gallery__item:nth-child(4) { margin-top: clamp(18px, 3vw, 48px); }
.cs-gallery__item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; box-shadow: 0 24px 50px rgba(2, 26, 41, .18), 0 0 0 1px rgba(2, 26, 41, .06); transition: transform .6s var(--ease, ease), box-shadow .6s var(--ease, ease); }
.cs-gallery__item:hover img { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 34px 70px rgba(2, 26, 41, .24), 0 0 0 1px rgba(2, 26, 41, .06); }
.cs-gallery__item figcaption { display: flex; flex-direction: column; gap: .2rem; margin-top: .9rem; font-size: .92rem; }
.cs-gallery__item figcaption span { opacity: .65; }
@media (max-width: 760px) {
  .cs-gallery { grid-template-columns: 1fr 1fr; }
  .cs-gallery__item, .cs-gallery__item:nth-child(-n+2) { grid-column: span 1; margin-top: 0 !important; }
  .cs-gallery__item:nth-child(odd):last-child { grid-column: 1 / -1; max-width: 70%; justify-self: center; }
}
.cs-show__note { margin: clamp(28px, 4vw, 48px) 0 0; text-align: center; font-size: .78rem; opacity: .6; }

/* Sito ricostruito (segnaposto): scala con la larghezza del contenitore (unità cqw) */
.mk { background: #0c0c0d; color: #f4f4f2; font-family: var(--cs-body); font-size: 1.1cqw; line-height: 1.4; }
.mk p { margin: 0; }
.mk__nav { display: flex; align-items: center; justify-content: space-between; padding: 1.6cqw 4cqw; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.mk__nav b, .mk__foot b { font-size: 1.3cqw; font-weight: 800; letter-spacing: .3em; }
.mk__nav b span, .mk__foot b span { margin-left: .4em; font-weight: 300; }
.mk__links { display: flex; gap: 2.6cqw; }
.mk__links i { font-size: .9cqw; font-style: normal; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.mk__burger { display: none; }
.mk__hero, .mk__card, .mk__gallery span { position: relative; background-size: cover; background-repeat: no-repeat; }
.mk__hero { display: flex; flex-direction: column; justify-content: flex-end; height: 46cqw; padding: 5cqw 4cqw; }
.mk__hero::before, .mk__card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, .08) 70%); }
.mk__hero > *, .mk__card > * { position: relative; }
.mk__eyebrow { margin-bottom: 1cqw !important; font-size: .85cqw; letter-spacing: .3em; text-transform: uppercase; opacity: .7; }
.mk__h { max-width: 14ch; font-size: 4.4cqw; font-weight: 300; line-height: 1; letter-spacing: -.01em; text-transform: uppercase; }
.mk__btn { align-self: flex-start; margin-top: 2.4cqw; padding: 1cqw 2.2cqw; border: 1px solid rgba(255, 255, 255, .6); font-size: .85cqw; letter-spacing: .2em; text-transform: uppercase; }
.mk__intro { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2cqw 3cqw; padding: 6cqw 4cqw; }
.mk__big { font-size: 9cqw; font-weight: 200; line-height: .9; }
.mk__txt { max-width: 22ch; font-size: 1.6cqw; opacity: .85; }
.mk__lines { display: grid; grid-column: 1 / -1; gap: .8cqw; }
.mk__lines i { display: block; height: .45cqw; border-radius: 1px; background: rgba(255, 255, 255, .12); }
.mk__lines i:nth-child(2) { width: 80%; }
.mk__lines i:nth-child(3) { width: 55%; }
.mk__duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1cqw; padding: 0 4cqw; }
.mk__card { display: flex; align-items: flex-end; aspect-ratio: 4 / 3; padding: 2cqw; background-size: 260%; }
.mk__card span { font-size: 2cqw; letter-spacing: .2em; text-transform: uppercase; }
.mk__label { margin: 6cqw 4cqw 2cqw !important; font-size: .85cqw; letter-spacing: .3em; text-transform: uppercase; opacity: .6; }
.mk__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6cqw; padding: 0 4cqw; }
.mk__gallery span { aspect-ratio: 1; background-size: 320%; filter: grayscale(1); }
.mk__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6cqw; padding: 5cqw 4cqw; border-top: 1px solid rgba(255, 255, 255, .12); }
.mk__foot .mk__lines { width: 30%; }
@container (max-width: 520px) {
  .mk { font-size: 3.6cqw; }
  .mk__nav { padding: 6cqw; }
  .mk__nav b, .mk__foot b { font-size: 4.2cqw; }
  .mk__links { display: none; }
  .mk__burger { display: grid; gap: 1.8cqw; width: 7cqw; }
  .mk__burger i { height: 1px; background: #fff; }
  .mk__hero { height: 150cqw; padding: 10cqw 6cqw; }
  .mk__eyebrow { margin-bottom: 3cqw !important; font-size: 2.8cqw; }
  .mk__h { font-size: 11cqw; }
  .mk__btn { margin-top: 6cqw; padding: 3cqw 5cqw; font-size: 2.8cqw; }
  .mk__intro { grid-template-columns: 1fr; padding: 14cqw 6cqw; }
  .mk__big { font-size: 28cqw; }
  .mk__txt { font-size: 5cqw; }
  .mk__lines i { height: 1.4cqw; }
  .mk__duo { grid-template-columns: 1fr; gap: 3cqw; padding: 0 6cqw; }
  .mk__card { padding: 5cqw; }
  .mk__card span { font-size: 5cqw; }
  .mk__label { margin: 14cqw 6cqw 4cqw !important; font-size: 2.8cqw; }
  .mk__gallery { grid-template-columns: 1fr 1fr; gap: 2cqw; padding: 0 6cqw; }
  .mk__foot { margin-top: 14cqw; padding: 10cqw 6cqw; }
}

/* ---------- 5. Valori del brand ---------- */
.cs-values { padding-block: var(--cs-section); text-align: center; }
.cs-values > * > :first-child { justify-content: center; }
.cs-values__line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .3em;
  margin: 1.4rem 0;
  font-family: var(--cs-display);
  font-size: clamp(2.3rem, .6rem + 6.4vw, 8.4rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.cs-values__line span {
  padding-bottom: .08em;
  /* --f (0→1) riempie la parola da sinistra: impostata da js/pages.js, di default piena */
  background: linear-gradient(90deg, var(--cs-fill) calc(var(--f, 1) * 100%), var(--cs-ghost) calc(var(--f, 1) * 100%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cs-values__text { max-width: 46ch; margin: 0 auto; color: var(--cs-muted); }

/* ---------- 6. Cosa abbiamo fatto ---------- */
.cs-work { padding-block: var(--cs-section); }
.cs-work .fgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cs-work[data-cols="3"] .fgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-work[data-cols="2"] .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-work[data-cols="1"] .fgrid { grid-template-columns: minmax(0, 640px); }

/* ---------- 7. Citazione (se presente) ---------- */
.cs-quote { padding-block: var(--cs-section); }
.cs-quote blockquote { max-width: 30ch; margin: 0; font-family: var(--cs-display); font-size: clamp(1.8rem, 1rem + 2.6vw, 3.6rem); line-height: 1.1; }
.cs-quote footer { margin-top: 1.4rem; font-family: var(--cs-body); font-size: 1rem; }

/* ---------- 8. Progetto successivo ---------- */
.cs-next { position: relative; }
.cs-next__link { position: relative; display: grid; place-items: center; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; color: #fff; text-decoration: none; background: var(--cs-next-bg, #010F18); }
.cs-next__media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 50%, rgba(1, 15, 24, .55), rgba(1, 15, 24, .3)); }
.cs-next__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(calc((1 - var(--p, 1)) * 20%) calc((1 - var(--p, 1)) * 26%) round calc((1 - var(--p, 1)) * 28px));
}
.cs-next__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.3) brightness(.62);
  transform: scale(calc(1.25 - var(--p, 1) * .25));
  transition: scale 1s var(--cs-ease);
}
.cs-next__link:hover .cs-next__media img { scale: 1.05; }
.cs-next__body {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: var(--cs-gutter);
  text-align: center;
  text-shadow: 0 2px 30px rgba(1, 15, 24, .5);
}
.cs-next__label { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; }
.cs-next__title {
  font-family: var(--cs-display);
  font-size: clamp(2.6rem, 1rem + 7vw, 9rem);
  line-height: .95;
  letter-spacing: -.045em;
  transform: translateY(calc((1 - var(--p, 1)) * 8vh));
}
.cs-next__kind { font-size: 1rem; }
.cs-next__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cs-work .fgrid, .cs-work[data-cols] .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-work[data-cols="1"] .fgrid { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .has-motion .cs-chapters__grid { grid-template-columns: 1fr; }
  .has-motion .cs-chapters__aside { display: none; }
  .cs-ch { min-height: 0; }
  .cs-show__stage { padding-bottom: 36%; }
  .cs-phone { width: 24%; border-radius: 20px; padding: 5px; }
  .cs-phone__screen { border-radius: 16px; }
  .cs-phone--a { left: 6%; top: auto; bottom: 0; }
  .cs-phone--b { right: 6%; top: auto; bottom: 8%; }
}
@media (max-width: 760px) {
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-hero__title { font-size: clamp(2.5rem, 12vw, 4.2rem); }
  .cs-work .fgrid, .cs-work[data-cols] .fgrid { grid-template-columns: 1fr; }
  .cs-browser__bar { height: 28px; }
  .cs-browser__bar i { width: 8px; height: 8px; }
  .cs-browser__bar span { height: 18px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-chapters__reel, .cs-next__media img { transition: none; }
}
