/*
Theme Name: Cantabile
Theme URI: https://pianocantabileformation.org/
Author: Piano Cantabile
Description: Theme for the Piano Cantabile website. It replaces the Veni theme: it takes over its logo, menus, widgets, home page tiles and footer text, works with PHP 8 and current WordPress versions, and is designed to be fully usable with a keyboard and a screen reader.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cantabile
Tags: blog, portfolio, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, footer-widgets, translation-ready, accessibility-ready, post-formats, editor-style, wide-blocks

Cantabile is distributed under the terms of the GNU GPL v2 or later.
It takes over the settings of Veni by Themes Kingdom (GPL v2 or later).
Fonts: Playfair Display and Source Sans 3, SIL Open Font License 1.1.
Icons: Lucide (ISC License) and Simple Icons (CC0 1.0).
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
	--c-bg: #fbf9f6;
	--c-surface: #ffffff;
	--c-sand: #f3eee6;
	--c-ink: #1d1b18;
	--c-muted: #5b564e;
	--c-line: #e5ded3;
	--c-accent: #8b5e2a;
	--c-accent-dark: #6c4921;
	--c-accent-soft: #f3ebe0;
	--c-dark: #151412;
	--c-on-dark: #f4efe7;
	--c-on-dark-muted: #c9c1b4;
	--c-gold-light: #f0d6ad;

	--f-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--f-sans: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--w-content: 46rem;
	--w-wide: 75rem;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--radius: 16px;
	--radius-sm: 10px;
	--header-h: 4.75rem;
	--shadow-sm: 0 1px 2px rgba(29, 27, 24, 0.06), 0 2px 8px rgba(29, 27, 24, 0.04);
	--shadow: 0 2px 4px rgba(29, 27, 24, 0.05), 0 12px 32px rgba(29, 27, 24, 0.08);
	--shadow-lg: 0 4px 8px rgba(29, 27, 24, 0.06), 0 24px 48px rgba(29, 27, 24, 0.12);
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

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

body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-ink);
	font-family: var(--f-sans);
	font-size: 1.125rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

body.menu-open {
	overflow: hidden;
}

@media (min-width: 64em) {
	body.menu-open {
		overflow: visible;
	}
}

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

img {
	border-style: none;
}

iframe {
	max-width: 100%;
	border: 0;
}

figure {
	margin: 0;
}

a {
	color: var(--c-accent-dark);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

a:hover {
	color: var(--c-ink);
	text-decoration-thickness: 2px;
}

:focus {
	outline: none;
}

:focus-visible {
	outline: 3px solid var(--c-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	color: var(--c-ink);
	font-family: var(--f-serif);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2.2rem, 1.7rem + 2.2vw, 3.6rem);
}

h2 {
	font-size: clamp(1.8rem, 1.45rem + 1.4vw, 2.5rem);
}

h3 {
	font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.7rem);
}

h4 {
	font-size: 1.3rem;
}

h5 {
	font-size: 1.15rem;
}

h6 {
	font-family: var(--f-sans);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

p {
	margin: 0 0 1.25em;
}

ul,
ol {
	margin: 0 0 1.25em;
	padding-left: 1.4em;
}

hr {
	height: 1px;
	margin: 3rem auto;
	border: 0;
	background: var(--c-line);
}

::selection {
	background: var(--c-gold-light);
	color: var(--c-ink);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	top: 1rem;
	left: 1rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.85rem 1.4rem;
	clip: auto !important;
	clip-path: none;
	border-radius: var(--radius-sm);
	background: var(--c-ink);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
	box-shadow: var(--shadow-lg);
}

.skip-link:focus {
	position: fixed !important;
}

.container {
	width: min(100% - 2 * var(--gutter), var(--w-wide));
	margin-inline: auto;
}

.icon {
	display: inline-block;
	flex-shrink: 0;
	vertical-align: middle;
}

/* ==========================================================================
   3. Buttons and forms
   ========================================================================== */

