/*
 * Haven Haus – Multi-page custom styles (assets/css/custom.css)
 *
 * Overrides the HTML5 UP Editorial template for Haven Haus branding.
 * Loaded after main.css on every page.
 *
 * Table of contents:
 *   1. Layout grid (#wrapper, sidebar hidden, footer placement)
 *   2. Site header & inline navigation
 *   3. Page hero (home) & page banners (inner pages)
 *   4. Video hero (services)
 *   5. Core values / why-us cards
 *   6. Featured projects slideshow
 *   7. Masonry gallery & lightbox
 *   8. Modal image gallery navigation
 *   9. Contact form
 *  10. Global horizontal footer
 *  11. Expertise highlights & services offset
 *  12. Responsive breakpoints
 *  13. Light / dark theme
 *  14. Unified home/portfolio (anchors, cards, CTA, a11y)
 */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* ── 1. Layout grid – main + footer, sidebar removed ── */
#wrapper {
	display: grid !important;
	flex-direction: unset !important;
	grid-template-columns: 1fr;
	grid-template-areas:
		"main"
		"footer";
	flex: 1 0 auto;
	min-height: auto;
}

#main {
	grid-area: main;
	width: 100%;
	min-width: 0;
}

#sidebar {
	display: none !important;
}

.site-footer {
	grid-area: footer;
	position: relative;
	z-index: 1;
	width: 100%;
}

/* ── Site header with inline navigation ── */
#header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5em;
	padding: 1.25em 0 1em !important;
	flex-wrap: wrap;
}

#header > * {
	flex: initial;
	margin-bottom: 0;
}

#header .logo {
	flex: 0 0 auto;
}

#header .main-nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
}

#header .main-nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.25em 1.75em;
	list-style: none;
	margin: 0;
	padding: 0;
}

#header .main-nav ul a {
	display: block;
	padding: 0.35em 0;
	font-size: 0.85em;
	white-space: nowrap;
}

#header .icons {
	flex: 0 0 auto;
	text-align: right;
	position: static !important;
	height: auto !important;
	line-height: normal !important;
}

#header .nav-toggle {
	display: none;
	flex: 0 0 auto;
	background: none;
	border: none;
	color: var(--hh-header-icon, #3d4449);
	font-size: 1.35em;
	cursor: pointer;
	padding: 0.25em;
	line-height: 1;
}

#header .theme-toggle {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25em;
	height: 2.25em;
	padding: 0;
	margin: 0;
	border: solid 1px var(--hh-border, rgba(210, 215, 217, 0.75));
	border-radius: 50%;
	background: var(--hh-bg-subtle, #f5f6f7);
	color: var(--hh-header-icon, #3d4449);
	font-size: 1em;
	cursor: pointer;
	line-height: 1;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#header .theme-toggle:hover {
	border-color: #f56a6a;
	color: #f56a6a;
}

#header .theme-toggle .icon {
	margin: 0;
	width: auto;
	font-size: 0.95em;
}

[data-theme="light"] .theme-toggle .theme-icon-light,
[data-theme="dark"] .theme-toggle .theme-icon-dark {
	display: none;
}

[data-theme="light"] .theme-toggle .theme-icon-dark,
[data-theme="dark"] .theme-toggle .theme-icon-light {
	display: inline-block;
}

.site-logo {
	height: 72px;
	width: auto;
	max-width: 220px;
	display: block;
	padding-top: 13.5px;
}

@media screen and (max-width: 980px) {
	#header {
		padding-top: 1em !important;
	}

	#header .nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	#header .main-nav {
		display: none;
		flex: 1 1 100%;
		order: 4;
		padding-top: 0.5em;
		border-top: solid 1px var(--hh-border, rgba(210, 215, 217, 0.75));
	}

	#header .main-nav.is-open {
		display: block;
	}

	#header .main-nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	#header .main-nav ul a {
		padding: 0.75em 0;
		text-align: center;
	}
}

/* Active navigation */
#menu ul li a.active,
#header .main-nav ul a.active {
	color: #f56a6a;
	font-weight: 600;
}

