/**
 * Solar Ready Hub - 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(--srh-header-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(--srh-body-bg);
	color: var(--srh-body-color);
	font-family: var(--srh-font-sans);
	font-size: var(--srh-fs-body);
	font-weight: var(--srh-fw-regular);
	line-height: var(--srh-lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.srh-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(--srh-grey-100);
	margin: var(--srh-space-10) 0;
}

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

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

h1 { font-size: var(--srh-fs-h1); letter-spacing: var(--srh-ls-display); }
h2 { font-size: var(--srh-fs-h2); }
h3 { font-size: var(--srh-fs-h3); }
h4 { font-size: var(--srh-fs-h4); }
h5 { font-size: var(--srh-fs-h5); font-weight: var(--srh-fw-semibold); letter-spacing: 0; }
h6 { font-size: var(--srh-fs-h6); font-weight: var(--srh-fw-semibold); letter-spacing: 0; }

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

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

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

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

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

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

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

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

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

th,
td {
	padding: var(--srh-space-3);
	border-bottom: var(--srh-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(--srh-space-3) var(--srh-space-5);
	border-radius: var(--srh-radius-pill);
	background: var(--srh-green);
	color: var(--srh-white);
	font-weight: var(--srh-fw-semibold);
	text-decoration: none;
}

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

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

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

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

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

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

/* Section eyebrow - green rule + lightning icon + label (Figma "about us") */
.srh-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--srh-space-1);
	padding: 1px var(--srh-space-2);
	border-left: var(--srh-border-accent);
	color: var(--srh-green);
	font-size: var(--srh-fs-eyebrow);
	font-weight: var(--srh-fw-regular);
	line-height: 1.5;
}

.srh-eyebrow svg {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
}

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

.srh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--srh-space-1);
	padding: 12px 18px;
	border: 2px solid transparent;
	border-radius: var(--srh-radius-pill);
	background-color: var(--srh-green);
	color: var(--srh-white);
	font-size: var(--srh-fs-body);
	font-weight: var(--srh-fw-semibold);
	line-height: 1;
	letter-spacing: var(--srh-ls-tight);
	text-align: center;
	text-decoration: none;
	transition: background-color var(--srh-transition), color var(--srh-transition),
		border-color var(--srh-transition), transform var(--srh-transition);
}

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

.srh-btn--yellow {
	background-color: var(--srh-yellow);
	color: var(--srh-black);
}

.srh-btn--yellow:hover,
.srh-btn--yellow:focus {
	background-color: var(--srh-yellow-dark);
	color: var(--srh-black);
}

.srh-btn--outline {
	border-color: var(--srh-green);
	background-color: transparent;
	color: var(--srh-green);
}

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

.srh-btn--lg {
	padding: 16px 28px;
}

/* --------------------------------------------------------------------------
   Pill button with a trailing circular arrow  (Figma "Component 1")
   Two shapes, recoloured with --srh-arrow-color:
     default  outlined label  + filled circle   (About Us, View All …, CTA band)
     --fill   filled label    + outlined circle (hero "Get in Touch")
   -------------------------------------------------------------------------- */

