/* Barbara Anderson — theme styles that theme.json can't express. */

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

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

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

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

::selection {
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--deep);
}

img {
	max-width: 100%;
	height: auto;
}

/* Links in body text: comfortable underline. */
:where(.wp-block-post-content, .entry-content) a:where(:not(.wp-element-button)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* Skip link. */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--deep);
	color: var(--wp--preset--color--on-dark);
	padding: 0.75rem 1.25rem;
	z-index: 100000;
}

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

.ba-topbar {
	font-size: 0.875rem;
}

.ba-topbar p {
	margin: 0;
}

.ba-topbar a {
	color: inherit;
	text-decoration: none;
}

.ba-topbar a:hover {
	color: var(--wp--preset--color--on-dark);
	text-decoration: underline;
}

.ba-topbar .wp-block-social-links {
	gap: 0.75rem;
}

.ba-wordmark {
	gap: 0.3rem !important;
}

.ba-wordmark__name {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.005em;
	white-space: nowrap;
}

.ba-wordmark__name a {
	color: var(--wp--preset--color--deep);
	text-decoration: none;
}

.ba-wordmark__name em {
	font-style: italic;
	font-weight: 400;
	color: var(--wp--preset--color--primary);
}

.ba-wordmark__tagline {
	margin: 0;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	white-space: nowrap;
}

.ba-site-header .wp-block-navigation a {
	text-decoration: none;
}

.ba-site-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.ba-site-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.45em;
}

.ba-site-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 2rem clamp(1.25rem, 5vw, 2.5rem);
}

.ba-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start;
	gap: 1.25rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.75rem;
}

.ba-site-header .wp-block-navigation__responsive-container-open,
.ba-site-header .wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	justify-content: center;
	align-items: center;
}

.ba-site-header .wp-block-navigation__responsive-container-open {
	border-radius: 8px;
	background: var(--wp--preset--color--deep);
	color: var(--wp--preset--color--on-dark);
}

.ba-site-header .wp-block-site-logo img {
	border-radius: 0;
}

@media (max-width: 781px) {
	.ba-header-cta {
		display: none !important;
	}

	.ba-wordmark__tagline {
		letter-spacing: 0.16em;
	}
}

@media (max-width: 420px) {
	.ba-wordmark__tagline {
		display: none;
	}
}

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

/* Small label (eyebrow) */
.is-style-ba-eyebrow {
	font-size: 0.8125rem !important;
	font-weight: 700;
	letter-spacing: 0.2em;
	line-height: 1.4;
	text-transform: uppercase;
}

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

/* Gold ticks list */
ul.is-style-ba-checks {
	list-style: none;
	padding-left: 0;
}

ul.is-style-ba-checks li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.6rem;
}

ul.is-style-ba-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 1.2rem;
	height: 1.2rem;
	background-color: var(--wp--preset--color--accent);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12.5 9.5 18 20 6'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12.5 9.5 18 20 6'/></svg>") center / contain no-repeat;
}

:is(.has-surface-background-color, .has-ground-background-color, .has-accent-soft-background-color) ul.is-style-ba-checks li::before {
	background-color: var(--wp--preset--color--primary);
}

/* Gold frame image */
.wp-block-image.is-style-ba-framed {
	position: relative;
	padding: 0 1.25rem 1.25rem 0;
}

.wp-block-image.is-style-ba-framed::before {
	content: "";
	position: absolute;
	inset: 1.25rem 0 0 1.25rem;
	border: 2px solid var(--wp--preset--color--accent);
	border-radius: 12px;
}

.wp-block-image.is-style-ba-framed img {
	position: relative;
	display: block;
	width: 100%;
	border-radius: 12px;
}

/* Card */
.wp-block-group.is-style-ba-card {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	height: 100%;
	box-sizing: border-box;
}

.wp-block-group.is-style-ba-card.has-background {
	border-color: transparent;
}

/* Gold diamond separator */
.wp-block-separator.is-style-ba-diamond {
	position: relative;
	width: 10rem;
	max-width: 100%;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--accent);
	background: none !important;
	overflow: visible;
	opacity: 1;
	margin-left: auto;
	margin-right: auto;
}

.wp-block-separator.is-style-ba-diamond::after {
	content: "";
	position: absolute;
	left: 50%;
	top: -4px;
	width: 7px;
	height: 7px;
	background: var(--wp--preset--color--accent);
	transform: translateX(-50%) rotate(45deg);
}

/* Buttons for dark backgrounds */
.wp-block-buttons.is-style-ba-on-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
	background-color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--deep);
}

