

.page-servizi { --radius: clamp(1.75rem, 3.5vw, 3.5rem); }
.page-servizi main { position: relative; }

.sv-open__title,
.sheet__title,
.method__title,
.method__word,
.sv-index__line {
  font-family: var(--font-title);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.005em;
}

.sv-open {
  position: relative;
  background: var(--paper);
  padding: calc(var(--nav-h) + clamp(2rem, 5vw, 4rem)) var(--gutter) calc(clamp(4rem, 8vw, 6.5rem) + var(--radius));
  text-align: center;
}

.sv-open__title {
  font-size: clamp(5.5rem, 25vw, 24rem);
  line-height: 0.84;
  text-transform: uppercase;
  color: var(--navy);
}
.sv-open__title .rise { padding-top: 0.06em; }

.sv-open__sub {
  max-width: 44ch;
  margin: clamp(1.25rem, 2.5vw, 2rem) auto 0;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.sv-index { margin-top: clamp(3rem, 7vw, 5.5rem); }
.sv-index__line {
  max-width: 28ch;
  margin-inline: auto;
  font-size: clamp(2.1rem, 5.2vw, 5rem);
  line-height: 1.22;
  color: var(--ink);
}
.sv-index__link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.12em;
  min-height: 44px;
  padding: 0 0.04em;
  white-space: nowrap;
  color: var(--c);
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.12em;
  transition: color 240ms ease, transform 160ms var(--ease-out);
}
.sv-index__link img {
  width: 0.95em;
  height: 0.95em;
  transition: transform 400ms var(--ease-out);
}

.sv-index__link::before {
  content: "";
  position: absolute;
  inset: 0.08em -0.02em 0.02em;
  z-index: -1;
  border-radius: 0.14em;
  background: var(--c);
  clip-path: inset(100% 0 0 0 round 0.14em);
  transition: clip-path 280ms var(--ease-out);
}
.sv-index__link:active { transform: scale(0.97); }
.sv-index__link:focus-visible,
.sv-index__link:active { color: var(--on); text-decoration-color: transparent; }
.sv-index__link:focus-visible::before,
.sv-index__link:active::before { clip-path: inset(0 0 0 0 round 0.14em); }
.sv-index__link:focus-visible img { transform: rotate(-10deg) scale(1.12); }
@media (hover: hover) and (pointer: fine) {
  .sv-index__link:hover { color: var(--on); text-decoration-color: transparent; }
  .sv-index__link:hover::before { clip-path: inset(0 0 0 0 round 0.14em); }
  .sv-index__link:hover img { transform: rotate(-10deg) scale(1.12); }
}

.sheet {
  position: relative;
  margin-top: calc(var(--radius) * -1);
  padding: clamp(4.5rem, 8vw, 7.5rem) var(--gutter) calc(clamp(4.5rem, 8vw, 7rem) + var(--radius));
  background: var(--bg);
  color: var(--fg);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -30px 60px -20px rgb(21 23 42 / 0.28);
}

.sheet--magenta {
  --bg: var(--magenta);
  --fg: #fff;
  --accent: var(--ink);
  --slot: #a81d6a;
  --cta-bg: #fff;
  --cta-fg: var(--ink);
  --cta-fill: var(--ink);
  --cta-fill-fg: #fff;
}
.sheet--navy {
  --bg: var(--navy);
  --fg: #fff;
  --accent: var(--orange);
  --slot: #182749;
  --cta-bg: #fff;
  --cta-fg: var(--navy);
  --cta-fill: var(--orange);
  --cta-fill-fg: var(--ink);
}
.sheet--orange {
  --bg: var(--orange);
  --fg: var(--ink);
  --accent: var(--navy);
  --slot: #f08a4c;
  --cta-bg: var(--ink);
  --cta-fg: #fff;
  --cta-fill: var(--navy);
  --cta-fill-fg: #fff;
}

.sheet__shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
}
.sheet__in { transform-origin: 50% 100%; }

.sheet__head {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
}

.sheet__title {
  font-size: clamp(3.5rem, 11.5vw, 12.5rem);
  line-height: 0.88;
  text-transform: uppercase;
}
.sheet__title .rise { padding-top: 0.06em; margin-top: -0.06em; }

.sheet__icon {
  flex: none;
  width: clamp(5.5rem, 13vw, 13rem);
  height: auto;
  filter: drop-shadow(0 22px 26px rgb(21 23 42 / 0.28));
}
.js .sheet__icon {
  opacity: 0;
  transform: translateY(18px) rotate(-12deg) scale(0.9);
  transition: opacity 500ms ease 250ms, transform 900ms var(--ease-out) 250ms;
}
.js .sheet__icon.is-in { opacity: 1; transform: none; }

