/*
Theme Name: Bankrolled
Theme URI: https://bankrolled.example
Description: A clean, modern 2026 finance blog child theme for Blocksy. Features dark/light mode, EARN/GROW/PROTECT hero pillars, featured category grids, and newsletter signup.
Author: Bankrolled
Template: blocksy
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bankrolled
Tags: blog, finance, dark-mode, custom-colors, full-width-template, block-patterns
*/

/* Minimal reset — Blocksy handles most base styles. */
:root {
	--bk-bg: #f8fafc;
	--bk-surface: #ffffff;
	--bk-text: #0f172a;
	--bk-muted: #64748b;
	--bk-border: #e2e8f0;
	--bk-accent: #0d9488;
	--bk-accent-hover: #0f766e;
	--bk-earn: #059669;
	--bk-grow: #2563eb;
	--bk-protect: #7c3aed;
	--bk-radius: 0.75rem;
	--bk-shadow: 0 1px 3px rgb(15 23 42 / 0.08);
	--bk-max: 72rem;
	--bk-gap: clamp(1rem, 3vw, 2rem);
	--bk-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] body {
	background-color: var(--bk-bg);
	color: var(--bk-text);
}

[data-theme="dark"] {
	--bk-bg: #0b1120;
	--bk-surface: #111827;
	--bk-text: #f1f5f9;
	--bk-muted: #94a3b8;
	--bk-border: #1e293b;
	--bk-shadow: 0 1px 3px rgb(0 0 0 / 0.4);
}

/* Theme toggle */
.bk-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--bk-border);
	border-radius: 50%;
	background: var(--bk-surface);
	color: var(--bk-text);
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}

.bk-theme-toggle:hover,
.bk-theme-toggle:focus-visible {
	border-color: var(--bk-accent);
	outline: none;
}

.bk-theme-toggle svg {
	width: 1.25rem;
	height: 1.25rem;
}

.bk-theme-toggle [data-icon="sun"],
[data-theme="dark"] .bk-theme-toggle [data-icon="moon"] {
	display: none;
}

[data-theme="dark"] .bk-theme-toggle [data-icon="sun"] {
	display: block;
}

.bk-theme-toggle [data-icon="moon"] {
	display: block;
}

/* Front-page sections */
.bk-front {
	font-family: var(--bk-font);
	color: var(--bk-text);
	background: var(--bk-bg);
}

.bk-section {
	width: min(100% - 2rem, var(--bk-max));
	margin-inline: auto;
	padding-block: var(--bk-gap);
}

.bk-section__title {
	margin: 0 0 0.25rem;
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
}

.bk-section__lead {
	margin: 0 0 var(--bk-gap);
	color: var(--bk-muted);
	font-size: 1.0625rem;
	max-width: 42ch;
}

/* Hero */
.bk-hero {
	padding-block: clamp(2.5rem, 8vw, 5rem);
	text-align: center;
}

.bk-hero__eyebrow {
	display: inline-block;
	margin-bottom: 0.75rem;
	padding: 0.25rem 0.75rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bk-accent);
	background: color-mix(in srgb, var(--bk-accent) 12%, transparent);
	border-radius: 999px;
}

.bk-hero__title {
	margin: 0 0 1rem;
	font-size: clamp(2rem, 6vw, 3.25rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.bk-hero__subtitle {
	margin: 0 auto 2.5rem;
	max-width: 36rem;
	font-size: clamp(1rem, 2.5vw, 1.25rem);
	color: var(--bk-muted);
	line-height: 1.6;
}

.bk-pillars {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 640px) {
	.bk-pillars {
		grid-template-columns: repeat(3, 1fr);
	}
}

.bk-pillar {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 8rem;
	padding: 1.5rem 1rem;
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	font-weight: 800;
	letter-spacing: 0.08em;
	text-decoration: none;
	color: #fff;
	border-radius: var(--bk-radius);
	box-shadow: var(--bk-shadow);
	transition: transform 0.2s, box-shadow 0.2s;
}

.bk-pillar:hover,
.bk-pillar:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgb(15 23 42 / 0.15);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.bk-pillar--earn {
	background: linear-gradient(135deg, var(--bk-earn), #047857);
}

.bk-pillar--grow {
	background: linear-gradient(135deg, var(--bk-grow), #1d4ed8);
}

.bk-pillar--protect {
	background: linear-gradient(135deg, var(--bk-protect), #6d28d9);
}

.bk-pillar__label {
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0;
	opacity: 0.9;
}

/* Featured grid */
.bk-featured {
	padding-block: var(--bk-gap);
}

.bk-featured__group {
	margin-bottom: 2.5rem;
}

.bk-featured__group:last-child {
	margin-bottom: 0;
}

.bk-featured__group .bk-section__title a {
	color: inherit;
	text-decoration: none;
}

.bk-featured__group .bk-section__title a:hover {
	color: var(--bk-accent);
}

.bk-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.bk-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.bk-grid--3 {
		grid-template-columns: repeat(3, 1fr);
	}
}

.bk-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--bk-surface);
	border: 1px solid var(--bk-border);
	border-radius: var(--bk-radius);
	box-shadow: var(--bk-shadow);
	transition: border-color 0.2s, transform 0.2s;
}

.bk-card:hover {
	border-color: var(--bk-accent);
	transform: translateY(-2px);
}

.bk-card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--bk-border);
}

