/*
Theme Name: The Interpretive Path
Theme URI: https://theinterpretivepath.org/
Author: The Interpretive Path
Author URI: https://theinterpretivepath.org/
Description: The TIP-owned block theme for The Interpretive Path digital ministry.
Version: 0.2.2-dev.2
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tip
*/

/*
 * Keep theme-wide presentation in theme.json wherever WordPress supports it.
 * This file is reserved for accessibility, interaction, and TIP components.
 */

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

html {
	scroll-behavior: smooth;
}

a {
	text-underline-offset: 0.16em;
	text-decoration-thickness: 0.08em;
}

a:hover {
	color: var(--wp--preset--color--tip-navy-hover);
}

.wp-element-button,
.wp-block-button__link {
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
	background-color: var(--wp--preset--color--tip-navy-hover);
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 2px solid var(--wp--preset--color--tip-navy);
	color: var(--wp--preset--color--tip-navy);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--tip-ivory);
	border-color: var(--wp--preset--color--tip-navy-hover);
	color: var(--wp--preset--color--tip-navy-hover);
}

.wp-site-blocks {
	min-height: 100vh;
}

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

figcaption {
	max-width: 65ch;
}

.tip-site-header__inner,
.tip-site-footer__inner {
	width: 100%;
}

.tip-site-logo {
	display: inline-flex;
	flex: 0 0 auto;
	text-decoration: none;
}

.tip-site-logo__image {
	display: block;
	width: 20rem;
	aspect-ratio: 1158.375 / 220;
	background-position: left center;
	background-repeat: no-repeat;
	background-size: contain;
}

.tip-site-logo--header .tip-site-logo__image {
	background-image: url("assets/brand/tip-logo-horizontal-full-color.svg");
}

.tip-site-logo--footer .tip-site-logo__image {
	background-image: url("assets/brand/tip-logo-horizontal-reversed.svg");
}

.tip-primary-navigation .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.tip-primary-navigation .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-thickness: 0.12em;
}

.tip-site-footer__message {
	max-width: none;
	text-align: right;
	white-space: nowrap;
}

.tip-site-footer__message p {
	margin: 0;
}

.tip-site-footer a:focus-visible {
	outline-color: var(--wp--preset--color--tip-gold);
}

.wp-block-post-content > :where(p, ul, ol) {
	max-width: 65ch;
}

.tip-page-header,
.tip-search-header {
	border-bottom: 1px solid var(--wp--preset--color--tip-mist);
}

.tip-page-header .wp-block-post-title,
.tip-search-header .wp-block-query-title {
	max-width: 18ch;
	margin-bottom: 0;
	overflow-wrap: anywhere;
}

.tip-breadcrumbs {
	margin-bottom: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--tip-ink);
	font-size: var(--wp--preset--font-size--small);
}

.tip-breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tip-breadcrumbs__item {
	display: inline-flex;
	gap: 0.45rem;
	align-items: center;
}

.tip-breadcrumbs__item a {
	color: inherit;
	text-decoration-thickness: 0.08em;
}

.tip-breadcrumbs__item a[aria-current="page"] {
	font-weight: 650;
	text-decoration: none;
}

.tip-breadcrumbs__separator {
	color: var(--wp--preset--color--tip-deep-gold);
}

.tip-page-content > .wp-block-post-content > :first-child,
.tip-pathway-content > .wp-block-post-content > :first-child {
	margin-top: 0;
}

.tip-pathway-label {
	margin-bottom: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--tip-deep-gold);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tip-pathway-content > .wp-block-post-content > p:first-child {
	max-width: 55ch;
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.5;
}

.tip-pathway-content > .wp-block-post-content > ol {
	max-width: none;
	margin: var(--wp--preset--spacing--60) 0;
	padding: 0;
	counter-reset: tip-pathway-step;
	list-style: none;
}

.tip-pathway-content > .wp-block-post-content > ol > li {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr);
	align-items: center;
	column-gap: 1.5rem;
	min-height: 3rem;
	margin: 0;
	padding: 0 0 var(--wp--preset--spacing--50);
	counter-increment: tip-pathway-step;
}

.tip-pathway-content > .wp-block-post-content > ol > li + li {
	border-top: 1px solid var(--wp--preset--color--tip-mist);
	padding-top: var(--wp--preset--spacing--50);
}

