/*
Theme Name: ABRAHAM, JAMES
Theme URI: https://chemdry.com
Author: ABRAHAM, JAMES Local
Description: A lightweight, Gutenberg-first block theme for the ABRAHAM, JAMES homepage. Each homepage section is a reusable block pattern that the client can reorder or duplicate from the Site Editor.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chemdry
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, threaded-comments, translation-ready, wide-blocks, block-styles, accessibility-ready, business
*/

/*
 * This file is intentionally minimal. The bulk of the design system lives in
 * theme.json (global tokens: colors, typography, spacing). Block-level styles
 * ship with each pattern. Add small overrides here only when needed.
 */

/* Slight global polish: prettier text wrapping and a baseline for everything. */
body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Make cover block overlays sit naturally on dark green. */
.wp-block-cover__background.has-primary-background-color {
	background-color: var(--wp--preset--color--primary) !important;
}

/* Button border-radius polish (CHEM-DRY buttons are gently rounded). */
.wp-block-button__link {
	border-radius: 6px;
}

/* Make the navigation menu items feel slightly more like a corporate site. */
.wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.25rem 0.5rem;
}

/* Sticky site header (utility bar + main header) — treats both rows as one unit. */
.chemdry-site-header {
	position: fixed;
	top: 0;
	z-index: 9999;
}

body.admin-bar .chemdry-site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .chemdry-site-header {
		top: 46px;
	}
}

/* Keep all top-level primary nav items on a single row, even with 9 entries. */
.chemdry-site-header .wp-block-navigation {
	flex-wrap: nowrap !important;
}

.chemdry-site-header .wp-block-navigation-item {
	white-space: nowrap;
}

/* Slightly tighter item padding for the site header nav so the row fits at 1400px. */
.chemdry-site-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.25rem 0.4rem;
}

/* Header search should show icon only, never the visible text label. */
.chemdry-site-header .wp-block-search__label {
	display: none;
}

/* Highlight the current navigation item in the brand green. */
.wp-block-navigation .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--primary) !important;
}

/* Force alignfull blocks to truly span viewport on front-end and editor. */
.wp-site-blocks .alignfull,
.editor-styles-wrapper .alignfull,
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > .wp-block[data-align="full"],
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}

/* Keep ABRAHAM, JAMES services card imagery visually consistent. */
.chemdry-services-grid .wp-block-image img,
.editor-styles-wrapper .chemdry-services-grid .wp-block-image img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	display: block;
}

/* Default homepage hero banner height. */
.chemdry-hero-image img,
.editor-styles-wrapper .chemdry-hero-image img {
	width: 100%;
	height: 500px;
	object-fit: cover;
	display: block;
}

/* Shared sub-page hero: image at Home banner height with title overlaid. */
.chemdry-page-hero,
.editor-styles-wrapper .chemdry-page-hero {
	position: relative;
	overflow: hidden;
}

.chemdry-page-hero::after,
.editor-styles-wrapper .chemdry-page-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.22) 55%, rgba(0, 0, 0, 0.38) 100%);
	pointer-events: none;
	z-index: 1;
}

.chemdry-page-hero .chemdry-page-hero-image,
.editor-styles-wrapper .chemdry-page-hero .chemdry-page-hero-image {
	margin-bottom: 0;
}

.chemdry-page-hero .chemdry-page-hero-image img,
.editor-styles-wrapper .chemdry-page-hero .chemdry-page-hero-image img {
	width: 100%;
	height: 500px;
	object-fit: cover;
	display: block;
}

.chemdry-page-hero .chemdry-page-hero-title,
.editor-styles-wrapper .chemdry-page-hero .chemdry-page-hero-title {
	position: absolute;
	left: var(--wp--preset--spacing--50);
	right: var(--wp--preset--spacing--50);
	top: 50%;
	transform: translateY(-50%);
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	background: transparent !important;
	z-index: 2;
	box-sizing: border-box;
}

