/* ==========================================================================
   Eon Echelon: the homepage.

   One grid. Its first cell introduces the range and holds the family pills;
   every cell after it is a tea card (styled in site.css). Two cells to a row
   on phones, three from 960px.
   ========================================================================== */

.ee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ee-gap);
  padding-block: var(--ee-gap) var(--ee-section-space);
}

/* The filter hides cards with the "hidden" attribute. */
.ee-grid > [hidden] {
  display: none;
}

.ee-intro {
  grid-column: 1 / -1;
  padding: var(--ee-pad);
  border: 1px solid var(--ee-line);
}

.ee-intro__title {
  margin: 0;
  font-family: var(--ee-serif);
  font-size: var(--ee-text-title);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.ee-intro__text {
  max-width: 26rem;
  margin: 0.75rem 0 0;
  color: var(--ee-soft);
}

.ee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.ee-chip {
  min-height: 2.25rem;
  padding: 0 0.875rem;
  font-size: var(--ee-text-label);
  font-weight: 500;
  letter-spacing: var(--ee-label-tracking);
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--ee-ink);
  border-radius: 999px;
  transition: color var(--ee-duration-quick) ease-out, background-color var(--ee-duration-quick) ease-out;
}

.ee-chip:hover,
.ee-chip[aria-pressed="true"] {
  color: var(--ee-paper);
  background: var(--ee-ink);
}

.ee-intro__count {
  margin: 1.25rem 0 0;
  font-size: var(--ee-text-small);
  color: var(--ee-soft);
}

/* Cards the filter has just brought back fade in, so the change is visible. */
.ee-card.is-arriving {
  animation: ee-card-arrive 220ms ease-out;
}

@keyframes ee-card-arrive {
  from {
    opacity: 0;
  }
}

@media (min-width: 60em) {
  .ee-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ee-intro {
    grid-column: auto;
    padding: clamp(1.25rem, 2vw, 1.75rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ee-chip {
    transition: none;
  }

  .ee-card.is-arriving {
    animation: none;
  }
}
