/* Project Eris blog — server-rendered styles. Loaded by blog_render output.
   Design-system class vocabulary here MUST stay in sync with the sanitizer
   allowlist (apps/functions/src/modules/blog/sanitize.ts ALLOWED_CLASSES).
   Palette mirrors the web app's @theme tokens (apps/web/app/app.css). */

:root {
  --accent: #ED4B9B;
  --accent-hover: #FC376F;
  --bg: #09090B;
  --surface: #252525;
  --heading: #FDFDFD;
  --body: #A5A5AE;
  --muted: #8E8E93;
  --prose-text: #C9C9D1;
  --stroke: rgba(253, 253, 253, 0.1);
  --font: "Inter", ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--body); background: var(--bg); -webkit-font-smoothing: antialiased; }
::selection { background: rgba(237, 75, 155, 0.35); color: #fff; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
.blog-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Nav / footer */
.blog-nav { border-bottom: 1px solid var(--stroke); height: 64px; display: flex; align-items: center; position: sticky; top: 0; background: rgba(9,9,11,.85); backdrop-filter: blur(12px); z-index: 10; }
.blog-logo { font-weight: 700; font-size: 20px; color: var(--accent); }
.blog-footer { border-top: 1px solid var(--stroke); padding: 40px 0; margin-top: 64px; color: var(--muted); font-size: 14px; }

/* List hero */
.blog-hero { background: radial-gradient(ellipse 70% 130% at 50% -30%, rgba(237,75,155,.16), transparent 65%); padding: 56px 0 40px; }
.blog-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; color: var(--heading); letter-spacing: -.02em; }
.blog-hero .lead { font-size: 17px; margin-top: 12px; max-width: 620px; line-height: 1.6; }
.blog-empty { padding: 48px 0; color: var(--muted); }

/* List grid */
.grid-section { padding: 40px 0 72px; }
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card { border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s, border-color .2s; }
.article-card:hover { transform: translateY(-3px); border-color: rgba(237,75,155,.35); box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 24px rgba(237,75,155,.12); }
.article-thumb { aspect-ratio: 16/9; background: var(--bg); overflow: hidden; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-thumb--empty { background: linear-gradient(135deg, rgba(237,75,155,.22), rgba(37,37,37,.4)); }
.article-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.article-meta { display: flex; gap: 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.article-card h3 { font-size: 17px; font-weight: 700; color: var(--heading); line-height: 1.35; }
.article-excerpt { font-size: 14px; line-height: 1.55; }

/* Pagination (anchor links styled as buttons) */
.pagination { margin-top: 48px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pag-btn { min-width: 40px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--surface); color: var(--body); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s, color .15s; }
.pag-btn:hover { border-color: rgba(237,75,155,.5); color: var(--heading); }
.pag-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pag-btn.disabled { color: var(--muted); opacity: .5; cursor: not-allowed; }

/* Article header */
.article-header { background: radial-gradient(ellipse 70% 130% at 50% -30%, rgba(237,75,155,.14), transparent 65%); padding: 40px 0 28px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--heading); }
.article-header h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 700; color: var(--heading); line-height: 1.1; letter-spacing: -.02em; max-width: 820px; }
.article-subtitle { font-size: 18px; margin-top: 16px; max-width: 720px; line-height: 1.6; }
.article-meta-row { display: flex; gap: 16px; margin-top: 20px; font-size: 13px; color: var(--muted); font-weight: 600; }
.article-author { color: var(--accent); }

