/* Hallmark · blog.css — Fastpwin blog listing, blog cards (light theme), and guide article pages.
 * OKLCH colour system. Extends global.css custom properties. */

/* ══════════════════════════════════
   BLOG SECTION (homepage light area)
   ══════════════════════════════════ */
.blog-section {
  background: var(--bg-light);
  border-top: 1px solid var(--border-light);
}
.blog-section .section-title {
  color: var(--text-dark);
}
.blog-section .section-link {
  color: var(--accent);
}
/* On the blog listing page, body is already warm paper — blend in */
.page-blog .blog-section {
  background: oklch(97.5% 0.003 90);
  border-top-color: oklch(88% 0.004 90);
}
.page-blog .blog-section .section-title {
  color: oklch(16% 0.012 270);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--text-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  border-color: oklch(0% 0 0 / 0.10);
  box-shadow: 0 2px 12px oklch(0% 0 0 / 0.04);
}
.blog-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  margin-bottom: var(--space-md);
}
.blog-card-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.blog-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.2px;
  margin-bottom: 6px;
  line-height: 1.3;
}
.blog-card-desc {
  font-size: 13px;
  color: var(--text-dark-secondary);
  line-height: 1.5;
  flex: 1;
  margin-bottom: var(--space-md);
}
.blog-card-meta {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  font-family: var(--font-mono);
}

/* ══════════════════════════════════
   BLOG LISTING PAGE
   ══════════════════════════════════ */
.blog-listing {
  padding: var(--space-4xl) var(--space-xl);
  max-width: 1280px;
  margin: 0 auto;
}
.blog-listing .section-title {
  color: oklch(16% 0.012 270);
}
.blog-listing .blog-grid {
  margin-top: var(--space-xl);
}
.page-blog .blog-listing {
  background: transparent;
}
.page-blog .blog-listing .section-title {
  color: oklch(16% 0.012 270);
}

/* ══════════════════════════════════
   GUIDE BACKLINK
   ══════════════════════════════════ */
.guide-backlink {
  display: flex;
  align-items: center;
  gap: 20px;
  background: transparent;
  border: 1px solid oklch(55% 0.18 280 / 0.10);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 48px 0;
  transition: all var(--dur-slow) var(--ease-out);
}
.guide-backlink:hover { border-color: oklch(55% 0.18 280 / 0.22); background: oklch(55% 0.18 280 / 0.02); }
.guide-backlink-icon { font-size: 36px; flex-shrink: 0; }
.guide-backlink-text { flex: 1; }
.guide-backlink-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-teal);
  margin-bottom: 6px;
}
.guide-backlink-link { font-size: 16px; font-weight: 700; color: oklch(18% 0.020 270); text-decoration: none; display: inline-block; transition: color var(--transition); }
.guide-backlink-link:hover { color: var(--accent); }

/* ══════════════════════════════════
   GUIDE CONTENT PAGE (article)
   ══════════════════════════════════ */
.guides-preview { padding: 0 64px 96px; max-width: 1200px; margin: 0 auto; }
.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.guide-content {
  padding: 96px 64px 120px;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}
.guide-content-inner { max-width: 680px; margin: 0 auto; padding: 0 64px; }
.guide-header { margin-bottom: 56px; padding-bottom: 48px; border-bottom: 1px solid var(--border-dark); position: relative; }
.guide-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.guide-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 16px;
  padding: 4px 12px;
  background: var(--accent-teal-glow);
  border: 1px solid oklch(80% 0.13 210 / 0.20);
  border-radius: var(--radius-full);
}
.guide-header h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 700; color: var(--text-light); line-height: 1.18; margin-bottom: 16px; letter-spacing: -0.03em; }
.guide-header-desc { font-size: 17px; color: var(--text-muted); line-height: 1.6; }
.guide-byline { margin-top: 20px; font-size: 13px; color: var(--text-dim); font-weight: 500; }
.guide-body { font-size: 17px; line-height: 1.75; color: var(--text-muted); }
.guide-body h2 {
  font-size: clamp(22px, 3.5vw, 26px);
  font-weight: 700;
  color: var(--text-light);
  margin: 52px 0 20px;
  letter-spacing: -0.02em;
  padding-top: 0;
  border-top: none;
}
.guide-body h3 { font-size: 18px; font-weight: 600; color: var(--text-light); margin: 36px 0 12px; letter-spacing: -0.02em; }
.guide-body p { margin-bottom: 20px; }
.guide-body ul { margin: 0 0 24px 20px; display: flex; flex-direction: column; gap: 10px; }
.guide-body li { color: var(--text-muted); }
.guide-prompt-block {
  background: oklch(15% 0.008 260 / 0.80);
  border: 1px solid oklch(55% 0.18 280 / 0.20);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin: 24px 0 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  backdrop-filter: blur(8px);
}
.guide-cta-box {
  background: oklch(12% 0.007 260 / 0.80);
  border: 1px solid oklch(55% 0.18 280 / 0.20);
  border-radius: var(--radius-2xl);
  padding: 44px 48px;
  margin: 56px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.guide-cta-box::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(circle, oklch(55% 0.18 280 / 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.guide-cta-box h3 { font-size: 24px; font-weight: 800; color: var(--text-light); margin-bottom: 14px; letter-spacing: -0.03em; }
.guide-cta-box p { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.65; }
.btn-guide-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--text-light);
  padding: 15px 30px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--dur-normal) var(--ease-out);
  letter-spacing: -0.01em;
}
.btn-guide-cta:hover { transform: translateY(-3px); }

/* ══════════════════════════════════
   BLOG LIGHT THEME (for /guide pages)
   Product-detail-style two-column: main content left, sticky sidebar right.
   Same 1200px container · 808px + 72px gap + 320px sidebar.
   ══════════════════════════════════ */
