/*
Theme Name: Sidney Builders
Theme URI: https://www.sidneybuilders.com
Author: Evolve Siteworks
Author URI: https://evolvesiteworks.com
Description: One page theme for Sidney Builders Inc. Replaces Salient and the WPBakery page builder.
Version: 1
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: sidneybuilders
*/

@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url("fonts/open-sans-latin.woff2") format("woff2");
}

:root {
	--sb-bg: #f8f8f8;
	--sb-text: #676767;
	--sb-heading: #444444;
	--sb-nav: #888888;
	--sb-line: #dddddd;
	--sb-field: #efefef;
	--sb-action: #333333;
	--sb-footer: #252525;
	--sb-footer-text: #777777;
	--sb-header-h: 86px;
	--sb-header-h-small: 64px;
	--sb-wrap: 880px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--sb-header-h-small);
	-webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

body {
	margin: 0;
	background: var(--sb-bg);
	color: var(--sb-text);
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 12px;
	line-height: 22px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--sb-heading); }
:focus-visible { outline: 2px solid var(--sb-action); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100000;
	width: auto; height: auto; clip: auto;
	background: #fff; color: #000; padding: 10px 14px;
}

.wrap {
	width: 100%;
	max-width: calc(var(--sb-wrap) + 32px);
	margin: 0 auto;
	padding: 0 16px;
}

/* Header */
.site-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 1000;
	height: var(--sb-header-h);
	background: #fff;
	transition: height 0.25s ease, box-shadow 0.25s ease;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header.is-small {
	height: var(--sb-header-h-small);
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

.site-logo {
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -1.5px;
	line-height: 22px;
	color: var(--sb-heading);
	white-space: nowrap;
}
.site-logo img { max-height: 48px; width: auto; }

.header-right { display: flex; align-items: center; }

.main-nav ul {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	align-items: center;
}
.main-nav a {
	display: block;
	padding: 8px 10px;
	font-family: Arial, sans-serif;
	font-size: 12px;
	line-height: 20px;
	color: var(--sb-nav);
	transition: color 0.2s ease;
}
.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav .current-menu-item > a { color: var(--sb-heading); }

.search-toggle {
	display: grid;
	place-items: center;
	width: 36px; height: 36px;
	margin-left: 10px;
	padding: 0;
	border: 0;
	border-left: 1px solid var(--sb-line);
	border-radius: 0;
	background: none;
	color: var(--sb-nav);
	cursor: pointer;
}
.search-toggle:hover { color: var(--sb-heading); }
.search-toggle svg { width: 16px; height: 16px; }

.menu-toggle {
	display: none;
	width: 40px; height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--sb-heading);
	cursor: pointer;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
	display: block;
	width: 20px; height: 2px;
	background: currentColor;
	position: relative;
	margin: 0 auto;
	transition: transform 0.2s ease, background 0.2s ease;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Search panel */
.search-panel {
	position: fixed;
	inset: 0;
	z-index: 1100;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.97);
}
.search-panel.is-open { display: flex; }
.search-panel form { width: min(640px, 88vw); }
.search-panel input[type="search"] {
	width: 100%;
	padding: 14px 0;
	border: 0;
	border-bottom: 2px solid var(--sb-heading);
	background: transparent;
	font: 600 28px/1.2 "Open Sans", Arial, sans-serif;
	letter-spacing: -1px;
	color: var(--sb-heading);
}
.search-panel input[type="search"]:focus { outline: none; }
.search-close {
	position: absolute; top: 22px; right: 22px;
	width: 44px; height: 44px;
	border: 0; background: none;
	font-size: 30px; line-height: 1;
	color: var(--sb-heading);
	cursor: pointer;
}

/* Hero */
.site-main { padding-top: var(--sb-header-h); }
.hero {
	height: clamp(220px, 44.5vw, 570px);
	background: #ddd center / cover no-repeat;
}
.hero img { width: 100%; height: 100%; object-fit: cover; }

/* One page sections */
.section { padding: 78px 0 0; }
.section:last-of-type { padding-bottom: 0; }

.section-title {
	display: flex;
	align-items: center;
	gap: 0;
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: -0.5px;
	line-height: 12px;
	color: var(--sb-heading);
	text-align: center;
}
.section-title::before,
.section-title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e6e6e6;
}
.section-title span { padding: 0 9.6px; }

