/* The portfolio follows a five-panel editorial gallery. Each desktop panel
   expands in place. On a phone the five images form one scrollable stack. */
.ventures {
  --venture-paper: #f3f3f3;
  --venture-ink: #111;
  --venture-muted: #5d5d5d;
  --venture-gap: 8px;
  --venture-ease: cubic-bezier(0.42, 0, 0, 1);
  background: #fff;
  color: var(--venture-ink);
  padding: clamp(64px, 6vw, 108px) 0 clamp(52px, 5vw, 88px);
  overflow-wrap: break-word;
}
.ventures *,
.ventures *::before,
.ventures *::after {
  box-sizing: border-box;
}
.venture-content {
  width: min(calc(100% - 48px), 1502px);
  margin: 0 auto;
}
.venture-intro {
  margin: 0 auto 34px;
  text-align: center;
}
.venture-intro h2 {
  margin: 0;
  color: #050505;
  font-family: inherit;
  font-size: clamp(38px, 3.35vw, 56px);
  font-weight: 780;
  line-height: 1.06;
  letter-spacing: -0.055em;
}
.venture-intro p {
  max-width: 690px;
  margin: 12px auto 0;
  color: #151515;
  font-size: clamp(17px, 1.2vw, 20px);
  line-height: 1.35;
  letter-spacing: -0.018em;
  text-wrap: pretty;
}
.venture-group,
.venture-tile {
  list-style: none;
  margin: 0;
  padding: 0;
}
.venture-pages {
  --expanded-width: min(35vw, 496px);
  --venture-header-height: 72px;
  --venture-art-height: 394px;
}
.venture-caption-ruler {
  display: none;
}
.venture-group {
  --sibling-width: calc(
    (100% - (4 * var(--venture-gap)) - var(--expanded-width)) / 4
  );
  display: flex;
  align-items: stretch;
  gap: var(--venture-gap);
}
.venture-group + .venture-group {
  margin-top: 28px;
}
/* Keep offscreen pages out of the lazy-image fetch window during enhancement. */
@media (scripting: enabled) {
  .ventures:not(.venture-enhanced) .venture-group + .venture-group {
    display: none;
  }
}
.venture-enhanced .venture-group + .venture-group {
  margin-top: 0;
}
.venture-group[hidden],
.venture-pager[hidden] {
  display: none !important;
}
.venture-tile {
  flex: 0 0 calc((100% - (4 * var(--venture-gap))) / 5);
  min-width: 0;
  scroll-margin-top: 12px;
  transition: flex-basis 0.3s var(--venture-ease);
}
.venture-card {
  --card-face: var(--venture-paper);
  --card-text: var(--venture-ink);
  --card-description: var(--venture-muted);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--card-text);
  background: var(--card-face);
  border-radius: 16px;
  text-decoration: none;
  overflow: hidden;
  transition:
    color 0.12s ease,
    background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.venture-card:focus-visible {
  outline: 3px solid var(--brand, #e50000);
  outline-offset: 2px;
}
.venture-before {
  min-height: var(--venture-header-height);
  padding: 16px clamp(14px, 1.45vw, 24px);
  display: flex;
  align-items: center;
  gap: clamp(9px, 1vw, 16px);
}
.venture-mark {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
  display: block;
}
.venture-monogram {
  display: grid;
  place-items: center;
  color: white;
  background: var(--mark-color);
  font:
    720 15px/1 system-ui,
    sans-serif;
}
.venture-identity {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.venture-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.venture-status {
  font-size: 12px;
  line-height: 1;
  color: var(--card-description);
}
.venture-art {
  position: relative;
  display: block;
  height: var(--venture-art-height);
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #dededc;
}
.venture-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.venture-film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 140ms linear;
  pointer-events: none;
}
.venture-film[data-ready] {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .venture-film {
    display: none;
  }
}
.venture-after {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 116px;
  padding: 26px clamp(14px, 1.45vw, 24px) 24px;
}
.venture-headline,
.venture-copy {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.venture-headline {
  -webkit-line-clamp: 1;
  font-weight: 675;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.venture-copy {
  color: var(--card-description);
  -webkit-line-clamp: 2;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.018em;
}
.venture-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  color: #424242;
  min-height: 44px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.venture-pager-top {
  display: none;
}
.venture-pager-bottom {
  margin-top: 22px;
}
.venture-pager button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  background: #fff;
  color: #202020;
  border: 1px solid #b3b3b3;
  border-radius: 50%;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.venture-pager button:hover,
.venture-pager button:focus-visible {
  background: #e9e9e9;
  border-color: #1a1a1a;
}
.venture-pager button:focus-visible {
  outline: 2px solid var(--brand, #e50000);
  outline-offset: 2px;
}
.venture-pager button[aria-disabled="true"] {
  background: #fff;
  border-color: #d8d8d8;
  color: #aaa;
  cursor: default;
}
.venture-record {
  margin-top: clamp(2rem, 4vw, 4rem);
  padding: 1.25rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  column-gap: 2rem;
}
.venture-record p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .85rem;
}
.venture-record strong {
  font-size: clamp(1.75rem, 2.7vw, 2.75rem);
  font-weight: 640;
  line-height: 1;
  letter-spacing: -.06em;
}
.venture-record span, .venture-record a {
  font-size: .9375rem;
  line-height: 1.4;
}
.venture-record span { color: #56534e; }
.venture-record a {
  justify-self: end;
  color: var(--venture-ink);
  padding-block: .45rem;
  font-weight: 640;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}
.venture-record a:hover { text-decoration-color: var(--brand, #e50000); }
@media (max-width: 620px) {
  .venture-record {
    margin-inline: 10px;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem .9rem;
  }
  .venture-record p { align-self: start; flex-direction: column; }
  .venture-record a { grid-column: 1 / -1; justify-self: start; }
}
.venture-sr {
  width: 1px;
  height: 1px;
  position: absolute;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* The expanded panel remains selected while the pointer crosses the gutters. */
@media screen and (min-width: 768px) {
  .venture-enhanced .venture-pages,
  .venture-caption-ruler {
    display: grid;
  }
  .venture-enhanced .venture-group,
  .venture-caption-ruler,
  .venture-caption-ruler .venture-after {
    grid-area: 1 / 1;
  }
  /* Reserve the tallest actual caption at its reading width, across all pages. */
  .venture-caption-ruler {
    width: var(--expanded-width);
    padding-top: calc(var(--venture-header-height) + var(--venture-art-height));
    align-self: start;
    visibility: hidden;
    pointer-events: none;
  }
}
@media (min-width: 768px) {
  .venture-pages {
    position: relative;
  }
  .ventures {
    overflow-x: clip;
  }
  .venture-tile {
    min-height: 590px;
  }
  .venture-group[data-expanded] .venture-tile,
  .ventures:not(.venture-enhanced)
    .venture-group:has(.venture-card:focus-visible)
    .venture-tile {
    flex-basis: var(--sibling-width);
  }
  .venture-group[data-expanded] .venture-tile[data-expanded],
  .ventures:not(.venture-enhanced)
    .venture-group
    .venture-tile:has(.venture-card:focus-visible) {
    flex-basis: var(--expanded-width);
  }
  .venture-tile[data-expanded] .venture-card,
  .venture-card:focus-visible {
    --card-face: #111;
    --card-text: white;
    --card-description: #d2d2d2;
  }
  .venture-tile[data-expanded] .venture-after,
  .venture-card:focus-visible .venture-after {
    width: var(--expanded-width);
  }
  .venture-caption-ruler :is(.venture-headline, .venture-copy),
  .venture-tile[data-expanded] :is(.venture-headline, .venture-copy),
  .venture-card:focus-visible :is(.venture-headline, .venture-copy) {
    -webkit-line-clamp: unset;
  }
  .venture-group[hidden][data-leaving] {
    display: flex !important;
    position: absolute;
    inset: 0;
    align-items: stretch;
    pointer-events: none;
    z-index: 1;
  }
}
@media (min-width: 768px) and (hover: hover) {
  .ventures:not(.venture-enhanced)
    .venture-group:has(.venture-card:hover)
    .venture-tile {
    flex-basis: var(--sibling-width);
  }
  .ventures:not(.venture-enhanced) .venture-group .venture-tile:hover {
    flex-basis: var(--expanded-width);
  }
  .ventures:not(.venture-enhanced) .venture-card:hover {
    --card-face: #111;
    --card-text: white;
    --card-description: #d2d2d2;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .venture-pages {
    --venture-header-height: 64px;
    --venture-art-height: clamp(300px, 36vw, 394px);
  }
  .venture-content {
    width: calc(100% - 24px);
  }
  .venture-tile {
    min-height: calc(var(--venture-art-height) + 190px);
  }
  .venture-before {
    padding-inline: 12px;
    gap: 8px;
  }
  .venture-identity strong {
    font-size: 14px;
  }
  .venture-after {
    padding-inline: 12px;
  }
}
@media (max-width: 767px) {
  .ventures {
    padding-block: 60px 44px;
  }
  .venture-content {
    width: calc(100% - 24px);
  }
  .venture-intro {
    margin: 0 8px 18px;
  }
  .venture-intro h2 {
    font-size: clamp(36px, 8.2vw, 50px);
  }
  .venture-intro p {
    font-size: 17px;
    max-width: 520px;
    margin-top: 10px;
  }
  .venture-pager-top {
    display: flex;
    margin: 0 0 16px;
  }
  .venture-pager-bottom {
    margin-top: 20px;
  }
  .venture-pager button {
    width: 42px;
    height: 42px;
  }
  .venture-group {
    display: grid;
    gap: clamp(24px, 6.5svh, 64px);
    padding: 4px 0 36px;
  }
  .venture-tile {
    --stack-index: 0;
    --stack-depth: 4;
    position: sticky;
    top: calc(clamp(76px, 18svh, 160px) + var(--stack-index) * 5px);
    z-index: calc(1 + var(--stack-index));
    align-self: start;
  }
  .venture-tile:nth-child(2) {
    --stack-index: 1;
    --stack-depth: 3;
  }
  .venture-tile:nth-child(3) {
    --stack-index: 2;
    --stack-depth: 2;
  }
  .venture-tile:nth-child(4) {
    --stack-index: 3;
    --stack-depth: 1;
  }
  .venture-tile:nth-child(5) {
    --stack-index: 4;
    --stack-depth: 0;
  }
  .venture-card {
    --card-face: #111;
    --card-text: white;
    --card-description: #d2d2d2;
    transform-origin: 50% 0;
  }
  .venture-before {
    min-height: 60px;
    padding: 14px 20px;
    gap: 12px;
  }
  .venture-identity {
    display: flex;
    align-items: baseline;
    gap: 9px;
  }
  .venture-identity strong {
    max-width: 100%;
    font-size: 15px;
  }
  .venture-art {
    height: clamp(165px, min(62vw, 37svh), 320px);
    border-radius: 0;
  }
  .venture-after {
    min-height: 98px;
    padding: 16px 20px 20px;
  }
  .venture-headline,
  .venture-copy {
    -webkit-line-clamp: unset;
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 767px) {
  /* Each incoming card physically covers, darkens and recedes the preceding layer. */
  .venture-enhanced .venture-card {
    transform: translateY(calc(-50px * var(--covered, 0)))
      scale(var(--stack-zoom, 1));
    filter: contrast(calc(1 - 0.25 * var(--stack-depth) * var(--covered, 0)));
  }
  .venture-enhanced .venture-tile:first-child .venture-card {
    opacity: calc(1 - 0.8 * var(--covered, 0));
  }
}
@media (prefers-reduced-motion: reduce) {
  .venture-tile,
  .venture-card,
  .venture-art img {
    animation: none !important;
    transition: none !important;
  }
}
@media (prefers-reduced-motion: reduce) and (max-width: 767px) {
  .venture-group {
    gap: 16px;
    padding-bottom: 0;
  }
  .venture-tile {
    position: relative;
    top: auto;
    z-index: auto;
  }
  .venture-card {
    display: grid;
    grid-template-columns: clamp(72px, 23vw, 126px) 1fr;
    grid-template-rows: auto 1fr;
    --card-face: #f4f3f1;
    --card-text: #151515;
    --card-description: #565450;
  }
  .venture-art {
    grid-column: 1;
    grid-row: 1 / 3;
    height: 100%;
  }
  .venture-art img { position: absolute; inset: 0; }
  .venture-before { grid-column: 2; min-height: 0; padding: 16px 14px 0; gap: 8px; }
  .venture-after { grid-column: 2; min-height: 0; padding: 10px 14px 16px; }
}
@media print {
  .ventures .venture-group[hidden] {
    display: flex !important;
  }
  .venture-pager {
    display: none !important;
  }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 768px) {
  .venture-enhanced .venture-group:not([data-leaving]) {
    translate: calc(200px * var(--arrival-shift, 0)) 0;
    opacity: var(--arrival-opacity, 1);
  }
  .venture-tile {
    --entrance-gap: 0px;
  }
  .venture-tile:nth-child(2) {
    --entrance-gap: 72px;
  }
  .venture-tile:nth-child(3) {
    --entrance-gap: 128px;
  }
  .venture-tile:nth-child(4) {
    --entrance-gap: 164px;
  }
  .venture-tile:nth-child(5) {
    --entrance-gap: 180px;
  }
  .venture-enhanced .venture-group:not([data-leaving]) .venture-tile {
    translate: calc(var(--entrance-gap) * var(--arrival-spread, 0)) 0;
  }
}

#venture-mrchief-ai .venture-art img { object-position: 71% center; }
#venture-bem-builders .venture-art img { object-position: right center; }
.venture-art.venture-initial-art {
  display: grid;
  place-items: center;
  background: #ece8e0;
  color: #382f28;
  font: italic 400 clamp(6rem,12vw,13rem)/1 Georgia, serif;
}
