/*
 * Corvane base styles.
 *
 * Only what theme.json cannot express. Every colour is a palette preset, so
 * a design (style variation) or the Corvane panel recolours all of it.
 * Flat by rule: hairlines and solid fills, no glows, no gradient blobs.
 */

:root {
	--cv-radius: 20px;
	--cv-radius-sm: 12px;
	--cv-ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

html {
	scroll-padding-top: 6rem;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(.wp-site-blocks) > * {
	margin-block-start: 0;
}

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/* ── Header: sticky; turns compact with a hairline once the page scrolls. ── */

.wp-site-blocks > header:first-child,
.wp-site-blocks > .cv-header-wrap {
	position: sticky;
	top: 0;
	z-index: 50;
}

.admin-bar .wp-site-blocks > header:first-child {
	top: var(--wp-admin--admin-bar--height, 0);
}

.cv-header {
	border-bottom: 1px solid transparent;
	transition: padding 0.3s var(--cv-ease), border-color 0.3s var(--cv-ease), transform 0.35s var(--cv-ease);
}

body.cv-scrolled .cv-header {
	padding-top: 0.6rem !important;
	padding-bottom: 0.6rem !important;
	border-bottom-color: var(--wp--preset--color--line);
}

body.cv-header-hidden .cv-header {
	transform: translateY(-110%);
}

.cv-header .wp-block-site-logo img {
	display: block;
}

/* ── Small building blocks shared by every design ── */

.cv-eyebrow,
.cv-eyebrow a {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--muted);
}

.cv-card {
	height: 100%;
}

.cv-card .wp-block-post-featured-image img {
	transition: transform 0.6s var(--cv-ease);
}

.cv-card:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

.cv-card .wp-block-post-featured-image {
	overflow: hidden;
}

.cv-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent);
}

.cv-blog-title {
	margin-bottom: var(--wp--preset--spacing--40);
}

.wp-block-post-featured-image img {
	object-fit: cover;
}

.wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.35rem 0.1rem;
}

.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--accent);
}

.wp-block-search__input {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: 0.75rem 1.1rem;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
}

.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-block: 1.1rem;
}

.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

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

.wp-block-details summary::after {
	content: "+";
	font-weight: 400;
	transition: transform 0.3s var(--cv-ease);
}

.wp-block-details[open] summary::after {
	transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
