/* stylelint-disable no-descending-specificity -- selectors are grouped by
   component; the source order is intentional and overrides resolve correctly. */

/* ─────────────────────────────────────────────────────────────
   Joanna Summers — Blog (Articles & Resources)
   Self-contained page stylesheet for the public blog index and the
   single-article view. Defines the JS palette tokens locally (the
   base style.css uses a different token set), the shared hero /
   section / statement-block chrome these pages reuse, and the
   blog-specific card, filter, pagination, and prose styles.
   ───────────────────────────────────────────────────────────── */

/* ─── Design tokens ───────────────────────────────────────────────
   The blog uses the shared palette from style.css. Only --surface is
   local: a soft green-tinted off-white for article cards, which the
   base sheet has no equivalent for.
   ──────────────────────────────────────────────────────────────── */

:root {
  --surface: #eef1ed; /* article card / light panel background */
}

/* ─── Hero ────────────────────────────────────────────────────── */

/* ─── Section + label ─────────────────────────────────────────── */

/* ─── Filter tags ─────────────────────────────────────────────── */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.filter-tag {
  padding: 0.4rem 1rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgb(79 108 94 / 30%);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.filter-tag:hover,
.filter-tag.active {
  color: var(--surface);
  background: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* ─── Active tag notice ───────────────────────────────────────── */

.tag-active {
  margin: -1.5rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--mid);
}

.tag-active strong,
.tag-active a {
  color: var(--accent);
}

/* ─── Articles grid + cards ───────────────────────────────────── */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
}

.article-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.3s ease;
}

.article-card:hover {
  transform: translateY(-4px);
}

.article-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.article-card-link:hover {
  text-decoration: none;
}

.article-card-top {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 140px;
  padding: 2rem;
  background: var(--accent);
}

.article-category {
  display: block;
  margin-bottom: 0.8rem;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream);
}

.article-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.3;
  color: var(--surface) !important;
}

.article-card-body {
  padding: 1.5rem 2rem 2rem;
}

.article-excerpt {
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--mid);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.article-date {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
}

.article-read {
  padding-bottom: 0.1rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid rgb(79 108 94 / 30%);
  transition: border-color 0.2s ease;
}

.article-card-link:hover .article-read {
  border-color: var(--accent);
}

/* ─── Coming-soon card (permanent, shown at the end of the grid) ─ */

.placeholder-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px dashed rgb(79 108 94 / 25%);
}

.placeholder-card p {
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.75;
  color: var(--light);
}

/* ─── Pagination ──────────────────────────────────────────────── */

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  margin-top: 3.5rem;
}

.page-link {
  padding-bottom: 0.15rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid rgb(79 108 94 / 30%);
  transition: border-color 0.2s ease;
}

.page-link:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.page-status {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
}

/* ─── Statement / contact closer ──────────────────────────────── */

/* ─── Single article ──────────────────────────────────────────── */

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 6vw, 3rem);
}

.article-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
}

.article-breadcrumb {
  margin-bottom: 1.5rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.article-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-breadcrumb span {
  margin: 0 0.5rem;
  color: var(--light);
}

.article-headline {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--slate);
}

.article-byline {
  margin-top: 1.2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--light);
}

.article-byline span {
  margin: 0 0.4rem;
  color: var(--light);
}

.article-figure {
  margin: 1rem 0 2.5rem;
}

.article-figure img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ─── Prose body ──────────────────────────────────────────────── */

.prose {
  font-family: var(--sans);
  font-size: 1.06rem;
  line-height: 1.85;
  color: var(--mid);
}

.prose > * + * {
  margin-top: 1.4rem;
}

.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.25;
  color: var(--slate);
}

.prose h2 {
  margin-top: 2.8rem;
  font-size: 1.85rem;
}

.prose h3 {
  margin-top: 2.2rem;
  font-size: 1.45rem;
}

.prose h4 {
  margin-top: 1.8rem;
  font-size: 1.2rem;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.prose a:hover {
  color: var(--slate);
}

.prose strong {
  font-weight: 600;
  color: var(--slate);
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose blockquote {
  padding: 0.4rem 0 0.4rem 1.6rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--light);
  border-left: 3px solid var(--sand);
}

.prose img {
  width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 4px;
}

.prose code {
  padding: 0.1rem 0.4rem;
  font-size: 0.9em;
  background: var(--surface);
  border-radius: 4px;
}

.prose pre {
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  background: var(--slate);
  border-radius: 6px;
}

.prose pre code {
  padding: 0;
  color: var(--surface);
  background: none;
}

.prose hr {
  margin: 2.8rem 0;
  border: none;
  border-top: 1px solid rgb(79 108 94 / 20%);
}

/* ─── Tags ────────────────────────────────────────────────────── */

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 3rem;
}

.article-tags-label {
  margin-right: 0.3rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--light);
}

.article-tag {
  padding: 0.3rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid rgb(79 108 94 / 18%);
  border-radius: 999px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.article-tag:hover {
  color: var(--surface);
  background: var(--accent);
  text-decoration: none;
}

/* ─── Prev / next ─────────────────────────────────────────────── */

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgb(79 108 94 / 20%);
}

.article-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
}

.article-nav-link:hover {
  text-decoration: none;
}

.article-nav-next {
  text-align: right;
}

.article-nav-dir {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.article-nav-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.3;
  color: var(--slate);
  transition: color 0.2s ease;
}

.article-nav-link:hover .article-nav-title {
  color: var(--accent);
}

/* ─── Footer / back link ──────────────────────────────────────── */

.article-foot {
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgb(79 108 94 / 20%);
}

.article-back {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.article-back:hover {
  text-decoration: underline;
}

/* ─── Reveal (CSS-only entrance; site CSP blocks inline JS, so the
       content must never depend on script to become visible) ───── */

.reveal.d1 {
  animation-delay: 0.15s;
}

.reveal.d2 {
  animation-delay: 0.3s;
}

/* ─── Responsive ──────────────────────────────────────────────── */

@media (width <= 700px) {
  .statement-inner {
    grid-template-columns: 1fr;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav-next {
    text-align: left;
  }
}


/* Standalone link, not inline in a sentence — needs a 24px+ tap target. */
.article-back {
  display: inline-block;
  padding: 0.4rem 0;
}
