/* Blog archive, legal and single article page styles — from static blog.html / article.html / privacy.html */

.page-hero {
  padding: calc(var(--nav-h) + 48px) 0 32px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  margin-bottom: 12px;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.6;
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 24px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 10px 22px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.filter-btn:hover {
  border-color: var(--accent);
  background-color: rgba(90, 115, 86, 0.04);
}

.filter-btn.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.site-main--blog .blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 100px;
}

.blog-card-wrapper {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.blog-card-wrapper.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.95);
}

.blog-archive__empty {
  grid-column: 1 / -1;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .site-main--blog .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-main--blog .blog-grid {
    grid-template-columns: 1fr;
  }
}

.legal-content {
  padding-block: calc(var(--nav-h) + 48px) 80px;
  max-width: 800px;
  margin-inline: auto;
}

.legal-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 24px;
  line-height: 1.1;
}

.legal-content h2,
.legal-content__body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--accent);
}

.legal-content p,
.legal-content li,
.legal-content__body p,
.legal-content__body li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.legal-content ul,
.legal-content__body ul {
  margin-left: 20px;
  margin-bottom: 20px;
}

/* Single article shell */
.article-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 100%;
  height: 3px;
  background: rgba(90, 115, 86, 0.12);
}

.article-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-terracotta));
  transition: width 0.1s linear;
}

.article-cover {
  position: relative;
  margin-top: var(--nav-h);
  min-height: clamp(280px, 42vw, 520px);
  overflow: hidden;
  background-color: var(--bg-alt);
}

.article-cover__img {
  width: 100%;
  height: 100%;
  min-height: clamp(280px, 42vw, 520px);
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.article-cover__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(34, 36, 33, 0.15) 0%, rgba(34, 36, 33, 0.45) 55%, rgba(250, 250, 245, 0.98) 100%);
  pointer-events: none;
}

.article-cover__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding-block: 48px 40px;
}

.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s, transform 0.2s;
}

.back-to-blog:hover {
  color: #fff;
  transform: translateX(-3px);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.article-meta__pill {
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.article-meta__divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.45);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 18ch;
  margin-bottom: 16px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.article-lead {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  max-width: 58ch;
}

.article-author-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-light);
}

.article-author-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
  flex-wrap: wrap;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.article-author__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.article-author__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.article-author__role {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.article-container {
  padding-block: 56px 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.article-content {
  font-size: clamp(1.0625rem, 1.1vw, 1.125rem);
  line-height: 1.85;
  color: var(--text-main);
}

.article-content > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 0.85;
  padding-right: 12px;
  padding-top: 6px;
  color: var(--accent-terracotta);
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.2;
  color: var(--text-main);
  margin-top: 56px;
  margin-bottom: 20px;
  padding-top: 8px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.article-content h2::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent-terracotta);
  margin-bottom: 16px;
  opacity: 0.7;
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.25;
  margin-top: 36px;
  margin-bottom: 14px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.article-content p {
  margin-bottom: 22px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 28px 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-content li::marker {
  color: var(--accent-terracotta);
}

.article-content blockquote {
  margin: 48px 0;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--bg-alt) 0%, rgba(236, 236, 225, 0.5) 100%);
  border-left: 3px solid var(--accent-terracotta);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--text-muted);
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: var(--accent-terracotta);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 32px 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.article-content th,
.article-content td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text-main);
}

.article-content tr:nth-child(even) td {
  background: rgba(236, 236, 225, 0.35);
}

.article-content .inline-quad,
.article-content .article-inline-image {
  margin: 28px 0 36px;
  border-radius: var(--radius-image);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.article-content .inline-quad img,
.article-content .article-inline-image img {
  display: block;
  width: 100%;
  height: auto;
}

.article-inline-cta {
  margin-top: 48px;
  padding: 32px;
  border-radius: var(--radius-card);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  text-align: center;
}

.article-inline-cta h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.article-inline-cta p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.article-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
}

.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 14px;
  color: var(--text-main);
}

.sidebar-widget p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.article-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-toc a {
  display: block;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

.article-toc a:hover {
  color: var(--accent);
  border-bottom-color: rgba(90, 115, 86, 0.25);
}

.read-next-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.read-next-item {
  display: flex;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.read-next-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-image);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-light);
}

.read-next-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.read-next-date {
  font-size: 0.6875rem;
  color: var(--accent-terracotta);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.read-next-title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-next-item:hover .read-next-title {
  color: var(--accent);
}

@media (max-width: 1100px) {
  .article-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .article-cover__content {
    padding-block: 32px 28px;
  }

  .article-title {
    max-width: none;
  }

  .article-author-bar__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 32px 0;
  }

  .article-table-scroll table {
    min-width: 520px;
    margin: 0;
  }

  .article-table-scroll th,
  .article-table-scroll td {
    padding: 10px 12px;
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-progress__bar {
    transition: none;
  }
}