.tip-pathway-content > .wp-block-post-content > ol > li::before {
	display: grid;
	width: 3rem;
	height: 3rem;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--tip-navy);
	color: var(--wp--preset--color--white);
	content: counter(tip-pathway-step);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 650;
}

.tip-pattern-introduction {
	border-left: 4px solid var(--wp--preset--color--tip-gold);
	padding-left: clamp(1.25rem, 3vw, 2rem);
}

.tip-pattern-introduction > :first-child,
.tip-pattern-path-steps > :first-child,
.tip-pattern-guidance-callout > :first-child,
.tip-pattern-quiet-cta > :first-child {
	margin-top: 0;
}

.tip-pattern-introduction p {
	max-width: 55ch;
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.5;
}

.tip-pattern-path-steps__list {
	max-width: none;
	margin: var(--wp--preset--spacing--60) 0 0;
	padding: 0;
	counter-reset: tip-pattern-path-step;
	list-style: none;
}

.tip-pattern-path-steps__list > li {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr);
	align-items: center;
	column-gap: 1.5rem;
	min-height: 3rem;
	margin: 0;
	padding: 0 0 var(--wp--preset--spacing--50);
	counter-increment: tip-pattern-path-step;
}

.tip-pattern-path-steps__list > li + li {
	border-top: 1px solid var(--wp--preset--color--tip-mist);
	padding-top: var(--wp--preset--spacing--50);
}

.tip-pattern-path-steps__list > li::before {
	display: grid;
	width: 3rem;
	height: 3rem;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--tip-navy);
	color: var(--wp--preset--color--white);
	content: counter(tip-pattern-path-step);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 650;
}

.tip-pattern-guidance-callout {
	border: 1px solid var(--wp--preset--color--tip-mist);
	border-left: 4px solid var(--wp--preset--color--tip-gold);
	background: var(--wp--preset--color--tip-ivory);
	padding: clamp(1.25rem, 3vw, 2rem);
}

.tip-pattern-guidance-callout p:last-child,
.tip-pattern-quiet-cta p:last-of-type {
	max-width: 65ch;
	margin-bottom: 0;
}

.tip-pattern-quiet-cta {
	border-top: 1px solid var(--wp--preset--color--tip-mist);
	padding-top: var(--wp--preset--spacing--60);
}

.tip-pattern-quiet-cta .wp-block-buttons {
	margin-top: var(--wp--preset--spacing--40);
}

.tip-pattern-two-column {
	align-items: center;
}

.tip-pattern-two-column__image img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.tip-search-form {
	max-width: 45rem;
}

.tip-search-grid {
	align-items: stretch;
}

.tip-search-grid > li {
	height: 100%;
	min-width: 0;
}

.tip-search-card {
	display: flex;
	box-sizing: border-box;
	height: 100%;
	min-width: 0;
	flex-direction: column;
	border: 1px solid var(--wp--preset--color--tip-mist);
	border-top: 4px solid var(--wp--preset--color--tip-gold);
	padding: clamp(1.25rem, 3vw, 2rem);
}

.tip-search-card .wp-block-post-title {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--heading-3);
	overflow-wrap: anywhere;
}

.tip-search-card .wp-block-post-excerpt {
	margin-top: auto;
}

.tip-search-empty,
.tip-utility-panel {
	border: 1px solid var(--wp--preset--color--tip-mist);
	border-left: 4px solid var(--wp--preset--color--tip-gold);
	background: var(--wp--preset--color--tip-ivory);
	padding: clamp(1.25rem, 3vw, 2rem);
}

.tip-search-empty h2,
.tip-utility-panel h1 {
	margin-top: 0;
}

.tip-resource-archive-header {
	border-bottom: 1px solid var(--wp--preset--color--tip-mist);
}

.tip-resource-archive-header p {
	max-width: 52rem;
}

.tip-resource-summary {
	border-left: 4px solid var(--wp--preset--color--tip-gold);
	background: var(--wp--preset--color--tip-ivory);
	padding: clamp(1.25rem, 3vw, 2rem);
}

.tip-resource-summary__description {
	max-width: 62ch;
	margin-top: 0;
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.5;
}

.tip-resource-summary__details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	gap: 1rem 1.5rem;
	margin: 1.5rem 0 0;
}

