/*
Theme Name: Focaly Blog
Theme URI: https://focaly.agency/blog/
Description: Block theme (child of Twenty Twenty-Five) that gives the Focaly Agency blog an art-directed look in the style of focaly.agency: dark editorial layout, Geist font, hero card, category pills, gradient accents, designed featured images and a refined single post. No external requests, no JavaScript.
Author: Focaly Agency
Author URI: https://focaly.agency/
Template: twentytwentyfive
Version: 1.1.1
Requires at least: 6.7
Tested up to: 6.8
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: focaly-blog
Tags: blog, block-patterns, dark-mode, full-site-editing, wide-blocks
*/

:root {
	--f-bg: #050507;
	--f-surface: #0F0F14;
	--f-line: rgba(255, 255, 255, 0.08);
	--f-line-strong: rgba(255, 255, 255, 0.14);
	--f-text: #F4F4F6;
	--f-soft: #D4D4DA;
	--f-muted: #A6A6B0;
	--f-dim: #8A8A95;
	--f-blue: #7FA6FF;
	--f-grad: linear-gradient(90deg, #3560EE, #7A5AEA);
	--f-card: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}

html { scroll-behavior: smooth; }

html { overflow-x: clip; }

body {
	background-color: var(--f-bg);
	background-image:
		radial-gradient(900px 520px at 12% -60px, rgba(79, 123, 255, 0.20), transparent 70%),
		radial-gradient(700px 420px at 92% -30px, rgba(192, 123, 255, 0.12), transparent 70%);
	background-repeat: no-repeat;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

::selection { background: rgba(110, 120, 255, 0.45); color: #FFFFFF; }

/* Focus styles */
.wp-site-blocks a:focus-visible,
.wp-site-blocks button:focus-visible,
.wp-site-blocks input:focus-visible,
.wp-site-blocks select:focus-visible {
	outline: 2px solid #8C8CFF;
	outline-offset: 3px;
}

.wp-site-blocks > footer { margin-block-start: 0; }

/* ---------- Header: floating pill like focaly.agency ---------- */
header.wp-block-template-part {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 14px);
	z-index: 50;
	margin-block-start: 14px;
}

.f-hdr {
	max-width: 1280px;
	margin-inline: auto;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 24px;
	padding: 10px 10px 10px 22px;
	background: rgba(14, 14, 18, 0.78);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
	border: 1px solid var(--f-line);
	border-radius: 999px;
	box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.f-logo {
	display: block;
	flex: 0 0 auto;
	width: 87px;
	height: 28px;
	background: url("assets/img/focaly-logo-white.webp") no-repeat left center / contain;
}

.f-hdr .wp-block-navigation { margin-inline-end: auto; margin-inline-start: 8px; }
.f-hdr .wp-block-navigation .wp-block-navigation__container { gap: 30px; }
.f-hdr .wp-block-navigation-item__content { transition: color 0.2s ease; }
.f-hdr .wp-block-buttons { flex: 0 0 auto; margin: 0; }

.wp-block-navigation__submenu-container {
	background: #0F0F14 !important;
	color: var(--f-muted) !important;
	border: 1px solid var(--f-line-strong) !important;
	border-radius: 16px;
	padding: 8px;
	min-width: 220px;
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 8px 12px;
	border-radius: 10px;
}
.wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: rgba(255, 255, 255, 0.06);
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
}
.wp-block-navigation__responsive-container-open {
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
	color: var(--f-text);
}
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--f-bg);
	color: var(--f-text);
	padding: 24px;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.125rem;
	color: var(--f-text);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important;
	background: transparent !important;
	box-shadow: none;
}

/* ---------- Buttons ---------- */
.wp-block-button__link,
.wp-element-button {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background-image: var(--f-grad);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 30px -10px rgba(91, 110, 255, 0.75), 0 0 0 1px rgba(140, 130, 255, 0.35);
	transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s ease;
	text-decoration: none;
	white-space: nowrap;
}
.wp-block-button__link:hover,
.wp-element-button:hover {
	transform: translateY(-2px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 18px 40px -12px rgba(120, 110, 255, 0.9), 0 0 0 1px rgba(170, 150, 255, 0.5);
	color: #FFFFFF;
}
.wp-block-button__link::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: -60%;
	width: 40%;
	z-index: -1;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
	transform: skewX(-20deg);
	transition: left 0.7s ease;
}
.wp-block-button__link:hover::after { left: 130%; }

