/*
Theme Name: Docandtee Block Theme
Theme URI: https://www.docandtee.com/
Author: Doc and Tee
Author URI: https://www.docandtee.com/
Description: A lightweight Full Site Editing theme with locked patterns, CSS scroll motion, and a small Interactivity API layer for carousels and dialogs.
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.2
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: docandtee
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, wide-blocks, block-styles, accessibility-ready
*/

.mt-0 {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
}

.mt-sm {
	margin-top: 0.5rem !important;
	margin-block-start: 0.5rem !important;
}

a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: 0.1em;
}

/* Global Styles can give links their own font; links in headings keep the heading's. */
:is(h1, h2, h3, h4, h5, h6) a:where(:not(.wp-element-button)) {
	font-family: inherit;
}

/*
 * Animated title underline: add docandtee-title-underline to a card title.
 * A 1px line grows from the left under the title's link on hover and focus.
 * Team member names animate when their card button is hovered or focused.
 */
.docandtee-title-underline a,
.docandtee-team-member .docandtee-title-underline {
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	transition: background-size 0.3s ease;
}

.docandtee-title-underline a:is(:hover, :focus-visible),
.docandtee-team-member:is(:hover, :focus-visible) .docandtee-title-underline {
	text-decoration: none;
	background-size: 100% 1px;
}

@media (prefers-reduced-motion: reduce) {
	.docandtee-title-underline a,
	.docandtee-team-member .docandtee-title-underline {
		transition: none;
	}
}

:where(.wp-site-blocks) :focus-visible {
	outline: 2px solid var(--wp--preset--color--primary-text);
	outline-offset: 2px;
}

:where(.wp-site-blocks > footer, .wp-block-cover, .has-dark-background-color, .has-primary-text-background-color, .has-contrast-background-color, .has-tertiary-background-color, .has-primary-background-color, .has-secondary-background-color) :focus-visible {
	outline-color: currentColor;
}

:where(.wp-site-blocks > footer, .wp-block-cover, .has-dark-background-color, .has-primary-text-background-color, .has-contrast-background-color, .has-tertiary-background-color, .has-primary-background-color, .has-secondary-background-color) a:where(:not(.wp-element-button)),
:where(.wp-site-blocks > footer, .wp-block-cover, .has-dark-background-color, .has-primary-text-background-color, .has-contrast-background-color, .has-tertiary-background-color, .has-primary-background-color, .has-secondary-background-color) a:where(:not(.wp-element-button)):hover,
:where(.wp-site-blocks > footer, .wp-block-cover, .has-dark-background-color, .has-primary-text-background-color, .has-contrast-background-color, .has-tertiary-background-color, .has-primary-background-color, .has-secondary-background-color) a:where(:not(.wp-element-button)):focus {
	color: inherit;
}

:where(.wp-site-blocks > footer, .wp-block-cover, .has-dark-background-color, .has-primary-text-background-color, .has-contrast-background-color, .has-tertiary-background-color, .has-primary-background-color, .has-secondary-background-color) a:where(:not(.wp-element-button)):hover {
	text-decoration-line: underline;
}



.docandtee-block > h2 {
	margin-block-end:var(--wp--preset--spacing--50) !important;
}

:where(.is-layout-constrained) > *.docandtee-block,
:where(.is-layout-constrained) > *.wp-block-details,
.wp-block-docandtee-carousel,
.docandtee-featured-image {
	margin-block-start: 0 !important;
	margin-block-end:0 !important;
}
:where(.wp-block-columns-is-layout-flex) {
	gap: var(--wp--preset--spacing--40) !important;
}

.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

:where(pre) {
	overflow-x: auto;
}

.skip-link:focus {
	position: absolute;
	z-index: 100000;
	top: 0;
	left: 0;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--primary-text);
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

.wp-block-cover .wp-block-heading a {
	color: #fff !important;
	text-decoration: none !important;
	&:hover {
		color: #fff !important;
	}
}

.wp-block-cover .wp-block-heading:not(.docandtee-title-underline) a:hover {
	text-decoration: underline !important;
}

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

/* Shared by the team grid dialog (blocks/team-grid/style.css) and the video modal. */
@keyframes docandtee-dialog-fade {
	from {
		opacity: 0;
	}
}

@keyframes docandtee-dialog-in {
	from {
		opacity: 0;
		transform: translateY(1rem) scale(0.97);
	}
}

/*
 * Hero / featured covers: align title, copy and buttons together via the
 * inner Group's text alignment control (left / center / right).
 */
.wp-block-cover .wp-block-group.has-text-align-center .wp-block-buttons {
	justify-content: center;
}

