/* ==========================================================================
   SpaceFlow Custom Styles
   Supplements theme.json with styles it cannot express
   ========================================================================== */

/* --- Smooth scrolling --- */
html {
	scroll-behavior: smooth;
}

/* --- Focus visible styles for accessibility --- */
*:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 2px;
}

/* --- Button transitions --- */
.wp-block-button__link,
.wp-element-button {
	transition: var(--wp--custom--transition--default);
}

/* --- Outline button hover --- */
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* --- White outline button (for dark backgrounds) --- */
.wp-block-button.is-style-outline-white .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--white);
	color: var(--wp--preset--color--white);
	background: transparent;
	transition: var(--wp--custom--transition--default);
}

.wp-block-button.is-style-outline-white .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary);
}

/* --- Card styling utility class --- */
.spaceflow-card {
	background: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--border-radius--medium);
	box-shadow: var(--wp--custom--box-shadow--small);
	transition: var(--wp--custom--transition--default);
	overflow: hidden;
}

.spaceflow-card:hover {
	box-shadow: var(--wp--custom--box-shadow--medium);
	transform: translateY(-2px);
}

/* --- Pricing card featured tier --- */
.spaceflow-pricing-featured {
	border-top: 4px solid var(--wp--preset--color--primary);
	box-shadow: var(--wp--custom--box-shadow--large);
	position: relative;
	z-index: 1;
}

/* --- Pricing badge --- */
.spaceflow-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--border-radius--pill);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* --- Hero badge --- */
.spaceflow-hero-badge {
	display: inline-block;
	padding: 0.375rem 1rem;
	background: rgba(255, 255, 255, 0.15);
	color: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--border-radius--pill);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	backdrop-filter: blur(4px);
}

/* --- Grayscale logos (for logo cloud) --- */
.spaceflow-logo-cloud img {
	filter: grayscale(100%);
	opacity: 0.5;
	transition: var(--wp--custom--transition--default);
}

.spaceflow-logo-cloud img:hover {
	filter: grayscale(0%);
	opacity: 1;
}

/* --- Timeline left-border styling --- */
.spaceflow-timeline {
	border-left: 3px solid var(--wp--preset--color--base-muted);
	padding-left: var(--wp--preset--spacing--50);
}

.spaceflow-timeline > .wp-block-group {
	position: relative;
	padding-bottom: var(--wp--preset--spacing--50);
}

.spaceflow-timeline > .wp-block-group::before {
	content: '';
	position: absolute;
	left: calc(-1 * var(--wp--preset--spacing--50) - 7px);
	top: 0.5rem;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	border: 3px solid var(--wp--preset--color--base);
}

/* --- Stats number styling --- */
.spaceflow-stat-number {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	line-height: 1;
}

/* --- Testimonial stars --- */
.spaceflow-stars {
	color: var(--wp--preset--color--secondary);
	letter-spacing: 0.15em;
}

/* --- Feature icon circle --- */
.spaceflow-icon-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--wp--preset--color--base-alt);
	font-size: 1.5rem;
	margin-bottom: var(--wp--preset--spacing--30);
}

/* --- Scroll margin for anchor links --- */
[id] {
	scroll-margin-top: 80px;
}

/* --- Selection color --- */
::selection {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* --- Sticky header scroll state --- */
.wp-block-template-part.is-scrolled {
	background: rgba(251, 248, 244, 0.95);
	backdrop-filter: blur(8px);
	box-shadow: var(--wp--custom--box-shadow--small);
}

/* --- Navigation link hover --- */
.wp-block-navigation a:hover {
	color: var(--wp--preset--color--primary);
}

/* --- Details/accordion styling --- */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--base-muted);
	padding: var(--wp--preset--spacing--40) 0;
}

.wp-block-details summary {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: '+';
	font-size: 1.5rem;
	font-weight: 300;
	color: var(--wp--preset--color--neutral);
	transition: var(--wp--custom--transition--default);
}

.wp-block-details[open] summary::after {
	content: '\2212';
}

/* --- Responsive adjustments --- */
@media (max-width: 782px) {
	.spaceflow-pricing-featured {
		order: -1;
	}
}