.bk-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bk-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.25rem;
}

.bk-card__cat {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--bk-accent);
}

.bk-card__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.35;
}

.bk-card__title a {
	color: inherit;
	text-decoration: none;
}

.bk-card__title a:hover {
	color: var(--bk-accent);
}

.bk-card__excerpt {
	margin: 0;
	flex: 1;
	font-size: 0.9375rem;
	color: var(--bk-muted);
	line-height: 1.5;
}

.bk-card__meta {
	font-size: 0.8125rem;
	color: var(--bk-muted);
}

/* Newsletter */
.bk-newsletter {
	margin-block: var(--bk-gap);
	padding: clamp(2rem, 5vw, 3rem);
	text-align: center;
	background: var(--bk-surface);
	border: 1px solid var(--bk-border);
	border-radius: var(--bk-radius);
	box-shadow: var(--bk-shadow);
}

.bk-newsletter__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	font-weight: 700;
}

.bk-newsletter__text {
	margin: 0 auto 1.5rem;
	max-width: 32rem;
	color: var(--bk-muted);
}

.bk-newsletter__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	max-width: 28rem;
	margin-inline: auto;
}

.bk-newsletter__input {
	flex: 1 1 12rem;
	min-width: 0;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	border: 1px solid var(--bk-border);
	border-radius: var(--bk-radius);
	background: var(--bk-bg);
	color: var(--bk-text);
}

.bk-newsletter__input:focus {
	border-color: var(--bk-accent);
	outline: 2px solid color-mix(in srgb, var(--bk-accent) 30%, transparent);
	outline-offset: 0;
}

.bk-newsletter__submit {
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	background: var(--bk-accent);
	border: none;
	border-radius: var(--bk-radius);
	cursor: pointer;
	transition: background 0.2s;
}

.bk-newsletter__submit:hover,
.bk-newsletter__submit:focus-visible {
	background: var(--bk-accent-hover);
	outline: none;
}

.bk-newsletter__note {
	margin: 1rem 0 0;
	font-size: 0.8125rem;
	color: var(--bk-muted);
}

/* Utility */
.bk-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.bk-empty {
	padding: 2rem;
	text-align: center;
	color: var(--bk-muted);
}

/* Contact page */
.bk-contact {
	padding-block: clamp(2rem, 6vw, 4rem);
}

.bk-contact__header {
	margin-bottom: var(--bk-gap);
}

.bk-contact__grid {
	display: grid;
	gap: var(--bk-gap);
}

@media (min-width: 900px) {
	.bk-contact__grid {
		grid-template-columns: 1fr 1.2fr;
		align-items: start;
	}
}

.bk-contact__info {
	display: grid;
	gap: 1rem;
}

.bk-contact__card {
	padding: 1.25rem;
	background: var(--bk-surface);
	border: 1px solid var(--bk-border);
	border-radius: var(--bk-radius);
	box-shadow: var(--bk-shadow);
}

.bk-contact__card-title {
	margin: 0 0 0.35rem;
	font-size: 1rem;
	font-weight: 700;
}

.bk-contact__card-text {
	margin: 0 0 0.75rem;
	font-size: 0.9375rem;
	color: var(--bk-muted);
}

.bk-contact__link {
	display: block;
	color: var(--bk-accent);
	text-decoration: none;
	font-weight: 600;
}

.bk-contact__link + .bk-contact__link {
	margin-top: 0.35rem;
}

.bk-contact__link:hover {
	text-decoration: underline;
}

.bk-contact__note {
	margin: 0;
	font-size: 0.875rem;
	color: var(--bk-muted);
}

.bk-contact__form-wrap {
	padding: clamp(1.25rem, 4vw, 2rem);
	background: var(--bk-surface);
	border: 1px solid var(--bk-border);
	border-radius: var(--bk-radius);
	box-shadow: var(--bk-shadow);
}

.bk-contact__form-title {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	font-weight: 700;
}

.bk-contact__form {
	display: grid;
	gap: 1rem;
}

.bk-field__label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.bk-field__input {
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	border: 1px solid var(--bk-border);
	border-radius: var(--bk-radius);
	background: var(--bk-bg);
	color: var(--bk-text);
}

.bk-field__textarea {
	min-height: 9rem;
	resize: vertical;
}

.bk-field__input:focus {
	border-color: var(--bk-accent);
	outline: 2px solid color-mix(in srgb, var(--bk-accent) 30%, transparent);
	outline-offset: 0;
}

.bk-notice {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: var(--bk-radius);
	font-size: 0.9375rem;
}

.bk-notice--success {
	background: color-mix(in srgb, var(--bk-earn) 12%, var(--bk-surface));
	border: 1px solid color-mix(in srgb, var(--bk-earn) 35%, var(--bk-border));
}

.bk-notice--error {
	background: color-mix(in srgb, #dc2626 10%, var(--bk-surface));
	border: 1px solid color-mix(in srgb, #dc2626 30%, var(--bk-border));
}