.chemdry-page-hero .chemdry-page-hero-title .wp-block-post-title,
.editor-styles-wrapper .chemdry-page-hero .chemdry-page-hero-title .wp-block-post-title {
	margin: 0;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* ============================================
   Subtle Animations & Transitions
   - CSS-only, no-JS, no layout shift
   - Editor-safe: uses keyframe + transition only on scoped selectors
   - Respects prefers-reduced-motion
   ============================================ */

/* ---- Keyframes ---- */
@keyframes chemdry-fade-in-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---- Buttons: hover lift + active press ---- */
.wp-block-button__link {
	transition: opacity 0.2s ease, transform 0.15s ease, background-color 0.2s ease, color 0.2s ease;
	will-change: transform;
}

.wp-block-button__link:hover {
	opacity: 0.88;
	transform: translateY(-1px);
	box-shadow: none;
	filter: none;
	color: inherit !important;
}

.wp-block-button__link:active {
	transform: scale(0.97);
	color: inherit !important;
}

.wp-block-button__link:focus,
.wp-block-button__link:focus-visible,
.wp-block-button__link:visited {
	color: inherit !important;
}

.wp-block-button__link.has-base-color,
.wp-block-button__link.has-base-color:hover,
.wp-block-button__link.has-base-color:focus,
.wp-block-button__link.has-base-color:focus-visible,
.wp-block-button__link.has-base-color:active,
.wp-block-button__link.has-base-color:visited {
	color: var(--wp--preset--color--base) !important;
}

.wp-block-button .wp-block-button__link,
.wp-block-button .wp-block-button__link:link,
.wp-block-button .wp-block-button__link:visited,
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus,
.wp-block-button .wp-block-button__link:focus-visible,
.wp-block-button .wp-block-button__link:active,
.wp-block-button .wp-element-button,
.wp-block-button .wp-element-button:link,
.wp-block-button .wp-element-button:visited,
.wp-block-button .wp-element-button:hover,
.wp-block-button .wp-element-button:focus,
.wp-block-button .wp-element-button:focus-visible,
.wp-block-button .wp-element-button:active {
	color: var(--wp--preset--color--base) !important;
	text-decoration: none !important;
}

.has-primary-background-color.wp-block-button__link,
.has-primary-background-color.wp-block-button__link:link,
.has-primary-background-color.wp-block-button__link:visited,
.has-primary-background-color.wp-block-button__link:hover,
.has-primary-background-color.wp-block-button__link:focus,
.has-primary-background-color.wp-block-button__link:focus-visible,
.has-primary-background-color.wp-block-button__link:active,
.has-primary-background-color .wp-block-button__link,
.has-primary-background-color .wp-block-button__link:hover,
.has-primary-background-color .wp-element-button,
.has-primary-background-color .wp-element-button:hover {
	color: #fff !important;
}

/* ---- Header Nav Links: subtle lift + underline reveal ---- */
.chemdry-site-header .wp-block-navigation-item__content {
	position: relative;
	transition: color 0.2s ease, transform 0.2s ease;
}

.chemdry-site-header .wp-block-navigation-item__content:hover {
	transform: translateY(-1px);
	color: var(--wp--preset--color--primary) !important;
}

/* ---- Footer Links ---- */
footer a {
	transition: color 0.2s ease;
}

footer a:hover {
	color: var(--wp--preset--color--primary) !important;
	opacity: 0.88;
}

/* ---- Service Grid: image hover scale ---- */
.chemdry-services-grid .wp-block-image {
	overflow: hidden;
	border-radius: 4px;
}

.chemdry-services-grid .wp-block-image img {
	transition: transform 0.4s ease;
	will-change: transform;
}

.chemdry-services-grid .wp-block-image:hover img {
	transform: scale(1.06);
}

/* ---- Homepage Hero: staggered content reveal ---- */
.chemdry-hero-banner > .wp-block-group.alignwide > * {
	animation: chemdry-fade-in-up 0.6s ease both;
}

.chemdry-hero-banner > .wp-block-group.alignwide > :nth-child(1) { animation-delay: 0.1s; }
.chemdry-hero-banner > .wp-block-group.alignwide > :nth-child(2) { animation-delay: 0.2s; }
.chemdry-hero-banner > .wp-block-group.alignwide > :nth-child(3) { animation-delay: 0.3s; }
.chemdry-hero-banner > .wp-block-group.alignwide > :nth-child(4) { animation-delay: 0.4s; }
.chemdry-hero-banner > .wp-block-group.alignwide > :nth-child(5) { animation-delay: 0.5s; }
.chemdry-hero-banner > .wp-block-group.alignwide > :nth-child(6) { animation-delay: 0.6s; }

/* ---- Sub-page Hero: title fade-in ---- */
.chemdry-page-hero .chemdry-page-hero-title {
	animation: chemdry-fade-in-up 0.7s ease 0.15s both;
}

/* ============================================
   Testimonial Carousel
   ============================================ */
.chemdry-carousel-slide {
	display: none;
	min-height: 220px;
}
.chemdry-carousel-slide.is-active {
	display: block;
}

.chemdry-carousel-dot {
	cursor: pointer;
	font-size: 0.75rem;
	opacity: 0.35;
	transition: opacity 0.3s ease;
	user-select: none;
}
.chemdry-carousel-dot.is-active {
	opacity: 1;
}
.chemdry-carousel-dot:hover {
	opacity: 0.7;
}

/* ============================================
   Service Link Hover
   ============================================ */
.chemdry-service-link {
	border-radius: 4px;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.chemdry-service-link:hover {
	background-color: rgba(0, 0, 0, 0.03);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ============================================
   Extra Motion Pass (CSS-only, editor-safe)
   ============================================ */
.wp-block-button__link,
.wp-block-navigation .wp-block-navigation-item__content,
.wp-block-search__button,
.wp-block-search__input,
a,
img {
	transition-timing-function: ease;
}

.wp-block-button__link:focus-visible,
.wp-block-search__button:focus-visible,
.wp-block-search__input:focus-visible,
.wp-block-navigation .wp-block-navigation-item__content:focus-visible,
a:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.wp-block-search__button {
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.wp-block-search__button:hover {
	transform: translateY(-3px) scale(1.02);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.wp-block-search__button:active {
	transform: scale(0.98);
}

.wp-block-search__input {
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-search__input:hover,
.wp-block-search__input:focus {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(63, 165, 53, 0.08);
}

.wp-block-navigation a,
.wp-block-paragraph a,
.wp-block-heading a,
.wp-block-list a,
.wp-block-post-content a {
	text-underline-offset: 0.16em;
	text-decoration-thickness: 1px;
	transition: color 0.2s ease, opacity 0.2s ease, text-decoration-color 0.2s ease;
}

.wp-block-navigation a:hover,
.wp-block-paragraph a:hover,
.wp-block-heading a:hover,
.wp-block-list a:hover,
.wp-block-post-content a:hover,
footer a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration-color: currentColor;
	opacity: 0.9;
}

.chemdry-carousel .chemdry-carousel-slide,
.wp-block-group.has-primary-background-color,
.wp-block-group.has-blue-background-color {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chemdry-carousel .chemdry-carousel-slide:hover {
	transform: translateY(-6px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.chemdry-carousel .chemdry-carousel-slide.is-active {
	animation: chemdry-fade-in-up 0.45s ease both;
}

.chemdry-page-hero .wp-block-post-title,
.chemdry-hero-banner .wp-block-heading,
.chemdry-hero-banner .wp-block-paragraph {
	transition: text-shadow 0.25s ease, opacity 0.25s ease;
}

.chemdry-page-hero:hover .wp-block-post-title {
	text-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Homepage hero title/subtitle should stay stable on hover. */
.chemdry-hero-banner .wp-block-heading,
.chemdry-hero-banner:hover .wp-block-heading {
	text-shadow: none !important;
}

footer .wp-block-column a,
.wp-block-navigation a,
.wp-block-paragraph a,
.wp-block-heading a,
.wp-block-list a,
.wp-block-post-content a {
	transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, text-decoration-color 0.2s ease;
}

/* Match william-limited: clickable text only changes color on hover. */
a:where(:not(.wp-block-button__link)):hover,
footer .wp-block-column a:hover,
.wp-block-navigation a:hover,
.wp-block-paragraph a:hover,
.wp-block-heading a:hover,
.wp-block-list a:hover,
.wp-block-post-content a:hover {
	color: var(--wp--preset--color--primary) !important;
	text-decoration-thickness: 2px;
	transform: none;
}

.wp-block-image a {
	display: block;
}

.wp-block-image a img {
	transition: transform 0.35s ease, filter 0.35s ease;
}

.wp-block-image a:hover img {
	transform: scale(1.05);
	filter: saturate(1.08) contrast(1.02);
}

.chemdry-outline-cta {
	color: #fff !important;
	transition: opacity 0.2s ease, transform 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}

.chemdry-outline-cta:hover {
	background-color: rgba(255, 255, 255, 0.16);
	opacity: 0.96;
	transform: translateY(-1px);
	color: #fff !important;
}

.chemdry-outline-cta:hover,
.chemdry-outline-cta:hover a,
.chemdry-outline-cta:hover span,
.chemdry-outline-cta:hover strong {
	color: #fff !important;
}

.chemdry-outline-cta,
.chemdry-outline-cta a,
.chemdry-outline-cta:visited,
.chemdry-outline-cta a:visited,
.chemdry-outline-cta:hover,
.chemdry-outline-cta:hover a,
.chemdry-outline-cta:focus,
.chemdry-outline-cta a:focus,
.chemdry-outline-cta:active,
.chemdry-outline-cta a:active {
	color: var(--wp--preset--color--base) !important;
}

.has-primary-background-color a,
.has-primary-background-color a:hover,
.has-primary-background-color a:focus,
.has-primary-background-color a:active,
.has-primary-background-color a:visited {
	color: var(--wp--preset--color--base) !important;
	text-decoration: none !important;
}

.has-primary-background-color .wp-block-button__link,
.has-primary-background-color .wp-block-button__link:hover,
.has-primary-background-color .wp-block-button__link:focus,
.has-primary-background-color .wp-block-button__link:active,
.has-primary-background-color .wp-block-button__link:visited,
.wp-block-button__link.has-primary-background-color,
.wp-block-button__link.has-primary-background-color:hover,
.wp-block-button__link.has-primary-background-color:focus,
.wp-block-button__link.has-primary-background-color:active,
.wp-block-button__link.has-primary-background-color:visited {
	color: #fff !important;
	text-decoration: none !important;
}

/* Authority allergen pill: keep white text and brighten background on hover. */
.has-primary-background-color.has-base-color.has-text-color.has-background:has(a[href="/carpet-rug-upholstery-health-study/"]) {
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.has-primary-background-color.has-base-color.has-text-color.has-background:has(a[href="/carpet-rug-upholstery-health-study/"]):hover {
	background-color: rgba(63, 165, 53, 0.84) !important;
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.has-primary-background-color.has-base-color.has-text-color.has-background:has(a[href="/carpet-rug-upholstery-health-study/"]) a,
.has-primary-background-color.has-base-color.has-text-color.has-background:has(a[href="/carpet-rug-upholstery-health-study/"]) a:hover,
.has-primary-background-color.has-base-color.has-text-color.has-background:has(a[href="/carpet-rug-upholstery-health-study/"]) a:focus,
.has-primary-background-color.has-base-color.has-text-color.has-background:has(a[href="/carpet-rug-upholstery-health-study/"]) a:active,
.has-primary-background-color.has-base-color.has-text-color.has-background:has(a[href="/carpet-rug-upholstery-health-study/"]) a:visited {
	color: #fff !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

.chemdry-outline-cta a,
.chemdry-outline-cta:hover a,
.chemdry-outline-cta a:hover,
.chemdry-outline-cta a:focus,
.chemdry-outline-cta a:active {
	display: block;
	color: #fff !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

.chemdry-service-link:hover {
	background-color: transparent;
	box-shadow: none;
	transform: none;
	color: var(--wp--preset--color--primary) !important;
}

.chemdry-carousel-dot {
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.chemdry-carousel-dot.is-active {
	transform: scale(1.35);
}

.chemdry-carousel-dot:hover {
	opacity: 0.9;
	transform: scale(1.2);
}

.chemdry-payment-badge {
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.chemdry-payment-badge:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
	opacity: 0.95;
}

.chemdry-footer-links,
.chemdry-footer-links li {
	list-style: none;
	margin-left: 0;
	padding-left: 0;
}

.chemdry-footer-links a {
	text-decoration: none;
}

.chemdry-footer-links a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}
