/* Photographs, project records and the site planner */
html { scroll-padding-top: 82px; }
#content :is(h1,h2) { letter-spacing: -.037em; }
#content h3 { letter-spacing: -.023em; }
.home-opening {
  position: relative; isolation: isolate; display: flex; align-items: flex-end;
  min-height: 575px; height: min(76vh,860px); background: #384238; color: white;
}
.opening-photo, .home-opening::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.opening-photo { z-index: -2; object-fit: cover; object-position: 50% 69%; }
.home-opening::after {
  z-index: -1; content: ""; pointer-events: none;
  background: linear-gradient(90deg,rgba(16,23,16,.74),rgba(16,23,16,.48) 31%,transparent 67%),
              linear-gradient(0deg,rgba(16,22,16,.45),transparent 50%);
}
.opening-copy { padding-block: clamp(40px,5vw,84px); }
#content .opening-copy h1 { font-size: clamp(3.5rem,5.55vw,6.65rem); font-weight: 500; line-height: 1.005; letter-spacing: -.044em; }
.opening-copy h1 span { display: block; }
.opening-copy p { max-width: 39ch; margin: 19px 0 25px; font-size: clamp(1rem,1.35vw,1.27rem); line-height: 1.45; color: #fff; }
.button.opening-cta { min-height: 46px; background: #f5f4e9; color: #252e22; border-color: #f5f4e9; padding-inline: 24px; }
.button.opening-cta:hover { background: #dbdace; border-color: #dbdace; }
.home-opening :focus-visible { outline-color: white; }
.selected-sites, .build-process>.wrap { padding-block: clamp(45px,5.2vw,85px); }
.editorial-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: clamp(23px,2.5vw,41px); }
.editorial-heading h2 { font-size: clamp(2.55rem,4.3vw,5.125rem); font-weight: 500; line-height: 1.04; }
.editorial-heading p { font-size: 1.04rem; line-height: 1.45; margin-top: 12px; max-width: 58ch; color: #4d5749; }
.editorial-heading .under { white-space: nowrap; }
.site-lineup { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px,3vw,54px); }
.site-example { display: grid; grid-template-columns: 1.28fr 1fr; gap: clamp(14px,1.65vw,28px); align-items: center; min-width: 0; }
.example-photo { overflow: hidden; }
.example-photo img, .process-photos img { width: 100%; display: block; object-fit: cover; aspect-ratio: 4/3; }
.site-example img { transition: transform .35s ease-out; }
.site-example:hover img { transform: scale(1.025); }
.site-example:hover h3, .process-photos a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.example-label span, .example-label p { font-size: .93rem; line-height: 1.45; color: #50594a; }
.example-label h3 { margin: .3em 0 .25em; font-size: clamp(1.28rem,2.05vw,2.6rem); line-height: 1.06; font-weight: 500; }
.featured-site { grid-row: span 2; display: block; }
.featured-site img { aspect-ratio: 1.55; }
.featured-site .example-label { margin-top: 16px; }
.featured-site h3 { font-size: clamp(1.8rem,3.15vw,3.65rem); margin: 4px 0; }
.site-example[href*="san-bartolo"] img { object-position: 53% 40% !important; }
.build-process { background: #e2e3d8; }
.process-photos { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(16px,2.25vw,38px); }
.process-photos img { aspect-ratio: 1.48; }
.process-photos img[src$="archive-panel.webp"] { object-position: 50% 48% !important; }
.process-photos h3 { margin: 12px 0 0; font-size: clamp(1.25rem,1.85vw,2rem); font-weight: 500; }
.work-markets { background: #eef0e6; }
.project-record .record-nav { justify-content: flex-start; }
.project-record .record-title { display: block; margin: clamp(20px,3vw,45px) 0 24px; }
.project-record .record-title h1 { font-size: clamp(2.65rem,4.7vw,5.25rem); max-width: 21ch; line-height: 1.03; }
.project-record .record-title p { margin: 12px 0 0; font-size: 1rem; line-height: 1.4; }
.record-title p span { margin-inline: .32em; }
.project-record .gallery { scroll-margin-top: 80px; }
.gallery .gallery-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 12px 0 0; font-size: .95rem; line-height: 1.4; }
#gallery-position { white-space: nowrap; font-variant-numeric: tabular-nums; color: #51573b; }
.gallery-open { touch-action: pan-y pinch-zoom; }
.gallery-open>span { background: #303a2c; border-radius: 30px; padding: 9px 14px; right: 14px; bottom: 14px; font-size: .88rem; }
.project-record .gallery-open img { aspect-ratio: 2.12; max-height: 660px; }
.project-record .gallery-open img.drawing { object-fit: contain; background: #fff; }
.project-record .gallery-open img[src$="bartolo-waiting.webp"] { object-fit: cover; object-position: 50% 48% !important; }
.gallery .thumbs { display: flex; justify-content: flex-start; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; }
.gallery .thumb { flex: 0 0 clamp(76px,7.3vw,114px); width: auto; max-width: none; aspect-ratio: 1.55; }
.gallery .thumb img { width: 100%; }
#viewer-image { touch-action: pan-y pinch-zoom; }
.project-plan { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(25px,5.5vw,96px); align-items: center; border-top: 1px solid var(--hair); padding-block: clamp(30px,5vw,75px); }
.project-plan>a { display: block; background: #fff; padding: 12px; }
.project-plan img { width: 100%; max-height: 500px; object-fit: contain; }
.project-plan h2 { font-size: clamp(1.85rem,3.1vw,3.4rem); font-weight: 500; }
.project-plan p { max-width: 39ch; line-height: 1.5; margin: 14px 0; }
.planner, .compare-page { --lime: #dbdace; }
.model-row input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; background: transparent; border: 1.5px solid #d8ddce; border-radius: 50%; }
.model-row input:checked { background: radial-gradient(circle,#f5f4e9 0 43%,transparent 47%); border-color: #f5f4e9; }
.model-row:has(:checked) span { color: white; font-weight: 650; }
.save-layout { background: #f3f2e9; }
.planner-stage.drawing-stage { display: flex; flex-direction: column; gap: 16px; background: #f8f8f4; color: #20251f; }
.drawing-stage:after { display: none; }
.drawing-stage .view-pills { background: #51573b; }
.drawing-plate, .footprint-plate { display: grid; flex: 1 1 0; position: relative; place-items: center; min-height: 205px; }
.drawing-plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.footprint-shape { height: min(25vw,235px); max-height: 100%; max-width: 95%; position: relative; border: 2px solid #51573b; background: #e5e7dc; display: grid; place-items: center; }
.footprint-shape.round { border-radius: 50%; }
.footprint-shape.two-bays::before { position: absolute; inset: 0 50% 0 auto; content: ""; border-left: 1px dashed #70745c; }
.footprint-shape span { position: relative; background: #e5e7dc; padding: 4px 7px; font-size: .97rem; }
.drawing-caption { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.drawing-caption small { font-size: .91rem; color: #4c5547; }
.drawing-caption h1 { font-size: clamp(2rem,3.4vw,4rem); line-height: 1.05; font-weight: 500; margin: 5px 0 0; }
.drawing-caption .under { white-space: nowrap; }
@media (max-width: 850px) {
  .site-lineup { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .featured-site { grid-row: auto; grid-column: 1/-1; }
  .featured-site img { aspect-ratio: 1.94; }
  .site-example { display: block; }
  .example-label { margin-top: 12px; }
}
@media (max-width: 680px) {
  .home-opening { min-height: 0; height: auto; aspect-ratio: 4/5; }
  .opening-photo { object-position: 60% 62%; }
  .home-opening::after { background: linear-gradient(0deg,rgba(10,18,11,.92),rgba(13,19,12,.66) 27%,rgba(14,20,13,.12) 67%,transparent); }
  .opening-copy { padding-block: 100px 23px; }
  #content .opening-copy h1 { font-size: clamp(2.65rem,9vw,3.55rem); max-width: 18ch; }
  .opening-copy h1 span { display: inline; }
  .opening-copy p { max-width: 37ch; font-size: 1rem; margin: 12px 0 18px; }
  .button.opening-cta { display: flex; width: 100%; }
  .editorial-heading { display: block; margin-bottom: 19px; }
  .editorial-heading .under { display: inline-block; margin-top: 13px; }
  .site-lineup { display: flex; flex-direction: column; gap: 32px; }
  .site-example { width: 100%; }
  .site-example img { aspect-ratio: 4/3; }
  .example-label h3 { font-size: 1.63rem; }
  .example-label span, .example-label p { font-size: .88rem; }
  .build-process .process-photos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--pad) 8px; margin-inline: calc(-1 * var(--pad)); scroll-padding-inline: var(--pad); }
  .process-photos a { flex: 0 0 78%; scroll-snap-align: start; }
  .project-record .gallery-open img { aspect-ratio: 4/3; }
  .project-record .record-title h1 { font-size: clamp(2.28rem,9vw,3rem); }
  .project-plan { grid-template-columns: 1fr; gap: 14px; }
  .project-plan>div { grid-row: 1; }
  .drawing-stage .drawing-plate,.drawing-stage .footprint-plate { min-height: 120px; }
  .planner-stage.drawing-stage { gap: 7px; height: clamp(295px,80vw,375px); }
  .drawing-caption h1 { font-size: clamp(1.6rem,7vw,2.35rem); }
  .planner-bar .use-tabs { min-width: 0; }
}
@media(prefers-reduced-motion:reduce) { .site-example img { transition: none; } }
.opening-art { display:block; position:absolute; inset:0; z-index:-2; }
.opening-art .opening-photo { z-index:auto; }
@media(max-width:680px) {
  .home-opening { display:block; background:#253026; aspect-ratio:auto; }
  .home-opening::after { display:none; }
  .opening-art { position:relative; z-index:0; aspect-ratio:4/4.25; }
  .opening-art::after { position:absolute; inset:68% 0 -1px; content:""; background:linear-gradient(transparent,#253026); }
  .opening-art .opening-photo { object-position:50% 54%; }
  .opening-copy { position:relative; z-index:1; margin-top:-37px; padding-block:0 23px; }
  #content .opening-copy h1 { font-size:clamp(2.45rem,9vw,3.6rem); max-width:18ch; }
}
@media(max-width:680px) {
  .planner-bar .use-tabs { display:grid; grid-template-columns:1fr 1.35fr; padding:0 var(--pad); column-gap:18px; }
  .planner-bar .use-tabs a { min-width:0; min-height:42px; padding:0; justify-content:flex-start; font-size:.9rem; }
  .planner-bar .use-tabs a[aria-current]::after { right:auto; width:32px; }
}

.camp-photo-record.wrap{max-width:1530px}
.camp-pair{display:grid;grid-template-columns:minmax(0,2.3fr) minmax(0,1fr);gap:clamp(8px,1vw,16px);align-items:center}
.camp-frame:first-child{grid-row:span 2}
.camp-frame{min-width:0;width:100%;display:block;padding:0;border:0;background:transparent;cursor:zoom-in}
.camp-frame img{width:100%;height:auto;display:block}
.camp-frame:focus-visible{outline:3px solid #51573b;outline-offset:3px}

@media(max-width:640px){
 .camp-pair{grid-template-columns:minmax(0,1fr);gap:12px}
 .camp-frame:first-child{grid-row:auto}
}


/* Project photographs retain their original composition at a size their source supports. */
.gallery-open:has(#large-photo:not(.drawing)) {
  display:grid;
  grid-template:minmax(0,1fr) / minmax(0,1fr);
  place-items:center;
  height:clamp(285px,38vw,580px);
  background:#eaeae4;
}
.project-record .gallery-open:has(#large-photo:not(.drawing)) {
  height:clamp(350px,min(47vw,68svh),640px);
}
.gallery-open #large-photo:not(.drawing) {
  display:block;
  width:min(100%,var(--photo-native-width,100%));
  height:100%;
  max-height:100%;
  aspect-ratio:auto;
  background:transparent;
  object-fit:contain;
  object-position:center !important;
}
#photo-dialog #viewer-image:not(.drawing) {
  max-width:min(100%,var(--photo-native-width,100%));
  margin-inline:auto;
  object-fit:scale-down;
}
.collection-large #collection-image {object-fit:scale-down}
@media(min-width:850px) {
  .project-record .gallery:has(#large-photo) {
    display:grid;
    grid-template-columns:minmax(0,1fr) clamp(80px,7vw,108px);
    align-items:start;
    gap:clamp(12px,1.3vw,22px);
    max-width:1280px;
    margin-inline:auto;
  }
  .project-record .gallery:has(#large-photo) figure {min-width:0}
  .project-record .gallery:has(#large-photo) .thumbs {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    margin:0;
    align-content:start;
    overflow:visible;
  }
  .project-record .gallery:has(#large-photo) .thumb {width:100%}
}
@media(max-width:680px) {
  .gallery-open:has(#large-photo:not(.drawing)),
  .project-record .gallery-open:has(#large-photo:not(.drawing)) {
    height:clamp(230px,74vw,430px);
  }
}
