/* Homepage: the Themisto hero and the projects bento. The hero card itself, the blooms and the product
   visuals are in site.css, since the project pages use them too. */

/* ---- Hero: the moon ---- */

.moon { max-width: 100%; will-change: transform; }
/* The old site's glow pulse, scaled up with the logo */
.intro-logo { width: clamp(180px, 24vw, 300px); max-width: 100%; height: auto; animation: glow-pulse 5s ease-in-out infinite; }
@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 clamp(34px, 4.9vw, 60px) var(--logo-glow)); }
  50%      { filter: drop-shadow(0 0 clamp(70px, 10vw, 124px) var(--logo-glow)); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-logo { animation: none; filter: drop-shadow(0 0 clamp(34px, 4.9vw, 60px) var(--logo-glow)); }
}

/* ---- Projects: Magic UI bento grid ---- */

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 260px; gap: 16px; }
.bento-card {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  padding: var(--card-spacing); overflow: hidden; color: inherit; text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.bento-card:hover { transform: translateY(-2px); box-shadow: var(--card-ring), var(--shadow-lg); }
.bento-card:focus-visible { outline: none; box-shadow: var(--card-ring), 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent); }
.bento-card .bloom { opacity: calc(var(--bloom-strength) * .7); }
/* The picture sits in the space above the name, fading out towards it */
.bento-art {
  position: absolute; z-index: 1; inset: 0 0 88px 0;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  transition: transform .4s ease;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.bento-card:hover .bento-art { transform: scale(1.03); }
.bento-name { position: relative; z-index: 2; margin: 0; font-size: 16px; font-weight: 500; line-height: 1.375; }
.bento-desc { position: relative; z-index: 2; margin: 0; max-width: 40ch; font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }
.span-2 { grid-column: span 2; }
.row-2 { grid-row: span 2; }

/* Each card's picture, sized to its box */
.bento-art .board { height: 132px; }
.bento-art .phone { height: var(--phone-h, 270px); }
.bento-art .bento-shot { max-height: 104px; max-width: 70%; width: auto; }
.bento-art .watts-icon { width: 88px; border-radius: 20px; }
.bento-card--tp .bento-art { bottom: 100px; }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-2 { grid-row: auto; }
  .bento-card--tp { --phone-h: 140px; }
  .bento-card--tp .bento-art { bottom: 88px; }
}
@media (max-width: 700px) {
  .bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 240px; }
  .span-2 { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .bento-card:hover, .bento-card:hover .bento-art { transform: none; }
}
