/**
 * Selbstständig Finanzen — Theme-Styles (v1.0.0)
 * Palette: Charcoal #14161B + Gold #C9A24B/#A87F27, warmes Papier #FBFAF6.
 * Typografie: Fraunces (Display) + Inter (Text), mit System-Fallbacks.
 */

/* ---------- Design-Token ---------- */
:root,
html[data-theme="light"] {
	--sf-bg: #fbfaf6;
	--sf-surface: #ffffff;
	--sf-soft: #f4f1e9;
	--sf-ink: #181a1f;
	--sf-muted: #626a75;
	--sf-line: #e7e1d2;
	--sf-gold: #a87f27;
	--sf-gold-deep: #83651d;
	--sf-gold-soft: #f6eeda;
	--sf-gold-line: #c9a24b;
	--sf-char: #14161b;
	--sf-char-2: #20242c;
	--sf-hero-text: #f0ece1;
	--sf-hero-muted: #b9b3a4;
	--sf-topbar-text: #cfc9b8;
	--sf-shadow: 0 18px 38px rgba(60, 48, 16, 0.12);
}

html[data-theme="dark"] {
	--sf-bg: #0b0d10;
	--sf-surface: #12151a;
	--sf-soft: #161a20;
	--sf-ink: #f0ece1;
	--sf-muted: #9aa1ad;
	--sf-line: #232830;
	--sf-gold: #d2a94f;
	--sf-gold-deep: #d2a94f;
	--sf-gold-soft: #221c0e;
	--sf-gold-line: #c9a24b;
	--sf-char: #0b0d10;
	--sf-char-2: #12151a;
	--sf-hero-text: #f0ece1;
	--sf-hero-muted: #b9b3a4;
	--sf-topbar-text: #cfc9b8;
	--sf-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}

/* ---------- Basis ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	background: var(--sf-bg);
	color: var(--sf-ink);
	line-height: 1.65;
	font-size: 16px;
	transition: background 0.3s ease, color 0.3s ease;
}

img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1.1em; }

h1, h2, h3, h4 {
	font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 0.6em;
}

/* ---------- Barrierefreiheit ---------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
.sf-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 200;
	background: var(--sf-char);
	color: #f0ece1;
	padding: 12px 20px;
	border-radius: 0 0 8px 0;
	font-weight: 600;
	text-decoration: none;
}
.sf-skip-link:focus { left: 0; }

:focus-visible {
	outline: 3px solid var(--sf-gold);
	outline-offset: 2px;
	border-radius: 2px;
}

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

/* ---------- Layout-Helfer ---------- */
.sf-wrap { max-width: 1080px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.sf-section { padding-top: 68px; padding-bottom: 68px; }
.sf-kicker {
	color: var(--sf-gold-deep);
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 2.5px;
	margin-bottom: 12px;
}
.sf-h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 12px; }
.sf-sub { color: var(--sf-muted); font-size: 15.5px; margin-bottom: 36px; max-width: 640px; line-height: 1.7; }
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }

/* ---------- Topbar ---------- */
.sf-topbar {
	background: var(--sf-char);
	color: var(--sf-topbar-text);
	font-size: 12px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	text-align: center;
	padding: 9px 16px;
	font-weight: 500;
}
.sf-topbar b { color: var(--sf-gold); font-weight: 700; }

/* ---------- Header ---------- */
.sf-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 16px 32px;
	background: var(--sf-surface);
	border-bottom: 1px solid var(--sf-line);
	position: sticky;
	top: 0;
	z-index: 100;
}
.sf-logo { display: inline-flex; align-items: center; text-decoration: none; }
.sf-logo img { display: block; height: 44px; width: auto; }
/* Logo-Variante folgt dem Theme (auto-Modus) */
.sf-logo .sf-logo-dark { display: none; }
html[data-theme="dark"] .sf-logo-auto .sf-logo-light { display: none; }
html[data-theme="dark"] .sf-logo-auto .sf-logo-dark { display: block; }

