/* Our Work: its parts placed and sized with the tokens of system.css (the shared parts are in components.css). */

/* ---------- 1. the header: the company header; at its right the wall's first roofs rising into place, once ---------- */
.rise { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; align-items: start; }
.rise > * { animation: rise-in 950ms var(--ease-out) both; animation-delay: calc(450ms + var(--i, 0) * 260ms); }
.rise__frame .gable__media { aspect-ratio: 4 / 3.5; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.6); }
.rise__frame:nth-child(2) { margin-top: 2.6rem; }
.rise__frame:nth-child(3) { margin-top: -1.6rem; }
.rise__count { margin: 1rem 0 0; padding: 0.95rem 1.05rem; display: grid; gap: 0.25rem; }
.rise__count b { font: 800 2.6rem/0.95 var(--font-display); color: var(--c-accent-on-ink); }
.rise__count span { font: 600 var(--fs-small)/1.3 var(--font-ui); color: var(--c-on-ink); }
@keyframes rise-in { from { opacity: 0; transform: translateY(56px) scale(0.96); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .rise { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
  .rise__frame:nth-child(n) { margin-top: 0; }
  .rise__count { grid-column: 1 / -1; margin: 0; display: flex; align-items: baseline; gap: 0.6rem; padding: 0.75rem 1rem; }
  .rise__count b { font-size: 2rem; }
}

/* ---------- 2. signature: the wall (projects.js lays it in columns, filters it, slides its columns with the scroll and
   opens a roof large) ---------- */
.wall__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4) var(--space-6); align-items: end; margin-bottom: var(--space-5); }
.wall .head { margin-bottom: 0; }
.wall .head__title { color: var(--c-paper); }
.wall__filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; max-width: 38rem; }
.wall__filter { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; margin: 0; border: 0; cursor: pointer; padding: 0.5rem 0.75rem 0.5rem 0.95rem; border-radius: 999px; background: rgba(247, 245, 238, 0.06); box-shadow: inset 0 0 0 1px var(--c-on-ink-line); color: var(--c-on-ink); font: 700 1rem/1 var(--font-display); transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.wall__filter b { min-width: 1.4em; padding: 0.22rem 0.42rem; border-radius: 999px; background: rgba(247, 245, 238, 0.12); color: var(--c-on-ink-soft); font: 700 0.8rem/1 var(--font-ui); text-align: center; }
.wall__filter[aria-pressed="true"] { background: var(--c-accent); color: var(--c-on-accent); box-shadow: none; }
.wall__filter[aria-pressed="true"] b { background: rgba(14, 38, 25, 0.16); color: var(--c-on-accent); }
@media (hover: hover) { .wall__filter:hover:not([aria-pressed="true"]) { background: rgba(240, 160, 28, 0.16); box-shadow: inset 0 0 0 1px var(--c-accent); } }
.wall__filter:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.wall__dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--dot); box-shadow: inset 0 0 0 1.5px rgba(247, 245, 238, 0.6); }
.wall__filter[aria-pressed="true"] .wall__dot { box-shadow: inset 0 0 0 1.5px rgba(14, 38, 25, 0.35); }

/* without the script, a plain grid; with it, columns (data-cols) that slide against each other with the scroll, with
   room above and below for their slide */
