/*
 * Haus of Contour — the journal index and its articles.
 *
 * The design routes between an index and a post on the client. Here each post
 * is its own URL under /journal/, so the writing is reachable, linkable and
 * indexable; the tag filter is the only thing that stayed behavioural.
 */

/* ------------------------------------------------------------ tag filter */

.tags { margin-top: 56px; }

/* One hairline between buttons, and one around the set. */
.tags__set {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  width: fit-content;
}

.tag {
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--shell);
  border: none;
  cursor: pointer;
  padding: 13px 20px;
  transition: background var(--shift), color var(--shift);
}
.tag:hover { background: var(--ink); color: var(--raised); }

.tag[aria-pressed="true"] { background: var(--ink); color: var(--raised); }

/* ------------------------------------------------------------ post index */

.notes { margin-top: 64px; }

.note {
  display: grid;
  grid-template-columns: minmax(min(220px, 100%), 0.42fr) minmax(min(280px, 100%), 1fr);
  gap: 44px;
  align-items: start;
  color: inherit;
  border-top: 1px solid var(--rule);
  padding: 38px 0;
  transition: background 500ms var(--ease);
}
.note:hover { background: var(--raised); color: inherit; }

.note__frame { aspect-ratio: 4 / 3; }

.note__meta {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

/* The tag is the one coloured item in the row. */
.note__tag { color: var(--accent); }

.note__title {
  margin: 18px 0 0;
  max-width: 30ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(23px, 2.4vw, 32px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.note__excerpt {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 64ch;
}

.notes__foot {
  border-top: 1px solid var(--rule);
  padding-top: 30px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 96px;
}

/* Shown by journal.js only when a filter has emptied the list. */
.notes__empty {
  border-top: 1px solid var(--rule);
  padding: 38px 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  .note { grid-template-columns: 1fr; gap: 20px; }
  .tags { margin-top: 40px; }
  .notes { margin-top: 40px; }
  .notes__foot { padding-bottom: 64px; }
}

/* --------------------------------------------------------------- article */

.article__head { padding-top: 80px; }

.back { color: var(--muted); }
.back:hover { color: var(--accent); }

.article__meta {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.article__tag { color: var(--accent); }

.article__title {
  margin: 22px 0 0;
  max-width: 24ch;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.99;
}

.article__standfirst { margin-top: 28px; }

/* The hero band reuses .band's mechanics with the article's own proportions. */
.article__band { margin-top: 64px; height: 62vh; min-height: 420px; }

.article__body { padding-top: 76px; }

.article__section { margin-bottom: 52px; }

.article__section h2 {
  margin: 0 0 20px;
  max-width: 26ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.article__section p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 64ch;
  text-wrap: pretty;
}

/* Byline and the treatment the piece points at. */
.colophon {
  border-top: 1px solid var(--rule);
  padding-top: 30px;
  padding-bottom: 88px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 44px;
}

.colophon .prose { margin-top: 14px; max-width: 38ch; }

.colophon__cta { margin-top: 20px; }

.more {
  border-top: 1px solid var(--rule);
  padding-top: 80px;
  padding-bottom: 96px;
}

.more__label { padding-bottom: 26px; }

.more__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 44px;
}

.more__item {
  display: block;
  color: inherit;
  border-top: 1px solid var(--rule);
  padding-top: 22px;
}

.more__title {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--ink);
  transition: color var(--shift);
}
.more__item:hover .more__title { color: var(--accent); }

@media (max-width: 767px) {
  .article__band { height: 46vh; min-height: 280px; }
}

@media (max-width: 719px) {
  .article__head { padding-top: 56px; }
  .article__body { padding-top: 56px; }
  .article__band { margin-top: 48px; }
  .more { padding-top: 56px; padding-bottom: 64px; }
  .colophon { padding-bottom: 64px; }
}