.srh-btn-arrow {
	--srh-arrow-color: var(--srh-green);
	--srh-arrow-contrast: var(--srh-white);

	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.srh-btn-arrow__label {
	display: inline-flex;
	align-items: center;
	padding: 12px 24px;
	border: 1px solid var(--srh-arrow-color);
	border-radius: var(--srh-radius-pill);
	background: transparent;
	color: var(--srh-arrow-color);
	font-size: var(--srh-fs-body);
	font-weight: var(--srh-fw-semibold);
	line-height: 1;
	letter-spacing: var(--srh-ls-tight);
	white-space: nowrap;
	transition: background-color var(--srh-transition), color var(--srh-transition);
}

.srh-btn-arrow__icon {
	display: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
	border: 1px solid var(--srh-arrow-color);
	border-radius: var(--srh-radius-circle);
	background: var(--srh-arrow-color);
	color: var(--srh-arrow-contrast);
	transition: transform var(--srh-transition);
}

.srh-btn-arrow__icon svg {
	width: 18px;
	height: 18px;
}

.srh-btn-arrow:hover .srh-btn-arrow__label,
.srh-btn-arrow:focus-visible .srh-btn-arrow__label {
	background: var(--srh-arrow-color);
	color: var(--srh-arrow-contrast);
}

.srh-btn-arrow:hover .srh-btn-arrow__icon {
	transform: translateX(2px);
}

/* Colour variants */
.srh-btn-arrow--dark {
	--srh-arrow-color: var(--srh-black);
	--srh-arrow-contrast: var(--srh-white);
}

.srh-btn-arrow--white {
	--srh-arrow-color: var(--srh-white);
	--srh-arrow-contrast: var(--srh-green);
}

/* Filled variant - hero */
.srh-btn-arrow--fill {
	--srh-arrow-color: var(--srh-yellow);
	--srh-arrow-contrast: var(--srh-black);
}

.srh-btn-arrow--fill .srh-btn-arrow__label {
	padding: 12px 24px;
	border-color: transparent;
	background: var(--srh-arrow-color);
	color: var(--srh-arrow-contrast);
	font-size: clamp(1rem, 0.75rem + 1.1vw, 1.6rem); /* 16 -> 25.6 */
}

.srh-btn-arrow--fill .srh-btn-arrow__icon {
	background: transparent;
	color: var(--srh-arrow-contrast);
}

.srh-btn-arrow--fill:hover .srh-btn-arrow__label,
.srh-btn-arrow--fill:focus-visible .srh-btn-arrow__label {
	background: var(--srh-yellow-dark);
	color: var(--srh-arrow-contrast);
}

/* ==========================================================================
   6. 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: 12px 16px;
	border: var(--srh-border);
	border-radius: var(--srh-radius-md);
	background: var(--srh-white);
	color: var(--srh-slate);
	transition: border-color var(--srh-transition), box-shadow var(--srh-transition);
}

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

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

/* ==========================================================================
   7. WordPress core classes
   ========================================================================== */

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

.alignright {
	float: right;
	margin: 0 0 var(--srh-space-4) var(--srh-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(--srh-space-2);
	color: var(--srh-grey-500);
	font-size: var(--srh-fs-sm);
	text-align: center;
}

.sticky,
.bypostauthor {
	display: block;
}

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

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

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

/* ==========================================================================
   8. Entry / archive defaults
   ========================================================================== */

.srh-entry {
	margin-bottom: var(--srh-space-12);
}

.srh-entry__title {
	font-size: var(--srh-fs-h3);
}

.srh-entry__title a {
	color: inherit;
}

.srh-entry__title a:hover {
	color: var(--srh-green);
}

.srh-entry__meta {
	margin-bottom: var(--srh-space-3);
	color: var(--srh-grey-500);
	font-size: var(--srh-fs-sm);
}

.srh-entry__thumb img {
	width: 100%;
	border-radius: var(--srh-radius-lg);
	object-fit: cover;
}

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

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

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

.srh-archive-description {
	max-width: 46rem;
	margin-top: var(--srh-space-3);
}

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

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

.srh-entry__excerpt {
	margin-top: var(--srh-space-2);
}

.srh-page-links {
	display: flex;
	gap: var(--srh-space-2);
	margin-top: var(--srh-space-6);
	font-weight: var(--srh-fw-medium);
}

/* ==========================================================================
   9. Search form, sidebar, comments, empty states
   ========================================================================== */

.srh-search-form__field {
	flex: 1 1 auto;
	border-radius: var(--srh-radius-pill);
}

.srh-no-results {
	max-width: 40rem;
	padding: var(--srh-space-10);
	border-radius: var(--srh-radius-lg);
	background: var(--srh-grey-50);
	text-align: center;
}

.srh-sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--srh-space-8);
	margin-top: var(--srh-space-12);
}

.srh-sidebar .widget-title {
	font-size: var(--srh-fs-h4);
}

.srh-sidebar ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.srh-sidebar li + li {
	margin-top: var(--srh-space-2);
}

.srh-comments {
	margin-top: var(--srh-space-16);
	padding-top: var(--srh-space-10);
	border-top: var(--srh-border);
}

.srh-comments__title {
	font-size: var(--srh-fs-h3);
}

.srh-comments__list,
.srh-comments__list .children {
	margin: 0 0 var(--srh-space-10);
	padding: 0;
	list-style: none;
}

.srh-comments__list .children {
	margin: var(--srh-space-5) 0 0;
	padding-left: var(--srh-space-6);
	border-left: var(--srh-border);
}

.srh-comments__list .comment-body {
	padding: var(--srh-space-5) 0;
	border-bottom: var(--srh-border);
}

.srh-comments__list .comment-author img {
	display: inline-block;
	border-radius: var(--srh-radius-circle);
	vertical-align: middle;
}

.srh-comments__list .comment-meta {
	color: var(--srh-grey-500);
	font-size: var(--srh-fs-sm);
}

.srh-comments__closed {
	color: var(--srh-grey-500);
	font-style: italic;
}

.srh-comments .comment-form {
	display: grid;
	gap: var(--srh-space-4);
	max-width: 40rem;
}

.srh-comments .comment-form label {
	display: block;
	margin-bottom: var(--srh-space-1);
	color: var(--srh-ink);
	font-size: var(--srh-fs-sm);
	font-weight: var(--srh-fw-medium);
}

.srh-comments .comment-form .submit {
	justify-self: start;
	padding: 12px 24px;
	border: 0;
	border-radius: var(--srh-radius-pill);
	background: var(--srh-green);
	color: var(--srh-white);
	font-weight: var(--srh-fw-semibold);
	transition: background-color var(--srh-transition);
}

.srh-comments .comment-form .submit:hover {
	background: var(--srh-green-dark);
}
