/* HPAD v5: the projects page. The Venn diagram of what we make, the filters, the three-column grid
   (every tile carries its real HP number) and the project that opens from its tile. */

/* ------------------------------------------------------------------ the Venn */
.venn-hero { padding-top: calc(var(--hd-h) + clamp(28px, 6vh, 70px)); background: var(--ice); }
.venn-head { display: grid; gap: 14px; justify-items: start; }
.venn-head .label { color: var(--grey); }
.venn-sub { max-width: 34ch; font-weight: 300; font-size: clamp(1rem, .9rem + .4vw, 1.2rem); color: var(--grey); }
.venn { position: relative; max-width: 1000px; margin: clamp(10px, 2vh, 30px) auto 0; padding: 0 var(--gut); }
.venn-svg { width: 100%; height: auto; display: block; overflow: visible; }
.vc { fill: var(--purple); fill-opacity: .1; stroke: var(--purple); stroke-opacity: .5; stroke-width: 1.4; transition: fill-opacity .5s var(--ease), stroke-opacity .5s var(--ease); }
.vc[data-circle="places"] { fill: var(--maroon); stroke: var(--maroon); }
.vc[data-circle="work"] { fill: var(--grey); stroke: var(--grey); }
.vc[data-circle="land"] { fill: var(--olive); stroke: var(--olive); }
.venn.has-on .vc { fill-opacity: .04; stroke-opacity: .22; }
.venn .vc.is-on { fill-opacity: .34; stroke-opacity: 1; }
.venn .vc.is-hover:not(.is-on) { fill-opacity: .18; stroke-opacity: .75; }
.vl { font-family: var(--mono); font-size: 22px; letter-spacing: .06em; text-transform: uppercase; fill: var(--purple); transition: opacity .4s var(--ease); pointer-events: none; }
.vl .vl-n { font-size: 30px; letter-spacing: -.02em; }
.venn.has-on .vl { opacity: .35; }
.venn.has-on .vl.is-on { opacity: 1; }
.venn-hit circle { fill: transparent; cursor: pointer; }
.venn-hit circle:focus-visible { outline: none; stroke: var(--purple); stroke-width: 3; }
.venn-count { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); color: var(--grey); white-space: nowrap; }
@media (max-width: 699px) { .vl { font-size: 30px; } .vl .vl-n { font-size: 40px; } .venn { padding: 0; } }

/* ------------------------------------------------------------------ filters */
.plist { background: var(--ice); padding: clamp(40px, 7vh, 80px) 0 clamp(80px, 12vh, 140px); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-bottom: clamp(24px, 4vh, 44px); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(73, 61, 81, .28); font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--purple); transition: background-color .3s, color .3s, border-color .3s; }
.chip:hover { border-color: var(--purple); }
.chip.is-on { background: var(--purple); color: var(--ice); border-color: var(--purple); }
.search { margin-left: auto; }
.search input { font: inherit; font-size: 16px; min-width: 240px; padding: 8px 0; border: 0; border-bottom: 1px solid rgba(73, 61, 81, .32); background: transparent; color: var(--purple); }
.search input:focus { outline: none; border-bottom-color: var(--purple); }
.search input::placeholder { color: rgba(73, 61, 81, .5); }
@media (max-width: 699px) { .filter-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; margin: 0 calc(var(--gut) * -1); padding-inline: var(--gut); scrollbar-width: none; } .filter-row::-webkit-scrollbar { display: none; } .chip { flex: none; } .search { margin: 0; width: 100%; } .search input { width: 100%; } }

