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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Section eyebrow - icon + tracked label */
.prh-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--prh-space-2);
	margin: 0 0 var(--prh-space-3);
	color: var(--prh-teal);
	font-size: var(--prh-fs-eyebrow);
	font-weight: var(--prh-fw-semibold);
	letter-spacing: var(--prh-ls-eyebrow);
	line-height: 1.4;
	text-transform: uppercase;
}

/* .prh-eyebrow svg {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	padding: 3px;
	border-radius: var(--prh-radius-circle);
	background: var(--prh-white);
} */

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

.prh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--prh-space-2);
	padding: 14px 26px;
	border: 2px solid transparent;
	border-radius: var(--prh-radius-pill);
	background-color: var(--prh-teal);
	color: var(--prh-white);
	font-size: var(--prh-fs-body);
	font-weight: var(--prh-fw-semibold);
	line-height: 1;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--prh-transition), color var(--prh-transition),
		border-color var(--prh-transition), transform var(--prh-transition);
}

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

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

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

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

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

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

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

.prh-btn--outline-teal {
	border-color: var(--prh-teal);
	background-color: transparent;
	color: var(--prh-teal);
}

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

.prh-btn--sm {
	padding: 10px 18px;
	font-size: var(--prh-fs-sm);
}

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

/* --------------------------------------------------------------------------
   Pill button with a trailing circular arrow (services / testimonials CTAs,
   "Read More" links)
   -------------------------------------------------------------------------- */

.prh-btn-arrow {
	--prh-arrow-color: var(--prh-teal);
	--prh-arrow-contrast: var(--prh-white);

	display: inline-flex;
	align-items: center;
	gap: var(--prh-space-2);
	text-decoration: none;
}

.prh-btn-arrow__label {
	color: var(--prh-arrow-color);
	font-size: var(--prh-fs-sm);
	font-weight: var(--prh-fw-semibold);
	line-height: 1;
	white-space: nowrap;
}

.prh-btn-arrow__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex: 0 0 32px;
	border: 1px solid var(--prh-arrow-color);
	border-radius: var(--prh-radius-circle);
	background: transparent;
	color: var(--prh-arrow-color);
	transition: background-color var(--prh-transition), color var(--prh-transition),
		transform var(--prh-transition);
}

.prh-btn-arrow__icon svg {
	width: 16px;
	height: 16px;
}

.prh-btn-arrow:hover .prh-btn-arrow__icon,
.prh-btn-arrow:focus-visible .prh-btn-arrow__icon {
	background: var(--prh-arrow-color);
	color: var(--prh-arrow-contrast);
	transform: translateX(2px);
}

.prh-btn-arrow--white {
	--prh-arrow-color: var(--prh-white);
	--prh-arrow-contrast: var(--prh-navy);
}

.prh-btn-arrow--white .prh-btn-arrow__label {
	color: var(--prh-white);
}

/* ==========================================================================
   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: 13px 18px;
	border: var(--prh-border);
	border-radius: var(--prh-radius-md);
	background: var(--prh-white);
	color: var(--prh-slate);
	transition: border-color var(--prh-transition), box-shadow var(--prh-transition);
}

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

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

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

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

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

.sticky,
.bypostauthor {
	display: block;
}

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

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

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

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

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

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

.prh-entry__title a {
	color: inherit;
}

.prh-entry__title a:hover {
	color: var(--prh-teal);
}

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

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

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

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

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

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

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

/* ==========================================================================
   9. Sidebar, comments, empty states
   ========================================================================== */

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

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

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

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

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

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