/*
Theme Name: Vista Aesthetics
Theme URI: https://vistahealthcare.org/aesthetics/
Author: The Dealio
Author URI: https://thedealio.org
Description: Block theme for Vista Aesthetics, the medical aesthetics wing of Vista Healthcare. Pairs with the Vista Treatments plugin.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.0
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vista-aesthetics
*/

/* ---------- Base ---------- */

.wp-site-blocks {
	position: relative;
}

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

a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

:where(.wp-block-separator) {
	border: none;
	border-top: 1px solid currentColor;
	opacity: 1;
}

/* ---------- Block styles ---------- */

.is-style-eyebrow {
	font-size: var(--wp--preset--font-size--xx-small);
	letter-spacing: var(--wp--custom--tracking--eyebrow);
	text-transform: uppercase;
	line-height: 1.5;
}

:where(.is-style-eyebrow:not(.has-text-color)) {
	color: var(--wp--preset--color--olive);
}

.is-style-with-subtitle em {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.65em;
	font-weight: 300;
	line-height: 1.2;
	color: var(--wp--preset--color--moss);
}

.wp-block-separator.is-style-short-rule {
	width: 80px;
	margin-inline: auto;
}

.wp-block-button.is-style-outline-light .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--cream);
	border: 1px solid rgba(244, 240, 232, 0.6);
}

.wp-block-button.is-style-outline-light .wp-block-button__link:hover,
.wp-block-button.is-style-outline-light .wp-block-button__link:focus-visible {
	background: rgba(244, 240, 232, 0.1);
	color: var(--wp--preset--color--cream);
}

.wp-block-button.is-style-citation .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	padding: 14px 20px;
	background: var(--wp--preset--color--cream);
	color: #4a4d3e;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

.wp-block-button.is-style-citation .wp-block-button__link strong {
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink);
}

.wp-block-button.is-style-citation .wp-block-button__link:hover {
	background: var(--wp--preset--color--paper);
	color: #4a4d3e;
}

/* ---------- Header ---------- */

.site-header-overlay {
	position: absolute;
	inset: 0 0 auto;
	z-index: 20;
}

.site-header .wp-block-navigation a:hover {
	text-decoration: underline;
}

.site-header .vista-header__home-link {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-small);
	letter-spacing: var(--wp--custom--tracking--label);
	text-transform: uppercase;
}

.site-header .vista-header__home-link a {
	color: inherit;
	text-decoration: none;
}

.site-header .vista-header__home-link a:hover {
	opacity: 1;
	text-decoration: underline;
}

.site-header .vista-header__logo img {
	display: block;
}

.site-header .wp-block-button__link {
	padding: 12px 20px;
	letter-spacing: 0.14em;
	font-size: var(--wp--preset--font-size--x-small);
}

@media (max-width: 781px) {
	.site-header .vista-header__home-link {
		display: none;
	}
}

@media (max-width: 600px) {
	.site-header.wp-block-group {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	.site-header > .wp-block-group {
		gap: 16px !important;
	}

	.site-header .wp-block-button__link {
		white-space: nowrap;
		padding: 10px 12px;
		letter-spacing: 0.1em;
	}

	.site-header .vista-header__logo img {
		width: 76px !important;
	}
}

/* ---------- Hero ---------- */

.vista-hero.wp-block-cover {
	align-items: stretch;
	padding: 0;
}

.vista-hero > .wp-block-cover__inner-container {
	display: flex;
	flex-direction: column;
	min-height: inherit;
}

.vista-hero__main {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding-top: 110px;
	padding-bottom: 40px;
}

.vista-hero__logo img {
	width: min(460px, 78vw);
	height: auto;
}

.vista-hero__bar {
	border-top: 1px solid rgba(244, 240, 232, 0.2);
}

/* The core 80% step leaves small text under 4.5:1 over light photos. */
.vista-hero > .wp-block-cover__background.has-background-dim-80 {
	opacity: 0.88;
}

@media (max-width: 781px) {
	.vista-hero.wp-block-cover {
		min-height: max(600px, 100svh) !important;
	}

	.vista-hero__bar {
		justify-content: center !important;
		text-align: center;
	}

	.vista-hero__bar > :first-child {
		display: none;
	}
}

/* Full-width sections sit flush; the block gap would show a cream strip between two tinted sections. */
.wp-block-post-content > .alignfull {
	margin-block-start: 0;
}

/* ---------- Memberships ---------- */

.vista-plans {
	align-items: stretch !important;
}

.vista-plan.wp-block-column {
	position: relative;
	display: flex;
	flex-direction: column;
}

.vista-plan > * {
	margin-block: 0;
}

.vista-plan > * + * {
	margin-block-start: 22px;
}

.vista-plan__badge {
	position: absolute;
	top: 0;
	left: 36px;
	transform: translateY(-50%);
	padding: 6px 14px;
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--xx-small);
	font-weight: 600;
	letter-spacing: var(--wp--custom--tracking--label);
	text-transform: uppercase;
	line-height: 1.4;
}

