.editorial-hub {
  --bg: #101010;
  --ink: #eeeae3;
  --ink2: #c5c1bb;
  --mute: #a7a39d;
}

.editorial-hub header {
  background: rgba(13, 13, 13, .76);
}

.editorial-hub .editorial-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(625px, 77svh, 795px);
  padding-block: calc(var(--preview-header-space) + clamp(62px, 8vw, 112px)) clamp(58px, 8vw, 108px);
  background: radial-gradient(ellipse at 78% 42%, #161616, #101010 69%);
}

.editorial-hero > .wrap { width: 100%; }
.editorial-hero .interior-hero-grid { display: block; }

.editorial-illustration {
  position: absolute;
  z-index: -1;
  width: min(72%, 1100px);
  height: 94%;
  right: 0;
  top: 5%;
  pointer-events: none;
}

.editorial-hero :is(.service-offer, .case-hero-copy) {
  --title-offset: clamp(30px, 5vw, 82px);
  width: fit-content;
  max-width: 100%;
}
.editorial-hero :is(.service-offer, .case-hero-copy) h1 {
  font-size: clamp(62px, 8.2vw, 130px);
  line-height: .91;
  letter-spacing: -.037em;
  text-wrap: initial;
}
.editorial-hero h1 .it { margin-left: var(--title-offset); }
.editorial-hero .service-offer > p,
.editorial-hero .service-offer > .btn,
.editorial-hero .case-intro { margin-left: var(--title-offset); }
.editorial-hero .service-offer > p,
.editorial-hero .case-intro p { max-width: 39ch; }
.editorial-hero .service-offer > p,
.editorial-hero .case-intro { margin-top: 32px; }
.cases-hub .editorial-hero .case-hero-copy h1 { font-size: clamp(58px, 7.6vw, 120px); }

.services-hub .service-index > .wrap {
  display: grid;
  grid-template-columns: minmax(0, .77fr) minmax(0, 1.23fr);
  align-items: start;
  gap: clamp(26px, 5vw, 68px);
}
.services-hub .service-index h2 { max-width: 12ch; }
.editorial-hub :is(.service-index, .case-index) h2 em { font-weight: inherit; }
.services-hub .goal-list { margin-top: 0; }
.services-hub .goal-list a { grid-template-columns: minmax(0, 1fr) minmax(8rem, .44fr); }
.services-hub .goal-list a > .serif { font-style: normal; }
.services-hub .chapter .ch-n { display: none; }

.cases-hub .case-feature {
  background: #151515;
  padding-block: clamp(44px, 6.3vw, 100px);
}
.cases-hub .case-feature-grid {
  grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
  align-items: center;
}
.cases-hub .case-feature-grid > img {
  max-height: none;
  aspect-ratio: 4 / 3;
  object-position: 50% 45%;
}
.cases-hub .case-feature-result .serif {
  color: var(--ink);
  font-style: italic;
}
.cases-hub .fb button[aria-pressed="true"] { border-bottom-color: var(--ink2); }

/* Foto dei progetti: proporzioni reali, colore e ritagli scelti in DESIGN.md */
.services-hub .dmi img { width: 100%; height: auto; }
.services-hub .img43.img-colore img { filter: none; }
.cases-hub #duomo-dettaglio > img { object-position: 42% 50%; }

.detail-page :is(.service-detail-hero, .project-detail-hero) {
  display: block;
  padding-block: clamp(53px, 6.5vw, 100px) clamp(34px, 4vw, 57px);
}
.detail-page :is(.service-detail-intro, .project-detail-intro) {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(0, .82fr);
  align-items: end;
  gap: clamp(22px, 4vw, 56px);
  padding-bottom: 0;
}
.service-detail .detail-display { font-size: clamp(55px, 6.85vw, 101px); }
.detail-page .service-detail-intro p { margin-top: 0; }
.detail-page .detail-wide { margin: 0 0 clamp(34px, 5vw, 72px); }
.detail-page .photo-window {
  position: relative;
  overflow: clip;
  isolation: isolate;
  aspect-ratio: 2.54;
  background: #1a1a1a;
}
.detail-page .photo-window img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 44%;
}
.detail-page .service-cover .photo-window img { object-position: 50% 56%; }
.detail-page .photo-window-story { aspect-ratio: 1.44; }
.detail-page .photo-window-story img { object-position: 50% 53%; }
.detail-wide > figcaption.wrap { margin-top: 12px; }

