/* ==========================================================================
   KitMaestro Official UI/UX & Funnel Conversion System
   Follows README.md & AGENTS.md Design Tokens + 2026 WordPress FSE Standards
   ========================================================================== */

:root {
	--primary-blue: #005cbc;
	--primary-dark: #004085;
	--primary-light: #ebf5ff;
	--primary-border: #bfdbfe;
	--success-green: #10b981;
	--attention-yellow: #fbbf24;
	--luxury-gold: #ffd700;
}

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.km-text-primary {
	color: var(--wp--preset--color--primary);
}

/* Brand Header Icon Badge */
.km-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	background-color: rgba(255, 255, 255, 0.92) !important;
}

.admin-bar .km-site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .km-site-header {
		top: 46px;
	}
}

/* Site Logo clean alignment */
.wp-block-site-logo img {
	display: block;
	height: auto;
	border-radius: 12px;
}

.km-funnel-legal-nav .wp-block-navigation__container {
	gap: 1.25rem;
	justify-content: center;
}

/* Official Icon Container (README.md §3) */
.km-icon-box {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background-color: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.km-stars {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* Official KitMaestro Card Hover & Shadow (README.md §2 & §3) */
.is-style-km-card,
.km-card-hover {
	box-shadow: var(--wp--preset--shadow--km-soft);
	transition:
		transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		border-color 0.28s ease,
		box-shadow 0.32s ease;
}

.km-card-hover:hover {
	transform: translateY(-10px);
	border-color: var(--wp--preset--color--primary) !important;
	box-shadow: var(--wp--preset--shadow--km-elevated);
}

/* Buttons Interactive Polish */
.wp-block-button__link {
	transition:
		transform 0.2s ease,
		background-color 0.2s ease,
		box-shadow 0.2s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	text-decoration: none !important;
}

.km-btn-emerald .wp-block-button__link {
	box-shadow: var(--wp--preset--shadow--km-emerald);
}

.km-btn-emerald .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--success-dark) !important;
}

.km-btn-soft .wp-block-button__link {
	box-shadow: none;
	border: 1px solid var(--wp--preset--color--primary-border);
}

.km-btn-soft .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary) !important;
	color: #ffffff !important;
}

/* Luxury / Dark Glassmorphism Rules (README.md §5) */
.km-glass-panel,
.is-style-km-luxury-glass {
	background: rgba(255, 255, 255, 0.05) !important;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	border-radius: 24px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
	transition:
		transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
		border-color 0.3s ease;
}

.km-glass-panel:hover {
	transform: translateY(-8px);
	border-color: rgba(255, 255, 255, 0.22) !important;
}

.km-luxury-heading {
	background: linear-gradient(to right, #ffffff, #b0bec5);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	font-weight: 900;
}

.km-gold-badge {
	display: inline-block;
	padding: 0.4rem 1rem;
	border-radius: 50px;
	background: rgba(255, 215, 0, 0.12);
	border: 1px solid rgba(255, 215, 0, 0.35);
	color: #ffd700 !important;
	text-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}

.km-gold-text {
	color: #ffd700;
	text-shadow: 0 0 12px rgba(255, 215, 0, 0.28);
}

/* Entrance Animation fadeInUp (README.md §4) */
@keyframes kmFadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

body:not(.block-editor-page) .km-fade-in-up {
	animation: kmFadeInUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
	.km-fade-in-up,
	.km-card-hover,
	.km-glass-panel,
	.wp-block-button__link {
		animation: none !important;
		transition: none !important;
		transform: none !important;
	}
}

/* ==========================================================================
   Funnel & Lead Magnet Distraction-Free Layout + Form Plugins Integration
   ========================================================================== */

.km-funnel-shell {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}

.km-funnel-main {
	flex: 1 0 auto;
	width: 100%;
}

.km-funnel-footer a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.km-funnel-footer a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

.km-funnel-dark-shell .km-funnel-footer {
	border-top-color: rgba(255, 255, 255, 0.1) !important;
}

.km-funnel-dark-shell .km-funnel-footer,
.km-funnel-dark-shell .km-funnel-footer p {
	color: #94a3b8 !important;
}

.km-funnel-dark-shell .km-funnel-footer a {
	color: #cbd5e1;
}

.km-funnel-dark-shell .km-funnel-footer a:hover {
	color: #ffd700;
}

/* Native HTML + WPForms + Fluent Forms + CF7 + Gravity Forms inside Lead Magnet Cards */
.km-lead-form {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.km-lead-form .km-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.km-lead-form label,
.km-form-box label {
	font-family: var(--wp--preset--font-family--outfit);
	font-size: 0.825rem;
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
}

.km-lead-form input,
.km-lead-form select,
.km-lead-form textarea,
.km-form-box input[type="text"],
.km-form-box input[type="email"],
.km-form-box input[type="tel"],
.km-form-box input[type="url"],
.km-form-box select,
.km-form-box textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1.5px solid #cbd5e1;
	border-radius: 14px;
	padding: 0.8rem 1rem;
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.9375rem;
	color: #0f172a;
	background-color: #ffffff;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.km-lead-form input:focus,
.km-lead-form select:focus,
.km-lead-form textarea:focus,
.km-form-box input:focus,
.km-form-box select:focus,
.km-form-box textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 4px rgba(0, 92, 188, 0.12);
}

.km-submit-btn,
.km-form-box button[type="submit"],
.km-form-box input[type="submit"] {
	width: 100%;
	cursor: pointer;
	border: none;
	border-radius: 16px;
	padding: 1rem 1.5rem;
	margin-top: 0.35rem;
	font-family: var(--wp--preset--font-family--outfit);
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.25;
	color: #ffffff;
	background-color: var(--wp--preset--color--success);
	box-shadow: var(--wp--preset--shadow--km-emerald);
	transition:
		background-color 0.2s ease,
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.km-submit-btn:hover,
.km-form-box button[type="submit"]:hover,
.km-form-box input[type="submit"]:hover {
	background-color: var(--wp--preset--color--success-dark);
	transform: translateY(-2px);
}

/* Search block polish */
.wp-block-search .wp-block-search__inside-wrapper {
	border-radius: 50px;
	border: 1.5px solid var(--wp--preset--color--primary-border);
	padding: 4px;
	background: #ffffff;
}

.wp-block-search .wp-block-search__input {
	border: none !important;
	border-radius: 50px;
	padding-left: 1.1rem;
	font-family: var(--wp--preset--font-family--inter);
}

.wp-block-search .wp-block-search__button {
	border-radius: 50px;
	font-family: var(--wp--preset--font-family--outfit);
	font-weight: 800;
}
