/* ── Velopit Blog — CSS ── */
/* Dark nav/footer (brand-consistent), light article body (readability) */
/* No framework — optimized for SEO page speed */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  /* Brand — aligned with landing page design tokens */
  --velopit-bg: #0f172a;
  --velopit-primary: #3b82f6;
  --velopit-gradient-end: #3FD3A4;
  --velopit-nav-bg: #1e293b;
  --velopit-border: #334155;
  /* Article (light) */
  --article-bg: #ffffff;
  --article-text: #1e293b;
  --article-heading: #0f172a;
  --article-subtle: #64748b;
  --article-border: #e2e8f0;
  --article-code-bg: #f1f5f9;
  /* Layout */
  --content-width: 740px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  font-family: var(--font);
  background: var(--velopit-bg);
  color: #a1a1aa;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ── Navigation ── */
.blog-nav {
  background: var(--velopit-nav-bg);
  border-bottom: 1px solid var(--velopit-border);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.blog-nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.blog-nav-logo img {
  height: 1.5rem;
  width: auto;
}
.blog-nav-logo .sep {
  width: 1px;
  height: 1rem;
  background: #27272a;
}
.blog-nav-logo .label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #52525b;
}
.blog-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--velopit-primary);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.blog-nav-cta:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

/* ── Article Body (Light Mode) ── */
.blog-article-wrapper {
  background: var(--article-bg);
}
.blog-article {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  color: var(--article-text);
}

/* ── Meta Info ── */
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--article-subtle);
  margin-bottom: 1.5rem;
}
.blog-meta .dot { color: #cbd5e1; }
.blog-reading-time {
  background: #f1f5f9;
  padding: 0.1875rem 0.625rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.blog-category-badge {
  background: var(--velopit-primary);
  color: #fff;
  padding: 0.1875rem 0.625rem;
  border-radius: 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Headings ── */
.blog-article h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--article-heading);
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
}
.blog-article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--article-heading);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}
.blog-article h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--article-heading);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* ── Text ── */
.blog-article p {
  margin: 1rem 0;
  font-size: 1.0625rem;
  line-height: 1.8;
}
.blog-article strong {
  color: var(--article-heading);
  font-weight: 600;
}

/* ── Lists ── */
.blog-article ul, .blog-article ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}
.blog-article li {
  margin: 0.5rem 0;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.blog-article ul li::marker {
  color: var(--velopit-primary);
}

/* ── Links ── */
.blog-article a {
  color: var(--velopit-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.blog-article a:hover {
  color: #4A68E0;
}

/* ── Images ── */
.blog-article img {
  border-radius: 0.75rem;
  margin: 2rem 0;
  border: 1px solid var(--article-border);
}
.blog-article figcaption {
  font-size: 0.8125rem;
  color: var(--article-subtle);
  text-align: center;
  margin-top: -1rem;
  margin-bottom: 2rem;
}

/* ── Code ── */
.blog-article code {
  background: var(--article-code-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.blog-article pre {
  background: var(--article-code-bg);
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--article-border);
}
.blog-article pre code {
  background: none;
  padding: 0;
}

/* ── Blockquote ── */
.blog-article blockquote {
  border-left: 3px solid var(--velopit-primary);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: #f8fafc;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--article-subtle);
}

/* ── Table of Contents ── */
.blog-toc {
  background: #f8fafc;
  border: 1px solid var(--article-border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.blog-toc strong {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--article-subtle);
}
.blog-toc ol {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}
.blog-toc li {
  font-size: 0.9375rem;
  margin: 0.375rem 0;
}
.blog-toc a {
  color: var(--velopit-primary);
  text-decoration: none;
}
.blog-toc a:hover {
  text-decoration: underline;
}

/* ── Info Box ── */
.blog-info-box {
  background: #f0f4ff;
  border: 1px solid #c7d2fe;
  border-left: 4px solid var(--velopit-primary);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.blog-info-box strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--article-heading);
}
.blog-info-box ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}
.blog-info-box li {
  font-size: 0.9375rem;
  margin: 0.375rem 0;
}
.blog-info-box p {
  font-size: 0.9375rem;
  margin: 0.5rem 0 0;
  color: var(--article-subtle);
}
.blog-info-warning {
  background: #fffbeb;
  border-color: #fcd34d;
  border-left-color: #f59e0b;
}

/* ── CTA Box ── */
.blog-cta-box {
  background: linear-gradient(135deg, var(--velopit-primary), var(--velopit-gradient-end));
  color: #fff;
  padding: 2.5rem;
  border-radius: 1rem;
  text-align: center;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}
.blog-cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.blog-cta-box h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
  border: none;
  padding: 0;
}
.blog-cta-box p {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  margin: 0 0 1.25rem;
  line-height: 1.6;
}
.blog-cta-btn {
  display: inline-block;
  background: #fff;
  color: var(--velopit-primary);
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  color: var(--velopit-primary);
}

/* ── Related Articles ── */
.blog-related {
  border-top: 1px solid var(--article-border);
  padding-top: 2rem;
  margin-top: 3rem;
}
.blog-related strong {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--article-subtle);
}
.blog-related ul {
  margin-top: 0.75rem;
  list-style: none;
  padding: 0;
}
.blog-related li {
  margin: 0.5rem 0;
}
.blog-related a {
  font-weight: 500;
}

/* ── Blog Index — Article Cards ── */
.blog-hero {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
  text-align: center;
}
.blog-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}
.blog-hero p {
  font-size: 1.0625rem;
  color: #94a3b8;
  max-width: 32rem;
  margin: 0 auto;
  line-height: 1.7;
}

