/* ============================================
   RESOURCES — Blog listing page
   Category color tokens used in data-cat / data-topic
============================================ */

:root {
  --cat-seo:   #174f8b;
  --cat-web:   #2E3028;
  --cat-strat: #4A6741;
  --cat-case:  #7A3B28;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap;
}


/* ============================================
   HERO
============================================ */
.page-hero--resources {
  min-height: 60vh;
  background: var(--dark);
  display: flex;
  align-items: flex-end;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

.page-hero--resources::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(74,143,216,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,143,216,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 100%, black 20%, transparent 80%);
}

.hero-issue {
  position: absolute; right: 5rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif); font-size: 14rem;
  color: rgba(74,143,216,0.03); line-height: 1;
  letter-spacing: -0.06em;
  pointer-events: none; user-select: none;
  opacity: 0; animation: fadeIn 1.2s 0.8s forwards;
}

/* Hero stats row */
.hero-stats {
  display: flex; gap: 3.5rem; margin-top: 3rem;
  opacity: 0; animation: revealUp 0.8s 0.9s var(--ease-out) forwards;
}
.hero-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.hero-stat-num {
  font-family: var(--serif); font-size: 1.6rem;
  color: var(--white); letter-spacing: -0.03em; line-height: 1;
}
.hero-stat-label {
  font-size: 0.58rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(247,246,242,0.25);
  font-weight: 500;
}


/* ============================================
   TOPIC EXPLORER
============================================ */
.topic-explorer {
  background: var(--dark);
  position: relative; z-index: 10;
  border-top: 1px solid rgba(247,246,242,0.04);
}
.topic-explorer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 3rem;
  overflow: hidden;
}

.topic-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding: 3rem 0;
  max-height: 400px; overflow: hidden;
}
.topic-card {
  background: rgba(247,246,242,0.03);
  border: 1px solid rgba(247,246,242,0.05);
  padding: 2rem 1.8rem;
  position: relative; cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  overflow: hidden;
}
.topic-card:hover {
  background: rgba(247,246,242,0.06);
  border-color: rgba(247,246,242,0.1);
}
.topic-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.topic-card:hover::before { transform: scaleX(1); }
.topic-card[data-topic="seo"]::before   { background: var(--cat-seo); }
.topic-card[data-topic="web"]::before   { background: var(--accent); }
.topic-card[data-topic="strat"]::before { background: var(--cat-strat); }
.topic-card[data-topic="case"]::before  { background: var(--cat-case); }

.topic-card-dot {
  width: 6px; height: 6px; border-radius: 50%;
  margin-bottom: 1rem; flex-shrink: 0;
}
.topic-card[data-topic="seo"]   .topic-card-dot { background: var(--cat-seo); }
.topic-card[data-topic="web"]   .topic-card-dot { background: var(--accent); }
.topic-card[data-topic="strat"] .topic-card-dot { background: var(--cat-strat); }
.topic-card[data-topic="case"]  .topic-card-dot { background: var(--cat-case); }

.topic-card-label {
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(247,246,242,0.35); font-weight: 500; margin-bottom: 0.6rem;
}
.topic-card-name {
  font-family: var(--serif); font-size: 1.2rem;
  color: var(--white); line-height: 1.2;
  letter-spacing: -0.01em; margin-bottom: 0.6rem;
}
.topic-card-count {
  font-size: 0.72rem; color: rgba(247,246,242,0.2); font-weight: 300;
}
.topic-card-count span { color: var(--accent); font-weight: 500; }


/* ============================================
   STICKY FILTER BAR
============================================ */
.sticky-filters {
  position: sticky; top: 72px; z-index: 50;
  background: var(--dark-mid);
  border-bottom: 1px solid rgba(247,246,242,0.06);
  padding: 0 3rem;
  opacity: 0; pointer-events: none;
  transform: translateY(-100%);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.sticky-filters.visible {
  opacity: 1; pointer-events: auto;
  transform: translateY(0);
}
.sticky-filters-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 52px;
}
.sticky-filter-tabs { display: flex; gap: 0; align-items: center; }
.sticky-filter-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(247,246,242,0.35); padding: 0.6rem 1.2rem;
  position: relative; transition: color 0.2s;
  white-space: nowrap;
}
.sticky-filter-btn::after {
  content: ''; position: absolute; bottom: 0;
  left: 0.5rem; right: 0.5rem; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transition: transform 0.3s var(--ease-out);
}
.sticky-filter-btn:hover { color: rgba(247,246,242,0.7); }
.sticky-filter-btn.active { color: var(--white); }
.sticky-filter-btn.active::after { transform: scaleX(1); }
.sticky-filter-count {
  font-size: 0.65rem; color: rgba(247,246,242,0.2); letter-spacing: 0.06em;
}
.sticky-filter-count span { color: var(--accent); font-weight: 500; }


