/*
Theme Name: Tree Busters
Description: Lightweight theme for Tree Busters of Cape Cod. Content lives in pages; SEO lives in the Tree Busters SEO and Leads plugin.
Version: 1.1.0
Author: Bravetto
License: GPL-2.0-or-later
Text Domain: treebusters
*/

:root {
	--red: #c8231a;
	--red-dark: #9e1a13;
	--ink: #1b1b1b;
	--ink-soft: #4a4a4a;
	--cream: #faf7f2;
	--sand: #f0ebe2;
	--line: #e3ddd1;
	--white: #fff;
	--max: 1140px;
	--radius: 6px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--red-dark); text-underline-offset: 2px; }
a:hover { color: var(--red); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.tb-wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.tb-skip { position: absolute; left: -9999px; }
.tb-skip:focus { left: 10px; top: 10px; background: var(--white); padding: 8px 12px; z-index: 99; }

/* Top bar and header */
.tb-sticky { position: sticky; top: 0; z-index: 60; }
.tb-topbar { background: var(--ink); color: var(--white); font-size: .88rem; }
.tb-topbar .tb-wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.tb-topbar a { color: var(--white); font-weight: 700; text-decoration: none; }
.tb-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.tb-header .tb-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.tb-logo { flex-shrink: 0; }
.tb-logo img { display: block; height: 68px; width: auto; }
.tb-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.tb-nav a { display: block; padding: 10px 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .94rem; border-radius: var(--radius); white-space: nowrap; }
.tb-nav a:hover, .tb-nav a[aria-current="page"] { color: var(--red); }
.tb-nav .tb-nav-cta a { background: var(--red); color: var(--white); }
.tb-nav .tb-nav-cta a:hover { background: var(--red-dark); color: var(--white); }
.tb-navtoggle, .tb-navlabel { display: none; }

/* Buttons */
.tb-btn { display: inline-block; font: 700 1rem/1 var(--font); padding: 15px 24px; border-radius: var(--radius); text-decoration: none; border: 2px solid transparent; cursor: pointer; text-align: center; }
.tb-btn-primary { background: var(--red); color: var(--white); }
.tb-btn-primary:hover { background: var(--red-dark); color: var(--white); }
.tb-btn-ghost { background: transparent; color: var(--white); border-color: var(--white); }
.tb-btn-ghost:hover { background: var(--white); color: var(--ink); }
.tb-btn-dark { background: var(--ink); color: var(--white); }
.tb-btn-dark:hover { background: #000; color: var(--white); }

/* Hero */
.tb-hero { background: linear-gradient(135deg, #1b1b1b 0%, #2c2c2c 60%, #3a1612 100%); color: var(--white); padding: 72px 0 64px; }
.tb-hero h1 { max-width: 16ch; }
.tb-hero p.tb-lead { font-size: 1.2rem; max-width: 56ch; color: #ece7de; }
.tb-hero .tb-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.tb-pagehero { background: var(--ink); color: var(--white); padding: 44px 0 38px; }
.tb-pagehero h1 { margin: 0; font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
.tb-pagehero p { margin: 10px 0 0; color: #ddd6c8; max-width: 62ch; }
.tb-crumbs { font-size: .85rem; color: #bdb5a6; margin-bottom: 10px; }
.tb-crumbs a { color: #e8e2d6; }

/* Trust strip */
.tb-trust { background: var(--sand); border-bottom: 1px solid var(--line); }
.tb-trust ul { list-style: none; margin: 0; padding: 14px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 18px; font-weight: 700; font-size: .95rem; }
.tb-trust li::before { content: "\2713"; color: var(--red); margin-right: 8px; font-weight: 800; }

/* Sections */
.tb-section { padding: 60px 0; }
.tb-section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tb-section .tb-intro { max-width: 68ch; color: var(--ink-soft); font-size: 1.08rem; }
.tb-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 26px; }
.tb-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tb-card h3 { margin-bottom: .4em; }
.tb-card p:last-child { margin-bottom: 0; }
.tb-card a.tb-more { font-weight: 700; text-decoration: none; }
.tb-card a.tb-more::after { content: " \2192"; }
.tb-section.alt .tb-card { background: var(--cream); }
.tb-cols { display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr; align-items: start; }
.tb-checks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.tb-checks li { padding-left: 28px; position: relative; margin-bottom: .55em; }
.tb-checks li::before { content: "\2713"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.tb-steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 1.2em; }
.tb-steps li { counter-increment: s; padding: 0 0 14px 52px; position: relative; }
.tb-steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: var(--white); font-weight: 800; display: grid; place-items: center; }
.tb-steps strong { display: block; }
.tb-areas { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 22px; }
.tb-areas h3 { font-size: 1.05rem; margin-bottom: .3em; }
.tb-areas p { font-size: .96rem; color: var(--ink-soft); margin: 0; }
.tb-quote { border-left: 4px solid var(--red); padding: 4px 0 4px 18px; margin: 0 0 22px; }
.tb-quote p { margin: 0 0 .4em; font-size: 1.05rem; }
.tb-quote cite { font-style: normal; font-weight: 700; font-size: .92rem; color: var(--ink-soft); }
.tb-note { background: var(--sand); border-radius: var(--radius); padding: 14px 18px; font-size: .95rem; }

/* FAQ */
.tb-faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin-bottom: 10px; }
.tb-faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; }
.tb-faq summary::-webkit-details-marker { display: none; }
.tb-faq summary::after { content: "+"; float: right; font-size: 1.3rem; line-height: 1; color: var(--red); }
.tb-faq details[open] summary::after { content: "\2212"; }
.tb-faq details p { padding-bottom: 14px; margin: 0; color: var(--ink-soft); }

/* CTA band and form */
.tb-band { background: var(--red); color: var(--white); padding: 56px 0; }
.tb-band .tb-cols { align-items: center; }
.tb-band h2 { color: var(--white); }
.tb-band a { color: var(--white); }
.tb-formcard { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 24px; }
.tb-form .tb-field { margin-bottom: 14px; }
.tb-form label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
.tb-form input, .tb-form select, .tb-form textarea { width: 100%; font: inherit; padding: 12px; border: 1px solid #bdb5a6; border-radius: var(--radius); background: var(--white); color: var(--ink); }
.tb-form input:focus, .tb-form select:focus, .tb-form textarea:focus, .tb-nav a:focus-visible, .tb-btn:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 2px; }
.tb-form .tb-btn { width: 100%; }
.tb-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.tb-form-note { font-size: .9rem; color: var(--ink-soft); margin: 12px 0 0; }
.tb-form-error { background: #fdecea; border: 1px solid #f1b1ab; padding: 10px 12px; border-radius: var(--radius); font-weight: 600; }

/* Content pages */
.tb-content { padding: 48px 0 24px; }
.tb-content .tb-wrap > *:first-child { margin-top: 0; }
.tb-post { max-width: 760px; margin: 0 auto; padding: 48px 20px; }

/* Photos and gallery */
.tb-hero.tb-hero-photo { background: linear-gradient(90deg, rgba(20,20,20,.92) 0%, rgba(20,20,20,.78) 50%, rgba(20,20,20,.45) 100%), url("assets/photos/tree-removal-crew-bucket-truck-chipper.jpg") center 62% / cover no-repeat, #1b1b1b; }
.tb-photo { margin: 0 0 22px; }
.tb-photo img, .tb-gallery img, .tb-ba img { display: block; width: 100%; border-radius: var(--radius); background: var(--sand); }
.tb-photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.tb-photo figcaption, .tb-gallery figcaption, .tb-ba figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; }
.tb-gallery { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 26px; }
.tb-gallery figure, .tb-ba figure { margin: 0; }
.tb-gallery img { aspect-ratio: 4 / 3; object-fit: cover; transition: opacity .15s; }
.tb-gallery a:hover img, .tb-ba a:hover img { opacity: .88; }
.tb-ba { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin: 26px 0 8px; }
.tb-ba img { aspect-ratio: 4 / 3; object-fit: cover; }
.tb-ba figure { position: relative; }
.tb-ba .tb-tag { position: absolute; top: 10px; left: 10px; background: var(--ink); color: var(--white); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 4px; }
.tb-ba .tb-tag.after { background: var(--red); }
.tb-ba-cap { grid-column: 1 / -1; margin: -4px 0 0; font-size: .95rem; color: var(--ink-soft); }
.tb-viewall { margin-top: 22px; }
.tb-lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 94vh; }
.tb-lightbox::backdrop { background: rgba(0,0,0,.86); }
.tb-lightbox img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; border-radius: var(--radius); }
.tb-lightbox p { color: var(--white); text-align: center; margin: 10px 0 0; font-size: .95rem; }
.tb-lightbox button { position: fixed; top: 14px; right: 14px; background: var(--white); color: var(--ink); border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 1.5rem; line-height: 1; cursor: pointer; }

/* Footer */
.tb-footer { background: var(--ink); color: #d8d2c6; padding: 48px 0 24px; font-size: .96rem; }
.tb-footer a { color: var(--white); text-decoration: none; }
.tb-footer a:hover { text-decoration: underline; }
.tb-footer h2 { color: var(--white); font-size: 1.05rem; margin-bottom: .6em; }
.tb-footer ul { list-style: none; margin: 0; padding: 0; }
.tb-footer li { margin-bottom: .4em; }
.tb-footgrid { display: grid; gap: 28px; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; }
.tb-legal { border-top: 1px solid #3a3a3a; margin-top: 30px; padding-top: 16px; font-size: .85rem; color: #a59e90; }
.tb-callbar { display: none; }

@media (max-width: 1180px) {
	.tb-navlabel { display: block; padding: 10px 14px; border: 2px solid var(--ink); border-radius: var(--radius); font-weight: 700; cursor: pointer; }
	.tb-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); display: none; max-height: calc(100vh - 140px); overflow-y: auto; }
	.tb-navtoggle:checked ~ .tb-nav { display: block; }
	.tb-nav ul { flex-direction: column; align-items: stretch; padding: 10px 20px 18px; }
}
@media (max-width: 860px) {
	body { font-size: 16.5px; }
	.tb-cols { grid-template-columns: 1fr; }
	.tb-footgrid { grid-template-columns: 1fr 1fr; }
	.tb-topbar { display: none; }
	html { scroll-padding-top: 90px; }
	.tb-logo img { height: 56px; }
	.tb-hero { padding: 48px 0 44px; }
	.tb-section { padding: 44px 0; }
	.tb-callbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: var(--red); box-shadow: 0 -2px 10px rgba(0,0,0,.2); }
	.tb-callbar a { flex: 1; color: var(--white); text-align: center; padding: 15px 8px; font-weight: 800; text-decoration: none; }
	.tb-callbar a + a { background: var(--ink); }
	.tb-footer { padding-bottom: 90px; }
}
@media (max-width: 520px) {
	.tb-footgrid { grid-template-columns: 1fr; }
	.tb-ba { grid-template-columns: 1fr; }
	.tb-topbar .tb-wrap { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
