.years-container {
  --min-width: 26rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--min-width), 1fr));
  gap: var(--op-space-x-large);
  padding: var(--op-space-large) 0;
}

.year {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--op-radius-2x-large);
  overflow: hidden;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: scale 0.3s ease-in-out, outline-color 150ms ease-in-out;
  &:hover {
    outline-color: var(--op-color-primary-base);
    .year-actions {
      opacity: 1;
    }
    .year-highlight-item img {
      filter: grayscale(0);
    }
  }
}

.year-label {
  font-size: 80px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: Archivo Black;
  position: absolute;
  z-index: 1;
  color: var(--op-color-neutral-plus-five);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.5);
}

.year-actions {
  opacity: 0;
  display: flex;
  align-items: center;
  transition: opacity 100ms ease-in-out;
  gap: var(--op-space-small);
}

.year-action {
  --size: 5rem;
  width: var(--size);
  height: var(--size);
  display: flex;
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--op-space-small);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--op-radius-2x-large);
}

.year-action--open {
  background-color: var(--op-color-primary-plus-four);
  color: var(--op-color-primary-minus-four);;
}

.year__current-day-button {
  position: fixed;
  bottom: var(--op-space-x-large);
  right: var(--op-space-x-large);

  box-shadow: var(--op-shadow-large);
  background-image: linear-gradient(to right bottom, #d20000, #cf0057, #a62f8d, #6651a2, #245e96);
  opacity: 0.8;
  border-radius: 24px;

  height: 5.4rem;
  width: 5.4rem;
  min-width: 5.4rem;

  @media (width < 768px) {
    left: calc(50% - 20px);
  }
}

.year-highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  height: 100%;
  width: 100%;
}

.year-highlight-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 300ms ease-in-out;
}

.year-highlight-placeholder {
  background-color: var(--op-color-neutral-plus-one);
  opacity: 0.3;
}

.story-search {
  margin: calc(-1 * var(--op-space-3x-large)) auto 0;
  max-width: 56rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.story-search__field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--home-paper-soft);
  border: 1px solid var(--home-border-faint);
  border-radius: var(--op-radius-pill);
  padding: var(--op-space-small) var(--op-space-large);
  box-shadow: var(--home-shadow-input);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.story-search__field:hover {
  border-color: var(--home-border-medium);
}

.story-search__field:focus-within {
  border-color: var(--home-accent-sage-deep);
  box-shadow: var(--home-shadow-input-focus);
  transform: translateY(-1px);
}

.story-search__icon {
  flex-shrink: 0;
  margin-right: var(--op-space-small);
  opacity: 0.75;
}

.story-search__input {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--op-font-family);
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
  color: var(--home-ink);
  letter-spacing: 0.01em;
  padding-block: var(--op-space-2x-small);
}

.story-search__input::placeholder {
  color: var(--home-ink-faint);
}
