/*
Theme Name: Kernello Child
Theme URI: https://kernello.ai
Description: Child theme of Twenty Twenty-Five. Site-wide Kernello header and footer with menus from Appearance > Menus and footer widget areas from Appearance > Widgets.
Author: Kernello
Template: twentytwentyfive
Version: 1.0.5
Requires at least: 6.5
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: kernello-child
*/

/* ---------- Tokens ---------- */
.k-header,
.k-footer {
	--k-ink: #0A1224;
	--k-lime: #C6F432;
	--k-lime-deep: #B3E01C;
	--k-line: #DDE1D0;
	--k-muted: #4B5563;
	color-scheme: light;
	font-family: 'IBM Plex Sans', system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	box-sizing: border-box;
}
.k-header *,
.k-footer * { box-sizing: border-box; }
.k-header a:focus-visible,
.k-header summary:focus-visible,
.k-footer a:focus-visible { outline: 3px solid var(--k-ink); outline-offset: 3px; }
.k-footer a:focus-visible { outline-color: var(--k-lime); }

/* Remove block-gap spacing between header, page content and footer */
.wp-site-blocks > .wp-block-template-part { margin-block-start: 0; margin-block-end: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Header ---------- */
.wp-block-template-part:has(> .k-header),
.k-site-header { position: sticky; top: 0; z-index: 20; }
.admin-bar .wp-block-template-part:has(> .k-header),
.admin-bar .k-site-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .wp-block-template-part:has(> .k-header),
	.admin-bar .k-site-header { top: 46px; }
}

.k-header {
	position: relative;
	background: rgba(255, 255, 255, .96);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--k-line);
	color: var(--k-ink);
}
.k-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.k-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.k-brand {
	display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit;
	font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 800; font-size: 26px; letter-spacing: -.03em;
}
.k-footer .k-brand { color: #fff; }
.k-nav__list { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; font-size: 15px; font-weight: 500; }
.k-nav__list a { color: var(--k-ink); text-decoration: none; }
.k-nav__list a:hover,
.k-nav__list .current-menu-item > a:not([href*="#"]) { text-decoration: underline; text-decoration-color: var(--k-lime-deep); text-decoration-thickness: 3px; text-underline-offset: 6px; }

.k-btn {
	display: inline-block; text-decoration: none; font-weight: 600; border-radius: 10px; padding: 15px 26px;
	background: var(--k-lime); color: var(--k-ink); border: 1px solid var(--k-lime-deep); transition: background-color .15s ease;
}
.k-btn:hover { background: var(--k-lime-deep); color: var(--k-ink); }
.k-btn--sm { padding: 11px 20px; font-size: 15px; white-space: nowrap; }

/* Mobile menu: native <details>, no JavaScript */
.k-menu { display: none; }
.k-menu > summary {
	list-style: none; cursor: pointer; font-weight: 600; font-size: 15px; padding: 10px 14px;
	border: 1px solid var(--k-ink); border-radius: 10px; color: var(--k-ink); background: transparent;
}
.k-menu > summary::-webkit-details-marker { display: none; }
.k-menu__panel {
	position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--k-line);
	padding: 8px 24px 20px;
}
.k-menu__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.k-menu__list a { display: block; padding: 12px 0; color: var(--k-ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--k-line); }

@media (max-width: 900px) {
	.k-nav__list { display: none; }
	.k-nav { height: auto; min-height: 68px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
	.k-nav__right { display: flex; align-items: center; gap: 10px; }
	.k-menu { display: block; }
}
@media (min-width: 901px) { .k-nav__right { display: flex; align-items: center; } }

/* ---------- Footer ---------- */
.k-footer { background: var(--k-ink); color: #C9D0DE; padding: 64px 0 0; }
.k-fgrid { display: flex; flex-wrap: wrap; gap: 40px 64px; justify-content: space-between; }
.k-footer__tag, .k-footer__about .widget { max-width: 320px; margin: 14px 0 0; font-size: 15px; color: #C9D0DE; }
.k-footer__about p { margin: 14px 0 0; max-width: 320px; font-size: 15px; }
.k-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.k-footer__col h4, .k-footer .k-widget-title {
	margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--k-lime);
	font-family: 'IBM Plex Sans', system-ui, sans-serif;
}
.k-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.k-footer__list a, .k-legal a { display: inline-block; padding: 3px 0; }
.k-footer a { color: #C9D0DE; text-decoration: none; }
.k-footer a:hover { color: #fff; text-decoration: underline; }
.k-legal { margin-top: 48px; border-top: 1px solid #22305A; padding: 22px 0 36px; font-size: 14px; color: #8F9AB3; }
.k-legal p { margin: 0; }
.k-legal a { color: #8F9AB3; }

/* Skip link (keyboard / screen-reader users) */
.k-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: #0A1224; color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; text-decoration: none; }
.k-skip:focus { left: 0; outline: 3px solid #C6F432; }

/* Mobile header: logo + contact button + hamburger on ONE row (v1.0.5) */
@media (max-width: 900px) {
	.k-nav { flex-wrap: nowrap; gap: 10px; min-height: 64px; padding-top: 0; padding-bottom: 0; }
	.k-brand { min-width: 0; font-size: 22px; gap: 8px; flex: 0 1 auto; }
	.k-nav__right { flex: 0 0 auto; gap: 8px; }
	.k-btn--sm { padding: 9px 13px; font-size: 14px; }
	.k-menu { position: static; }
	.k-menu > summary {
		position: relative; width: 44px; height: 44px; padding: 0; box-sizing: border-box;
		font-size: 0; line-height: 0; color: transparent; overflow: hidden; display: block;
	}
	.k-menu > summary::before {
		content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px; margin: -1px 0 0 -10px;
		background: var(--k-ink); border-radius: 2px; box-shadow: 0 -6px 0 var(--k-ink), 0 6px 0 var(--k-ink);
	}
	.k-menu > summary:focus-visible { outline: 3px solid var(--k-lime-deep); outline-offset: 2px; }
	.k-menu[open] > summary::before { box-shadow: none; transform: rotate(45deg); }
	.k-menu[open] > summary::after {
		content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px; margin: -1px 0 0 -10px;
		background: var(--k-ink); border-radius: 2px; transform: rotate(-45deg);
	}
}
@media (max-width: 380px) {
	.k-header .k-wrap { padding: 0 16px; }
	.k-brand { font-size: 19px; gap: 6px; }
	.k-brand svg { width: 24px; height: 24px; }
	.k-btn--sm { padding: 8px 10px; font-size: 13px; }
	.k-menu > summary { width: 40px; height: 40px; }
	.k-menu__panel { padding-left: 16px; padding-right: 16px; }
}
