/*
Theme Name: Hauteur
Description: A block theme with a quietly superior attitude. Ivory, ink and brass, high-contrast serif display type, hairline details, and a carefully engineered navigation: refined dropdowns on large screens and a full-screen accordion overlay on mobile, keyboard and screen-reader friendly.
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.0.2
Author: Thomas Lloancy
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hauteur
Tags: blog, block-patterns, custom-colors, editor-style, featured-images, full-site-editing, one-column, translation-ready, wide-blocks
*/

/* ==========================================================================
   Base
   ========================================================================== */

html {
	scroll-behavior: smooth;
}

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

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

::selection {
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
}

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

.hauteur-eyebrow {
	font-family: var(--wp--preset--font-family--jost);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.32em;
	text-transform: uppercase;
}

.hauteur-hairline {
	border: 0;
	height: 1px;
	background: color-mix(in srgb, var(--wp--preset--color--gold) 55%, transparent);
}

/* ==========================================================================
   Header
   ========================================================================== */

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	background: var(--wp--preset--color--ivory);
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--gold) 40%, transparent);
}

.wp-block-group.hauteur-bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	grid-template-areas: "nav title .";
	align-items: center;
	padding-block: 0.9rem;
}

.wp-block-group.hauteur-bar > * {
	margin-block: 0;
}

.hauteur-bar > .hauteur-nav {
	grid-area: nav;
	justify-self: start;
}

.hauteur-bar > .wp-block-site-title {
	grid-area: title;
	text-align: center;
}

@media (min-width: 600px) {
	.wp-block-group.hauteur-bar {
		grid-template-columns: 1fr;
		grid-template-areas: "title" "nav";
		justify-items: center;
		row-gap: 1.1rem;
		padding-block: 1.75rem 1.1rem;
	}

	.hauteur-bar > .hauteur-nav {
		justify-self: center;
	}
}

/* ==========================================================================
   Hero & sections
   ========================================================================== */

.hauteur-hero > * {
	margin-left: 0 !important;
	margin-right: auto !important;
}

.hauteur-hero h1 {
	max-width: 11em;
}

.hauteur-hero > p {
	max-width: 38rem;
}

.hauteur-hero h1 em,
.hauteur-hero h1 i {
	font-style: italic;
	color: var(--wp--preset--color--gold);
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--gold);
	border-color: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
}

.hauteur-card {
	height: 100%;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--gold) 45%, transparent);
	transition: border-color 0.4s ease, transform 0.5s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.hauteur-card:hover {
	border-color: var(--wp--preset--color--brass);
	transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
	.hauteur-card {
		transition: none;
	}

	.hauteur-card:hover {
		transform: none;
	}
}

.hauteur-quote p {
	font-family: var(--wp--preset--font-family--cormorant);
	font-style: italic;
	font-weight: 400;
	line-height: 1.25;
}

/* ==========================================================================
   Posts
   ========================================================================== */

.hauteur-post-card .wp-block-post-featured-image img {
	transition: transform 0.9s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.hauteur-post-card:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

.hauteur-post-card .wp-block-post-featured-image {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.hauteur-post-card .wp-block-post-featured-image img {
		transition: none;
	}

	.hauteur-post-card:hover .wp-block-post-featured-image img {
		transform: none;
	}
}

.wp-block-post-title a {
	text-decoration: none;
}

.wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.wp-block-query-pagination {
	font-family: var(--wp--preset--font-family--jost);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

/* ==========================================================================
   Footer
   ========================================================================== */

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

.hauteur-footer .wp-block-site-title {
	text-transform: uppercase;
}

.hauteur-footer a:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

/* ==========================================================================
   Patterns
   ========================================================================== */

.hauteur-announcement {
	padding-block: 0.55rem;
}

.hauteur-announcement p {
	margin: 0;
	letter-spacing: 0.26em;
	text-transform: uppercase;
}

.hauteur-numeral {
	margin: 0;
	font-family: var(--wp--preset--font-family--cormorant);
	font-size: clamp(2.75rem, 2rem + 3vw, 4.25rem);
	font-style: italic;
	line-height: 1;
}

.hauteur-split-panel .hauteur-row {
	gap: 1.5rem;
	padding-block: 1.25rem;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--gold) 30%, transparent);
}

.hauteur-split-panel .hauteur-row:last-child {
	border-bottom: 0;
}

.hauteur-split-panel .hauteur-row p {
	margin: 0;
}

/* Questions: same language as the menu, a gold rule that fills when opened. */
.hauteur-faq .wp-block-details {
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--gold) 30%, transparent);
	background-image: linear-gradient(var(--wp--preset--color--gold), var(--wp--preset--color--gold));
	background-repeat: no-repeat;
	background-position: left bottom;
	background-origin: border-box;
	background-size: 2.25rem 1px;
	transition: background-size 0.6s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.hauteur-faq .wp-block-details[open] {
	background-size: 100% 1px;
}

.hauteur-faq .wp-block-details summary {
	padding-block: 1.1rem;
	font-family: var(--wp--preset--font-family--cormorant);
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.2;
	list-style: none;
	cursor: pointer;
	transition: color 0.4s ease;
}

.hauteur-faq .wp-block-details summary::-webkit-details-marker {
	display: none;
}

.hauteur-faq .wp-block-details[open] summary {
	color: var(--wp--preset--color--brass);
}

.hauteur-faq .wp-block-details > :not(summary) {
	padding-bottom: 1.25rem;
	margin-block: 0;
}

@media (prefers-reduced-motion: reduce) {
	.hauteur-faq .wp-block-details,
	.hauteur-faq .wp-block-details summary {
		transition: none;
	}
}
