/*
Theme Name:  StackFitter
Template:    generatepress
Description: StackFitter child theme for GeneratePress. Clean SaaS look: grotesk + serif + mono, black with a yellow accent.
Version:     1.2.2
Text Domain: stackfitter
*/

/* ---------- Tokens ---------- */
:root {
	--sf-ink: #0b0b0c;
	--sf-paper: #ffffff;
	--sf-bg: #f7f7f5;
	--sf-line: #e4e2dc;
	--sf-muted: #5f5e5a;
	--sf-beige: #ece6d8;
	--sf-yellow: #fff36b;
	--sf-sky: #b9d3f3;
	--sf-mist: #dfe8f2;
	--sf-cream: #f2ecdf;
	--sf-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--sf-serif: "Newsreader", Georgia, "Times New Roman", serif;
	--sf-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--sf-wrap: 1120px;
	--sf-read: 720px;
}

/* ---------- Base ---------- */
body {
	background: var(--sf-paper);
	color: var(--sf-ink);
	font-family: var(--sf-serif);
	font-size: 19px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
	font-family: var(--sf-sans);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.15;
	color: var(--sf-ink);
}
a { color: var(--sf-ink); }
a:hover, a:focus { color: var(--sf-ink); }
::selection { background: var(--sf-yellow); color: var(--sf-ink); }
:focus-visible { outline: 2px solid var(--sf-ink); outline-offset: 2px; }

