/*
Theme Name: Health Culture
Theme URI: https://healthculturemed.com
Author: Amber Robertson
Description: Block theme for Health Culture Medical Group. Landing page with hero, intro, and contact form; built to grow into the full practice site.
Version: 1.0.15
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: healthculture
*/

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

body {
	-webkit-font-smoothing: antialiased;
}

.wp-site-blocks > footer {
	margin-block-start: 0;
}

.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Small uppercase labels (eyebrows). Doubled class names on purpose: they must outrank the section-level "p" rules below. */
.hc-eyebrow.hc-eyebrow {
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	margin: 0;
}

.hc-eyebrow--small.hc-eyebrow--small {
	font-size: 0.75rem;
	letter-spacing: 0.3em;
}

/* Gold tag */
.hc-tag.hc-tag {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	padding: 0.5rem 0.875rem;
	border-radius: 3px;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	line-height: 1;
	margin: 0;
}

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

.hc-hero.wp-block-cover {
	min-height: min(100vh, 900px);
	padding: 0;
	background-color: var(--wp--preset--color--navy);
}

/* Two overlays on WordPress's own overlay layer: a dark band at the top for the logo and a darker left/bottom for the text */
.hc-hero.wp-block-cover > .wp-block-cover__background {
	opacity: 1 !important;
	background-color: transparent !important;
	background-image:
		linear-gradient(90deg, rgba(22, 50, 61, 0.72) 0%, rgba(22, 50, 61, 0.4) 38%, rgba(22, 50, 61, 0) 68%),
		linear-gradient(180deg, rgba(22, 50, 61, 0.85) 0%, rgba(22, 50, 61, 0.35) 18%, rgba(22, 50, 61, 0) 34%, rgba(22, 50, 61, 0) 55%, rgba(22, 50, 61, 0.55) 80%, rgba(22, 50, 61, 0.9) 100%) !important;
	z-index: 1;
}

.hc-hero.wp-block-cover > .wp-block-cover__image-background {
	z-index: 0;
}

/* The cover's "bottom left" content position shrink-wraps the inner container; force it full width so the header row spans the page */
.hc-hero.wp-block-cover .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
}

.hc-hero__inner {
	min-height: min(100vh, 900px);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 3rem;
	padding: 1.75rem clamp(1.5rem, 5vw, 4rem) clamp(2.5rem, 5vw, 4rem);
	box-sizing: border-box;
}

.hc-hero__top .hc-logo {
	margin: 0;
}

.hc-logo img {
	display: block;
	height: 96px;
	width: auto;
}

.hc-hero__content {
	max-width: 720px;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	opacity: 0;
	transform: translateY(24px);
	animation: hcFadeUp 0.8s ease 0.15s forwards;
}

/* WordPress adds a 24px block gap above every child of a group; the flex gap above is the only spacing we want here */
.hc-hero__content > *,
.hc-hero__content > * + *,
.hc-hero__top > *,
.hc-contact-block > *,
.hc-contact-block > * + * {
	margin: 0 !important;
}

.hc-hero__content > .wp-block-buttons {
	margin-top: 0.25rem !important;
}

.hc-hero__content .hc-eyebrow {
	color: var(--wp--preset--color--cream);
}

.hc-hero__content h1 {
	color: var(--wp--preset--color--cream);
}

.hc-contact-block {
	max-width: 440px;
	margin-top: 0.25rem !important;
	padding-top: 1.125rem;
	border-top: 1px solid rgba(200, 163, 117, 0.7);
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.hc-contact-block .hc-contact-name {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.125rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--cream);
}

.hc-contact-block .hc-contact-lines {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	font-size: 1rem;
	color: var(--wp--preset--color--cream);
}

.hc-contact-block .hc-contact-lines a {
	color: var(--wp--preset--color--cream);
}

.hc-contact-block .hc-contact-lines a:hover {
	color: var(--wp--preset--color--gold);
}

.hc-dot {
	color: var(--wp--preset--color--gold);
}