.button,
button.button,
input[type="submit"],
input[type="button"],
.wp-block-button__link,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 3rem;
	padding: 0.8rem 1.6rem;
	border: 2px solid var(--c-accent);
	border-radius: 999px;
	background: var(--c-accent);
	color: #fff;
	font-family: var(--f-sans);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.wp-block-button__link:hover,
.wp-element-button:hover {
	border-color: var(--c-accent-dark);
	background: var(--c-accent-dark);
	color: #fff;
	text-decoration: none;
}

.button:active {
	transform: translateY(1px);
}

.button--outline {
	border-color: var(--c-ink);
	background: transparent;
	color: var(--c-ink);
}

.button--outline:hover {
	border-color: var(--c-ink);
	background: var(--c-ink);
	color: #fff;
}

.button--ghost {
	border-color: rgba(255, 255, 255, 0.75);
	background: transparent;
	color: #fff;
}

.button--ghost:hover {
	border-color: #fff;
	background: #fff;
	color: var(--c-ink);
}

.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--c-accent-dark);
}

label {
	display: inline-block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
	width: 100%;
	min-height: 3rem;
	padding: 0.7rem 1rem;
	border: 1px solid #bfb5a6;
	border-radius: var(--radius-sm);
	background: var(--c-surface);
	color: var(--c-ink);
	font: inherit;
	font-size: 1.05rem;
	transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	border-color: var(--c-accent);
	outline: 3px solid var(--c-accent);
	outline-offset: 1px;
}

textarea {
	min-height: 9rem;
	resize: vertical;
}

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 40rem;
}

.search-form .search-field {
	flex: 1;
	border-radius: 999px;
	padding-inline: 1.25rem;
}

.search-submit {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 3rem;
	padding: 0.7rem 1.3rem;
	border: 0;
	border-radius: 999px;
	background: var(--c-ink);
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s var(--ease);
}

.search-submit:hover {
	background: var(--c-accent-dark);
}

@media (max-width: 30em) {
	.search-submit span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(1px, 1px, 1px, 1px);
	}
}

/* ==========================================================================
   4. Header and navigation
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid transparent;
	background: rgba(251, 249, 246, 0.94);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	backdrop-filter: saturate(1.4) blur(12px);
	transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

.site-header.is-scrolled {
	border-bottom-color: var(--c-line);
	box-shadow: 0 8px 24px rgba(29, 27, 24, 0.06);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: var(--header-h);
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	min-width: 0;
	margin-right: auto;
	padding-block: 0.6rem;
}

.custom-logo-link {
	display: block;
	flex-shrink: 0;
}

.custom-logo {
	display: block;
	width: auto;
	max-height: 3.4rem;
}

.site-title {
	margin: 0;
	font-family: var(--f-serif);
	font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: 0.005em;
}

.site-title a {
	color: var(--c-ink);
	text-decoration: none;
}

.site-description {
	margin: 0.2rem 0 0;
	color: var(--c-muted);
	font-size: 0.85rem;
	line-height: 1.3;
}

@media (max-width: 40em) {
	.site-description {
		display: none;
	}
}

.primary-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-nav a {
	display: block;
	color: var(--c-ink);
	font-weight: 600;
	text-decoration: none;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-ancestor > a {
	color: var(--c-accent-dark);
}

.submenu-toggle,
.menu-toggle,
.search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.4rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--c-ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.submenu-toggle:hover,
.menu-toggle:hover,
.search-toggle:hover {
	background: var(--c-accent-soft);
	color: var(--c-accent-dark);
}

.submenu-toggle .icon {
	transition: transform 0.25s var(--ease);
}

.submenu-toggle[aria-expanded="true"] .icon {
	transform: rotate(180deg);
}

.menu-toggle {
	padding-inline: 0.9rem;
	border: 1px solid var(--c-line);
}

.menu-toggle .icon-x,
.menu-toggle[aria-expanded="true"] .icon-menu {
	display: none;
}

.menu-toggle[aria-expanded="true"] .icon-x {
	display: inline-block;
}

/* Small screens: the menu opens in a panel under the header. */
@media (max-width: 63.99em) {
	.js .primary-nav__panel {
		display: none;
	}

	.js .primary-nav.is-open .primary-nav__panel {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		display: block;
		max-height: calc(100vh - var(--header-h));
		max-height: calc(100dvh - var(--header-h));
		overflow-y: auto;
		padding: 0.75rem var(--gutter) 2rem;
		border-bottom: 1px solid var(--c-line);
		background: var(--c-bg);
		box-shadow: var(--shadow);
	}

	html:not(.js) .site-header__inner {
		flex-wrap: wrap;
	}

	html:not(.js) .primary-nav {
		order: 3;
		width: 100%;
	}

	html:not(.js) .menu-toggle {
		display: none;
	}

	.primary-nav .menu > li {
		border-bottom: 1px solid var(--c-line);
	}

	.primary-nav li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.primary-nav li > a {
		flex: 1;
		padding: 0.85rem 0.25rem;
		font-size: 1.15rem;
	}

	.primary-nav .sub-menu {
		display: none;
		width: 100%;
		padding: 0 0 0.6rem 1rem;
	}

	.primary-nav .sub-menu a {
		padding-block: 0.55rem;
		font-size: 1.05rem;
		font-weight: 500;
	}

	.primary-nav li.is-open > .sub-menu,
	html:not(.js) .primary-nav .sub-menu {
		display: block;
	}
}

