@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #10140e;
  --bg-alt: #151a11;
  --surface: #1b2116;
  --surface-2: #21281a;
  --border: rgba(240, 240, 225, 0.1);
  --text: #f2efe2;
  --text-muted: #a6a894;
  --accent: #2d9b45;
  --accent-light: #4fc267;
  --accent-text: #10140e;
  --radius: 4px;
  --content-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.55;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 20, 14, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
}

.logo span { color: var(--accent-light); }

.logo img { height: 42px; width: auto; display: block; }

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .15s ease, border-color .15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  border-color: var(--accent-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #f6f7ef;
  transition: background .15s ease;
}
.btn-primary:hover { background: var(--accent-light); }

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent-light); color: var(--accent-light); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,13,8,0.94) 20%, rgba(10,13,8,0.55) 60%, rgba(10,13,8,0.25) 100%);
}

.hero .wrap {
  position: relative;
  width: 100%;
}

.hero-content {
  max-width: 560px;
  padding: 40px 0;
}

.eyebrow {
  color: var(--accent-light);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.1rem);
  color: #fff;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: 28px;
}

/* ---------- Feature sections (Denkfabrik / Labor) ---------- */

.feature {
  padding: 88px 0;
  border-top: 1px solid var(--border);
}

.feature .wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
}

.feature.reverse .wrap { direction: rtl; }
.feature.reverse .wrap > * { direction: ltr; }

.feature-media img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.feature-body h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

.feature-body p.lead {
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 24px;
}

.feature-list {
  margin-top: 28px;
  border-top: 1px solid var(--border);
}

.feature-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.feature-list-item strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
}

.feature-list-item span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.feature-list-item .arrow {
  color: var(--accent-light);
  font-size: 1.2rem;
}

/* ---------- Content grid (Aktuelle Inhalte) ---------- */

.content-section {
  padding: 88px 0 100px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  gap: 24px;
  flex-wrap: wrap;
}

.filter-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-tags a {
  font-size: 0.85rem;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.filter-tags a.active,
.filter-tags a:hover {
  color: var(--text);
  border-color: var(--accent-light);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-media {
  aspect-ratio: 4/3;
  background: var(--surface-2) center/cover no-repeat;
}

.card-body {
  padding: 18px 18px 22px;
}

.card-tag {
  font-size: 0.75rem;
  color: var(--accent-light);
  margin-bottom: 8px;
  display: block;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.center-cta { text-align: center; margin-top: 48px; }

/* ---------- Article / detail page ---------- */

.page-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
}

.article-body {
  max-width: 72ch;
  margin: 0 auto;
  padding: 56px 28px 100px;
}

.article-body img { border-radius: var(--radius); margin: 24px 0; }
.article-body p { margin: 0 0 1.2em; }
.article-body h2 { margin-top: 1.6em; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-grid h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 500;
}

.footer-grid a, .footer-grid p {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.footer-grid a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Admin ---------- */

.admin-shell { min-height: 100vh; background: var(--bg); }
.admin-topbar {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.admin-topbar .wrap { display: flex; justify-content: space-between; align-items: center; }
.admin-main { padding: 40px 0 80px; }

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 720px;
}

.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: var(--text-muted); }
.field input[type=text],
.field input[type=password],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.field textarea { min-height: 260px; resize: vertical; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.admin-table th { color: var(--text-muted); font-weight: 500; }

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.9rem;
}
.flash.ok { background: rgba(107,122,74,0.2); border: 1px solid var(--accent); }
.flash.error { background: rgba(180,80,70,0.15); border: 1px solid #b45046; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-block; }
  .feature .wrap { grid-template-columns: 1fr; }
  .feature.reverse .wrap { direction: ltr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .card-grid { grid-template-columns: 1fr; }
}