@media (max-width: 720px) {
	.hc-logo img {
		height: 72px;
	}
	.hc-contact-block .hc-contact-lines {
		flex-direction: column;
	}
	.hc-contact-lines .hc-dot {
		display: none;
	}
	/* Phones: the headline spans the full width, so the scrim runs edge to edge and the bottom darkening starts higher */
	.hc-hero.wp-block-cover > .wp-block-cover__background {
		background-image:
			linear-gradient(90deg, rgba(22, 50, 61, 0.72) 0%, rgba(22, 50, 61, 0.5) 55%, rgba(22, 50, 61, 0.35) 100%),
			linear-gradient(180deg, rgba(22, 50, 61, 0.85) 0%, rgba(22, 50, 61, 0.35) 18%, rgba(22, 50, 61, 0) 32%, rgba(22, 50, 61, 0) 40%, rgba(22, 50, 61, 0.55) 60%, rgba(22, 50, 61, 0.9) 100%) !important;
	}
	/* Line the menu button up with the HEALTH CULTURE wordmark (sits about two-thirds down the logo) rather than the logo's midpoint */
	.hc-hero__top .hc-nav .wp-block-navigation__responsive-container-open {
		position: relative;
		top: 12px;
	}
	.hc-header .hc-nav .wp-block-navigation__responsive-container-open {
		position: relative;
		top: 12px;
	}
	/* Footer: stack and center the logo and copyright */
	.hc-footer > .wp-block-group {
		flex-direction: column !important;
		justify-content: center !important;
		align-items: center !important;
		gap: 1.25rem !important;
		text-align: center;
	}
	.hc-footer .hc-logo {
		margin: 0 auto;
	}
}

/* ---------- Sections ---------- */

.hc-section {
	padding-top: clamp(4.5rem, 8vw, 7.5rem);
	padding-bottom: clamp(4.5rem, 8vw, 7.5rem);
}

.hc-section .wp-block-columns {
	gap: 3rem 5rem;
}

.hc-section .wp-block-column > * + * {
	margin-block-start: 1.25rem;
}

.hc-section h2 {
	margin-top: 1.25rem;
}

.hc-section p {
	font-size: 1.125rem;
	line-height: 1.65;
}

.hc-section--intro .hc-eyebrow,
.hc-section--intro h2 {
	color: var(--wp--preset--color--navy);
}

.hc-section--intro .hc-eyebrow {
	color: var(--wp--preset--color--teal);
}

.hc-section--intro p {
	color: var(--wp--preset--color--slate);
}

.hc-section--contact .hc-eyebrow {
	color: var(--wp--preset--color--gold);
}

.hc-section--contact h2 {
	color: var(--wp--preset--color--cream);
}

.hc-section--contact p {
	color: rgba(244, 241, 236, 0.82);
}

.hc-contact-links {
	margin-top: 0.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(200, 163, 117, 0.6);
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}

.hc-contact-links a {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin: 0;
	font-size: 1.0625rem;
	color: var(--wp--preset--color--cream);
	text-decoration: none;
}

.hc-contact-links a:hover {
	color: var(--wp--preset--color--gold);
}

.hc-contact-links svg {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

/* ---------- Contact form (Contact Form 7) ---------- */

.hc-form {
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--navy);
	border-radius: 20px;
	padding: clamp(1.75rem, 3vw, 2.75rem);
}

.hc-form .wpcf7-form {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
}

.hc-form .hc-form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1.125rem;
}

.hc-form .hc-form-row > label {
	flex: 1 1 180px;
	min-width: 0;
}

/* Fallback for when Contact Form 7 wraps the row's labels in a <p> */
.hc-form .hc-form-row > p,
.hc-form .wpcf7-form > p {
	display: flex;
	flex-wrap: wrap;
	gap: 1.125rem;
	margin: 0;
	width: 100%;
}

.hc-form .hc-form-row > p > label {
	flex: 1 1 180px;
	min-width: 0;
}

.hc-form .wpcf7-form > p > label {
	flex: 1 1 100%;
	min-width: 0;
}

.hc-form .hc-form-row > p > label + label {
	flex: 1 1 180px;
}

.hc-form label > br,
.hc-form p > br,
.hc-form fieldset br {
	display: none;
}

.hc-form .wpcf7-form-control-wrap {
	width: 100%;
}

.hc-form input,
.hc-form textarea {
	min-width: 0;
}

.hc-form label {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--teal);
}

.hc-form .wpcf7-form-control-wrap {
	display: block;
}

.hc-form input[type="text"],
.hc-form input[type="email"],
.hc-form input[type="tel"],
.hc-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0 1rem;
	height: 50px;
	border: 1px solid #cfd6d8;
	border-radius: 10px;
	background: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	color: var(--wp--preset--color--navy);
}

.hc-form textarea {
	height: auto;
	min-height: 120px;
	padding: 0.875rem 1rem;
	line-height: 1.5;
	resize: vertical;
}