/* Large screens: horizontal menu with drop-down submenus. */
@media (min-width: 64em) {
	.menu-toggle {
		display: none;
	}

	.primary-nav .menu {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-end;
		gap: 0.1rem;
	}

	.primary-nav li {
		position: relative;
		display: flex;
		align-items: center;
	}

	.primary-nav .menu > li > a {
		position: relative;
		padding: 0.55rem 0.7rem;
		font-size: 1rem;
	}

	.primary-nav .menu > li > a::after {
		position: absolute;
		right: 0.7rem;
		bottom: 0.25rem;
		left: 0.7rem;
		height: 2px;
		border-radius: 2px;
		background: var(--c-accent);
		content: "";
		transform: scaleX(0);
		transform-origin: left;
		transition: transform 0.25s var(--ease);
	}

	.primary-nav .menu > li > a:hover::after,
	.primary-nav .menu > .current-menu-item > a::after,
	.primary-nav .menu > .current_page_item > a::after,
	.primary-nav .menu > .current-menu-ancestor > a::after {
		transform: scaleX(1);
	}

	.primary-nav .menu > .menu-item-has-children > a {
		padding-right: 0.2rem;
	}

	.primary-nav .menu > .menu-item-has-children > a::after {
		right: 0.2rem;
	}

	.primary-nav .menu > li > .submenu-toggle {
		min-width: 2rem;
		padding: 0.25rem;
	}

	.primary-nav .sub-menu {
		position: absolute;
		top: calc(100% + 0.4rem);
		left: 0;
		z-index: 20;
		display: none;
		min-width: 15rem;
		padding: 0.5rem;
		border: 1px solid var(--c-line);
		border-radius: var(--radius-sm);
		background: var(--c-surface);
		box-shadow: var(--shadow-lg);
	}

	.primary-nav .sub-menu::before {
		position: absolute;
		top: -0.5rem;
		right: 0;
		left: 0;
		height: 0.5rem;
		content: "";
	}

	.primary-nav .sub-menu .sub-menu {
		top: -0.5rem;
		left: 100%;
	}

	.primary-nav li:hover > .sub-menu,
	.primary-nav li.is-open > .sub-menu,
	html:not(.js) .primary-nav li:focus-within > .sub-menu {
		display: block;
	}

	.primary-nav .sub-menu li {
		justify-content: space-between;
	}

	.primary-nav .sub-menu a {
		flex: 1;
		padding: 0.55rem 0.8rem;
		border-radius: 8px;
		font-size: 0.98rem;
		font-weight: 500;
	}

	.primary-nav .sub-menu a:hover {
		background: var(--c-accent-soft);
	}

	.primary-nav .sub-menu .submenu-toggle .icon {
		transform: rotate(-90deg);
	}
}

