/* aaroncphelps.com — the Notes index's cards (v1). Ported from
   design/notes-v1; the page's skeleton is collection.css. One full-width
   card per note in its category colour (the note template's mapping:
   psychology lavender, ux light orange, product sky, systems sage). On hover a 10px pixel
   sweep of prismatic light crosses the card once (collection.js), the eye
   blinks, the card lifts. */

/* the eye: three pixel frames as masks, so it takes the link colour; it
   blinks once when its card is hovered */
.eye {
  width: 1.5em;
  height: 1em;
  flex: none;
  background: currentColor;
  -webkit-mask: url("/assets/home/eye-open-mask.png") center / contain no-repeat;
  mask: url("/assets/home/eye-open-mask.png") center / contain no-repeat;
}
.card:hover .eye, .eye.blink { animation: blink .7s steps(1, end) 1; }
@keyframes blink {
  0%, 100% { -webkit-mask-image: url("/assets/home/eye-open-mask.png"); mask-image: url("/assets/home/eye-open-mask.png"); }
  30% { -webkit-mask-image: url("/assets/home/eye-mid-mask.png"); mask-image: url("/assets/home/eye-mid-mask.png"); }
  45% { -webkit-mask-image: url("/assets/home/eye-closed-mask.png"); mask-image: url("/assets/home/eye-closed-mask.png"); }
  60% { -webkit-mask-image: url("/assets/home/eye-mid-mask.png"); mask-image: url("/assets/home/eye-mid-mask.png"); }
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  min-height: clamp(340px, 46vh, 520px);
  padding: 40px 44px 44px;
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.card:hover { transform: translateY(-4px); }
/* the category sets the colour, the same mapping as the note template */
.card[data-category="psychology"] { background: var(--lav); }
.card[data-category="product"] { background: var(--sky); }
.card[data-category="ux"] { background: var(--light-orange); }
.card[data-category="systems"] { background: var(--sage); }
.card > * { position: relative; z-index: 1; }
.card .head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.card .side { grid-column: 2; align-self: start; justify-self: end; text-align: right; }
.card .side .caption { color: var(--body); }
.card .body { grid-column: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.card h2 {
  font-family: var(--statement);
  font-weight: 700;
  font-size: clamp(34px, 4.2vw, 72px);
  line-height: .96;
  letter-spacing: -.02em;
  text-wrap: balance;
  max-width: 16ch;
}
.card .dek { font-size: clamp(17px, 1.35vw, 21px); line-height: 1.4; color: var(--body); max-width: 32ch; margin-top: 22px; }
.card .foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-top: 36px; }
.card .read {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 220px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 10px;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .card { grid-template-columns: 1fr; min-height: 0; padding: 28px 24px 32px; }
  .card .side { grid-column: 1; justify-self: start; text-align: left; order: -1; }
  .card h2 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card:hover { transform: none; }
}