.hc-form input:focus,
.hc-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--gold);
}

.hc-form .hc-form-note {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #5c6f77;
}

.hc-form .wpcf7-submit {
	align-self: flex-start;
	min-height: 52px;
	padding: 0 2rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease;
}

.hc-form .wpcf7-submit:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--cream);
}

.hc-form .wpcf7-spinner {
	margin: 0 0 0 1rem;
}

.hc-form .wpcf7-not-valid-tip {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.8125rem;
	letter-spacing: 0;
	text-transform: none;
	color: #a2452b;
}

.hc-form .wpcf7-response-output {
	margin: 0;
	padding: 0.875rem 1rem;
	border: 1px solid var(--wp--preset--color--gold);
	border-radius: 10px;
	font-size: 0.9375rem;
}

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

.hc-footer {
	padding-top: 2.5rem;
	padding-bottom: 2.5rem;
}

.hc-footer p {
	margin: 0;
	font-size: 0.875rem;
	letter-spacing: 0.02em;
	color: rgba(244, 241, 236, 0.7);
}

.hc-footer .hc-logo img {
	height: 64px;
}

/* ---------- Navigation ---------- */

.hc-nav {
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	gap: 2rem;
}

.hc-nav a {
	color: var(--wp--preset--color--cream);
}

.hc-nav a:hover {
	color: var(--wp--preset--color--gold);
	text-decoration: none;
}

.hc-nav .wp-block-navigation__responsive-container-open,
.hc-nav .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--cream);
}

/* ---------- Site header (inner pages) ---------- */

.hc-header .hc-logo img {
	height: 96px;
}

@media (max-width: 720px) {
	.hc-header .hc-logo img {
		height: 72px;
	}
}

.hc-header .hc-logo {
	margin: 0;
}

/* ---------- About page ---------- */

.hc-eyebrow--gold {
	color: var(--wp--preset--color--gold);
}

.hc-about {
	padding-top: clamp(3rem, 6vw, 5.5rem);
	padding-bottom: clamp(4.5rem, 8vw, 7.5rem);
}

.hc-about .wp-block-columns {
	gap: 2.5rem 4.5rem;
}

.hc-about__side {
	flex-basis: 30% !important;
}

.hc-about__main {
	flex-basis: 70% !important;
}

.hc-about__side .hc-portrait {
	margin: 0 0 2rem;
	max-width: 320px;
}

.hc-about__side .hc-portrait img {
	display: block;
	width: 100% !important;
	height: auto;
	border-radius: 20px;
}

.hc-fact + .hc-fact {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #ddd3c3;
}

.hc-fact h3 {
	margin: 0 0 0.5rem;
	color: var(--wp--preset--color--gold);
}

.hc-fact p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--wp--preset--color--slate);
}

.hc-about__main .hc-eyebrow--small {
	color: var(--wp--preset--color--teal);
}

.hc-about__main h1 {
	margin: 0.75rem 0;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.08;
}

.hc-about__main .hc-eyebrow--gold {
	font-size: 0.8125rem;
	letter-spacing: 0.22em;
}

.hc-about__main .hc-role {
	margin: 1.25rem 0 0;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--wp--preset--color--gold);
}

.hc-bio {
	margin-top: 1.75rem;
}

.hc-bio p {
	margin: 0 0 1.25rem;
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--wp--preset--color--slate);
}

.hc-bio p:last-child {
	margin-bottom: 0;
}

@media (max-width: 781px) {
	/* Stacked order on phones: portrait, name and bio, then the quick facts.
	   The two columns are dissolved so their children can be reordered as one list. */
	.hc-about .wp-block-columns {
		display: flex;
		flex-direction: column;
		gap: 0;
	}
	.hc-about__side,
	.hc-about__main {
		display: contents;
	}
	.hc-about__side .hc-portrait {
		order: 1;
		max-width: none;
		margin: 0 0 2rem;
	}
	.hc-about__main > * {
		order: 2;
	}
	.hc-about__side .hc-fact {
		order: 3;
	}
	.hc-about__side .hc-fact:first-of-type {
		margin-top: 2.5rem;
		padding-top: 2.5rem;
		border-top: 1px solid var(--wp--preset--color--gold);
	}
	.hc-about__main .hc-bio {
		margin-top: 1.75rem;
	}
}

.hc-about-intro {
	padding-top: clamp(2.5rem, 5vw, 4rem);
	padding-bottom: 2.5rem;
}

