/*
Theme Name: Cabinet Wright Modern
Theme URI: https://cabinetwright.com/
Author: Cabinet Wright
Description: A modern, lightweight theme for Cabinet Wright.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: cabinetwright
*/

:root {
	--ink: #1d211e;
	--muted: #626b64;
	--paper: #f6f4ef;
	--white: #ffffff;
	--line: #d9ddd8;
	--forest: #244b38;
	--forest-dark: #173326;
	--clay: #b56d42;
	--max: 1180px;
	--radius: 18px;
	--shadow: 0 18px 45px rgba(29, 33, 30, 0.1);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: "Segoe UI", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.65;
}

body.menu-open {
	overflow: hidden;
}

img {
	display: block;
	height: auto;
	max-width: 100%;
}

a {
	color: var(--forest);
	text-underline-offset: 3px;
}

h1,
h2,
h3 {
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 500;
	letter-spacing: -0.025em;
	line-height: 1.12;
	margin: 0 0 0.7em;
}

h1 {
	font-size: clamp(2.6rem, 7vw, 5.6rem);
}

h2 {
	font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
	font-size: clamp(1.45rem, 2vw, 2rem);
}

p,
ul {
	margin-top: 0;
}

.site-shell {
	margin-inline: auto;
	max-width: var(--max);
	padding-inline: 24px;
}

.eyebrow {
	color: var(--clay);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.18em;
	margin-bottom: 16px;
	text-transform: uppercase;
}

.button,
button,
input[type="submit"] {
	align-items: center;
	background: var(--forest);
	border: 1px solid var(--forest);
	border-radius: 999px;
	color: var(--white);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 800;
	gap: 8px;
	justify-content: center;
	letter-spacing: 0.08em;
	padding: 13px 22px;
	text-decoration: none;
	text-transform: uppercase;
	transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
	background: var(--forest-dark);
	border-color: var(--forest-dark);
	transform: translateY(-2px);
}

.button--light {
	background: var(--white);
	border-color: var(--white);
	color: var(--forest-dark);
}

.button--outline {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.55);
}

.site-header {
	background: rgba(246, 244, 239, 0.94);
	border-bottom: 1px solid rgba(36, 75, 56, 0.12);
	position: sticky;
	top: 0;
	z-index: 20;
}

.header-inner {
	align-items: center;
	display: flex;
	gap: 28px;
	justify-content: space-between;
	min-height: 88px;
}

.site-brand {
	align-items: center;
	color: var(--ink);
	display: flex;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.45rem;
	gap: 12px;
	text-decoration: none;
}

.site-brand img {
	max-height: 58px;
	width: auto;
}

