/* V2 Global Styles */

/* Basic Reset */
*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
}

input, button, textarea, select {
	font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
	overflow-wrap: break-word;
}

ul[role="list"],
ol[role="list"] {
	list-style-type: none;
	padding-inline-start: 0;
}

.sr-only {
	display: none;
}

.wp-element-button {
	transition: all .3s ease;
}

.wp-block-button.is-style-outline .wp-element-button:hover {
	background-color: var(--wp--custom--color--button--outline--bg-hover);
	color: var(--wp--custom--color--button--outline--text-hover);
	border-color: var(--wp--custom--color--button--outline--border-hover);
}

.is-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--xs);
	padding: 1rem 1.75rem;
	background-color: var(--wp--custom--color--button--solid--bg);
	color: var(--wp--custom--color--button--solid--text);
	border: 1px solid var(--wp--custom--color--button--solid--border);
	border-radius: 0.5rem;
	font-size: var(--wp--preset--font-size--text-button);
	font-weight: 700;
	line-height: 1.5;
	text-decoration: none;
	transition: all .3s ease;
}

.is-btn .btn-icon {
	width: 1.5rem;
	aspect-ratio: 1;
	transition: translate .3s ease;
}

.is-btn .btn-icon:first-child {
	margin-left: -.5rem;
}

.is-btn .btn-icon:last-child {
	margin-right: -.5rem;
}

.is-btn:hover {
	background-color: var(--wp--custom--color--button--solid--bg-hover);
	color: var(--wp--custom--color--button--solid--text-hover);
	border-color: var(--wp--custom--color--button--solid--border-hover);
}

.is-btn:hover .btn-icon:last-child {
	translate: .25rem 0;
}

.is-btn.is-btn-outline {
	background-color: var(--wp--custom--color--button--outline--bg);
	color: var(--wp--custom--color--button--outline--text);
	border-color: var(--wp--custom--color--button--outline--border);
}

.is-btn.is-btn-outline:hover {
	background-color: var(--wp--custom--color--button--outline--bg-hover);
	color: var(--wp--custom--color--button--outline--text-hover);
	border-color: var(--wp--custom--color--button--outline--border-hover);
}

.is-btn.is-btn-text {
	padding-inline: 0 var(--wp--preset--spacing--xxs);
	background-color: var(--wp--custom--color--button--text--bg);
	color: var(--wp--custom--color--button--text--text);
	border-color: var(--wp--custom--color--button--text--border);
}

.is-btn.is-btn-text:hover {
	background-color: var(--wp--custom--color--button--text--bg-hover);
	color: var(--wp--custom--color--button--text--text-hover);
	border-color: var(--wp--custom--color--button--text--border-hover);
}

/* Utility Classes */

.has-font-weight-regular { font-weight: 400; }
.has-font-weight-medium { font-weight: 500; }
.has-font-weight-semibold { font-weight: 600; }
.has-font-weight-bold { font-weight: 700; }
.has-line-height-compact { line-height: var(--wp--custom--line-height--compact); }
.has-line-height-normal { line-height: var(--wp--custom--line-height--normal); }
.has-line-height-relaxed { line-height: var(--wp--custom--line-height--relaxed); }
.has-max-width-sm { max-width: 12ch; text-wrap: balance; }
.has-max-width-md { max-width: 18ch; text-wrap: balance; }
.has-max-width-lg { max-width: 30ch; text-wrap: balance; }

/* Block Styles */
.kh-block {
	display: flex;
	justify-content: center;
}

.kh-block .kh-block-inner {
	display: inherit;
	justify-content: inherit;
	width: 100%;
	max-width: 120rem;
	border-radius: var(--wp--custom--radius--3-xl);
	overflow: clip;
	padding: var(--wp--preset--spacing--4-xl) var(--wp--preset--spacing--block-inner);
}

.kh-block.is-style-has-bg {
	margin-block: var(--wp--preset--spacing--2-xl);
}

.kh-block.is-style-has-bg .kh-block-inner {
	position: relative;
	overflow: clip;
	background-color: var(--wp--custom--color--bg--02);
}

.kh-block.is-style-has-bg .kh-block-inner::before,
.kh-block.is-style-has-bg .kh-block-inner::after {
	content: "";
	display: block;
	position: absolute;
	width: 70%;
	aspect-ratio: 1;
	border-radius: var(--wp--custom--radius--full);
	background-color: #e2f0f2;
	filter: blur(37.5rem);
}

.kh-block.is-style-has-bg .kh-block-inner::before {
	top: 0;
	left: 0;
	translate: -50% -50%;
}