html:not(.js) .search-toggle {
	display: none;
}

.header-search {
	padding: 1.25rem 0 1.5rem;
	border-top: 1px solid var(--c-line);
}

.header-search:not(.is-open) {
	display: none;
}

.header-search .search-form {
	max-width: none;
}

/* ==========================================================================
   5. Decorative keyboard strip
   ========================================================================== */

.keys {
	height: 26px;
	background-color: #f7f4ef;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='168' height='52' viewBox='0 0 168 52'%3E%3Cpath d='M24 0v52M48 0v52M72 0v52M96 0v52M120 0v52M144 0v52M168 0v52' stroke='%23151412' stroke-width='1.2'/%3E%3Cg fill='%23151412'%3E%3Crect x='16' width='15' height='31' rx='2'/%3E%3Crect x='40' width='15' height='31' rx='2'/%3E%3Crect x='88' width='15' height='31' rx='2'/%3E%3Crect x='112' width='15' height='31' rx='2'/%3E%3Crect x='136' width='15' height='31' rx='2'/%3E%3C/g%3E%3C/svg%3E");
	background-repeat: repeat-x;
	background-size: auto 100%;
	box-shadow: inset 0 3px 0 var(--c-dark);
}

/* ==========================================================================
   6. Home page: hero, tiles and sections
   ========================================================================== */

.hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: radial-gradient(120% 120% at 85% 10%, #3a2c1d 0%, var(--c-dark) 55%);
	color: #fff;
}

.hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 35%;
}

.hero.has-image::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(14, 13, 12, 0.86) 0%, rgba(14, 13, 12, 0.62) 45%, rgba(14, 13, 12, 0.22) 100%),
		linear-gradient(0deg, rgba(14, 13, 12, 0.55) 0%, rgba(14, 13, 12, 0) 40%);
	content: "";
}

.hero__inner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: clamp(28rem, 72vh, 46rem);
	padding-block: clamp(4.5rem, 10vw, 8rem) clamp(4rem, 8vw, 6.5rem);
}

.hero__title {
	max-width: 15ch;
	margin-bottom: 0.3em;
	color: #fff;
	font-size: clamp(2.6rem, 1.7rem + 4vw, 5.2rem);
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: -0.01em;
}

.hero__text {
	max-width: 34rem;
	margin-bottom: 2.25rem;
	color: rgba(255, 255, 255, 0.92);
	font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
	line-height: 1.55;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin: 0;
}

.hero .keys {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
}

.section {
	padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section--news {
	background: var(--c-surface);
	border-top: 1px solid var(--c-line);
}

.section__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__title {
	margin: 0;
}

.section__title::after {
	display: block;
	width: 3.5rem;
	height: 3px;
	margin-top: 0.85rem;
	border-radius: 3px;
	background: var(--c-accent);
	content: "";
}

.tiles,
.cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1.25rem, 2.5vw, 2rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 40em) {
	.tiles,
	.cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64em) {
	.tiles,
	.cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.tiles > li,
.cards > li {
	display: flex;
}

.tile {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: flex-end;
	width: 100%;
	min-height: clamp(20rem, 32vw, 26rem);
	overflow: hidden;
	border-radius: var(--radius);
	background: radial-gradient(120% 120% at 80% 0%, #4a3826 0%, var(--c-dark) 60%);
	color: #fff;
	box-shadow: var(--shadow);
	transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.tile__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.tile__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s var(--ease);
}

.tile::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(14, 13, 12, 0) 12%, rgba(14, 13, 12, 0.62) 48%, rgba(14, 13, 12, 0.95) 100%);
	content: "";
}

.tile__body {
	padding: clamp(1.4rem, 2.5vw, 1.9rem);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.tile__title {
	margin: 0 0 0.4rem;
	color: #fff;
	font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
}

.tile__link {
	color: inherit;
	text-decoration: none;
}

.tile__link::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	content: "";
}

.tile__link:hover {
	color: #fff;
}

