/*
Theme Name: Handcut Designs by Anagam
Theme URI: https://handcutdesigns.com/
Author: Anagam
Author URI: https://anagam.com/
Description: Custom WordPress block theme for Handcut Designs, based on the Jakson Starter Block Theme.
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: handcut-designs
Tags: block-theme, full-site-editing
*/

html { scroll-behavior: smooth; }

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

body .wp-block-navigation__responsive-container-open:not(.always-shown) {
	display: block !important;
}

body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
	display: none !important;
}

@media (min-width: 782px) {
	body .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none !important;
	}

	body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: block !important;
	}
}

h1, h2, h3, h4 { text-wrap: balance; }

:where(.wp-block-columns.has-background) { padding: initial; }

a {
	transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

/* Real page sections only */
.hd-section {
	padding-top: 40px;
	padding-bottom: 80px;
}
/* Light Section */
.hd-light {
	color: var(--wp--preset--color--text-grey);
	background-color: var(--wp--preset--color--light-background);
	background-attachment: fixed !important;
	background-position: left top !important;
	background-repeat: no-repeat !important;
	background-size: auto !important;
}
@media (max-width: 992px) {
	.hd-light {
		background-attachment: scroll !important;
	}
}
/* Dark section */
/* Dark section */
.hd-dark {
	color: var(--wp--preset--color--white);
	background-color: #111312 !important;

	background-attachment: fixed !important;
	background-position: left top !important;
	background-repeat: no-repeat !important;
	background-size: auto !important;

	/* Break out of WordPress constrained content width */
	width: 100vw !important;
	max-width: none !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}

.hd-dark :where(h1, h2, h3, h4, h5, h6, p, li, a) {
	color: inherit;
}

@media (max-width: 992px) {
	.hd-dark { background-attachment: scroll !important; }
}
/* Orange section */
.hd-orange {
	color: #111312;
	background-color: #DD7802 !important;

	background-attachment: fixed !important;
	background-position: left top !important;
	background-repeat: no-repeat !important;
	background-size: auto !important;

	/* Break out of WordPress constrained content width */
	width: 100vw !important;
	max-width: none !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}

.hd-orange :where(h1, h2, h3, h4, h5, h6, p, li, a) {
	color: inherit;
}

/* White highlights */
.hd-orange :where(.hd-highlight, strong, mark) {
	color: var(--wp--preset--color--white);
}


/* Dark orange section */
.hd-orange-dark {
	color: var(--wp--preset--color--white);
	background-color: #573201 !important;

	background-attachment: fixed !important;
	background-position: left top !important;
	background-repeat: no-repeat !important;
	background-size: auto !important;

	/* Break out of WordPress constrained content width */
	width: 100vw !important;
	max-width: none !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}

.hd-orange-dark :where(h1, h2, h3, h4, h5, h6, p, li, a) {
	color: inherit;
}

/* Orange highlights */
.hd-orange-dark :where(.hd-highlight, strong, mark) {
	color: #D58000;
}


@media (max-width: 992px) {
	.hd-orange,
	.hd-orange-dark {
		background-attachment: scroll !important;
	}
}
.hd-separator-dark img {
	filter: grayscale(1) brightness(1.8);

}
.hd-hue-white img {
	filter: brightness(4) grayscale(1);
}
/* Remove WordPress global page padding */
.entry-content.wp-block-post-content.has-global-padding {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Typography variants */
.hd-heading-light {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 1.5rem;
	font-weight: 300;
	line-height: 1;
	text-transform: uppercase;
	color: var(--wp--preset--color--orange);
}

.hd-heading-hero {
	font-family: var(--wp--preset--font-family--roboto);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 500;
	line-height: 1.46;
	text-transform: none;
}

.hd-heading-display {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
}

/* =========================
   HD BUTTONS
========================= */

.hd-btn-orange .wp-block-button__link,
.hd-btn-white .wp-block-button__link,
.hd-btn-black .wp-block-button__link {
	border: 2px solid;
	border-radius: 4px;
	background: transparent;
	padding: 0.75rem 1.5rem;
	font-weight: 500;
	text-decoration: none;
	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease;
}


/* ORANGE
   Default: orange outline + orange text
   Hover: orange fill + dark text
*/
.hd-btn-orange .wp-block-button__link {
	color: #D58000 !important;
	border-color: #D58000 !important;
	background-color: transparent !important;
}

.hd-btn-orange .wp-block-button__link:hover,
.hd-btn-orange .wp-block-button__link:focus {
	color: #D58000 !important;
	border-color: #D58000 !important;
	background-color: #D5800058 !important;
}


/* WHITE
   Default: white outline + white text
   Hover: white fill + dark text
*/
.hd-btn-white .wp-block-button__link {
	color: #FFFFFF !important;
	border-color: #FFFFFF !important;
	background-color: transparent !important;
}

.hd-btn-white .wp-block-button__link:hover,
.hd-btn-white .wp-block-button__link:focus {
	color: #111312 !important;
	border-color: #FFFFFF !important;
	background-color: #FFFFFF !important;
}


/* BLACK
   Default: dark outline + dark text
   Hover: dark fill + white text
*/
.hd-btn-black .wp-block-button__link {
	color: #111312 !important;
	border-color: #111312 !important;
	background-color: transparent !important;
}

.hd-btn-black .wp-block-button__link:hover,
.hd-btn-black .wp-block-button__link:focus {
	color: #FFFFFF !important;
	border-color: #111312 !important;
	background-color: #111312 !important;
}
.hd-project-brief {
	max-width: 850px;
	margin-inline: auto;
	background: #fff;
	padding: 2.5rem;
}
.hd-project-finder .ff_submit_btn_wrapper {
	display: none;
}
/* =========================================================
   HD PROJECT FINDER — DRAWER
   ========================================================= */

.hd-finder-drawer {
	position: fixed;
	inset: 0;
	z-index: 9999;

	display: flex;
	align-items: flex-end;
	justify-content: center;

	background: rgba(17, 19, 18, 0);
	pointer-events: none;

	transition: background 0.3s ease;
}

.hd-finder-panel {
	width: calc(100% - 2rem);
	max-width: 54rem;
	max-height: 80vh;
	overflow-y: auto;

	background: #fff;
	padding: 2rem;

	transform: translateY(calc(100% + 3rem));
	transition: transform 0.35s ease;
}

/* OPEN STATE */

.hd-finder-drawer.is-open {
	background: rgba(17, 19, 18, 0.65);
	pointer-events: auto;
}

.hd-finder-drawer.is-open .hd-finder-panel {
	transform: translateY(0);
}

/* Prevent page behind drawer from scrolling */

body.hd-finder-is-open {
	overflow: hidden;
}


/* CLOSE BUTTON */

.hd-finder-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
}


/* ANSWER BUTTONS */

.hd-finder-answers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.hd-finder-answers .wp-block-button {
	margin: 0;
}
.hd-finder-step {
	display: none;
}

.hd-finder-step.is-active {
	display: block;
}
/* Keep each finder step visually consistent */
.hd-finder-step {
	min-height: 26rem;
}

/* Keep question headings on a stable footprint */
.hd-finder-step h3 {
	min-height: 3.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	margin-bottom: 1.5rem;
}

/* Make answer buttons consistent */
.hd-finder-answers .wp-block-button__link {
	min-height: 4.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
	line-height: 1.15;
}
.hd-finder-result {
	display: none;
}

.hd-finder-result.is-active {
	display: block;
}
/* =========================================================
   HD FINDER — RESULT CARD
   ========================================================= */

.hd-finder-result-card {
	max-width: 46rem;
	margin-inline: auto;
	padding: 2rem;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 0.35rem;
}

.hd-finder-result-card .wp-block-columns {
	align-items: center;
	gap: 2.5rem;
	margin-bottom: 1.5rem;
}

.hd-finder-result-card h5 {
	margin-top: 0;
	margin-bottom: 1.25rem;
	color: #d58000;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.hd-finder-result-card p {
	margin-top: 0;
	margin-bottom: 1rem;
}

.hd-finder-result-action {
	text-align: center;
}

.hd-finder-result-action .wp-block-buttons {
	justify-content: center;
}

.hd-finder-result-nav {
	justify-content: center;
	margin-top: 1rem;
}

.hd-finder-result-nav .wp-block-button__link {
	background: transparent;
	color: #d58000;
	border: 0;
	padding: 0.35rem 0.5rem;
}

.hd-finder-result-nav .wp-block-button__link:hover {
	text-decoration: underline;
}
.hd-post-sidebar {
	position: sticky;
	top: 7rem;
	align-self: flex-start;
}
/* ---------------------------------------------------------
   Portfolio Filter
--------------------------------------------------------- */

.hd-portfolio-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-bottom: 2rem;
}