.primary-nav ul {
	align-items: center;
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav a {
	border-radius: 999px;
	color: var(--ink);
	display: block;
	font-size: 0.73rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	padding: 10px 11px;
	text-decoration: none;
	text-transform: uppercase;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
	background: rgba(36, 75, 56, 0.1);
	color: var(--forest);
}

.menu-toggle {
	display: none;
	padding: 10px 16px;
}

.hero {
	background-color: var(--forest-dark);
	background-position: center;
	background-size: cover;
	color: var(--white);
	isolation: isolate;
	min-height: min(760px, calc(100vh - 88px));
	position: relative;
}

.hero::before {
	background: linear-gradient(90deg, rgba(16, 31, 24, 0.9) 0%, rgba(16, 31, 24, 0.62) 47%, rgba(16, 31, 24, 0.12) 100%);
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}

.hero-inner {
	align-items: center;
	display: flex;
	min-height: inherit;
}

.hero-copy {
	max-width: 690px;
	padding-block: 90px;
}

.hero h1 {
	max-width: 660px;
}

.hero p {
	color: rgba(255, 255, 255, 0.82);
	font-size: 1.15rem;
	max-width: 590px;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
}

.trust-strip {
	background: var(--forest);
	color: var(--white);
}

.trust-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

.trust-item {
	border-left: 1px solid rgba(255, 255, 255, 0.18);
	padding: 30px;
	text-align: center;
}

.trust-item:last-child {
	border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.trust-item strong {
	display: block;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.45rem;
	font-weight: 500;
}

.trust-item span {
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.section {
	padding-block: clamp(70px, 10vw, 130px);
}

.section--white {
	background: var(--white);
}

.section-heading {
	margin-bottom: 44px;
	max-width: 760px;
}

.split {
	align-items: center;
	display: grid;
	gap: clamp(40px, 7vw, 90px);
	grid-template-columns: 1fr 1fr;
}

.feature-image {
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	height: min(640px, 70vw);
	object-fit: cover;
	width: 100%;
}

.feature-list {
	display: grid;
	gap: 18px;
	grid-template-columns: 1fr 1fr;
	list-style: none;
	margin: 30px 0;
	padding: 0;
}

.feature-list li {
	border-top: 1px solid var(--line);
	font-weight: 700;
	padding-top: 14px;
}

.product-grid {
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(3, 1fr);
}

.product-teaser {
	background: var(--white);
	border-radius: var(--radius);
	box-shadow: 0 10px 30px rgba(29, 33, 30, 0.07);
	overflow: hidden;
}

.product-teaser img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
}

.product-teaser div {
	padding: 24px;
}

.product-teaser h3 {
	margin-bottom: 8px;
}

.page-hero {
	background: var(--forest-dark);
	color: var(--white);
	padding-block: clamp(70px, 10vw, 130px);
}

.page-hero h1 {
	font-size: clamp(2.8rem, 6vw, 5rem);
	margin-bottom: 0;
}

.page-hero p {
	color: rgba(255, 255, 255, 0.72);
	font-size: 1.1rem;
	max-width: 700px;
}

.content-card {
	background: var(--white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	margin-inline: auto;
	max-width: 900px;
	padding: clamp(28px, 6vw, 70px);
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-content h1:first-child {
	display: none;
}

.entry-content iframe {
	aspect-ratio: 16 / 9;
	height: auto;
	max-width: 100%;
	width: 100%;
}

.entry-content .inner-left-block,
.entry-content .inner-left-area,
.entry-content .video,
.entry-content .white-area,
.entry-content .wrap {
	float: none;
	margin: 0 0 30px;
	max-width: none;
	padding: 0;
	width: auto;
}

.door-grid {
	display: grid;
	gap: 28px;
	grid-template-columns: repeat(2, 1fr);
}

.door-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 14px 38px rgba(29, 33, 30, 0.07);
	overflow: hidden;
}

.door-gallery {
	background: #ece9e2;
	display: grid;
	grid-auto-rows: 160px;
	grid-template-columns: repeat(3, 1fr);
}

.door-gallery img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.door-gallery img:first-child:nth-last-child(1) {
	grid-column: 1 / -1;
}

.door-gallery img:first-child:nth-last-child(2),
.door-gallery img:first-child:nth-last-child(2) ~ img {
	grid-column: span 1;
}

.door-gallery:has(img:nth-child(2)):not(:has(img:nth-child(3))) {
	grid-template-columns: repeat(2, 1fr);
}

.door-card-body {
	padding: clamp(24px, 4vw, 38px);
}

.door-card-body p {
	color: var(--muted);
}

.door-card-body ul {
	list-style: none;
	margin-bottom: 0;
	padding: 0;
}

.door-card-body li {
	border-top: 1px solid var(--line);
	padding: 9px 0;
}

.badge {
	background: #e8f1eb;
	border-radius: 999px;
	color: var(--forest);
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 900;
	letter-spacing: 0.1em;
	margin-bottom: 16px;
	padding: 7px 12px;
	text-transform: uppercase;
}

.ngg-galleryoverview {
	display: grid !important;
	gap: 16px;
	grid-template-columns: repeat(3, 1fr);
	margin: 0 !important;
	width: 100% !important;
}

.ngg-gallery-thumbnail-box {
	float: none !important;
	margin: 0 !important;
	width: auto !important;
}

.ngg-gallery-thumbnail,
.ngg-gallery-thumbnail a {
	display: block;
}

.ngg-gallery-thumbnail img {
	aspect-ratio: 3 / 2;
	border: 0 !important;
	border-radius: 12px;
	margin: 0 !important;
	object-fit: cover;
	width: 100% !important;
}

input:not([type="submit"]),
select,
textarea {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 10px;
	font: inherit;
	max-width: 100%;
	padding: 13px 15px;
	width: 100%;
}

textarea {
	min-height: 150px;
}

.wpcf7-form {
	display: grid;
	gap: 8px;
}

.wpcf7-form p {
	margin-bottom: 8px;
}

.cta-band {
	background: var(--clay);
	color: var(--white);
}

.cta-band-inner {
	align-items: center;
	display: flex;
	gap: 30px;
	justify-content: space-between;
	padding-block: 54px;
}

.cta-band h2 {
	font-size: clamp(2rem, 4vw, 3.4rem);
	margin: 0;
}

.site-footer {
	background: #151b17;
	color: rgba(255, 255, 255, 0.72);
	padding-block: 64px 30px;
}

.footer-grid {
	display: grid;
	gap: 40px;
	grid-template-columns: 1.3fr 1fr 1fr;
}

.site-footer h2,
.site-footer h3 {
	color: var(--white);
}

.site-footer h2 {
	font-size: 2.2rem;
}

.site-footer h3 {
	font-family: "Segoe UI", Arial, sans-serif;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.site-footer a {
	color: rgba(255, 255, 255, 0.78);
}

.footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-links li {
	margin-bottom: 8px;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.78rem;
	margin-top: 50px;
	padding-top: 24px;
}

@media (max-width: 980px) {
	.menu-toggle {
		display: inline-flex;
	}

	.header-cta {
		display: none;
	}

	.primary-nav {
		background: var(--paper);
		border-top: 1px solid var(--line);
		display: none;
		inset: 88px 0 0;
		padding: 20px 24px;
		position: fixed;
	}

	.primary-nav.is-open {
		display: block;
	}

	.primary-nav ul {
		align-items: stretch;
		display: grid;
		gap: 4px;
	}

	.primary-nav a {
		font-size: 1rem;
		padding: 15px;
	}

	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 760px) {
	body {
		font-size: 16px;
	}

	.site-shell {
		padding-inline: 18px;
	}

	.hero {
		min-height: 650px;
	}

	.hero::before {
		background: rgba(16, 31, 24, 0.72);
	}

	.trust-grid,
	.split,
	.product-grid,
	.door-grid,
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.trust-item {
		border-bottom: 1px solid rgba(255, 255, 255, 0.18);
		border-left: 0;
		padding: 20px;
	}

	.trust-item:last-child {
		border-bottom: 0;
		border-right: 0;
	}

	.feature-list,
	.ngg-galleryoverview {
		grid-template-columns: 1fr;
	}

	.door-gallery {
		grid-auto-rows: 130px;
	}

	.cta-band-inner {
		align-items: flex-start;
		flex-direction: column;
	}
}
