/*
Theme Name: Kantan
Theme URI: https://plugins.joeljenkins.me/kantan-theme/
Author: Joel Jenkins
Author URI: https://joeljenkins.me
Description: A lightning-fast FSE block theme built for SEO and conversions. Clean semantic HTML, design-token architecture, and tight integration with Kantan Analytics and Kantan SEO.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kantan
Tags: full-site-editing, block-patterns, custom-colors, custom-fonts, wide-blocks, editor-style
*/

/* Fix WP utility class specificity: .has-text-color clobbers specific color classes on buttons */
.wp-block-button__link.has-text-color.has-base-color {
	color: var(--wp--preset--color--base) !important;
}
.wp-block-button__link.has-text-color.has-primary-color {
	color: var(--wp--preset--color--primary) !important;
}
.wp-block-button__link.has-text-color.has-secondary-color {
	color: var(--wp--preset--color--secondary) !important;
}

/*
 * Full-bleed sections sit flush inside post-content.
 * Root blockGap provides sensible default spacing everywhere else.
 */
.wp-block-post-content > * + * {
	margin-block-start: 0;
}

/*
 * Mobile breathing room via root padding.
 * useRootPaddingAwareAlignments in theme.json makes alignfull
 * blocks break out with negative margins, staying 100vw.
 */

/*
 * Footer nav: plain list layout on all screens, never a hamburger.
 */
footer .wp-block-navigation__responsive-container {
	display: block !important;
	position: relative !important;
	width: auto !important;
	height: auto !important;
	overflow: visible !important;
	visibility: visible !important;
	opacity: 1 !important;
}
footer .wp-block-navigation__responsive-container-open {
	display: none !important;
}
footer .wp-block-navigation__responsive-container-close {
	display: none !important;
}
footer .wp-block-navigation__responsive-container-content {
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	flex-wrap: wrap;
	justify-content: center;
}
@media (max-width: 781px) {
	footer .wp-block-navigation__responsive-container-content {
		flex-direction: column;
		align-items: center;
	}
}

/*
 * Blog post content: restore spacing and scale down headings
 * for long-form reading. The article wrapper in single.html
 * scopes these styles to blog posts only.
 */
article.wp-block-group .wp-block-post-content > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}
article.wp-block-group .wp-block-post-content > .wp-block-heading {
	margin-block-start: var(--wp--preset--spacing--60);
}
article.wp-block-group .wp-block-post-content h2 {
	font-size: var(--wp--preset--font-size--2-xl);
}
article.wp-block-group .wp-block-post-content h3 {
	font-size: var(--wp--preset--font-size--xl);
}
article.wp-block-group .wp-block-post-content h4 {
	font-size: var(--wp--preset--font-size--lg);
}

/* Same fix for navigation and any element using preset color classes */
.has-text-color.has-base-color,
.has-text-color.has-base-color a {
	color: var(--wp--preset--color--base) !important;
}