/* Prose */
.article-section { padding: 40px 0 80px; }
.prose { max-width: 720px; color: var(--prose-text); font-size: 17px; line-height: 1.75; }
.prose p { margin-bottom: 22px; }
.prose h2 { font-size: clamp(23px, 2.4vw, 29px); font-weight: 700; color: var(--heading); margin: 44px 0 16px; line-height: 1.25; }
.prose h3 { font-size: 21px; font-weight: 700; color: var(--heading); margin: 30px 0 12px; }
.prose h4 { font-size: 18px; font-weight: 700; color: var(--heading); margin: 24px 0 10px; }
.prose strong { color: var(--heading); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.prose a:hover { color: var(--accent-hover); }
.prose ul, .prose ol { margin: 18px 0 22px; padding-left: 24px; }
.prose li { margin-bottom: 10px; }
.prose img { border-radius: 14px; margin: 28px 0; }
.prose figure { margin: 28px 0; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
.prose code { background: var(--surface); padding: 2px 6px; border-radius: 5px; font-size: .9em; color: #E4E4EA; }
.prose pre { background: var(--surface); border: 1px solid var(--stroke); color: #E4E4EA; padding: 18px; border-radius: 12px; overflow-x: auto; margin: 24px 0; }
.prose pre code { background: none; padding: 0; }

/* Component: pull quote */
.pull-quote { margin: 32px 0; padding: 28px 32px; background: linear-gradient(135deg, rgba(237,75,155,.10), rgba(237,75,155,.03)); border-left: 4px solid var(--accent); border-radius: 0 14px 14px 0; }
.pull-quote p { font-size: 20px; font-weight: 600; color: var(--heading); font-style: italic; line-height: 1.45; margin: 0; }
.pull-quote-cite { margin-top: 12px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }

/* Component: stats callout */
.stats-callout { margin: 32px 0; border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden; background: var(--surface); }
.stats-callout-head { background: rgba(253,253,253,.04); border-bottom: 1px solid var(--stroke); padding: 14px 20px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--heading); }
.stats-callout-label { font-weight: 700; }
.stats-callout-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats-callout-cell { padding: 22px; text-align: center; border-right: 1px solid var(--stroke); }
.stats-callout-cell:last-child { border-right: none; }
.scc-num { font-size: 30px; font-weight: 700; color: var(--accent); }
.scc-label { font-size: 12px; margin-top: 6px; }

/* Component: numbered list */
.numbered-list { margin: 32px 0; display: flex; flex-direction: column; gap: 14px; list-style: none; padding: 0; }
.numbered-item { border: 1px solid var(--stroke); background: var(--surface); border-radius: 14px; padding: 22px 24px; display: flex; gap: 18px; align-items: flex-start; list-style: none; }
.numbered-circle { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.numbered-body h4 { font-size: 16px; font-weight: 700; color: var(--heading); margin: 0 0 6px; }
.numbered-body p { font-size: 14.5px; margin: 0; line-height: 1.6; }

/* Component: image break caption */
.image-break { margin: 32px 0; border-radius: 16px; overflow: hidden; }
.image-break-caption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }

/* Component: inline CTA */
.article-cta-box { margin: 44px 0; background: linear-gradient(135deg, rgba(237,75,155,.16), rgba(252,55,111,.05)); border: 1px solid rgba(237,75,155,.3); border-radius: 18px; padding: 32px; color: #fff; box-shadow: 0 0 32px rgba(237,75,155,.12); }
.article-cta-text h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.article-cta-text p { font-size: 14px; color: rgba(253,253,253,.7); margin: 0; }

/* Component: tags */
.article-tags { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--stroke); display: flex; gap: 10px; flex-wrap: wrap; }
.article-tag { font-size: 12px; font-weight: 600; color: var(--accent); background: rgba(237,75,155,.08); border: 1px solid rgba(237,75,155,.3); padding: 6px 12px; border-radius: 100px; }

/* 404 */
.blog-404 { text-align: center; padding: 96px 0; }
.blog-404 h1 { font-size: 72px; font-weight: 700; color: var(--accent); text-shadow: 0 0 40px rgba(237,75,155,.35); }
.blog-404 p { margin: 12px 0 28px; color: var(--muted); }

/* Responsive */
@media (max-width: 900px) { .articles-grid { grid-template-columns: 1fr 1fr; } .stats-callout-grid { grid-template-columns: 1fr; } .stats-callout-cell { border-right: none; border-bottom: 1px solid var(--stroke); } .stats-callout-cell:last-child { border-bottom: none; } }
@media (max-width: 600px) { .articles-grid { grid-template-columns: 1fr; } .prose { font-size: 16px; } .numbered-item { flex-direction: column; gap: 12px; } }
