/*
Theme Name: CPF Katalog
Theme URI: https://crowdfunding-plattformen.de/
Author: Crowdfunding-Plattformen.de Redaktion
Description: Editorial Bauhaus marketplace catalog for crowdfunding taxonomy and platform selection.
Version: 1.0.7
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: cpf-katalog
*/

:root {
  --paper: #f5f0e6;
  --paper-2: #ebe4d6;
  --ink: #171717;
  --red: #cf3f2f;
  --blue: #245ba7;
  --yellow: #d9a52f;
  --green: #2e6b55;
  --line: #bdb5a6;
  --white: #fffdf8;
  --max: 1240px;
  --measure: 720px;
  --font-display: "Arial Nova", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Segoe UI", Arial, sans-serif;
  --font-mono: "Cascadia Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.62;
}
body.nav-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 3px; }
button, input, select { font: inherit; }
button, .button { min-height: 46px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 9999; width: auto; height: auto; clip: auto; padding: 10px 14px; background: var(--white); border: 2px solid var(--ink); }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.kicker, .eyebrow, .label, .meta, .breadcrumbs, .site-note, .model-code, .finder-step, .source-stamp {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Header */
.site-header { border-bottom: 2px solid var(--ink); background: var(--paper); position: relative; z-index: 40; }
.masthead { display: grid; grid-template-columns: 1fr auto; align-items: end; min-height: 102px; padding: 20px 0 14px; gap: 24px; }
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark { width: 18px; height: 18px; flex: 0 0 18px; background: var(--red); border-radius: 50%; }
.brand-name { font: 800 2.35rem/.9 var(--font-display); text-transform: lowercase; overflow-wrap: anywhere; }
.site-note { text-align: right; max-width: 250px; line-height: 1.35; }
.nav-row { border-top: 1px solid var(--ink); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.primary-menu { display: flex; align-items: stretch; list-style: none; padding: 0; margin: 0; }
.primary-menu a { display: flex; align-items: center; min-height: 54px; padding: 0 17px; border-right: 1px solid var(--line); text-decoration: none; font-weight: 750; font-size: .92rem; }
.primary-menu li:first-child a { border-left: 1px solid var(--line); }
.primary-menu a:hover, .primary-menu .current-menu-item a { background: var(--yellow); }
.header-search { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .76rem; font-weight: 700; text-transform: uppercase; text-decoration: none; }
.header-search::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; box-shadow: 7px 7px 0 -5px currentColor; }
.menu-toggle { display: none; width: 48px; height: 48px; border: 0; border-left: 1px solid var(--ink); background: var(--yellow); cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--ink); }

/* Hero */
.catalog-hero { min-height: min(690px, 78vh); position: relative; display: flex; align-items: center; border-bottom: 2px solid var(--ink); background: var(--paper) url("assets/images/hero.webp") center / cover no-repeat; overflow: hidden; }
.hero-copy { width: min(53%, 650px); padding: 64px 0; position: relative; z-index: 2; }
.hero-copy .kicker { display: inline-flex; gap: 8px; align-items: center; padding: 7px 9px; color: var(--white); background: var(--blue); }
.hero-copy h1 { margin: 24px 0 22px; font: 900 4.1rem/.88 var(--font-display); text-transform: uppercase; overflow-wrap: normal; word-break: normal; hyphens: none; }
.hero-copy h1 span { display: block; white-space: nowrap; }
.hero-copy p { max-width: 500px; font-size: 1.25rem; font-weight: 600; line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 17px; border: 2px solid var(--ink); background: var(--ink); color: var(--white); text-decoration: none; font-weight: 800; line-height: 1.2; cursor: pointer; border-radius: 0; }
.button:hover { background: var(--red); color: var(--white); }
.button.alt { color: var(--ink); background: var(--paper); }
.button.alt:hover { background: var(--yellow); }
.hero-index { position: absolute; right: 22px; bottom: 16px; font: 800 .72rem/1 var(--font-mono); text-transform: uppercase; writing-mode: vertical-rl; }

/* Shared bands */
.band { padding: 82px 0; border-bottom: 2px solid var(--ink); }
.band.blue { color: var(--white); background: var(--blue); }
.band.red { color: var(--white); background: var(--red); }
.band.ink { color: var(--paper); background: var(--ink); }
.section-head { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; align-items: end; margin-bottom: 44px; }
.section-head > * { min-width: 0; }
.section-num { font: 900 4.5rem/.8 var(--font-display); color: var(--red); }
.blue .section-num, .red .section-num, .ink .section-num { color: var(--yellow); }
.section-head h2 { max-width: 900px; margin: 0; font: 850 3.5rem/.98 var(--font-display); overflow-wrap: anywhere; }
.section-intro { max-width: 720px; margin: 14px 0 0; }