.sf-head-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.sf-primary-nav ul {
	display: flex;
	gap: 26px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 14px;
	font-weight: 500;
	color: var(--sf-muted);
}
.sf-primary-nav a { text-decoration: none; position: relative; padding: 4px 0; }
.sf-primary-nav a:hover { color: var(--sf-ink); }
.sf-primary-nav a:hover::after,
.sf-primary-nav .current-menu-item a::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -2px;
	height: 2px;
	background: var(--sf-gold);
}
.sf-primary-nav .current-menu-item a { color: var(--sf-ink); }

.sf-nav-toggle {
	display: none;
	background: var(--sf-soft);
	border: 1px solid var(--sf-line);
	border-radius: 8px;
	padding: 10px 14px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--sf-ink);
	cursor: pointer;
}

.sf-theme-toggle {
	width: 46px;
	height: 25px;
	border-radius: 999px;
	border: 1px solid var(--sf-line);
	background: var(--sf-soft);
	cursor: pointer;
	position: relative;
	padding: 0;
	flex: 0 0 auto;
}
.sf-theme-toggle::after {
	content: "";
	position: absolute;
	top: 2px; left: 2px;
	width: 19px; height: 19px;
	border-radius: 50%;
	background: var(--sf-gold);
	transition: left 0.25s ease;
}
html[data-theme="dark"] .sf-theme-toggle::after { left: 23px; }

.sf-cta {
	background: var(--sf-char);
	color: #f0ece1;
	font-weight: 600;
	font-size: 13.5px;
	padding: 11px 20px;
	border-radius: 8px;
	letter-spacing: 0.2px;
	text-decoration: none;
	white-space: nowrap;
}
html[data-theme="dark"] .sf-cta { background: var(--sf-gold); color: #14161b; }
.sf-cta:hover { background: var(--sf-gold-deep); color: #fff; }

/* ---------- Hero ---------- */
.sf-hero {
	background: linear-gradient(160deg, var(--sf-char) 0%, var(--sf-char-2) 70%);
	color: var(--sf-hero-text);
	padding: 76px 32px 84px;
	position: relative;
}
.sf-hero::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	background: linear-gradient(90deg, transparent, var(--sf-gold), transparent);
}
.sf-hero-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.sf-eyebrow {
	color: var(--sf-gold);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	margin-bottom: 20px;
}
.sf-hero h1 {
	font-size: clamp(32px, 5vw, 54px);
	line-height: 1.12;
	margin-bottom: 20px;
	color: var(--sf-hero-text);
}
.sf-hero h1 em { font-style: italic; color: var(--sf-gold); }
.sf-hero .sf-lead { font-size: 17px; color: var(--sf-hero-muted); max-width: 600px; margin: 0 auto 34px; line-height: 1.7; }
.sf-hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }

