/*
Theme Name: Fementa
Theme URI: https://fementa.com/
Description: A calm, joyful, ADHD-friendly block theme for Fementa. Child theme of Twenty Twenty-Five. Soft neutrals, one sage and one apricot accent, big readable text, and ready-made patterns for product cards, curated collections, affiliate disclosures, and quick takes.
Author: Fementa
Template: twentytwentyfive
Version: 1.0.2
Requires at least: 6.7
Tested up to: 7.1
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: fementa
Tags: blog, one-column, custom-colors, custom-menu, editor-style, full-site-editing, block-patterns, block-styles, accessibility-ready
*/

/*
 * Most styling lives in theme.json so it stays editable in the Site Editor.
 * This file only holds the few things theme.json can't express.
 */

/* Wordmark: lowercase site title with a small apricot dot. */
.wp-block-site-title {
	text-transform: lowercase;
}
.wp-block-site-title a {
	text-decoration: none;
}
.wp-block-site-title a::after {
	content: ".";
	color: var(--wp--preset--color--accent-1);
}

/* Clear, consistent keyboard focus for everyone. */
:where(a, button, input, select, textarea, summary, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-1);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Links in text are always underlined, so they're easy to spot. */
:where(.wp-block-post-content, .entry-content) a:where(:not(.wp-element-button)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}
:where(.wp-block-post-content, .entry-content) a:where(:not(.wp-element-button)):hover {
	text-decoration-thickness: 2px;
}

/* Jump links land with a little breathing room above the heading. */
:where(h2, h3, h4)[id] {
	scroll-margin-top: 1.5rem;
}

/* Gentle motion only for people who haven't asked for less. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
	.wp-element-button,
	.wp-block-button__link,
	.wp-block-post-title a {
		transition: background-color 0.15s ease, color 0.15s ease;
	}
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Cards: keep the button at the bottom so a row of cards lines up. */
.is-style-fementa-card {
	height: 100%;
}
.is-style-fementa-card > .wp-block-buttons:last-child {
	margin-top: auto;
}
.is-style-fementa-card .wp-block-image img {
	width: 100%;
}

/* Full-width buttons inside cards are easier to tap on phones. */
.is-style-fementa-card .wp-block-button {
	width: 100%;
}
.is-style-fementa-card .wp-block-button__link {
	width: 100%;
}

/* Small external-link arrow on affiliate and shop buttons. */
.wp-block-button.is-style-amazon .wp-block-button__link::after,
.wp-block-button.is-style-etsy .wp-block-button__link::after {
	content: " \2197";
}

/* Etsy buttons stay apricot on hover, just a touch deeper. */
.wp-block-button.is-style-etsy .wp-block-button__link:is(:hover, :focus) {
	background-color: #E8944A;
	color: var(--wp--preset--color--contrast);
}

/* Post titles in lists: no underline until hovered. */
.wp-block-post-title a {
	text-decoration: none;
}
.wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.15em;
}

/* Images in post cards and featured images get soft corners. */
.wp-block-post-featured-image img,
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder {
	border-radius: 14px;
}

/* Mobile menu: roomy, readable, left-aligned links. */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem clamp(1.25rem, 5vw, 3rem);
	--navigation-layout-justification-setting: flex-start;
	--navigation-layout-justify: flex-start;
}
.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open :is(.wp-block-navigation__responsive-container-content, .wp-block-navigation__container, .wp-block-navigation-item) {
	align-items: flex-start;
	--navigation-layout-justification-setting: flex-start;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: var(--wp--preset--font-size--large);
}

/* A single product card dropped into a post stays a comfortable size. */
.wp-block-post-content > .is-style-fementa-card {
	max-width: 24rem;
}

/* No category label (e.g. only "Uncategorized") = no empty gap. */
.wp-block-post-terms:empty {
	display: none;
}
