/* Client review — 31 August 2026. Loaded last by design. */

.site-header .site-nav {
  gap: clamp(24px, 2.15vw, 44px) !important;
}

.home-page .project-index-group-title,
.home-page .project-index-group-title > * {
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 700 !important;
}

/* Keep the actual animated stroke on the bottom-left corner. */
.home-page .home-bottom-row .corner-logo-mark,
.home-page .corner-logo-mark {
  left: var(--corner-logo-left) !important;
  bottom: calc(var(--corner-logo-bottom) + var(--footer-control-lift, 0px)) !important;
}

/* Homepage: a single, quiet blur interaction. */
.home-page .project-image::before,
.home-page .project-image::after {
  display: none !important;
  content: none !important;
}
.home-page .project-card,
.home-page .project-card:hover,
.home-page .project-card:focus-visible,
.home-page .project-card:focus-within {
  transform: none !important;
}
.home-page .project-image {
  filter: blur(0) !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
  transform-origin: center;
  transition:
    filter 1050ms cubic-bezier(.16, 1, .3, 1),
    transform 820ms cubic-bezier(.18, 1.34, .34, 1) !important;
  will-change: filter, transform;
}
.home-page .project-image img {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  transition: none !important;
}
.home-page .project-card:hover .project-image,
.home-page .project-card:focus-visible .project-image,
.home-page .project-card:focus-within .project-image {
  filter: blur(4.5px) !important;
  transform: translate3d(0, -2px, 0) scale(1.009) !important;
}
.home-page .project-card:hover .project-image img,
.home-page .project-card:focus-visible .project-image img,
.home-page .project-card:focus-within .project-image img {
  opacity: 1 !important;
  filter: none !important;
}
.home-page .project-card[data-project-category="Drawing"] .project-image,
.home-page .project-card[data-project-category="Drawing"] .project-image img,
.home-page .project-card[data-project-slug="noam-guy-apartment"] .project-image,
.home-page .project-card[data-project-slug="wesleys-basement"] .project-image,
.home-page .project-card[data-project-slug="s-tomes-basement"] .project-image,
.home-page .project-card[data-project-slug="s-tomes-wc"] .project-image {
  background: transparent !important;
}
.home-page .project-card[data-project-category="Drawing"],
.home-page .project-card[data-project-slug="noam-guy-apartment"],
.home-page .project-card[data-project-slug="wesleys-basement"],
.home-page .project-card[data-project-slug="s-tomes-basement"],
.home-page .project-card[data-project-slug="s-tomes-wc"] {
  mix-blend-mode: multiply !important;
  background: transparent !important;
}

/* The project-index hover preview is separate from the showcase cards. */
.home-page .home-project-preview,
.home-page .home-project-preview-image-wrap,
.home-page .home-project-preview-image-wrap img {
  background: transparent !important;
}
.home-page .home-project-preview[data-project-category="Drawing"],
.home-page .home-project-preview[data-project-slug="noam-guy-apartment"],
.home-page .home-project-preview[data-project-slug="wesleys-basement"],
.home-page .home-project-preview[data-project-slug="s-tomes-basement"],
.home-page .home-project-preview[data-project-slug="s-tomes-wc"],
.home-page .home-project-preview[data-project-slug="vilarinho-da-castanheira"] {
  mix-blend-mode: multiply !important;
}

/* Showcase sequence: Vilarinho follows Organic, small and left aligned. */
@media (min-width: 781px) {
  .home-page .project-card[data-project-slug="vilarinho-da-castanheira"] {
    grid-column: 1 / 5 !important;
    grid-row: 4 !important;
    width: 100% !important;
    justify-self: start !important;
    margin-top: 0 !important;
  }
  .home-page .project-card[data-project-slug="portrait-of-a-place"] {
    grid-column: 9 / 15 !important;
    grid-row: 4 !important;
    justify-self: end !important;
    margin-top: clamp(90px, 12vh, 180px) !important;
  }
  .home-page .project-card.p9 {
    grid-column: 1 / 7 !important;
    grid-row: 5 !important;
    margin-top: 0 !important;
    justify-self: start !important;
  }
  .home-page .project-card.p8 {
    grid-column: 8 / 15 !important;
    grid-row: 5 !important;
    justify-self: end !important;
  }
  .home-page .project-card.p10 { grid-row: 6 !important; }
  .home-page .project-card.p11 { grid-row: 7 !important; }
}

