/*
Theme Name:  Keystone VaaSBlock WIP
Description: VaaSBlock child theme for Keystone WP Parent Theme — WORK IN PROGRESS, not for production activation.
             Adds VaaSBlock-specific template routing, PHP logic, and brand overrides.
             Set BRAND_KEY=vaasblock in wp-config.php when using this theme.
Template:    keystone-theme
Version:     1.0.1-WIP
Text Domain: keystone-vaasblock
*/

/* Shared layout primitives for migrated legacy page sections. */
.vaasblock-container {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--50);
}

/* ── Global button system (used on profile pages, pricing table, sidebar CTAs) ── */
.vaasblock-button {
	display: inline-block;
	text-decoration: none;
	transition: all 0.2s ease, visibility 0s;
	border: 2px solid transparent;
	border-radius: 200px;
	background: #0978fe;
	color: #fff;
	padding: 15px 40px;
}
.vaasblock-button--tp {
	border: 2px solid #fff;
	background: transparent;
}
.vaasblock-button--tp-darkblue {
	border: 2px solid #1a1a72;
	background: transparent;
	color: #1a1a72;
}
.vaasblock-button--tp-white {
	border: 2px solid #fff;
	background: transparent;
	color: #fff;
}
.vaasblock-button--tp-blue {
	border: 2px solid #0978fe;
	background: transparent;
	color: #0978fe;
}
.vaasblock-button--tp-lucent {
	border: 2px solid #ffffff80;
	background: #ffffff26;
	color: #fff;
}
.vaasblock-button--darkblue {
	background: #1a1a72;
}
.vaasblock-button:hover {
	color: #fff;
	background: #1a1a72;
	border-color: #fff;
}
.vaasblock-button--tp:hover {
	background: #0978fe;
	border-color: transparent;
}
.vaasblock-button--tp-white:hover {
	color: #0978fe;
	background: #fff;
}

/* ── Layout utilities ── */
.ender-flex {
	display: flex;
	justify-content: flex-end;
}

/* ── Jiggle animations (used on profile page CTAs) ── */
.jiggle {
	animation: jiggle 0.5s infinite;
}
.jiggle-big {
	animation: jiggle-big 0.5s infinite;
}
@keyframes jiggle {
	0%, 100% { transform: rotate(0deg); }
	25%       { transform: rotate(0.5deg); }
	50%       { transform: rotate(0deg); }
	75%       { transform: rotate(-0.5deg); }
}
@keyframes jiggle-big {
	0%, 100% { transform: rotate(0deg); }
	25%       { transform: rotate(1deg); }
	50%       { transform: rotate(0deg); }
	75%       { transform: rotate(-1deg); }
}

/* ── Responsive show/hide utilities ── */
.hide-desktop {
	display: none !important;
}
@media (max-width: 1024px) {
	.hide-tablet {
		display: none !important;
	}
}
@media (max-width: 600px) {
	.hide-mobile {
		display: none !important;
	}
	.hide-desktop {
		display: unset !important;
	}
	.hide-tablet {
		display: none !important;
	}
}