/* Model catalog */
.model-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); border-top: 2px solid var(--ink); border-left: 2px solid var(--ink); }
.model-card { min-height: 320px; padding: 18px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--white); color: var(--ink); position: relative; text-decoration: none; }
.model-card:nth-child(2) { background: var(--red); color: var(--white); }
.model-card:nth-child(3) { background: var(--yellow); }
.model-card:nth-child(4) { background: var(--blue); color: var(--white); }
.model-card:nth-child(5) { background: var(--paper-2); }
.model-card:hover { transform: translateY(-6px); box-shadow: 6px 6px 0 var(--ink); }
.model-card h3 { margin: 56px 0 12px; font: 850 1.35rem/1.05 var(--font-display); }
.model-card p { margin: 0; font-size: .9rem; line-height: 1.45; }
.model-glyph { width: 54px; height: 54px; border: 8px solid currentColor; }
.model-card:nth-child(2) .model-glyph { border-radius: 50%; }
.model-card:nth-child(3) .model-glyph { border-width: 0; background: currentColor; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.model-card:nth-child(4) .model-glyph { border-width: 7px 0; }
.model-card:nth-child(5) .model-glyph { border-width: 0; background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 11px); }
.model-code { position: absolute; right: 14px; top: 12px; }

/* Finder */
.finder-shell { border: 2px solid var(--ink); background: var(--white); color: var(--ink); }
.finder-top { display: grid; grid-template-columns: 220px 1fr; border-bottom: 2px solid var(--ink); }
.finder-top > * { padding: 22px; }
.finder-top .finder-step { background: var(--yellow); border-right: 2px solid var(--ink); }
.finder-top h3 { margin: 0; font: 850 2.6rem/1 var(--font-display); }
.finder-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
.finder-field { margin: 0; padding: 24px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.finder-field:nth-child(even) { border-right: 0; }
.finder-field legend { width: 100%; padding: 0 0 13px; font-weight: 800; }
.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 11px; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; font-size: .88rem; font-weight: 700; }
.segmented input:checked + label { color: var(--white); background: var(--blue); box-shadow: inset 0 0 0 2px var(--white); }
.segmented input:focus-visible + label { outline: 3px solid var(--red); outline-offset: 2px; }
.finder-submit { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 24px; background: var(--paper-2); }
.finder-submit p { margin: 0; max-width: 660px; font-size: .82rem; }
.finder-result { padding: 28px; border-top: 2px solid var(--ink); background: var(--yellow); }
.finder-result[hidden] { display: none; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.result-grid h4 { margin: 0 0 12px; font: 850 1.6rem/1 var(--font-display); }
.result-grid ul { margin: 0; padding-left: 20px; }
.result-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.result-links a { padding: 8px 10px; border: 1px solid var(--ink); background: var(--white); font-size: .86rem; font-weight: 700; text-decoration: none; }
.risk-flag { margin-top: 20px; padding: 16px; border-left: 12px solid var(--red); background: var(--white); font-weight: 650; }

/* Criteria and article grids */
.criteria-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; border-top: 1px solid currentColor; border-left: 1px solid currentColor; }
.criterion { padding: 24px; min-height: 190px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.criterion strong { display: block; margin-bottom: 16px; font: 850 1.2rem/1 var(--font-display); }
.criterion p { margin: 0; font-size: .9rem; }
.article-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-left: 1px solid var(--ink); border-top: 1px solid var(--ink); }
.article-card { display: flex; min-width: 0; flex-direction: column; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--white); }
.article-card:hover { background: var(--yellow); }
.article-card > a { text-decoration: none; }
.article-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-bottom: 1px solid var(--ink); }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 17px; }
.card-body h3 { margin: 22px 0 14px; font: 820 1.2rem/1.1 var(--font-display); overflow-wrap: anywhere; }
.card-body p { margin: 0 0 18px; font-size: .87rem; line-height: 1.45; }
.card-body .meta { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.method-strip { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 40px; }
.method-strip h2 { margin: 0 0 12px; font: 850 3.4rem/.95 var(--font-display); }
.method-stamp { border: 2px solid currentColor; padding: 24px; transform: rotate(1.5deg); font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; }

/* FAQ */
.faq-list { max-width: 900px; border-top: 2px solid var(--ink); }
.faq-item { border-bottom: 2px solid var(--ink); }
.faq-item summary { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; cursor: pointer; font-weight: 800; list-style: none; }
.faq-item summary::after { content: "+"; font: 800 1.5rem/1 var(--font-mono); }
.faq-item[open] summary::after { content: "-"; }
.faq-item p { max-width: 720px; margin: 0; padding: 0 0 22px; }

/* Internal pages */
.page-head, .archive-head { padding: 66px 0 44px; border-bottom: 2px solid var(--ink); }
.page-head-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 40px; align-items: end; }
.page-head h1, .archive-head h1 { max-width: 950px; margin: 12px 0 0; font: 900 4.8rem/.9 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.page-head-note { padding: 16px; border: 2px solid var(--ink); font-family: var(--font-mono); font-size: .76rem; font-weight: 700; text-transform: uppercase; }
.breadcrumbs { margin-bottom: 14px; }
.breadcrumbs a { color: var(--blue); }
.breadcrumbs span { padding: 0 7px; }
.content-wrap { display: grid; grid-template-columns: minmax(0,var(--measure)) minmax(230px,320px); justify-content: space-between; gap: 72px; padding-block: 58px 90px; }
.entry-content { min-width: 0; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { margin: 56px 0 18px; font: 850 2.55rem/1.05 var(--font-display); }
.entry-content h3 { margin: 38px 0 12px; font: 820 1.35rem/1.12 var(--font-display); }
.entry-content p, .entry-content li { max-width: 70ch; }
.entry-content a { color: #174a8d; font-weight: 650; }
.entry-content blockquote { margin: 36px 0; padding: 24px; border: 2px solid var(--ink); border-left: 16px solid var(--red); background: var(--white); }
.entry-content table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .88rem; }
.entry-content th, .entry-content td { padding: 12px; border: 1px solid var(--ink); text-align: left; vertical-align: top; }
.entry-content th { background: var(--yellow); }
.table-scroll { overflow-x: auto; margin: 30px 0; border: 1px solid var(--ink); }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding: 11px 12px 11px 42px; border-bottom: 1px solid var(--line); }
.checklist li::before { content: ""; position: absolute; left: 10px; top: 15px; width: 16px; height: 16px; border: 2px solid var(--blue); }
.risk-note { margin: 34px 0; padding: 20px; border: 2px solid var(--red); background: #fff8f4; }
.risk-note strong { display: block; margin-bottom: 7px; font-family: var(--font-mono); text-transform: uppercase; }
.source-list { margin-top: 44px; padding: 24px; background: var(--paper-2); border-left: 8px solid var(--blue); }
.source-list h2 { margin-top: 0; font-size: 1.35rem; }
.source-list li { margin-bottom: 8px; }
.page-rail { align-self: start; position: sticky; top: 24px; }
.rail-box { margin-bottom: 18px; padding: 18px; border: 2px solid var(--ink); background: var(--white); }
.rail-box.red { background: var(--red); color: var(--white); }
.rail-box h2, .rail-box h3 { margin: 0 0 10px; font: 850 1.15rem/1 var(--font-display); }
.rail-box p, .rail-box li { font-size: .82rem; line-height: 1.45; }
.rail-box ul { margin: 0; padding-left: 18px; }

/* Article */
.article-head { padding-top: 54px; border-bottom: 2px solid var(--ink); }
.article-head-grid { display: grid; grid-template-columns: minmax(0,1fr) 410px; gap: 48px; align-items: end; }
.article-head h1 { max-width: 900px; margin: 18px 0 28px; font: 900 4.4rem/.9 var(--font-display); overflow-wrap: anywhere; }
.article-byline { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 20px 0; border-top: 1px solid var(--ink); font-size: .82rem; font-weight: 700; }
.article-cover { align-self: stretch; }
.article-cover img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; border-left: 2px solid var(--ink); }
.lede { font-size: 1.28rem; font-weight: 600; line-height: 1.48; }
.author-box { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: start; }
.author-initial { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: var(--white); background: var(--blue); font: 850 1.3rem/1 var(--font-display); }

/* Archive, search, 404 */
.archive-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 50px 0 90px; }
.pagination { margin: 0 0 80px; }
.pagination .nav-links { display: flex; gap: 8px; }
.pagination a, .pagination span { padding: 8px 12px; border: 1px solid var(--ink); text-decoration: none; }
.search-form { display: flex; max-width: 740px; margin-top: 24px; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 50px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 0; background: var(--white); }
.search-submit { padding: 8px 18px; border: 2px solid var(--ink); border-left: 0; color: var(--white); background: var(--blue); font-weight: 800; cursor: pointer; }
.not-found { min-height: 62vh; padding: 80px 0; }
.not-found-code { font: 900 15rem/.72 var(--font-display); color: var(--red); }

