/* ===================================================================
   Filialhelden Design System v1
   Substack-Clean Style — Spectral + Outfit + DM Sans + Space Mono
   Include: <link rel="stylesheet" href="/fh-design-system.css">
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700&family=Space+Mono:wght@400;700&family=Outfit:wght@300;400;500;600;700;800;900&family=Spectral:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* --- Design Tokens --- */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --bg-accent: #f3efe8;
  --border: #e8e8e8;
  --border-light: #f0f0f0;

  --text-primary: #1a1a1a;
  --text-body: #333333;
  --text-secondary: #666666;
  --text-muted: #ababab;

  --brand: #c4956a;
  --brand-dark: #a87d55;
  --brand-bg: #faf5ef;
  --brand-light: #f7f0e8;

  --radius: 8px;
  --radius-sm: 6px;

  --max-width: 680px;
  --max-width-wide: 1120px;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* --- Base --- */
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
.fh-serif { font-family: 'Spectral', Georgia, serif; }
.fh-heading { font-family: 'Outfit', sans-serif; }
.fh-mono { font-family: 'Space Mono', monospace; }

h1, h2, h3 { font-family: 'Spectral', Georgia, serif; font-weight: 700; line-height: 1.2; }
h1 { font-size: 40px; letter-spacing: -0.5px; }
h2 { font-size: 32px; letter-spacing: -0.3px; }
h3 { font-size: 24px; }

p { color: var(--text-body); font-size: 17px; line-height: 1.75; }

a { color: var(--brand); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brand-dark); }

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

/* --- Header --- */
.fh-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.fh-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.fh-logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.fh-logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.3px;
}

.fh-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.fh-header-right a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.fh-header-right a:hover { color: var(--text-primary); }

/* --- Buttons --- */
.btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-primary:hover { background: var(--brand-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 22px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

/* --- Newsletter Form --- */
.subscribe-box {
  display: flex;
  gap: 10px;
  max-width: 420px;
}

.subscribe-box input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 18px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.subscribe-box input:focus { border-color: var(--brand); }

.subscribe-box button {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.subscribe-box button:hover { background: var(--brand-dark); }

/* --- Tags --- */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brand);
}

.tag-pill {
  background: var(--brand-light);
  padding: 4px 10px;
  border-radius: 6px;
}

/* --- Divider --- */
.divider {
  max-width: var(--max-width);
  margin: 48px auto;
  padding: 0 24px;
}

.divider hr {
  border: none;
  height: 1px;
  background: var(--border);
}

/* --- Article Content (for article pages) --- */
.article-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.article-content h2 {
  margin-top: 48px;
  margin-bottom: 20px;
  font-size: 28px;
}

.article-content h3 {
  margin-top: 36px;
  margin-bottom: 16px;
  font-size: 22px;
}

.article-content p {
  margin-bottom: 24px;
}

.article-content ul, .article-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.75;
}

.article-content li { margin-bottom: 8px; }

.article-content blockquote {
  border-left: 3px solid var(--brand);
  padding-left: 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 18px;
}

.article-content strong { color: var(--text-primary); }

.article-content img {
  width: 100%;
  border-radius: var(--radius);
  margin: 32px 0;
}

.article-content .source {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Footer --- */
.fh-footer {
  max-width: var(--max-width);
  margin: 48px auto 0;
  padding: 24px 24px 56px;
  text-align: center;
}

.fh-footer-links {
  margin-bottom: 12px;
}

.fh-footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 12px;
}

.fh-footer-links a:hover { color: var(--brand); }

.fh-footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--text-primary);
  color: rgba(255,255,255,0.8);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 14px;
  z-index: 1000;
}

.cookie-banner.hidden { display: none; }

.cookie-banner button {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

/* --- Topic Nav (Substack-style category bar) --- */
.topic-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.topic-nav a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.topic-nav a:hover {
  color: var(--text-primary);
  border-color: var(--border);
}

.topic-nav a.active {
  color: var(--text-primary);
  background: var(--bg-soft);
  border-color: var(--border);
}

/* --- Post Card (for archive/lists) --- */
.post-card {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.post-card:hover { opacity: 0.8; }

.post-card-body { flex: 1; }

.post-card-title {
  font-family: 'Spectral', Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 8px;
}

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.post-card-meta span {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
}

.post-card-img {
  width: 140px;
  height: 140px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
  align-self: center;
}

/* --- Section Headers --- */
.section-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.section-header a {
  font-size: 13px;
  font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root { --max-width: 100%; }
  .fh-header { padding: 24px 20px 20px; }
  .fh-header-right a { display: none; }
  .container { padding: 0 20px; }
  .divider { padding: 0 20px; margin: 36px auto; }
  h1 { font-size: 30px; }
  h2 { font-size: 26px; }
  p { font-size: 16px; }
  .subscribe-box { flex-direction: column; max-width: 100%; }
  .fh-footer { padding: 24px 20px 40px; }
  .cookie-banner { flex-direction: column; gap: 12px; text-align: center; }
  .topic-nav { padding: 12px 20px; gap: 6px; }
  .topic-nav a { font-size: 12px; padding: 5px 12px; }
  .post-card { gap: 16px; }
  .post-card-img { width: 100px; height: 100px; }
  .post-card-title { font-size: 19px; }
}