.wp-block-post-content.has-global-padding > .vaasblock-hero {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.wp-block-post-content.is-layout-constrained > .vaasblock-hero {
	max-width: none;
}

.section-padding,
.section-padding-small {
	margin: 0;
}

.section-padding {
	padding-block: var(--wp--preset--spacing--70);
}

.section-padding-small {
	padding-block: var(--wp--preset--spacing--60);
}

.image-text-flex,
.two-column-flex,
.three-column-flex {
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

.image-text-flex {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: center;
}

.two-column-flex {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column-flex {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.image-text-flex--text,
.image-text-flex--image {
	min-width: 0;
}

.image-text-flex--text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--wp--preset--spacing--30);
}

.image-text-flex--image {
	display: flex;
	align-items: center;
	justify-content: center;
}

.image-text-flex--image img {
	display: block;
	width: 100%;
	height: auto;
}

/* ── Profile pages (wp-custom-template-post-no-title) ── */
body.post-template-wp-custom-template-post-no-title .keystone-breadcrumb-bottom {
	display: none;
}

/* Hide WP post title, Keystone article meta, and author bio on profile pages */
body.post-template-wp-custom-template-post-no-title h1.wp-block-post-title,
body.post-template-wp-custom-template-post-no-title .keystone-post-meta,
body.post-template-wp-custom-template-post-no-title .keystone-author-bio {
	display: none;
}

/* RMA badges component pass 01. Keystone spacing and breakpoints win. */
.vaasblock-hero {
	position: relative;
	overflow: clip;
	background:
		radial-gradient(circle at top right, color-mix(in srgb, #5e87ff 32%, transparent) 0, transparent 42%),
		linear-gradient(135deg, #091226 0%, #14264a 48%, #213e74 100%);
	color: #fff;
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--50);
}

.vaasblock-hero .vaasblock-container,
#rma-hero .vaasblock-container,
#rma-testimonials .vaasblock-container {
	position: relative;
	z-index: 1;
}

.vaasblock-hero .vaasblock-container {
	min-height: clamp(520px, 56vw, 700px);
	display: flex;
	align-items: center;
}

.vaasblock-hero .image-text-flex {
	grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
	gap: var(--wp--preset--spacing--60);
	width: 100%;
	align-items: center;
}

.vaasblock-hero .image-text-flex--text {
	gap: var(--wp--preset--spacing--40);
}

.vaasblock-hero .image-text-flex--text > h2 {
	margin: 0;
	max-width: 62ch;
	font-size: clamp(2.1rem, 4vw, 3.9rem);
	line-height: 1.12;
	letter-spacing: -0.06em;
	font-weight: 600;
	text-transform: none;
}

.vaasblock-hero .image-text-flex--text > p {
	max-width: 62ch;
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.82);
}

.vaasblock-hero .vaasblock-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	gap: 8px;
	min-height: auto;
	padding: 10px 22px;
	border: 1px solid rgba(9, 120, 254, 0.16);
	border-radius: 8px;
	background: #0978fe;
	color: #ffffff;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none;
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.vaasblock-hero .vaasblock-button:hover {
	background: #0762d4;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(9, 120, 254, 0.4);
}

.vaasblock-hero .image-text-flex--image {
	position: relative;
	align-self: center;
	width: 100%;
	max-width: 560px;
	justify-self: end;
	border-radius: 28px;
	overflow: hidden;
	box-shadow: 0 28px 70px rgba(6, 11, 22, 0.35);
	aspect-ratio: 1 / 1;
}

.vaasblock-hero .image-text-flex--image > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

#meeting-button-mobile {
	display: none;
}

.vaasblock-hero .image-text-flex--image > a,
.vaasblock-hero .image-text-flex--image #meeting-button-mobile {
	display: none !important;
}

#rma-hero {
	background: linear-gradient(180deg, #f7f7f8 0%, #ffffff 100%);
	border-top: 1px solid var(--wp--preset--color--accent-6);
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}

#rma-hero .image-text-flex {
	grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
	align-items: start;
}

#rma-hero .image-text-flex--image {
	padding: clamp(1rem, 2vw, 1.5rem);
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 20px 45px rgba(17, 17, 17, 0.08);
}

#rma-hero .image-text-flex--image img {
	max-width: 340px;
	margin-inline: auto;
}

#rma-hero .image-text-flex--text {
	gap: var(--wp--preset--spacing--30);
}

#rma-hero h2 {
	margin: 0;
	max-width: 18ch;
	font-size: clamp(2rem, 3.2vw, 3.2rem);
	line-height: 1.02;
	letter-spacing: -0.05em;
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
}

#rma-hero p {
	max-width: 58ch;
	margin: 0;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 74%, white);
}

#rma-testimonials {
	background: #ffffff;
}

#rma-testimonials h3 {
	max-width: 13ch;
	margin: 0 0 var(--wp--preset--spacing--60);
	font-size: clamp(2rem, 3vw, 3.2rem);
	line-height: 1.02;
	letter-spacing: -0.05em;
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
}

#rma-testimonial-cards {
	align-items: stretch;
}

