/*
 * Elev8 CMS, front-end styles.
 *
 * Builds on the Elev8 AI theme's base stylesheet, which is on every page:
 * colour and font presets (--wp--preset--*), the --st-* tokens (border,
 * surface, radii, hover timing, section padding), .st-container, .st-card,
 * .st-glass, .st-kicker, .st-btn and .st-link. Only what resources need is
 * defined here. Loaded on pages where a resources block renders, and on the
 * Resource / hub templates (inc/blocks.php).
 */

/* ==========================================================================
   Page shell — every resources template starts under the fixed header
   ========================================================================== */
.elev8cms-page { padding-top: 150px; }

@media (max-width: 781px) {
	.elev8cms-page { padding-top: 104px; }
}

/* ==========================================================================
   Case studies: the hub reuses the hub head; a single one adds the logo
   line and the testimonial section. Cards and grid are the theme's.
   ========================================================================== */
/*
 * A case study's cover (the same figure as a resource's featured image)
 * wears the client's logo centred over it, as the case study card does
 * (theme blocks/case-studies/style.css: 220x64 over the card's dark wash).
 */
.elev8cms-header__figure--case { position: relative; }

.elev8cms-header__figure--case::after {
	background: linear-gradient(to top, rgba(7, 4, 22, 0.404), rgba(7, 4, 22, 0.629) 86.5%);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.elev8cms-header__logo {
	height: 64px;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 220px;
	z-index: 1;
}

/* The testimonial section wears the home page Case studies backdrop (inline
   image from render.php) and the card runs the container's width. */
.elev8cms-case-testimonial {
	background-color: #0a071a;
	background-position: center;
	background-size: cover;
	isolation: isolate;
	margin-top: var(--st-section-pad, 80px);
	padding-block: var(--st-section-pad, 80px);
	position: relative;
}

.elev8cms-case-testimonial > .st-container { position: relative; z-index: 2; }

/* The home page section head (kicker 8px above a 36px title, 44px to the card), under the plugin's own classes. */
.elev8cms-section-head { margin-bottom: 44px; text-align: center; }
.elev8cms-section-head .st-kicker { margin-inline: auto; } /* the kicker is fit-content wide (base.css), so it centres by margin */

.elev8cms-section-head__title {
	font-family: var(--wp--preset--font-family--title);
	font-size: clamp(28px, 2.6vw, 36px);
	font-variation-settings: "opsz" 14, "wdth" 100;
	font-weight: 700;
	letter-spacing: -0.6px;
	line-height: 1.25;
	margin: 8px 0 0;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.elev8cms-crumbs ol {
	align-items: center;
	color: var(--wp--preset--color--muted);
	display: flex;
	flex-wrap: wrap;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	font-weight: 600;
	gap: 6px 4px;
	letter-spacing: 0.5px;
	line-height: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
	text-transform: uppercase;
}

.elev8cms-crumbs li { align-items: center; display: inline-flex; gap: 4px; }

.elev8cms-crumbs a {
	align-items: center;
	color: inherit;
	display: inline-flex;
	gap: 4px;
	text-decoration: none;
	transition: color var(--st-hover-dur) var(--st-hover-ease);
}

.elev8cms-crumbs a:hover,
.elev8cms-crumbs a:focus-visible { color: var(--wp--preset--color--accent); }

.elev8cms-crumbs .st-icon { height: 14px; opacity: 0.7; width: 14px; }
.elev8cms-crumbs a .st-icon { opacity: 1; }
.elev8cms-crumbs [aria-current] { color: var(--wp--preset--color--text); }

/* ==========================================================================
   Resource header
   ========================================================================== */
.elev8cms-header__inner {
	max-width: 900px;
	padding-bottom: 40px;
}

/* Breadcrumbs left, topic pills (.st-pill, theme base.css) right; wraps on phones. */
.elev8cms-header__top {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	justify-content: space-between;
	margin-bottom: 24px;
}

.elev8cms-header__title,
.elev8cms-hub__title {
	font-family: var(--wp--preset--font-family--title);
	font-size: clamp(34px, 4.2vw, 56px);
	font-variation-settings: "opsz" 14, "wdth" 100;
	font-weight: 700;
	letter-spacing: -1px;
	line-height: 1.1;
	margin: 14px 0 0;
}

.elev8cms-header__lede,
.elev8cms-hub__intro {
	color: #d3d2e1;
	font-size: 20px;
	line-height: 1.5;
	margin: 20px 0 0;
}

/* A page's standfirst keeps a reading measure; the hubs' intros run the container's width. */
.elev8cms-header__lede { max-width: 760px; }

.elev8cms-hub__intro > :first-child { margin-top: 0; }
.elev8cms-hub__intro > :last-child { margin-bottom: 0; }

.elev8cms-header__meta {
	align-items: center;
	border-top: 1px solid var(--st-border);
	display: flex;
	flex-wrap: wrap;
	gap: 16px 32px;
	justify-content: space-between;
	margin-top: 32px;
	padding-top: 24px;
}

.elev8cms-header__author { align-items: center; display: flex; gap: 12px; }

.elev8cms-header__author img {
	border-radius: 50%;
	height: 44px;
	object-fit: cover;
	width: 44px;
}

.elev8cms-header__author span { display: flex; flex-direction: column; }

.elev8cms-header__author strong {
	font-family: var(--wp--preset--font-family--title);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.1px;
	line-height: 22px;
}

.elev8cms-header__author small {
	color: var(--wp--preset--color--muted);
	font-size: 13px;
	line-height: 18px;
}

.elev8cms-header__facts {
	color: var(--wp--preset--color--muted);
	display: flex;
	flex-wrap: wrap;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	font-weight: 600;
	gap: 20px;
	letter-spacing: 0.5px;
	line-height: 16px;
	text-transform: uppercase;
}

.elev8cms-header__facts > * { align-items: center; display: inline-flex; gap: 6px; }
.elev8cms-header__facts .st-icon { height: 14px; width: 14px; }

.elev8cms-header__figure {
	border: 1px solid var(--st-border);
	border-radius: var(--st-radius-lg);
	margin: 40px 0 0;
	overflow: hidden;
}

/* The cover only (.elev8cms-header__image): a case study's logo sits in the same figure and must not take this. */
.elev8cms-header__image {
	aspect-ratio: 16 / 9;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

/* ==========================================================================
   Article — the page's own blocks. Reading typography is the theme's
   .st-prose (base.css), which templates/resource.html puts on this group.
   ========================================================================== */
.elev8cms-article { padding-bottom: 40px; }

/* ==========================================================================
   Hub head
   ========================================================================== */
.elev8cms-hub { padding-bottom: 32px; }

.elev8cms-hub .elev8cms-crumbs { margin-bottom: 32px; }

/* ==========================================================================
   Topics
   ========================================================================== */
.elev8cms-topics { padding-block: 8px 0; } /* the listing below carries the full section padding */

.elev8cms-topics ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	padding: 0;
}

.elev8cms-topics .st-btn { min-height: 36px; padding-inline: 16px; }

.elev8cms-topics .st-btn--ghost { border-color: var(--st-border); }

.elev8cms-topics__count {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	font-weight: 600;
}

.elev8cms-topics .st-btn--primary .elev8cms-topics__count { color: inherit; opacity: 0.7; }

/* ==========================================================================
   Author box
   ========================================================================== */
.elev8cms-author { padding-block: 8px 40px; }

.elev8cms-author__card {
	border-radius: 20px;
	display: flex;
	gap: 24px;
	margin-inline: auto;
	max-width: 760px;
	padding: 28px;
}

.elev8cms-author__avatar {
	border-radius: 50%;
	flex: none;
	height: 88px;
	object-fit: cover;
	width: 88px;
}

.elev8cms-author__body { min-width: 0; }

.elev8cms-author__name {
	font-family: var(--wp--preset--font-family--title);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.3px;
	line-height: 26px;
	margin: 8px 0 0;
}

.elev8cms-author__role {
	color: var(--wp--preset--color--muted);
	display: block;
	font-family: var(--wp--preset--font-family--body, inherit);
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 22px;
}

.elev8cms-author__bio {
	color: #d3d2e1;
	font-size: 16px;
	line-height: 25.6px;
	margin: 12px 0 0;
}

@media (max-width: 600px) {
	.elev8cms-author__card { flex-direction: column; gap: 16px; padding: 24px; }
}

/* ==========================================================================
   Reduced motion — last, at equal specificity
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.elev8cms-crumbs a { transition: none; }
}
