/*
Theme Name: Samaroo Core
Theme URI: https://samaroosolutions.com/
Author: Samaroo Solutions
Author URI: https://samaroosolutions.com/
Description: Parent block theme for Samaroo Solutions client sites. Client-neutral structure (templates, parts, patterns, design tokens); each client's visual identity lives in a child theme. Requires the Samaroo Site Core plugin for breadcrumbs, business details, forms and schema.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: samaroo-core
Tags: block-patterns, full-site-editing, wide-blocks, accessibility-ready, translation-ready
*/

/*
 * Keep this file small. Design values live in theme.json (and the child theme's theme.json).
 * Only use preset variables here (var(--wp--preset--...)) so Global Styles and child themes stay in control.
 */

/* Accessibility --------------------------------------------------------- */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Header ---------------------------------------------------------------- */
.sc-header.is-position-sticky {
	box-shadow: var(--wp--preset--shadow--soft);
}

.sc-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.sc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: var(--wp--preset--font-size--large);
}

/* Cards (block style "card" on Group, also used by blog cards) ---------- */
.is-style-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	box-shadow: var(--wp--preset--shadow--soft);
	overflow: hidden;
}

.sc-post-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	width: 100%;
}

.sc-post-card .wp-block-post-title a {
	text-decoration: none;
}

.sc-post-card .wp-block-post-title a:hover,
.sc-post-card .wp-block-post-title a:focus-visible {
	text-decoration: underline;
}

/* Lists with check marks (block style "checks") ------------------------- */
.is-style-checks {
	list-style: none;
	padding-left: 0;
}

.is-style-checks li {
	padding-left: 1.75em;
	position: relative;
}

.is-style-checks li::before {
	color: var(--wp--preset--color--primary);
	content: "\2713";
	font-weight: 700;
	left: 0;
	position: absolute;
}

/* Reveal on scroll (block style "reveal").
 * CSS-only and progressive: content is fully visible unless the browser supports scroll-driven
 * animations AND the visitor has not asked for reduced motion. No JavaScript can leave it hidden. */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.is-style-reveal {
			animation: sc-reveal linear both;
			animation-range: entry 0% cover 25%;
			animation-timeline: view();
		}
	}
}

@keyframes sc-reveal {
	from {
		opacity: 0;
		transform: translateY(1.5rem);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Tables never overflow the viewport on phones -------------------------- */
.wp-block-table {
	overflow-x: auto;
}

/* Media never overflows ------------------------------------------------- */
img,
video,
iframe {
	max-width: 100%;
}

/* Labels for meta that may be empty ------------------------------------- */
.sc-post-meta__updated::before {
	content: "Updated ";
}

.sc-legal-updated:not(:has(time)) {
	display: none;
}

/* Pattern helpers ------------------------------------------------------- */
.sc-eyebrow {
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sc-rounded img {
	border-radius: var(--wp--custom--radius--large);
}

.sc-card-link a {
	font-weight: 600;
	text-decoration: none;
}

.sc-card-link a::after {
	content: " \2192";
}

.sc-card-link a:hover,
.sc-card-link a:focus-visible {
	text-decoration: underline;
}

.sc-hero--offset .sc-hero-offset__card {
	margin-top: calc(var(--wp--preset--spacing--80) * -1);
	position: relative;
}

@media (max-width: 600px) {
	.sc-hero--offset .sc-hero-offset__card {
		margin-top: calc(var(--wp--preset--spacing--40) * -1);
	}
}

.sc-step-number {
	align-items: center;
	border-radius: var(--wp--custom--radius--pill);
	display: inline-flex;
	font-weight: 700;
	height: 2.5em;
	justify-content: center;
	width: 2.5em;
}

.sc-testimonial .wp-block-quote,
.sc-quote-large {
	border-left: 0;
	padding-left: 0;
}

.sc-quote-large {
	font-family: var(--wp--preset--font-family--heading);
	margin-inline: auto;
	max-width: 52rem;
	text-align: center;
}

.sc-quote-large cite,
.sc-testimonial cite,
.sc-testimonial__name {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	font-weight: 600;
}

.sc-trust-item {
	margin: 0;
}

/* Sections own their spacing: no root block gap between header, main and footer. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Compact header on phones: CTA stays on one line beside the menu button. */
@media (max-width: 600px) {
	.sc-header .wp-block-site-title {
		font-size: var(--wp--preset--font-size--medium);
	}

	.sc-header__cta .wp-block-button__link {
		font-size: var(--wp--preset--font-size--small);
		padding: 0.55rem 0.9rem;
		white-space: nowrap;
	}
}
