/*
Theme Name: Donne per la Grazia
Theme URI: https://donne.pergrazia.com/
Author: ArteTecha
Author URI: https://artetecha.com/
Description: A block theme for Donne per la Grazia, the women's journal of the Per Grazia family. Editorial typography, an arched-doorway motif and a warm palette, all editable in the Site Editor.
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.2
Text Domain: donne-per-la-grazia
Domain Path: /languages
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, block-patterns, block-styles, editor-style, full-site-editing, style-variations, translation-ready, wide-blocks
*/

/*
 * Only what theme.json cannot express belongs here.
 */

::selection {
	background: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--contrast);
}

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

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

.dplg-family-bar p {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	letter-spacing: 0.02em;
}

.dplg-family-bar a {
	color: inherit;
	text-underline-offset: 0.2em;
}

.dplg-brand .wp-block-site-title a {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
}

.dplg-brand .wp-block-site-title a::before {
	content: "";
	flex: none;
	width: 1.5rem;
	height: 1.875rem;
	background: url("assets/images/mark.svg") center / contain no-repeat;
}

.dplg-footer .dplg-brand .wp-block-site-title a::before {
	filter: brightness(0) invert(1);
	opacity: 0.85;
}

.dplg-brand .wp-block-site-tagline {
	margin: 0;
}

/* Hero -------------------------------------------------------------- */

.dplg-hero h1 em,
.dplg-hero h1 i {
	color: var(--wp--preset--color--accent);
	font-style: italic;
	font-weight: 360;
}

.dplg-hero__art img {
	width: 100%;
	max-width: 30rem;
	margin-inline: auto;
	border-radius: 0;
}

@media (max-width: 781px) {
	.dplg-hero .wp-block-columns {
		flex-direction: column-reverse;
	}

	.dplg-hero__art img {
		max-width: 16rem;
	}
}

/* Feed -------------------------------------------------------------- */

.dplg-feed .wp-block-post-template > li {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
}

.dplg-feed .wp-block-post-featured-image {
	margin: 0;
}

.dplg-feed .wp-block-post-title,
.dplg-feed .wp-block-post-excerpt,
.dplg-feed .wp-block-post-excerpt__excerpt {
	margin: 0;
}

/* First page of the blog: the newest article spans the grid. */
@media (min-width: 782px) {
	body.blog:not(.paged) .dplg-feed .wp-block-post-template > li:first-child {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		align-items: center;
		gap: var(--wp--preset--spacing--60);
		padding-bottom: var(--wp--preset--spacing--60);
		border-bottom: 1px solid var(--wp--preset--color--line);
	}

	body.blog:not(.paged) .dplg-feed .wp-block-post-template > li:first-child:not(:has(.wp-block-post-featured-image)) {
		grid-template-columns: minmax(0, 1fr);
		max-width: 46rem;
	}

	body.blog:not(.paged) .dplg-feed .wp-block-post-template > li:first-child .wp-block-post-featured-image {
		max-width: 28rem;
	}

	body.blog:not(.paged) .dplg-feed .wp-block-post-template > li:first-child .wp-block-post-title {
		font-size: var(--wp--preset--font-size--xx-large) !important;
		line-height: 1.08;
	}

	body.blog:not(.paged) .dplg-feed .wp-block-post-template > li:first-child .wp-block-post-excerpt {
		font-size: var(--wp--preset--font-size--large);
	}
}

/* Single ------------------------------------------------------------ */

.dplg-meta {
	align-items: center;
}

.dplg-meta > * {
	margin: 0;
}

.single .dplg-prose > p:first-child::first-letter {
	float: left;
	margin: 0.08em 0.12em 0 0;
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--display);
	font-size: 4.2em;
	font-weight: 400;
	line-height: 0.82;
}

.has-drop-cap:not(:focus)::first-letter {
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
}

.dplg-tags a {
	display: inline-block;
	margin: 0 0.25rem 0.4rem 0;
	padding: 0.25rem 0.75rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	letter-spacing: 0.06em;
}

.dplg-tags .wp-block-post-terms__separator {
	display: none;
}

.dplg-author .wp-block-post-author-name {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 450;
	text-transform: none;
}

.dplg-author .wp-block-post-author-biography {
	color: var(--wp--preset--color--contrast-2);
}

.dplg-post-nav > * {
	max-width: 48%;
}

.dplg-questions {
	padding-left: 1.25rem;
}

.dplg-questions li::marker {
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--display);
}

.dplg-questions li + li {
	margin-top: 0.6rem;
}

/* Forms ------------------------------------------------------------- */

.wp-block-search__input,
.wp-block-post-comments-form :where(input:not([type="submit"]):not([type="checkbox"]), textarea) {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	padding: 0.75rem 1rem;
}

.wp-block-search__inside-wrapper {
	gap: 0.5rem;
}

.wp-block-search__input {
	border-radius: 999px;
}

/* Motion and print -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}

@media print {
	.dplg-family-bar,
	header.wp-block-template-part,
	footer.wp-block-template-part,
	.dplg-post-nav,
	.dplg-comments,
	.wp-block-post-comments-form {
		display: none !important;
	}

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

	.dplg-prose a::after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
	}
}
