/*
Theme Name: KFY LABS
Theme URI: https://kfylabs.com
Author: KFY LABS LLP
Author URI: https://kfylabs.com
Description: Lightweight block theme (Full Site Editing) for KFY LABS, an international supplier of industrial equipment and spare parts. Steel & Navy palette, self-hosted Inter, section patterns for a one-page corporate site plus narrow legal pages.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kfylabs
Tags: one-column, custom-logo, editor-style, full-site-editing, block-patterns, block-styles, wide-blocks, translation-ready
*/

/* ==========================================================================
   0. Token aliases
   All colours come from theme.json presets (var(--wp--preset--color--*)) and
   the derived tokens in settings.custom (var(--wp--custom--*)), so the style
   variations in /styles swap the whole scheme. Short aliases keep the
   component CSS readable and 1:1 with preview.html.
   ========================================================================== */
:root {
	--kfy-bg: var(--wp--preset--color--base);
	--kfy-surface: var(--wp--preset--color--surface);
	--kfy-surface-alt: var(--wp--preset--color--surface-alt);
	--kfy-text: var(--wp--preset--color--text);
	--kfy-text-muted: var(--wp--preset--color--text-muted);
	--kfy-heading: var(--wp--preset--color--heading);
	--kfy-primary: var(--wp--preset--color--primary);
	--kfy-primary-hover: var(--wp--preset--color--primary-hover);
	--kfy-accent: var(--wp--preset--color--accent);
	--kfy-border: var(--wp--preset--color--border);
	--kfy-dark: var(--wp--preset--color--dark);
	--kfy-dark-text: var(--wp--preset--color--dark-text);
	--kfy-footer: var(--wp--preset--color--footer);
	--kfy-footer-text: var(--wp--preset--color--footer-text);

	--kfy-primary-contrast: var(--wp--custom--primary-contrast, #ffffff);
	--kfy-accent-contrast: var(--wp--custom--accent-contrast, #ffffff);
	--kfy-link: var(--wp--custom--link, var(--kfy-accent));
	--kfy-eyebrow: var(--wp--custom--eyebrow, var(--kfy-accent));
	--kfy-eyebrow-dark: var(--wp--custom--eyebrow-on-dark, var(--kfy-accent)); /* eyebrow on the hero/dark bands: ≥ 4.5:1 on the overlay */
	--kfy-icon-bg: var(--wp--custom--icon-bg, var(--kfy-surface-alt));
	--kfy-icon-fg: var(--wp--custom--icon-fg, var(--kfy-accent));
	--kfy-step-bg: var(--wp--custom--step-bg, var(--kfy-accent));
	--kfy-step-fg: var(--wp--custom--step-fg, #ffffff);
	--kfy-title-rule: var(--wp--custom--title-rule, transparent);
	--kfy-overlay-rgb: var(--wp--custom--overlay-rgb, 15, 27, 45);
	--kfy-shadow-rgb: var(--wp--custom--shadow-rgb, 15, 27, 45);
	--kfy-btn-dark-bg: var(--wp--custom--btn-dark-bg, var(--kfy-accent));
	--kfy-btn-dark-fg: var(--wp--custom--btn-dark-fg, #ffffff);
	--kfy-btn-dark-hover: var(--wp--custom--btn-dark-hover, var(--kfy-primary));
	--kfy-success: var(--wp--custom--success, #1e7a4e);
	--kfy-error: var(--wp--custom--error, #b42318);
	--kfy-focus: var(--wp--custom--focus-ring, var(--kfy-primary)); /* focus indicator: ≥ 3:1 on base/surface in every variation */

	--kfy-radius: var(--wp--custom--radius, 10px);
	--kfy-radius-sm: var(--wp--custom--radius-sm, 8px);
	--kfy-ease: var(--wp--custom--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
	--kfy-header-h: var(--wp--custom--header-height, 72px);
	--kfy-gutter: var(--wp--style--root--padding-left, var(--wp--custom--gutter, 1rem));
	--kfy-section-gap: clamp(32px, 2rem + 2vw, 56px);
}

/* ==========================================================================
   1. Base
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--kfy-header-h) + 16px);
}

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	text-wrap: balance;
	overflow-wrap: anywhere;
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.15s var(--kfy-ease), text-decoration-color 0.15s var(--kfy-ease);
}

a:hover {
	text-decoration-color: var(--kfy-accent);
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

:focus {
	outline: none;
}

:focus-visible {
	outline: 3px solid var(--kfy-focus);
	outline-offset: 2px;
}

.section--dark :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible,
.cookiebar :focus-visible {
	outline-color: #ffffff;
}

::selection {
	background: var(--kfy-primary);
	color: var(--kfy-primary-contrast);
}

/* Accessibility helpers (WordPress conventions). */
.screen-reader-text,
.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link.screen-reader-text:focus,
.skip-link:focus-visible {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 18px;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
	background: var(--kfy-primary);
	color: var(--kfy-primary-contrast);
	border-radius: var(--kfy-radius-sm);
	font-weight: 600;
	text-decoration: none;
	outline-color: var(--kfy-focus);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   2. Layout helpers
   Sections are full-width groups (align full, constrained layout). Their
   content sits in ONE child group ".section__inner" (default/flow layout),
   which the constrained parent centres at the 1200px content width.
   ========================================================================== */
.site-main {
	display: block;
}

.section {
	position: relative;
	padding-block: var(--wp--preset--spacing--80);
}

.section--alt {
	background: var(--kfy-surface);
}

.section__inner > * {
	margin-block: 0;
}

.section__inner > * + * {
	margin-block-start: var(--wp--style--block-gap, 1.25rem);
}

.section__inner > .section-head + * {
	margin-block-start: var(--kfy-section-gap);
}

/* Section head: eyebrow + h2 + lead. */
.section-head {
	display: grid;
	gap: 12px;
	max-width: 720px;
	margin-bottom: 0;
}

.section-head > * {
	margin: 0;
}

.section-head h2::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin-top: 16px;
	border-radius: 2px;
	background: var(--kfy-title-rule);
}

.section-head__lead {
	font-size: 1.125rem;
	color: var(--kfy-text-muted);
	max-width: 64ch;
}

.eyebrow {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--kfy-eyebrow);
}

.lead {
	font-size: 1.125rem;
	color: var(--kfy-heading);
}

.text-muted {
	color: var(--kfy-text-muted);
}

.text-small {
	font-size: 0.875rem;
}

/* Dark bands (core/cover with className "section section--dark"). */
.wp-block-cover.section {
	min-height: 0;
	padding-inline: var(--kfy-gutter);
	display: block;
	isolation: isolate;
}

.wp-block-cover.section > .wp-block-cover__inner-container {
	width: 100%;
}

.section--dark,
.wp-block-cover.section--dark:not(.has-text-color) {
	color: var(--kfy-dark-text);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
	color: #ffffff;
}

.section--dark .section-head__lead {
	color: var(--kfy-dark-text);
	opacity: 0.82;
}

.section--dark .eyebrow {
	color: var(--kfy-eyebrow-dark);
}

.section--dark a:not(.wp-block-button__link) {
	color: #ffffff;
}

/* Replace the flat core dim with the preview gradients. Repeated class = higher specificity than core;
   the preset colour class sets background-color with !important, so it is neutralised the same way. */
.wp-block-cover.section--dark > .wp-block-cover__background.has-background-dim.has-background-dim.has-background-dim {
	opacity: 1;
	background-color: transparent !important;
	background-image: linear-gradient(180deg, rgba(var(--kfy-overlay-rgb), 0.86) 0%, rgba(var(--kfy-overlay-rgb), 0.94) 100%);
}

.wp-block-cover.section--dark.cta > .wp-block-cover__background.has-background-dim.has-background-dim.has-background-dim {
	background-image: linear-gradient(90deg, rgba(var(--kfy-overlay-rgb), 0.96) 0%, rgba(var(--kfy-overlay-rgb), 0.9) 55%, rgba(var(--kfy-overlay-rgb), 0.72) 100%);
}

.wp-block-cover.section--dark {
	background-color: var(--kfy-dark);
}

.wp-block-cover.section--dark > .wp-block-cover__image-background {
	object-fit: cover;
}

/* ==========================================================================
   3. Buttons (core/button)
   Default style  = filled primary (theme.json).
   is-style-outline = primary outline.
   is-style-light / .btn--light = white outline for dark surfaces.
   .btn--sm = compact (header, cookie bar); .btn--arrow = trailing arrow icon.
   On dark surfaces (.hero, .section--dark, .cookiebar) the filled button
   switches to the accent-based "button on dark" tokens, as in the preview.
   ========================================================================== */
.wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	white-space: nowrap;
	transition: background-color 0.18s var(--kfy-ease), border-color 0.18s var(--kfy-ease), color 0.18s var(--kfy-ease), transform 0.18s var(--kfy-ease), box-shadow 0.18s var(--kfy-ease);
}

.wp-block-button .wp-block-button__link:active {
	transform: translateY(1px);
}

.wp-block-button:not(.is-style-outline):not(.is-style-light):not(.btn--light) .wp-block-button__link:hover {
	box-shadow: 0 8px 20px -10px rgba(var(--kfy-shadow-rgb), 0.5);
}

.wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:not(.has-background) {
	padding: 12px 22px;
	background: transparent;
	color: var(--kfy-primary);
	border: 2px solid var(--kfy-primary);
}

.wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:not(.has-background):hover {
	background: var(--kfy-surface-alt);
	color: var(--kfy-primary);
	border-color: var(--kfy-primary);
}

/* "Outline" chosen on a dark surface (hero, dark bands, cookie bar) maps to the light look —
   a primary-coloured outline would be invisible there (1.2–1.7:1). */
.hero .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:not(.has-background),
.section--dark .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:not(.has-background),
.cookiebar .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:not(.has-background) {
	background: transparent;
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.7);
}

.hero .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:not(.has-background):hover,
.section--dark .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:not(.has-background):hover,
.cookiebar .wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:not(.has-background):hover {
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	border-color: #ffffff;
	box-shadow: none;
}

.hero .wp-block-button:not(.is-style-outline):not(.is-style-light):not(.btn--light) .wp-block-button__link,
.section--dark .wp-block-button:not(.is-style-outline):not(.is-style-light):not(.btn--light) .wp-block-button__link,
.cookiebar .wp-block-button:not(.is-style-outline):not(.is-style-light):not(.btn--light) .wp-block-button__link {
	background: var(--kfy-btn-dark-bg);
	border-color: var(--kfy-btn-dark-bg);
	color: var(--kfy-btn-dark-fg);
}

.hero .wp-block-button:not(.is-style-outline):not(.is-style-light):not(.btn--light) .wp-block-button__link:hover,
.section--dark .wp-block-button:not(.is-style-outline):not(.is-style-light):not(.btn--light) .wp-block-button__link:hover,
.cookiebar .wp-block-button:not(.is-style-outline):not(.is-style-light):not(.btn--light) .wp-block-button__link:hover {
	background: var(--kfy-btn-dark-hover);
	border-color: var(--kfy-btn-dark-hover);
	color: var(--kfy-btn-dark-fg);
	box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.6);
}

.wp-block-button.is-style-light > .wp-block-button__link.wp-element-button,
.wp-block-button.btn--light > .wp-block-button__link.wp-element-button {
	background: transparent;
	color: #ffffff;
	border: 2px solid rgba(255, 255, 255, 0.7);
	padding: 12px 22px;
}

.wp-block-button.is-style-light > .wp-block-button__link.wp-element-button:hover,
.wp-block-button.btn--light > .wp-block-button__link.wp-element-button:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: #ffffff;
	color: #ffffff;
	box-shadow: none;
}

.wp-block-button.btn--sm .wp-block-button__link {
	min-height: 40px;
	padding: 8px 16px;
	font-size: 0.9375rem;
}

.wp-block-button.btn--arrow .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	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='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%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='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 479px) {
	.hero__actions .wp-block-button {
		flex: 1 1 100%;
	}

	.hero__actions .wp-block-button .wp-block-button__link {
		width: 100%;
	}
}

/* ==========================================================================
   4. Header (parts/header.html)
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 900;
	background: var(--kfy-bg);
	border-bottom: 1px solid var(--kfy-border);
}

.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.site-header .site-header__inner {
	min-height: var(--kfy-header-h);
	gap: 24px;
}

/* Brand: optional Site Logo + inline hex mark + two-tone wordmark (site title). */
.site-brand {
	color: var(--kfy-heading);
}

.site-brand .site-brand__logo {
	margin: 0;
	line-height: 0;
}

.site-brand .site-brand__logo img {
	max-height: 44px;
	width: auto;
}

.site-brand__mark {
	width: 34px;
	height: 34px;
	flex: none;
}

.site-brand__hex {
	fill: var(--kfy-primary);
}

.site-brand__k {
	stroke: var(--kfy-primary-contrast);
}

/* Once a custom logo is uploaded the drawn mark steps aside. */
.wp-custom-logo .site-brand__mark {
	display: none;
}

/* Add the class "site-brand--logo-only" to the brand group to hide the text wordmark as well.
   The body class "kfy-logo-only" (theme mod kfylabs_logo_only, set by setup.sh when the uploaded
   logo already contains the company name) does the same for the header without editing the part. */
.site-brand--logo-only .site-brand__word,
.site-brand--logo-only .site-brand__mark,
.kfy-logo-only .site-header .site-brand__word,
.kfy-logo-only .site-header .site-brand__mark {
	display: none;
}

.site-brand .site-brand__word {
	margin: 0;
	line-height: 1;
}

.site-brand .site-brand__word a {
	display: inline-flex;
	align-items: baseline;
	gap: 0.3em;
	text-decoration: none;
	color: var(--kfy-heading);
}

.site-brand .site-brand__word b {
	font-weight: 700;
}

.site-brand .site-brand__word span {
	font-weight: 400;
	color: var(--kfy-text-muted);
}

/* Navigation (core/navigation, className "site-nav").
   Core's flex layout resets child margins with (0,1,0) specificity, hence the parent prefix. */
.site-header__inner > .site-nav {
	margin-left: auto;
}

.site-nav .wp-block-navigation-item .wp-block-navigation-item__content {
	display: inline-block;
	position: relative;
	padding: 8px 12px;
	border-radius: 6px;
	color: var(--kfy-text);
	font-weight: 500;
	font-size: 0.9375rem;
}

.site-nav .wp-block-navigation-item .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 4px;
	height: 2px;
	border-radius: 1px;
	background: var(--kfy-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s var(--kfy-ease);
}

.site-nav .wp-block-navigation-item .wp-block-navigation-item__content:hover::after,
.site-nav .wp-block-navigation-item .wp-block-navigation-item__content.is-active::after {
	transform: scaleX(1);
}

.site-nav .wp-block-navigation-item .wp-block-navigation-item__content:hover,
.site-nav .wp-block-navigation-item .wp-block-navigation-item__content.is-active {
	color: var(--kfy-heading);
}

/* The "Request a quote" nav item is only used inside the mobile overlay. */
.site-nav .wp-block-navigation-item.nav-cta {
	display: none;
}

/* Hamburger: always shown below 960px (core switches at 600px). */
.site-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--kfy-border);
	border-radius: 8px;
	color: var(--kfy-heading);
	background: transparent;
}