.wp-block-cover .wp-block-group.has-text-align-right .wp-block-buttons {
	justify-content: flex-end;
}

.wp-block-cover .wp-block-group.has-text-align-left .wp-block-buttons {
	justify-content: flex-start;
}

/*
 * Core sizes embedded (YouTube / Vimeo) cover backgrounds at 100vw x 100vh,
 * which only fills when the viewport is landscape. On portrait screens the
 * player letterboxes the 16:9 video inside that tall frame. Keep the frame
 * 16:9 and scale it to cover the cover block instead.
 */
.wp-block-cover .wp-block-cover__embed-background {
	container-type: size;
}

:root .wp-block-cover .wp-block-cover__embed-background.wp-block-cover__video-background iframe {
	width: max(100cqw, 100cqh * 16 / 9);
	height: max(100cqh, 100cqw * 9 / 16);
}

/*
 * Revealed by assets/js/cover-youtube.js once YouTube's start-up controls have
 * faded. Only the reveal is transitioned, so hiding on loop restart is instant.
 * Until then the video's thumbnail (set inline by functions.php) shows instead.
 */
.wp-block-cover .wp-block-cover__embed-background:has(> iframe.docandtee-cover-youtube) {
	background-color: var(--wp--preset--color--dark);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.wp-block-cover iframe.docandtee-cover-youtube {
	opacity: 0;
}

.wp-block-cover iframe.docandtee-cover-youtube.is-revealed {
	opacity: 1;
	transition: opacity 0.8s ease;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-cover iframe.docandtee-cover-youtube.is-revealed {
		transition: none;
	}
}

.wp-block-media-text.is-image-fill .wp-block-media-text__media,
.wp-block-media-text.is-image-fill-element .wp-block-media-text__media {
	min-height: 50vh;
}

.wp-block-media-text.alignfull > .wp-block-media-text__content {
	padding-top: var(--wp--preset--spacing--20);
	padding-bottom: var(--wp--preset--spacing--40);
}

.wp-block-columns.docandtee-info-cards > .wp-block-column,
.wp-block-columns.docandtee-icon-grid > .wp-block-column,
.wp-block-columns.docandtee-stats-grid > .wp-block-column,
.wp-block-columns.docandtee-products-grid > .wp-block-column {
	flex-grow: 1;
	flex-shrink: 1;
	flex-basis: 0;
	width: auto;
}

@media (max-width: 781px) {
	.wp-block-columns.docandtee-info-cards:not(.is-not-stacked-on-mobile) > .wp-block-column,
	.wp-block-columns.docandtee-icon-grid:not(.is-not-stacked-on-mobile) > .wp-block-column,
	.wp-block-columns.docandtee-stats-grid:not(.is-not-stacked-on-mobile) > .wp-block-column,
	.wp-block-columns.docandtee-products-grid:not(.is-not-stacked-on-mobile) > .wp-block-column {
		flex-basis: 100%;
	}
}

/* Footer columns: one column on mobile, two on medium screens, four on wide screens. */
@media (min-width: 600px) and (max-width: 959px) {
	.wp-block-columns.docandtee-footer__columns {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.docandtee-footer__columns > .wp-block-column {
		flex-basis: calc((100% - var(--wp--preset--spacing--40)) / 2) !important;
		flex-grow: 0;
	}
}

@media (min-width: 960px) {
	.wp-block-columns.docandtee-footer__columns > .wp-block-column {
		flex-basis: 0 !important;
		flex-grow: 1;
	}
}

.docandtee-stats__figure {
	font-variant-numeric: tabular-nums;
}

/*
 * Whole-card links (masonry tiles, info cards, info card carousel slides):
 * linking a card's title stretches that link over the card.
 */
:is(.docandtee-masonry-grid__grid, .docandtee-info-cards, .docandtee-info-cards-carousel) .wp-block-cover a {
	color: inherit;
}

:is(.docandtee-masonry-grid__grid, .docandtee-info-cards, .docandtee-info-cards-carousel) .wp-block-cover .wp-block-heading a {
	text-decoration: none;
}

:is(.docandtee-masonry-grid__grid, .docandtee-info-cards, .docandtee-info-cards-carousel) .wp-block-cover .wp-block-heading:not(.docandtee-title-underline) a:hover {
	text-decoration: underline;
}

/*
 * Core positions the inner container, which would size the stretched link to
 * the text. Making it static sizes the link to the cover instead; the cover's
 * media and overlay then sit at z-index -1 so the text stays above them.
 */
:is(.docandtee-masonry-grid__grid, .docandtee-info-cards, .docandtee-info-cards-carousel) .wp-block-cover:has(.wp-block-heading a) {
	isolation: isolate;
}

:is(.docandtee-masonry-grid__grid, .docandtee-info-cards, .docandtee-info-cards-carousel) .wp-block-cover:has(.wp-block-heading a) > .wp-block-cover__inner-container {
	position: static;
}

/* Modern Image Formats can wrap the cover image in a display: contents <picture>. */
:is(.docandtee-masonry-grid__grid, .docandtee-info-cards, .docandtee-info-cards-carousel) :is(.wp-block-cover:has(.wp-block-heading a), .wp-block-cover:has(.wp-block-heading a) > picture) > :is(.wp-block-cover__image-background, .wp-block-cover__video-background, .wp-block-cover__background, .wp-block-cover__gradient-background) {
	z-index: -1;
}

:is(.docandtee-masonry-grid__grid, .docandtee-info-cards, .docandtee-info-cards-carousel) .wp-block-cover .wp-block-heading a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Any other link or button in a linked card stays clickable above the stretched link. */
:is(.docandtee-masonry-grid__grid, .docandtee-info-cards, .docandtee-info-cards-carousel) .wp-block-cover__inner-container a:not(.wp-block-heading a) {
	position: relative;
	z-index: 2;
}

:is(.docandtee-masonry-grid__grid, .docandtee-info-cards, .docandtee-info-cards-carousel) .wp-block-cover .wp-block-heading a:focus-visible {
	outline: none;
}

:is(.docandtee-masonry-grid__grid, .docandtee-info-cards, .docandtee-info-cards-carousel) .wp-block-cover .wp-block-heading a:focus-visible::after {
	outline: 2px solid currentColor;
	outline-offset: -6px;
}

/* Info cards: 4:5 image with the title and copy below it. */
.docandtee-info-card {
	position: relative;
}

.docandtee-info-card .wp-block-image img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.docandtee-info-card .wp-block-heading a {
	text-decoration: none;
}

.docandtee-info-card .wp-block-heading:not(.docandtee-title-underline) a:hover {
	text-decoration: underline;
}

.docandtee-info-card .wp-block-heading a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.docandtee-info-card a:not(.wp-block-heading a) {
	position: relative;
	z-index: 2;
}

.docandtee-info-card .wp-block-heading a:focus-visible {
	outline: none;
}

/* The ring spans the image and the light card body, so it pairs dark and light. */
.docandtee-info-card .wp-block-heading a:focus-visible::after {
	outline: 2px solid var(--wp--preset--color--dark);
	outline-offset: -2px;
	box-shadow: inset 0 0 0 4px var(--wp--preset--color--base);
}

.docandtee-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.docandtee-posts-list__terms {
	gap: 0.35rem;
}

.docandtee-posts-list__terms .wp-block-post-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.docandtee-posts-list__terms .wp-block-post-terms:empty,
.docandtee-posts-list__terms .wp-block-post-terms__separator {
	display: none;
}

.docandtee-posts-list__terms .wp-block-post-terms a {
	display: inline-block;
	font-size: 0.75rem;
	line-height: 1.2;
	padding: 0.2em 0.5em;
	background-color: color-mix(in srgb, var(--wp--preset--color--primary) 65%, black);
	color: var(--wp--preset--color--base);
	text-decoration: none !important;
}

.docandtee-posts-list__terms .wp-block-post-terms a:hover,
.docandtee-posts-list__terms .wp-block-post-terms a:focus-visible {
	text-decoration: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.wp-element-button,
	.wp-block-button__link {
		transition: none;
	}

	.docandtee-header-search,
	.docandtee-header-search.is-open {
		transition: none;
	}
}

/* Header search toggle */
.docandtee-header-search {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	background-color: var(--wp--preset--color--light);
	box-shadow: inset 0 -1px 0 transparent;
	/* Visibility flips at the end of the close, so the panel stays visible while it collapses. */
	transition: grid-template-rows 0.3s ease, box-shadow 0.3s ease, visibility 0s linear 0.3s;
}

.docandtee-header-search.is-open {
	grid-template-rows: 1fr;
	visibility: visible;
	box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--wp--preset--color--contrast) 12%, transparent);
	transition: grid-template-rows 0.3s ease, box-shadow 0.3s ease, visibility 0s;
}