.wp-block-buttons.is-style-ba-on-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):hover {
	background-color: var(--wp--preset--color--on-dark);
	border-color: var(--wp--preset--color--on-dark);
	color: var(--wp--preset--color--deep);
}

.wp-block-buttons.is-style-ba-on-dark .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color) {
	color: var(--wp--preset--color--on-dark);
	border-color: var(--wp--preset--color--on-dark);
}

.wp-block-buttons.is-style-ba-on-dark .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--on-dark);
	color: var(--wp--preset--color--deep);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--deep);
	border-color: var(--wp--preset--color--deep);
	color: var(--wp--preset--color--on-dark);
}

.wp-element-button,
.wp-block-button__link {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Headings, links and labels on dark sections (groups and columns only — not the menu overlay) */
:is(.wp-block-group, .wp-block-column, .wp-block-cover).has-deep-background-color :is(h1, h2, h3, h4, h5, h6):not(.has-text-color),
:is(.wp-block-group, .wp-block-column, .wp-block-cover).has-primary-background-color :is(h1, h2, h3, h4, h5, h6):not(.has-text-color) {
	color: var(--wp--preset--color--on-dark);
}

:is(.wp-block-group, .wp-block-column, .wp-block-cover).has-deep-background-color a:not(.wp-element-button):not(.has-text-color):not(.wp-block-navigation-item__content),
:is(.wp-block-group, .wp-block-column, .wp-block-cover).has-primary-background-color a:not(.wp-element-button):not(.has-text-color):not(.wp-block-navigation-item__content) {
	color: var(--wp--preset--color--on-dark);
}

:is(.wp-block-group, .wp-block-column, .wp-block-cover):is(.has-deep-background-color, .has-primary-background-color) .is-style-ba-eyebrow:not(.has-text-color) {
	color: var(--wp--preset--color--accent);
}

:is(.wp-block-group, .wp-block-column, .wp-block-cover):is(.has-deep-background-color, .has-primary-background-color) ul.is-style-ba-checks li::before {
	background-color: var(--wp--preset--color--accent);
}

/* Menu: dark text on the page, light text in the mobile overlay */
.ba-site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content {
	color: var(--wp--preset--color--ink);
}

.ba-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: var(--wp--preset--color--on-dark);
}

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

.ba-hero h1 em,
.ba-page-header h1 em,
.ba-accent-italic em {
	font-weight: 400;
}

.ba-hero h1 em {
	color: var(--wp--preset--color--primary);
}

.ba-page-header h1 em,
.has-deep-background-color h2 em {
	color: var(--wp--preset--color--accent);
}

.ba-hero__media {
	position: relative;
}

.ba-hero__badge {
	position: absolute;
	left: -2.5rem;
	bottom: 3.5rem;
	z-index: 2;
	max-width: 19rem;
	box-shadow: var(--wp--preset--shadow--soft);
}

.ba-hero__badge p {
	margin: 0;
}

@media (max-width: 781px) {
	.ba-hero__badge {
		position: relative;
		left: auto;
		bottom: auto;
		max-width: none;
		margin-top: 1rem !important;
	}
}

.ba-logo-strip figure {
	margin: 0;
}

.ba-logo-strip img {
	border-radius: 0 !important;
	opacity: 0.85;
	filter: grayscale(1);
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.ba-logo-strip img:hover {
	opacity: 1;
	filter: none;
}

.ba-number {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: 1.25rem !important;
	line-height: 1;
	color: var(--wp--preset--color--primary);
	margin: 0;
}

.has-deep-background-color .ba-number,
.has-primary-background-color .ba-number {
	color: var(--wp--preset--color--accent);
}

.ba-book-cover img {
	border-radius: 4px 10px 10px 4px !important;
	box-shadow: var(--wp--preset--shadow--lifted);
}

.ba-ten-ps {
	counter-reset: tenps;
}

.ba-ten-ps .wp-block-group.is-style-ba-card h3 {
	margin-top: 0.25rem;
}

.ba-steps .ba-number {
	font-size: 2.75rem !important;
	font-style: normal;
	color: var(--wp--preset--color--accent);
}

/* Columns that stack: keep a sensible gap. */
@media (max-width: 781px) {
	.wp-block-columns.ba-stack-reverse {
		flex-direction: column-reverse;
	}
}

/* Post cards (articles) */
.ba-post-card {
	height: 100%;
}

.ba-post-card .wp-block-post-featured-image img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 8px;
}

.ba-post-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--deep);
}

.ba-post-card .wp-block-post-title a:hover {
	text-decoration: underline;
}