.site-nav .wp-block-navigation__responsive-container-open svg {
	width: 22px;
	height: 22px;
}

@media (min-width: 600px) and (max-width: 959.98px) {
	.site-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

@media (min-width: 960px) {
	.site-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none;
	}
}

/* Overlay menu (mobile). */
.site-nav.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	background-color: var(--kfy-bg);
}

.site-nav.wp-block-navigation:not(.has-text-color) .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	color: var(--kfy-heading);
}

.site-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	padding: 0;
}

.site-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding: calc(var(--kfy-header-h) + 8px) var(--kfy-gutter) 24px;
	align-items: stretch;
}

.site-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	width: 100%;
	align-items: stretch;
	gap: 0;
}

.site-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid var(--kfy-border);
}

.site-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 12px 4px;
	font-size: 1.0625rem;
	font-weight: 500;
	color: var(--kfy-heading);
	border-radius: 0;
}

.site-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation-item__content::after {
	display: none;
}

.site-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.nav-cta {
	display: flex;
	margin-top: 16px;
	border-bottom: 0;
}

.site-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.nav-cta .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border: 2px solid var(--kfy-primary);
	border-radius: var(--kfy-radius-sm);
	background: var(--kfy-primary);
	color: var(--kfy-primary-contrast);
	font-weight: 600;
	font-size: 1rem;
	text-align: center;
}