.docandtee-header-search,
.docandtee-header-search__inner,
.docandtee-header-search__inner > .wp-block-search {
	margin-block-start: 0 !important;
}

.docandtee-header-search__inner {
	min-height: 0;
	overflow: hidden;
}

/* Padding sits inside the clipped area so it collapses too, and leaves room for the input's focus outline. */
.docandtee-header-search__inner > .wp-block-search {
	padding-block: var(--wp--preset--spacing--30);
}

.docandtee-header-search .wp-block-search__button-inside .wp-block-search__inside-wrapper {
	border: 0;
	background-color: transparent;
}

.docandtee-header-search__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0.25rem;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	line-height: 0;
}

.docandtee-header-search__toggle svg {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
	fill: currentColor;
}

.docandtee-header-search__toggle:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary-text);
	outline-offset: 4px;
}

.docandtee-search-page-form {
	margin-block-end: var(--wp--preset--spacing--50);
}

.docandtee-search-page-form .wp-block-search {
	max-width: 24rem;
}

/* Posts page category + keyword filter */
.docandtee-posts-filter {
	margin-block-end: var(--wp--preset--spacing--50);
}

.docandtee-posts-filter__form {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: var(--wp--preset--spacing--30);
	align-items: center;
	margin: 0;
}

.docandtee-posts-filter__field {
	flex: 0 1 auto;
	width: 16rem;
	max-width: 100%;
}

