/*
Theme Name: Subfort FSE
Theme URI: https://subfort.com/
Author: Blurr
Author URI: https://blurr.it
Description: Block theme for subfort.com built with core blocks.
Version: 0.1.0
Requires at least: 6.9
Requires PHP: 8.0
Text Domain: subfort-fse
License: GPL-2.0-or-later
*/

:where(.wp-site-blocks) :focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-500);
	outline-offset: 2px;
}
:where(h1, h2, h3, .has-display-xs-font-size, .has-display-sm-font-size, .has-display-md-font-size, .has-display-lg-font-size, .has-display-xl-font-size) {
	letter-spacing: -0.02em;
}
p { max-width: var(--wp--custom--paragraph-max-width); }
.has-text-align-center p, p.has-text-align-center { margin-inline: auto; }
.is-style-section { padding-block: var(--wp--custom--section-padding); }
img { height: auto; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Footer */
.subfort-footer .wp-block-site-logo img { width: 115px; height: 32px; }
.subfort-footer-nav .wp-block-navigation-item__content { color: var(--wp--preset--color--text-tertiary); font-weight: 600; }
.subfort-legal-nav .wp-block-navigation-item__content { color: var(--wp--preset--color--text-quaternary); font-weight: 400; }
.subfort-legal-nav .wp-block-navigation-item:last-child .wp-block-navigation-item__content { color: var(--wp--preset--color--text-primary); }
@media (max-width: 599px) {
	.subfort-footer__top { flex-direction: column; gap: 3rem; }
	.subfort-footer__top > .wp-block-group:first-child { width: 100%; }
	.subfort-footer-nav .wp-block-navigation__container { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
	.subfort-footer__bottom { flex-direction: column-reverse; align-items: flex-start !important; gap: 1.5rem; }
}

/* Page / post header */
.subfort-lead { color: var(--wp--preset--color--text-tertiary); }
.subfort-page-header .wp-block-post-title, .subfort-page-header .subfort-lead p { margin-inline: auto; }
.subfort-eyebrow, .subfort-eyebrow a { color: var(--wp--preset--color--brand-700); font-weight: 600; text-decoration: none; }
.subfort-featured.alignwide { max-width: 64rem !important; margin-inline: auto !important; }

/* Long-form content (Bricks post-content typography) */
.subfort-prose { font-size: var(--wp--preset--font-size--text-lg); line-height: 1.56; }
.subfort-prose > * { margin-block: 0 1.2em; }
.subfort-prose p { max-width: none; }
.subfort-prose h2 { font-size: 2.1em; font-weight: 700; line-height: 1.4; margin: 1.3em 0 0.67em; }
.subfort-prose h3 { font-size: 1.8em; font-weight: 700; line-height: 1.4; margin: 1.3em 0 0.67em; }
.subfort-prose h4 { font-size: 1.2em; font-weight: 700; }
.subfort-prose :is(h2, h3, h4) { letter-spacing: normal; }
.subfort-prose :is(ul, ol) { padding-left: 1.3em; margin-bottom: 1em; }
.subfort-prose pre.wp-block-code { overflow-x: auto; }
.subfort-prose a { color: inherit; text-decoration: none; }
.subfort-prose a:hover, .subfort-prose a:focus-visible { text-decoration: underline; }
.wp-block-post-title a, .wp-block-post-excerpt__excerpt, .wp-block-query-title { overflow-wrap: anywhere; }

/* Share row */
.subfort-share .wp-block-button__link { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--wp--preset--font-size--text-sm); padding: 0.62em 0.875em; border-radius: var(--wp--custom--radius--lg); }
.subfort-copy-link .wp-block-button__link::before {
	content: ""; width: 20px; height: 20px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 15c-.93 0-1.4 0-1.77-.15a2 2 0 0 1-1.08-1.08C2 13.4 2 12.93 2 12V5.2c0-1.12 0-1.68.22-2.1a2 2 0 0 1 .87-.88C3.52 2 4.08 2 5.2 2H12c.93 0 1.4 0 1.77.15a2 2 0 0 1 1.08 1.08C15 3.6 15 4.07 15 5m-2.8 17h6.6c1.12 0 1.68 0 2.1-.22a2 2 0 0 0 .88-.87c.22-.43.22-.99.22-2.11v-6.6c0-1.12 0-1.68-.22-2.1a2 2 0 0 0-.87-.88C19.48 9 18.92 9 17.8 9h-6.6c-1.12 0-1.68 0-2.1.22a2 2 0 0 0-.88.87C8 10.52 8 11.08 8 12.2v6.6c0 1.12 0 1.68.22 2.1a2 2 0 0 0 .87.88c.43.22.99.22 2.11.22Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 15c-.93 0-1.4 0-1.77-.15a2 2 0 0 1-1.08-1.08C2 13.4 2 12.93 2 12V5.2c0-1.12 0-1.68.22-2.1a2 2 0 0 1 .87-.88C3.52 2 4.08 2 5.2 2H12c.93 0 1.4 0 1.77.15a2 2 0 0 1 1.08 1.08C15 3.6 15 4.07 15 5m-2.8 17h6.6c1.12 0 1.68 0 2.1-.22a2 2 0 0 0 .88-.87c.22-.43.22-.99.22-2.11v-6.6c0-1.12 0-1.68-.22-2.1a2 2 0 0 0-.87-.88C19.48 9 18.92 9 17.8 9h-6.6c-1.12 0-1.68 0-2.1.22a2 2 0 0 0-.88.87C8 10.52 8 11.08 8 12.2v6.6c0 1.12 0 1.68.22 2.1a2 2 0 0 0 .87.88c.43.22.99.22 2.11.22Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.subfort-share-links .wp-social-link { border: 1px solid var(--wp--preset--color--border-tertiary); border-radius: var(--wp--custom--radius--md); box-shadow: var(--wp--preset--shadow--xs-skeuomorphic); }
.subfort-share-links.is-style-logos-only .wp-social-link a { padding: 10px; color: var(--wp--preset--color--fg-quinary); }
.subfort-share-links .wp-social-link { font-size: 20px !important; }
.subfort-share-links .wp-social-link svg { width: 20px !important; height: 20px !important; }
.subfort-share-links.is-style-logos-only .wp-social-link, .subfort-share-links.is-style-logos-only .wp-social-link a { color: var(--wp--preset--color--fg-quinary) !important; }
.subfort-share-links .wp-social-link { background: var(--wp--preset--color--white) !important; }

/* Blog toolbar: segmented category filter + search */
.subfort-filter { border: 1px solid var(--wp--preset--color--border-tertiary); border-radius: var(--wp--custom--radius--md); overflow: hidden; box-shadow: var(--wp--preset--shadow--xs); }
.subfort-filter p, .subfort-filter ul { margin: 0; }
.subfort-filter ul { display: flex; list-style: none; padding: 0; }
.subfort-filter a { display: block; padding: 10px 12px; font-weight: 600; color: var(--wp--preset--color--text-tertiary); text-decoration: none; line-height: 24px; }
.subfort-filter li + li a, .subfort-filter__cats a { border-left: 1px solid transparent; }
.subfort-filter :is(.subfort-filter__all, .current-cat) a { background: var(--wp--preset--color--white); color: var(--wp--preset--color--text-primary); }
body:not(.category) .subfort-filter__all a, .category .subfort-filter .current-cat a { background: var(--wp--preset--color--white); color: var(--wp--preset--color--text-primary); box-shadow: 1px 0 0 var(--wp--preset--color--border-tertiary); }
.category .subfort-filter__all a { background: var(--wp--preset--color--bg-secondary); color: var(--wp--preset--color--text-tertiary); box-shadow: none; }
.subfort-filter__cats a { background: var(--wp--preset--color--bg-secondary); }
.subfort-search { width: 20rem; max-width: 100%; }
.subfort-search .wp-block-search__input {
	border: 1px solid var(--wp--preset--color--border-tertiary); border-radius: var(--wp--custom--radius--md); box-shadow: var(--wp--preset--shadow--xs);
	padding: 10px 14px 10px 42px; font-size: var(--wp--preset--font-size--text-md); color: var(--wp--preset--color--text-primary);
	background: var(--wp--preset--color--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23717680' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 21-3.5-3.5m2.5-6a8.5 8.5 0 1 1-17 0 8.5 8.5 0 0 1 17 0Z'/%3E%3C/svg%3E") 14px center / 20px no-repeat;
}
.subfort-search .wp-block-search__inside-wrapper { border: 0; padding: 0; }

/* Post grid: posts + newsletter card share one 3-column grid */
.subfort-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4rem 2rem; align-items: start; }
.subfort-post-grid > *, .subfort-post-query, .subfort-post-list { margin: 0 !important; }
.subfort-post-query, .subfort-post-list { display: contents !important; }
.subfort-post-list > li { min-width: 0; }
.subfort-pagination { grid-column: 1 / -1; order: 10; }
.subfort-newsletter-card { order: 1; }
.subfort-card-cat, .subfort-card-cat a { color: var(--wp--preset--color--brand-700); font-size: var(--wp--preset--font-size--text-sm); font-weight: 600; text-decoration: none; }
.subfort-card-title .wp-block-post-title { flex: 1; margin: 0; }
.subfort-card-title .wp-block-post-title a { color: var(--wp--preset--color--text-primary); text-decoration: none; }
.subfort-card-title::after { content: ""; flex: none; width: 24px; height: 24px; margin-top: 4px; background: var(--wp--preset--color--text-primary);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7m0 0H7m10 0v10'/%3E%3C/svg%3E") center / 24px no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7m0 0H7m10 0v10'/%3E%3C/svg%3E") center / 24px no-repeat; }
.subfort-card-excerpt { color: var(--wp--preset--color--text-tertiary); }
.subfort-card-excerpt p { margin: 0; }
.subfort-featured-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--wp--preset--color--border-tertiary); border-radius: var(--wp--custom--radius--lg); background: var(--wp--preset--color--white); box-shadow: var(--wp--preset--shadow--xs-skeuomorphic); color: var(--wp--preset--color--text-secondary); }
.subfort-newsletter-card .ff-btn-submit { width: 100%; }
.subfort-newsletter-card .subfort-form-note { font-size: var(--wp--preset--font-size--text-sm); margin: 0.375rem 0 0; }
.subfort-newsletter-card .subfort-form-note a { color: inherit; }
.subfort-newsletter-card .ff-el-input--label { display: none; }
.subfort-divider { border: 0; height: 1px; }
@media (max-width: 1023px) { .subfort-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
	.subfort-post-grid { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
	.subfort-blog-toolbar { flex-direction: column; align-items: stretch !important; gap: 2rem; }
	.subfort-search { width: 100%; }
	.subfort-filter { width: 100%; }
	.subfort-filter > *, .subfort-filter ul, .subfort-filter li { flex: 1; text-align: center; }
	.subfort-post-grid { margin-top: 3rem !important; }
	.subfort-newsletter-card { padding: 1.5rem !important; }
	.subfort-newsletter-card > .wp-block-group { margin-top: 2rem !important; }
}

/* Colour class used in existing Documentation content (WordPress default palette) */
.has-luminous-vivid-orange-color { color: #FF6900 !important; }
