/* ============================================================
   GUILDSTEW — Blog
   Builds on styles.css. Index + article-reading styles.
   ============================================================ */

/* ---- Blog index hero ---- */
.blog-hero {
  min-height: auto;
  padding: 170px 0 50px;
  text-align: center;
}
.blog-hero .flow-glow.g1 { top: -10%; left: -6%; width: 560px; height: 560px; opacity: 0.45; }
.blog-hero .flow-glow.g2 { top: 0; right: -8%; width: 540px; height: 540px; opacity: 0.35; }
.blog-hero .inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.blog-hero h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); line-height: 1; margin: 14px 0 18px; }
.blog-hero p { color: var(--slate-2); font-size: 1.12rem; max-width: 600px; margin: 0 auto; }

/* ---- Category filter chips ---- */
.blog-filters {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}
.blog-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--slate-3);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.blog-chip:hover { color: var(--cream); background: rgba(255,255,255,0.07); }
.blog-chip.active {
  background: linear-gradient(135deg, var(--orange), var(--orange-hot));
  border-color: transparent;
  color: var(--cream);
  box-shadow: 0 8px 22px -6px rgba(255,83,0,0.5);
}

/* ---- Blog list section ---- */
.blog-list-section { min-height: auto; padding: 40px 0 120px; }

/* Featured post (first / large) */
.blog-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  background: linear-gradient(165deg, rgba(46,39,104,0.4), rgba(20,24,45,0.8));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 26px;
  padding: 14px 14px 14px 14px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  margin-bottom: 50px;
  position: relative; z-index: 2;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.4s, border-color 0.4s;
}
.blog-featured:hover { transform: translateY(-4px); border-color: rgba(255,83,0,0.4); }
.blog-featured .thumb {
  border-radius: 18px;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  position: relative;
}
.blog-featured .copy { padding: 18px 30px 18px 8px; }
.blog-featured .copy h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem) !important;
  color: var(--cream);
  line-height: 1.05;
  margin: 12px 0 14px;
}
.blog-featured .copy p { color: var(--slate-2); font-size: 1rem; margin-bottom: 18px; max-width: 46ch; }
.blog-featured .copy .read {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--teal-light);
  font-weight: 700;
}

/* Post thumbnail — striped placeholder (drop real art later) */
.post-thumb {
  position: relative;
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 14px, rgba(255,255,255,0.02) 14px 28px),
    linear-gradient(135deg, var(--orange-darker), var(--navy-2));
  display: grid;
  place-items: center;
}
.post-thumb.teal { background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 14px, rgba(255,255,255,0.02) 14px 28px),
    linear-gradient(135deg, var(--teal-deep), var(--navy-2)); }
.post-thumb.purple { background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 14px, rgba(255,255,255,0.02) 14px 28px),
    linear-gradient(135deg, var(--indigo-haze), var(--navy-2)); }
.post-thumb .ph-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,247,242,0.55);
  background: rgba(9,11,26,0.5);
  padding: 5px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Post meta line */
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}
.post-cat {
  color: var(--orange-light);
  font-weight: 700;
}
.post-meta .sep { opacity: 0.4; }

/* Post grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  position: relative; z-index: 2;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(35,41,68,0.6), rgba(20,24,45,0.85));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.post-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,83,0,0.4);
  box-shadow: var(--shadow), 0 0 40px -14px rgba(255,83,0,0.3);
}
.post-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.post-card .body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 {
  font-family: 'Cherry Cream Soda', serif;
  font-size: 1.3rem;
  color: var(--cream);
  line-height: 1.1;
  margin: 12px 0 10px;
}
.post-card p { color: var(--slate-2); font-size: 0.92rem; margin: 0 0 16px; flex: 1; }
.post-card .read {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--orange-light);
  font-weight: 700;
}
.post-card[hidden] { display: none; }

/* ============================================================
   ARTICLE (single post)
   ============================================================ */