@media (min-width: 901px) {
  .sheet--split .sheet__in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(2.5rem, 6vw, 7rem);
  }
  .sheet--split .sheet__body { display: contents; }
  .sheet--split .sheet__head { grid-area: 1 / 1; }
  .sheet--split .sheet__copy { grid-area: 2 / 1; margin-top: clamp(1.75rem, 3vw, 2.75rem); }
  .sheet--split .sheet__media { grid-area: 1 / 2 / 3; }

  .sheet--split.sheet--flip .sheet__head { grid-column: 2; }
  .sheet--split.sheet--flip .sheet__copy { grid-column: 2; }
  .sheet--split.sheet--flip .sheet__media { grid-column: 1; }

  .sheet__title { font-size: clamp(3.5rem, 8.4vw, 10.5rem); }
  .sheet__icon { width: clamp(5rem, 9vw, 10rem); }

  .sheet--wide .sheet__in {
    display: grid;
    grid-template-columns: auto minmax(15rem, 27rem);
    justify-content: space-between;
    column-gap: clamp(2rem, 5vw, 7rem);
    align-items: start;
  }
  .sheet--wide .sheet__lead { padding-top: 0.4rem; }
  .sheet--wide .sheet__head { grid-area: 1 / 1; }
  .sheet--wide .sheet__body { grid-area: 1 / 2; }
  .sheet--wide .sheet__strip { grid-area: 2 / 1 / 3 / 3; }
}

.sheet__lead {
  max-width: 30ch;
  font-size: clamp(1.25rem, 1.9vw, 1.75rem);
  line-height: 1.3;
}

.sv-cta {
  position: relative;
  z-index: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  margin-top: clamp(2rem, 3.5vw, 2.75rem);
  padding: 0 1.6rem;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-size: 1.05rem;
  line-height: 1.2;
  transition: color 350ms ease, transform 160ms var(--ease-out);
}
.sv-cta__fill {
  position: absolute;
  z-index: -1;
  left: -14%;
  bottom: -400%;
  width: 128%;
  height: 400%;
  border-radius: 50%;
  background: var(--cta-fill);
  transition: transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}
.sv-cta:active { transform: scale(0.97); }
.sv-cta:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; border-radius: 999px; }
@media (hover: hover) and (pointer: fine) {
  .sv-cta:hover { color: var(--cta-fill-fg); }
  .sv-cta:hover .sv-cta__fill { transform: translateY(-50%); }
}

.sheet__media {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  margin: 0;
}

.frame {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--slot);
}