/* Single event */
.ba-event-layout .ba-event-sidebar {
	position: sticky;
	top: 2rem;
}

@media (max-width: 781px) {
	.ba-event-layout .ba-event-sidebar {
		position: static;
	}
}

.ba-back-link a {
	text-decoration: none;
	font-weight: 700;
}

.ba-back-link a::before {
	content: "← ";
}

/* Details (FAQ) */
.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	padding: 0.25rem 0;
}

.wp-block-details[open] summary {
	margin-bottom: 0.75rem;
}

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

.ba-site-footer a {
	color: var(--wp--preset--color--on-dark-muted);
	text-decoration: none;
}

.ba-site-footer a:hover {
	color: var(--wp--preset--color--on-dark);
	text-decoration: underline;
}

.ba-site-footer .ba-wordmark__name a {
	color: var(--wp--preset--color--on-dark);
}

.ba-site-footer .ba-wordmark__name em {
	color: var(--wp--preset--color--accent);
}

.ba-footer-links {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.ba-footer-links li {
	margin-bottom: 0.55rem;
}

.ba-footer-heading {
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: 0.8125rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--on-dark) !important;
}

.ba-footer-bottom p {
	margin: 0;
}

/* Editor: make placeholder images obvious. */
.editor-styles-wrapper img[src*="placeholder"] {
	outline: 1px dashed var(--wp--preset--color--line);
}

/* Sections sit flush against each other; each section sets its own padding. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

.ba-sections > .alignfull,
.ba-sections > .alignfull + * {
	margin-block-start: 0;
	margin-block-end: 0;
}

.ba-page-header .wp-block-post-title,
.ba-page-header h1 {
	margin-top: 0.25rem;
	margin-bottom: 0.25rem;
}

.ba-page-header__inner > * {
	margin-top: 0;
	margin-bottom: 0;
}

.ba-page-header .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.ba-page-header .ba-back-link a {
	color: var(--wp--preset--color--on-dark-muted);
}

/* Small helpers used by the patterns */
.ba-center {
	text-align: center;
}

.wp-block-buttons.ba-center {
	justify-content: center;
}

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

.ba-hero__badge {
	border: 1px solid var(--wp--preset--color--line);
}

.ba-hero__badge .ba-badge-cover {
	margin: 0;
	flex-shrink: 0;
}

.ba-hero__badge .ba-badge-cover img {
	border-radius: 2px;
	box-shadow: 0 4px 10px rgb(0 0 0 / 0.2);
}

.ba-badge-title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.0625rem;
	line-height: 1.25;
}

.ba-badge-title a {
	color: var(--wp--preset--color--deep);
	text-decoration: none;
}

.ba-badge-title a:hover {
	text-decoration: underline;
}

.ba-section-head > * {
	max-width: 46rem;
}

.ba-section-head h2,
.ba-section-head p {
	margin: 0;
}

.ba-more-link,
.ba-card-link {
	font-weight: 700;
	margin: 0;
}

.ba-more-link a,
.ba-card-link a {
	text-decoration: none;
}

.ba-more-link a:hover,
.ba-card-link a:hover {
	text-decoration: underline;
}

.ba-card-link {
	margin-top: auto !important;
}

.ba-motto {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: 1.25rem;
	color: var(--wp--preset--color--on-dark);
}

.ba-footer-cols .ba-wordmark__name {
	font-size: 2rem;
}

.ba-footer-bottom {
	border-top: 1px solid rgb(255 255 255 / 0.14);
}

.ba-page-intro {
	max-width: 44rem;
}

.ba-pull {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: 1.25rem;
	line-height: 1.45;
	color: var(--wp--preset--color--deep);
}

.ba-step .ba-number {
	flex: 0 0 2.5rem;
}

.ba-step h4 {
	margin: 0;
}

.ba-step p {
	margin: 0;
}

.ba-logos .wp-block-image {
	margin: 0;
}

.ba-logo-strip .is-style-ba-eyebrow {
	margin: 0;
}

.ba-book-cover img {
	max-width: 100%;
}

@media (max-width: 781px) {
	.ba-book-cover img {
		width: 220px !important;
	}
}

.ba-topbar__contact .ba-dot {
	opacity: 0.6;
}

@media (max-width: 600px) {
	.ba-topbar__contact .ba-dot {
		display: none;
	}

	.ba-topbar__contact a {
		display: block;
	}

	.ba-logos {
		justify-content: flex-start !important;
	}

	.ba-logos .wp-block-image img {
		width: 120px !important;
	}
}