.tile__excerpt {
	margin: 0 0 1rem;
	color: rgba(255, 255, 255, 0.9);
	font-size: 1.02rem;
	line-height: 1.5;
}

.tile__more,
.card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tile__more {
	color: var(--c-gold-light);
}

.tile__more .icon,
.card__more .icon {
	transition: transform 0.25s var(--ease);
}

.tile:hover,
.card:hover {
	box-shadow: var(--shadow-lg);
	transform: translateY(-4px);
}

.tile:hover .tile__media img,
.card:hover .card__media img {
	transform: scale(1.045);
}

.tile:hover .tile__more .icon,
.card:hover .card__more .icon {
	transform: translateX(4px);
}

.tile:focus-within,
.card:focus-within {
	outline: 3px solid var(--c-accent);
	outline-offset: 4px;
}

.tile__link:focus-visible,
.card__link:focus-visible {
	outline: none;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--c-surface);
	box-shadow: var(--shadow-sm);
	transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.section--news .card,
.related .card {
	background: var(--c-bg);
}

.card__media {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--c-sand);
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s var(--ease);
}

.card--no-image::before {
	display: block;
	height: 6px;
	background: linear-gradient(90deg, var(--c-accent), var(--c-gold-light));
	content: "";
}

.card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.55rem;
	padding: 1.4rem 1.5rem 1.6rem;
}

.card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0.9rem;
	margin: 0;
	color: var(--c-muted);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.card__format {
	color: var(--c-accent-dark);
}

.card__title {
	margin: 0;
	font-size: clamp(1.3rem, 1.15rem + 0.45vw, 1.5rem);
	line-height: 1.25;
}

.card__link {
	color: var(--c-ink);
	text-decoration: none;
}

.card__link::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	content: "";
}

.card__link:hover {
	color: var(--c-accent-dark);
}

.card__excerpt {
	margin: 0;
	color: var(--c-muted);
	font-size: 1.02rem;
	line-height: 1.6;
}

.card__more {
	margin-top: auto;
	padding-top: 0.6rem;
	color: var(--c-accent-dark);
}

/* Pagination and "load more". */
.load-more {
	display: flex;
	justify-content: center;
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.load-more .is-loading {
	opacity: 0.6;
	cursor: progress;
}

.pagination {
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.pagination .nav-links,
.pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.9rem;
	min-height: 2.9rem;
	padding: 0 0.8rem;
	border: 1px solid var(--c-line);
	border-radius: 999px;
	background: var(--c-surface);
	color: var(--c-ink);
	font-weight: 700;
	text-decoration: none;
}

.pagination a.page-numbers:hover {
	border-color: var(--c-ink);
}

.pagination .page-numbers.current {
	border-color: var(--c-ink);
	background: var(--c-ink);
	color: #fff;
}

.pagination .page-numbers.dots {
	border: 0;
	background: none;
}

.pagination .prev .icon {
	transform: rotate(180deg);
}

/* ==========================================================================
   7. Pages and posts
   ========================================================================== */

.page-hero {
	padding-block: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 3vw, 2.25rem);
	background: linear-gradient(180deg, var(--c-sand) 0%, var(--c-bg) 100%);
}

.page-hero .container {
	max-width: var(--w-wide);
}

.page-title {
	max-width: 24ch;
	margin: 0;
}

.page-hero--post .page-title {
	max-width: 30ch;
	font-size: clamp(2rem, 1.6rem + 1.8vw, 3.1rem);
}