:root {
	--content-padding-x: 6em;
	--header-offset: 6rem;

	/* Light theme tokens (default) */
	--hh-bg: #ffffff;
	--hh-bg-subtle: #f5f6f7;
	--hh-text: #7f888f;
	--hh-heading: #3d4449;
	--hh-border: rgba(210, 215, 217, 0.75);
	--hh-input-bg: #ffffff;
	--hh-input-text: #3d4449;
	--hh-header-icon: #3d4449;
	--hh-footer-bg: #3d4449;
}

@media screen and (max-width: 1680px) {
	:root {
		--content-padding-x: 5em;
	}
}

@media screen and (max-width: 1280px) {
	:root {
		--content-padding-x: 4em;
	}
}

@media screen and (max-width: 736px) {
	:root {
		--content-padding-x: 2em;
	}
}

/* ── Full-width page hero (Home) ── */
.page-hero {
	position: relative;
	margin: -0.5em calc(-1 * var(--content-padding-x)) 3em;
	min-height: 85vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.page-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.45) 0%,
		rgba(0, 0, 0, 0.55) 100%
	);
}

.page-hero .hero-content {
	position: relative;
	z-index: 1;
	text-align: center;
	color: #fff;
	padding: 3em 2em;
	max-width: 900px;
}

.page-hero .hero-content h1 {
	font-size: 3.25em;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0 0 0.5em 0;
	color: #fff;
	border: none;
	padding: 0;
}

.page-hero .hero-content p {
	font-size: 1.15em;
	line-height: 1.7;
	opacity: 0.95;
	margin-bottom: 2em;
}

.page-hero .hero-actions {
	display: flex;
	gap: 1em;
	justify-content: center;
	flex-wrap: wrap;
}

.page-hero .hero-actions .button {
	margin: 0;
}

.page-hero .button.primary {
	background-color: #f56a6a;
	color: #fff !important;
	border: 0;
}

.page-hero .button.primary:hover {
	background-color: #e05555;
}

.page-hero .button.secondary {
	background: transparent;
	border: 2px solid #fff;
	color: #fff !important;
}

.page-hero .button.secondary:hover {
	background: rgba(255, 255, 255, 0.15);
}

/* ── Page banner (inner pages) ── */
.page-banner {
	position: relative;
	margin: -0.5em calc(-1 * var(--content-padding-x)) 0;
	padding: 5em 3em;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: #fff;
	text-align: center;
}

.page-banner::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.45) 0%,
		rgba(0, 0, 0, 0.6) 100%
	);
}

.page-banner h1,
.page-banner p {
	position: relative;
	z-index: 1;
}

.page-banner h1 {
	color: #fff;
	border: none;
	padding: 0;
	margin: 0 0 0.5em 0;
	font-size: 2.5em;
}

.page-banner p {
	font-size: 1.1em;
	opacity: 0.9;
	max-width: 700px;
	margin: 0 auto;
}

/* ── Video hero (Services) ── */
.video-hero {
	position: relative;
	margin: -0.5em calc(-1 * var(--content-padding-x)) 0;
	height: 100vh;
	min-height: 500px;
	max-height: 900px;
	overflow: hidden;
}

.video-hero video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.video-hero .video-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #fff;
	text-align: center;
	padding: 2em;
}

.video-hero .video-overlay .overlay-words {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

.video-hero .video-overlay .overlay-words span {
	font-size: clamp(2rem, 6vw, 4.5rem);
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	line-height: 1.1;
}

.video-hero .scroll-down {
	position: absolute;
	bottom: 2em;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 2em;
	cursor: pointer;
	animation: bounce 2s infinite;
	text-decoration: none;
	border: none;
	background: none;
	padding: 0.5em;
	z-index: 2;
}

@keyframes bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
	40% { transform: translateX(-50%) translateY(-12px); }
	60% { transform: translateX(-50%) translateY(-6px); }
}

/* ── Core values / why cards ── */
.value-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1.25em;
	margin-top: 1.5em;
}

