/*
Theme Name: Concrete Slab Planner
Theme URI: https://concreteslabplanner.com
Author: ConcreteSlabPlanner
Description: Fast, clean theme for ConcreteSlabPlanner.com — concrete gray with safety-orange accents, mobile-first, built for calculators, programmatic SEO pages and blog posts. Use with the "Concrete Slab Planner Core" plugin.
Version: 1.2.0
Requires at least: 6.0
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: cspt
Tags: one-column, two-columns, custom-logo, custom-menu, featured-images, blog
*/

:root {
	--ink: #1f2328;
	--ink-2: #3a4148;
	--muted: #5b636b;
	--line: #d9dde1;
	--bg: #ffffff;
	--bg-alt: #f4f5f6;
	--concrete: #e9ebed;
	--accent: #f26b1d;
	--accent-dark: #c9530f;
	--radius: 12px;
	--max: 1180px;
	--narrow: 860px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); margin: 1.6em 0 .5em; font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: .3em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: var(--narrow); }
.csp-vp .container { max-width: var(--narrow); }

.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; word-wrap: normal !important; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 100000; background: #fff; padding: 10px 14px; border-radius: 6px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 500; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.site-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.site-logo:hover { color: var(--ink); }
.logo-mark { width: 34px; height: 34px; border-radius: 8px; background: #1f2328 url(/wp-content/uploads/2026/12/csp-logo-mark.png) center / cover no-repeat; flex: none; }
.logo-text span { color: var(--accent); }
.custom-logo { max-height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 8px 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: 6px; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--ink); background: var(--bg-alt); }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; flex-direction: column; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.header-search input { width: 150px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; background: var(--bg-alt); }
.header-cta { padding: 8px 14px !important; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; width: 44px; height: 40px; cursor: pointer; }
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after { display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; content: ""; transition: transform .2s; }
.menu-toggle-bars::before { position: absolute; top: -6px; }
.menu-toggle-bars::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 980px) {
	.menu-toggle { display: block; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 20px 18px; gap: 10px; }
	.main-nav.is-open { display: flex; }
	.main-nav ul { flex-direction: column; }
	.main-nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding-left: 12px; }
	.header-search input { width: 100%; }
}

/* Sections / home */
.site-main { padding-bottom: 40px; }
.section { padding: 44px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0 0 6px; }
.section-head a { font-weight: 600; text-decoration: none; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-dark); text-decoration: none; margin-bottom: 6px; }