/* ============================================
   FEATURED POST
============================================ */
.section-featured {
  background: var(--off-white);
  padding: 5rem 0 0;
  position: relative; overflow: hidden;
}
.featured-label {
  font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-dark); font-weight: 500; margin-bottom: 2.5rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.featured-label::after {
  content: ''; flex: 1; height: 1px; background: rgba(17,18,16,0.1);
}

.featured-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0; min-height: 520px;
  position: relative;
}

/* Image side */
.featured-img {
  position: relative; overflow: hidden;
  background: var(--dark-mid);
}
.featured-img::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(23,79,139,0.6) 0%, rgba(17,18,16,0.85) 60%),
    repeating-linear-gradient(0deg, transparent, transparent 63px, rgba(74,143,216,0.06) 63px, rgba(74,143,216,0.06) 64px),
    repeating-linear-gradient(90deg, transparent, transparent 63px, rgba(74,143,216,0.06) 63px, rgba(74,143,216,0.06) 64px);
  z-index: 1;
}
.featured-img img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; position: absolute; inset: 0;
  transition: transform 0.8s var(--ease-out);
}
.featured-spread:hover .featured-img img { transform: scale(1.03); }
.featured-img-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  padding: 2rem 2.5rem;
  background: linear-gradient(transparent, rgba(17,18,16,0.8));
  display: flex; gap: 2rem;
}
.featured-img-stat { display: flex; flex-direction: column; gap: 0.15rem; }
.featured-img-stat-num {
  font-family: var(--serif); font-size: 1.4rem;
  color: var(--white); letter-spacing: -0.03em; line-height: 1;
}
.featured-img-stat-label {
  font-size: 0.55rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(247,246,242,0.4); font-weight: 500;
}

/* Content side */
.featured-content {
  background: var(--dark);
  padding: 4rem 3.5rem;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.featured-content::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
}
.featured-content::after {
  content: '\201C';
  position: absolute; top: 1.5rem; right: 2rem;
  font-family: var(--serif); font-size: 8rem;
  color: rgba(74,143,216,0.04); line-height: 1;
  pointer-events: none; user-select: none;
}
.featured-cat {
  font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 1.2rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: rgba(74,143,216,0.8);
}
.featured-cat-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.featured-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  color: var(--white); line-height: 1.2;
  letter-spacing: -0.02em; margin-bottom: 1.2rem;
}
.featured-desc {
  font-size: 0.88rem; line-height: 1.8;
  color: rgba(247,246,242,0.42); font-weight: 300; margin-bottom: 2rem;
}
.featured-meta {
  display: flex; align-items: center; gap: 1.5rem;
  font-size: 0.68rem; letter-spacing: 0.06em;
  color: rgba(247,246,242,0.25); margin-bottom: 2rem;
}
.featured-meta-sep {
  width: 1px; height: 12px; background: rgba(247,246,242,0.12);
}
.featured-read {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); border-bottom: 1px solid rgba(74,143,216,0.35);
  padding-bottom: 2px; transition: gap 0.2s, color 0.2s;
  align-self: flex-start;
}
.featured-read:hover { gap: 0.8rem; color: var(--white); }
.featured-read svg { width: 12px; height: 12px; }


/* ============================================
   ARTICLES — editorial list + sidebar
============================================ */
.section-articles {
  background: var(--off-white);
  padding: 5rem 0 8rem;
}
.articles-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem; align-items: start;
}

/* Header */
.articles-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(17,18,16,0.08);
}
.articles-section-title {
  font-family: var(--serif); font-size: 1.4rem;
  color: var(--dark); letter-spacing: -0.01em;
}

/* Article list item */
.article-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem; padding: 2rem 0;
  border-bottom: 1px solid rgba(17,18,16,0.06);
  position: relative; cursor: pointer; transition: background 0.3s;
}
.article-item::before {
  content: '';
  position: absolute; left: -1rem; top: 0; bottom: 0;
  width: 2px; background: transparent;
  transition: background 0.3s var(--ease-out);
}
.article-item:hover::before { background: var(--accent); }
.article-item:hover {
  background: rgba(247,246,242,0.6);
  margin: 0 -1rem; padding: 2rem 1rem;
}