.frame__slot {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 1.25rem;
  border: 1.5px dashed color-mix(in srgb, var(--fg) 55%, transparent);
  border-radius: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.frame__note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.frame--reel {
  width: min(100%, 21rem);
  aspect-ratio: 9 / 16;
  rotate: 3deg;
}
.sheet--flip .frame--reel { rotate: -3deg; }

.sheet__media--web { justify-items: start; padding-right: 8%; }
.frame--browser {
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  aspect-ratio: 16 / 10.5;
  background: var(--paper);
  color: var(--ink);
  --fg: var(--ink);
}
.frame__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 2.25rem;
  padding: 0 0.9rem;
  border-bottom: 1px solid var(--line);
}
.frame__bar i { width: 9px; height: 9px; border-radius: 50%; background: #c7c8d0; }
.frame__bar span {
  margin-left: 0.75rem;
  padding: 0.2rem 0.75rem;
  border-radius: 6px;
  background: #ebebea;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}
.frame--browser .frame__slot { margin: 0.9rem; height: auto; }

.frame--phone {
  position: absolute;
  right: 0;
  top: 34%;
  width: 28%;
  aspect-ratio: 2131 / 4297;
  border-radius: 0;
  background: none;
  overflow: visible;
  filter: drop-shadow(0 16px 18px rgb(0 0 0 / 0.35));
}
.frame--phone .frame__slot,
.frame--phone .frame__video {
  position: absolute;
  inset: 2.35% 5.66%;

  width: 88.68%;
  height: 95.3%;
}
.frame--phone .frame__slot {
  border-radius: 12%/6%;
  background: var(--paper);
  color: var(--ink);
  border-color: rgb(21 23 42 / 0.45);
  font-size: 0.8125rem;
  padding: 0.5rem;
}
.frame__device {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.frame__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.sheet__media--web .frame--browser { aspect-ratio: auto; }
.frame--browser .frame__slot,
.frame--browser .frame__video { grid-row: 2; grid-column: 1; min-height: 0; }
.frame--browser .frame__video { height: auto; }
.frame--phone .frame__video { background: #0f0f0f; }
.frame.has-video .frame__video { opacity: 1; }
.frame.has-video .frame__slot { visibility: hidden; }

.frame--compare {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.frame__half { position: relative; display: grid; padding: 0.9rem; background: #fff; color: var(--ink); --fg: var(--ink); }
.frame__img { position: absolute; inset: 0.9rem; width: calc(100% - 1.8rem); height: calc(100% - 1.8rem); object-fit: contain; }
.frame__half--after { background: var(--paper); color: var(--ink); --fg: var(--ink); }
.frame__tag {
  position: absolute;
  z-index: 1;
  left: 1.6rem;
  top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cc {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  align-items: start;
  margin: clamp(2.5rem, 5vw, 4rem) 0 clamp(1rem, 3vw, 2.5rem);
}
.cc__item {
  position: relative;
  grid-row: 1;
  aspect-ratio: 9 / 16;
  box-shadow: 0 1.5rem 3rem -1.25rem rgb(0 0 0 / 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  transition: rotate 0.7s var(--ease), scale 0.7s var(--ease), translate 0.7s var(--ease),
    filter 0.7s var(--ease), box-shadow 0.7s var(--ease), z-index 0s linear 0.22s;
}
.cc__item:has(video) { background: var(--ink); }
.cc__item video { display: block; width: 100%; height: 100%; object-fit: cover; }
.cc__item--1 { grid-column: 1 / 5; rotate: -3deg; z-index: 1; }
.cc__item--2 { grid-column: 4 / 7; margin-top: clamp(4rem, 12vw, 10rem); rotate: 4deg; z-index: 2; }
.cc__item--3 { grid-column: 7 / 11; margin-top: clamp(1rem, 2vw, 2rem); rotate: -1.5deg; z-index: 1; }
.cc__item--4 { grid-column: 10 / 13; margin-top: clamp(7rem, 20vw, 17rem); rotate: 5deg; z-index: 2; }
@media (hover: hover) and (pointer: fine) {
  .cc__item:hover {
    rotate: 0deg;
    scale: 1.05;
    translate: 0 -0.75rem;
    z-index: 3;
    box-shadow: 0 2.5rem 4rem -1.5rem rgb(0 0 0 / 0.55);
  }

  .cc:has(.cc__item:hover) .cc__item:not(:hover) { scale: 0.93; filter: brightness(0.8); }
  .cc:has(.cc__item--2:hover) .cc__item--1,
  .cc:has(.cc__item--3:hover) .cc__item--2,
  .cc:has(.cc__item--4:hover) .cc__item--3 { translate: -18% 0; }
  .cc:has(.cc__item--1:hover) .cc__item--2,
  .cc:has(.cc__item--2:hover) .cc__item--3,
  .cc:has(.cc__item--3:hover) .cc__item--4 { translate: 18% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .js .cc__item.reveal-clip { transition: opacity 500ms ease; }
}
.cc__tag {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reel-stack {
  position: relative;
  width: min(100%, 21rem);
  aspect-ratio: 9 / 16;
  margin-top: 1rem;
}
.reel-card {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  rotate: var(--rot, 0deg);
  visibility: hidden;
  box-shadow: 0 26px 50px -24px rgb(21 23 42 / 0.6);
}
.reel-card.is-on { visibility: visible; }
.reel-card__shape { position: absolute; inset: 0; background: var(--c); }
.reel-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 250ms ease;
}
.reel-card.is-playing video,
.reel-card--base video { opacity: 1; }
.reel-card__label {
  position: absolute;
  left: 1.1rem;
  bottom: 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 12px rgb(21 23 42 / 0.5);
}
.reel-card.is-leaving { opacity: 0; transition: opacity 220ms ease; }

.method {
  position: relative;
  margin-top: calc(var(--radius) * -1);
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -30px 60px -20px rgb(0 0 0 / 0.35);
}
.method__pin { padding: clamp(5rem, 9vw, 8rem) var(--gutter) clamp(5rem, 9vw, 7rem); }

.method__eyebrow { color: #fff; }
.method__title {
  max-width: 30ch;
  margin-top: 0.9rem;
  font-size: clamp(1.9rem, min(3.4vw, 6vh), 3.25rem);
  line-height: 1.02;
  color: #c9cbd8;
}

.method__rows { margin-top: clamp(1.75rem, 5vh, 3.5rem); }
.method__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  align-items: center;
  column-gap: clamp(2rem, 5vw, 5rem);
}
.method__row + .method__row { border-top: 1px solid rgb(255 255 255 / 0.1); }

.method__word {
  position: relative;
  margin: 0;
  font-size: clamp(3.5rem, min(10vw, 14.5vh), 11rem);
  line-height: 1.02;
  text-transform: uppercase;
}

.method__ghost {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.5px #8b8d9e;
}

.method__ink {
  position: absolute;
  inset: 0;
  color: var(--c);
  overflow: hidden;
  translate: -100% 0;
}
.method__ink-in { display: block; translate: 100% 0; }

.method__text {
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.55;
  color: #c9cbd8;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(8px);
  transition: opacity 400ms ease, filter 400ms ease, transform 500ms var(--ease-out);
}
.method__row.is-on .method__text { opacity: 1; filter: none; transform: none; }

@media (min-width: 901px) {
  .js [data-sheet] { position: sticky; }

  .js.sheets-measure [data-sheet] { position: relative; top: auto !important; }
}
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .js .method { height: 320svh; }
  .js .method__pin {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100svh;
    padding-block: calc(var(--nav-h) + 0.5rem) 2rem;
  }
}

.js .reveal-clip {
  clip-path: inset(100% 0 0 0 round 12px);
  transition: clip-path 1000ms var(--ease-out) var(--d, 0ms);
}
.js .reveal-clip.is-in { clip-path: inset(0 0 0 0 round 12px); }
.js .frame--phone.reveal-clip.is-in { clip-path: inset(-40%); }

.js .cc__item.reveal-clip {
  transition: clip-path 1000ms var(--ease-out) var(--d, 0ms),
    rotate 0.7s var(--ease), scale 0.7s var(--ease), translate 0.7s var(--ease),
    filter 0.7s var(--ease), box-shadow 0.7s var(--ease), z-index 0s linear 0.22s;
}

.frame .about__visual { --bg: #1b1c22; }

@media (max-width: 900px) {
  .page-servizi { --radius: 1.75rem; }

  .sv-open { padding: calc(var(--nav-h) + 1.5rem) var(--gutter) calc(3.5rem + var(--radius)); }
  .sv-open__sub { max-width: 34ch; }
  .sv-index { margin-top: 2.75rem; }
  .sv-index__line { font-size: clamp(1.9rem, 8.4vw, 3.2rem); line-height: 1.3; }

  .sheet { padding: 3.5rem var(--gutter) calc(3.5rem + var(--radius)); }
  .sheet__head,
  .sheet--flip .sheet__head { flex-direction: row; justify-content: space-between; text-align: left; }
  .sheet__title { font-size: clamp(3rem, 15vw, 6.5rem); }
  .sheet__icon { width: clamp(4.5rem, 24vw, 8rem); margin-right: -0.25rem; }

  .sheet__body { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 1.75rem; }
  .sheet__copy { display: contents; }
  .sheet__media { order: 1; }
  .sheet__lead { order: 2; margin-top: 2.25rem; }
  .sv-cta { order: 3; justify-self: start; margin-top: 1.75rem; }

  .sheet--wide .sheet__body { margin-top: 0; }
  .sheet--wide .sheet__lead { margin-top: 1.5rem; }

  .frame__note { margin-top: 1rem; font-size: 0.8125rem; opacity: 0.85; }

  .reel-stack { width: min(64vw, 19rem); margin-top: 0.5rem; }

  .sheet__media--web { justify-items: start; padding: 0 14% 3.5rem 0; }
  .frame--phone { width: 31%; top: auto; bottom: 0; }
  .sheet__media--web .frame__note { justify-self: start; max-width: 60%; }

  .cc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 2rem; }
  .cc__item--1 { grid-column: 1; grid-row: 1; }
  .cc__item--2 { grid-column: 2; grid-row: 1; margin-top: 4rem; }
  .cc__item--3 { grid-column: 1; grid-row: 2; margin-top: -2.5rem; }
  .cc__item--4 { grid-column: 2; grid-row: 2; margin-top: 1.5rem; }

  .frame--compare { aspect-ratio: 5 / 4; }

  .method__pin { padding: 3.5rem var(--gutter) 4rem; }
  .method__rows { margin-top: 1.5rem; }
  .method__row { grid-template-columns: minmax(0, 1fr); padding: 1.1rem 0 1.4rem; }
  .method__word { font-size: clamp(3.25rem, 17vw, 6rem); }
  .method__text { margin-top: 0.4rem; }
}

@media (max-width: 480px) {
  .sheet__lead { font-size: 1.2rem; }
  .sv-cta { width: 100%; justify-content: center; justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal-clip { clip-path: none; opacity: 0; transition: opacity 500ms ease; }
  .js .reveal-clip.is-in { clip-path: none; opacity: 1; }
  .js .sheet__icon { transform: none; transition: opacity 400ms ease; }
  .sv-index__link,
  .sv-index__link img,
  .sv-cta { transform: none !important; }
  .sheet__in { transform: none !important; }
  .method__ink, .method__ink-in { translate: none; }
  .method__text { opacity: 1; filter: none; transform: none; transition: none; }
}