.hd-portfolio-filter button {
	appearance: none;
	background: transparent;
	border: 0;
	border-bottom: 1px solid transparent;
	border-radius: 0;
	color: #7A7A7A;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	padding: 0.25rem 0;
	text-transform: uppercase;
	transition:
		color 0.2s ease,
		border-color 0.2s ease;
}

.hd-portfolio-filter button:hover,
.hd-portfolio-filter button:focus-visible {
	color: #D58000;
}

.hd-portfolio-filter button.is-active {
	border-bottom-color: #D58000;
	color: #D58000;
}

/* Tags exist for JS but aren't visible */
.hd-portfolio-tags {
	display: none;
}

/* JS uses this to filter portfolio items */
.hd-portfolio-grid .wp-block-post.hd-is-hidden {
	display: none;
}
/* Portfolio Show More */

.hd-portfolio-more {
	margin-top: 2rem;
	text-align: center;
}

.hd-portfolio-more.hd-is-hidden {
	display: none;
}
/* ---------------------------------------------------------
   Web Tags Navigation
--------------------------------------------------------- */

.hd-web-tags-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	align-items: center;
}

.hd-web-tags-nav a {
	border-bottom: 1px solid transparent;
	color: #7A7A7A;
	font-size: 0.875rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	padding: 0.25rem 0;
	text-decoration: none;
	text-transform: uppercase;
	transition:
		color 0.2s ease,
		border-color 0.2s ease;
}

.hd-web-tags-nav a:hover,
.hd-web-tags-nav a:focus-visible,
.hd-web-tags-nav a.is-active {
	border-bottom-color: #D58000;
	color: #D58000;
}
.hd-web-tags-sidebar .hd-web-tags-nav {
	flex-direction: column;
	align-items: flex-start;
}
/* Sidebar version of Web Tags navigation */
.hd-web-tags-sidebar .hd-web-tags-nav {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.hd-web-tags-sidebar .hd-web-tags-nav a {
	font-size: inherit;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
}