.article-item-cat {
  font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 0.6rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.article-item-cat-dot {
  width: 4px; height: 4px; border-radius: 50%; flex-shrink: 0;
}
.article-item[data-cat="seo"]   .article-item-cat     { color: var(--cat-seo); }
.article-item[data-cat="web"]   .article-item-cat     { color: var(--accent-dark); }
.article-item[data-cat="strat"] .article-item-cat     { color: var(--cat-strat); }
.article-item[data-cat="case"]  .article-item-cat     { color: var(--cat-case); }
.article-item[data-cat="seo"]   .article-item-cat-dot { background: var(--cat-seo); }
.article-item[data-cat="web"]   .article-item-cat-dot { background: var(--accent); }
.article-item[data-cat="strat"] .article-item-cat-dot { background: var(--cat-strat); }
.article-item[data-cat="case"]  .article-item-cat-dot { background: var(--cat-case); }

.article-item-title {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--dark); line-height: 1.25;
  letter-spacing: -0.01em; margin-bottom: 0.6rem;
  transition: color 0.2s;
}
.article-item-title a { color: inherit; }
.article-item:hover .article-item-title { color: var(--accent-dark); }

.article-item-excerpt {
  font-size: 0.82rem; line-height: 1.7;
  color: var(--text-light); font-weight: 300; max-width: 600px;
}
.article-item-meta {
  display: flex; align-items: center; gap: 0.8rem;
  margin-top: 0.8rem;
  font-size: 0.65rem; letter-spacing: 0.06em;
  color: rgba(17,18,16,0.3);
}
.article-item-meta-sep {
  width: 2px; height: 2px; border-radius: 50%;
  background: rgba(17,18,16,0.2);
}
.article-item-num {
  font-family: var(--serif); font-size: 3rem;
  color: rgba(17,18,16,0.04); line-height: 1;
  letter-spacing: -0.04em; white-space: nowrap;
  align-self: center; transition: color 0.3s;
}
.article-item:hover .article-item-num { color: rgba(74,143,216,0.08); }
.article-item.hidden { display: none; }

/* Load more */
.load-more-wrap { text-align: center; margin-top: 3rem; }
.load-more-btn {
  background: none; border: 1px solid rgba(17,18,16,0.15);
  color: var(--text-light); font-family: var(--sans);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.85rem 2.2rem; cursor: pointer; border-radius: 2px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.load-more-btn:hover {
  border-color: var(--accent-dark); color: var(--accent-dark);
  background: rgba(74,143,216,0.03);
}
.load-more-btn:disabled {
  cursor: default;
}
.load-more-btn:disabled:hover {
  border-color: rgba(17,18,16,0.12); color: inherit; background: transparent;
}

/* End state — same shape as load-more, just dimmed */
.load-more-btn--end {
  color: rgba(17,18,16,0.2);
  border-color: rgba(17,18,16,0.08);
  text-transform: uppercase;
  pointer-events: none;
}

/* Empty state */
.articles-empty {
  text-align: center;
  padding: 5rem 2rem;
}
.articles-empty-icon {
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.articles-empty-icon svg { margin: 0 auto; }
.articles-empty-heading {
  font-family: var(--serif);
  font-size: 1.5rem; color: var(--dark);
  margin-bottom: 0.8rem;
}
.articles-empty-text {
  font-size: 0.9rem; line-height: 1.7;
  color: var(--text-light); font-weight: 300;
  max-width: 440px; margin: 0 auto;
}


/* ============================================
   SIDEBAR
============================================ */
.articles-sidebar { position: sticky; top: 140px; }

.sidebar-block { margin-bottom: 2.5rem; }
.sidebar-title {
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-light); font-weight: 500; margin-bottom: 1.2rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid rgba(17,18,16,0.08);
}

.sidebar-cat-list { list-style: none; }
.sidebar-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(17,18,16,0.04);
  cursor: pointer; transition: padding-left 0.2s;
}
.sidebar-cat-item:hover { padding-left: 0.4rem; }
.sidebar-cat-item-left {
  display: flex; align-items: center; gap: 0.6rem;
}
.sidebar-cat-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.sidebar-cat-name {
  font-size: 0.82rem; color: var(--dark); font-weight: 400;
  transition: color 0.2s;
}
.sidebar-cat-item:hover .sidebar-cat-name { color: var(--accent-dark); }
.sidebar-cat-item.active .sidebar-cat-name { color: var(--accent-dark); font-weight: 500; }
.sidebar-cat-num {
  font-size: 0.68rem; color: rgba(17,18,16,0.2); font-weight: 300;
}

