/* =============================================================
   FLOWAGENTEN BLOG-ARCHIVE — Apple-Light Kachelansicht v1
   Lädt nur auf is_home() / is_archive() / is_category().
   Wrapper: .flow-blog-archive — alle Regeln darunter gescopet.

   Token-Erbe: blog-article.css (--bg-base, --accent, --mint, etc.)
   ============================================================= */

/* Wir nutzen dieselben :root-Variablen wie blog-article.css.
   Falls blog-archive.css einmal SOLO geladen wird (z.B. bei archive
   ohne single-Aufruf), definieren wir die Tokens nochmal. */
:root {
  --bg-base:        #F7F5F1;
  --bg-soft:        #FBFAF7;
  --surface:        #FFFFFF;
  --surface-alt:    #F2EFEA;
  --accent:         #8A7A12;
  --accent-dark:    #6E5E0E;
  --accent-soft:    #FFFBD6;
  --mint:           #DDF4E7;
  --peach:          #FFE7DA;
  --lavender:       #E8E2F7;
  --sky:            #DCEEFA;
  --rose:           #FFE0E9;
  --lime:           #E8F2C9;
  --t1:             #0F0F10;
  --t2:             #4A4F57;
  --t3:             #8A8F98;
  --border:         rgba(15, 15, 16, 0.08);
  --border-strong:  rgba(15, 15, 16, 0.14);
  --shadow-sm:      0 1px 2px rgba(15, 15, 16, 0.04);
  --shadow-md:      0 4px 16px rgba(15, 15, 16, 0.06);
  --shadow-lg:      0 12px 36px rgba(15, 15, 16, 0.08);
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --font:           'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease:           cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:    cubic-bezier(0.4, 0, 0.2, 1);
  --dur:            220ms;
}

.flow-blog-archive,
.flow-blog-archive * { box-sizing: border-box; }

.flow-blog-archive {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--t1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

.flow-blog-archive a { color: inherit; text-decoration: none; }

/* =============================================================
   HERO
   ============================================================= */
.flow-blog-archive .arch-hero {
  padding: 132px 32px 56px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-soft) 100%);
}
.flow-blog-archive .arch-hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--mint), transparent);
  opacity: 0.7;
  z-index: 0;
}
.flow-blog-archive .arch-hero::after {
  content: '';
  position: absolute;
  bottom: -300px; left: -200px;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--sky), transparent);
  opacity: 0.5;
  z-index: 0;
}
.flow-blog-archive .arch-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.flow-blog-archive .arch-hero__eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.flow-blog-archive .arch-hero__title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--t1);
  margin: 0 0 16px;
}
.flow-blog-archive .arch-hero__subtitle {
  font-size: 20px;
  color: var(--t2);
  line-height: 1.5;
  max-width: 680px;
  margin: 0;
}

/* =============================================================
   KATEGORIE-FILTER
   ============================================================= */
.flow-blog-archive .arch-filter {
  padding: 32px 32px 0;
  background: var(--bg-soft);
}
.flow-blog-archive .arch-filter__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.flow-blog-archive .arch-filter__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 12px;
}
.flow-blog-archive .arch-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--t2);
  cursor: pointer;
  transition: all var(--dur) var(--ease-smooth);
  white-space: nowrap;
}
.flow-blog-archive .arch-pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
  color: var(--t1);
}
.flow-blog-archive .arch-pill.is-active {
  background: var(--t1);
  color: white;
  border-color: var(--t1);
}
.flow-blog-archive .arch-pill__count {
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.7;
}

/* =============================================================
   GRID (Kachelansicht)
   ============================================================= */
.flow-blog-archive .arch-grid-wrap {
  padding: 40px 32px 96px;
  background: var(--bg-soft);
}
.flow-blog-archive .arch-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.flow-blog-archive .arch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}
.flow-blog-archive .arch-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.flow-blog-archive .arch-card.is-hidden {
  display: none;
}

/* Card-Image-Block (16:10 Aspect, Featured Image ODER Fallback-Gradient) */
.flow-blog-archive .arch-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-alt);
}
.flow-blog-archive .arch-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-smooth);
}
.flow-blog-archive .arch-card:hover .arch-card__image img {
  transform: scale(1.04);
}

/* Fallback wenn kein Featured Image — Pastell-Verlauf + Cluster-Initial */
.flow-blog-archive .arch-card__image--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.flow-blog-archive .arch-card__image--fallback::before {
  content: '';
  position: absolute;
  top: -30%; left: -30%;
  width: 70%; height: 70%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  opacity: 0.85;
}
.flow-blog-archive .arch-card__image--fallback::after {
  content: '';
  position: absolute;
  bottom: -30%; right: -30%;
  width: 80%; height: 80%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--lavender), transparent);
  opacity: 0.7;
}
.flow-blog-archive .arch-card__image-letter {
  position: relative;
  z-index: 1;
  font-size: 56px;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -0.04em;
  opacity: 0.6;
}

