/* Archives (archive.php), mainly the project categories: the description as an intro, the
   project cards and links to the other categories. */

.ar-hero {
  padding-bottom: clamp(32px, 4vw, 56px);
}

/* The description: the first paragraph as a lead, the rest next to it on wide screens. */
.ar-intro {
  display: grid;
  gap: 24px clamp(40px, 6vw, 112px);
  margin: 0 0 clamp(56px, 7vw, 104px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line-accent);
}

.ar-intro p {
  margin: 0;
}

.ar-intro__lead p {
  color: #fff;
}

.ar-intro__text {
  display: grid;
  gap: 1em;
  color: var(--text-muted);
  font-family: var(--ff-display);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.6;
}

.ar-intro__text strong,
.ar-intro__text b {
  color: #fff;
  font-weight: inherit;
}

@media (min-width: 1000px) {
  .ar-intro {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .ar-intro__text {
    padding-top: 0.35em;
  }
}

.ar-cards {
  margin-bottom: clamp(64px, 8vw, 120px);
}

/* ---------- The other categories ---------- */

.ar-more {
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line);
}

/* Tiles share each row, so a tile left over (usually "Wszystkie projekty") fills its row
   instead of standing alone in a corner. */
.ar-more__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ar-more__list li {
  flex: 1 1 220px;
  margin: 0;
  list-style: none;
}

.ar-more__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  padding: 16px 20px;
  border: 1px solid var(--line-accent);
  color: #fff;
  font-family: var(--ff-display);
  font-size: 1.125rem;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), border-color 0.25s, color 0.25s;
}

.ar-more__list a::after {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.25s var(--ease), background-color 0.25s;
}

.ar-more__list a:hover,
.ar-more__list a:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--navy);
}

.ar-more__list a:hover::after {
  background-color: var(--navy);
  transform: translateX(4px);
}

.ar-more__all a {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--navy);
  font-family: var(--ff-text);
  font-size: var(--fs-small);
  font-weight: 500;
}

.ar-more__all a::after {
  background-color: var(--navy);
}

.ar-more__all a:hover,
.ar-more__all a:focus-visible {
  background: #fff;
  border-color: #fff;
}
