/* ==========================================================================
   Bento grid — the home feature cards with the liquid-glass edge and a
   screenshot/video peeking off the bottom-right (which becomes a cropped
   top-banner once the cards narrow).
   ========================================================================== */
.bento {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
}

.bento-card--pour {
  grid-column: span 3;
}

.bento-card--espresso {
  grid-column: span 2;
}

.bento-card--journal {
  grid-column: span 2;
}

.bento-card--scan {
  grid-column: span 3;
}

.bento-card {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  padding: clamp(26px, 2.6vw, 40px);
  border: 1px solid transparent;
  border-radius: 28px;
  /* Card fill (padding-box) + a subtle liquid-glass edge highlight (border-box). */
  background:
    linear-gradient(180deg, #1a1a1a, #131313) padding-box,
    linear-gradient(150deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 32%, rgba(255, 255, 255, 0.02) 62%, rgba(255, 255, 255, 0.14)) border-box;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Faint top sheen — the "liquid glass" catch of light. */
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 24%);
  pointer-events: none;
}

.bento-card__body {
  position: relative;
  z-index: 2;
  max-width: 58%;
}

.bento-card__body h2 {
  font-size: clamp(1.5rem, 1.9vw, 2rem);
  line-height: 1.06;
  margin-bottom: 12px;
}

.bento-card__body p {
  color: var(--color-body);
  font-size: 1.02rem;
  line-height: 1.5;
  margin: 0;
  max-width: 26ch;
}

.bento-card__media {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.bento-card__media img,
.bento-card__media video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.55));
}

/* Screenshots/video peek from the right — portrait phones show their top
   (the app UI) and bleed off the bottom; the squarer journal graph peeks up. */
.bento-card--pour .bento-card__media {
  width: 42%;
  right: -3%;
  top: 34px;
}

.bento-card--espresso .bento-card__media {
  width: 54%;
  right: -7%;
  top: 26px;
}

.bento-card--journal .bento-card__media {
  width: 56%;
  right: -7%;
  bottom: -14%;
}

.bento-card--scan .bento-card__media {
  width: 37%;
  right: 1%;
  top: 36px;
}

@media (max-width: 960px) {

  /* Narrower cards: two columns, and the side-peek gives way to text-on-top
     with a cropped app-UI banner below (the peek needs a wide card). */
  .bento {
    grid-template-columns: 1fr 1fr;
  }

  .bento-card--pour,
  .bento-card--espresso,
  .bento-card--journal,
  .bento-card--scan {
    grid-column: span 1;
  }

  .bento-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .bento-card__body {
    max-width: 100%;
  }

  .bento-card__body p {
    max-width: 40ch;
  }

  .bento-card__media {
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 78%;
    height: 210px;
    margin: 26px auto 0;
    overflow: hidden;
    border-radius: 20px;
  }

  .bento-card__media img,
  .bento-card__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }
}

@media (max-width: 560px) {

  /* Single-column stack on phones. */
  .bento {
    grid-template-columns: 1fr;
  }
}