/* ============================================================
   Albrecht-KI Blog – Stylesheet
   Design-Tokens identisch zur Hauptseite (index.html)
   ============================================================ */

/* --- Tokens ------------------------------------------------- */
:root {
  --sand-50:   #fbf8f1;
  --sand-100:  #f5efe0;
  --sand-200:  #ede3cc;
  --sand-300:  #ddcfa8;
  --ink-900:   #1a1814;
  --ink-700:   #3a362e;
  --ink-500:   #6b6557;
  --ink-300:   #9c9586;
  --accent:    #1e4076;
  --accent-soft: #e8eef7;
  --gold:      #9a7a2e;
  --gold-soft: #f4ecd6;
  --success:   #4a7c3f;
  --success-soft: #e8efd9;
  --font-display: Georgia,'Palatino Linotype',Palatino,'Book Antiqua',serif;
  --font-body: -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,Arial,sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-soft: 0 1px 2px rgba(26,24,20,.04),0 4px 12px rgba(26,24,20,.04);
  --shadow-card: 0 2px 8px rgba(26,24,20,.06),0 12px 32px rgba(26,24,20,.05);
  --container:  1200px;
}

/* --- Reset --------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* --- Layout -------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink-900);
  letter-spacing: -.02em;
  line-height: 1.1;
}

/* --- Eyebrow Badge ------------------------------------------ */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

/* --- Button -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .25s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--ink-900);
  color: var(--sand-50);
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,64,118,.25);
}
.btn-gold {
  background: var(--gold);
  color: var(--ink-900);
}
.btn-gold:hover {
  background: var(--ink-900);
  color: var(--sand-50);
  transform: translateY(-2px);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251,248,241,.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(26,24,20,.06);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { height: 38px; width: auto; object-fit: contain; display: block; }
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-cta {
  background: var(--ink-900);
  color: var(--sand-50);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s ease;
}
.nav-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink-900);
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--sand-50);
  z-index: 200;
  flex-direction: column;
  padding: 24px;
}
.mobile-menu.open { display: flex; }
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.mobile-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-900);
  padding: 8px;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu nav a {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--ink-900);
  padding: 10px 0;
  border-bottom: 1px solid rgba(26,24,20,.06);
  transition: color .2s ease;
}
.mobile-menu nav a:hover { color: var(--gold); }
.mobile-menu .mobile-cta { margin-top: 32px; }
.mobile-menu .btn { width: 100%; justify-content: center; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .mobile-toggle { display: block; }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--sand-100);
  padding: 60px 0 30px;
  border-top: 1px solid rgba(26,24,20,.08);
}
.footer-logo img { height: 48px; width: auto; margin-bottom: 14px; filter: brightness(.92); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-about p {
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.6;
  max-width: 320px;
}
.footer-col h5 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li a {
  color: var(--ink-500);
  font-size: 14px;
  line-height: 2;
  transition: color .2s ease;
}
.footer-col li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(26,24,20,.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-500);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
}

/* ============================================================
   BLOG HERO
   ============================================================ */
.blog-hero {
  padding: 80px 0 60px;
  background: linear-gradient(160deg, var(--sand-100) 0%, var(--sand-50) 60%);
  border-bottom: 1px solid var(--sand-200);
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(154,122,46,.1) 0, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.blog-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.blog-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 18px;
}
.blog-hero p {
  font-size: 1.1rem;
  color: var(--ink-500);
  line-height: 1.65;
  max-width: 540px;
}

/* ============================================================
   FILTER TABS
   ============================================================ */
.blog-filter {
  padding: 28px 0;
  border-bottom: 1px solid var(--sand-200);
  background: var(--sand-50);
  position: sticky;
  top: 65px;
  z-index: 90;
}
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--sand-200);
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-500);
  cursor: pointer;
  transition: all .2s ease;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============================================================
   POSTS GRID + CARDS
   ============================================================ */