.blog-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  gap: 1.5rem;
}

.blog-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  padding: 1.75rem;
  text-decoration: none;
  display: block;
  transition: border-color 0.3s, transform 0.2s, box-shadow 0.3s;
}
.blog-card:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.blog-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.blog-card p {
  font-size: 0.9375rem;
  color: #94a3b8;
  line-height: 1.6;
}
.blog-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--velopit-primary);
  transition: gap 0.2s;
}
.blog-card:hover .blog-card-arrow {
  gap: 0.5rem;
}

/* ── Empty State (no articles yet) ── */
.blog-empty {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  text-align: center;
}
.blog-empty p {
  color: #52525b;
  font-size: 1rem;
}

/* ── Footer (matches PublicFooter.tsx) ── */
.blog-footer {
  background: var(--velopit-nav-bg);
  border-top: 1px solid var(--velopit-border);
  padding: 3rem 1.5rem;
}
.blog-footer-inner {
  max-width: 72rem; /* max-w-6xl */
  margin: 0 auto;
}

/* 4-column grid */
.blog-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .blog-footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

/* Brand column */
.blog-footer-brand {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
@media (min-width: 768px) {
  .blog-footer-brand {
    grid-column: span 1;
  }
}
.blog-footer-logo {
  height: 1.75rem;
  width: auto;
  display: block;
  object-fit: contain;
}
.blog-footer-social {
  display: flex;
  gap: 0.75rem;
}
.blog-footer-social-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--velopit-border);
  color: #64748b;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.blog-footer-social-btn:hover {
  background: rgba(255,255,255,0.04);
  color: #94a3b8;
}
.blog-footer-social-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Footer columns */
.blog-footer-col h5 {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  margin: 0 0 0.75rem;
  letter-spacing: 0.01em;
}
.blog-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-footer-col li {
  padding: 0.75rem 0;
  font-size: 0.875rem;
  line-height: 1;
}
.blog-footer-col a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}
.blog-footer-col a:hover {
  color: #e2e8f0;
}

/* Disabled link (e.g. "Werkstätten — Demnächst") */
.blog-footer-disabled {
  color: #334155;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.blog-footer-badge {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  border: 1px solid var(--velopit-border);
  color: #334155;
  background: rgba(255,255,255,0.03);
}

/* Bottom bar */
.blog-footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--velopit-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.blog-footer-copy {
  font-size: 0.75rem;
  color: #334155;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.blog-footer-strava {
  height: 1.25rem;
  width: auto;
  opacity: 0.4;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .blog-article { padding: 2rem 1rem 3rem; }
  .blog-article h1 { font-size: 1.5rem; }
  .blog-article h2 { font-size: 1.25rem; }
  .blog-cta-box { padding: 1.75rem 1.25rem; }
  .blog-hero { padding: 2rem 1rem 1rem; }
  .blog-grid { padding: 1.5rem 1rem 3rem; }
  .blog-card { padding: 1.25rem; }
  .blog-nav-cta { padding: 0.4375rem 0.875rem; font-size: 0.75rem; }
}
