/*
Theme Name: ABRAHAM, JAMES
Theme URI: https://chemdry.com
Author: ABRAHAM, JAMES Local
Description: A lightweight, Gutenberg-first block theme for E. L. WILLIAMS PTY. LIMITED homepage. Each section is a reusable block pattern that the client can reorder or duplicate from the Site Editor.
Version: 1.1.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
*/

/*
 * Design system: DM Serif Display for headings, DM Sans for body.
 * Colors shifted from navy/gold to slate/terra-cotta for a more distinctive
 * editorial feel. See theme.json for all design tokens.
 */
body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Import DM Serif Display + DM Sans (only if not already loaded by functions.php). */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=DM+Serif+Display:ital@0;1&display=swap');

/* Button polish: sharp corners, clean outline style. */
.wp-block-button__link {
	border-radius: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 600;
	transition: opacity 0.2s ease, transform 0.15s ease;
}

.wp-block-button__link:hover {
	opacity: 0.88;
	transform: translateY(-1px);
}

.wp-block-button__link.has-accent-background-color {
	box-shadow: 0 2px 8px rgba(184, 92, 72, 0.25);
}

/* Navigation menu items: cleaner spacing. */
.wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.25rem 0.5rem;
}

/* Sticky site header. */
.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 nav items on a single row. */
.chemdry-site-header .wp-block-navigation {
	flex-wrap: nowrap !important;
}

.chemdry-site-header .wp-block-navigation-item {
	white-space: nowrap;
}

.chemdry-site-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.25rem 0.4rem;
}

/* Header search: icon only. */
.chemdry-site-header .wp-block-search__label {
	display: none;
}

/* Current nav item highlight. */
.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--accent) !important;
}

/* Force alignfull to span viewport. */
.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;
}

/* Global heading polish. */
h1, h2, h3, h4, h5, h6,
.wp-block-heading {
	letter-spacing: -0.01em;
}

h2, h3, h4,
.wp-block-heading:is(h2, h3, h4) {
	letter-spacing: -0.005em;
}

/* Body text. */
body, .wp-block-paragraph {
	letter-spacing: 0.01em;
}

/* Homepage hero: full-bleed image with text overlay. */
.chemdry-home-hero,
.editor-styles-wrapper .chemdry-home-hero {
	position: relative;
	overflow: hidden;
	min-height: 85vh;
}

.chemdry-home-hero::after,
.editor-styles-wrapper .chemdry-home-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(27, 31, 40, 0.5) 0%, rgba(27, 31, 40, 0.3) 50%, rgba(27, 31, 40, 0.6) 100%);
	pointer-events: none;
	z-index: 1;
}

.chemdry-home-hero .chemdry-home-hero-image,
.editor-styles-wrapper .chemdry-home-hero .chemdry-home-hero-image {
	margin-bottom: 0;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.chemdry-home-hero .chemdry-home-hero-image img,
.editor-styles-wrapper .chemdry-home-hero .chemdry-home-hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.chemdry-home-hero .chemdry-home-hero-text,
.editor-styles-wrapper .chemdry-home-hero .chemdry-home-hero-text {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	background: transparent !important;
	z-index: 2;
	box-sizing: border-box;
	text-shadow: 0 2px 16px rgba(27, 31, 40, 0.35);
}

@media (max-width: 781px) {
	.chemdry-home-hero {
		min-height: 60vh;
	}
}

/* Shared sub-page hero: image at 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(27, 31, 40, 0.08) 0%, rgba(27, 31, 40, 0.25) 55%, rgba(27, 31, 40, 0.50) 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 16px rgba(27, 31, 40, 0.45);
}

/* Utility bar: primary (slate) background. */
.chemdry-utility-bar {
	background-color: var(--wp--preset--color--primary) !important;
}

/* Spacer polish. */
.wp-block-spacer {
	clear: both;
}

/* Inline link hover. */
a:where(:not(.wp-block-button__link)):hover {
	color: var(--wp--preset--color--accent) !important;
	text-decoration-thickness: 2px;
}

/* Editorial service list: slim vertical rows with underline accents. */
.chemdry-service-row {
	border-bottom: 1px solid var(--wp--preset--color--muted-2);
	padding: var(--wp--preset--spacing--50) 0;
	transition: background-color 0.15s ease;
}

.chemdry-service-row:first-child {
	border-top: 1px solid var(--wp--preset--color--muted-2);
}

.chemdry-service-row:hover {
	background-color: var(--wp--preset--color--muted);
}

/* Staggered/alternating icon-features rows. */
.chemdry-feature-row {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--60);
}

.chemdry-feature-row:nth-child(even) {
	flex-direction: row-reverse;
}

@media (max-width: 781px) {
	.chemdry-feature-row,
	.chemdry-feature-row:nth-child(even) {
		flex-direction: column;
		gap: var(--wp--preset--spacing--40);
	}
}

/* Testimonials: marquee-like scrolling strip. */
@keyframes chemdry-marquee {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

.chemdry-testimonial-strip {
	overflow: hidden;
	white-space: nowrap;
}

.chemdry-testimonial-strip-inner {
	display: inline-flex;
	animation: chemdry-marquee 30s linear infinite;
	gap: var(--wp--preset--spacing--50);
	padding-right: var(--wp--preset--spacing--50);
}

.chemdry-testimonial-strip-inner:hover {
	animation-play-state: paused;
}

.chemdry-testimonial-card {
	display: inline-flex;
	flex-direction: column;
	white-space: normal;
	width: 340px;
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--base);
	border-left: 3px solid var(--wp--preset--color--accent);
}

@media (max-width: 781px) {
	.chemdry-testimonial-card {
		width: 280px;
	}
}

/* Authority: by-the-numbers mosaic layout. */
.chemdry-numbers-mosaic {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	grid-template-rows: auto auto;
	gap: var(--wp--preset--spacing--40);
}

.chemdry-numbers-mosaic .mosaic-lead {
	grid-column: 1 / 3;
	grid-row: 1 / 3;
}

@media (max-width: 781px) {
	.chemdry-numbers-mosaic {
		grid-template-columns: 1fr 1fr;
	}

	.chemdry-numbers-mosaic .mosaic-lead {
		grid-column: 1 / 3;
		grid-row: auto;
	}
}

/* CTA band: split-left design with overline, not centered button. */
.chemdry-cta-band {
	position: relative;
}

.chemdry-cta-band::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 120px;
	height: 4px;
	background-color: var(--wp--preset--color--accent);
}