.wp-block-button.is-style-outline .wp-block-button__link {
	background: rgba(255, 255, 255, 0.04);
	background-image: none;
	color: var(--f-text);
	border: 1px solid var(--f-line-strong);
	box-shadow: none;
}

/* ---------- Hero ---------- */
.f-hero {
	position: relative;
	isolation: isolate;
	padding-block: clamp(56px, 9vw, 132px) clamp(24px, 3vw, 40px);
}
.f-hero::before {
	content: "";
	position: absolute;
	inset: -60px -16px 0 -16px;
	pointer-events: none;
	background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
	background-size: 64px 64px;
	-webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000, transparent 75%);
	z-index: -1;
}
.f-hero::after {
	content: "";
	position: absolute;
	right: calc(clamp(20px, 4vw, 40px) * -1);
	top: clamp(-20px, 1vw, 20px);
	width: clamp(260px, 42vw, 560px);
	aspect-ratio: 1;
	border-radius: 50%;
	pointer-events: none;
	z-index: -1;
	background:
		radial-gradient(circle at 50% 50%, rgba(122, 90, 234, 0.55), rgba(53, 96, 238, 0.25) 30%, transparent 62%),
		repeating-radial-gradient(circle at 50% 50%, transparent 0 38px, rgba(150, 140, 255, 0.22) 39px 40px);
	-webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%);
	mask-image: radial-gradient(circle, #000 20%, transparent 70%);
	opacity: 0.9;
}
.f-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--f-dim);
}
.f-eyebrow::before {
	content: "";
	width: 28px;
	height: 1px;
	background: linear-gradient(90deg, #3B6CFF, #C07BFF);
}
.f-hero-title {
	margin-block: 20px 0;
	font-size: clamp(3rem, 1.5rem + 7.2vw, 7.25rem);
	line-height: 0.96;
	letter-spacing: -0.045em;
	font-weight: 600;
}
.f-grad {
	background: linear-gradient(90deg, #B79BFF, #5A84FF);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.f-hero-lead {
	max-width: 620px;
	margin-block-start: 26px;
	font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
	line-height: 1.6;
	color: var(--f-muted);
}

/* ---------- Category pills ---------- */
.f-catnav {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 10px;
	margin-block-start: clamp(28px, 4vw, 48px);
}
.f-cats {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.f-cats li { margin: 0; }
.f-pill,
.f-cats a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 18px;
	border: 1px solid var(--f-line-strong);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.035);
	color: var(--f-soft);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.f-pill:hover,
.f-cats a:hover {
	border-color: rgba(160, 140, 255, 0.7);
	background: rgba(122, 90, 234, 0.18);
	color: #FFFFFF;
	transform: translateY(-1px);
}
.f-pill.is-active,
.f-cats .current-cat a {
	border-color: transparent;
	background-image: var(--f-grad);
	color: #FFFFFF;
	font-weight: 600;
	box-shadow: 0 10px 30px -12px rgba(91, 110, 255, 0.8);
}
@media (max-width: 700px) {
	.f-catnav {
		margin-inline: calc(var(--wp--preset--spacing--50, 20px) * -1);
		padding-inline: var(--wp--preset--spacing--50, 20px);
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.f-catnav::-webkit-scrollbar { display: none; }
	.f-cats { flex-wrap: nowrap; flex: 0 0 auto; padding-inline-end: 20px; }
}

/* ---------- Post cards ---------- */
.f-query { padding-block: clamp(16px, 3vw, 32px) clamp(56px, 8vw, 112px); }

.wp-block-post-template.f-cards {
	list-style: none;
	margin: 0;
	padding: 0;
}
.wp-block-post-template.f-cards.is-layout-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 28px);
}
.wp-block-post-template.f-cards > li { margin: 0; grid-column: span 2; }
/* a lone orphan or a pair in the last row grows to fill it (page 1 with the hero card) */
body:not(.paged) .f-query--home .f-cards > li:first-child { grid-column: 1 / -1; }
body:not(.paged) .f-query--home .f-cards > li:nth-child(3n+2):nth-last-child(2),
body:not(.paged) .f-query--home .f-cards > li:nth-child(3n+3):last-child:not(:first-child) { grid-column: span 3; }
body:not(.paged) .f-query--home .f-cards > li:nth-child(3n+2):last-child:not(:first-child) { grid-column: 1 / -1; }
@media (max-width: 980px) {
	.wp-block-post-template.f-cards.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wp-block-post-template.f-cards > li,
	body:not(.paged) .f-query--home .f-cards > li:nth-child(n) { grid-column: span 1; }
	body:not(.paged) .f-query--home .f-cards > li:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
	.wp-block-post-template.f-cards.is-layout-grid { grid-template-columns: minmax(0, 1fr); }
	.wp-block-post-template.f-cards > li,
	body:not(.paged) .f-query--home .f-cards > li:nth-child(n) { grid-column: 1 / -1; }
}

.f-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: var(--f-card);
	border: 1px solid var(--f-line);
	border-radius: 28px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -40px rgba(0, 0, 0, 0.9);
	transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}