.kh-block.is-style-has-bg .kh-block-inner::after {
	bottom: 0;
	right: 0;
	translate: 50% 50%;
}

.kh-block.is-style-has-bg:first-child {
	margin-top: 0;
}

.kh-block .kh-block-layout {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--lg);
	width: 100%;
	max-width: var(--wp--style--global--wide-size);
}

@media (min-width: 50rem) {
	.kh-block {
		padding-inline: var(--wp--preset--spacing--xxs);
	}

	.kh-block .kh-block-inner {
		border-radius: var(--wp--custom--radius--4-xl);
	}

  .kh-block .kh-block-layout {
    gap: var(--wp--preset--spacing--3-xl) var(--wp--preset--spacing--lg);
  }
}

/* Give kh-blocks breathing room so the block inserter is reachable between them */
.is-root-container > .block-editor-block-list__block {
	margin-block: var(--wp--preset--spacing--2-xl);
	padding-block: var(--wp--preset--spacing--xs);
	border-block: 1px dashed var(--wp--preset--color--purple-600);
}

.is-root-container > .block-editor-block-list__block .kh-block-inner {
	margin: 0;
}

.kh-block-header {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--sm);
}

.kh-block-header * {
	margin: 0;
}

.kh-block-header-content .kh-block-header-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--sm);
	padding-block-start: var(--wp--preset--spacing--sm);
	margin-block-start: auto;
}

.kh-block-header-content .kh-block-header-actions:first-child {
	padding-block-start: 0;
}

@media (min-width: 65rem) {
	.kh-block-header {
		flex-direction: row;
		justify-content: space-between;
		gap: var(--wp--preset--spacing--lg);
	}

	.kh-block-header .kh-block-header-content {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: var(--wp--preset--spacing--sm);
		width: calc(50% - (var(--wp--preset--spacing--lg) / 2));
	}

	.kh-block-header-content .kh-block-header-actions {
		gap: var(--wp--preset--spacing--xl);
		margin-inline-start: auto;
	}
}

/* Animations */
@keyframes card-arrow-fade-in {
	0%   { box-shadow: 0 0 0 0 transparent; }
	100% { box-shadow: 0 0 0 0.375rem color-mix(in srgb, var(--wp--custom--color--bg--action) 15%, transparent); }
}

@keyframes card-arrow-pulse {
	0% {
		box-shadow: 0 0 0 0.375rem color-mix(in srgb, var(--wp--custom--color--bg--action) 15%, transparent);
	}
	100% {
		box-shadow: 0 0 0 0.5rem color-mix(in srgb, var(--wp--custom--color--bg--action) 25%, transparent);
	}
}

/* Category Tag Styles */
.category-tag {
	display: block;
	padding: var(--wp--preset--spacing--xxs) var(--wp--preset--spacing--xs);
	font-size: var(--wp--preset--font-size--text-sm);
	font-weight: 600;
	line-height: 1.25;
	color: var(--wp--custom--color--text--heading-primary);
	background-color: color-mix(in srgb, var(--wp--preset--color--base-white) 85%, transparent);
	backdrop-filter: blur(6px);
	border-radius: var(--wp--custom--radius--xs);
}

/* Arrow Link */
.arrow-link {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--xxs);
	font-size: 1rem;
	font-weight: 600;
	color: var(--wp--custom--color--text--action);
	text-decoration: none;
}

.arrow-link svg {
	transition: translate .3s ease;
}

/* Arrow link CTA */
.arrow-link-cta {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--sm);
	font-size: clamp(1rem, 0.9265rem + 0.3676vw, 1.25rem);
	font-weight: 600;
	color: var(--wp--custom--color--text--action);
	text-decoration: none;
	transition: color .3s ease;
}

.arrow-link-cta .arrow-link-cta-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.75rem;
	aspect-ratio: 1;
	background-color: var(--wp--preset--color--purple-600);
	border-radius: var(--wp--custom--radius--full);
	color: var(--wp--custom--color--icon--white);
}

.arrow-link-cta .arrow-link-cta-arrow svg {
	width: 1.5rem;
}

.arrow-link-cta.is-style-light {
	color: var(--wp--custom--color--text--white) !important;
}

.arrow-link-cta:hover,
.arrow-link-cta:focus-visible {
	color: var(--wp--custom--color--text--action-hover);
}

.arrow-link-cta:hover .arrow-link-cta-arrow,
.arrow-link-cta:focus-visible .arrow-link-cta-arrow {
	animation: card-arrow-fade-in .3s ease forwards, card-arrow-pulse 1s .3s ease-in-out infinite alternate;
}