.page-blog {
  background: oklch(97.5% 0.003 90);
}
/* Breadcrumb: same warm paper, separated by a faint hairline */
.page-blog .breadcrumb-nav {
  background: oklch(97.5% 0.003 90);
  border-bottom: 1px solid oklch(88% 0.004 90);
  padding: 18px 64px;
}
.page-blog .breadcrumb, .page-blog .breadcrumb a { color: oklch(40% 0.020 270); }
.page-blog .breadcrumb a:hover { color: var(--accent-hover); }
.page-blog .breadcrumb-sep { color: oklch(70% 0.010 270); }

/* Article grid: mirrors .product-detail-grid.
 * JS wraps all content into .guide-main, then appends .guide-sidebar.
 * Exactly 2 grid children — no row-span hack. */
.page-blog .guide-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 72px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 64px 120px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border: none;
}
.page-blog .guide-content-inner { max-width: none; margin: 0; padding: 0; }
.guide-main { min-width: 0; }

/* ── Sidebar (JS-generated, mirrors .product-detail-sidebar) ── */
.guide-sidebar {
  position: sticky;
  top: 88px;
  background: var(--text-light);
  border: 1px solid oklch(93% 0.005 270);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: 0 8px 40px oklch(0% 0 0 / 0.04);
}
.sidebar-toc-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(48% 0.020 270);
  margin-bottom: 14px;
}
.sidebar-toc-list { list-style: none; display: flex; flex-direction: column; }
.sidebar-toc-link {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  color: oklch(40% 0.018 270);
  text-decoration: none;
  border-bottom: 1px solid oklch(94% 0.003 90);
  transition: color var(--transition);
  line-height: 1.4;
}
.sidebar-toc-link:last-child { border-bottom: none; }
.sidebar-toc-link:hover { color: var(--accent-hover); }
.sidebar-cta-box {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid oklch(90% 0.004 90);
}
.sidebar-cta-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: oklch(50% 0.020 270);
  margin-bottom: 10px;
}
.sidebar-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--text-light);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--dur-normal) var(--ease-out);
  letter-spacing: -0.01em;
}
.sidebar-cta-link:hover { transform: translateY(-1px); background: var(--accent-hover); }
.page-blog .guide-header { border-bottom: 1px solid oklch(88% 0.004 90); }
.page-blog .guide-header::after { background: linear-gradient(90deg, var(--accent), var(--accent-glow), transparent); }
.page-blog .guide-header h1 { color: oklch(16% 0.012 270); font-weight: 700; letter-spacing: -0.025em; }
.page-blog .guide-header-desc { color: oklch(40% 0.018 270); }
.page-blog .guide-byline { color: oklch(55% 0.016 270); }
.page-blog .guide-eyebrow { color: var(--accent-hover); background: oklch(55% 0.18 280 / 0.05); border-color: oklch(55% 0.18 280 / 0.08); }
.page-blog .guide-body { color: oklch(30% 0.012 270); }
.page-blog .guide-body h2 { color: oklch(14% 0.012 270); font-weight: 700; margin-top: 48px; border-top: none; }
.page-blog .guide-body h3 { color: oklch(18% 0.012 270); font-weight: 600; }
.page-blog .guide-body p { color: oklch(30% 0.012 270); }
.page-blog .guide-body li { color: oklch(30% 0.012 270); }
.page-blog .guide-prompt-block { background: oklch(95% 0.004 90); border-color: oklch(86% 0.004 90); border-left-color: var(--accent); color: oklch(35% 0.018 270); }
.page-blog .guide-cta-box { background: oklch(95% 0.004 90); border-color: oklch(86% 0.004 90); box-shadow: none; }
.page-blog .guide-cta-box::before { background: radial-gradient(circle, oklch(55% 0.18 280 / 0.04) 0%, transparent 70%); }
.page-blog .guide-cta-box h3 { color: oklch(16% 0.012 270); }
.page-blog .guide-cta-box p { color: oklch(35% 0.018 270); }
.page-blog .guide-backlink { background: oklch(95% 0.004 90); border-color: oklch(86% 0.004 90); }
.page-blog .guide-backlink-label { color: var(--accent-hover); }
.page-blog .guide-backlink-link { color: oklch(16% 0.012 270); }
.page-blog .guide-backlink-link:hover { color: var(--accent); }
/* ── CTA band on blog listing ── */
.page-blog .cta-band {
  border-top-color: oklch(88% 0.004 90);
}
.page-blog .cta-band h2 { color: oklch(16% 0.012 270); }
.page-blog .cta-band p { color: oklch(42% 0.018 270); }

/* ── Footer on warm paper ── */

/* ══════════════════════════════════
   SCROLL PROGRESS BAR (Apple-style thin accent line)
   ══════════════════════════════════ */
.scroll-progress-bar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 999;
  pointer-events: none;
  transition: transform 80ms linear;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .btn-guide-cta { transition-duration: 0.01ms !important; }
  .scroll-progress-bar { display: none; }
}

/* ══════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════ */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .guides-grid { grid-template-columns: repeat(2, 1fr); }
  .page-blog .guide-content {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 32px 80px;
  }
  .page-blog .guide-sidebar {
    position: static;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .guide-content { padding: 40px 24px 80px; }
  .page-blog .guide-content { padding: 40px 24px 80px; }
  .page-blog .breadcrumb-nav { padding: 14px 24px; }
  .guide-header h1 { font-size: 28px; }
  .guides-preview { padding: 0 20px 56px; }
}

@media (max-width: 480px) {
  .blog-grid { grid-template-columns: 1fr; }
  .page-blog .guide-content { padding: 32px 20px 64px; }
  .page-blog .breadcrumb-nav { padding: 12px 20px; }
}
