/**
 * Window Smart Home - Base
 * Reset, element defaults, layout helpers and WordPress core classes.
 */

/* ==========================================================================
   1. Reset
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--wsh-header-height) + var(--wsh-topbar-height) + 1rem);
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background-color: var(--wsh-body-bg);
	color: var(--wsh-body-color);
	font-family: var(--wsh-font-sans);
	font-size: var(--wsh-fs-body);
	font-weight: var(--wsh-fw-regular);
	line-height: var(--wsh-lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.wsh-menu-open {
	overflow: hidden;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Only colour SVGs that don't declare their own fill. The inline icons in
   inc/icons.php set fill="none" (stroked) or fill="currentColor" (filled),
   and a blanket `fill: currentColor` here would override those attributes. */
svg:not([fill]) {
	fill: currentColor;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

hr {
	border: 0;
	border-top: 1px solid var(--wsh-grey-100);
	margin: var(--wsh-space-10) 0;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--wsh-space-4);
	color: var(--wsh-heading-color);
	font-family: var(--wsh-font-heading);
	font-weight: var(--wsh-fw-semibold);
	line-height: var(--wsh-lh-heading);
	letter-spacing: var(--wsh-ls-heading);
}

h1 { font-size: var(--wsh-fs-h1); letter-spacing: var(--wsh-ls-display); }
h2 { font-size: var(--wsh-fs-h2); }
h3 { font-size: var(--wsh-fs-h3); }
h4 { font-size: var(--wsh-fs-h4); }
h5 { font-size: var(--wsh-fs-h5); }
h6 { font-size: var(--wsh-fs-h6); }

p,
ul,
ol,
dl,
figure,
blockquote,
pre,
table {
	margin: 0 0 var(--wsh-space-5);
}

p:last-child,
ul:last-child,
ol:last-child {
	margin-bottom: 0;
}

a {
	color: var(--wsh-link);
	text-decoration: none;
	transition: color var(--wsh-transition);
}

a:hover,
a:focus {
	color: var(--wsh-link-hover);
}

strong,
b {
	font-weight: var(--wsh-fw-semibold);
}

blockquote {
	padding-left: var(--wsh-space-5);
	border-left: var(--wsh-border-accent);
	color: var(--wsh-ink);
	font-size: var(--wsh-fs-lead);
}

code,
kbd,
pre {
	font-family: var(--wsh-font-mono);
	font-size: 0.9em;
}

pre {
	overflow-x: auto;
	padding: var(--wsh-space-5);
	border-radius: var(--wsh-radius-md);
	background: var(--wsh-grey-50);
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: var(--wsh-space-3);
	border-bottom: var(--wsh-border);
	text-align: left;
}

/* ==========================================================================
   3. Accessibility
   ========================================================================== */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	top: 1rem;
	left: 1rem;
	z-index: 100000;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
	padding: var(--wsh-space-3) var(--wsh-space-5);
	border-radius: var(--wsh-radius-pill);
	background: var(--wsh-blue);
	color: var(--wsh-white);
	font-weight: var(--wsh-fw-semibold);
	text-decoration: none;
}

:focus-visible {
	outline: 2px solid var(--wsh-focus-ring);
	outline-offset: 3px;
}

/* ==========================================================================
   4. Layout helpers
   ========================================================================== */

.wsh-container {
	width: 100%;
	max-width: calc(var(--wsh-container) + var(--wsh-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--wsh-gutter);
}

.wsh-container--narrow {
	max-width: calc(var(--wsh-container-narrow) + var(--wsh-gutter) * 2);
}

.wsh-section {
	padding-block: clamp(3rem, 1.5rem + 6vw, 6.5rem);
}

.wsh-section--tight {
	padding-block: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.wsh-site-main {
	min-height: 40vh;
}

.wsh-section-head {
	margin-bottom: var(--wsh-space-10);
	max-width: 46rem;
}

.wsh-section-head--split {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--wsh-space-6);
	max-width: none;
}

.wsh-section-head__cta {
	flex-shrink: 0;
}

/* Section eyebrow - tracked uppercase label */
.wsh-eyebrow {
	margin: 0 0 var(--wsh-space-3);
	color: var(--wsh-blue);
	font-size: var(--wsh-fs-eyebrow);
	font-weight: var(--wsh-fw-semibold);
	letter-spacing: var(--wsh-ls-eyebrow);
	line-height: 1.4;
	text-transform: uppercase;
}

.wsh-heading {
	margin: 0;
}

.wsh-heading__accent {
	color: var(--wsh-green);
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.wsh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wsh-space-2);
	padding: 15px 30px;
	border: 2px solid transparent;
	border-radius: 0;
	background-color: var(--wsh-blue);
	color: var(--wsh-white);
	font-size: var(--wsh-fs-sm);
	font-weight: var(--wsh-fw-semibold);
	letter-spacing: 0.03em;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color var(--wsh-transition), color var(--wsh-transition),
		border-color var(--wsh-transition), transform var(--wsh-transition);
}