.site-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.nav-cta .wp-block-navigation-item__content:hover {
	background: var(--kfy-primary-hover);
	border-color: var(--kfy-primary-hover);
}

.site-nav .wp-block-navigation__responsive-container-close {
	top: 14px;
	right: var(--kfy-gutter);
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--kfy-border);
	border-radius: 8px;
	color: var(--kfy-heading);
	background: var(--kfy-bg);
}

.site-nav .wp-block-navigation__responsive-container-close svg {
	width: 22px;
	height: 22px;
}

/* Desktop CTA button (hidden below 960px; the overlay has its own). */
.site-header .site-header__cta {
	display: none;
	margin: 0;
}

@media (min-width: 960px) {
	.site-header .site-header__cta {
		display: flex;
	}
}

/* ==========================================================================
   5. Hero (core/cover, className "hero")
   ========================================================================== */
.wp-block-cover.hero {
	display: flex;
	align-items: center;
	min-height: 560px;
	padding-block: clamp(80px, 6rem + 6vw, 168px);
	padding-inline: var(--kfy-gutter);
	background: var(--kfy-dark);
	color: #ffffff;
	isolation: isolate;
}

.wp-block-cover.hero > .wp-block-cover__inner-container {
	width: 100%;
}

.wp-block-cover.hero > .wp-block-cover__image-background {
	object-fit: cover;
	object-position: center bottom;
}