@supports (animation-timeline: view()) {
  @media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
    .detail-page .photo-window {
      view-timeline-name: --foto;
      view-timeline-axis: block;
    }
    .detail-page .photo-window img {
      animation: scorrimento-foto linear both;
      animation-timeline: --foto;
      animation-range: cover 0% cover 100%;
    }
    .detail-page .photo-window-story img { animation-name: scorrimento-foto-breve; }
  }
}
@keyframes scorrimento-foto {
  from { transform: translateY(-5.5%) scale(1.13); }
  to { transform: translateY(5.5%) scale(1.13); }
}
@keyframes scorrimento-foto-breve {
  from { transform: translateY(-3.25%) scale(1.08); }
  to { transform: translateY(3.25%) scale(1.08); }
}
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .detail-wide .photo-window { animation: apertura-foto 690ms cubic-bezier(.16, 1, .3, 1) both; }
}
@keyframes apertura-foto {
  from { clip-path: inset(0 0 10%); }
  to { clip-path: inset(0); }
}

@media (max-width: 1040px) {
  .editorial-hero :is(.service-offer, .case-hero-copy) { --title-offset: clamp(10px, 3.5vw, 38px); }
  .services-hub .goal-list a { grid-template-columns: minmax(0, 1fr); }
  .services-hub .goal-list .gs { text-align: left; }
}
@media (max-width: 900px) {
  .detail-page :is(.service-detail-intro, .project-detail-intro) { grid-template-columns: minmax(0, 1fr); }
  .cases-hub .case-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .cases-hub .case-feature-grid > img { max-height: 470px; }
}
@media (max-width: 700px) {
  .editorial-hub .editorial-hero {
    min-height: 0;
    padding-block: calc(var(--preview-header-space) + 32px) 12px;
  }
  .editorial-hero :is(.service-offer, .case-hero-copy) { --title-offset: 0px; }
  .editorial-hero .service-offer h1 { font-size: clamp(39px, 10.1vw, 66px); }
  .cases-hub .editorial-hero .case-hero-copy h1 { font-size: clamp(38px, 9.6vw, 62px); }
  .editorial-hero .service-offer > p,
  .editorial-hero .case-intro { margin-top: 19px; }
  .editorial-illustration {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: clamp(175px, 51vw, 280px);
    top: auto;
    right: auto;
    margin-block: 2px 0;
  }
  .services-hub .service-index > .wrap { grid-template-columns: 1fr; }
  .cases-hub .case-feature-grid > img { aspect-ratio: 5 / 4; }
  .detail-page .photo-window { aspect-ratio: 1.42; }
  .detail-page .photo-window-story { aspect-ratio: 1.3; }
}

.cases-hub .case-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--ink2);
}

.case-table-project { width: 47%; }
.case-table-sector { width: 19%; }
.case-table-arrow { width: 36px; }

.case-table :is(th, td) {
  padding: 20px 16px 20px 0;
  vertical-align: middle;
  text-align: start;
  overflow-wrap: anywhere;
}

.case-table thead th {
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
  font-size: var(--type-caption);
  font-weight: 500;
}

.case-table tbody tr { position: relative; }
.case-table tbody th { font-weight: 400; }

.case-table .case-table-link {
  color: var(--ink);
  font-size: clamp(28px, 3.1vw, 48px);
  line-height: 1.08;
}

.case-table-link::after {
  position: absolute;
  inset: 0;
  content: "";
}

.case-table-link:focus-visible::after { outline: 1px solid var(--ink2); outline-offset: -1px; }

.case-table .case-table-open {
  padding-inline-end: 0;
  color: var(--mute);
  font-size: 24px;
  text-align: end;
}

.case-table tr:is(:hover, :focus-within) .case-table-open { color: var(--ink); }

@media (max-width: 720px) {
  .case-table-project { width: 40%; }
  .case-table-sector { width: 23%; }
  .case-table-arrow { width: 22px; }

  .case-table :is(th, td) {
    padding: 14px 8px 14px 0;
    font-size: .75rem;
    line-height: 1.3;
  }

  .case-table .case-table-link { font-size: clamp(18px, 5.4vw, 27px); }
  .case-table .case-table-open { font-size: 18px; }
}