.sf-serif { font-family: var(--sf-serif); font-weight: 400; letter-spacing: -0.02em; }
.sf-sans { font-family: var(--sf-sans); font-weight: 600; letter-spacing: -0.045em; }
.sf-mono { font-family: var(--sf-mono); font-size: 12px; letter-spacing: 0.02em; }
.sf-muted { color: var(--sf-muted); }
.sf-wrap { max-width: var(--sf-wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.sf-btn,
.wp-block-button__link,
button, input[type="submit"], input[type="button"] {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--sf-ink);
	color: #fff;
	border: 0;
	border-radius: 0;
	padding: 11px 16px;
	font-family: var(--sf-mono);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .15s ease;
}
.sf-btn::before { content: ""; width: 5px; height: 5px; background: currentColor; }
.sf-btn:hover, .sf-btn:focus,
.wp-block-button__link:hover,
button:hover, input[type="submit"]:hover {
	background: #2a2a2d;
	color: #fff;
}

/* ---------- Header ---------- */
.site-header {
	background: var(--sf-sky);
	border-bottom: 0;
}
.home .site-header,
.single .site-header,
.page .site-header,
.archive .site-header,
.blog .site-header,
.search .site-header,
.error404 .site-header { background: var(--sf-sky); }
.inside-header {
	max-width: var(--sf-wrap);
	padding: 18px 24px;
}
.site-logo img,
.header-image {
	height: 28px;
	width: auto;
}
.main-navigation,
.main-navigation ul ul { background: transparent; }
.main-navigation .main-nav ul li a {
	font-family: var(--sf-sans);
	font-size: 14px;
	font-weight: 500;
	color: var(--sf-ink);
	line-height: 44px;
	padding: 0 12px;
}
.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a,
.main-navigation .main-nav ul li.current-post-ancestor > a {
	color: var(--sf-ink);
	background: transparent;
	text-decoration: underline;
	text-decoration-color: var(--sf-ink);
	text-underline-offset: 6px;
	text-decoration-thickness: 1.5px;
}
.main-navigation .main-nav ul ul { background: var(--sf-paper); border: 1px solid var(--sf-line); }
.main-navigation .main-nav ul ul li a { line-height: 1.4; padding: 10px 14px; }
.menu-toggle, .main-navigation .menu-toggle {
	background: transparent;
	color: var(--sf-ink);
	font-family: var(--sf-sans);
}
.menu-toggle:hover { background: transparent; color: var(--sf-ink); }

/* ---------- Homepage shell (full-bleed) ---------- */
.home .site.grid-container { max-width: none; }
.home .site-content { display: block; padding: 0; }
.home .site { background: transparent; }

.sf-hero {
	background: linear-gradient(180deg, var(--sf-sky) 0%, var(--sf-mist) 45%, var(--sf-cream) 100%);
	padding: 88px 0 104px;
	text-align: center;
}
.sf-hero__title {
	margin: 0 auto;
	max-width: 900px;
	font-size: clamp(40px, 6.4vw, 76px);
	line-height: 1.02;
	font-weight: inherit;
}
.sf-hero__title span { display: block; }
.sf-hero__lede {
	max-width: 620px;
	margin: 22px auto 0;
	font-size: 20px;
	color: #2d2d30;
}
.sf-hero__actions {
	margin-top: 30px;
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.sf-section { padding: 96px 0; }
.sf-section__title {
	margin: 0 0 40px;
	text-align: center;
	font-size: clamp(32px, 4.2vw, 48px);
	line-height: 1.05;
	font-weight: inherit;
}
.sf-section__title span { display: block; }
.sf-section__title.sf-left { text-align: left; margin-bottom: 8px; }

.sf-how { background: var(--sf-beige); }
.sf-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.sf-card {
	background: var(--sf-paper);
	border-radius: 12px;
	padding: 26px 24px 24px;
}
.sf-card__icon { width: 26px; height: 26px; fill: var(--sf-ink); stroke: var(--sf-ink); }
.sf-card__icon .sf-hl { fill: var(--sf-yellow); stroke: var(--sf-ink); stroke-width: 1.2; }
.sf-card h3 { font-size: 17px; margin: 18px 0 6px; letter-spacing: -0.02em; }
.sf-card p { margin: 0; font-size: 16px; line-height: 1.5; color: #333336; }

.sf-latest__grid {
	display: grid;
	grid-template-columns: 1fr 1.6fr;
	gap: 48px;
	align-items: start;
}
.sf-latest__head p { margin: 0; font-size: 17px; }
.sf-latest__list { border-top: 1px solid var(--sf-line); }
.sf-item {
	display: grid;
	grid-template-columns: 132px 1fr;
	gap: 20px;
	align-items: center;
	padding: 18px 0;
	border-bottom: 1px solid var(--sf-line);
	text-decoration: none;
}
.sf-item__thumb {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: 6px;
	overflow: hidden;
	background: linear-gradient(135deg, var(--sf-mist), var(--sf-cream));
}
.sf-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-item__title {
	display: block;
	font-family: var(--sf-sans);
	font-weight: 600;
	font-size: 18px;
	letter-spacing: -0.02em;
	line-height: 1.25;
}
.sf-item:hover .sf-item__title { text-decoration: underline; text-underline-offset: 4px; }
.sf-item__meta { display: block; margin-top: 6px; color: var(--sf-muted); }
.sf-empty { padding: 28px 0; border-bottom: 1px solid var(--sf-line); }
.sf-empty p { margin: 0; }
.sf-empty .sf-mono { display: inline-block; background: var(--sf-yellow); padding: 3px 8px; margin-bottom: 10px; }

/* ---------- Posts, pages, archives ---------- */
body:not(.home) .site-content { padding: 56px 24px 88px; }
body:not(.home) .content-area { width: 100%; }
.separate-containers .site-main { margin: 0; }
.separate-containers .inside-article,
.one-container .inside-article,
.separate-containers .page-header,
.inside-page-header,
.no-results {
	background: transparent;
	padding: 0;
}
.separate-containers .page-header { margin-bottom: 8px; }
.error404 .site-main,
.search-no-results .site-main { max-width: 720px; margin: 0 auto; }
.single .inside-article,
.page:not(.home) .inside-article {
	max-width: var(--sf-read);
	margin: 0 auto;
}
.entry-title {
	font-size: clamp(34px, 4.6vw, 52px);
	line-height: 1.06;
	letter-spacing: -0.045em;
}
.entry-meta,
.entry-meta a,
.sf-readtime {
	font-family: var(--sf-mono);
	font-size: 12px;
	letter-spacing: 0.02em;
	color: var(--sf-muted);
	text-decoration: none;
}
.sf-readtime::before { content: "\00b7"; margin: 0 8px; }
.entry-content { font-size: 19px; }
.entry-content h2 { font-size: 30px; margin: 1.8em 0 .5em; }
.entry-content h3 { font-size: 22px; margin: 1.5em 0 .4em; }
.entry-content a {
	text-decoration: underline;
	text-decoration-color: rgba(11, 11, 12, .35);
	text-underline-offset: 3px;
}
.entry-content a:hover { background: var(--sf-yellow); text-decoration-color: var(--sf-ink); }
.entry-content blockquote {
	border-left: 3px solid var(--sf-ink);
	margin-left: 0;
	padding-left: 20px;
	font-style: italic;
}
.entry-content strong { font-weight: 600; }

/* Comparison tables */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--sf-line);
	font-family: var(--sf-sans);
	font-size: 15px;
	margin: 1.5em 0;
}
.entry-content th,
.entry-content td {
	border: 0;
	border-bottom: 1px solid var(--sf-line);
	padding: 12px 14px;
	text-align: left;
	vertical-align: top;
}
.entry-content thead th {
	background: var(--sf-bg);
	font-family: var(--sf-mono);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.entry-content tbody tr:last-child td { border-bottom: 0; }

/* Bar chart: <div class="sf-bars"><div class="sf-bar" style="--v:40%"><span>Label</span><b>$97</b></div></div> */
.sf-bars {
	margin: 1.5em 0;
	padding: 20px;
	border: 1px solid var(--sf-line);
	font-family: var(--sf-sans);
	font-size: 15px;
}
.sf-bars__title { font-weight: 600; margin: 0 0 4px; }
.sf-bars__note { font-family: var(--sf-mono); font-size: 12px; color: var(--sf-muted); margin: 0 0 16px; }
.sf-bar {
	display: grid;
	grid-template-columns: minmax(130px, 34%) 1fr;
	gap: 4px 12px;
	align-items: center;
	margin: 10px 0;
}
.sf-bar span { line-height: 1.3; }
.sf-bar b {
	position: relative;
	display: block;
	width: var(--v);
	min-width: max-content;
	background: var(--sf-ink);
	color: #fff;
	font-family: var(--sf-mono);
	font-size: 12px;
	font-weight: 500;
	padding: 6px 8px;
	white-space: nowrap;
}
.sf-bar.is-hl b { background: var(--sf-yellow); color: var(--sf-ink); box-shadow: inset 0 0 0 1.5px var(--sf-ink); }
.sf-credit { font-family: var(--sf-mono); font-size: 12px !important; color: var(--sf-muted); }
@media (max-width: 560px) {
	.sf-bar { grid-template-columns: 1fr; }
}

.sf-post-disclosure {
	font-family: var(--sf-mono);
	font-size: 12px !important;
	line-height: 1.5;
	color: var(--sf-muted);
	border: 1px solid var(--sf-line);
	padding: 10px 12px;
}

/* Archive & blog lists */
.archive .site-main,
.blog .site-main,
.search .site-main { max-width: 860px; margin: 0 auto; }
.archive .inside-article,
.blog .inside-article,
.search .inside-article { padding: 28px 0; border-bottom: 1px solid var(--sf-line); }
.archive .entry-title,
.blog .entry-title,
.search .entry-title { font-size: 26px; letter-spacing: -0.03em; }
.archive .entry-title a,
.blog .entry-title a { text-decoration: none; }
.page-header .page-title { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -0.045em; }
.read-more { font-family: var(--sf-mono); font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer .site-info {
	background: var(--sf-ink);
	color: #c9c8c4;
}
.inside-site-info { max-width: var(--sf-wrap); padding: 36px 24px; }
.copyright-bar {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-align: left;
	width: 100%;
	font-family: var(--sf-mono);
	font-size: 12px;
	line-height: 1.6;
}
.sf-copy { color: #fff; }
.sf-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sf-footer-links a { color: #fff; text-decoration: none; }
.sf-footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sf-disclosure { max-width: 640px; }

/* ---------- Duotone images (blue ink on cream, as in the template) ---------- */
:root {
	--sf-blue: #2b5ce6;
	--sf-blue-ink: #1f3fa8;
	--sf-blue-wash: #e8eefc;
}
/* Image frame: photos are shown as-is (styling happens in Photoshop before upload). */
.sf-duo {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--sf-cream);
	border-radius: 10px;
}
.sf-duo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.sf-duo:empty { background: linear-gradient(135deg, var(--sf-sky), var(--sf-cream)); }

/* ---------- Single post layout ---------- */
.single .site.grid-container { max-width: none; }
body.single .site-content { display: block; padding: 0; }
.single .site { background: transparent; }

.sf-article__head {
	background: linear-gradient(180deg, var(--sf-sky) 0%, var(--sf-mist) 55%, var(--sf-paper) 100%);
	padding: 72px 0 64px;
	text-align: center;
}
.sf-eyebrow { margin: 0 0 18px; color: #2d2d30; }
.sf-eyebrow a { text-decoration: none; background: var(--sf-yellow); padding: 3px 8px; color: var(--sf-ink); }
.sf-eyebrow span { margin: 0 6px; }
.sf-article__title {
	max-width: 900px;
	margin: 0 auto;
	font-size: clamp(36px, 5.6vw, 64px);
	line-height: 1.03;
	letter-spacing: -0.045em;
	font-weight: 600;
}
.sf-article__dek {
	max-width: 640px;
	margin: 20px auto 0;
	font-size: 21px;
	line-height: 1.5;
	color: #333336;
}
.sf-article__hero {
	max-width: 1040px;
	margin: 0 auto;
	padding: 0 24px;
}
.sf-article__hero .sf-duo { aspect-ratio: 16 / 9; }
.sf-article__meta {
	max-width: var(--sf-read);
	margin: 28px auto 0;
	padding: 0 24px 24px;
	display: flex;
	gap: 40px;
	border-bottom: 1px solid var(--sf-line);
}
.sf-article__meta div { display: flex; flex-direction: column; gap: 4px; }
.sf-article__meta .sf-mono { color: var(--sf-muted); }
.sf-article__meta b { font-family: var(--sf-sans); font-weight: 500; font-size: 15px; }
.sf-article__meta a { text-decoration: none; border-bottom: 1.5px solid var(--sf-yellow); }
.sf-article__body {
	max-width: var(--sf-read);
	margin: 0 auto;
	padding: 32px 24px 24px;
}
.sf-article__tags {
	max-width: var(--sf-read);
	margin: 0 auto 72px;
	padding: 0 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.sf-tag {
	font-family: var(--sf-mono);
	font-size: 12px;
	text-decoration: none;
	border: 1px solid var(--sf-line);
	padding: 5px 10px;
	border-radius: 999px;
}
.sf-tag:hover { background: var(--sf-blue-wash); border-color: var(--sf-blue); }

/* Section headings get a yellow marker */
.sf-article__body h2 { font-size: 32px; margin: 2em 0 .55em; }
.sf-article__body h2::before {
	content: "";
	display: inline-block;
	width: .38em;
	height: .38em;
	margin-right: .45em;
	vertical-align: .14em;
	background: var(--sf-yellow);
	box-shadow: inset 0 0 0 2px var(--sf-ink);
}
.sf-article__body h3 { font-size: 22px; }

/* Lists with square bullets */
.sf-article__body ul { list-style: none; margin-left: 0; padding-left: 0; }
.sf-article__body ul li { position: relative; padding-left: 22px; margin-bottom: .5em; }
.sf-article__body ul li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .62em;
	width: 7px;
	height: 7px;
	background: var(--sf-blue);
}

/* Tables: blue header, beige stripes, bold first column */
.sf-article__body table { border: 0; box-shadow: 0 0 0 1px var(--sf-line); }
.sf-article__body thead th {
	background: var(--sf-blue);
	color: #fff;
	border-bottom: 0;
}
.sf-article__body tbody tr:nth-child(even) td { background: #faf7f0; }
.sf-article__body tbody td:first-child { font-weight: 600; }

/* Callouts written in posts as <div class="..." markdown="1"> */
.sf-answer {
	position: relative;
	background: var(--sf-yellow);
	box-shadow: inset 0 0 0 1.5px var(--sf-ink);
	padding: 40px 26px 24px;
	margin: 0 0 1.6em;
	font-size: 19px;
}
.sf-answer::before {
	content: "Short answer";
	position: absolute;
	top: 14px;
	left: 26px;
	font-family: var(--sf-mono);
	font-size: 12px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.sf-answer p:last-child { margin-bottom: 0; }
.sf-note {
	background: var(--sf-blue-wash);
	border-left: 3px solid var(--sf-blue);
	padding: 14px 18px;
	font-family: var(--sf-mono);
	font-size: 13px !important;
	line-height: 1.6;
	margin: 0 0 1.6em;
}
.sf-note p { margin: 0; }
.sf-verdict {
	background: var(--sf-ink);
	color: #fff;
	padding: 34px 30px 30px;
	margin: 2.4em 0 1.6em;
}
.sf-verdict h2 { color: #fff; margin-top: 0 !important; }
.sf-verdict h2::before { box-shadow: none; }
.sf-verdict a:not(.sf-btn) { color: #fff; }
.sf-verdict strong { color: var(--sf-yellow); }
.sf-verdict p:last-child { margin-bottom: 0; }
.sf-btn--yellow,
.entry-content a.sf-btn--yellow {
	background: var(--sf-yellow);
	color: var(--sf-ink);
	text-decoration: none;
}
.entry-content a.sf-btn { text-decoration: none; color: #fff; }
.entry-content a.sf-btn--yellow { color: var(--sf-ink); }
.sf-btn--yellow:hover,
.entry-content a.sf-btn--yellow:hover { background: #fff; color: var(--sf-ink); }
.entry-content a.sf-btn:hover { background: #2a2a2d; }
.sf-cta { margin: 1.4em 0; }

/* ---------- Recent articles ---------- */
.sf-recent { border-top: 1px solid var(--sf-line); padding: 72px 0 88px; }
.sf-recent__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.sf-recent__head h2 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.045em; }
.sf-recent__head a { color: var(--sf-ink); }
.sf-recent__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.sf-card-post { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.sf-card-post__img { aspect-ratio: 4 / 3; }
.sf-card-post__meta { color: var(--sf-muted); }
.sf-card-post__title { font-family: var(--sf-sans); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; line-height: 1.25; }
.sf-card-post:hover .sf-card-post__title { text-decoration: underline; text-underline-offset: 4px; }
.sf-card-post__dek { font-size: 16px; line-height: 1.5; color: #333336; }

/* ---------- Yellow halftone wordmark band ---------- */
.sf-band {
	/* Owner-supplied halftone texture (brand/yellow-halftone.webp) */
	background: url(assets/textures/yellow-halftone.webp) center / cover no-repeat, #efd53c;
	overflow: hidden;
	padding-top: 56px;
}
.sf-band__top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.sf-band__line { margin: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; }
.sf-band__word {
	margin: 28px 0 0;
	text-align: center;
	font-family: var(--sf-sans);
	font-weight: 700;
	font-size: clamp(72px, 19.5vw, 280px);
	letter-spacing: -0.065em;
	line-height: .78;
	color: var(--sf-ink);
	transform: translateY(6%);
	white-space: nowrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.sf-cards { grid-template-columns: 1fr; }
	.sf-latest__grid { grid-template-columns: 1fr; gap: 24px; }
	.sf-recent__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
	body { font-size: 18px; }
	.inside-header { padding: 12px 16px; }
	.sf-wrap { padding: 0 16px; }
	.sf-hero { padding: 56px 0 72px; }
	.sf-hero__lede { font-size: 18px; }
	.sf-section { padding: 64px 0; }
	.sf-item { grid-template-columns: 96px 1fr; gap: 14px; }
	body:not(.home) .site-content { padding: 36px 16px 64px; }
	body.single .site-content { padding: 0; }
	.entry-content table { display: block; overflow-x: auto; }
	.sf-article__head { padding: 48px 0 40px; }
	.sf-article__dek { font-size: 18px; }
	.sf-article__hero { padding: 0 16px; }
	.sf-article__meta { padding: 0 16px 20px; gap: 24px; flex-wrap: wrap; }
	.sf-article__body { padding: 24px 16px 16px; }
	.sf-article__body h2 { font-size: 27px; }
	.sf-article__tags { padding: 0 16px; }
	.sf-answer { padding: 38px 18px 20px; }
	.sf-answer::before { left: 18px; }
	.sf-verdict { padding: 28px 20px 24px; }
	.sf-recent { padding: 56px 0 64px; }
	.sf-recent__grid { grid-template-columns: 1fr; gap: 32px; }
	.sf-band { padding-top: 40px; }
	.main-navigation.toggled .main-nav ul li a { line-height: 48px; }
}