.tip-resource-summary__detail {
	min-width: 0;
}

.tip-resource-summary__detail dt,
.tip-resource-outcome__label,
.tip-resource-card__eyebrow {
	color: var(--wp--preset--color--tip-deep-gold);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 650;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
}

.tip-resource-summary__detail dd {
	margin: 0.2rem 0 0;
	font-size: var(--wp--preset--font-size--small);
}

.tip-resource-summary__path {
	margin: 1.5rem 0 0;
	font-size: var(--wp--preset--font-size--small);
}

.tip-resource-outcome {
	border-top: 1px solid var(--wp--preset--color--tip-mist);
	margin-top: 1.5rem;
	padding-top: 1.5rem;
}

.tip-resource-outcome p:last-child {
	max-width: 65ch;
	margin-bottom: 0;
}

.tip-resource-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	box-sizing: border-box;
	border: 1px solid var(--wp--preset--color--tip-mist);
	border-top: 4px solid var(--wp--preset--color--tip-gold);
	background: var(--wp--preset--color--white);
	padding: clamp(1.25rem, 3vw, 2rem);
}

.tip-resource-card__eyebrow {
	margin: 0 0 0.75rem;
}

.tip-resource-card__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--heading-3);
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.tip-resource-card__title a {
	display: block;
	min-width: 0;
}

.tip-resource-card__description {
	margin: 1rem 0 0;
	font-size: var(--wp--preset--font-size--small);
}

.tip-resource-card__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	margin-top: auto;
	padding-top: 1.5rem;
}

.tip-resource-card__time {
	color: var(--wp--preset--color--tip-ink);
	font-size: var(--wp--preset--font-size--xs);
}

.tip-resource-card__action {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 650;
}

.tip-resource-grid {
	align-items: stretch;
}

.tip-resource-grid > li {
	height: 100%;
	min-width: 0;
}

.tip-resource-next {
	border-top: 1px solid var(--wp--preset--color--tip-mist);
	margin-top: var(--wp--preset--spacing--80);
	padding-top: var(--wp--preset--spacing--60);
}

.tip-resource-next > h2 {
	margin-top: 0;
}

.tip-resource-next .tip-resource-card {
	max-width: 48rem;
	background: var(--wp--preset--color--tip-ivory);
}

.tip-resource-next__back {
	font-weight: 650;
}

.tip-resource-empty {
	border: 1px solid var(--wp--preset--color--tip-mist);
	background: var(--wp--preset--color--tip-ivory);
	padding: var(--wp--preset--spacing--60);
}

.tip-resource-display-placeholder {
	border: 1px dashed #8c8f94;
	background: #f6f7f7;
	color: #1d2327;
	padding: 1rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 0.875rem;
}

@media (max-width: 43.75rem) {
	.tip-site-logo__image {
		width: 13.75rem;
		aspect-ratio: 975.807 / 136.805;
	}

	.tip-site-logo--header .tip-site-logo__image {
		background-image: url("assets/brand/tip-wordmark-navy.svg");
	}

	.tip-site-logo--footer .tip-site-logo__image {
		background-image: url("assets/brand/tip-wordmark-reversed.svg");
	}

	.tip-site-header__inner {
		gap: var(--wp--preset--spacing--40);
	}

	.tip-site-footer__inner {
		align-items: flex-start;
		flex-direction: column;
		gap: var(--wp--preset--spacing--50);
	}

	.tip-site-footer__message {
		max-width: 34rem;
		text-align: left;
		white-space: normal;
	}

	.tip-resource-summary__details {
		grid-template-columns: 1fr;
	}

	.tip-resource-card__footer {
		align-items: flex-start;
		flex-direction: column;
	}

	.tip-pathway-content > .wp-block-post-content > ol > li {
		grid-template-columns: 2.75rem minmax(0, 1fr);
		column-gap: 1rem;
	}

	.tip-pattern-path-steps__list > li {
		grid-template-columns: 2.75rem minmax(0, 1fr);
		column-gap: 1rem;
	}

	.tip-pathway-content > .wp-block-post-content > ol > li::before {
		width: 2.75rem;
		height: 2.75rem;
	}

	.tip-pattern-path-steps__list > li::before {
		width: 2.75rem;
		height: 2.75rem;
	}
}

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

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