.about-text { margin-top: 36px; }
.about-text p,
.about-text h6 {
	margin: 0 0 7px;
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	letter-spacing: -0.5px;
	color: var(--sb-heading);
}
.about-text p { color: #808080; }
.about-text strong { font-weight: 600; }

/* Projects */
#projects { padding-top: 136px; }
.project-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px 20px;
	margin-top: 36px;
	list-style: none;
	padding: 0;
}
.project-item { margin: 0 0 15px; }
.work-item {
	position: relative;
	overflow: hidden;
	background: #ddd;
	aspect-ratio: 600 / 403;
}
.work-item img { width: 100%; height: 100%; object-fit: cover; }
.work-info {
	position: absolute; inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.work-item:hover .work-info,
.work-item:focus-within .work-info { opacity: 1; }
.work-info a {
	padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, 0.85);
	border-radius: 2px;
	color: #fff;
	font-size: 12px;
	line-height: 18px;
}
.work-info a:hover { background: #fff; color: #222; }
.work-title { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--sb-heading); }
.love-wrap { text-align: right; line-height: 13px; margin-top: 4px; }
.love-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 0;
	border: 0;
	background: none;
	font: inherit;
	color: var(--sb-text);
	cursor: pointer;
}
.love-btn svg { width: 15px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.love-btn.is-loved { color: #c0392b; }
.love-btn.is-loved svg { fill: currentColor; }

/* Contact */
#contact { padding-top: 69px; padding-bottom: 0; }
.contact-line { margin: 35px 0 36px; text-align: center; font-weight: 700; }
.contact-line span { margin: 0 8px; white-space: nowrap; }

.contact-form { padding-bottom: 28px; }
.contact-form p { margin: 0 0 26px; }
.contact-form label { display: block; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form input[type="url"],
.contact-form textarea {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 10px;
	border: 0;
	border-radius: 0;
	background: var(--sb-field);
	color: #555;
	font: 12px/22px "Open Sans", Arial, sans-serif;
}
.contact-form textarea { height: 241px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--sb-action); outline-offset: 0; }
.contact-form input[type="submit"],
.btn {
	display: inline-block;
	padding: 7px 11px;
	border: 0;
	border-radius: 2px;
	background: var(--sb-action);
	color: #fff;
	font: 12px/normal Arial, sans-serif;
	cursor: pointer;
}
.contact-form input[type="submit"]:hover,
.btn:hover { background: #000; color: #fff; }
.contact-form .wpcf7-not-valid-tip { color: #b32d2e; font-size: 12px; }
.contact-form .wpcf7-response-output { margin: 22px 0 0; padding: 8px 12px; border: 2px solid var(--sb-action); }

/* Footer */
.site-footer {
	margin-top: 0;
	padding: 20px 0 21px;
	background: var(--sb-footer);
	color: var(--sb-footer-text);
}
.site-footer p { margin: 3px 0 0; }
.site-footer a { color: #aaa; }

/* Back to top */
.to-top {
	position: fixed;
	right: 20px; bottom: 20px;
	z-index: 900;
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--sb-action);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #000; }
.to-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Lightbox */
.lightbox {
	position: fixed; inset: 0;
	z-index: 1200;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.88);
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; width: auto; height: auto; }
.lightbox-close {
	position: absolute; top: 14px; right: 18px;
	width: 44px; height: 44px;
	border: 0; background: none;
	color: #fff; font-size: 34px; line-height: 1;
	cursor: pointer;
}

/* Inner pages */
.entry { padding: 78px 0; }
.entry-title { margin: 0 0 24px; color: var(--sb-heading); font-size: 28px; font-weight: 600; letter-spacing: -1px; line-height: 1.2; }
.entry-content { font-size: 14px; line-height: 24px; }
.entry-content p { margin: 0 0 16px; }
.entry-content a { text-decoration: underline; }
.entry-image { margin-bottom: 28px; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; }
.result { margin-bottom: 28px; }
.result h2 { margin: 0 0 6px; font-size: 18px; color: var(--sb-heading); }

/* Responsive */
@media (max-width: 900px) {
	.project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
	:root { --sb-header-h: 64px; }
	.menu-toggle { display: block; }
	.main-nav {
		position: absolute;
		top: 100%; left: 0; right: 0;
		display: none;
		background: #fff;
		border-top: 1px solid var(--sb-line);
		box-shadow: 0 8px 14px rgba(0, 0, 0, 0.1);
	}
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px; }
	.main-nav a { padding: 12px 0; font-size: 14px; }
	.search-toggle { border-left: 0; margin-left: 0; }
	.section { padding-top: 56px; }
	#projects, #contact { padding-top: 56px; }
	.contact-line span { display: block; margin: 0; }
}

@media (max-width: 480px) {
	.project-grid { grid-template-columns: 1fr; }
	.work-info { opacity: 1; background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.6)); justify-content: flex-end; flex-direction: row; padding-bottom: 12px; }
}