.hero { background:
	radial-gradient(circle at 15% 20%, rgba(255,255,255,.7) 0 2px, transparent 3px) 0 0 / 22px 22px,
	linear-gradient(180deg, var(--concrete), #f7f8f9); border-bottom: 1px solid var(--line); padding: 44px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1fr minmax(320px, 520px); gap: 36px; align-items: start; }
.hero h1 { margin-top: 0; }
.hero-lead { font-size: 1.12rem; color: var(--ink-2); }
.hero-points { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; color: var(--ink-2); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-calc .csp-calc-wrap { margin-top: 0; box-shadow: 0 12px 36px rgba(31,35,40,.12); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.pill-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list a { display: inline-block; padding: 7px 14px; background: #fff; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; }
.pill-list a:hover { border-color: var(--accent); color: var(--accent-dark); }

.state-jump { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; max-width: 560px; }
.state-jump select { flex: 1; min-width: 220px; padding: 11px 12px; font-size: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.trust-item { background: var(--bg-alt); border-radius: var(--radius); padding: 18px 20px; }
.trust-item h3 { margin-top: 0; }
.trust-item p { margin: 0; color: var(--ink-2); }

/* Posts */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 18px 0; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card-thumb { display: block; aspect-ratio: 16/9; background: var(--concrete); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #cfd3d7, var(--concrete) 60%, #f6c3a4); }
.post-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.post-card-title { margin: 0 0 6px; font-size: 1.12rem; }
.post-card-title a { color: var(--ink); text-decoration: none; }
.post-card-title a:hover { color: var(--accent-dark); }
.post-card p { color: var(--ink-2); font-size: .95rem; flex: 1; }
.post-card-meta { font-size: .82rem; color: var(--muted); }

.archive-header { padding: 20px 0 6px; }
.archive-description { color: var(--ink-2); }
.cat-pills { margin-bottom: 10px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.nav-links .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); }
.nav-links .current { background: var(--ink); color: #fff; border-color: var(--ink); }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; }
@media (max-width: 1000px) { .post-layout { grid-template-columns: 1fr; } }
.post-article { min-width: 0; }
.entry-header { margin: 10px 0 18px; }
.entry-title { margin-bottom: 10px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; }
.entry-thumb { margin: 0 0 22px; }
.entry-thumb img { border-radius: var(--radius); width: 100%; }

.entry-content { font-size: 1.06rem; }
.entry-content > * { max-width: 100%; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin: .3em 0; }
.entry-content blockquote { margin: 1.5em 0; padding: 12px 18px; border-left: 4px solid var(--accent); background: var(--bg-alt); border-radius: 6px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.entry-content img { border-radius: 8px; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
.entry-content h2[id], .entry-content h3[id] { scroll-margin-top: 90px; }

.toc { background: var(--bg-alt); border-radius: var(--radius); padding: 4px 18px; margin: 0 0 22px; }
.toc summary { font-weight: 700; cursor: pointer; padding: 10px 0; }
.toc-list { margin: 0 0 12px; padding-left: 1.2em; }
.toc-list li { margin: 4px 0; }
.toc-list .toc-sub { margin-left: 1em; list-style: circle; font-size: .95rem; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--accent-dark); }

.post-sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 1000px) { .post-sidebar { position: static; } }
.sidebar-box, .widget { background: var(--bg-alt); border-radius: var(--radius); padding: 16px 18px; }
.sidebar-box h3, .widget-title { margin-top: 0; font-size: 1.05rem; }
.sidebar-box ul { list-style: none; padding: 0; margin: 0; }
.sidebar-box li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.sidebar-box li:last-child { border-bottom: 0; }
.sidebar-box a { text-decoration: none; color: var(--ink-2); }
.sidebar-cta { background: var(--ink); color: #fff; }
.sidebar-cta h3 { color: #fff; }
.sidebar-cta p { color: #cfd4d9; }

.entry-footer { margin-top: 26px; }
.tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px; background: var(--bg-alt); border-radius: 999px; font-size: .85rem; text-decoration: none; color: var(--ink-2); }
.author-box { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 18px 0; }
.author-box img { border-radius: 50%; }
.author-box p { margin: 4px 0 0; color: var(--ink-2); font-size: .95rem; }
.related-posts { margin-top: 30px; }

.comments-area { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 10px; }
.comment-list { padding-left: 0; list-style: none; }
.comment-body { border-bottom: 1px solid var(--line); padding: 12px 0; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.comment-form .submit { background: var(--accent); color: #fff; border: 0; padding: 10px 18px; border-radius: 8px; font-weight: 700; cursor: pointer; }

.search-form { display: flex; gap: 8px; margin: 14px 0 22px; max-width: 560px; }
.search-field { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; }
.error-404 { padding: 30px 20px; }

/* Virtual pages */
.csp-vp-header { margin: 8px 0 14px; }
.csp-vp-title { margin-bottom: 6px; }
.csp-vp-content h2 { margin-top: 1.8em; }

/* Footer */
.site-footer { background: #1b1f23; color: #c4cad0; margin-top: 40px; font-size: .94rem; }
.site-footer a { color: #e5e8eb; text-decoration: none; }
.site-footer a:hover { color: #ffb58a; }
.site-footer .site-logo { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-top: 44px; padding-bottom: 26px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: #fff; font-size: 1rem; margin: 6px 0 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 6px 0; }
.footer-small { font-size: .82rem; color: #8f979f; }
.footer-bottom { border-top: 1px solid #2f353b; padding-top: 16px; padding-bottom: 20px; font-size: .85rem; color: #8f979f; }
.footer-bottom p { margin: 0; }

/* WordPress core */
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .85rem; color: var(--muted); }
.sticky .post-card-title::before { content: "★ "; color: var(--accent); }
.bypostauthor { }
.gallery-caption { }
.csp-breadcrumbs { padding-top: 18px; }

/* ---------- Motion & hover (v1.1) ---------- */
.site-header { transition: box-shadow .25s ease, background-color .25s ease; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(31,35,40,.08); }
.logo-mark { transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.site-logo:hover .logo-mark { transform: scale(1.08); }

.main-nav a { position: relative; transition: color .15s ease, background-color .15s ease; }
.main-nav > ul > li > a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .22s ease; border-radius: 2px; }
.main-nav > ul > li > a:hover::after, .main-nav > ul > .current-menu-item > a::after { transform: scaleX(1); }
.header-search input { transition: width .25s ease, border-color .2s ease, background-color .2s ease; }
.header-search input:focus { width: 200px; background: #fff; border-color: var(--accent); outline: none; }
@media (max-width: 980px) { .header-search input:focus { width: 100%; } .main-nav.is-open { animation: cspt-drop .22s ease; } }
@keyframes cspt-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.hero { background-size: 22px 22px, 100% 100%; animation: cspt-dots 40s linear infinite; }
@keyframes cspt-dots { from { background-position: 0 0, 0 0; } to { background-position: 220px 110px, 0 0; } }
.hero-copy > * { animation: cspt-rise .6s ease both; }
.hero-copy > *:nth-child(2) { animation-delay: .06s; }
.hero-copy > *:nth-child(3) { animation-delay: .12s; }
.hero-copy > *:nth-child(4) { animation-delay: .18s; }
.hero-copy > *:nth-child(5) { animation-delay: .24s; }
.hero-calc { animation: cspt-rise .7s .15s ease both; }
@keyframes cspt-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.pill-list a { transition: border-color .15s ease, color .15s ease, background-color .15s ease, transform .15s ease; }
.pill-list a:hover { background: #fff4ec; transform: translateY(-2px); }

.post-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(31,35,40,.10); border-color: #c4c9ce; }
.post-card-thumb { overflow: hidden; }
.post-card-thumb img, .thumb-placeholder { transition: transform .5s ease; }
.post-card:hover .post-card-thumb img, .post-card:hover .thumb-placeholder { transform: scale(1.05); }
.post-card-title a { transition: color .15s ease; }

.trust-item { transition: transform .2s ease, box-shadow .2s ease; }
.trust-item:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(31,35,40,.08); }
.sidebar-box li a { transition: color .15s ease, padding-left .15s ease; }
.sidebar-box li a:hover { color: var(--accent-dark); padding-left: 4px; }
.site-footer a { transition: color .15s ease; }
.entry-content a { transition: color .15s ease; }

/* Scroll reveal (added by theme.js; content stays visible without JS) */
.js-anim .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--reveal-delay, 0s); }
.js-anim .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.js-anim .reveal { opacity: 1; transform: none; }
}
