/* Certificazioni: un sollevamento discreto, senza ingrandire i marchi. */
.certificate-link { display: block; border-radius: 8px; }
.certifications-logos figure { padding: 10px; position: relative; background: transparent; }
.certificate-link::after {
  content: '\2197';
  position: absolute;
  top: 0;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dceef3;
  color: #125a70;
  opacity: 0;
  pointer-events: none;
}
.certifications-logos figure:focus-within { background: transparent; }
.certifications-logos figure:focus-within figcaption { color: #147f9d; }
.certifications-logos figure:focus-within .certificate-link::after { opacity: 1; }
.certifications-logos figure:focus-within img { filter: contrast(1.1) saturate(1.12); }
@media (hover: hover) and (pointer: fine) {
  .certifications-logos figure:hover { background: transparent; }
  .certifications-logos figure:hover figcaption { color: #147f9d; }
  .certifications-logos figure:hover img { filter: contrast(1.1) saturate(1.12); }
  .certifications-logos figure:hover .certificate-link::after { opacity: 1; }
}

/* Un nastro fotografico a tutta larghezza con i lavori adiacenti visibili. */
.home-page .projects-section { padding-top: 48px; padding-bottom: 70px; }
.home-page .projects-section h2 { font-size: var(--section-title-size); }
.home-page .projects-section .section-heading { gap: 14px; margin-bottom: 0; }
.home-page .projects-section .eyebrow { margin-bottom: 14px; }
.work-carousel {
  width: calc(100% - var(--gutter) * 2);
  max-width: var(--max);
  margin-inline: auto;
  position: relative;
  background: #eef3f5;
  color: #fff;
  border-radius: 30px;
  overflow: hidden;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  padding-block: 12px 16px;
}
.work-track {
  --work-width: 62cqw;
  --work-gap: 16px;
  --work-height: clamp(340px, 48svh, 500px);
  display: flex;
  gap: var(--work-gap);
  position: relative;
  padding-inline: calc((100% - var(--work-width)) / 2);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: calc((100% - var(--work-width)) / 2);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.work-track::-webkit-scrollbar { display: none; }
.work-track:focus-visible { outline: 2px solid #147f9d; outline-offset: -3px; }
.work-track.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.work-track.is-dragging a { cursor: grabbing; }
.work-slide {
  flex: 0 0 var(--work-width);
  min-width: 0;
  position: relative;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  opacity: 1;
}
.work-track.is-ready .work-slide { opacity: 1; }
.work-slide > a { display: block; position: relative; overflow: hidden; color: #fff; height: var(--work-height); border-radius: 20px; }
.work-slide a:focus-visible { outline: 3px solid #5cc9e5; outline-offset: -4px; }
.work-slide picture {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100%, calc(var(--work-height) * var(--photo-ratio)));
  aspect-ratio: var(--photo-ratio);
  transform: translate(-50%, -50%);
}
.work-slide img {
  position: absolute;
  left: var(--source-left);
  top: var(--source-top);
  width: var(--source-width);
  height: var(--source-height);
  object-fit: fill;
  transform: none;
  filter: contrast(1.06) saturate(1.03);
}
.work-slide > a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #05111bd9, #05111b33 38%, transparent 65%);
  pointer-events: none;
}
.work-caption {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding: 18px 22px;
  background: #07152266;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.work-caption p { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.work-caption h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 400; max-width: 660px; }
.work-track.is-ready .work-slide:not(.is-current) .work-caption { opacity: 1; }
.work-track.is-ready .work-slide:not(.is-current) > a::after { background: #0614214d; }
.work-open { position: absolute; top: 14px; right: 14px; z-index: 3; font-size: 20px; border: 1px solid #ffffff4d; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; background: #ffffff1a; }
.work-controls {
  position: relative;
  inset: auto;
  order: -1;
  z-index: 3;
  width: auto;
  max-width: none;
  margin: 0 16px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  pointer-events: none;
}
.work-controls[hidden] { display: none; }
.work-controls > p { display: none; }
.work-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  pointer-events: auto;
}
.work-buttons button {
  width: 44px;
  height: 44px;
  border: 1px solid #d3dfe5;
  background: #fff;
  color: #17232d;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
}
.work-buttons button:hover, .work-buttons button:focus-visible { background: #fff; color: #101a24; }
.work-buttons > span { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 48px; text-align: center; }
.work-buttons [data-work-pause] { font-size: 15px; }
.slider-counter, .work-buttons > [data-work-count], .service-number { display: none; }

/* Foto sempre visibile, separazione obliqua e testo leggibile. */
.home-page .contact-photo-section {
  position: relative;
  overflow: visible;
  min-height: 0;
  padding: 0;
  background: #fff;
  color: #fff;
  clip-path: none;
}
.contact-stage {
  position: relative;
  min-height: clamp(580px, 82svh, 800px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #101a24;
  clip-path: polygon(0 72px, 100% 0, 100% 100%, 0 100%);
}
.contact-stage .contact-inner { position: relative; z-index: 2; padding-block: 112px 76px; }
.contact-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #071522b3, #07152273 60%, #07152233);
  pointer-events: none;
}
.contact-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  clip-path: none;
}
.contact-photo picture, .contact-photo img { display: block; width: 100%; height: 100%; }
.contact-photo img { object-fit: cover; object-position: center 55%; transform: none; }
.home-page .contact-photo-section h2 { font-size: var(--section-title-size); }
.home-page .contact-photo-section h2 span { color: #91dbee; }
.home-page .contact-photo-section p:not(.eyebrow),
.home-page .contact-photo-section .contact-actions > span { color: #edf4fa; }
.home-page .contact-photo-section .eyebrow { color: #b6dbe9; }
.contact-photo-section .button-dark { background: #009ec9; color: #071522; }
.contact-photo-section .button-dark:hover { background: #78d8ed; }
.contact-photo-section .contact-phone { color: #fff; }
.contact-photo-section .contact-phone span { color: #91dbee; }
.home-page .contact-actions .contact-call {
  background: #082b50;
  color: #fff;
  padding: 16px 18px 16px 24px;
  border-radius: 28px;
  margin-bottom: 0;
  gap: 20px;
}
.home-page .contact-actions .contact-call > .contact-call-copy {
  display: grid;
  gap: 4px;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  transform: none;
}
.contact-call-copy small { font-size: 12px; line-height: 1.4; }
.contact-call-copy strong { font-size: 24px; font-weight: 450; line-height: 1.2; letter-spacing: -.02em; white-space: nowrap; }
.home-page .contact-actions .contact-call > [aria-hidden] { background: #ffffff1f; color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .certifications-logos figure { transition: transform 600ms cubic-bezier(.22,.61,.36,1); }
  .certifications-logos img { transition: filter 500ms ease; }
  .certificate-link::after { transition: opacity 400ms ease; }
  .certifications-logos figcaption { transition: color 500ms ease; }
  .certifications-logos figure:focus-within { transform: translateY(-5px); }
  .work-caption { transition: opacity 450ms ease; }
  .work-buttons button { transition: background-color 250ms ease, color 250ms ease; }
  @media (hover: hover) and (pointer: fine) {
    .certifications-logos figure:hover { transform: translateY(-5px); }
  }
}

@media (max-width: 760px) {
  .certifications-logos { gap: 6px; }
  .certifications-logos figure { padding: 4px; }
  .work-carousel { border-radius: 20px; }
  .work-track { --work-width: 80cqw; --work-gap: 12px; --work-height: clamp(320px, 46svh, 400px); }
  .work-slide > a { border-radius: 16px; }
  .work-caption { inset: auto 0 0; gap: 12px; padding: 16px; }
  .work-caption p { font-size: 9px; letter-spacing: .08em; }
  .work-caption h3 { font-size: 23px; }
  .work-open { display: grid; }
  .work-controls { inset: auto; justify-content: flex-end; }
  .work-controls > p { display: none; }
  .work-buttons { gap: 8px; }
  .home-page .projects-section { padding-top: 32px; padding-bottom: 42px; }
  .contact-stage { clip-path: polygon(0 40px, 100% 0, 100% 100%, 0 100%); }
  .contact-stage .contact-inner { padding-block: 88px 56px; }
  .contact-photo img { object-position: 60% center; }
  .home-page .contact-photo-section h2 { font-size: var(--section-title-size); }
}

/* Carosello integrato nella sezione, con la tipografia del sito. */
.home-page .projects-section {
  padding-block: clamp(48px, 7vw, 100px);
  background: #fff;
}
.home-page .projects-section > .container { display: block; }
.home-page .projects-section .work-carousel {
  display: block;
  padding-block: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.work-panel-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0 0 clamp(24px, 3cqw, 42px);
}
.work-panel-copy { flex: 1; min-width: 0; }
.home-page .projects-section .work-panel-copy .eyebrow {
  display: flex;
  padding: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  font-size: 12px;
  letter-spacing: .14em;
  margin-bottom: 14px;
}
.home-page .projects-section .work-panel-copy h2 {
  color: var(--ink);
  font-size: var(--section-title-size);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: -.025em;
}
.work-panel-copy h2 .text-blue { color: #147f9d; }
.work-panel-description { margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.work-panel-header .work-controls { order: 0; flex-shrink: 0; margin: 0; }
.work-track {
  --work-width: calc((100cqw - 2 * var(--work-gap)) / 3);
  --work-gap: 2.2cqw;
  --work-inset: 0px;
  --work-height: 37.8cqw;
  padding-inline: var(--work-inset);
  scroll-padding-inline: var(--work-inset);
  -webkit-mask-image: linear-gradient(to right, transparent var(--work-inset), #000 var(--work-inset));
  mask-image: linear-gradient(to right, transparent var(--work-inset), #000 var(--work-inset));
}
.work-slide { scroll-snap-align: start; }
.work-slide > a { border-radius: clamp(18px, 2.6cqw, 36px); }
.work-slide > a::after,
.work-track.is-ready .work-slide:not(.is-current) > a::after {
  background: linear-gradient(180deg, transparent 65%, #07152233);
}
.work-caption {
  min-height: 30%;
  padding: clamp(16px, 2cqw, 28px);
  background: #ffffff24;
  -webkit-backdrop-filter: blur(14px) brightness(.65);
  backdrop-filter: blur(14px) brightness(.65);
}
.work-caption h3 { font-size: clamp(20px, 1.8vw, 28px); font-weight: 450; line-height: 1.15; }
.work-caption p { font-size: 10px; letter-spacing: .06em; }
.work-open { top: 18px; right: 18px; width: 38px; height: 38px; }
.work-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 24px 0 0; color: var(--ink); }
.work-panel-footer button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #d3dfe5;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
}
.work-panel-footer button[hidden] { display: none; }
.work-stage { position: relative; padding-inline: 56px; }
.work-viewport { container-type: inline-size; min-width: 0; }
.work-stage .work-controls {
  position: absolute;
  inset: 0;
  margin: 0;
  justify-content: space-between;
}
.work-stage .work-buttons { display: contents; }
.work-stage .work-buttons button { pointer-events: auto; font-size: 32px; line-height: 1; }
.work-stage .work-buttons button svg { display: block; flex-shrink: 0; transform: translateY(2px); }
.work-pagination { display: flex; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.work-pagination[hidden] { display: none; }
.work-pagination button {
  display: grid;
  place-items: center;
  width: 16px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.work-pagination button::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bcc9cf;
}
.work-pagination button[aria-current="true"]::before { background: var(--blue); transform: scale(1.4); }
.work-pagination button:hover::before { background: var(--ink); }
.work-pagination button:focus-visible { outline: 2px solid var(--blue); outline-offset: 0; border-radius: 8px; }
.home-page .work-stage { padding-inline: 56px; }
.home-page .work-stage .work-controls:not([hidden]) { display: flex; }
.home-page .work-track { overflow-x: hidden; cursor: default; }
.work-autoplay { display: block; margin: 4px auto 0; padding: 6px 15px; border: 0; background: transparent; color: #147f9d; font: inherit; font-size: 12px; cursor: pointer; }
.work-autoplay[hidden] { display: none; }
@media (max-width: 1000px) {
  .work-track { --work-width: calc((100cqw - var(--work-gap)) / 2); --work-height: 56cqw; --work-gap: 3cqw; }
  .work-panel-header { gap: 20px; }
  .work-caption h3 { font-size: 24px; }
}
@media (max-width: 600px) {
  .home-page .work-stage { padding-inline: 36px; }
  .work-stage .work-buttons button { width: 30px; height: 38px; font-size: 28px; border-color: transparent; }
  .work-panel-header { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 24px; }
  .work-panel-header .work-controls { align-self: flex-end; }
  .work-panel-description { font-size: 14px; margin-top: 12px; }
  .work-track { --work-width: 100cqw; --work-gap: 4cqw; --work-height: clamp(320px, 104cqw, 480px); }
  .work-caption h3 { font-size: 23px; }
  .work-panel-footer .text-link { gap: 16px; }
}