.wsh-btn:hover,
.wsh-btn:focus {
	background-color: var(--wsh-blue-dark);
	color: var(--wsh-white);
	transform: translateY(-1px);
}

.wsh-btn--navy {
	background-color: var(--wsh-navy);
}

.wsh-btn--navy:hover,
.wsh-btn--navy:focus {
	background-color: var(--wsh-navy-dark);
}

.wsh-btn--white {
	background-color: var(--wsh-white);
	color: var(--wsh-navy);
}

.wsh-btn--white:hover,
.wsh-btn--white:focus {
	background-color: var(--wsh-grey-50);
	color: var(--wsh-navy);
}

.wsh-btn--outline {
	border-color: rgba(255, 255, 255, 0.6);
	background-color: transparent;
	color: var(--wsh-white);
}

.wsh-btn--outline:hover,
.wsh-btn--outline:focus {
	border-color: var(--wsh-white);
	background-color: var(--wsh-white);
	color: var(--wsh-navy);
}

.wsh-btn--outline-blue {
	border-color: var(--wsh-blue);
	background-color: transparent;
	color: var(--wsh-blue);
}

.wsh-btn--outline-blue:hover,
.wsh-btn--outline-blue:focus {
	background-color: var(--wsh-blue);
	color: var(--wsh-white);
}

.wsh-btn--sm {
	padding: 10px 20px;
}

.wsh-btn--block {
	display: flex;
	width: 100%;
}

/* ==========================================================================
   6. Checklist
   ========================================================================== */

.wsh-checklist {
	display: flex;
	flex-direction: column;
	gap: var(--wsh-space-3);
	margin: 0 0 var(--wsh-space-8);
	padding: 0;
	list-style: none;
}

.wsh-checklist li {
	display: flex;
	align-items: center;
	gap: var(--wsh-space-3);
	color: var(--wsh-ink);
	font-weight: var(--wsh-fw-medium);
}

.wsh-checklist__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	border-radius: var(--wsh-radius-circle);
	background: var(--wsh-green);
	color: var(--wsh-white);
}

/* ==========================================================================
   7. Stars
   ========================================================================== */

.wsh-stars {
	display: inline-flex;
	gap: 2px;
	margin-bottom: var(--wsh-space-4);
	color: var(--wsh-gold);
}

.wsh-stars__star {
	display: flex;
	color: rgba(255, 255, 255, 0.25);
}

.wsh-stars__star.is-on {
	color: var(--wsh-gold);
}

/* ==========================================================================
   8. Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
	width: 100%;
	padding: 13px 18px;
	border: var(--wsh-border);
	border-radius: var(--wsh-radius-md);
	background: var(--wsh-white);
	color: var(--wsh-slate);
	transition: border-color var(--wsh-transition), box-shadow var(--wsh-transition);
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--wsh-blue);
	box-shadow: 0 0 0 3px var(--wsh-blue-10);
	outline: none;
}

::placeholder {
	color: var(--wsh-grey-300);
	opacity: 1;
}

/* ==========================================================================
   9. WordPress core classes
   ========================================================================== */

.alignleft {
	float: left;
	margin: 0 var(--wsh-space-6) var(--wsh-space-4) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--wsh-space-4) var(--wsh-space-6);
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignwide {
	max-width: min(1200px, 100%);
	margin-inline: auto;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.wp-block-image figcaption {
	margin-top: var(--wsh-space-2);
	color: var(--wsh-grey-500);
	font-size: var(--wsh-fs-sm);
	text-align: center;
}

.sticky,
.bypostauthor {
	display: block;
}

.wsh-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wsh-space-2);
	justify-content: center;
	margin-top: var(--wsh-space-12);
}

