/* Case Studies, Guides, Blog listings and article pages only. */

.resource-page,
.resource-article {
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.resource-page .resource-hero,
.resource-article .resource-hero {
  padding-top: clamp(3.75rem, 8vw, 6.5rem);
  padding-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.resource-page .resource-hero h1,
.resource-article .resource-hero h1 {
  max-width: min(100%, 34rem);
  margin: 0;
  font: 400 clamp(2.15rem, 2.4vw + 1.1rem, 3.4rem) / .93 var(--sans);
  letter-spacing: -.065em;
}

.resource-page .resource-hero p {
  max-width: 62ch;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.6;
}

.resource-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.resource-index {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  align-items: center;
}

.resource-index button {
  min-height: 44px;
  padding: .45rem .85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 650 .88rem var(--sans);
  cursor: pointer;
}

.resource-index button.is-active {
  background: oklch(93% .035 280);
  color: oklch(42% .16 280);
}

.resource-search {
  display: grid;
  width: min(100%, 320px);
  color: transparent;
}

.resource-search input {
  grid-area: 1 / 1;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--paper);
  padding: .78rem 1rem .78rem 2.5rem;
  color: var(--ink);
  font: inherit;
}

.resource-search:before {
  content: "⌕";
  grid-area: 1 / 1;
  z-index: 1;
  align-self: center;
  margin-left: .85rem;
  color: var(--muted);
  font-size: 1.35rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3.5vw, 3rem);
}

.resource-card {
  min-width: 0;
}

.resource-card a {
  display: grid;
  height: 100%;
  color: inherit;
}

.resource-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%, 0 18%);
  background: oklch(92% .006 260);
}

.resource-card h2 {
  margin: 1.35rem 0 .7rem;
  font: 400 clamp(1.4rem, 2.1vw, 2rem) / 1.12 var(--sans);
  letter-spacing: -.04em;
}

.resource-card p {
  margin: 0;
  color: var(--ink);
  font-size: .95rem;
  line-height: 1.55;
}

.resource-card footer,
.resource-card .resource-tag {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
  font-size: .8rem;
  font-weight: 700;
}

.resource-card footer time:after {
  content: "·";
  margin-left: .5rem;
}

.resource-card footer span,
.resource-card .resource-tag {
  margin: 0;
  padding: .18rem .55rem;
  border: 1px solid var(--line);
  border-radius: .22rem;
  background: oklch(95% .004 90);
  font-size: .76rem;
}

.resource-card a:hover h2 {
  color: oklch(42% .12 280);
}

.resource-empty {
  margin-top: 1rem;
  color: var(--muted);
}

.resource-back {
  display: inline-flex;
  margin: clamp(2.25rem, 5vw, 3.5rem) 0 0;
}

.resource-article .resource-hero {
  padding-bottom: 1.5rem;
}

.resource-article .eyebrow {
  margin-bottom: 1rem;
  color: var(--muted);
}

.resource-article-meta {
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
}

.resource-article-visual {
  margin: clamp(1.75rem, 4vw, 3rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.resource-article-visual img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: oklch(94% .004 90);
  clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%, 0 10%);
}

.resource-article-body {
  max-width: 72ch;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.7;
}

.resource-article-body h2 {
  margin: 2.4rem 0 .9rem;
  font: 400 clamp(1.5rem, 2.4vw, 2rem) / 1.15 var(--display);
  letter-spacing: -.03em;
}

.resource-article-body p,
.resource-article-body ul {
  margin: 0 0 1.15rem;
  color: var(--ink);
}

.resource-article-body ul {
  padding-left: 1.2rem;
}

.resource-article-body li {
  margin-bottom: .45rem;
}

.resource-article-more {
  display: grid;
  gap: .85rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.resource-article-more p {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.resource-article-more a {
  font-weight: 700;
}

.resource-article-more a:hover {
  color: var(--muted);
}

@media (max-width: 850px) {
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .resource-page .resource-hero h1,
  .resource-article .resource-hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .resource-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-search {
    width: 100%;
  }

  .resource-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .resource-article-visual img {
    max-height: 280px;
  }
}
