/* ─── blogpost2.css — yin Solutions Blog Style ─── */
/* Matches site design: same tokens, refined blog-specific layout  */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }

:root {
  --bg:        #080810;
  --bg2:       #0f0f1a;
  --panel:     #13131f;
  --panel2:    #1a1a2e;
  --border:    rgba(255,255,255,0.07);
  --border-v:  rgba(160,80,220,0.3);
  --text:      #e8e8f0;
  --muted:     #9090a8;
  --primary:   #7c3aed;
  --secondary: #a855f7;
  --accent:    #c084fc;
  --glow:      rgba(124,58,237,0.35);
  --maxw:      780px;
  --nav-h:     68px;
  --r-sm:      8px;
  --r-md:      14px;
  --r-lg:      20px;
  --r-xl:      28px;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── Noise texture overlay ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ─── Wrap ─── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ─── NAV ─── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,8,16,0.85);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.topnav .wrap-wide {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.3px;
  color: var(--text);
}
.brand span { color: var(--accent); }
.logo {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: url("https://yinsolutions.org/logogreywhite.png") center/cover no-repeat;
  border: 1px solid var(--border-v);
  flex-shrink: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.back-link:hover {
  color: var(--text);
  border-color: var(--border-v);
  background: rgba(124,58,237,0.08);
}
.back-link svg { width: 14px; height: 14px; }

/* ─── Progress bar ─── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ─── HERO / Article header ─── */
.article-hero {
  position: relative;
  padding: 72px 24px 60px;
  text-align: center;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 70vmin; height: 70vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.14) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Hero grid lines */
.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

.article-hero .wrap { position: relative; z-index: 1; }

.article-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.28);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.5rem;
}
.article-eyebrow::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--secondary);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.5; transform:scale(0.8); }
}

.article-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.6px;
  margin-bottom: 1.25rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.article-title em {
  font-style: normal;
  background: linear-gradient(135deg, #c084fc 0%, #7c3aed 60%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.article-intro {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 58ch;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.meta-item svg { width: 13px; height: 13px; opacity: 0.6; }
.meta-divider { width: 1px; height: 14px; background: var(--border); }

/* ─── Hero image ─── */
.hero-image-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.hero-image-wrap img {
  width: 100%;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(124,58,237,0.08);
}

/* ─── TOC ─── */
.toc-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}
.toc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,0.45), transparent);
}
.toc-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-title::before {
  content: '';
  width: 16px; height: 1px;
  background: var(--secondary);
}
.toc-card ol {
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.toc-card ol li { counter-increment: toc; }
.toc-card ol li a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}
.toc-card ol li a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 22px;
}
.toc-card ol li a:hover { color: var(--accent); }

/* ─── Article body ─── */
.article-body {
  padding: 48px 24px 80px;
}

.article-body .wrap {
  max-width: 760px;
}

/* Section label like the site */
.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.6rem;
  display: block;
}

.article-body h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin: 3rem 0 1rem;
  color: #fff;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.15px;
  margin: 2rem 0 0.6rem;
  color: var(--text);
}

.article-body p {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 0.975rem;
  line-height: 1.8;
}
.article-body p:last-child { margin-bottom: 0; }

.article-body strong { color: var(--text); font-weight: 600; }

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(192,132,252,0.4);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.article-body a:hover {
  color: #fff;
  text-decoration-color: rgba(255,255,255,0.4);
}

/* ─── Divider ─── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-v), transparent);
  border: none;
  margin: 2.5rem 0;
}

/* ─── Callout / tip box ─── */
.callout {
  background: rgba(124,58,237,0.07);
  border: 1px solid rgba(124,58,237,0.22);
  border-left: 3px solid var(--secondary);
  border-radius: var(--r-md);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  font-size: 0.925rem;
  color: var(--text);
  line-height: 1.75;
}
.callout strong { color: var(--accent); }

/* ─── Highlight panel (marketplace mention etc.) ─── */
.highlight-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.75rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.highlight-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,0.45), transparent);
}
.highlight-panel:hover { border-color: var(--border-v); }
.highlight-panel h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: #fff;
}
.highlight-panel p { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.85rem; }
.highlight-panel p:last-child { margin-bottom: 0; }

/* ─── Feature list ─── */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1rem 0 1.5rem;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.925rem;
  color: var(--muted);
  line-height: 1.65;
}
.feature-list li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--secondary);
  margin-top: 7px;
  flex-shrink: 0;
}
.feature-list li strong { color: var(--text); }

/* ─── Numbered steps ─── */
.steps-list {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.25rem 0 1.75rem;
}
.steps-list li {
  counter-increment: steps;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.steps-list li::before {
  content: counter(steps);
  min-width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  margin-top: 1px;
}
.steps-list li p { margin-bottom: 0; }

/* ─── Info grid (2-col) ─── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.info-cell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.25rem;
  transition: border-color 0.25s, background 0.25s;
}
.info-cell:hover {
  border-color: var(--border-v);
  background: var(--panel2);
}
.info-cell h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
  letter-spacing: -0.1px;
}
.info-cell p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0;
}
@media (max-width: 560px) { .info-grid { grid-template-columns: 1fr; } }

/* ─── Tag ─── */
.sol-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.75rem;
}

/* ─── FAQ ─── */
.faq-block {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.faq-item {
  background: var(--panel);
}
.faq-item summary {
  padding: 1.1rem 1.5rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background 0.2s;
}
.faq-item summary:hover { background: var(--panel2); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--secondary);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { background: var(--panel2); }
.faq-answer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ─── Conclusion card ─── */
.conclusion-card {
  background: var(--panel);
  border: 1px solid var(--border-v);
  border-radius: var(--r-xl);
  padding: 2rem;
  margin: 3rem 0 0;
  position: relative;
  overflow: hidden;
}
.conclusion-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,0.6), transparent);
}
.conclusion-card h2 {
  margin-top: 0 !important;
  font-size: 1.3rem !important;
}
.conclusion-card p { font-size: 0.925rem; }

/* ─── Reveal animation ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1), transform 0.65s cubic-bezier(0.22,1,0.36,1);
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 24px;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.twitter-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
}
.twitter-link:hover { color: #fff; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .article-hero { padding: 52px 0 44px; }
  .article-title { font-size: 1.7rem; }
  .toc-card { padding: 1.25rem; }
  .info-grid { grid-template-columns: 1fr; }
}