.page-kicker {
	margin: 0 0 0.85rem;
	color: var(--c-accent-dark);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.page-kicker a {
	color: inherit;
	text-decoration: none;
}

.page-kicker a:hover {
	text-decoration: underline;
}

.page-hero__text {
	max-width: 40rem;
	margin: 1rem 0 0;
	color: var(--c-muted);
	font-size: 1.2rem;
}

.page-hero__search {
	margin-top: 1.75rem;
}

.page-hero .button {
	margin-top: 1.5rem;
}

.entry-meta {
	margin: 1rem 0 0;
	color: var(--c-muted);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.entry-media-wrap:empty {
	display: none;
}

.entry-featured,
.entry-media {
	margin-top: clamp(0.5rem, 2vw, 1rem);
}

.entry-featured img {
	display: block;
	width: 100%;
	max-height: 38rem;
	border-radius: var(--radius);
	object-fit: cover;
	box-shadow: var(--shadow);
}

.entry-featured.is-portrait {
	max-width: 30rem;
	margin-inline: auto;
}

.entry-featured.is-portrait img {
	max-height: none;
}

.entry-featured figcaption {
	margin-top: 0.75rem;
	color: var(--c-muted);
	font-size: 0.95rem;
	text-align: center;
}

.layout {
	padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3.5rem, 7vw, 5.5rem);
}

.layout__main {
	min-width: 0;
}

.no-sidebar .layout__main {
	max-width: var(--w-content);
	margin-inline: auto;
}

@media (min-width: 64em) {
	.has-sidebar .layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 20rem;
		gap: clamp(3rem, 5vw, 5rem);
		align-items: start;
	}
}

/* Content typography. */
.entry-content {
	font-size: 1.15rem;
}

.entry-content::after {
	display: table;
	clear: both;
	content: "";
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 1.8em;
}

.entry-content li {
	margin-bottom: 0.35em;
}

.entry-content li::marker {
	color: var(--c-accent);
}

.entry-content blockquote,
.post-quote blockquote {
	margin: 2.25rem 0;
	padding: 0.25rem 0 0.25rem 1.5rem;
	border-left: 3px solid var(--c-accent);
	color: var(--c-ink);
	font-family: var(--f-serif);
	font-size: 1.4rem;
	font-style: italic;
	line-height: 1.45;
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content cite,
.post-quote figcaption {
	display: block;
	margin-top: 0.75rem;
	color: var(--c-muted);
	font-family: var(--f-sans);
	font-size: 1rem;
	font-style: normal;
	font-weight: 600;
}

.entry-content img {
	border-radius: var(--radius-sm);
}

.entry-content .wp-caption,
.entry-content figure {
	max-width: 100%;
	margin-block: 2rem;
}

.entry-content .wp-caption-text,
.entry-content figcaption {
	margin-top: 0.6rem;
	color: var(--c-muted);
	font-size: 0.95rem;
	text-align: center;
}

.alignleft {
	float: left;
	margin: 0.4rem 2rem 1.25rem 0;
}

.alignright {
	float: right;
	margin: 0.4rem 0 1.25rem 2rem;
}

.aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

@media (max-width: 40em) {
	.alignleft,
	.alignright {
		float: none;
		margin: 1.5rem auto;
	}
}

.entry-content .alignwide {
	width: min(100vw - 2 * var(--gutter), var(--w-wide));
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

.entry-content .alignfull {
	width: 100vw;
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

.has-sidebar .entry-content .alignwide,
.has-sidebar .entry-content .alignfull {
	width: 100%;
	margin-left: 0;
	transform: none;
}

.entry-content table {
	width: 100%;
	margin: 2rem 0;
	border-collapse: collapse;
	font-size: 1rem;
}

.entry-content th,
.entry-content td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--c-line);
	text-align: left;
	vertical-align: top;
}

.entry-content thead th {
	border-bottom: 2px solid var(--c-ink);
	background: var(--c-sand);
}

.entry-content pre,
.entry-content code {
	border-radius: 6px;
	background: var(--c-sand);
	font-size: 0.95em;
}

.entry-content code {
	padding: 0.1em 0.35em;
}

.entry-content pre {
	overflow-x: auto;
	padding: 1.25rem;
}

.entry-content .gallery,
.post-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
	gap: 0.75rem;
	margin: 2rem 0;
	padding: 0;
	list-style: none;
}

.entry-content .gallery-item {
	margin: 0;
}

.entry-content .gallery-item img,
.post-gallery img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	border-radius: var(--radius-sm);
	object-fit: cover;
}

.post-gallery a {
	display: block;
}

