/*
Theme Name: Bowerwood
Theme URI: https://bowerwood.co.uk
Author: Bowerwood
Description: A custom block theme for Bowerwood, biophilic garden architecture. Includes Home, About Ben and Contact page layouts, a Projects section and a built-in enquiry form.
Version: 1.0.1
Requires at least: 6.6
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: bowerwood
*/

/* ---------- General ---------- */
html { scroll-behavior: smooth; }
img { height: auto; }

/* Colour bands sit flush against each other, header and footer. */
.wp-site-blocks > * + * { margin-block-start: 0; }
.bw-sections > * { margin-block-start: 0; margin-block-end: 0; }

.bw-eyebrow {
	letter-spacing: 0.34em;
	text-transform: uppercase;
}

/* ---------- Header ---------- */
.bw-header .wp-block-site-title a { text-decoration: none; }
.bw-header .wp-block-navigation a:hover { color: var(--wp--preset--color--sage); }
.bw-header .bw-logo-sprig img { display: block; }

/* ---------- Photo placeholders ---------- */
.bw-photo img {
	width: 100%;
	object-fit: cover;
	display: block;
}
.bw-photo--hero img { aspect-ratio: 4 / 3.4; }
.bw-photo--card img { aspect-ratio: 4 / 5; }
.bw-photo--story img { aspect-ratio: 4 / 3; }
.bw-photo--portrait img { aspect-ratio: 4 / 5; }

/* ---------- Process steps ---------- */
.bw-step {
	border-top: 1px solid var(--wp--preset--color--sage);
	padding-top: 1.1rem;
}

/* ---------- Comparison table ---------- */
.bw-compare table { border-collapse: collapse; width: 100%; }
.bw-compare th,
.bw-compare td {
	text-align: left;
	padding: 0.85rem 0.75rem;
	border: 0;
	border-bottom: 1px solid #cfd6c2;
}
.bw-compare thead th {
	border-bottom: 2px solid var(--wp--preset--color--forest);
	font-weight: 500;
}
.bw-compare tbody td:first-child { font-weight: 500; }
.bw-compare tbody td:nth-child(2) { color: var(--wp--preset--color--muted); }

/* ---------- FAQs ---------- */
.bw-faqs .wp-block-details {
	border-top: 1px solid #cfd6c2;
	padding: 1.1rem 0;
}
.bw-faqs .wp-block-details:last-child { border-bottom: 1px solid #cfd6c2; }
.bw-faqs summary {
	cursor: pointer;
	font-size: 1.15rem;
	font-weight: 500;
}
.bw-faqs .wp-block-details p { margin-top: 0.75rem; }

/* ---------- Qualifications list ---------- */
.bw-list-ruled {
	list-style: none;
	padding-left: 0;
}
.bw-list-ruled li {
	border-top: 1px solid #cfd6c2;
	padding: 0.5rem 0;
}

/* ---------- Projects grid ---------- */
.bw-project-card .wp-block-post-featured-image img { aspect-ratio: 4 / 3; object-fit: cover; }
.bw-project-card .wp-block-post-title a { text-decoration: none; }

/* ---------- Enquiry form ---------- */
.bw-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.1rem 1.25rem;
}
.bw-form .bw-field { display: flex; flex-direction: column; gap: 0.35rem; }
.bw-form .bw-field--wide { grid-column: 1 / -1; }
.bw-form label { font-size: 0.875rem; font-weight: 500; }
.bw-form input,
.bw-form textarea {
	font: inherit;
	font-size: 1rem;
	padding: 0.75rem;
	border: 1px solid #8c9a7a;
	border-radius: 2px;
	background: #faf9f5;
	color: var(--wp--preset--color--forest);
}
.bw-form input:focus,
.bw-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--moss);
	outline-offset: 1px;
}
.bw-form textarea { resize: vertical; min-height: 7rem; }
.bw-form .bw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bw-form button {
	font: inherit;
	font-weight: 500;
	background: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--stone);
	border: 0;
	border-radius: 2px;
	padding: 0.95rem 1.75rem;
	cursor: pointer;
}
.bw-form button:hover { background: var(--wp--preset--color--deep); }
.bw-form-notice {
	padding: 1rem 1.25rem;
	border-radius: 2px;
	margin-bottom: 1.25rem;
}
.bw-form-notice--ok { background: #dde2d3; color: var(--wp--preset--color--forest); }
.bw-form-notice--error { background: #f3e2dc; color: #6b2a1a; }

@media (max-width: 640px) {
	.bw-form { grid-template-columns: minmax(0, 1fr); }
}
