/*
Theme Name: Whitewood
Description: Block theme for the Whitewood Ventures site. Every section of the home page is built from core blocks, so all of it can be edited in the block editor.
Version: 1.3.0
Requires at least: 6.6
Tested up to: 7.1
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: whitewood
*/

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

/* Keeps a section's top edge clear of the sticky header when the menu jumps to it. */
html {
	scroll-padding-top: 6rem;
}

:root:has(body.admin-bar) {
	scroll-padding-top: calc(6rem + 32px);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Header, main and footer sit flush; each section sets its own spacing. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

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

::selection {
	background: var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--white);
}

:is(h1, h2, h3) {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

.wp-block-list {
	padding-left: 1.15em;
}

.wp-block-list li + li {
	margin-top: 0.35em;
}

/* Lists get crimson bullets, as in the brand mockups. */
.wp-block-list li::marker {
	color: var(--wp--preset--color--crimson);
}

.wp-element-caption {
	margin-top: 0.85rem;
	margin-bottom: 0;
	text-align: left;
}

.wp-element-caption strong {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

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

header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--position-offset, 0px);
	z-index: 100;
}

.site-header .wp-block-site-logo img {
	display: block;
	height: auto;
}

.site-header .wp-block-navigation .wp-block-navigation-item__content {
	position: relative;
	padding-block: 0.4rem;
	color: var(--wp--preset--color--muted);
	transition: color 0.2s ease;
}

.site-header .wp-block-navigation .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 2px;
	background: var(--wp--preset--color--crimson);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.25s ease;
}

.site-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.site-header .wp-block-navigation .wp-block-navigation-item__content.is-current {
	color: var(--wp--preset--color--charcoal);
	text-decoration: none;
}

.site-header .wp-block-navigation .wp-block-navigation-item__content:hover::after,
.site-header .wp-block-navigation .wp-block-navigation-item__content.is-current::after {
	transform: scaleX(1);
}

.site-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.25rem var(--wp--style--root--padding-right, 1.5rem);
}

.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 3.5rem;
}

.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1.4rem;
}

.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1rem;
	color: var(--wp--preset--color--charcoal);
}

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

:is(h1, h2, h3, h4, h5, h6, p).is-style-eyebrow,
:is(h1, h2, h3, h4, h5, h6, p).is-style-eyebrow-rule {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.2em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--wp--preset--color--crimson);
}

:is(h1, h2, h3, h4, h5, h6, p).is-style-eyebrow-rule {
	margin-bottom: var(--wp--preset--spacing--40);
	padding-bottom: 1rem;
	border-bottom: 2px solid var(--wp--preset--color--charcoal);
}

:is(h1, h2, h3, h4, h5, h6).is-style-label {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--wp--preset--color--charcoal);
}

p.is-style-rule-above {
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--rule);
}

/* Outlined button with the LinkedIn mark, for dark backgrounds. */
.wp-block-button.is-style-linkedin .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	border: 1px solid rgb(255 255 255 / 0.3);
	background: transparent;
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-linkedin .wp-block-button__link::before {
	content: "";
	flex: none;
	width: 1.1em;
	height: 1.1em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 18 18'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.064 2.064 0 1 1 0-4.128 2.064 2.064 0 0 1 0 4.128zm1.782 13.019H3.555V9h3.564v11.452z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 18 18'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.064 2.064 0 1 1 0-4.128 2.064 2.064 0 0 1 0 4.128zm1.782 13.019H3.555V9h3.564v11.452z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wp-block-button.is-style-linkedin .wp-block-button__link:hover,
.wp-block-button.is-style-linkedin .wp-block-button__link:focus-visible {
	border-color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--charcoal);
}

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

.hero h1 {
	max-width: 17em;
	margin-inline: auto;
	font-weight: 400;
	text-shadow: 0 1px 28px rgb(0 0 0 / 0.35);
}

/* Property photos run three across, or one per row on a phone, never two and
   then one: a short second row reads as the end of the portfolio. */
@media (max-width: 599px) {
	.wp-block-group.property-grid {
		grid-template-columns: 1fr;
	}
}

.region-card p {
	margin-block: 0;
}

.region-card + .region-card {
	margin-top: 0.75rem;
}

.team-member .wp-block-heading + .is-style-eyebrow {
	margin-top: 0.6rem;
}

.team-member .wp-block-image img {
	width: 100%;
}

/* Bios keep a comfortable line length in the wide layout. */
.team-member > .wp-block-column:last-child > * {
	max-width: 44rem;
}

/* Stacked on a phone, each person reads photo, name, title, bio, then email,
   rather than the email landing between the photo and the name. */
@media (max-width: 781px) {
	.team-member {
		flex-direction: column;
		row-gap: 0;
	}

	.team-member > .wp-block-column {
		display: contents;
	}

	.team-member .wp-block-image {
		max-width: 18rem;
		margin-bottom: 1.75rem;
	}

	.team-member p.is-style-rule-above {
		order: 1;
		margin-top: 1.5rem;
	}
}

.contact-band p {
	margin-block: 0;
}

.contact-band .is-style-eyebrow + p {
	margin-top: 0.6rem;
}

.contact-band .is-style-eyebrow + p + p {
	margin-top: 0.35rem;
}

@media (max-width: 781px) {
	.contact-band .wp-block-buttons {
		justify-content: flex-start;
	}
}

.site-footer p {
	margin-block: 0;
}

.site-footer a {
	color: inherit;
}

/* Testimonials ----------------------------------------------------------------
   A Group with the "Slider" style. In the editor its quotes stay stacked; on
   the site, site.js turns them into slides once there are two or more. */

.is-style-slider .wp-block-quote {
	margin: 0;
	text-align: center;
}

.is-style-slider .wp-block-quote::before {
	content: "\201C";
	display: block;
	height: 2.4rem;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 4.5rem;
	line-height: 1;
	color: var(--wp--preset--color--crimson);
}

.is-style-slider .wp-block-quote p {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.5rem);
	font-weight: 400;
	line-height: 1.55;
	color: var(--wp--preset--color--ink);
}

.is-style-slider .wp-block-quote cite {
	display: block;
	margin-top: 1.75rem;
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
}

.is-style-slider .wp-block-quote cite strong {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--charcoal);
}

.is-style-slider .wp-block-quote cite a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--rule);
	text-underline-offset: 0.2em;
}

.wwv-slider__track {
	position: relative;
	display: flex;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.wwv-slider__track::-webkit-scrollbar {
	display: none;
}

.wwv-slider__track > * {
	display: flex;
	flex: 0 0 100%;
	flex-direction: column;
	justify-content: center;
	box-sizing: border-box;
	margin: 0 !important;
	padding-inline: 0.25rem;
	scroll-snap-align: center;
}

.wwv-slider__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	margin-top: 2.25rem;
}

.wwv-slider__arrow {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid #d4cec8;
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--charcoal);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wwv-slider__arrow:hover {
	border-color: var(--wp--preset--color--charcoal);
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--white);
}

.wwv-slider__dots {
	display: flex;
	gap: 0.25rem;
}

.wwv-slider__dot {
	display: grid;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.wwv-slider__dot::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: #cfc8c1;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.wwv-slider__dot[aria-current="true"]::before {
	background: var(--wp--preset--color--crimson);
	transform: scale(1.25);
}