.wsh-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding-inline: var(--wsh-space-3);
	border-radius: var(--wsh-radius-circle);
	background: var(--wsh-grey-50);
	color: var(--wsh-grey-500);
	font-weight: var(--wsh-fw-medium);
}

.wsh-pagination .page-numbers.current,
.wsh-pagination .page-numbers:hover {
	background: var(--wsh-blue);
	color: var(--wsh-white);
}

/* ==========================================================================
   10. Entry / archive defaults
   ========================================================================== */

.wsh-single__col {
	max-width: 46rem;
	margin-inline: auto;
}

.wsh-entry-content > * + * {
	margin-top: var(--wsh-space-5);
}

.wsh-entry-content h2,
.wsh-entry-content h3,
.wsh-entry-content h4 {
	margin-top: var(--wsh-space-10);
}

.wsh-entry-content ul,
.wsh-entry-content ol {
	padding-left: 1.25em;
}

.wsh-entry-content li + li {
	margin-top: var(--wsh-space-2);
}

.wsh-empty-hint {
	padding: var(--wsh-space-6);
	border-radius: var(--wsh-radius-md);
	background: var(--wsh-grey-50);
	color: var(--wsh-grey-500);
	font-size: var(--wsh-fs-sm);
	text-align: center;
}

.wsh-grid {
	display: grid;
	gap: var(--wsh-space-8);
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.wsh-page-header {
	margin-bottom: var(--wsh-space-10);
}

.wsh-page-header__title {
	font-size: var(--wsh-fs-h2);
}

.wsh-entry {
	display: flex;
	flex-direction: column;
}

.wsh-entry__thumb {
	display: block;
	margin-bottom: var(--wsh-space-5);
	border-radius: var(--wsh-radius-lg);
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.wsh-entry__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--wsh-transition-slow);
}

.wsh-entry:hover .wsh-entry__thumb img {
	transform: scale(1.05);
}

.wsh-entry__date {
	display: block;
	margin-bottom: var(--wsh-space-2);
	color: var(--wsh-blue);
	font-size: var(--wsh-fs-xs);
	font-weight: var(--wsh-fw-semibold);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wsh-entry__title {
	margin: 0 0 var(--wsh-space-3);
	font-size: var(--wsh-fs-h4);
}

.wsh-entry__title a {
	color: inherit;
}

.wsh-entry__title a:hover {
	color: var(--wsh-blue);
}

.wsh-entry__excerpt {
	margin-bottom: var(--wsh-space-4);
	font-size: var(--wsh-fs-sm);
}

.wsh-entry__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	color: var(--wsh-blue);
	font-size: var(--wsh-fs-sm);
	font-weight: var(--wsh-fw-semibold);
}

/* ==========================================================================
   11. FAQ accordion
   ========================================================================== */

.wsh-faq__list {
	display: flex;
	flex-direction: column;
	gap: var(--wsh-space-4);
}

.wsh-faq__item {
	padding: var(--wsh-space-5) var(--wsh-space-6);
	border: var(--wsh-border);
	border-radius: var(--wsh-radius-lg);
	background: var(--wsh-white);
}

.wsh-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wsh-space-4);
	list-style: none;
	color: var(--wsh-ink);
	font-weight: var(--wsh-fw-semibold);
	cursor: pointer;
}

.wsh-faq__question::-webkit-details-marker {
	display: none;
}

.wsh-faq__icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: var(--wsh-radius-circle);
	background: var(--wsh-grey-50);
	color: var(--wsh-blue);
	transition: transform var(--wsh-transition), background-color var(--wsh-transition), color var(--wsh-transition);
}

.wsh-faq__item[open] .wsh-faq__icon {
	background: var(--wsh-blue);
	color: var(--wsh-white);
	transform: rotate(180deg);
}

.wsh-faq__answer {
	margin: var(--wsh-space-4) 0 0;
	color: var(--wsh-grey-500);
	font-size: var(--wsh-fs-sm);
	line-height: var(--wsh-lh-body);
}
