/* Frame the Q60 against its original backdrop. The landscape and portrait photos
   put the car at different heights, so each has its own crop. */
.bento-index.home-page .porsche-hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-height: clamp(330px, 34vw, 444px) !important;
  padding: 0;
  background: #101820;
}

.bento-index .porsche-hero .hero-picture {
  position: absolute;
  display: block;
  inset: 0 0 0 12%;
}

.bento-index.home-page .porsche-hero .clarity-car {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center 85%;
  mask-image: linear-gradient(to right, transparent, #000 24%);
}

.bento-index.home-page .porsche-hero::after {
  display: block;
  background: linear-gradient(90deg, #101820 0%, #101820ed 20%, #10182030 49%, transparent 65%);
}

.bento-index .porsche-hero .clarity-copy {
  width: 41%;
  padding: clamp(22px, 2.8vw, 40px);
}

.bento-index .porsche-hero .clarity-copy h1 {
  font-size: clamp(32px, 3.65vw, 53px);
}

.bento-index .porsche-hero .hero-subtitle {
  max-width: 32ch;
  margin: 14px 0 19px;
  font-size: clamp(14px, 1.25vw, 16px);
  line-height: 1.5;
}

.bento-index .porsche-hero .hero-image-note {
  inset: auto 14px 10px auto;
  padding: 2px 6px;
  color: #fff;
  background: #101820b5;
  border-radius: 4px;
  font-size: 10px;
}

/* Give each completed project a photo and a compact caption. */
.bento-work .page-hero.work-hero {
  grid-column: 1 / -1;
  min-height: 0 !important;
  padding: clamp(18px, 2vw, 28px) !important;
  justify-content: flex-start;
  gap: 10px;
}

.bento-work .work-hero .section-kicker,
.bento-work .work-hero .page-title,
.bento-work .work-hero .page-intro {
  margin: 0 !important;
}

.bento-work .work-hero .page-title {
  font-size: clamp(32px, 4vw, 56px);
}

.bento-work .work-hero .page-intro p {
  font-size: 16px;
  line-height: 1.5;
}

.bento-work .portfolio-filters {
  grid-column: 1 / -1;
  align-content: center;
  padding: 6px 10px !important;
}

.bento-work .portfolio-filters button {
  min-height: 44px;
}

@media (max-width: 820px) {
  .bento-work .portfolio-filters { padding: 0 0 3px !important; }
}

.bento-index .home-selected {
  padding: 16px 0 0 !important;
}

.bento-index .home-section-heading {
  margin-bottom: 12px;
}

.bento-index .selected-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: auto;
  gap: clamp(8px, 1vw, 14px) !important;
}

.bento-index .selected-grid a:nth-child(n) {
  display: flex;
  grid-column: auto;
  grid-row: auto;
  justify-content: flex-start;
  padding: 0 !important;
  min-height: 0 !important;
  background: #0c1522;
  border-radius: 15px !important;
}

.bento-index .selected-grid a::after {
  display: none;
}

.bento-index .selected-grid a img {
  position: static;
  z-index: auto;
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: 1.7;
  object-position: center 72%;
}

.bento-index .selected-grid a h3 {
  margin: 12px 13px 4px !important;
  font-size: clamp(15px, 1.3vw, 18px) !important;
  line-height: 1.2;
}

.bento-index .selected-grid a:nth-child(n) p {
  margin: 0 13px 12px !important;
  font-size: 11px !important;
  line-height: 1.45;
  letter-spacing: .035em;
}

.bento-index .expertise-card {
  min-height: clamp(180px, 17vw, 225px) !important;
}

.bento-work .portfolio-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: start !important;
  grid-auto-flow: row;
  gap: clamp(10px, 1.1vw, 16px) !important;
}

.bento-work .portfolio-card-grid .portfolio-project {
  grid-column: auto;
  grid-row: auto;
  border-radius: 15px !important;
}

.bento-work .portfolio-project .project-cover {
  flex: none;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: 1.66 !important;
}

.bento-work .portfolio-heading {
  padding: 12px 14px 0;
}

.bento-work .portfolio-heading h2 {
  font-size: clamp(16px, 1.45vw, 21px);
  line-height: 1.18;
}

.bento-work .portfolio-heading p {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: .035em;
}

.bento-work .project-details {
  padding: 0 14px 3px;
}

.bento-work .project-details summary {
  padding: 12px 0 8px;
  min-height: 44px;
  font-size: 12px;
}

.bento-work .portfolio-project.b-open {
  display: grid;
  grid-template-columns: minmax(170px, 30%) minmax(0, 1fr);
  align-items: center;
}

.bento-work .portfolio-project.b-open .project-cover {
  aspect-ratio: 1.8 !important;
}

.bento-work .portfolio-project.b-open .portfolio-heading {
  padding: 16px clamp(16px, 3vw, 38px);
}

.bento-work .portfolio-project.b-open .project-details {
  grid-column: 1 / -1;
  padding: 2px clamp(14px, 2vw, 24px) 18px;
}

.bento-work .project-details .portfolio-images {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  align-items: start;
}

.bento-work .project-details .portfolio-images .gallery-image {
  grid-column: auto;
  grid-row: auto;
}

@media (max-width: 1110px) {
  .bento-work .portfolio-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .bento-index .selected-grid,
  .bento-work .portfolio-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .bento-index .expertise-grid .expertise-card {
    min-height: 156px !important;
  }

  .bento-index .expertise-grid .expertise-card > div {
    inset: auto 0 0 !important;
    padding: 13px !important;
  }
}

@media (max-width: 620px) {
  .bento-index.home-page .porsche-hero {
    display: grid;
    min-height: 0 !important;
  }

  .bento-index .porsche-hero .hero-picture {
    position: relative;
    inset: auto;
    grid-row: 2;
    aspect-ratio: 1.9;
    width: 100%;
  }

  .bento-index.home-page .porsche-hero .clarity-car {
    object-position: center 95%;
    mask-image: linear-gradient(to bottom, transparent, #000 15%);
  }

  .bento-index.home-page .porsche-hero::after {
    display: none;
  }

  .bento-index .porsche-hero .clarity-copy {
    grid-row: 1;
    width: 100%;
    padding: 20px 18px 3px;
  }

  .bento-index .porsche-hero .hero-subtitle {
    max-width: 40ch;
    font-size: 15px;
    margin: 10px 0 13px;
  }

  .bento-index.home-page .porsche-hero .hero-image-note {
    inset: auto 10px 6px auto;
    padding: 1px 5px;
  }

  .bento-index .selected-grid a h3 {
    margin: 9px 10px 3px !important;
  }

  .bento-index .selected-grid a:nth-child(n) p {
    margin: 0 10px 10px !important;
  }

  .bento-work .portfolio-heading {
    padding: 9px 10px 0;
  }

  .bento-work .project-details {
    padding: 0 10px 2px;
  }

  .bento-work .portfolio-project.b-open {
    display: flex;
    align-items: stretch;
  }

  .bento-work .portfolio-project.b-open .portfolio-heading {
    padding: 12px 14px 0;
  }

  .bento-work .project-details .portfolio-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