.wp-block-cover.hero > .wp-block-cover__background.has-background-dim.has-background-dim.has-background-dim {
	opacity: 1;
	background-color: transparent !important;
	background-image:
		linear-gradient(90deg, rgba(var(--kfy-overlay-rgb), 0.88) 0%, rgba(var(--kfy-overlay-rgb), 0.62) 52%, rgba(var(--kfy-overlay-rgb), 0.32) 100%),
		linear-gradient(180deg, rgba(var(--kfy-overlay-rgb), 0.25) 0%, rgba(var(--kfy-overlay-rgb), 0.55) 100%);
}

.hero__inner > * {
	margin-block: 0;
}

.hero__content {
	display: grid;
	gap: 20px;
	max-width: 680px;
}

.hero__content > * {
	margin: 0;
}

.hero .eyebrow {
	color: var(--kfy-eyebrow-dark);
}

.hero h1 {
	color: #ffffff;
}

.hero__sub {
	font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.88);
	max-width: 60ch;
}

.hero .hero__actions {
	margin-top: 8px;
	gap: 12px;
}

.hero__trust {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.78);
}

.hero__trust::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: var(--kfy-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8.5 12.5l2.5 2.5 5-5'/%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='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8.5 12.5l2.5 2.5 5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ==========================================================================
   6. About (core/columns, className "about")
   ========================================================================== */
.wp-block-columns.about {
	gap: 40px;
	align-items: center;
}

.about .about__media {
	margin: 0;
}

.about .about__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--kfy-radius);
	box-shadow: 0 24px 48px -24px rgba(var(--kfy-shadow-rgb), 0.45);
}

.about__text > * + * {
	margin-block-start: 20px;
}

.about__text .section-head + * {
	margin-block-start: 20px;
}

.about__text p {
	max-width: 62ch;
}

@media (min-width: 900px) {
	.wp-block-columns.about {
		gap: 64px;
	}
}

/* Chips (core/list, className "chips"). */
.wp-block-list.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0;
	margin-top: 4px;
	list-style: none;
}

.chips li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 8px 14px 8px 10px;
	border-radius: 999px;
	background: var(--kfy-surface);
	border: 1px solid var(--kfy-border);
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--kfy-heading);
}

.chips li::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: var(--kfy-icon-fg);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8.5 12.5l2.5 2.5 5-5'/%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='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8.5 12.5l2.5 2.5 5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ==========================================================================
   7. Cards and icon badges (shared)
   ========================================================================== */
.card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--kfy-surface);
	border: 1px solid var(--kfy-border);
	border-radius: var(--kfy-radius);
	transition: transform 0.2s var(--kfy-ease), box-shadow 0.2s var(--kfy-ease), border-color 0.2s var(--kfy-ease);
}