.value-card {
	background: var(--hh-bg-subtle, #f5f6f7);
	border-radius: 6px;
	padding: 1.5em 1em;
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.value-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.value-card .icon {
	font-size: 1.75em;
	color: #f56a6a;
	margin-bottom: 0.5em;
	display: block;
}

.value-card h3 {
	font-size: 0.95em;
	margin: 0;
}

.why-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.5em;
	margin-top: 1.5em;
}

.why-card {
	border: solid 1px var(--hh-border, rgba(210, 215, 217, 0.75));
	border-radius: 6px;
	padding: 1.75em;
	transition: border-color 0.2s ease;
}

.why-card:hover {
	border-color: #f56a6a;
}

.why-card .icon {
	font-size: 2em;
	color: #f56a6a;
	margin-bottom: 0.75em;
	display: block;
}

.why-card h3 {
	margin: 0 0 0.5em 0;
	font-size: 1.1em;
}

.why-card p {
	margin: 0;
	font-size: 0.9em;
}

/* ── Featured projects slideshow ── */
.featured-slider {
	position: relative;
	margin: 0 calc(-1 * var(--content-padding-x)) 3em;
	padding-top: 0 !important;
	border-top: none !important;
	overflow: hidden;
	background: transparent;
}

.page-banner + .featured-slider {
	margin-top: 1.5em;
}

.featured-slider .slides {
	position: relative;
	width: 100%;
}

.featured-slider .slide {
	display: flex;
	flex-direction: column;
	background: #2a2f33;
	opacity: 0;
	transition: opacity 800ms ease-in-out;
	pointer-events: none;
	visibility: hidden;
}

.featured-slider .slide:not(.active) {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
}

.featured-slider .slide.active {
	opacity: 1;
	pointer-events: auto;
	position: relative;
	visibility: visible;
}

.featured-slider .slide img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
}

.featured-slider .slide-info {
	position: relative;
	z-index: 1;
	width: 100%;
	padding: 1.75em 3em 2.75em;
	background: #2a2f33;
	color: #fff;
}

.featured-slider .slide-info h2 {
	color: #fff;
	border: none;
	padding: 0;
	margin: 0 0 0.5em 0;
}

.featured-slider .slide-info p {
	margin: 0;
	max-width: 600px;
	opacity: 0.9;
}

.featured-slider .slider-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	cursor: pointer;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	font-size: 18px;
	z-index: 3;
	transition: background 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	font-family: inherit;
}

.featured-slider .slider-btn:hover {
	background: rgba(0, 0, 0, 0.65);
}

.featured-slider .slider-btn .icon {
	font-size: 1em;
	line-height: 1;
	margin: 0;
	padding: 0;
	width: auto;
}

.featured-slider .slider-btn.prev { left: 20px; }
.featured-slider .slider-btn.next { right: 20px; }

.featured-slider .dots {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 3;
}

.featured-slider .dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
	border: 0;
	cursor: pointer;
	padding: 0;
}

.featured-slider .dot.active {
	background: #fff;
}

/* ── Masonry gallery ── */
.masonry-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25em;
}

.masonry-gallery .gallery-item {
	break-inside: avoid;
	margin-bottom: 0;
	cursor: pointer;
	overflow: hidden;
	border-radius: 6px;
	aspect-ratio: 4 / 3;
	width: 100%;
	background: transparent;
	display: block;
}

.masonry-gallery .gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.3s ease;
}

.masonry-gallery .gallery-item:hover img {
	transform: scale(1.03);
}

/* ── Lightbox ── */
.lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 20000;
	padding: 2em;
}

.lightbox.active {
	display: flex;
}

.lightbox img {
	max-width: 90vw;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 4px;
}

.lightbox .lightbox-close {
	position: absolute;
	top: 20px;
	right: 30px;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	padding: 0;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.lightbox .lightbox-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.lightbox .lightbox-close .icon {
	font-size: 1em;
	line-height: 1;
	margin: 0;
	width: auto;
}

.lightbox .lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #fff;
	font-size: 18px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	font-family: inherit;
	transition: background 0.2s ease;
}

.lightbox .lightbox-nav .icon {
	font-size: 1em;
	line-height: 1;
	margin: 0;
	width: auto;
}

.lightbox .lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.3);
}

.lightbox .lightbox-nav.prev { left: 20px; }
.lightbox .lightbox-nav.next { right: 20px; }

/* ── Modal image gallery navigation ── */
.modal-gallery {
	position: relative;
	margin-top: 1.5em;
}

.modal-gallery .gallery-main {
	position: relative;
	text-align: center;
}

.modal-gallery .gallery-main img {
	max-width: 100%;
	max-height: 50vh;
	object-fit: contain;
	border-radius: 4px;
}

.modal-gallery .gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.5);
	border: none;
	color: #fff;
	font-size: 16px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	font-family: inherit;
}

