/* ==========================================================================
   einkommensteuerprogramm.de — Design System
   Konzept: "Amtlicher Beleg trifft modernes Web"
   Stempel-Badges, Kassenbon-/Kontoauszug-Optik fuer Zahlen, Tinte-Blau + Erstattungs-Gruen.
   Schriften: Space Grotesk (Display), Systemschrift (Fliesstext, Performance),
              IBM Plex Mono (Geldbetraege, Daten, Tabellenziffern).
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root{
	/* Farben */
	--ink:        #142433;   /* Haupttext */
	--ink-700:    #1B3A5C;   /* Marke / Header / Buttons */
	--ink-600:    #234C74;
	--ink-500:    #2B5D8C;   /* Links */
	--ink-100:    #E7EDF2;

	--paper:      #FBFAF7;   /* Seitenhintergrund */
	--paper-alt:  #F1F3EF;   /* alternierender Abschnittshintergrund */
	--surface:    #FFFFFF;   /* Karten */
	--line:       #DDE3DD;   /* Trennlinien */
	--line-soft:  #EAEFE9;

	--refund:      #1F8A5F;  /* Erstattung / positiv */
	--refund-dark: #146245;
	--refund-soft: #E4F4EC;

	--amber:      #C97F0A;   /* Stempel / Hinweis */
	--amber-soft: #FBEEDA;

	--danger:     #B3261E;

	/* Typografie */
	--font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

	/* Layout */
	--container: 1120px;
	--radius-sm: 6px;
	--radius: 12px;
	--radius-lg: 20px;
	--shadow-sm: 0 1px 2px rgba(20,36,51,0.06);
	--shadow-md: 0 6px 20px -6px rgba(20,36,51,0.16);
	--shadow-lg: 0 18px 40px -14px rgba(20,36,51,0.22);

	--header-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 14px);
}
body{
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg{ max-width: 100%; display: block; }
a{ color: var(--ink-500); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover{ color: var(--ink-700); }
h1, h2, h3, h4{
	font-family: var(--font-display);
	color: var(--ink);
	line-height: 1.15;
	margin: 0 0 0.5em;
	letter-spacing: -0.01em;
}
h1{ font-size: clamp(2.1rem, 4.6vw, 3.3rem); font-weight: 700; }
h2{ font-size: clamp(1.55rem, 3.2vw, 2.15rem); font-weight: 700; margin-top: 0; }
h3{ font-size: 1.28rem; font-weight: 700; }
h4{ font-size: 1.05rem; font-weight: 700; }
p{ margin: 0 0 1em; }
ul, ol{ padding-left: 1.3em; }
li{ margin-bottom: 0.4em; }
small{ font-size: 0.88rem; }
strong{ color: var(--ink); }

.skip-link{
	position: absolute; left: -999px; top: 0;
	background: var(--ink-700); color: #fff;
	padding: 10px 18px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; }

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

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

/* ---------- Layout helpers ---------- */
.container{
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
}
.section{ padding: 56px 0; }
.section-alt{ background: var(--paper-alt); }
.section-tight{ padding: 36px 0; }
.section > .container > h2:first-child,
.section > .container > .eyebrow + h2{ margin-top: 0; }

.eyebrow{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-500);
	background: var(--ink-100);
	padding: 5px 12px;
	border-radius: 999px;
	margin-bottom: 12px;
}

.section-intro{ max-width: 720px; margin-bottom: 28px; color: #3B4A57; }

.visually-hidden{
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- Tabular / mono numbers ---------- */
.num, .amount, .tnum{
	font-family: var(--font-mono);
	font-variant-numeric: tabular-nums;
}

/* ---------- Header / Navigation ---------- */
.site-header{
	position: sticky; top: 0; z-index: 100;
	height: var(--header-h);
	background: rgba(251,250,247,0.92);
	backdrop-filter: saturate(160%) blur(8px);
	border-bottom: 1px solid var(--line);
	display: flex; align-items: center;
}
.site-header .container{
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; width: 100%;
}
.brand{
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-display); font-weight: 700; font-size: 1.08rem;
	color: var(--ink); text-decoration: none;
	white-space: nowrap;
}
.brand:hover{ color: var(--ink); }
.brand-mark{
	width: 34px; height: 34px; flex: none;
	border-radius: 50%;
	border: 2px dashed var(--ink-700);
	display: grid; place-items: center;
	font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem;
	color: var(--ink-700);
	transform: rotate(-8deg);
}
.brand-text b{ color: var(--refund-dark); }

.main-nav{ display: flex; align-items: center; gap: 4px; }
.main-nav a{
	font-size: 0.92rem; font-weight: 600; color: var(--ink);
	text-decoration: none; padding: 8px 12px; border-radius: 8px;
	white-space: nowrap;
}
.main-nav a:hover, .main-nav a.is-active{ background: var(--ink-100); color: var(--ink-700); }

.nav-cta{
	background: var(--refund) !important; color: #fff !important;
	padding: 9px 16px !important; border-radius: 999px !important;
	margin-left: 6px;
}
.nav-cta:hover{ background: var(--refund-dark) !important; }

.nav-toggle{
	display: none;
	background: none; border: 1.5px solid var(--line);
	border-radius: 8px; width: 42px; height: 42px;
	align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
	content:""; display:block; width: 20px; height: 2px; background: var(--ink);
	position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before{ position:absolute; top:-6px; }
.nav-toggle span::after{ position:absolute; top:6px; }
.nav-toggle[aria-expanded="true"] span{ background: transparent; }
.nav-toggle[aria-expanded="true"] span::before{ transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after{ transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px){
	.nav-toggle{ display: inline-flex; }
	.main-nav{
		position: fixed; inset: var(--header-h) 0 0 0;
		background: var(--paper);
		flex-direction: column; align-items: stretch;
		padding: 18px; gap: 4px; overflow-y: auto;
		transform: translateX(100%);
		transition: transform .25s ease;
	}
	.main-nav.is-open{ transform: translateX(0); }
	.main-nav a{ padding: 14px 12px; font-size: 1.02rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
	.nav-cta{ margin: 10px 0 0; text-align: center; border-radius: 10px !important; }
}

/* ---------- Buttons ---------- */
.btn{
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-weight: 700; font-size: 0.98rem;
	padding: 13px 24px; border-radius: 999px;
	border: 2px solid transparent; cursor: pointer;
	text-decoration: none; line-height: 1.1;
	transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--refund); color: #fff; }
.btn-primary:hover{ background: var(--refund-dark); color: #fff; }
.btn-ghost{ background: transparent; color: var(--ink-700); border-color: var(--ink-700); }
.btn-ghost:hover{ background: var(--ink-700); color: #fff; }
.btn-row{ display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Stamp badge (Signature-Element) ---------- */
.stamp{
	display: inline-flex; align-items: center; gap: 7px;
	font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
	letter-spacing: 0.06em; text-transform: uppercase;
	color: var(--amber); border: 1.5px dashed var(--amber);
	border-radius: 999px; padding: 5px 12px;
	transform: rotate(-2deg);
	background: var(--amber-soft);
}
.stamp.stamp-blue{ color: var(--ink-700); border-color: var(--ink-700); background: var(--ink-100); }
.stamp.stamp-green{ color: var(--refund-dark); border-color: var(--refund); background: var(--refund-soft); }

/* ---------- Hero ---------- */
.hero{
	padding: 52px 0 40px;
	background:
		linear-gradient(180deg, rgba(27,58,92,0.04), transparent 60%),
		var(--paper);
	border-bottom: 1px solid var(--line);
}
.hero .container{
	display: grid; grid-template-columns: 1.15fr 0.85fr;
	gap: 40px; align-items: center;
}
.hero h1{ margin-bottom: 14px; }
.hero-sub{ font-size: 1.12rem; color: #37475A; max-width: 54ch; margin-bottom: 8px; }

/* Kassenbon/Kontoauszug-Grafik im Hero */
.receipt{
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	padding: 22px 22px 18px;
	transform: rotate(1.4deg);
	position: relative;
}
.receipt::before{
	content: "";
	position: absolute; left: 16px; right: 16px; top: -1px; height: 8px;
	background:
		radial-gradient(circle at 6px 0, transparent 6px, var(--paper) 6.5px) repeat-x;
	background-size: 16px 16px;
	background-position: top;
}
.receipt-head{
	display: flex; justify-content: space-between; align-items: baseline;
	font-family: var(--font-mono); font-size: 0.78rem; color: #6B7A85;
	border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 10px;
	text-transform: uppercase; letter-spacing: 0.05em;
}
.receipt-line{
	display: flex; justify-content: space-between; gap: 12px;
	font-size: 0.94rem; padding: 5px 0;
}
.receipt-line span:first-child{ color: #4B5A66; }
.receipt-line .num{ color: var(--ink); }
.receipt-total{
	display: flex; justify-content: space-between; align-items: baseline;
	border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 12px;
}
.receipt-total span:first-child{ font-weight: 700; }
.receipt-total .num{ font-size: 1.5rem; font-weight: 700; color: var(--refund-dark); }

@media (max-width: 900px){
	.hero .container{ grid-template-columns: 1fr; }
	.receipt{ transform: none; max-width: 380px; margin: 0 auto; }
}

/* ---------- Stat strip ---------- */
.stat-strip{
	background: var(--ink-700); color: #fff;
}
.stat-strip .container{
	display: flex; flex-wrap: wrap; gap: 0;
	padding: 18px 20px;
}
.stat{
	flex: 1 1 160px; text-align: center;
	padding: 10px 14px;
	border-right: 1px solid rgba(255,255,255,0.18);
}
.stat:last-child{ border-right: none; }
.stat .num{ display: block; font-size: 1.5rem; font-weight: 700; color: #fff; }
.stat .label{ font-size: 0.78rem; color: #C7D6E3; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Quick jump pills (In-Page TOC) ---------- */
.jump-nav{
	display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto;
	padding: 14px 0; margin-bottom: 4px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.jump-nav::-webkit-scrollbar{ height: 5px; }
.jump-nav::-webkit-scrollbar-thumb{ background: var(--line); border-radius: 3px; }
.jump-nav a{
	flex: none;
	font-size: 0.85rem; font-weight: 600;
	background: var(--surface); border: 1px solid var(--line);
	color: var(--ink); text-decoration: none;
	padding: 8px 14px; border-radius: 999px;
	white-space: nowrap;
}
.jump-nav a:hover{ border-color: var(--ink-700); color: var(--ink-700); }

/* ---------- Cards / Grid ---------- */
.grid{ display: grid; gap: 20px; }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px){ .grid-2, .grid-3{ grid-template-columns: 1fr; } }

.card{
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px 24px 22px;
	box-shadow: var(--shadow-sm);
	position: relative;
}
.card-product{ border-left: 4px solid var(--ink-700); }
.card-head{
	display: flex; justify-content: space-between; align-items: flex-start;
	gap: 10px; margin-bottom: 6px; flex-wrap: wrap;
}
.card-head h3{ margin: 0; }
.card ul{ margin: 12px 0 14px; padding-left: 1.2em; }
.card ul li{ margin-bottom: 6px; }
.card-cta{ margin-top: 6px; }

/* ---------- Responsive comparison table ---------- */
.table-wrap{
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--surface);
}
table.cmp{
	width: 100%; border-collapse: collapse; font-size: 0.94rem;
}
table.cmp caption{ text-align: left; padding: 14px 18px; font-weight: 700; background: var(--ink-100); }
table.cmp thead th{
	background: var(--ink-700); color: #fff;
	text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em;
	padding: 12px 14px;
}
table.cmp tbody td{ padding: 14px; border-top: 1px solid var(--line-soft); vertical-align: top; }
table.cmp tbody tr:nth-child(even){ background: var(--paper-alt); }
table.cmp td.num{ text-align: center; font-weight: 700; }

@media (max-width: 760px){
	table.cmp thead{ display: none; }
	table.cmp, table.cmp tbody, table.cmp tr, table.cmp td{ display: block; width: 100%; }
	table.cmp tr{ border-top: 1px solid var(--line); padding: 14px 14px 6px; }
	table.cmp tr:first-child{ border-top: none; }
	table.cmp td{ border: none; padding: 4px 0; }
	table.cmp td::before{
		content: attr(data-label);
		display: block; font-family: var(--font-mono);
		font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
		color: var(--ink-500); margin-bottom: 2px;
	}
	table.cmp td.num{ text-align: left; }
}

/* ---------- Accordion (Steuertipps, FAQ) via <details> ---------- */
.accordion{ border-top: 1px solid var(--line); }
.accordion details{
	border-bottom: 1px solid var(--line);
}
.accordion summary{
	cursor: pointer;
	list-style: none;
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	padding: 18px 4px;
	font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
	color: var(--ink);
}
.accordion summary::-webkit-details-marker{ display: none; }
.accordion summary::after{
	content: "+";
	flex: none; width: 26px; height: 26px; border-radius: 50%;
	background: var(--ink-100); color: var(--ink-700);
	display: grid; place-items: center; font-size: 1.1rem; font-weight: 700;
	transition: transform .2s ease;
}
.accordion details[open] summary::after{ content: "\2212"; }
.accordion .accordion-body{ padding: 0 4px 20px; color: #3B4A57; }
.accordion .accordion-body h4{ margin-top: 1.1em; }
.accordion .accordion-body > *:first-child{ margin-top: 0; }

/* ---------- FAQ (schema-freundlich) ---------- */
.faq .accordion summary{ font-size: 1.0rem; }

/* ---------- Callout / Hinweis ---------- */
.callout{
	border: 1.5px dashed var(--amber);
	background: var(--amber-soft);
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	font-size: 0.95rem;
	margin: 18px 0;
}
.callout strong{ color: var(--ink); }

/* ---------- Back to top ---------- */
.back-to-top{
	position: fixed; right: 18px; bottom: 18px; z-index: 90;
	width: 46px; height: 46px; border-radius: 50%;
	background: var(--ink-700); color: #fff; border: none;
	display: none; align-items: center; justify-content: center;
	font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow-md);
}
.back-to-top.is-visible{ display: flex; }

/* ---------- Footer ---------- */
.site-footer{
	background: var(--ink); color: #C7D2DA;
	padding: 44px 0 26px; margin-top: 40px;
}
.site-footer a{ color: #DCE6EC; }
.footer-grid{ display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; margin-bottom: 26px; }
.footer-grid h4{ color: #fff; font-size: 0.95rem; }
.footer-grid ul{ list-style: none; padding: 0; margin: 0; }
.footer-grid li{ margin-bottom: 8px; }
.footer-bottom{
	border-top: 1px solid rgba(255,255,255,0.14);
	padding-top: 18px; font-size: 0.82rem; color: #94A5B0;
	display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}
@media (max-width: 700px){ .footer-grid{ grid-template-columns: 1fr; } }

/* ---------- Utility spacing ---------- */
.mt-0{ margin-top: 0; }
.mb-0{ margin-bottom: 0; }
