/*
Theme Name: Stone Calculator
Theme URI: https://stonecalculator.net
Author: Stone Calculator
Description: Lightweight block theme for the Stone Calculator stone & gravel calculator site. Cream background, white cards, navy header, cyan accents, Inter typography.
Version: 1.2.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stonecalc-theme
*/

/* ---- Global polish beyond theme.json ---- */

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { text-underline-offset: 2px; }

/* Header — dark navy like the reference */
.sc-site-header {
	background: #0f172a;
	position: sticky;
	top: 0;
	z-index: 50;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 12px rgba(15, 23, 42, 0.25);
}
.sc-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.8rem 1.25rem;
}
.sc-logo {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-weight: 800;
	font-size: 1.2rem;
	color: #ffffff;
	text-decoration: none;
	white-space: nowrap;
	letter-spacing: -0.01em;
}
.sc-logo-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.15rem;
	height: 2.15rem;
	border-radius: 9px;
	background: #06b6d4;
	color: #fff;
	flex: none;
}
.sc-logo-mark svg { width: 100%; height: 100%; display: block; }
.sc-logo-text { font-weight: 400; letter-spacing: -0.015em; }
.sc-logo-text strong { font-weight: 800; }
.sc-nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.sc-nav a {
	color: #cbd5e1;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 600;
	padding: 0.35rem 0;
}
.sc-nav a:hover { color: #ffffff; }
.sc-nav .sc-nav-cta {
	background: #06b6d4;
	color: #fff;
	padding: 0.55rem 1.15rem;
	border-radius: 8px;
	font-weight: 600;
}
.sc-nav .sc-nav-cta:hover { background: #0891b2; color: #fff; }
@media (max-width: 640px) {
	.sc-header-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
	.sc-nav { gap: 1rem; }
}

/* Hero on the homepage */
.sc-hero { text-align: center; padding: 1.8rem 0 0.5rem; }
.sc-hero h1 {
	font-size: clamp(2rem, 5vw, 3.4rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.02em;
	margin-bottom: 1rem;
	color: #1e293b;
}
.sc-lead { font-size: 1.12rem; color: #475569; line-height: 1.7; max-width: 46em; margin-left: auto; margin-right: auto; }

/* Content typography */
.wp-block-post-content h2 { margin-top: 2.4rem; letter-spacing: -0.015em; }
.wp-block-post-content h3 { margin-top: 1.5rem; }
.wp-block-post-content li { margin-bottom: 0.35rem; }

/* Tables — white cards on the cream page */
.wp-block-table { overflow-x: auto; }
.wp-block-table table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	font-size: 0.95rem;
	background: #ffffff;
	border: 1px solid #e2ddd1;
	border-radius: 10px;
	overflow: hidden;
}
.wp-block-table th, .wp-block-table td {
	border: 0;
	border-bottom: 1px solid #eee9de;
	padding: 0.65rem 0.85rem;
	text-align: left;
}
.wp-block-table tbody tr:last-child td { border-bottom: 0; }
.wp-block-table thead th { background: #f8f6f1; font-weight: 700; color: #0f172a; border-bottom: 1px solid #e2ddd1; }

/* Page title block */
.sc-page-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.15; letter-spacing: -0.02em; }

/* Breadcrumbs on blog posts (plugin CSS is not enqueued there) */
.sc-breadcrumbs { font-size: 0.85rem; color: #64748b; margin: 0 0 1rem; }
.sc-breadcrumbs a { color: #64748b; text-decoration: none; }
.sc-breadcrumbs a:hover { color: #0e7490; }
.sc-crumb-sep { margin: 0 0.45rem; color: #c6bfae; }
.sc-breadcrumbs [aria-current] { color: #0f172a; font-weight: 600; }

/* Blog index — post cards */
.wp-block-query .wp-block-post-template { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.wp-block-query .wp-block-post {
	background: #ffffff;
	border: 1px solid #e2ddd1;
	border-radius: 10px;
	padding: 1.4rem 1.5rem;
	margin-bottom: 1rem;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wp-block-query .wp-block-post:hover { border-color: #06b6d4; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08); }
.wp-block-query .wp-block-post-title { margin: 0 0 0.3rem; font-size: 1.2rem; letter-spacing: -0.01em; }
.wp-block-query .wp-block-post-title a { color: #0f172a; text-decoration: none; }
.wp-block-query .wp-block-post-title a:hover { color: #0e7490; }
.wp-block-query .wp-block-post-excerpt { color: #64748b; font-size: 0.95rem; line-height: 1.6; }
.wp-block-query .wp-block-post-excerpt__more-link { color: #0e7490; font-weight: 600; text-decoration: none; }
.wp-block-query .wp-block-post-date { color: #94a3b8; font-size: 0.82rem; }
.wp-block-query-pagination { margin-top: 1.5rem; font-weight: 600; }
.wp-block-query-pagination a { color: #0e7490; text-decoration: none; }

/* Single post niceties */
.wp-block-post-content a { color: #0e7490; }
.wp-block-post-content blockquote {
	border-left: 4px solid #06b6d4;
	background: #ffffff;
	border-radius: 0 10px 10px 0;
	padding: 0.9rem 1.2rem;
	margin: 1.5rem 0;
	color: #334155;
	font-size: 1.08rem;
	font-style: italic;
}

/* Article meta strip: category eyebrow + reading time — the first visual
   cue that a post's template differs from its neighbors. */
.sc-article-meta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0.25rem 0 1.5rem;
	flex-wrap: wrap;
}
.sc-article-eyebrow {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	color: #fff;
	background: #0f172a;
}
.sc-article-eyebrow.sc-cat-cost-guides { background: #b45309; }
.sc-article-eyebrow.sc-cat-how-to-guides { background: #0e7490; }
.sc-article-eyebrow.sc-cat-materials-explained { background: #4d7c0f; }
.sc-article-eyebrow.sc-cat-comparisons { background: #7e22ce; }
.sc-article-readtime { font-size: 0.85rem; color: #94a3b8; font-weight: 600; }
.sc-article-readtime::before { content: "⏱ "; }

/* Auto table of contents — only rendered on long-tier posts */
.sc-toc {
	background: #ffffff;
	border: 1px solid #e2ddd1;
	border-left: 4px solid #06b6d4;
	border-radius: 10px;
	padding: 1.1rem 1.3rem;
	margin: 0 0 1.8rem;
}
.sc-toc-label {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #0e7490;
	margin-bottom: 0.5rem;
}
.sc-toc ol { margin: 0; padding-left: 1.2rem; columns: 1; }
.sc-toc li { margin-bottom: 0.35rem; font-size: 0.92rem; }
.sc-toc a { color: #334155; text-decoration: none; }
.sc-toc a:hover { color: #0e7490; text-decoration: underline; }
@media (min-width: 640px) {
	.sc-toc ol { columns: 2; column-gap: 1.5rem; }
}

/* Flourish blocks articles use to vary structure by category:
   stat grid (cost guides), verdict box (comparisons),
   callout (materials/how-to), numbered steps (how-to). */
.sc-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.9rem;
	margin: 1.5rem 0;
}
.sc-stat-card {
	background: #ffffff;
	border: 1px solid #e2ddd1;
	border-top: 3px solid #b45309;
	border-radius: 10px;
	padding: 1rem;
	text-align: center;
}
.sc-stat-card .sc-stat-num { display: block; font-size: 1.6rem; font-weight: 800; color: #0f172a; line-height: 1.15; }
.sc-stat-card .sc-stat-label { display: block; font-size: 0.78rem; color: #64748b; margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 0.04em; }

.sc-verdict {
	background: #0f172a;
	color: #e2e8f0;
	border-radius: 12px;
	padding: 1.25rem 1.4rem;
	margin: 1.6rem 0;
	border-top: 3px solid #7e22ce;
}
.sc-verdict-label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #d8b4fe; margin-bottom: 0.4rem; }
.sc-verdict p { margin: 0; color: #f1f5f9; line-height: 1.6; }
.sc-verdict strong { color: #fff; }

.sc-callout {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-left: 4px solid #4d7c0f;
	border-radius: 0 10px 10px 0;
	padding: 1rem 1.25rem;
	margin: 1.5rem 0;
}
.sc-callout p { margin: 0; color: #14532d; line-height: 1.6; }
.sc-callout p:first-child strong:first-child { color: #166534; }

.sc-steps { counter-reset: sc-step; list-style: none; margin: 1.5rem 0; padding: 0; }
.sc-steps li {
	counter-increment: sc-step;
	position: relative;
	padding: 0.9rem 1rem 0.9rem 3.2rem;
	background: #ffffff;
	border: 1px solid #e2ddd1;
	border-radius: 10px;
	margin-bottom: 0.7rem;
}
.sc-steps li::before {
	content: counter(sc-step);
	position: absolute;
	left: 0.9rem;
	top: 0.9rem;
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 999px;
	background: #0e7490;
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Footer — dark navy like the reference */
.sc-site-footer {
	background: #0f172a;
	color: #94a3b8;
	margin-top: 3.5rem;
	font-size: 0.9rem;
}
.sc-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.4rem 1.25rem 2.6rem;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 2rem;
}
@media (max-width: 700px) { .sc-footer-inner { grid-template-columns: 1fr; } }
.sc-footer-inner h4 { margin: 0 0 0.6rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: #e2e8f0; }
.sc-footer-inner ul { list-style: none; margin: 0; padding: 0; }
.sc-footer-inner li { margin-bottom: 0.4rem; }
.sc-footer-inner a { color: #94a3b8; text-decoration: none; }
.sc-footer-inner a:hover { color: #67e8f9; }
.sc-footer-note { max-width: 34em; line-height: 1.6; }
.sc-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	text-align: center;
	padding: 1rem;
	font-size: 0.82rem;
	color: #64748b;
}