.section--alt .card {
	background: var(--kfy-bg);
}

.card > * {
	margin: 0;
}

.card:hover {
	transform: translateY(-3px);
	box-shadow: 0 1px 2px rgba(var(--kfy-shadow-rgb), 0.05), 0 20px 36px -20px rgba(var(--kfy-shadow-rgb), 0.35);
}

.icon-badge {
	display: grid;
	place-items: center;
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: var(--kfy-icon-bg);
	color: var(--kfy-icon-fg);
}

.icon-badge svg {
	width: 26px;
	height: 26px;
}

.icon-badge--lg {
	width: 72px;
	height: 72px;
	border-radius: 20px;
}

.icon-badge--lg svg {
	width: 34px;
	height: 34px;
}

/* ==========================================================================
   8. Products (group.products > group.card.product)
   ========================================================================== */
.products {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.products > * {
	margin: 0;
}

.product__media {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	margin: 0;
	background: var(--kfy-surface-alt);
}

.card .product__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--kfy-ease);
}

.card:hover .product__media img {
	transform: scale(1.04);
}

.product__body {
	display: grid;
	gap: 10px;
	align-content: start;
	padding: 20px 20px 22px;
}

.product__body > * {
	margin: 0;
}

.product__body p {
	font-size: 0.9375rem;
	color: var(--kfy-text);
}

/* In the approved preview the "Example items" paragraph renders at the card body size and colour
   (preview.html's .product__body p rule wins over .product__items), so the theme matches that. */
.product__body .product__items {
	padding-top: 10px;
	border-top: 1px solid var(--kfy-border);
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--kfy-text);
}

.product__items strong {
	color: var(--kfy-heading);
	font-weight: 600;
}

.products-note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 40px;
	padding: 24px;
	border-radius: var(--kfy-radius);
	background: var(--kfy-surface);
	border: 1px dashed var(--kfy-border);
}

.section--alt .products-note {
	background: var(--kfy-bg);
}

.products-note > * {
	margin: 0;
}

.products-note p {
	font-size: 1.0625rem;
	font-weight: 500;
	color: var(--kfy-heading);
}