.video-embed {
	position: relative;
	margin: 2rem 0;
	overflow: hidden;
	border-radius: var(--radius-sm);
	background: #000;
	aspect-ratio: 16 / 9;
}

.video-embed iframe,
.video-embed video,
.video-embed object,
.video-embed embed {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.entry-content iframe[src*="youtube"],
.entry-content iframe[src*="vimeo"] {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.post-link {
	padding: 2rem;
	border-radius: var(--radius);
	background: var(--c-sand);
}

.post-link__text {
	font-family: var(--f-serif);
	font-size: 1.3rem;
}

.page-links {
	clear: both;
	margin: 2rem 0;
	font-weight: 700;
}

.entry-footer {
	margin-top: 3rem;
}

.entry-footer:empty {
	display: none;
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.tag-list a {
	display: inline-block;
	padding: 0.35rem 0.9rem;
	border-radius: 999px;
	background: var(--c-accent-soft);
	color: var(--c-accent-dark);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
}

.tag-list a:hover {
	background: var(--c-accent);
	color: #fff;
}

.edit-link {
	margin: 1.5rem 0 0;
	font-size: 0.95rem;
}

.share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	padding-block: 1.5rem;
	border-block: 1px solid var(--c-line);
}

.share__title {
	margin: 0;
	font-family: var(--f-sans);
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.share__list a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 2.75rem;
	padding: 0.4rem 1rem;
	border: 1px solid var(--c-line);
	border-radius: 999px;
	background: var(--c-surface);
	color: var(--c-ink);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
}

.share__list a:hover {
	border-color: var(--c-ink);
	background: var(--c-ink);
	color: #fff;
}

.author-box {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	margin-top: 2rem;
	padding: 1.5rem;
	border-radius: var(--radius);
	background: var(--c-sand);
}

.author-box img {
	border-radius: 50%;
}

.author-box__name {
	margin: 0 0 0.35rem;
	font-family: var(--f-serif);
	font-size: 1.3rem;
	font-weight: 500;
}

.author-box__bio {
	margin: 0;
	color: var(--c-muted);
}

.post-navigation {
	margin-top: 3rem;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 40em) {
	.post-navigation .nav-links {
		grid-template-columns: 1fr 1fr;
	}

	.post-navigation .nav-next {
		grid-column: 2;
		text-align: right;
	}
}

.post-navigation a {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	height: 100%;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--c-surface);
	color: var(--c-ink);
	text-decoration: none;
	transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.post-navigation a:hover {
	border-color: var(--c-accent);
	box-shadow: var(--shadow);
}

.post-nav__label {
	color: var(--c-muted);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.post-nav__title {
	font-family: var(--f-serif);
	font-size: 1.2rem;
	font-weight: 500;
	line-height: 1.2;
}

.related {
	padding-block: clamp(3.5rem, 7vw, 5.5rem);
	border-top: 1px solid var(--c-line);
	background: var(--c-surface);
}

.related .section__title {
	margin-bottom: 2.5rem;
}

/* Gallery template and categories. */
.filter ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 2.5rem;
	padding: 0;
	list-style: none;
}

.filter a {
	display: inline-block;
	padding: 0.5rem 1.1rem;
	border: 1px solid var(--c-line);
	border-radius: 999px;
	background: var(--c-surface);
	color: var(--c-ink);
	font-weight: 600;
	text-decoration: none;
}

.filter a:hover,
.filter a[aria-current="page"] {
	border-color: var(--c-ink);
	background: var(--c-ink);
	color: #fff;
}

.tiles--gallery .tile {
	min-height: 18rem;
}

.no-results {
	max-width: 40rem;
	margin-inline: auto;
	text-align: center;
}

.no-results .search-form {
	margin: 1.5rem auto 0;
}

/* Comments. */
.comments-area {
	margin-top: 4rem;
	padding-top: 3rem;
	border-top: 1px solid var(--c-line);
}

.comment-list {
	margin: 0 0 3rem;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin: 0;
	padding-left: clamp(1rem, 4vw, 3rem);
	list-style: none;
}

.comment-body {
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--c-surface);
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	margin-bottom: 1rem;
	font-size: 0.95rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-author .says {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

.comment-metadata a {
	color: var(--c-muted);
}

.reply a {
	font-weight: 700;
}

.comment-form p {
	margin-bottom: 1.25rem;
}

.comment-form label {
	display: block;
}

.comment-form-cookies-consent label {
	display: inline;
	font-weight: 400;
}

/* ==========================================================================
   8. Widgets and sidebar
   ========================================================================== */

.sidebar .widget {
	margin-bottom: 2.5rem;
	padding: 1.75rem;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--c-surface);
}

.widget-title {
	margin-bottom: 1rem;
	font-size: 1.35rem;
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget li {
	padding-block: 0.5rem;
	border-bottom: 1px solid var(--c-line);
}

.widget li:last-child {
	border-bottom: 0;
}

.social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget .social-links li {
	padding: 0;
	border: 0;
}

.social-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.9rem;
	height: 2.9rem;
	border: 1px solid var(--c-line);
	border-radius: 50%;
	color: var(--c-ink);
	transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.social-links a:hover {
	border-color: var(--c-accent);
	background: var(--c-accent);
	color: #fff;
}

.latest-posts li {
	display: flex;
	gap: 0.9rem;
	align-items: center;
}

.latest-posts__img {
	width: 4.5rem;
	height: 4.5rem;
	border-radius: var(--radius-sm);
	object-fit: cover;
}

.latest-posts span {
	display: flex;
	flex-direction: column;
}

.latest-posts a {
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.latest-posts time {
	font-size: 0.85rem;
	opacity: 0.8;
}

.facebook-page {
	width: 100%;
	max-width: 340px;
	height: 500px;
	border-radius: var(--radius-sm);
}

.profile-link {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 600;
}

.newsletter-form {
	display: grid;
	gap: 0.6rem;
}

/* ==========================================================================
   9. Footer
   ========================================================================== */

.site-footer {
	background: var(--c-dark);
	color: var(--c-on-dark-muted);
	font-size: 1rem;
}

.site-footer a {
	color: var(--c-gold-light);
}

.site-footer a:hover {
	color: #fff;
}

.site-footer :focus-visible {
	outline-color: var(--c-gold-light);
}

.keys--footer {
	transform: scaleY(-1);
}

.footer-main {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	padding-block: clamp(3.5rem, 7vw, 5rem) 3rem;
}

@media (min-width: 40em) {
	.footer-main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64em) {
	.footer-main {
		grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
	}
}

.footer-brand__name {
	margin: 0 0 0.5rem;
	color: #fff;
	font-family: var(--f-serif);
	font-size: 1.75rem;
	font-weight: 500;
	line-height: 1.15;
}

.footer-brand__text {
	max-width: 22rem;
	margin-bottom: 1.5rem;
}

.site-footer .widget-title {
	color: #fff;
	font-size: 1.3rem;
}

.site-footer .widget li {
	border-bottom-color: rgba(255, 255, 255, 0.12);
}

.site-footer .social-links a {
	border-color: rgba(255, 255, 255, 0.25);
	color: #fff;
}

.site-footer .social-links a:hover {
	border-color: var(--c-gold-light);
	background: var(--c-gold-light);
	color: var(--c-dark);
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding-block: 1.5rem 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.95rem;
}

.site-info {
	margin: 0;
}

.back-to-top {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-weight: 600;
	text-decoration: none;
}

/* ==========================================================================
   10. Accessibility preferences and print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

	.tile:hover,
	.card:hover,
	.tile:hover .tile__media img,
	.card:hover .card__media img {
		transform: none;
	}
}

@media (forced-colors: active) {
	.tile,
	.card,
	.button,
	.share__list a,
	.pagination .page-numbers {
		border: 1px solid CanvasText;
	}

	.tile::before,
	.hero.has-image::before {
		background: none;
	}
}

@media print {
	.site-header,
	.site-footer,
	.share,
	.related,
	.load-more,
	.pagination,
	.post-navigation,
	.keys {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}

	.page-hero {
		background: none;
	}
}