@media (max-width: 780px) {
  /* A flex stream is more robust here than the legacy numbered grid rows:
     processed transparent drawings can change their intrinsic dimensions. */
  .home-page .home-stage {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: clamp(96px, 18vh, 150px) !important;
  }
  .home-page .home-stage .project-card {
    position: relative !important;
    flex: 0 0 auto !important;
    align-self: auto !important;
    transform: none !important;
  }
  .home-page .home-stage .project-card:nth-child(3n + 1) { align-self: flex-start !important; }
  .home-page .home-stage .project-card:nth-child(3n + 2) { align-self: flex-end !important; }
  .home-page .home-stage .project-card:nth-child(3n) { align-self: center !important; }
  .home-page .home-stage .project-image,
  .home-page .home-stage .project-image img {
    display: block !important;
    height: auto !important;
  }
  .home-page .project-card[data-project-slug="vilarinho-da-castanheira"] {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 54% !important;
    align-self: flex-start !important;
    justify-self: start !important;
    margin-top: 0 !important;
  }
  .home-page .project-card[data-project-slug="portrait-of-a-place"] {
    grid-column: 1 !important;
    grid-row: auto !important;
    width: 72% !important;
    align-self: flex-end !important;
    justify-self: end !important;
    margin-top: 0 !important;
  }
  .home-page .project-card.p8,
  .home-page .project-card.p9,
  .home-page .project-card.p10,
  .home-page .project-card.p11 {
    grid-row: auto !important;
  }
}