/* Popular */
.sidebar-popular-item {
  display: flex; gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(17,18,16,0.04);
  cursor: pointer;
}
.sidebar-popular-item:last-child { border-bottom: none; }
.sidebar-popular-num {
  font-family: var(--serif); font-size: 1.1rem;
  color: rgba(17,18,16,0.12); line-height: 1.3;
  flex-shrink: 0; width: 1.4rem;
}
.sidebar-popular-title {
  font-size: 0.8rem; line-height: 1.4;
  color: var(--dark); font-weight: 400; transition: color 0.2s;
}
.sidebar-popular-item:hover .sidebar-popular-title { color: var(--accent-dark); }
.sidebar-popular-meta {
  font-size: 0.62rem; color: rgba(17,18,16,0.25);
  margin-top: 0.2rem; letter-spacing: 0.04em;
}

/* Sidebar CTA */
.sidebar-cta-box {
  background: var(--dark);
  padding: 2rem 1.6rem;
  position: relative; overflow: hidden;
}
.sidebar-cta-box::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(74,143,216,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,143,216,0.04) 1px, transparent 1px);
  background-size: 32px 32px; pointer-events: none;
}
.sidebar-cta-eyebrow {
  font-size: 0.55rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin-bottom: 0.8rem;
  position: relative;
}
.sidebar-cta-title {
  font-family: var(--serif);
  font-size: 1.15rem; color: var(--white);
  line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 0.8rem;
  position: relative;
}
.sidebar-cta-body {
  font-size: 0.78rem; line-height: 1.65;
  color: rgba(247,246,242,0.4); font-weight: 300; margin-bottom: 1.4rem;
  position: relative;
}
.sidebar-cta-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--sans); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--white); background: var(--accent-dark);
  border: none; padding: 0.65rem 1.4rem; cursor: pointer;
  border-radius: 2px; transition: background 0.2s, gap 0.2s;
  position: relative;
}
.sidebar-cta-btn:hover { background: var(--accent); gap: 0.6rem; }
.sidebar-cta-btn svg { width: 10px; height: 10px; }


/* ============================================
   NEWSLETTER
============================================ */
.section-newsletter {
  background: var(--dark);
  padding: 6rem 0;
  position: relative; overflow: hidden;
}
.section-newsletter::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(74,143,216,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.newsletter-inner {
  max-width: 680px; margin: 0 auto; padding: 0 3rem;
  text-align: center; position: relative; z-index: 1;
}
.newsletter-eyebrow {
  font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin-bottom: 1.2rem;
}
.newsletter-heading {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--white); line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 1rem;
}
.newsletter-sub {
  font-size: 0.9rem; line-height: 1.7;
  color: rgba(247,246,242,0.4); font-weight: 300; margin-bottom: 2.5rem;
}
.newsletter-form { display: flex; gap: 0; max-width: 460px; margin: 0 auto; }
.newsletter-input {
  flex: 1; background: rgba(247,246,242,0.06);
  border: 1px solid rgba(247,246,242,0.1); border-right: none;
  padding: 0.85rem 1.2rem;
  font-family: var(--sans); font-size: 0.88rem; color: var(--white);
  outline: none; transition: border-color 0.2s;
  border-radius: 2px 0 0 2px;
}
.newsletter-input::placeholder { color: rgba(247,246,242,0.25); }
.newsletter-input:focus { border-color: rgba(74,143,216,0.5); }
.newsletter-btn {
  background: var(--accent-dark); color: var(--white); border: none;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.85rem 1.6rem; cursor: pointer;
  transition: background 0.2s; white-space: nowrap;
  border-radius: 0 2px 2px 0;
}
.newsletter-btn:hover { background: var(--accent); }
.newsletter-note {
  font-size: 0.68rem; color: rgba(247,246,242,0.2); margin-top: 1rem;
}


/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
  .articles-layout { grid-template-columns: 1fr; }
  .articles-sidebar {
    position: static; display: grid;
    grid-template-columns: 1fr 1fr; gap: 2rem;
  }
  .sidebar-cta-box { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .topic-explorer-inner { padding: 0 1.5rem; }
  .sticky-filters { padding: 0 1.5rem; }
  .hero-issue { display: none; }
  .topic-cards { grid-template-columns: 1fr 1fr; }
  .featured-spread { grid-template-columns: 1fr; min-height: auto; }
  .featured-img { height: 280px; }
  .featured-content { padding: 2.5rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-input {
    border-right: 1px solid rgba(247,246,242,0.1);
    border-bottom: none; border-radius: 2px 2px 0 0;
  }
  .newsletter-btn { border-radius: 0 0 2px 2px; }
  .articles-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topic-cards { grid-template-columns: 1fr; }
  .hero-stats { gap: 2rem; flex-wrap: wrap; }
  .section-articles { padding: 3rem 0 5rem; }
  .article-item-num { display: none; }
}