.wall__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
.wall__grid[data-cols] { display: flex; align-items: flex-start; padding-block: 48px; }
.wall__col { flex: 1 1 0; min-width: 0; display: grid; gap: clamp(1rem, 2vw, 1.6rem); transform: translate3d(0, var(--slide, 0px), 0); }
.wall__item[hidden] { display: none; }
.wall__item[data-reveal] { translate: 0 48px; transition-delay: var(--d, 0ms); }
.wall__item[data-reveal][data-in] { translate: 0 0; }
.wall__open { position: relative; display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: zoom-in; }
.wall__open .gable__media { display: block; aspect-ratio: var(--a, 4 / 3); box-shadow: 0 26px 50px -22px rgba(0, 0, 0, 0.65); }
.wall__open .gable__media > img { object-position: var(--focus, 50% 50%); transition: transform 700ms var(--ease-out); }
@media (hover: hover) { .wall__open:hover .gable__media > img { transform: scale(1.045); } }
.wall__open:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 5px; border-radius: var(--radius-l); }
.wall__chip { position: absolute; z-index: 4; left: 0.7rem; bottom: 0.7rem; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.42rem 0.75rem 0.44rem 0.6rem; border-radius: 999px; font: 700 0.9rem/1 var(--font-display); }
.wall__zoom { position: absolute; z-index: 4; right: 0.7rem; bottom: 0.7rem; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--c-accent); color: var(--c-on-accent); opacity: 0; transform: scale(0.85); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.wall__zoom .icon { width: 20px; height: 20px; }
@media (hover: hover) { .wall__open:is(:hover, :focus-visible) .wall__zoom { opacity: 1; transform: none; } }
/* on a touch screen the sign that a roof opens is always there, quiet: dark glass, not the amber of an action */
@media (hover: none) { .wall__zoom { opacity: 1; transform: none; width: 30px; height: 30px; background: rgba(14, 38, 25, 0.62); color: var(--c-paper); box-shadow: inset 0 0 0 1px rgba(247, 245, 238, 0.28); } .wall__zoom .icon { width: 16px; height: 16px; } }
.wall__cap { margin: 0.65rem 0 0; display: grid; gap: 0.12rem; }
.wall__cap b { font: 700 1.02rem/1.25 var(--font-display); color: var(--c-paper); }
.wall__cap span { font-size: var(--fs-small); line-height: 1.35; color: var(--c-on-ink-soft); }
@media (max-width: 900px) {
  .wall__top { grid-template-columns: 1fr; }
  .wall__filters { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .wall__filters { gap: 0.4rem; }
  .wall__filter { padding: 0.45rem 0.6rem 0.45rem 0.75rem; font-size: 0.95rem; }
  .wall__grid[data-cols] { padding-block: 28px; }
  .wall__chip { left: 0.45rem; bottom: 0.45rem; padding: 0.32rem 0.55rem 0.34rem 0.45rem; font-size: 0.8rem; gap: 0.35rem; }
  .wall__chip .wall__dot { width: 11px; height: 11px; }
  .wall__zoom { right: 0.45rem; bottom: 0.45rem; }
  .wall__cap b { font-size: 0.92rem; }
  .wall__cap span { font-size: 0.8rem; }
}

/* ---------- the roof opened large ---------- */
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox { box-sizing: border-box; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: none; color: var(--c-on-ink); overflow: hidden; }
.lightbox::backdrop { background: rgba(6, 18, 11, 0.92); }
.lightbox__in { position: relative; box-sizing: border-box; width: 100%; height: 100%; display: grid; place-items: center; padding: 4.5rem clamp(1rem, 7vw, 6.5rem) 1.5rem; }
.lightbox__fig { margin: 0; display: grid; justify-items: center; gap: 0.9rem; min-width: 0; }
.lightbox__img { display: block; width: auto; height: auto; max-width: min(1200px, 100%); max-height: calc(100dvh - 11rem); border-radius: var(--radius-l); box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.8); }
.lightbox__img.is-in { animation: lightbox-in 420ms var(--ease-out); }
@keyframes lightbox-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.lightbox__cap { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.3rem 0.9rem; text-align: center; }
.lightbox__cap b { font: 700 1.15rem/1.3 var(--font-display); color: var(--c-paper); }
.lightbox__cap span { font-size: var(--fs-small); color: var(--c-on-ink-soft); }
.lightbox__n { font-variant-numeric: tabular-nums; }
.lightbox__btn, .lightbox__close { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: rgba(247, 245, 238, 0.1); color: var(--c-paper); box-shadow: inset 0 0 0 1px var(--c-on-ink-line); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.lightbox__btn .icon, .lightbox__close .icon { width: 24px; height: 24px; }
.lightbox__btn { top: 50%; margin-top: -26px; }
.lightbox__btn--prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox__btn--next { right: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox__close { top: 1rem; right: 1rem; }
@media (hover: hover) { .lightbox__btn:hover, .lightbox__close:hover { background: var(--c-accent); color: var(--c-on-accent); } }
.lightbox__btn:focus-visible, .lightbox__close:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
@media (max-width: 760px) {
  .lightbox__in { padding: 4.5rem 0.75rem 5.5rem; }
  .lightbox__img { max-height: calc(100dvh - 14rem); border-radius: var(--radius-m); }
  .lightbox__btn { top: auto; bottom: 1rem; margin-top: 0; }
  .lightbox__btn--prev { left: calc(50% - 64px); }
  .lightbox__btn--next { right: calc(50% - 64px); }
}

@media (prefers-reduced-motion: reduce) {
  .rise > * { animation: none; }
  .wall__item[data-reveal] { translate: none; transition-delay: 0s; }
  .wall__col { transform: none; }
  .wall__open .gable__media > img, .wall__zoom, .wall__filter { transition: none; }
  .lightbox__img.is-in { animation: none; }
}