/* Project page: one white stream containing drawings and photographs. */
.project-body,
.project-page,
.project-gallery-unified {
  background: #fff !important;
}
.project-body { overflow-y: auto !important; }
.project-page {
  height: auto !important;
  min-height: 100svh !important;
  overflow: visible !important;
}
.project-gallery-unified {
  width: 100%;
  min-height: 100svh;
  padding: clamp(110px, 14vh, 180px) var(--pad) clamp(90px, 12vh, 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(70px, 12vh, 170px);
}
.project-gallery-unified .project-media {
  width: min(92vw, 1500px) !important;
  min-height: min(82svh, 1000px);
  margin: 0 !important;
  display: grid !important;
  place-items: center;
  background: #fff !important;
}
.project-gallery-unified .project-media img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 82svh !important;
  object-fit: contain !important;
}
.project-gallery-mobile-dual { display: none !important; }
.project-info-overlay { overflow: hidden !important; }
.project-info-scroll {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.project-info-content { min-height: max-content !important; }
.image-lightbox,
.drawing-project-lightbox {
  background: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.image-lightbox-close span,
.image-lightbox-close span::before,
.image-lightbox-close span::after { background: #111 !important; }

@media (max-width: 780px) {
  .site-header .site-nav { gap: 18px !important; }
  .project-gallery-unified {
    padding: 104px 0 90px;
    gap: 58px;
  }
  .project-gallery-unified .project-media {
    width: 100vw !important;
    min-height: 70svh;
    padding: 0 12px;
  }
  .project-gallery-unified .project-media img { max-height: 76svh !important; }
}

/* Tablet and portrait project view: one full-height horizontal snap track. */
@media (orientation: portrait), (max-width: 1280px) {
  .project-body {
    overflow: hidden !important;
  }
  .project-page {
    width: 100vw !important;
    height: 100svh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .project-gallery-unified { display: none !important; }
  .project-gallery-mobile-dual {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    width: 100vw !important;
    height: 100svh !important;
    overflow: hidden !important;
    background: #fff !important;
  }
  .project-mobile-track {
    width: 100vw !important;
    height: 50svh !important;
    min-height: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth;
    overscroll-behavior-inline: contain;
    touch-action: pan-x !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .project-mobile-track::-webkit-scrollbar { display: none; }
  .project-mobile-track-content {
    display: flex !important;
    flex-flow: row nowrap !important;
    width: max-content !important;
    min-width: 100% !important;
    height: 100% !important;
  }
  .project-mobile-track .project-media {
    flex: 0 0 100vw !important;
    width: 100vw !important;
    height: 50svh !important;
    min-height: 0 !important;
    margin: 0 !important;
    display: grid !important;
    place-items: center !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always;
    background: #fff !important;
  }
  .project-mobile-drawings .project-media {
    padding: clamp(104px, 13svh, 150px) clamp(16px, 3vw, 42px) 16px !important;
  }
  .project-mobile-photos .project-media {
    padding: 12px clamp(12px, 2vw, 28px) clamp(18px, 3svh, 34px) !important;
  }
  .project-mobile-track .project-media img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }
  .project-info-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100svh !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  .project-info-scroll {
    display: block !important;
    position: absolute !important;
    top: clamp(176px, 19svh, 230px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: clamp(24px, 4vh, 48px) var(--pad) clamp(54px, 8vh, 100px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
  }
  .project-info-content {
    min-height: max-content !important;
    padding-bottom: 1px !important;
  }
}

/* Desktop project information: only the description column scrolls.
   Technical facts remain stationary on the right. */
@media (min-width: 1281px) and (orientation: landscape) {
  .project-info-overlay {
    display: block !important;
    padding: 118px var(--pad) 40px !important;
    overflow: hidden !important;
  }
  .project-info-scroll {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: calc(100svh - 158px) !important;
    overflow: hidden !important;
  }
  .project-info-content {
    height: 100% !important;
    min-height: 0 !important;
    align-items: stretch !important;
  }
  .project-info-copy {
    height: 100% !important;
    min-height: 0 !important;
    padding-right: clamp(14px, 1.5vw, 28px) !important;
    padding-bottom: 48px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }
  .project-info-copy::-webkit-scrollbar { display: none !important; }
  .project-info-facts {
    align-self: start !important;
    overflow: visible !important;
  }
}

/* Restored from the 31 August afternoon build: the original dual gallery.
   Newer project data, lightbox and information-panel behavior remain intact. */
.project-body,
.project-page,
.dual-gallery,
.gallery-column,
.gallery-drawings,
.gallery-photos,
.gallery-drawings .project-media,
.gallery-photos .project-media {
  background: #fff !important;
}
.project-page,
.dual-gallery {
  width: 100vw !important;
  height: 100svh !important;
  overflow: hidden !important;
}
.dual-gallery {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
}
.gallery-column,
.gallery-column:first-child,
.gallery-column:last-child {
  position: relative !important;
  width: auto !important;
  height: 100svh !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-width: none !important;
}
.gallery-column::-webkit-scrollbar { display: none !important; }
.gallery-column:first-child { border-right: 0 !important; }
.gallery-column-content { padding: 0 !important; }
.gallery-drawings {
  scroll-snap-type: y mandatory !important;
  scroll-behavior: smooth !important;
}
.gallery-drawings .project-media {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100svh !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: clamp(58px, 7vh, 92px) clamp(20px, 2.6vw, 50px) clamp(42px, 6vh, 78px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  scroll-snap-align: start !important;
  scroll-snap-stop: always !important;
}
.gallery-drawings .project-media img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 84svh !important;
  object-fit: contain !important;
}
.gallery-photos {
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
}
.gallery-photos .project-media {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}
.gallery-photos .project-media img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: unset !important;
}
.dual-gallery .project-media,
.dual-gallery .project-media img {
  opacity: 1 !important;
  transform: none !important;
}

@media (orientation: portrait), (max-width: 1280px) {
  .dual-gallery {
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
  .gallery-column,
  .gallery-column:first-child,
  .gallery-column:last-child {
    width: 100vw !important;
    height: 50svh !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-inline: contain !important;
    overscroll-behavior-block: none !important;
    touch-action: pan-x !important;
  }
  .gallery-column:first-child {
    border-right: 0 !important;
    border-bottom: 1px solid rgba(21, 21, 21, .14) !important;
  }
  .gallery-column-content,
  .gallery-drawings .gallery-column-content,
  .gallery-photos .gallery-column-content {
    display: flex !important;
    flex-flow: row nowrap !important;
    width: max-content !important;
    min-width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
  }
  .gallery-drawings {
    scroll-snap-type: x mandatory !important;
  }
  .gallery-drawings .project-media {
    flex: 0 0 100vw !important;
    width: 100vw !important;
    height: 50svh !important;
    padding: clamp(54px, 8svh, 82px) 20px 18px !important;
    scroll-snap-align: start !important;
  }
  .gallery-drawings .project-media img {
    max-width: 100% !important;
    max-height: calc(50svh - clamp(78px, 11svh, 112px)) !important;
  }
  .gallery-photos {
    scroll-snap-type: none !important;
  }
  .gallery-photos .project-media {
    flex: 0 0 auto !important;
    width: auto !important;
    height: 50svh !important;
  }
  .gallery-photos .project-media img {
    width: auto !important;
    height: 50svh !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .project-image {
    transform: none !important;
    transition: none !important;
  }
}

/* Definitive dual gallery: vertical columns on desktop. */
.project-body {
  overflow: hidden !important;
}
.project-page {
  width: 100vw !important;
  height: 100svh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.project-gallery-unified {
  display: none !important;
}
.project-gallery-mobile-dual {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  width: 100vw !important;
  height: 100svh !important;
  overflow: hidden !important;
  background: #fff !important;
}
.project-mobile-track {
  width: 50vw !important;
  height: 100svh !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-snap-type: y mandatory !important;
  scroll-behavior: smooth;
  overscroll-behavior-block: contain;
  touch-action: pan-y !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.project-mobile-track::-webkit-scrollbar { display: none; }
.project-mobile-track-content {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 100% !important;
}
.project-mobile-track .project-media {
  width: 50vw !important;
  height: 100svh !important;
  min-height: 0 !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  scroll-snap-align: start !important;
  scroll-snap-stop: always;
  background: #fff !important;
}
.project-mobile-drawings .project-media {
  padding: clamp(104px, 13svh, 154px) clamp(20px, 3vw, 58px) clamp(24px, 4svh, 52px) !important;
}
.project-mobile-photos .project-media {
  padding: clamp(104px, 13svh, 154px) clamp(20px, 3vw, 58px) clamp(24px, 4svh, 52px) !important;
}
.project-mobile-track .project-media img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

/* Mobile/tablet: the same two galleries become stacked horizontal tracks. */
@media (orientation: portrait), (max-width: 1280px) {
  .project-gallery-mobile-dual {
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
  }
  .project-mobile-track {
    width: 100vw !important;
    height: 50svh !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    overscroll-behavior-inline: contain;
    overscroll-behavior-block: none;
    touch-action: pan-x !important;
  }
  .project-mobile-track-content {
    display: flex !important;
    flex-flow: row nowrap !important;
    width: max-content !important;
    min-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }
  .project-mobile-track .project-media {
    flex: 0 0 100vw !important;
    width: 100vw !important;
    height: 50svh !important;
  }
  .project-mobile-drawings .project-media {
    padding: clamp(104px, 13svh, 150px) clamp(16px, 3vw, 42px) 16px !important;
  }
  .project-mobile-photos .project-media {
    padding: 12px clamp(12px, 2vw, 28px) clamp(18px, 3svh, 34px) !important;
  }
}