.article {
  min-height: auto;
  padding: 150px 0 90px;
  position: relative;
}
.article .flow-glow.g1 { top: -8%; right: -8%; width: 520px; height: 520px; opacity: 0.34; }
.article-head {
  max-width: 920px;
  margin: 0 auto 36px;
  text-align: center;
  position: relative; z-index: 2;
}
.article-head .post-meta { justify-content: center; margin-bottom: 18px; }
.article-head h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  color: var(--cream);
  margin-bottom: 18px;
}
.article-head .dek {
  color: var(--slate-2);
  font-size: 1.15rem;
  max-width: 60ch;
  margin: 0 auto;
}
.article-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--slate-2);
  font-size: 0.9rem;
}
.article-byline .av {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-hot));
  display: grid; place-items: center;
  font-family: 'Cherry Cream Soda', serif;
  color: var(--cream);
  font-size: 1rem;
}
.article-byline strong { color: var(--cream); }

.article-hero-img {
  max-width: 960px;
  margin: 0 auto 50px;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 2;
}

/* Prose */
.prose {
  max-width: 720px;
  margin: 0 auto;
  position: relative; z-index: 2;
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--slate-3);
}
.prose > * + * { margin-top: 1.4em; }
.prose h2 {
  font-family: 'Cherry Cream Soda', serif;
  font-size: 1.9rem !important;
  color: var(--cream);
  line-height: 1.15;
  margin-top: 1.8em;
}
.prose h3 {
  font-family: 'Cherry Cream Soda', serif;
  font-size: 1.4rem;
  color: var(--cream);
  margin-top: 1.5em;
}
.prose p { color: var(--slate-3); text-wrap: pretty; }
.prose strong { color: var(--cream); }
.prose em { color: var(--orange-light); font-style: italic; }
.prose a { color: var(--orange-light); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 0.5em; }
.prose li { color: var(--slate-3); }
.prose li::marker { color: var(--orange); }
.prose blockquote {
  border-left: 3px solid var(--orange);
  background: rgba(255,83,0,0.06);
  border-radius: 0 14px 14px 0;
  padding: 16px 22px;
  font-style: italic;
  color: var(--orange-light);
}
.prose blockquote p { color: var(--orange-light); margin: 0; }
.prose hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 2em 0; }
/* Inline media (images / video) in posts */
.prose figure.prose-media { margin: 1.6em 0; }
.prose figure.prose-media video,
.prose figure.prose-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}
.prose figure.prose-media figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--slate);
}
/* "The Problem / The Fix" callout pattern */
.prose .pf {
  background: linear-gradient(165deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 18px 22px;
  font-size: 1rem;
}
.prose .pf p { margin: 0 0 6px; }
.prose .pf p:last-child { margin: 0; }
.prose .pf .lab { color: var(--orange-light); font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* Article CTA */
.article-cta {
  max-width: 720px;
  margin: 60px auto 0;
  position: relative; z-index: 2;
  background: linear-gradient(135deg, var(--orange), var(--orange-hot));
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 24px 60px -18px rgba(255,83,0,0.6);
}
.article-cta h3 { font-family: 'Cherry Cream Soda', serif; color: var(--cream); font-size: 1.9rem; margin-bottom: 10px; }
.article-cta p { color: rgba(250,247,242,0.92); margin-bottom: 22px; max-width: 46ch; margin-left: auto; margin-right: auto; }
.article-cta .btn {
  background: var(--cream);
  color: var(--orange);
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.35);
}
.article-cta .btn:hover { background: var(--navy); color: var(--cream); }

/* Back link + footer of article */
.article-foot {
  max-width: 720px;
  margin: 50px auto 0;
  position: relative; z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.article-foot a.back {
  color: var(--orange-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.article-foot a.back:hover { color: var(--cream); }
.article-share { display: flex; gap: 10px; align-items: center; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--cream);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.share-btn:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,83,0,0.45); color: var(--orange-light); }
.share-btn .share-ico { font-size: 0.9em; transition: transform 0.2s; }
.share-btn:hover .share-ico { transform: translate(1px, -1px); }
.share-btn.copied {
  color: var(--teal-light);
  border-color: rgba(55,242,209,0.5);
  background: rgba(31,168,143,0.12);
}
.share-btn.copied .share-ico { transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured .copy { padding: 8px 22px 22px; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 130px 0 30px; }
  .article { padding: 120px 0 60px; }
  .prose { font-size: 1.05rem; }
  .article-cta { padding: 30px 22px; }
}