.modal-gallery .gallery-nav:hover {
	background: rgba(0, 0, 0, 0.75);
}

.modal-gallery .gallery-nav .icon {
	font-size: 1em;
	line-height: 1;
	margin: 0;
	padding: 0;
	width: auto;
}

.modal-gallery .gallery-nav.prev { left: 10px; }
.modal-gallery .gallery-nav.next { right: 10px; }

.modal-gallery .gallery-thumbs {
	display: flex;
	gap: 0.5em;
	margin-top: 1em;
	flex-wrap: wrap;
	justify-content: center;
}

.modal-gallery .gallery-thumbs img {
	width: 70px;
	height: 55px;
	object-fit: cover;
	border-radius: 3px;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.2s ease;
}

.modal-gallery .gallery-thumbs img.active,
.modal-gallery .gallery-thumbs img:hover {
	opacity: 1;
}

/* ── Contact form ── */
.contact-page {
	max-width: 800px;
	position: relative;
	z-index: 1;
}

.contact-page input,
.contact-page select,
.contact-page textarea,
.contact-page button {
	pointer-events: auto;
}

.contact-page .form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1em;
}

.form-message {
	padding: 1em 1.25em;
	border-radius: 4px;
	margin-bottom: 1.5em;
	display: none;
}

.form-message.success {
	display: block;
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.form-message.error {
	display: block;
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.form-group {
	margin-bottom: 1.25em;
}

.form-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.4em;
	font-size: 0.9em;
}

.form-group input,
.form-group select,
.form-group textarea {
	width: 100%;
}

.form-group textarea {
	min-height: 150px;
}

.form-honey {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.form-group .field-error {
	color: #f56a6a;
	font-size: 0.8em;
	margin-top: 0.3em;
	display: none;
}

.form-group.invalid .field-error {
	display: block;
}

.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea {
	border-color: #f56a6a;
}

/* ── Global horizontal footer ── */
.site-footer {
	width: 100%;
	flex-shrink: 0;
	background: var(--hh-footer-bg, #3d4449);
	color: rgba(255, 255, 255, 0.85);
	clear: both;
}

.site-footer .footer-inner {
	max-width: 110em;
	margin: 0 auto;
	padding: 3em 3em 1.5em;
}

.site-footer .footer-grid {
	display: grid;
	grid-template-columns: 2fr 1.2fr 1fr;
	gap: 2.5em;
	align-items: start;
}

.site-footer .footer-col h3 {
	color: #fff;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin: 0 0 1em 0;
	border: none;
	padding: 0;
}

.site-footer .footer-brand p {
	margin: 0;
	line-height: 1.65;
	font-size: 0.95em;
}

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

.site-footer .contact li {
	display: flex;
	align-items: center;
	gap: 0.65em;
	padding: 0.45em 0 !important;
	margin: 0 !important;
	border-top: none !important;
	color: rgba(255, 255, 255, 0.85);
}

.site-footer .contact li::before {
	position: static !important;
	display: inline-block !important;
	width: 1.25em;
	min-width: 1.25em;
	text-align: center;
	flex-shrink: 0;
	height: auto !important;
	line-height: 1 !important;
	top: auto !important;
	left: auto !important;
	margin: 0 !important;
}

.site-footer .contact li a {
	flex: 1;
	border: none;
}

.site-footer .contact a,
.site-footer .social-links a {
	color: rgba(255, 255, 255, 0.85);
	border-bottom-color: rgba(255, 255, 255, 0.25);
}

.site-footer .contact a:hover,
.site-footer .social-links a:hover {
	color: #f56a6a;
	border-bottom-color: transparent;
}

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

.site-footer .social-links li {
	margin-bottom: 0.5em;
}

.site-footer .social-links a {
	text-decoration: none;
	border: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

.site-footer .footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	margin-top: 2.5em;
	padding-top: 1.5em;
	text-align: center;
}

.site-footer .copyright {
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.85em;
	margin: 0;
}

.site-footer .copyright a {
	color: inherit;
	border-bottom-color: rgba(255, 255, 255, 0.25);
}

@media screen and (max-width: 980px) {
	.site-footer .footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 2em;
	}

	.site-footer .footer-brand {
		grid-column: 1 / -1;
	}

	.site-footer .footer-inner {
		padding: 2.5em 2em 1.25em;
	}
}

@media screen and (max-width: 736px) {
	.site-footer .footer-grid {
		grid-template-columns: 1fr;
		gap: 1.75em;
	}
}

/* ── Expertise highlights ── */
.expertise-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1em;
	list-style: none;
	padding: 0;
	margin: 1.5em 0;
}

.expertise-list li {
	display: flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.75em 1em;
	background: var(--hh-bg-subtle, #f5f6f7);
	border-radius: 4px;
	font-size: 0.9em;
}

.expertise-list li .icon {
	color: #f56a6a;
	flex-shrink: 0;
}

/* ── Services page offset ── */
#services-section {
	padding-top: 3em;
	scroll-margin-top: 2em;
}

/* ── Responsive ── */
@media screen and (max-width: 980px) {
	.page-hero {
		min-height: 70vh;
	}

	.page-hero .hero-content h1 {
		font-size: 2.25em;
	}

	.masonry-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1em;
	}
}