.carded-testimonial {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 100%;
	padding: clamp(1.5rem, 2.4vw, 2rem);
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 28px;
	background:
		linear-gradient(180deg, rgba(247, 247, 248, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
	box-shadow: 0 18px 34px rgba(17, 17, 17, 0.06);
	gap: var(--wp--preset--spacing--50);
}

.carded-testimonial p {
	margin: 0;
}

.carded-testimonial > p {
	font-size: clamp(1.08rem, 1.4vw, 1.28rem);
	line-height: 1.65;
	color: var(--wp--preset--color--contrast);
}

.carded-testimonial > p q {
	quotes: none;
}

.carded-testimonial > p b,
.carded-testimonial > p i {
	font-weight: 500;
	font-style: normal;
}

.carded-testimonial .author-section {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	padding-right: 88px;
}

.carded-testimonial .author {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.carded-testimonial .author a {
	color: inherit;
	text-decoration: none;
}

.carded-testimonial .author-section p {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 84%, white);
}

.carded-testimonial .testimonial-category {
	flex-shrink: 0;
}

.carded-testimonial .testimonial-category span {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 0.9rem;
	border-radius: 999px;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.carded-testimonial .author-affiliation {
	position: absolute;
	right: clamp(1.35rem, 2vw, 1.75rem);
	bottom: clamp(1.35rem, 2vw, 1.75rem);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	padding: 0.4rem;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 12px 24px rgba(17, 17, 17, 0.08);
}

.carded-testimonial .author-affiliation img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

@media (max-width: 980px) {
	.image-text-flex,
	.two-column-flex,
	.three-column-flex,
	.vaasblock-hero .image-text-flex,
	#rma-hero .image-text-flex {
		grid-template-columns: 1fr;
	}

	.vaasblock-hero .image-text-flex--text > h2,
	#rma-hero h2,
	#rma-testimonials h3 {
		max-width: none;
	}

	.vaasblock-hero .vaasblock-container {
		min-height: 0;
	}

	.vaasblock-hero .image-text-flex--image {
		width: 100%;
		max-width: none;
		justify-self: center;
	}

	#rma-hero .image-text-flex--image {
		width: 100%;
	}

	.vaasblock-hero .image-text-flex {
		grid-template-areas:
			"heading"
			"copy"
			"media"
			"cta";
	}

	.vaasblock-hero .image-text-flex--text {
		display: contents;
	}

	.vaasblock-hero .image-text-flex--text > h2 {
		grid-area: heading;
	}

	.vaasblock-hero .image-text-flex--text > p {
		grid-area: copy;
	}

	.vaasblock-hero .image-text-flex--image {
		grid-area: media;
	}

	.vaasblock-hero .image-text-flex--text > .vaasblock-button,
	.vaasblock-hero .image-text-flex--text .vaasblock-button {
		grid-area: cta;
		display: flex !important;
		width: 100% !important;
		justify-content: center;
		margin: 0 !important;
		float: none;
	}

	.carded-testimonial .author-section {
		flex-direction: column;
		align-items: flex-start;
		padding-right: 0;
	}

	.carded-testimonial .author-affiliation {
		position: static;
		width: 56px;
		height: 56px;
		margin-top: var(--wp--preset--spacing--20);
	}
}

@media (max-width: 640px) {
	.vaasblock-container {
		padding-inline: var(--wp--preset--spacing--30);
	}

	.section-padding {
		padding-block: var(--wp--preset--spacing--60);
	}

	.section-padding-small {
		padding-block: var(--wp--preset--spacing--50);
	}

	#home-hero .vaasblock-container,
	.vaasblock-hero .vaasblock-container,
	#rma-hero .vaasblock-container,
	#rma-testimonials .vaasblock-container {
		padding-inline: var(--wp--preset--spacing--30);
	}

	.vaasblock-hero {
		background:
			radial-gradient(circle at top right, color-mix(in srgb, #5e87ff 28%, transparent) 0, transparent 46%),
			linear-gradient(180deg, #091226 0%, #182d53 100%);
		padding-top: var(--wp--preset--spacing--50);
		padding-bottom: var(--wp--preset--spacing--40);
	}

	.vaasblock-hero .image-text-flex--text {
		gap: var(--wp--preset--spacing--30);
		width: 100%;
	}

	.vaasblock-hero .image-text-flex--text > h2 {
		max-width: none;
	}

	.vaasblock-hero .image-text-flex--text > p {
		max-width: none;
		font-size: 0.98rem;
		line-height: 1.55;
	}

	.vaasblock-hero .vaasblock-button {
		width: 100% !important;
		align-self: auto;
		display: flex !important;
		justify-content: center;
		margin: 0 !important;
	}

	.vaasblock-hero .image-text-flex--image {
		width: 100%;
		max-width: none;
		justify-self: stretch;
	}

	#rma-hero .image-text-flex--image img {
		max-width: none;
	}
}
