/* Homepage */
.r-hero.featured-project {
  min-height: clamp(470px, 37vw, 630px);
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.32fr);
}
.featured-project .r-hero-copy {
  justify-content: center;
  padding-block: clamp(36px, 4.7vw, 72px);
}
.featured-project h1 {
  font-size: clamp(46px, 4.6vw, 80px);
  margin: 20px 0;
}
.featured-project .r-hero-intro { max-width: 39ch; }
.featured-project .r-hero-photo > img { object-position: 53% 52%; }
.featured-project .r-hero-photo > span { align-items: end; }
.featured-project .r-hero-photo strong {
  font-size: clamp(22px, 2.3vw, 38px);
  line-height: 1.15;
  letter-spacing: -.035em;
}
.featured-project .r-hero-photo > span { background: linear-gradient(transparent, rgb(15 29 40 / 85%)); }

/* Project index */
.portfolio-heading { padding-block: clamp(30px, 4vw, 62px); }
.portfolio-heading + .section { padding-top: clamp(26px, 3vw, 46px); }
.project-grid .work-info { position: relative; padding-right: 44px; }
.project-grid .work-info > .as-arrow-icon {
  position: absolute;
  top: 27px;
  right: 2px;
  color: var(--as-accent);
}
.project-grid .work-card:hover .as-arrow-icon { transform: translateX(2px); }

/* Fracassa */
.frac-intro { background: #f5f1eb; }
.frac-intro-inner {
  max-width: 1680px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, .80fr) minmax(0, 1.32fr);
  align-items: stretch;
}
.frac-intro-copy {
  align-self: center;
  padding: clamp(28px, 4.6vw, 72px) var(--as-gutter);
}
.frac-intro-copy .breadcrumb {
  font-size: 13px;
  color: #585044;
  margin-bottom: clamp(26px, 3.4vw, 54px);
}
.frac-intro-copy .eyebrow { color: #78432a; }
.frac-intro-copy h1 {
  color: #312c27;
  font-size: clamp(52px, 6.6vw, 108px);
  letter-spacing: -.062em;
  line-height: 1;
  margin: 12px 0 22px;
}
.frac-intro-copy .frac-lead {
  font-size: clamp(16px, 1.25vw, 21px);
  line-height: 1.6;
  color: #514b43;
  max-width: 39ch;
}
.frac-intro-copy .text-link { display: inline-block; margin-top: 22px; }
.frac-hero-shot { min-width: 0; margin: 0; align-self: center; }
.frac-shot-button {
  display: block;
  width: 100%;
  position: relative;
  padding: 0;
  border: 0;
  background: #ede9e4;
  cursor: zoom-in;
}
.frac-shot-button img { display: block; width: 100%; height: auto; }
.frac-shot-button::after {
  content: "Ingrandisci";
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgb(18 29 38 / 85%);
  color: white;
  font-size: 12px;
  line-height: 1.5;
}
.frac-shot-button:lang(en)::after { content: "Enlarge"; }
.frac-scope {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 100px);
  align-items: start;
  padding-block: clamp(42px, 6vw, 90px);
}
.frac-scope h2, .frac-gallery h2 { font-size: clamp(32px, 3.2vw, 52px); }
.frac-scope p { max-width: 64ch; line-height: 1.68; }
.frac-credit { margin-top: 20px; padding-left: 16px; border-left: 2px solid #ae6c47; color: #4b514f; }
.frac-gallery { border-top: 1px solid var(--as-line); padding-block: clamp(28px, 4vw, 64px); }
.frac-gallery h2 { margin-bottom: clamp(20px, 2.6vw, 38px); }
.frac-row, .frac-pair { display: flex; gap: clamp(14px, 1.8vw, 28px); align-items: flex-start; }
.frac-row + .frac-row { margin-top: clamp(28px, 3.4vw, 54px); }
.frac-shot, .frac-pair { flex: var(--ratio) 1 0; min-width: 0; margin: 0; }
.frac-shot figcaption { font-size: 14px; line-height: 1.52; color: var(--as-muted); padding-top: 10px; }
.frac-links { display: flex; flex-wrap: wrap; gap: 16px 36px; margin-bottom: clamp(38px, 5vw, 76px); }

/* Enlarged photographs */
#gallery-dialog.with-paging { margin: auto; }
#gallery-dialog.with-paging[open] { display: flex; flex-direction: column; }
#gallery-dialog.with-paging .dialog-top { margin-bottom: 12px; }
#gallery-dialog.with-paging .dialog-image {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(74dvh, calc(100dvh - 166px));
  object-fit: contain;
  background: #f3f4f3;
}
.gallery-paging { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.gallery-paging button {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 6px 12px;
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--as-line);
  border-radius: 99px;
  font: inherit;
  font-size: 13px;
  color: var(--as-ink);
}
.gallery-paging button:hover { background: var(--as-soft); }
.gallery-paging .as-arrow-icon { width: 17px; height: 17px; }
.gallery-paging .previous .as-arrow-icon { transform: rotate(180deg); }
.gallery-position { font-size: 13px; color: var(--as-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 960px) {
  .frac-intro-inner { grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr); }
  .frac-intro-copy { padding: 26px var(--as-gutter); }
  .frac-intro-copy .breadcrumb { margin-bottom: 20px; }
  .frac-paired { flex-direction: column; gap: 28px; }
  .frac-paired .frac-pair { width: 100%; }
}
@media (max-width: 700px) {
  .r-hero.featured-project, .frac-intro-inner, .frac-scope { grid-template-columns: 1fr; }
  .r-hero.featured-project { min-height: 0; }
  .featured-project .r-hero-copy { padding-block: 28px; }
  .featured-project h1 { font-size: clamp(37px, 8.2vw, 52px); line-height: 1.04; margin: 12px 0 14px; }
  .featured-project .r-hero-intro { font-size: 15px; line-height: 1.55; max-width: 44ch; margin-bottom: 18px; }
  .featured-project .r-hero-photo { height: auto; aspect-ratio: 1.65; }
  .portfolio-heading .intro { margin-top: 12px; }
  .frac-intro-copy { padding-block: 22px 24px; }
  .frac-intro-copy .breadcrumb { margin-bottom: 17px; }
  .frac-intro-copy h1 { font-size: 56px; margin: 7px 0 12px; }
  .frac-intro-copy .text-link { margin-top: 14px; }
  .frac-scope { gap: 18px; }
}
@media (max-width: 580px) {
  .frac-row, .frac-pair { flex-direction: column; gap: 24px; }
  .frac-shot { width: 100%; }
  .frac-shot figcaption { padding-top: 8px; font-size: 13px; }
  #gallery-dialog.with-paging .dialog-image { max-height: min(71dvh, calc(100dvh - 192px)); }
}
@media (prefers-reduced-motion: reduce) {
  .project-grid .work-card:hover .as-arrow-icon { transform: none; }
}
