/* Featured-application card for the projects index. Rendered by
   _partials/app-card.html from a project page's front matter, and loaded only on
   the projects index via that page's `stylesheets` front matter. Reuses the
   global .phone and .wordmark components (styles.css).

   Edge language matches the research cards: straight left edge, right corners
   rounded, no box border, faint brand tint. Here the dark visual panel is
   itself the straight left edge, so only the right corners are rounded. */

.app-card {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  align-items: stretch;
  border-radius: 0 0.5rem 0.5rem 0;
  overflow: hidden;
  margin: 1.5rem 0;
}

.app-card__visual {
  background-image: var(--gradient-dark);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 2rem 1.5rem 0;
  overflow: hidden;
}

/* The phone peeks up from the bottom of the dark panel. The white low-alpha
   drop-shadow lifts it off the gradient without needing a box. */
.app-card__visual .phone {
  --phone-w: 15rem;
  filter: drop-shadow(0 0 2.2rem rgba(255, 255, 255, 0.16));
  margin-bottom: -3.2rem;
  clip-path: none;   /* base .phone sets clip-path: inset(0), which runs after
                        filter and would trim the drop-shadow glow; this phone
                        peeks via margin + panel overflow, not clip-path */  
}

.app-card__body {
  background-color: rgba(38, 53, 170, 0.03);
  padding: 1.9rem 2rem;
}

.app-card__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.app-card__logo {
  width: 2.2rem;
  height: 2.2rem;
}

.app-card__name {
  color: var(--primary-color);
  line-height: 1;
  font-size: 2rem;
}

.app-card__tag {
  color: rgba(38, 53, 170, 0.75);
  font-weight: 500;
  font-size: 1.02rem;
  margin: 0.45rem 0 0.85rem;
}

.app-card__desc {
  font-weight: 325;
  margin: 0 0 1.1rem;
}

.app-card__meta {
  color: rgba(55, 60, 80, 0.55);
  font-size: 0.9rem;
  margin: 0 0 1.3rem;
}

/* Rounded to match the site's a.button (0.5rem); on-light primary colours. */
.app-card__btn {
  display: inline-flex;
  align-items: center;
  background: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 0 2rem rgba(38, 53, 170, 0.2);
}

/* Keep the label white through every link state: the global a:visited rule is
   more specific than a single class and would otherwise tint it. */
.app-card__btn,
.app-card__btn:visited,
.app-card__btn:hover {
  color: #fff;
}

.app-card__btn:hover {
  box-shadow: 0 0 2rem rgba(38, 53, 170, 0.4);
  text-decoration: none;
}

/* Stacked on mobile: keep the rounding on the outer (bottom) corner only. */
@media (max-width: 760px) {
  .app-card {
    grid-template-columns: 1fr;
    border-radius: 0 0 0.5rem 0;
  }

  .app-card__visual .phone {
    --phone-w: 12.5rem;
    margin-bottom: -5.5rem;
  }
}