.docandtee-posts-filter select,
.docandtee-posts-filter input[type="search"] {
	width: 100%;
	margin: 0;
	padding: 0.5rem 0.75rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 12%, transparent);
	background-color: var(--wp--preset--color--base);
	color: inherit;
	font: inherit;
	line-height: 1.4;
}

.docandtee-posts-filter select {
	appearance: none;
	padding-right: 2.25rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%232F2F47' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 0.75rem;
}

.docandtee-posts-filter button[type="submit"] {
	margin: 0;
}

.wp-block-query.is-loading,
.wp-block-query[aria-busy="true"] {
	opacity: 0.6;
	transition: opacity 0.2s ease;
}

.wp-block-query .wp-block-post-template {
	margin-block-end: var(--wp--preset--spacing--60);
}

.wp-block-query .wp-block-query-pagination {
	margin-block-end: var(--wp--preset--spacing--50);
}

.wp-block-query .wp-block-post-template .wp-block-post {
	display: flex;
	height: 100%;
}

.docandtee-post-card {
	display: flex;
	flex-direction: column;
	flex: 1;
	align-items: stretch;
	width: 100%;
	padding-bottom: var(--wp--preset--spacing--30);
}

.docandtee-post-card > * {
	width: 100%;
	max-width: none;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.docandtee-post-card .wp-block-post-date {
	margin-block-start: auto !important;
	padding-top: var(--wp--preset--spacing--40);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-query.is-loading,
	.wp-block-query[aria-busy="true"] {
		transition: none;
	}
}

.staggered-block {
    .wp-block-buttons {
        margin-top: 2rem;
    }
}

.staggered-block--sticky .wp-block-media-text > .wp-block-media-text__content {
	padding-top: 50px;
}

/* Sticky variant: the text stays in view until the bottom of the image meets the bottom of the text. Media & Text stacks at 600px. */
@media (min-width: 601px) {
	.staggered-block--sticky .wp-block-media-text {
		align-items: start;
	}

	.staggered-block--sticky .wp-block-media-text > .wp-block-media-text__media {
		align-self: start;
		height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
		height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
	}

	.staggered-block--sticky .wp-block-media-text > .wp-block-media-text__content {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
		align-self: start;
		padding-bottom: 0;
		transition: top 0.8s ease;
	}

	/* Keep the text clear of the header while it is showing (it reappears on scroll up). The header sticks at top: 0, under the admin bar. */
	body:has(.wp-site-blocks > header:not(.is-header-hidden)) .staggered-block--sticky .wp-block-media-text > .wp-block-media-text__content {
		top: max(var(--wp-admin--admin-bar--height, 0px), var(--docandtee-header-height, 0px));
	}

	.staggered-block--sticky .wp-block-media-text__content > :first-child {
		margin-block-start: 0;
	}

	.staggered-block--sticky .wp-block-media-text__content > :last-child {
		margin-block-end: 0;
	}
}

/* Site logo: smaller on screens below 960px. */
@media (max-width: 959px) {
	.docandtee-header .wp-block-site-logo img {
		width: 120px;
	}
}

.wp-site-blocks > header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: var(--wp--preset--color--base);
	transition: transform 0.8s ease;
}

/* Only transform when hidden: a transform on the header would trap the fixed mobile menu overlay. */
.wp-site-blocks > header.is-header-hidden {
	transform: translateY(-100%);
}

@media (prefers-reduced-motion: reduce) {
	.wp-site-blocks > header,
	.staggered-block--sticky .wp-block-media-text > .wp-block-media-text__content {
		transition: none;
	}
}

html {
	scroll-padding-top: calc(var(--docandtee-header-height, 0px) + 1rem);
}