@media (min-width: 600px) {
	.products {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.products {
		grid-template-columns: repeat(4, 1fr);
		gap: 24px;
	}
}

/* ==========================================================================
   9. Services (group.services > group.card.service)
   ========================================================================== */
.services {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.services > * {
	margin: 0;
}

.card.service {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 16px;
	align-items: start;
	padding: 28px;
}

.service__text {
	display: grid;
	gap: 8px;
	min-width: 0;
}

.service__text > * {
	margin: 0;
}

.service__text p {
	font-size: 0.9375rem;
	color: var(--kfy-text);
}

@media (max-width: 479px) {
	.card.service {
		grid-template-columns: 1fr;
		padding: 24px;
	}
}

@media (min-width: 820px) {
	.services {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
}

/* ==========================================================================
   10. Process steps (dark band; group.steps > group.step)
   ========================================================================== */
.steps {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
}

.steps > * {
	margin: 0;
}

.step {
	position: relative;
	display: grid;
	gap: 14px;
	align-content: start;
	min-width: 0;
}

.step > * {
	margin: 0;
}

.step__num {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--kfy-step-bg);
	color: var(--kfy-step-fg);
	font-weight: 700;
	font-size: 1.125rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.step h3 {
	font-size: 1.0625rem;
}

.step p {
	font-size: 0.9375rem;
	color: var(--kfy-dark-text);
	opacity: 0.85;
}

@media (min-width: 640px) {
	.steps {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.steps {
		grid-template-columns: repeat(5, 1fr);
		gap: 24px;
	}

	.step:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 23px;
		left: 60px;
		right: -12px;
		height: 2px;
		background: rgba(255, 255, 255, 0.16);
	}
}

/* ==========================================================================
   11. Benefits (group.benefits > group.card.benefit)
   ========================================================================== */
.benefits {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.benefits > * {
	margin: 0;
}

.card.benefit {
	display: grid;
	gap: 14px;
	align-content: start;
	padding: 28px;
}

.benefit h3 {
	font-size: 1.125rem;
}

.benefit p {
	font-size: 0.9375rem;
	color: var(--kfy-text);
}

@media (min-width: 640px) {
	.benefits {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.benefits {
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
	}
}

/* ==========================================================================
   12. Industries (group.industries > group.industry)
   ========================================================================== */
.industries {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

.industries > * {
	margin: 0;
}

.industry {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 14px;
	align-items: start;
	min-width: 0;
	padding: 18px 20px;
	border-radius: 999px 16px 16px 999px;
	background: var(--kfy-bg);
	border: 1px solid var(--kfy-border);
}

.industry > * {
	margin: 0;
}

.industry .icon-badge {
	width: 44px;
	height: 44px;
	border-radius: 50%;
}

.industry .icon-badge svg {
	width: 22px;
	height: 22px;
}

.industry__text {
	display: grid;
	gap: 4px;
}

.industry__text > * {
	margin: 0;
}

.industry h3 {
	font-size: 1rem;
}

.industry p {
	font-size: 0.875rem;
	color: var(--kfy-text-muted);
}

@media (min-width: 640px) {
	.industries {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.industries {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ==========================================================================
   13. CTA band (core/cover className "section section--dark cta")
   ========================================================================== */
.wp-block-cover.cta {
	padding-block: clamp(64px, 4rem + 4vw, 112px);
}

.cta__inner {
	display: grid;
	gap: 32px;
	align-items: center;
}

.cta__inner > * {
	margin: 0;
}

.cta__text {
	display: grid;
	gap: 14px;
	max-width: 640px;
}

.cta__text > * {
	margin: 0;
}

.cta__text p {
	font-size: 1.125rem;
	color: var(--kfy-dark-text);
	opacity: 0.9;
}

.cta__action {
	display: grid;
	gap: 12px;
	justify-items: start;
}

.cta__action > * {
	margin: 0;
}

.cta__note {
	font-size: 0.9375rem;
	color: var(--kfy-dark-text);
	opacity: 0.8;
}

@media (min-width: 900px) {
	.cta__inner {
		grid-template-columns: 1fr auto;
		gap: 64px;
	}

	.cta__action {
		justify-items: end;
		text-align: right;
	}
}

/* ==========================================================================
   14. Contact (core/columns className "contact")
   ========================================================================== */
.wp-block-columns.contact {
	gap: 40px;
	align-items: start;
}

.contact__details .section-head + * {
	margin-block-start: 8px;
}

.details {
	display: grid;
	gap: 16px;
}

.details > * {
	margin: 0;
}

.details__row {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 14px;
	align-items: start;
}

.details__row > * {
	margin: 0;
}

.details__row .icon-badge {
	width: 40px;
	height: 40px;
	border-radius: 10px;
}

.details__row .icon-badge svg {
	width: 20px;
	height: 20px;
}

.details__text {
	display: grid;
	gap: 2px;
}

.details__text > * {
	margin: 0;
}

.details__label {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--kfy-text-muted);
}

.details__value {
	font-weight: 500;
	color: var(--kfy-heading);
	overflow-wrap: anywhere;
}

.contact__registration {
	font-size: 0.8125rem;
	color: var(--kfy-text-muted);
}

@media (min-width: 960px) {
	.wp-block-columns.contact {
		gap: 64px;
	}
}

/* Form card. */
.form-card {
	padding: clamp(24px, 2rem, 36px);
	background: var(--kfy-surface);
	border: 1px solid var(--kfy-border);
	border-radius: var(--kfy-radius);
}

.form-card > * {
	margin-block: 0;
}

.form-card h3 {
	font-size: 1.375rem;
}

.form-card .form-intro {
	margin-top: 6px;
	font-size: 0.875rem;
	color: var(--kfy-text-muted);
}

.form-card .wpcf7,
.form-card .form-fallback {
	margin-top: 24px;
}

.form-fallback {
	padding: 16px 18px;
	border-radius: var(--kfy-radius-sm);
	background: var(--kfy-bg);
	border: 1px solid var(--kfy-border);
	font-size: 0.9375rem;
}

/* ==========================================================================
   15. Contact Form 7 (markup convention documented in DEV-NOTES.md)
   The CF7 form body uses: .form__row > .field > label + [cf7 tag],
   .field.check for the acceptance box, .hp for the honeypot, .form__submit.
   ========================================================================== */
.wpcf7 form.wpcf7-form {
	display: grid;
	gap: 18px;
}

.wpcf7 form.wpcf7-form > p {
	margin: 0;
}

.form__row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}

@media (min-width: 560px) {
	.form__row {
		grid-template-columns: 1fr 1fr;
	}
}

.field {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.field > label {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--kfy-heading);
}

.field .req {
	color: var(--kfy-link);
}

.field .wpcf7-form-control-wrap {
	display: block;
	position: relative;
}

.field input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.field select,
.field textarea {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	background: var(--kfy-bg);
	color: var(--kfy-text);
	border: 1px solid var(--kfy-border);
	border-radius: var(--kfy-radius-sm);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.field select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355657A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 18px 18px;
}

/* Contact Form 7 renders <textarea rows="10"> (≈250px); the approved preview shows a 140px field. */
.field textarea {
	height: 140px;
	min-height: 140px;
	resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
	color: var(--kfy-text-muted);
	opacity: 0.75;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--kfy-accent);
	box-shadow: 0 0 0 3px rgba(var(--kfy-shadow-rgb), 0.08);
}

/* File inputs: browsers draw the native "Choose file / No file chosen" control in the visitor's
   OS language, so main.js wraps the input in .kfy-file and renders English labels itself. The
   native input stays on top (transparent) so clicks, keyboard focus and drag-and-drop still work. */
.field input[type="file"] {
	padding: 9px 14px;
	font-size: 0.9375rem;
}

.field input[type="file"]::file-selector-button {
	font: inherit;
	margin-right: 12px;
	padding: 6px 12px;
	border-radius: 6px;
	border: 1px solid var(--kfy-border);
	background: var(--kfy-surface-alt);
	color: var(--kfy-heading);
	cursor: pointer;
}

.kfy-file {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 48px;
	padding: 6px 14px;
	background: var(--kfy-bg);
	border: 1px solid var(--kfy-border);
	border-radius: var(--kfy-radius-sm);
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.kfy-file:focus-within {
	border-color: var(--kfy-accent);
	box-shadow: 0 0 0 3px rgba(var(--kfy-shadow-rgb), 0.08);
}

.kfy-file__btn {
	flex: 0 0 auto;
	padding: 6px 12px;
	border-radius: 6px;
	border: 1px solid var(--kfy-border);
	background: var(--kfy-surface-alt);
	color: var(--kfy-heading);
	font-size: 0.9375rem;
	line-height: 1.3;
}

.kfy-file__name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--kfy-text-muted);
	font-size: 0.9375rem;
}

.kfy-file.has-file .kfy-file__name {
	color: var(--kfy-text);
}

.field .kfy-file input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	cursor: pointer;
}

.field__hint {
	font-size: 0.8125rem;
	color: var(--kfy-text-muted);
}

.field .wpcf7-not-valid-tip {
	display: block;
	margin-top: 2px;
	font-size: 0.8125rem;
	color: var(--kfy-error);
}

.field input.wpcf7-not-valid,
.field select.wpcf7-not-valid,
.field textarea.wpcf7-not-valid {
	border-color: var(--kfy-error);
}

/* Acceptance checkbox. */
.field.check .wpcf7-list-item {
	display: block;
	margin: 0;
}

.field.check .wpcf7-list-item label {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 12px;
	align-items: start;
	font-size: 0.9375rem;
	font-weight: 400;
	color: var(--kfy-text);
}

.field.check input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 3px 0 0;
	accent-color: var(--kfy-primary);
}

/* Honeypot: visually removed, still in the DOM for bots. */
.hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form__submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.wpcf7 form.wpcf7-form .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border: 2px solid var(--kfy-primary);
	border-radius: var(--kfy-radius-sm);
	background: var(--kfy-primary);
	color: var(--kfy-primary-contrast);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.18s var(--kfy-ease), border-color 0.18s var(--kfy-ease), box-shadow 0.18s var(--kfy-ease);
}

.wpcf7 form.wpcf7-form .wpcf7-submit:hover {
	background: var(--kfy-primary-hover);
	border-color: var(--kfy-primary-hover);
	box-shadow: 0 8px 20px -10px rgba(var(--kfy-shadow-rgb), 0.5);
}

.wpcf7 form.wpcf7-form .wpcf7-submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

.wpcf7 form.wpcf7-form .wpcf7-spinner {
	margin: 0;
}

.form-card .wpcf7 form.wpcf7-form .wpcf7-response-output {
	margin: 0;
	padding: 16px 18px;
	border: 1px solid var(--kfy-border);
	border-radius: var(--kfy-radius);
	background: var(--kfy-bg);
	color: var(--kfy-text);
	font-size: 0.9375rem;
}

.form-card .wpcf7 form.wpcf7-form.sent .wpcf7-response-output {
	border-color: var(--kfy-success);
	color: var(--kfy-text);
	border-left-width: 4px;
}

.form-card .wpcf7 form.wpcf7-form.invalid .wpcf7-response-output,
.form-card .wpcf7 form.wpcf7-form.unaccepted .wpcf7-response-output,
.form-card .wpcf7 form.wpcf7-form.failed .wpcf7-response-output,
.form-card .wpcf7 form.wpcf7-form.aborted .wpcf7-response-output,
.form-card .wpcf7 form.wpcf7-form.spam .wpcf7-response-output {
	border-color: var(--kfy-error);
	border-left-width: 4px;
}

/* ==========================================================================
   16. Footer (parts/footer.html)
   ========================================================================== */
.site-footer {
	padding-block: 64px 0;
	font-size: 0.9375rem;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}

.site-footer__grid > * {
	margin: 0;
}

.footer__brand {
	display: grid;
	gap: 16px;
	align-content: start;
	max-width: 320px;
}

.footer__brand > * {
	margin: 0;
}

.site-brand--footer {
	color: #ffffff;
}

.site-brand--footer .site-brand__word a {
	color: #ffffff;
}

.site-brand--footer .site-brand__word span {
	color: var(--kfy-footer-text);
}

.site-brand--footer .site-brand__hex {
	fill: var(--kfy-accent);
}

.site-brand--footer .site-brand__k {
	stroke: var(--kfy-accent-contrast);
}

.wp-custom-logo .site-brand--footer .site-brand__mark {
	display: block;
}

/* Footer lockup: the inline SVG of the KFY LABS wordmark (logo concept C, dark version).
   Fills come from the palette so the style variations recolour it. */
.site-brand--footer .site-brand__link {
	display: inline-flex;
	line-height: 0;
	text-decoration: none;
}

.site-brand--footer .site-brand__lockup {
	display: block;
	width: auto;
	height: 40px;
}

.site-brand__lockup-text {
	fill: #ffffff;
}

.site-brand__lockup-tab {
	fill: var(--kfy-accent);
}

.footer__tagline {
	color: var(--kfy-footer-text);
}

.footer__col > * {
	margin: 0;
}

.footer__col > * + * {
	margin-block-start: 16px;
}

.site-footer .footer__title {
	font-size: 0.875rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #ffffff;
}

.site-footer .footer__links {
	display: grid;
	gap: 10px;
	padding: 0;
	list-style: none;
}

.footer__links li {
	margin: 0;
	overflow-wrap: anywhere;
}

.footer__links a {
	color: var(--kfy-footer-text);
	text-decoration: none;
}

.footer__links a:hover {
	color: #ffffff;
	text-decoration: underline;
	text-decoration-color: var(--kfy-accent);
}

.site-footer .footer__bottom {
	margin-top: 48px;
	padding-block: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.875rem;
	gap: 8px 20px;
}

.footer__bottom > * {
	margin: 0;
}

.footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.footer__legal a,
.site-footer .footer__copyright a {
	color: var(--kfy-footer-text);
	text-decoration: none;
}

.footer__legal a:hover {
	color: #ffffff;
	text-decoration: underline;
}

@media (min-width: 640px) {
	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 1024px) {
	.site-footer__grid {
		grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
		gap: 32px;
	}
}

/* ==========================================================================
   17. Cookie bar (parts/footer.html, shown by assets/js/main.js)
   ========================================================================== */
.wp-block-group.cookiebar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 950;
	display: none;
	padding: 16px var(--kfy-gutter) calc(16px + env(safe-area-inset-bottom, 0px));
	background: var(--kfy-footer);
	color: var(--kfy-footer-text);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 -12px 32px -16px rgba(0, 0, 0, 0.5);
}

.wp-block-group.cookiebar.is-visible {
	display: block;
}

.cookiebar .cookiebar__inner {
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
}

.cookiebar__inner > * {
	margin: 0;
}

.cookiebar p {
	max-width: 72ch;
	font-size: 0.9375rem;
}

.cookiebar a:not(.wp-block-button__link) {
	color: #ffffff;
}

.cookiebar .cookiebar__actions {
	gap: 10px;
}

@media (min-width: 720px) {
	.cookiebar .cookiebar__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

/* ==========================================================================
   18. Back to top (button injected by main.js)
   ========================================================================== */
.to-top {
	position: fixed;
	right: 20px;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 800;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border: 1px solid var(--kfy-border);
	border-radius: 50%;
	background: var(--kfy-bg);
	color: var(--kfy-heading);
	box-shadow: 0 8px 24px -8px rgba(var(--kfy-shadow-rgb), 0.35);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.to-top:hover {
	background: var(--kfy-surface);
}

body.has-cookiebar .to-top {
	bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 720px) {
	body.has-cookiebar .to-top {
		bottom: calc(96px + env(safe-area-inset-bottom, 0px));
	}
}

/* ==========================================================================
   19. Inner pages (page.html, page-narrow.html, index.html, 404.html)
   ========================================================================== */
.page-head {
	padding-block: clamp(40px, 3rem + 2vw, 72px) 0;
}

.page-head .page-head__title {
	margin: 0;
}

.page-body {
	padding-block: clamp(24px, 2rem, 40px) var(--wp--preset--spacing--80);
}

.error-404 {
	min-height: 50vh;
}

/* Long-form reading styles for legal pages (post-content className "prose"). */
.prose {
	font-size: 1rem;
	line-height: 1.7;
}

.prose > h2 {
	margin-block-start: 2.5rem;
	font-size: 1.375rem;
}

.prose > h3 {
	margin-block-start: 1.75rem;
	font-size: 1.125rem;
}

.prose > h2 + *,
.prose > h3 + * {
	margin-block-start: 0.75rem;
}

.prose ul,
.prose ol {
	padding-left: 1.25rem;
}

.prose li + li {
	margin-top: 0.4rem;
}

/* Only the "Last updated: …" intro line (first paragraph, emphasised as a whole) is muted — not every <em>
   that happens to start a paragraph or list item. */
.prose > p:first-child > em:only-child {
	color: var(--kfy-text-muted);
}

/* Placeholders still to be filled in ([E-MAIL PROVIDER, COUNTRY] …) — marked by tools/md2blocks.php. */
.prose mark.ph {
	padding: 0 0.2em;
	border-radius: 3px;
	background: rgba(255, 196, 0, 0.18);
	color: inherit;
	box-shadow: inset 0 -1px 0 rgba(255, 170, 0, 0.7);
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.prose th,
.prose td {
	padding: 10px 12px;
	border: 1px solid var(--kfy-border);
	text-align: left;
	vertical-align: top;
}

.prose th {
	background: var(--kfy-surface);
	color: var(--kfy-heading);
}

/* Blog index fallback. */
.post-list__item + .post-list__item {
	margin-block-start: 2.5rem;
	padding-block-start: 2.5rem;
	border-top: 1px solid var(--kfy-border);
}

.post-list__item .wp-block-post-title a {
	color: var(--kfy-heading);
	text-decoration: none;
}

.post-list__item .wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--kfy-accent);
}

.post-list__date {
	color: var(--kfy-text-muted);
}

/* ==========================================================================
   20. Misc block polish
   ========================================================================== */
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
	margin-inline: 0;
}

.wp-block-image img {
	border-radius: var(--kfy-radius);
}

.product__media img,
.hero img,
.wp-block-cover img {
	border-radius: 0;
}

.has-background:not(.site-footer):not(.cookiebar) a:not(.wp-block-button__link) {
	color: inherit;
}