/* Footer */
.site-footer { color: var(--paper); background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.1fr .9fr .9fr; gap: 60px; padding: 68px 0 52px; }
.footer-brand { font: 850 2.2rem/.95 var(--font-display); overflow-wrap: anywhere; }
.footer-grid h2 { margin: 0 0 14px; font: 800 .8rem/1 var(--font-mono); text-transform: uppercase; color: var(--yellow); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-grid li { margin: 0 0 8px; break-inside: avoid; }
.footer-grid a { font-size: .86rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; padding: 18px 0 28px; border-top: 1px solid #555; font: 700 .7rem/1.45 var(--font-mono); text-transform: uppercase; }

@media (max-width: 980px) {
  .brand-name { font-size: 1.8rem; }
  .hero-copy h1 { font-size: 3.25rem; }
  .section-head h2, .method-strip h2 { font-size: 2.8rem; }
  .page-head h1, .archive-head h1, .article-head h1 { font-size: 3.7rem; }
  .primary-menu a { padding-inline: 10px; font-size: .8rem; }
  .model-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .model-card:last-child { grid-column: 1 / -1; min-height: 220px; }
  .article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .article-head-grid { grid-template-columns: 1fr; }
  .article-cover img { max-height: 520px; min-height: 0; border-left: 0; border-top: 2px solid var(--ink); }
  .content-wrap { grid-template-columns: minmax(0,1fr) 260px; gap: 38px; }
  .archive-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .masthead { min-height: 76px; padding-block: 13px; align-items: center; }
  .brand { max-width: calc(100% - 64px); }
  .brand-name { font-size: 1rem; }
  .site-note { display: none; }
  .nav-inner { min-height: 0; }
  .menu-toggle { display: block; position: absolute; right: 14px; top: 14px; }
  .header-search { display: none; }
  .primary-nav { display: none; position: fixed; inset: 0; top: 77px; z-index: 80; overflow: auto; background: var(--yellow); border-top: 2px solid var(--ink); }
  .primary-nav.open { display: block; }
  .primary-menu { display: block; padding: 14px; }
  .primary-menu a, .primary-menu li:first-child a { min-height: 60px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--ink); font: 850 1.3rem/1 var(--font-display); }
  .catalog-hero { min-height: 680px; align-items: flex-start; background-position: 58% center; }
  .catalog-hero::after { content: ""; position: absolute; inset: 0; background: rgba(245,240,230,.82); }
  .hero-copy { width: 100%; padding: 58px 0 140px; }
  .hero-copy h1 { font-size: 2.1rem; }
  .hero-copy p { max-width: 330px; font-size: 1.1rem; }
  .section-head { grid-template-columns: 80px minmax(0,1fr); gap: 14px; }
  .section-num { font-size: 2.8rem; }
  .band { padding: 58px 0; }
  .model-grid, .criteria-grid, .article-grid, .archive-list { grid-template-columns: 1fr; }
  .model-card, .model-card:last-child { grid-column: auto; min-height: 230px; }
  .finder-top, .finder-form, .result-grid { grid-template-columns: 1fr; }
  .finder-top .finder-step { border-right: 0; border-bottom: 2px solid var(--ink); }
  .finder-field, .finder-field:nth-child(even) { border-right: 0; }
  .finder-submit { flex-direction: column; align-items: stretch; }
  .method-strip, .page-head-grid, .content-wrap, .footer-grid { grid-template-columns: 1fr; }
  .page-head h1, .archive-head h1 { font-size: 3rem; }
  .page-head-note { max-width: 430px; }
  .content-wrap { gap: 34px; padding-top: 40px; }
  .page-rail { position: static; }
  .article-head { padding-top: 34px; }
  .article-head h1 { font-size: 2.9rem; }
  .section-head h2, .method-strip h2 { font-size: 2.4rem; }
  .finder-top h3 { font-size: 2rem; }
  .entry-content h2 { font-size: 2.1rem; }
  .not-found-code { font-size: 8rem; }
  .entry-content table { min-width: 580px; }
  .footer-grid { gap: 36px; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