@media screen and (max-width: 736px) {
	.page-hero .hero-content h1 {
		font-size: 1.85em;
	}

	.contact-page .form-row {
		grid-template-columns: 1fr;
	}

	.masonry-gallery {
		grid-template-columns: 1fr;
		gap: 1em;
	}

	.featured-slider .slide-info {
		padding: 1.5em;
	}

	.video-hero .video-overlay .overlay-words span {
		letter-spacing: 0.08em;
	}
}

/* ── 13. Light / dark theme ── */
[data-theme="dark"] {
	color-scheme: dark;
	--hh-bg: #16191c;
	--hh-bg-subtle: #22262b;
	--hh-text: #adb5bd;
	--hh-heading: #e9ecef;
	--hh-border: rgba(255, 255, 255, 0.12);
	--hh-input-bg: #2a2f34;
	--hh-input-text: #e9ecef;
	--hh-header-icon: #e9ecef;
	--hh-footer-bg: #0f1114;
}

[data-theme="dark"] body {
	background: var(--hh-bg);
}

[data-theme="dark"] body,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
	color: var(--hh-text);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] strong,
[data-theme="dark"] b {
	color: var(--hh-heading);
}

[data-theme="dark"] a {
	color: #f56a6a;
}

[data-theme="dark"] hr {
	border-bottom-color: var(--hh-border);
}

[data-theme="dark"] header.major > :last-child {
	border-bottom-color: #f56a6a;
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
	background: var(--hh-input-bg);
	color: var(--hh-input-text);
	border-color: var(--hh-border);
}

[data-theme="dark"] input[type="text"]:focus,
[data-theme="dark"] input[type="password"]:focus,
[data-theme="dark"] input[type="email"]:focus,
[data-theme="dark"] input[type="tel"]:focus,
[data-theme="dark"] input[type="search"]:focus,
[data-theme="dark"] input[type="url"]:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
	border-color: #f56a6a;
	box-shadow: 0 0 0 1px #f56a6a;
}

[data-theme="dark"] .button:hover {
	background-color: rgba(245, 106, 106, 0.12);
}

[data-theme="dark"] .features article {
	border-top-color: var(--hh-border);
}

[data-theme="dark"] .posts article:before,
[data-theme="dark"] .posts article:after {
	background: var(--hh-border);
}

[data-theme="dark"] .value-card:hover,
[data-theme="dark"] .why-card:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .project-modal .modal-content {
	background: var(--hh-bg-subtle);
	color: var(--hh-text);
}

[data-theme="dark"] .project-modal h2 {
	color: var(--hh-heading);
}

[data-theme="dark"] .project-modal .modal-close {
	color: var(--hh-heading);
}

[data-theme="dark"] .form-message.success {
	background: rgba(40, 167, 69, 0.15);
	color: #8fd19e;
	border-color: rgba(40, 167, 69, 0.35);
}

[data-theme="dark"] .form-message.error {
	background: rgba(220, 53, 69, 0.15);
	color: #f1aeb5;
	border-color: rgba(220, 53, 69, 0.35);
}

[data-theme="dark"] code,
[data-theme="dark"] pre {
	background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] #header .icons a {
	color: var(--hh-header-icon);
}

[data-theme="dark"] #header .icons a:hover {
	color: #f56a6a;
}