.vista-plan.is-featured > .vista-plan__badge + * {
	margin-block-start: 0;
}

.vista-plan__price {
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.04em;
}

.vista-plan__price strong {
	margin-right: 0.35em;
	font-family: var(--wp--preset--font-family--cormorant);
	font-size: clamp(2.75rem, 2.2rem + 1.6vw, 3.5rem);
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
}

.vista-plan__perks {
	flex: 1;
	padding: 0 !important;
	list-style: none;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.vista-plan__perks li {
	padding: 11px 0;
	border-top: 1px solid var(--wp--preset--color--sand);
}

.vista-plan.is-featured .vista-plan__perks li {
	border-top-color: rgba(244, 240, 232, 0.25);
}

.vista-plan:not(.is-featured) .vista-plan__perks {
	color: var(--wp--preset--color--moss);
}

.vista-plan .wp-block-buttons {
	margin-block-start: 30px;
}

.vista-plan.is-featured .wp-block-button__link:hover,
.vista-plan.is-featured .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

.vista-plan.is-featured .wp-block-button__link:focus-visible {
	outline-color: var(--wp--preset--color--cream);
}

.vista-club-terms .wp-block-list {
	margin: 0;
	padding-left: 1.1em;
	line-height: 1.6;
	columns: 2 320px;
	column-gap: 48px;
}

.vista-club-terms .wp-block-list li {
	break-inside: avoid;
	margin-bottom: 6px;
}

@media (max-width: 781px) {
	.vista-plans .vista-plan.is-featured {
		margin-top: 12px;
	}
}

/* ---------- Science ---------- */

.vista-science__article + .vista-science__article {
	margin-top: var(--wp--preset--spacing--60);
}

/* ---------- Visit ---------- */

.vista-phone {
	margin: 0;
	line-height: 1;
}

.vista-phone a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.vista-phone a:hover {
	color: var(--wp--preset--color--bronze);
}

/* ---------- FAQ (Details block) ---------- */

.wp-block-details summary {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1.5rem;
	cursor: pointer;
	list-style: none;
	font-family: var(--wp--preset--font-family--cormorant);
	font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
	line-height: 1.2;
	color: var(--wp--preset--color--ink);
}

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

.wp-block-details summary::after {
	content: "+";
	flex: none;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 1.25rem;
	font-weight: 300;
	color: var(--wp--preset--color--gold);
	transition: transform 0.2s ease;
}

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

.wp-block-details summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--bronze-deep);
	outline-offset: 4px;
}

.wp-block-details > :not(summary) {
	margin-top: 1rem;
	max-width: 68ch;
	color: var(--wp--preset--color--moss);
}

/* ---------- Footer ---------- */

.site-footer a {
	color: var(--wp--preset--color--cream);
}

.site-footer a:hover {
	color: var(--wp--preset--color--white);
}

@media (max-width: 600px) {
	.site-footer > .wp-block-group {
		flex-direction: column;
		text-align: center;
	}
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

[id] {
	scroll-margin-top: 24px;
}