/* Cluster-spezifische Fallback-Hintergründe */
.flow-blog-archive .arch-card--mint    .arch-card__image--fallback { background: var(--mint); }
.flow-blog-archive .arch-card--peach   .arch-card__image--fallback { background: var(--peach); }
.flow-blog-archive .arch-card--lavender .arch-card__image--fallback { background: var(--lavender); }
.flow-blog-archive .arch-card--sky     .arch-card__image--fallback { background: var(--sky); }
.flow-blog-archive .arch-card--rose    .arch-card__image--fallback { background: var(--rose); }
.flow-blog-archive .arch-card--lime    .arch-card__image--fallback { background: var(--lime); }

/* Card-Body */
.flow-blog-archive .arch-card__body {
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.flow-blog-archive .arch-card__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: 999px;
  align-self: flex-start;
  margin-bottom: 14px;
}
.flow-blog-archive .arch-card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--t1);
  margin: 0 0 10px;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.flow-blog-archive .arch-card__excerpt {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.55;
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.flow-blog-archive .arch-card__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--t3);
}
.flow-blog-archive .arch-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.flow-blog-archive .arch-card__dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--t3);
  opacity: 0.5;
}
.flow-blog-archive .arch-card__more {
  font-weight: 600;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--dur) var(--ease-smooth);
}
.flow-blog-archive .arch-card:hover .arch-card__more {
  gap: 8px;
}

/* =============================================================
   EMPTY STATE (nach Filter ohne Treffer)
   ============================================================= */
.flow-blog-archive .arch-empty {
  grid-column: 1 / -1;
  padding: 64px 24px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px dashed var(--border-strong);
  color: var(--t2);
}
.flow-blog-archive .arch-empty__icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.flow-blog-archive .arch-empty__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--t1);
  margin: 0 0 6px;
}
.flow-blog-archive .arch-empty__text {
  font-size: 14px;
  margin: 0;
}

/* =============================================================
   PAGINATION
   ============================================================= */
.flow-blog-archive .arch-pagination {
  max-width: 1200px;
  margin: 56px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.flow-blog-archive .arch-pagination a,
.flow-blog-archive .arch-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--t2);
  transition: all var(--dur) var(--ease-smooth);
}
.flow-blog-archive .arch-pagination a:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  color: var(--t1);
}
.flow-blog-archive .arch-pagination .current {
  background: var(--t1);
  color: white;
  border-color: var(--t1);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 980px) {
  .flow-blog-archive .arch-grid { grid-template-columns: repeat(2, 1fr); gap: 44px; }
  .flow-blog-archive .arch-hero { padding: 108px 24px 48px; }
  .flow-blog-archive .arch-filter { padding: 24px 24px 0; }
  .flow-blog-archive .arch-grid-wrap { padding: 32px 24px 72px; }
}
@media (max-width: 640px) {
  .flow-blog-archive .arch-grid { grid-template-columns: 1fr; gap: 40px; }
  .flow-blog-archive .arch-hero { padding: 96px 20px 40px; }
  .flow-blog-archive .arch-filter { padding: 20px 20px 0; }
  .flow-blog-archive .arch-grid-wrap { padding: 28px 20px 60px; }
  .flow-blog-archive .arch-card__body { padding: 20px; }
}

/* =============================================================
   FADE-UP Animation beim Scroll-In
   ============================================================= */
@keyframes archFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.flow-blog-archive .arch-card {
  animation: archFadeUp 480ms var(--ease-smooth) backwards;
}
.flow-blog-archive .arch-card:nth-child(1) { animation-delay: 40ms; }
.flow-blog-archive .arch-card:nth-child(2) { animation-delay: 80ms; }
.flow-blog-archive .arch-card:nth-child(3) { animation-delay: 120ms; }
.flow-blog-archive .arch-card:nth-child(4) { animation-delay: 160ms; }
.flow-blog-archive .arch-card:nth-child(5) { animation-delay: 200ms; }
.flow-blog-archive .arch-card:nth-child(6) { animation-delay: 240ms; }
.flow-blog-archive .arch-card:nth-child(7) { animation-delay: 280ms; }
.flow-blog-archive .arch-card:nth-child(8) { animation-delay: 320ms; }
.flow-blog-archive .arch-card:nth-child(9) { animation-delay: 360ms; }