.hc-about-intro .wp-block-columns {
	gap: 2.5rem 4.5rem;
}

.hc-about-intro .hc-eyebrow--small {
	color: var(--wp--preset--color--teal);
}

.hc-about-intro h1 {
	margin: 0.75rem 0 0.75rem;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.08;
}

.hc-about-intro .hc-eyebrow--gold {
	font-size: 0.8125rem;
	letter-spacing: 0.22em;
}

.hc-role {
	margin: 1.25rem 0 0;
	font-size: 1.0625rem;
	color: var(--wp--preset--color--navy);
}

.hc-focus-line {
	margin: 1.5rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid var(--wp--preset--color--gold);
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
}

.hc-portrait {
	margin: 0;
}

.hc-portrait img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: 50% 12%;
	border-radius: 20px;
}

.hc-about-bio {
	padding-top: 0.5rem;
	padding-bottom: clamp(4.5rem, 8vw, 7.5rem);
}

.hc-about-bio .wp-block-columns {
	gap: 2rem 4.5rem;
}

/* Single column, aligned with the title column and the gold rule above it (36% portrait column + 0.64 of the 4.5rem gap) */
@media (min-width: 782px) {
	.hc-about-bio .wp-block-columns {
		display: block !important;
		box-sizing: border-box;
		padding-left: calc(0.36 * min(1200px, 100%) + 2.88rem);
	}
	.hc-about-bio .wp-block-column {
		width: 100%;
		flex-basis: auto !important;
	}
	.hc-about-bio .wp-block-column + .wp-block-column {
		margin-top: 1.25rem;
	}
}

.hc-about-bio p {
	margin: 0 0 1.25rem;
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--wp--preset--color--slate);
}

.hc-about-bio p:last-child {
	margin-bottom: 0;
}

.hc-quote-band {
	padding-top: clamp(2.5rem, 5vw, 4rem);
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.hc-quote {
	max-width: 820px;
	margin: 0 auto;
	font-family: var(--wp--preset--font-family--body);
	font-style: italic;
	font-size: clamp(1.25rem, 2.2vw, 1.625rem);
	line-height: 1.5;
	color: var(--wp--preset--color--teal);
}

.hc-about-details {
	padding-top: clamp(4.5rem, 8vw, 7.5rem);
	padding-bottom: clamp(4.5rem, 8vw, 7.5rem);
}

.hc-about-details .wp-block-columns {
	gap: 2.5rem 3rem;
}

.hc-about-details h3,
.hc-affiliations h3 {
	margin: 0 0 1rem;
	color: var(--wp--preset--color--gold);
}

.hc-about-details p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--wp--preset--color--slate);
}

.hc-affiliations {
	padding-top: clamp(2.5rem, 5vw, 4rem);
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* Teal so the band reads separately from the navy footer, including on pages built from the earlier pattern.
   WordPress preset color classes use !important, so this must too. */
.hc-affiliations.has-navy-background-color,
.hc-affiliations.has-teal-background-color {
	background-color: var(--wp--preset--color--teal) !important;
}

/* Inner pages: full-width sections inside the page content break out past the site's edge padding */
.wp-block-post-content.has-global-padding > .alignfull {
	margin-left: calc(var(--wp--style--root--padding-left) * -1) !important;
	margin-right: calc(var(--wp--style--root--padding-right) * -1) !important;
}

.hc-affiliations .wp-block-columns {
	gap: 2.5rem 4rem;
}

.hc-affiliations p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.7;
	color: rgba(244, 241, 236, 0.85);
}

.hc-affiliations__contact p + p {
	margin-top: 0.25rem;
}

.hc-affiliations a {
	color: var(--wp--preset--color--cream);
}

.hc-affiliations a:hover {
	color: var(--wp--preset--color--gold);
}

@media (max-width: 781px) {
	.hc-about-intro .wp-block-columns,
	.hc-about-bio .wp-block-columns,
	.hc-about-details .wp-block-columns,
	.hc-affiliations .wp-block-columns {
		gap: 2rem;
	}
	.hc-portrait {
		max-width: 360px;
	}
}

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

@keyframes hcFadeUp {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.animate-on-scroll {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* The block editor never runs the observer, so keep sections visible there */
.editor-styles-wrapper .animate-on-scroll,
.editor-styles-wrapper .hc-hero__content {
	opacity: 1;
	transform: none;
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
	.animate-on-scroll {
		opacity: 1;
		transform: none;
	}
}