/* ── 14. Unified home / portfolio ── */
section[id] {
	scroll-margin-top: var(--header-offset, 6rem);
}

.section-intro {
	max-width: 42em;
	margin: 0 0 2em;
}

.projects-section {
	margin-top: 2em;
	padding-top: 1em;
}

.featured-slider .slider-btn:focus-visible,
.featured-slider .dot:focus-visible,
.project-modal .modal-close:focus-visible,
.project-modal .gallery-nav:focus-visible,
.gallery-item:focus-visible,
.project-card-image:focus-visible,
.lightbox button:focus-visible {
	outline: 2px solid #f56a6a;
	outline-offset: 3px;
}

.featured-slider .slider-btn {
	min-width: 44px;
	min-height: 44px;
}

.featured-slider .slide-info .button {
	margin-top: 1em;
}

.selected-work .posts article .image,
.project-cards .project-card-image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: none;
	min-height: 0;
	padding: 0;
	margin: 0 0 1.5em 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	border-radius: 6px;
}

.selected-work .posts article .image img,
.project-cards .project-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: cover;
	object-position: center;
	transition: transform 0.3s ease;
}

.selected-work .posts article .image:hover img,
.selected-work .posts article .image:focus-visible img,
.project-cards .project-card-image:hover img,
.project-cards .project-card-image:focus-visible img {
	transform: scale(1.02);
}

.masonry-gallery .gallery-item {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: inherit;
	aspect-ratio: 4 / 3;
	border-radius: 6px;
	overflow: hidden;
}

.masonry-gallery .gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.modal-gallery .gallery-thumbs .gallery-thumb {
	padding: 0;
	border: 2px solid transparent;
	background: transparent;
	cursor: pointer;
	border-radius: 4px;
	line-height: 0;
}

.modal-gallery .gallery-thumbs .gallery-thumb.active,
.modal-gallery .gallery-thumbs .gallery-thumb:hover,
.modal-gallery .gallery-thumbs .gallery-thumb:focus-visible {
	border-color: #f56a6a;
	opacity: 1;
}

.modal-gallery .gallery-thumbs .gallery-thumb img {
	display: block;
	width: 70px;
	height: 55px;
	object-fit: cover;
	border-radius: 3px;
	opacity: 0.75;
}

.modal-gallery .gallery-thumbs .gallery-thumb.active img,
.modal-gallery .gallery-thumbs .gallery-thumb:hover img {
	opacity: 1;
}

.project-modal {
	z-index: 20000;
}

.project-modal[hidden] {
	display: none !important;
}

.project-modal.active {
	display: flex !important;
}

.project-modal .modal-close {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	padding: 0.25em;
	min-width: 44px;
	min-height: 44px;
	cursor: pointer;
	box-shadow: none;
}

.contact-cta {
	margin: 3em calc(-1 * var(--content-padding-x)) 0;
	padding: 4em 3em;
	background:
		linear-gradient(135deg, rgba(61, 68, 73, 0.95), rgba(45, 50, 54, 0.92)),
		url('../images/Proj_5.1.jpg') center / cover no-repeat;
	color: #fff;
	text-align: center;
}

.contact-cta-content {
	max-width: 40em;
	margin: 0 auto;
}

.contact-cta .eyebrow {
	margin: 0 0 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.8em;
	opacity: 0.85;
}

.contact-cta h2 {
	color: #fff;
	border: none;
	padding: 0;
	margin: 0 0 0.6em;
}

.contact-cta p {
	margin: 0 0 1.75em;
	opacity: 0.95;
}

.contact-cta .button.primary {
	background-color: #f56a6a;
	color: #fff !important;
	border: 0;
	box-shadow: none;
}

.contact-cta .button.primary:hover {
	background-color: #e05555;
}

[data-theme="dark"] .contact-cta {
	background:
		linear-gradient(135deg, rgba(15, 17, 20, 0.92), rgba(34, 38, 43, 0.9)),
		url('../images/Proj_5.1.jpg') center / cover no-repeat;
}

@media (prefers-reduced-motion: reduce) {
	.featured-slider .slide,
	.project-cards .project-card-image img,
	.masonry-gallery .gallery-item img,
	.value-card {
		transition: none !important;
	}
}

@media screen and (max-width: 736px) {
	.contact-cta {
		padding: 3em 1.5em;
	}
}

