/*
Theme Name: HCA Theme
Theme URI: https://hubzonealliance.org
Author: Barnby Solutions
Author URI: https://barnbysolutions.com
Description: Block theme for the HUBZone Communities Alliance, a program of HUBZone Council, Inc. (501(c)(3)).
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
License: Proprietary
License URI:
Text Domain: hca-theme
*/

/*
 * Almost all styling lives in theme.json. This file is only for what
 * theme.json cannot express: shortcode output, focus states, and a few
 * layout details on the header and section cards.
 */

/* ---------------------------------------------------------------
   Accessibility
   --------------------------------------------------------------- */

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 3px;
}

.skip-link:focus {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary-dark);
	z-index: 100000;
}

/* Respect users who ask for reduced motion. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

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

.hca-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Keep the nav from crowding the site title on narrow desktops. */
.hca-header .wp-block-navigation {
	gap: clamp(1rem, 2vw, 2rem);
}

/* ---------------------------------------------------------------
   Eyebrow label — small caps kicker above section headings
   --------------------------------------------------------------- */

.hca-eyebrow {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	margin-bottom: var(--wp--preset--spacing--20);
}

/* The accent is too low-contrast on dark sections; lighten it there. */
.has-primary-dark-background-color .hca-eyebrow,
.has-primary-background-color .hca-eyebrow,
.has-primary-depth-gradient-background .hca-eyebrow {
	color: #f0c98a;
}

/* ---------------------------------------------------------------
   Buttons on dark sections

   The default filled button is primary blue, which all but disappears
   against the dark hero and CTA bands. Invert it there.
   --------------------------------------------------------------- */

.has-primary-depth-gradient-background .wp-block-button:not(.is-style-outline) > .wp-block-button__link,
.has-primary-dark-background-color .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary-dark);
}

.has-primary-depth-gradient-background .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.has-primary-depth-gradient-background .wp-block-button:not(.is-style-outline) > .wp-block-button__link:focus,
.has-primary-dark-background-color .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.has-primary-dark-background-color .wp-block-button:not(.is-style-outline) > .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--accent-light);
	color: var(--wp--preset--color--primary-dark);
}

/* Outline buttons on dark sections need a visible edge. */
.has-primary-depth-gradient-background .wp-block-button.is-style-outline > .wp-block-button__link,
.has-primary-dark-background-color .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: currentColor;
	color: var(--wp--preset--color--base);
}

/* ---------------------------------------------------------------
   Cards — capitals grid, pillars, and program teasers
   --------------------------------------------------------------- */

.hca-card {
	height: 100%;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hca-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--wp--preset--shadow--lifted);
}

/* Numbered badge for the five pillars. */
.hca-card__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-dark);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--medium);
	margin-bottom: var(--wp--preset--spacing--30);
}

/* ---------------------------------------------------------------
   Board of Directors grid — output of the [hca_board] shortcode
   --------------------------------------------------------------- */

.hca-board {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--wp--preset--spacing--40);
	margin: var(--wp--preset--spacing--50) 0;
	padding: 0;
	list-style: none;
}

.hca-board__member {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: var(--wp--preset--spacing--40);
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	box-shadow: var(--wp--preset--shadow--soft);
}

.hca-board__photo {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: var(--wp--preset--spacing--20);
}

.hca-board__name {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.3;
	color: var(--wp--preset--color--contrast);
}

.hca-board__role {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.hca-board__link {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.hca-board__link:hover,
.hca-board__link:focus {
	text-decoration: underline;
}

.hca-board__empty {
	padding: var(--wp--preset--spacing--40);
	background-color: var(--wp--preset--color--base-alt);
	border-radius: 8px;
	color: var(--wp--preset--color--contrast-soft);
}

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

/* Footer link lists read as navigation, not prose — drop the bullets. */
.hca-footer .wp-block-list {
	list-style: none;
	padding-left: 0;
	line-height: 2;
}

.hca-footer a {
	color: inherit;
	text-decoration: none;
}

.hca-footer a:hover,
.hca-footer a:focus {
	text-decoration: underline;
}

.hca-footer__legal {
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}