.blog-main {
  padding: 56px 0 80px;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-card {
  background: var(--sand-50);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.blog-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.card-readtime {
  font-size: 12px;
  color: var(--ink-300);
  font-weight: 500;
  white-space: nowrap;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink-900);
  line-height: 1.25;
}
.card-teaser {
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.6;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--sand-200);
  margin-top: auto;
}
.card-date {
  font-size: 12px;
  color: var(--ink-300);
}
.card-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  transition: gap .2s ease, color .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-link:hover {
  color: var(--gold);
  gap: 8px;
}

/* --- Loading / Empty state --- */
.blog-loading,
.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--ink-300);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; gap: 20px; }
  .blog-filter { top: 61px; }
}

/* ============================================================
   POST HERO IMAGE
   ============================================================ */
.post-hero-img {
  width: 100%;
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  max-width: 720px;
  background: var(--sand-200);
}
.post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.post-hero-img:hover img { transform: scale(1.02); }

/* ============================================================
   POST DETAIL PAGE
   ============================================================ */
.post-page { padding: 56px 0 80px; }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-500);
  margin-bottom: 40px;
  transition: color .2s ease;
}
.post-back:hover { color: var(--accent); }

.post-header { max-width: 760px; margin-bottom: 40px; }
.post-header .eyebrow { margin-bottom: 16px; }
.post-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 18px;
  line-height: 1.1;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-300);
  margin-bottom: 20px;
}
.meta-sep { opacity: .5; }
.post-lead {
  font-size: 1.1rem;
  color: var(--ink-500);
  line-height: 1.7;
  max-width: 680px;
  font-style: italic;
  font-family: var(--font-display);
  border-left: 3px solid var(--gold);
  padding-left: 20px;
}

.post-divider {
  max-width: 760px;
  border: none;
  border-top: 1px solid var(--sand-200);
  margin: 36px 0;
}

/* ============================================================
   PROSE (Article Content)
   ============================================================ */
.prose {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-700);
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--ink-900);
  margin: 2.5rem 0 1rem;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 2rem 0 .75rem;
}
.prose h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 .5rem;
  letter-spacing: .01em;
}
.prose p { margin-bottom: 1.4rem; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--gold); }
.prose strong { font-weight: 600; color: var(--ink-900); }
.prose em { font-style: italic; }
.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}
.prose li { margin-bottom: .4rem; }
.prose blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 20px;
  margin: 1.8rem 0;
  color: var(--ink-500);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
}
.prose blockquote p { margin-bottom: 0; }
.prose code {
  background: var(--sand-200);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
  font-family: 'Courier New', monospace;
}
.prose pre {
  background: var(--ink-900);
  color: var(--sand-100);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 1.6rem;
}
.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: .88rem;
}
.prose img {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 1.6rem 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.6rem;
  font-size: .95rem;
}
.prose th, .prose td {
  padding: 10px 14px;
  border: 1px solid var(--sand-200);
  text-align: left;
}
.prose th {
  background: var(--sand-100);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-700);
}
.prose hr {
  border: none;
  border-top: 1px solid var(--sand-200);
  margin: 2rem 0;
}

/* ============================================================
   POST CTA BANNER
   ============================================================ */
.post-cta {
  background: var(--ink-900);
  color: var(--sand-100);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.post-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 50%, rgba(154,122,46,.2) 0, transparent 40%),
              radial-gradient(circle at 85% 50%, rgba(30,64,118,.25) 0, transparent 40%);
}
.post-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
}
.post-cta .eyebrow {
  background: rgba(154,122,46,.2);
  color: var(--sand-300, #ddcfa8);
  border: 1px solid rgba(154,122,46,.3);
}
.post-cta h2 {
  color: var(--sand-50);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 14px;
}
.post-cta p {
  color: rgba(251,248,241,.75);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 28px;
}
.post-cta-note {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(251,248,241,.45);
}

/* ============================================================
   Utility
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp .5s ease-out both; }