.f-card:hover,
.f-card:focus-within {
	transform: translateY(-4px);
	border-color: rgba(150, 135, 255, 0.5);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 50px 90px -44px rgba(80, 90, 240, 0.6);
}
.f-card .wp-block-post-featured-image { margin: 0; overflow: hidden; position: relative; }
.f-card .wp-block-post-featured-image::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(180deg, transparent 60%, rgba(5, 5, 7, 0.35));
	border-bottom: 1px solid var(--f-line);
}
.f-card .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1200 / 630 !important;
	object-fit: cover;
	border-radius: 0;
	transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
}
.f-card:hover .wp-block-post-featured-image img { transform: scale(1.045); filter: saturate(1.12); }
.f-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 14px;
	padding: clamp(22px, 2.2vw, 30px);
}
.f-card-body > * { margin: 0; }

.f-cat { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.f-cat a {
	position: relative;
	z-index: 2;
	display: inline-block;
	padding: 7px 13px 6px;
	border: 1px solid rgba(190, 160, 255, 0.3);
	border-radius: 999px;
	background: rgba(122, 90, 234, 0.14);
	color: #DCC8FF;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.f-cat a:hover { background: rgba(122, 90, 234, 0.35); border-color: rgba(200, 175, 255, 0.7); color: #FFFFFF; }
.f-cat .wp-block-post-terms__separator { display: none; }
.f-card-title { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); line-height: 1.2; letter-spacing: -0.025em; }
.f-card-title a { color: #FFFFFF; text-decoration: none; background: linear-gradient(90deg, #fff, #fff) 0 100% / 0 1px no-repeat; transition: background-size 0.4s ease; }
.f-card:hover .f-card-title a { background-size: 100% 1px; }
.f-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.f-card-excerpt { font-size: 0.9688rem; line-height: 1.6; color: var(--f-muted); }
.f-card-excerpt p { margin: 0; }
.f-card-excerpt .wp-block-post-excerpt__more-text { margin: 14px 0 0; }
.f-card-excerpt .wp-block-post-excerpt__more-link {
	display: inline-block;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--f-blue);
	text-decoration: none;
}
.f-card-excerpt .wp-block-post-excerpt__more-link::after { content: " \2192"; display: inline-block; transition: transform 0.3s ease; }
.f-card:hover .wp-block-post-excerpt__more-link::after { transform: translateX(4px); }
.f-card-date { margin-block-start: auto !important; padding-top: 6px; font-size: 0.875rem; color: var(--f-dim); }

/* Hero card: first post on page 1 of the blog home */
@media (min-width: 981px) {
	body:not(.paged) .f-query--home .f-cards > li:first-child .f-card {
		display: grid;
		grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
		border-radius: 36px;
		background:
			radial-gradient(90% 120% at 100% 0%, rgba(122, 90, 234, 0.18), transparent 60%),
			var(--f-card);
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 60px 110px -60px rgba(70, 80, 230, 0.55);
	}
	body:not(.paged) .f-query--home .f-cards > li:first-child .wp-block-post-featured-image { height: 100%; }
	body:not(.paged) .f-query--home .f-cards > li:first-child .wp-block-post-featured-image img {
		height: 100%;
		min-height: 100%;
		aspect-ratio: auto !important;
		object-position: 10% 50%;
	}
	body:not(.paged) .f-query--home .f-cards > li:first-child .f-card-body {
		justify-content: center;
		gap: 16px;
		padding: clamp(28px, 3vw, 44px);
	}
	body:not(.paged) .f-query--home .f-cards > li:first-child .f-card-title { font-size: clamp(1.75rem, 1.05rem + 1.35vw, 2.5rem); line-height: 1.08; letter-spacing: -0.035em; }
	body:not(.paged) .f-query--home .f-cards > li:first-child .f-card-excerpt { font-size: 1.0625rem; }
	body:not(.paged) .f-query--home .f-cards > li:first-child .f-card-date { margin-block-start: 0 !important; }
}
body:not(.paged) .f-query--home .f-cards > li:first-child .f-card-body::before {
	content: "Latest article";
	order: -2;
	align-self: flex-start;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--f-dim);
}