.sf-btn {
	display: inline-block;
	padding: 14px 30px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	border: none;
	font-family: 'Inter', system-ui, sans-serif;
	text-decoration: none;
}
.sf-btn-gold { background: var(--sf-gold); color: #14161b; }
.sf-btn-gold:hover { background: var(--sf-gold-deep); color: #fff; }
.sf-btn-line { background: transparent; color: var(--sf-hero-text); border: 1px solid #4a4436; }
.sf-btn-line:hover { border-color: var(--sf-gold); color: var(--sf-gold); }
.sf-trust { font-size: 12.5px; color: #8d8778; letter-spacing: 0.4px; }
.sf-trust b { color: var(--sf-gold); font-weight: 600; }

/* ---------- Karten ---------- */
.sf-card {
	background: var(--sf-surface);
	border: 1px solid var(--sf-line);
	border-radius: 12px;
	padding: 28px;
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
a.sf-card { text-decoration: none; display: block; }
a.sf-card:hover { transform: translateY(-5px); box-shadow: var(--sf-shadow); border-color: var(--sf-gold); }
.sf-ico {
	width: 48px; height: 48px;
	border-radius: 11px;
	background: var(--sf-gold-soft);
	display: flex; align-items: center; justify-content: center;
	margin-bottom: 18px;
}
.sf-ico svg { width: 23px; height: 23px; stroke: var(--sf-gold-deep); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sf-card h3 { font-size: 16.5px; font-weight: 700; font-family: 'Inter', system-ui, sans-serif; margin-bottom: 9px; }
.sf-card p { font-size: 14px; color: var(--sf-muted); line-height: 1.65; margin-bottom: 16px; }
.sf-link { color: var(--sf-gold-deep); font-weight: 700; font-size: 13.5px; letter-spacing: 0.2px; text-decoration: none; }
a:hover .sf-link, .sf-link:hover { text-decoration: underline; }

/* ---------- Kennzahlen ---------- */
.sf-stats { border-top: 1px solid var(--sf-line); border-bottom: 1px solid var(--sf-line); background: var(--sf-surface); }
.sf-stats-inner {
	max-width: 1080px; margin: 0 auto;
	padding: 38px 32px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 24px;
	text-align: center;
}
.sf-stat b { font-family: 'Fraunces', Georgia, serif; font-size: 34px; font-weight: 600; color: var(--sf-gold-deep); display: block; margin-bottom: 4px; }
.sf-stat span { font-size: 13px; color: var(--sf-muted); }

/* ---------- Ratgeber ---------- */
.sf-guide .sf-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--sf-gold-deep);
	border-bottom: 2px solid var(--sf-gold);
	padding-bottom: 6px;
	margin-bottom: 16px;
}
.sf-guide h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 20px; line-height: 1.4; margin-bottom: 12px; }
.sf-meta { font-size: 12.5px; color: var(--sf-muted); margin-bottom: 16px; }
.sf-soon {
	display: inline-block;
	font-size: 11px; font-weight: 700;
	letter-spacing: 1.6px; text-transform: uppercase;
	color: var(--sf-gold-deep);
	background: var(--sf-gold-soft);
	border-radius: 999px;
	padding: 5px 12px;
	margin-bottom: 14px;
}

/* ---------- Breadcrumbs ---------- */
.sf-breadcrumbs { font-size: 13px; color: var(--sf-muted); padding: 18px 0 0; }
.sf-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sf-breadcrumbs li + li::before { content: "›"; margin-right: 8px; color: var(--sf-gold); }
.sf-breadcrumbs a { text-decoration: none; }
.sf-breadcrumbs a:hover { color: var(--sf-gold-deep); text-decoration: underline; }
.sf-breadcrumbs [aria-current="page"] { color: var(--sf-ink); }

/* ---------- Artikel / Seiten ---------- */
.sf-article { max-width: 760px; margin: 0 auto; padding: 40px 32px 68px; }
.sf-article h1 { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 14px; }
.sf-article .sf-meta { margin-bottom: 28px; }
.sf-content { font-size: 16.5px; line-height: 1.8; }
.sf-content h2 { font-size: 26px; margin: 1.8em 0 0.6em; }
.sf-content h3 { font-size: 21px; margin: 1.6em 0 0.5em; }
.sf-content a { color: var(--sf-gold-deep); text-underline-offset: 3px; }
.sf-content ul, .sf-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.sf-content li { margin-bottom: 0.5em; }
.sf-content blockquote {
	border-left: 3px solid var(--sf-gold);
	margin: 1.6em 0; padding: 0.4em 0 0.4em 1.2em;
	color: var(--sf-muted); font-style: italic;
}
.sf-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 15px; }
.sf-content th, .sf-content td { border: 1px solid var(--sf-line); padding: 10px 14px; text-align: left; }
.sf-content th { background: var(--sf-soft); font-weight: 700; }
.sf-byline {
	display: flex; align-items: center; gap: 12px;
	border-top: 1px solid var(--sf-line);
	margin-top: 48px; padding-top: 24px;
	font-size: 14px; color: var(--sf-muted);
}
.sf-byline img { width: 44px; height: 44px; border-radius: 50%; }

/* ---------- Archiv / Suche ---------- */
.sf-archive-head { max-width: 1080px; margin: 0 auto; padding: 48px 32px 8px; }
.sf-archive-head h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 8px; }
.sf-archive-head p { color: var(--sf-muted); }
.sf-post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.sf-post-item h2 { font-size: 22px; margin-bottom: 8px; }
.sf-post-item h2 a { text-decoration: none; }
.sf-post-item h2 a:hover { color: var(--sf-gold-deep); }
.sf-excerpt { color: var(--sf-muted); font-size: 15px; }
.sf-pagination { margin-top: 40px; display: flex; gap: 10px; }
.sf-pagination .page-numbers {
	border: 1px solid var(--sf-line);
	border-radius: 8px;
	padding: 8px 14px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}
.sf-pagination .current { background: var(--sf-char); color: #f0ece1; border-color: var(--sf-char); }
html[data-theme="dark"] .sf-pagination .current { background: var(--sf-gold); border-color: var(--sf-gold); color: #14161b; }

.sf-search-form { display: flex; gap: 10px; max-width: 480px; margin: 24px 0; }
.sf-search-form label { flex: 1; }
.sf-search-form input[type="search"] {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--sf-line);
	border-radius: 8px;
	font: inherit;
	background: var(--sf-surface);
	color: var(--sf-ink);
}
.sf-search-form button {
	padding: 12px 22px;
	border: none; border-radius: 8px;
	background: var(--sf-char); color: #f0ece1;
	font: inherit; font-weight: 600; cursor: pointer;
}
html[data-theme="dark"] .sf-search-form button { background: var(--sf-gold); color: #14161b; }

/* ---------- 404 ---------- */
.sf-error { text-align: center; padding: 90px 32px; max-width: 640px; margin: 0 auto; }
.sf-error h1 { font-size: clamp(40px, 7vw, 72px); color: var(--sf-gold-deep); margin-bottom: 12px; }

/* ---------- Footer ---------- */
.sf-footer { background: var(--sf-char); color: #9a937f; padding: 48px 32px 30px; font-size: 13.5px; }
html[data-theme="dark"] .sf-footer { background: #08090c; }
.sf-foot-inner { max-width: 1080px; margin: 0 auto; }
.sf-foot-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px 28px; margin-bottom: 28px; }
.sf-foot-brandcol { min-width: 0; }
.sf-foot-h { color: #f0ece1; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 14px; }
.sf-foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sf-foot-list a { text-decoration: none; color: #9a937f; }
.sf-foot-list a:hover { color: var(--sf-gold); }
.sf-foot-mail { margin: 14px 0 0; }
.sf-foot-mail a { color: var(--sf-gold); text-decoration: none; }
.sf-foot-mail a:hover { text-decoration: underline; }
.sf-foot-brand { display: flex; align-items: center; gap: 12px; color: #f0ece1; font-weight: 700; font-size: 17px; margin-bottom: 12px; text-decoration: none; }
.sf-foot-brand img { height: 38px; width: auto; display: block; }
.sf-foot-desc { max-width: 340px; line-height: 1.7; }
.sf-foot-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sf-foot-links a { text-decoration: none; }
.sf-foot-links a:hover { color: var(--sf-gold); }
.sf-disc { font-size: 12.5px; line-height: 1.75; border-top: 1px solid #2a2e36; padding-top: 22px; color: #7d7767; }
.sf-disc strong { color: #cfc9b8; }

/* ---------- Responsiv ---------- */
@media (max-width: 900px) {
	.sf-nav-toggle { display: inline-block; }
	.sf-primary-nav ul {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--sf-surface);
		border-bottom: 1px solid var(--sf-line);
		flex-direction: column;
		gap: 0;
		padding: 8px 32px 20px;
		box-shadow: var(--sf-shadow);
	}
	.sf-primary-nav.sf-nav-open ul { display: flex; }
	.sf-primary-nav li { border-top: 1px solid var(--sf-line); }
	.sf-primary-nav a { display: block; padding: 12px 0; }
	.sf-primary-nav { position: static; }
	.sf-header { position: sticky; flex-wrap: wrap; }
	.sf-cta { display: none; }
}
@media (max-width: 760px) {
	.sf-wrap { padding-left: 20px; padding-right: 20px; }
	.sf-header { padding: 14px 18px; }
	.sf-section { padding-top: 48px; padding-bottom: 48px; }
	.sf-hero { padding: 56px 20px 64px; }
	.sf-article { padding: 32px 20px 52px; }
	.sf-archive-head { padding: 36px 20px 8px; }
	.sf-foot-top { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
	.sf-foot-brandcol { grid-column: 1 / -1; }
	.sf-footer { padding: 40px 20px 26px; }
}