/* ------------------------------------------------------------------ the grid */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 26px); }
.ptile { position: relative; display: block; text-align: left; border-radius: 3px; overflow: hidden; background: #e4e5ea; aspect-ratio: 4 / 3; color: var(--ice); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.ptile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s var(--ease); }
.ptile:hover img { transform: scale(1.04); }
.ptile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18, 12, 24, .58), rgba(18, 12, 24, 0) 48%); }
.ptile-code { position: absolute; left: 16px; top: 14px; z-index: 1; padding: 6px 10px; border-radius: 999px; background: rgba(244, 249, 253, .9); color: var(--purple); font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; }
.ptile-cap { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; display: grid; gap: 4px; }
.ptile-name { font-family: var(--mono); text-transform: uppercase; font-size: clamp(.9rem, .75rem + .5vw, 1.25rem); letter-spacing: -.02em; line-height: 1.15; }
.ptile-meta { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.ptile.is-hidden { display: none; }
.empty { color: var(--grey); padding-top: 30px; }
.plist-note { color: var(--grey); margin-top: clamp(40px, 7vh, 80px); }
@media (max-width: 899px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; gap: 14px; } .ptile { aspect-ratio: 4 / 3.2; } }

/* ------------------------------------------------------------------ a project, opened */
.pview { position: fixed; inset: 0; z-index: 85; }
.pview[hidden] { display: none; }
.pview-panel { --t: 0px; --r: 0px; --b: 0px; --l: 0px; --rad: 0px; position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--ice); color: var(--purple); clip-path: inset(var(--t) var(--r) var(--b) var(--l) round var(--rad)); }
.pview-close { position: fixed; right: var(--gut); top: calc(var(--hd-h) / 2 - 19px); z-index: 3; height: 38px; padding: 0 18px; border-radius: 999px; background: var(--purple); color: var(--ice); opacity: 0; transition: opacity .4s var(--ease); }
.pview.is-open .pview-close { opacity: 1; }
.pv-hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; color: var(--ice); background: #2a2230; }
.pv-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18, 12, 24, .62), rgba(18, 12, 24, 0) 52%); }
.pv-head { position: absolute; left: 0; right: 0; bottom: clamp(36px, 8vh, 90px); z-index: 1; display: grid; gap: 12px; opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease) .15s, transform .8s var(--ease) .15s; }
.pview.is-open .pv-head { opacity: 1; transform: none; }
.pv-code { display: inline-flex; gap: 12px; align-items: center; }
.pv-code .label { opacity: .85; }
.pv-code .pv-pill { padding: 6px 11px; border-radius: 999px; background: rgba(244, 249, 253, .92); color: var(--purple); font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; }
.pv-head .h2 { max-width: 14ch; }
.pv-line { font-size: clamp(1.05rem, .9rem + .5vw, 1.4rem); font-weight: 300; max-width: 36ch; }
.pv-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 28px); padding-top: clamp(40px, 8vh, 90px); padding-bottom: clamp(30px, 6vh, 70px); }
.pv-strip figure { overflow: hidden; background: #e4e5ea; aspect-ratio: 4 / 3; }
.pv-strip figure.tall { aspect-ratio: 3 / 4; }
.pv-strip figure.wide { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.pv-strip img { width: 100%; height: 100%; object-fit: cover; }
.pv-facts { display: flex; flex-wrap: wrap; gap: 10px 36px; color: var(--grey); padding-bottom: clamp(30px, 6vh, 60px); }
.pv-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: clamp(60px, 12vh, 120px); }
.pv-nav { display: flex; gap: 10px; }
.pv-nav button { min-height: 40px; padding: 0 16px; border: 1px solid rgba(73, 61, 81, .3); border-radius: 999px; font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; }
.pv-nav button:hover { border-color: var(--purple); }
@media (max-width: 699px) { .pv-strip { grid-template-columns: 1fr; } .pv-strip figure, .pv-strip figure.wide, .pv-strip figure.tall { grid-column: auto; aspect-ratio: 4 / 3.4; } }
html.pview-open, html.pview-open body { overflow: hidden; }

/* ------------------------------------------------------------------ 23 Oct 2026: the Instagram grid (the Venn is gone) */
.ig { background: var(--ice); padding: calc(var(--hd-h) + clamp(28px, 6vh, 70px)) 0 clamp(80px, 12vh, 140px); min-height: 100vh; }
.ig-head { display: grid; gap: 12px; justify-items: start; margin-bottom: clamp(26px, 5vh, 48px); }
.ig-head .label { color: var(--grey); }
.ig-filters { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: clamp(18px, 3vh, 30px); border-bottom: 1px solid rgba(73, 61, 81, .14); }
.ig-f { padding: 10px 0 12px; margin-bottom: -1px; border-bottom: 1px solid transparent; font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); transition: color .3s, border-color .3s; }
.ig-f:hover { color: var(--purple); }
.ig-f.is-on { color: var(--purple); border-bottom-color: var(--purple); }
.ig-f.is-soon { opacity: .5; }
.ig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ig-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #e4e5ea; color: var(--ice); text-align: left; }
.ig-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ig-tile::after { content: ""; position: absolute; inset: 0; background: rgba(20, 14, 26, .42); opacity: 0; transition: opacity .4s var(--ease); }
.ig-tile:hover img { transform: scale(1.05); }
.ig-tile:hover::after, .ig-tile:focus-visible::after { opacity: 1; }
.ig-code { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 4px 9px; border-radius: 999px; background: rgba(244, 249, 253, .9); color: var(--purple); font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; }
.ig-name { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; font-family: var(--mono); font-size: clamp(.72rem, .6rem + .4vw, 1rem); letter-spacing: .06em; text-transform: uppercase; opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.ig-tile:hover .ig-name, .ig-tile:focus-visible .ig-name { opacity: 1; transform: none; }
.ig-tile.is-hidden { display: none; }
.ig-empty { color: var(--grey); padding: 60px 0; text-align: center; }
@media (max-width: 699px) {
  .ig-filters { flex-wrap: nowrap; overflow-x: auto; gap: 20px; margin: 0 0 14px; padding: 0 var(--gut); scrollbar-width: none; }
  .ig-filters::-webkit-scrollbar { display: none; }
  .ig-f { flex: none; }
  .ig-grid { gap: 2px; padding: 0; }
  .ig-code { left: 5px; top: 5px; padding: 2px 6px; font-size: .5rem; }
}

/* ------------------------------------------------------------------ 23 Oct 2026: drawings in a project (plans, sections, elevations) */
.pv-drawings { padding-top: clamp(10px, 3vh, 30px); padding-bottom: clamp(30px, 6vh, 60px); }
.pv-dlabel { color: var(--grey); margin-bottom: 16px; }
.pv-dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 28px); }
.pv-dwg { display: grid; gap: 10px; color: var(--grey); }
.pv-dimg { display: block; background: #fff; border: 1px solid rgba(73, 61, 81, .12); border-radius: 3px; overflow: hidden; max-height: 70vh; }
.pv-dimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pv-dwg:hover .pv-dimg { border-color: rgba(73, 61, 81, .4); }
@media (max-width: 699px) { .pv-dgrid { grid-template-columns: 1fr; } }

/* QC 23 Oct: on a phone the filter row fades at the right edge, so it reads as a row that scrolls */
@media (max-width: 699px) { .ig-filters { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 40px; } }

/* QC round 2: the fade goes once the row is scrolled to its end; the project view counts where you are */
@media (max-width: 699px) { .ig-filters.is-end { -webkit-mask-image: none; mask-image: none; } }
.pv-nav { align-items: center; }
.pv-count { color: var(--grey); white-space: nowrap; }

/* review 01, 23 Oct (marketing): names stay visible before the tap; two columns on a phone; an empty category offers a way on */
.ig-tile::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: 0; background: linear-gradient(to top, rgba(20, 14, 26, .58), rgba(20, 14, 26, 0)); pointer-events: none; }
.ig-tile .ig-name { opacity: 1; transform: none; }
@media (max-width: 699px) { .ig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ig-name { left: 8px; right: 8px; bottom: 8px; font-size: .62rem; } }
.ig-empty { text-align: center; padding: 60px 0; color: var(--purple); }
.ig-empty .label { color: var(--grey); }
.ig-empty-line { margin: 10px auto 0; max-width: 34ch; font-weight: 300; font-size: 1.1rem; }
.ig-empty-go { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
.pv-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.pv-share { font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: underline; text-underline-offset: 4px; }