/* ---------- Pagination ---------- */
.wp-block-query-pagination {
	margin-top: clamp(40px, 6vw, 72px);
	gap: 8px;
	font-size: 0.9375rem;
}
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--f-line-strong);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--f-text);
	text-decoration: none;
	transition: border-color 0.25s ease, background-color 0.25s ease;
}
.wp-block-query-pagination a:hover { border-color: rgba(160, 140, 255, 0.7); background: rgba(122, 90, 234, 0.18); color: #FFFFFF; }
.wp-block-query-pagination .page-numbers.current {
	background-image: var(--f-grad);
	border-color: transparent;
	color: #FFFFFF;
	font-weight: 600;
}
.wp-block-query-pagination-numbers { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Single post ---------- */
.f-article-head {
	position: relative;
	isolation: isolate;
	max-width: 1120px !important;
	margin-inline: auto;
	padding-block-start: clamp(56px, 8vw, 128px);
}
.f-article-head::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: -80px;
	left: -10%;
	width: 70%;
	height: 480px;
	pointer-events: none;
	background: radial-gradient(closest-side, rgba(79, 123, 255, 0.22), transparent 75%);
}
.f-article-head > * { margin-block: 0; }
.f-single-title {
	margin-block-start: 22px !important;
	max-width: 17em;
	font-size: clamp(2.5rem, 1.4rem + 4.8vw, 5rem);
	line-height: 1.02;
	letter-spacing: -0.042em;
	text-wrap: balance;
}
.f-deck {
	max-width: 720px;
	margin-block-start: 26px !important;
	font-size: clamp(1.125rem, 1.02rem + 0.5vw, 1.4375rem);
	line-height: 1.55;
	color: var(--f-muted);
}
.f-deck p { margin: 0; }
.f-meta {
	align-items: center;
	margin-block-start: 32px !important;
	padding-block-start: 22px;
	border-top: 1px solid var(--f-line);
	gap: 6px 18px !important;
	font-size: 0.9375rem;
	color: var(--f-dim);
}
.f-meta > * { margin: 0; }
.f-meta { flex-wrap: nowrap !important; }
.f-meta .wp-block-post-author { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; width: auto; }
.f-meta .wp-block-post-author::before {
	content: "";
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--f-grad);
	box-shadow: 0 0 0 4px rgba(122, 90, 234, 0.2);
}
.f-meta .wp-block-post-author__content { display: flex; flex: 0 0 auto; flex-basis: auto; flex-direction: row; flex-wrap: nowrap; align-items: baseline; gap: 0.35em; width: auto; }
.f-meta .wp-block-post-author__byline,
.f-meta .wp-block-post-author__name { width: auto; flex: 0 0 auto; margin: 0; font-size: 0.9375rem; line-height: 1.3; color: var(--f-soft); white-space: nowrap; }
.f-meta .wp-block-post-date { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 14px; font-size: 0.9375rem; line-height: 1.3; white-space: nowrap; color: var(--f-dim); }
.f-meta .wp-block-post-date::before {
	content: "";
	flex: 0 0 4px;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
}
@media (max-width: 400px) {
	.f-meta { gap: 6px 12px !important; }
	.f-meta .wp-block-post-author { gap: 10px; }
	.f-meta .wp-block-post-date { gap: 10px; }
	.f-meta .wp-block-post-author::before { flex-basis: 30px; width: 30px; height: 30px; }
}
.f-single-img {
	position: relative;
	max-width: 1120px !important;
	margin-inline: auto;
	margin-block: clamp(32px, 5vw, 64px) 0;
}
.f-single-img::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 8% 6% -8%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(90, 110, 255, 0.45), transparent 75%);
	filter: blur(30px);
}
.f-single-img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1200 / 630 !important;
	object-fit: cover;
	border-radius: 32px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.f-content {
	margin-block-start: clamp(36px, 5vw, 64px);
	font-size: clamp(1.0625rem, 1.02rem + 0.25vw, 1.1875rem);
	line-height: 1.78;
	color: var(--f-soft);
}
.f-content > * + * { margin-block-start: 1.35em; }
.f-content > p:first-child { font-size: 1.2em; line-height: 1.65; color: #F4F4F6; }
.f-content h2 {
	margin-block-start: 2.6em;
	font-size: clamp(1.625rem, 1.3rem + 1.1vw, 2.125rem);
	line-height: 1.12;
	letter-spacing: -0.03em;
	color: #FFFFFF;
}
.f-content h2::before {
	content: "";
	display: block;
	width: 44px;
	height: 4px;
	margin-block-end: 18px;
	border-radius: 2px;
	background: var(--f-grad);
}
.f-content h2 + * { margin-block-start: 0.9em; }
.f-content h3 { margin-block-start: 2em; font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.4375rem); line-height: 1.25; color: #E6DEFF; }
.f-content h3 + * { margin-block-start: 0.7em; }
.f-content h4 { margin-block-start: 1.8em; color: #FFFFFF; }
.f-content strong { color: #FFFFFF; font-weight: 600; }
.f-content a { color: #8FB4FF; text-underline-offset: 0.2em; text-decoration-thickness: 1px; transition: color 0.2s ease; }
.f-content a:hover { color: #FFFFFF; }

.f-content ul,
.f-content ol { padding-inline-start: 0; list-style: none; }
.f-content li { position: relative; }
.f-content li + li { margin-block-start: 0.65em; }
.f-content ul > li { padding-inline-start: 30px; }
.f-content ul > li::before {
	content: "";
	position: absolute;
	left: 6px;
	top: 0.78em;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--f-grad);
	box-shadow: 0 0 12px rgba(122, 90, 234, 0.7);
}
.f-content ol { counter-reset: f-ol; }
.f-content ol > li { counter-increment: f-ol; padding-inline-start: 50px; }
.f-content ol > li::before {
	content: counter(f-ol);
	position: absolute;
	left: 0;
	top: 0.1em;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--f-grad);
	color: #FFFFFF;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	box-shadow: 0 8px 20px -8px rgba(91, 110, 255, 0.9);
}
.f-content li > ul,
.f-content li > ol { margin-block-start: 0.6em; }

.f-content img,
.f-content .wp-block-image img { border-radius: 20px; height: auto; max-width: 100%; }
.f-content figcaption { color: var(--f-dim); font-size: 0.875rem; text-align: center; margin-top: 12px; }

.f-content blockquote,
.f-content .wp-block-quote {
	position: relative;
	margin-inline: 0;
	margin-block: 2.4em;
	padding: 52px clamp(24px, 4vw, 40px) 30px;
	border: 1px solid rgba(150, 135, 255, 0.3);
	border-radius: 28px;
	background:
		radial-gradient(120% 140% at 0% 0%, rgba(79, 123, 255, 0.2), transparent 60%),
		linear-gradient(160deg, rgba(122, 90, 234, 0.12), rgba(255, 255, 255, 0.02));
	font-size: 1.3125rem;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.012em;
	color: #FFFFFF;
}
.f-content blockquote::before {
	content: "\201C";
	position: absolute;
	top: 6px;
	left: clamp(22px, 3.6vw, 36px);
	font-size: 5.5rem;
	font-weight: 600;
	line-height: 1;
	background: var(--f-grad);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.f-content blockquote > * { margin: 0; }
.f-content blockquote > * + * { margin-block-start: 0.8em; }
.f-content blockquote cite,
.f-content blockquote footer { display: block; font-size: 0.9375rem; font-style: normal; font-weight: 400; color: var(--f-muted); }

.f-content pre,
.f-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.f-content :not(pre) > code {
	padding: 2px 7px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.08);
	font-size: 0.9em;
	color: #FFFFFF;
}
.f-content pre { overflow-x: auto; padding: 20px 24px; border: 1px solid var(--f-line); border-radius: 18px; background: #0B0B10; }
.f-content table {
	display: block;
	width: 100%;
	overflow-x: auto;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--f-line-strong);
	border-radius: 18px;
	font-size: 0.9688rem;
}
.f-content th,
.f-content td { padding: 14px 18px; border-bottom: 1px solid var(--f-line); text-align: left; vertical-align: top; }
.f-content tr:last-child td { border-bottom: 0; }
.f-content th { background: rgba(255, 255, 255, 0.05); color: #FFFFFF; font-weight: 600; white-space: nowrap; }
.f-content hr { height: 1px; border: 0; margin-block: 3em; background: linear-gradient(90deg, transparent, rgba(150, 135, 255, 0.5), transparent); }

/* FAQ blocks: <details> items and the optional .f-faq wrapper (h3 question + paragraph answer) */
.f-content details,
.f-content .f-faq > h3 + p { border: 1px solid var(--f-line); border-radius: 20px; background: var(--f-card); }
.f-content details { padding: 0; margin-block-start: 12px; transition: border-color 0.25s ease, background-color 0.25s ease; }
.f-content details[open] { border-color: rgba(150, 135, 255, 0.4); background: rgba(122, 90, 234, 0.08); }
.f-content summary {
	position: relative;
	padding: 20px 64px 20px 24px;
	font-weight: 600;
	color: #FFFFFF;
	cursor: pointer;
	list-style: none;
}
.f-content summary::-webkit-details-marker { display: none; }
.f-content summary::after {
	content: "+";
	position: absolute;
	right: 20px;
	top: 50%;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	margin-top: -15px;
	border: 1px solid var(--f-line-strong);
	border-radius: 50%;
	font-size: 1.125rem;
	line-height: 1;
	color: #DCC8FF;
}
.f-content details[open] summary::after { content: "\2212"; background: var(--f-grad); border-color: transparent; color: #FFFFFF; }
.f-content details > *:not(summary) { margin: 0; padding: 0 24px 22px; }
.f-content .f-faq > h3 { margin-block-start: 1.4em; font-size: 1.1875rem; color: #FFFFFF; }
.f-content .f-faq > h3 + p { margin-block-start: 0.5em; padding: 16px 22px; }

.f-tags { margin-block-start: 44px; max-width: 720px; margin-inline: auto; }
.f-tags a {
	display: inline-block;
	margin: 0 6px 8px 0;
	padding: 7px 15px;
	border: 1px solid var(--f-line-strong);
	border-radius: 999px;
	font-size: 0.8125rem;
	color: var(--f-muted);
	text-decoration: none;
	transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.f-tags a:hover { color: #FFFFFF; border-color: rgba(160, 140, 255, 0.7); background: rgba(122, 90, 234, 0.18); }
.f-tags .wp-block-post-terms__separator { display: none; }

/* CTA card */
.f-cta {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	max-width: 1120px !important;
	margin-inline: auto;
	margin-block-start: clamp(56px, 8vw, 104px);
	padding: clamp(32px, 5.5vw, 72px);
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 36px;
	background: linear-gradient(125deg, #3560EE 0%, #5A5AE8 48%, #7A5AEA 100%);
	box-shadow: 0 60px 120px -60px rgba(90, 100, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.4);
	color: #FFFFFF;
}
.f-cta::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background:
		radial-gradient(60% 90% at 100% 0%, rgba(255, 255, 255, 0.3), transparent 60%),
		radial-gradient(50% 80% at 0% 110%, rgba(5, 5, 20, 0.45), transparent 65%);
}
.f-cta::after {
	content: "";
	position: absolute;
	z-index: -1;
	right: -90px;
	bottom: -150px;
	width: 440px;
	aspect-ratio: 1;
	border-radius: 50%;
	background: repeating-radial-gradient(circle, transparent 0 30px, rgba(255, 255, 255, 0.2) 31px 32px);
	-webkit-mask-image: radial-gradient(circle, #000 25%, transparent 70%);
	mask-image: radial-gradient(circle, #000 25%, transparent 70%);
}
.f-cta > * { margin-block: 0; }
.f-cta .f-eyebrow { color: rgba(255, 255, 255, 0.85); }
.f-cta .f-eyebrow::before { background: rgba(255, 255, 255, 0.8); }
.f-cta h2 { margin-block-start: 16px; max-width: 14em; font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3.25rem); line-height: 1.05; letter-spacing: -0.035em; color: #FFFFFF; text-wrap: balance; }
.f-cta p:not(.f-eyebrow) { margin-block-start: 16px; max-width: 520px; font-size: 1.125rem; color: rgba(255, 255, 255, 0.92); }
.f-cta .wp-block-buttons { margin-block-start: 30px; }
.f-cta .wp-block-button__link {
	background: #FFFFFF;
	background-image: none;
	color: #0A0A14;
	box-shadow: 0 16px 40px -14px rgba(5, 5, 30, 0.7);
}
.f-cta .wp-block-button__link:hover { color: #0A0A14; background: #F2EEFF; box-shadow: 0 22px 50px -14px rgba(5, 5, 30, 0.8); }
.f-cta .wp-block-button__link::after { display: none; }

.f-postnav {
	max-width: 1120px !important;
	margin-inline: auto;
	margin-block: clamp(32px, 5vw, 56px) clamp(56px, 8vw, 112px);
	gap: 16px;
	align-items: stretch;
}
.f-postnav > * { flex: 1 1 280px; margin: 0; }
.f-postnav a {
	display: block;
	height: 100%;
	padding: 22px 26px;
	border: 1px solid var(--f-line);
	border-radius: 24px;
	background: var(--f-card);
	color: #FFFFFF;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}
.f-postnav a:hover { border-color: rgba(150, 135, 255, 0.5); background: rgba(122, 90, 234, 0.1); transform: translateY(-3px); }
.f-postnav .post-navigation-link__label { display: block; margin-bottom: 6px; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--f-dim); }
.f-postnav .post-navigation-link-next { text-align: right; }

/* CSS-only reading progress bar (progressive enhancement, no JavaScript) */
@supports (animation-timeline: scroll()) {
	body.single-post::before {
		content: "";
		position: fixed;
		z-index: 100;
		top: var(--wp-admin--admin-bar--height, 0px);
		left: 0;
		right: 0;
		height: 3px;
		background: var(--f-grad);
		transform: scaleX(0);
		transform-origin: 0 50%;
		animation: f-progress linear both;
		animation-timeline: scroll(root block);
	}
	@keyframes f-progress { to { transform: scaleX(1); } }
}

/* ---------- Page, archive, search, 404 ---------- */
.f-page-head { padding-block: clamp(48px, 7vw, 96px) clamp(16px, 3vw, 32px); }
.f-page-head > * { margin-block: 0; }
.f-page-head h1 { margin-block-start: 16px; font-size: clamp(2.125rem, 1.4rem + 3vw, 3.5rem); letter-spacing: -0.03em; }
.f-page-head .wp-block-term-description { margin-block-start: 16px; max-width: 640px; color: var(--f-muted); }
.f-page-head .wp-block-search { margin-block-start: 28px; max-width: 560px; }
.f-page-body { padding-block-end: clamp(48px, 7vw, 96px); }

.wp-block-search__input {
	min-height: 48px;
	padding: 0 20px;
	background: var(--f-surface);
	color: var(--f-text);
	border: 1px solid var(--f-line-strong);
	border-radius: 999px;
	font: inherit;
}
.wp-block-search__input::placeholder { color: var(--f-dim); opacity: 1; }
.wp-block-search__button {
	min-height: 48px;
	margin-inline-start: 10px;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	background-color: #3560EE;
	background-image: var(--f-grad);
	color: #FFFFFF;
	font: inherit;
	font-weight: 600;
	font-size: 0.875rem;
	cursor: pointer;
}
.f-notfound { padding-block: clamp(64px, 10vw, 140px); }
.f-notfound > * { margin-block: 0; }
.f-notfound h1 { margin-block-start: 16px; font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); letter-spacing: -0.03em; }
.f-notfound p.f-lead { margin-block-start: 18px; max-width: 560px; color: var(--f-muted); font-size: 1.125rem; }
.f-notfound .wp-block-search { margin-block-start: 28px; max-width: 560px; }
.f-notfound .wp-block-buttons { margin-block-start: 24px; }

/* ---------- Footer ---------- */
.f-footer { position: relative; }
.f-footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 100vw;
	margin-left: -50vw;
	border-top: 1px solid var(--f-line);
	pointer-events: none;
}
.f-footer-in {
	max-width: 1280px;
	margin-inline: auto;
	padding: clamp(48px, 6vw, 88px) 0 0;
}
.f-footgrid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
	gap: clamp(28px, 3vw, 48px);
}
.f-footgrid > * { margin: 0; }
.f-footcol > * { margin-block: 0; }
.f-foot-tag { margin-block-start: 18px !important; max-width: 320px; color: var(--f-dim); font-size: 0.9688rem; line-height: 1.55; }
.f-foot-h {
	margin: 0 0 18px !important;
	font-size: 1.0625rem !important;
	font-weight: 600;
	color: var(--f-text);
}
ul.f-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
ul.f-links li { margin: 0; }
ul.f-links a { color: var(--f-dim); font-size: 0.9375rem; text-decoration: none; transition: color 0.2s ease; display: inline-flex; align-items: center; min-height: 28px; }
ul.f-links a:hover { color: #FFFFFF; }
.f-social { margin-block-start: 22px !important; gap: 10px; }
.f-social .wp-social-link { background: transparent !important; }
.f-social .wp-social-link a {
	width: 42px;
	height: 42px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 99px;
	color: var(--f-text);
}
.f-social .wp-social-link a:hover { border-color: rgba(140, 130, 255, 0.6); }
.f-social .wp-social-link svg { width: 18px; height: 18px; fill: currentColor; }
.f-footbar {
	margin-top: clamp(40px, 5vw, 64px);
	padding-block: 24px 8px;
	border-top: 1px solid var(--f-line);
	font-size: 0.875rem;
	color: var(--f-dim);
}
.f-footbar > * { margin: 0; }
.f-wordmark {
	width: min(100%, 1200px);
	aspect-ratio: 348 / 112;
	margin-inline: auto;
	margin-bottom: clamp(24px, 4vw, 48px);
	pointer-events: none;
	user-select: none;
	opacity: 0.16;
	background: url("assets/img/focaly-logo-white.webp") no-repeat center / contain;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 92%);
	mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 92%);
}

/* ---------- Responsive ---------- */
@media (max-width: 782px) {
	.f-footgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.f-footgrid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
	.f-hdr { gap: 10px; padding: 8px 8px 8px 18px; }
	.f-hdr .wp-block-navigation { margin-inline-start: auto; margin-inline-end: 0; }
	.f-hdr .wp-block-button__link { padding: 11px 18px; }
	.f-postnav .post-navigation-link-next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
	html { scroll-behavior: auto; }
}

.f-footcol .f-logo { margin-inline-start: -4px; }
