/**
 * WK Kinetic — effect + component layer ("Kinetic Horizon" design system).
 * Tokens come from theme.json (--wp--preset--*). This file adds the effects
 * that core blocks cannot express: glassmorphism, luminous glows, gradient
 * borders, and the interactive states from the Stitch design system.
 */

:root {
	--wk-glass-fill: rgba(255, 255, 255, 0.05);
	--wk-glass-fill-strong: rgba(255, 255, 255, 0.08);
	--wk-glass-blur: 20px;
	--wk-nav-blur: 30px;
	--wk-border-teal: rgba(5, 142, 202, 0.3);
	--wk-border-hairline: rgba(255, 255, 255, 0.08);
	--wk-glow-cyan: 0 0 24px rgba(0, 210, 255, 0.30);
	--wk-glow-cyan-strong: 0 0 32px rgba(0, 210, 255, 0.45);
	--wk-radius-card: 0.75rem;
	--wk-radius-control: 0.25rem;
	--wk-input-bg: #0a0e18;
	--wk-section-gap: clamp(72px, 10vw, 120px);
}

/* ---------- Base layout resets (standalone theme — no parent CSS) ---------- */
*, *::before, *::after { box-sizing: border-box; }
.wp-site-blocks > *:first-child { margin-block-start: 0; }
.wp-site-blocks > main { margin-block: 0; }
main.wp-block-group { margin-top: 0; }
/* Media never forces horizontal overflow. */
img, svg, video, iframe { max-width: 100%; height: auto; }

/* ---------- Base atmosphere ---------- */
body {
	background-color: var(--wp--preset--color--base);
	background-image:
		radial-gradient(60% 50% at 50% -10%, rgba(11, 76, 140, 0.35), transparent 70%),
		linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
	background-size: 100% 100%, 48px 48px, 48px 48px;
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* ---------- Glass surfaces ---------- */
.wk-glass,
.wk-card {
	background: var(--wk-glass-fill);
	backdrop-filter: blur(var(--wk-glass-blur));
	-webkit-backdrop-filter: blur(var(--wk-glass-blur));
	border: 1px solid var(--wk-border-teal);
	border-radius: var(--wk-radius-card);
	position: relative;
	transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.wk-card:hover {
	border-color: transparent;
	box-shadow: var(--wk-glow-cyan);
	transform: translateY(-2px);
}

/* Gradient-border glow on hover via a masked pseudo-element. */
.wk-card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(135deg, #058eca, #00d2ff 60%, transparent);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
}
.wk-card:hover::before { opacity: 1; }

/* ---------- Buttons ---------- */
.wk-btn-primary,
.wp-block-button.is-style-wk-primary .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg, #0b4c8c 0%, #00d2ff 100%);
	color: var(--wp--preset--color--white);
	border: 0;
	border-radius: var(--wk-radius-control);
	padding: 14px 28px;
	font-family: var(--wp--preset--font-family--geist);
	font-weight: 600;
	letter-spacing: 0.03em;
	transition: box-shadow 0.3s ease, transform 0.15s ease;
}
.wk-btn-primary:hover,
.wp-block-button.is-style-wk-primary .wp-block-button__link:hover {
	box-shadow: var(--wk-glow-cyan-strong);
	transform: translateY(-1px);
}

.wk-btn-secondary,
.wp-block-button.is-style-wk-secondary .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	color: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--digital-cyan);
	border-radius: var(--wk-radius-control);
	padding: 13px 27px;
	font-family: var(--wp--preset--font-family--geist);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 13px;
	transition: background 0.3s ease, box-shadow 0.3s ease;
}
.wk-btn-secondary:hover,
.wp-block-button.is-style-wk-secondary .wp-block-button__link:hover {
	background: rgba(0, 210, 255, 0.08);
	box-shadow: var(--wk-glow-cyan);
}

/* ---------- Chips / badges ---------- */
.wk-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(11, 76, 140, 0.2);
	color: var(--wp--preset--color--digital-cyan);
	font-family: var(--wp--preset--font-family--geist);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: 999px;
}

/* ---------- Micro-indicator (pulsing status LED) ---------- */
.wk-indicator {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 2px;
	background: var(--wp--preset--color--digital-cyan);
	box-shadow: 0 0 8px rgba(0, 210, 255, 0.8);
	animation: wk-pulse 2s ease-in-out infinite;
}
@keyframes wk-pulse {
	0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(0, 210, 255, 0.8); }
	50% { opacity: 0.5; box-shadow: 0 0 2px rgba(0, 210, 255, 0.3); }
}

/* ---------- Eyebrow / label ---------- */
.wk-eyebrow {
	font-family: var(--wp--preset--font-family--geist);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--digital-cyan);
}

/* ---------- Forms ---------- */
.wk-field,
.wk-form input[type="text"],
.wk-form input[type="email"],
.wk-form input[type="tel"],
.wk-form select,
.wk-form textarea,
.wp-block-search__input {
	width: 100%;
	background: var(--wk-input-bg);
	color: var(--wp--preset--color--ink);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--wk-radius-control);
	padding: 14px 16px;
	font-family: var(--wp--preset--font-family--inter);
	font-size: 16px;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.wk-form input::placeholder,
.wk-form textarea::placeholder { color: rgba(194, 198, 210, 0.5); }

.wk-field:focus,
.wk-form input:focus,
.wk-form select:focus,
.wk-form textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--digital-cyan);
	box-shadow: inset 0 0 0 1px rgba(0, 210, 255, 0.4), 0 0 16px rgba(0, 210, 255, 0.15);
}
.wk-form label {
	display: block;
	margin-bottom: 8px;
	font-family: var(--wp--preset--font-family--geist);
	font-size: 13px;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--ink-muted);
}
.wk-form p { margin: 0 0 18px; }

/* ---------- Contact Form 7 integration ---------- */
.wk-form .wpcf7-submit,
.wpcf7 .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	background: linear-gradient(135deg, #0b4c8c 0%, #00d2ff 100%);
	color: #fff;
	border: 0;
	border-radius: var(--wk-radius-control);
	padding: 14px 28px;
	font-family: var(--wp--preset--font-family--geist);
	font-weight: 600;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: box-shadow 0.3s ease, transform 0.15s ease;
	width: auto;
}
.wk-form .wpcf7-submit:hover { box-shadow: var(--wk-glow-cyan-strong); transform: translateY(-1px); }
.wpcf7 .wpcf7-spinner { margin-left: 10px; }
.wpcf7-response-output {
	border-radius: var(--wk-radius-control);
	border-width: 1px;
	margin: 16px 0 0;
	padding: 12px 16px;
	font-size: 14px;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output { border-color: var(--wp--preset--color--error); color: var(--wp--preset--color--error); }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--wp--preset--color--digital-cyan); color: var(--wp--preset--color--digital-cyan); }
.wpcf7-not-valid-tip { color: var(--wp--preset--color--error); font-size: 12px; }

/* ---------- Glass navigation (header part) ---------- */
.wk-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(15, 19, 29, 0.6);
	backdrop-filter: blur(var(--wk-nav-blur));
	-webkit-backdrop-filter: blur(var(--wk-nav-blur));
	border-bottom: 1px solid transparent;
	border-image: linear-gradient(to right, transparent, #058eca, transparent) 1;
}
.wk-header .wp-block-navigation a {
	font-family: var(--wp--preset--font-family--geist);
	font-size: 14px;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--ink);
}
.wk-header .wp-block-navigation a:hover { color: var(--wp--preset--color--digital-cyan); }

/* ---------- Footer ---------- */
.wk-footer {
	border-top: 1px solid var(--wk-border-hairline);
	background: rgba(10, 14, 24, 0.6);
}
.wk-footer a { color: var(--wp--preset--color--ink-muted); text-decoration: none; }
.wk-footer a:hover { color: var(--wp--preset--color--digital-cyan); }

/* ---------- List rows (Kinetic list) ---------- */
.wk-list > * {
	border-bottom: 1px solid rgba(5, 142, 202, 0.1);
	padding-block: 16px;
	transition: background 0.2s ease;
}
.wk-list > *:hover { background: rgba(11, 76, 140, 0.12); }

/* ---------- Section rhythm ---------- */
.wk-section { padding-block: var(--wk-section-gap); }

/* ---------- Material Symbols sizing ---------- */
.material-symbols-outlined {
	font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
	vertical-align: middle;
	line-height: 1;
}

/* ---------- Accessibility: visible focus on dark ---------- */
:where(a, button, input, select, textarea, summary, .wp-element-button, .wp-block-navigation-item a):focus-visible {
	outline: 2px solid var(--wp--preset--color--digital-cyan);
	outline-offset: 3px;
	border-radius: 2px;
}

/* ---------- Mobile navigation overlay (dark) ---------- */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base);
	backdrop-filter: blur(var(--wk-nav-blur));
	-webkit-backdrop-filter: blur(var(--wk-nav-blur));
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { color: var(--wp--preset--color--ink); font-size: 20px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a:hover { color: var(--wp--preset--color--digital-cyan); }

/* ---------- Accessibility: honor reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.wk-indicator { animation: none; }
	.wk-card, .wk-btn-primary, .wk-btn-secondary { transition: none; }
}

/* ---------- Fallback when backdrop-filter is unsupported ---------- */
@supports not (backdrop-filter: blur(1px)) {
	.wk-glass, .wk-card { background: rgba(28, 31, 42, 0.92); }
	.wk-header { background: rgba(15, 19, 29, 0.96); }
}

/* ---------- Post / prose content — consistent vertical rhythm ----------
   One scale, applied systematically:
   - base gap between blocks: 1em
   - generous space ABOVE headings (separates from previous content)
   - tight space BELOW headings (connects heading to its content)         */
.wp-block-post-content > * { margin-block: 0; }
.wp-block-post-content > * + * { margin-top: 1em; }
.wp-block-post-content > h2 { margin-top: 1.7em; }
.wp-block-post-content > h3 { margin-top: 1.35em; }
.wp-block-post-content > h4 { margin-top: 1.15em; }
.wp-block-post-content > h5,
.wp-block-post-content > h6 { margin-top: 1em; }
.wp-block-post-content > :is(h1, h2, h3, h4, h5, h6) + * { margin-top: 0.5em; }
.wp-block-post-content ul,
.wp-block-post-content ol { padding-left: 1.4em; color: var(--wp--preset--color--ink-muted); }
.wp-block-post-content li { margin-block: 0.4em; }
.wp-block-post-content img,
.wp-block-post-content .wp-block-image img { border-radius: 0.5rem; }
.wp-block-post-content blockquote {
	border-left: 3px solid var(--wp--preset--color--digital-cyan);
	padding-left: 20px;
	margin-left: 0;
	color: var(--wp--preset--color--ink);
	font-size: 20px;
}
.wp-block-post-content code {
	background: var(--wk-input-bg);
	border: 1px solid var(--wk-border-hairline);
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 0.9em;
}

/* ---------- Featured images inside cards fill the frame ---------- */
.wk-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Category chips inside post meta ---------- */
.wp-block-post-terms.wk-chip a,
a.wk-chip {
	display: inline-flex;
	align-items: center;
	background: rgba(11, 76, 140, 0.2);
	color: var(--wp--preset--color--digital-cyan);
	font-family: var(--wp--preset--font-family--geist);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: 999px;
	text-decoration: none;
}

/* ---------- Query pagination ---------- */
.wp-block-query-pagination { gap: 8px; }
.wp-block-query-pagination a,
.wp-block-query-pagination .current {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border: 1px solid var(--wk-border-teal);
	border-radius: var(--wk-radius-control);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-family: var(--wp--preset--font-family--geist);
	font-size: 14px;
	transition: border-color 0.25s ease, color 0.25s ease;
}
.wp-block-query-pagination a:hover { border-color: var(--wp--preset--color--digital-cyan); color: var(--wp--preset--color--digital-cyan); }
.wp-block-query-pagination .current {
	background: rgba(0, 210, 255, 0.12);
	border-color: var(--wp--preset--color--digital-cyan);
	color: var(--wp--preset--color--digital-cyan);
}

/* ---------- Search block ---------- */
.wp-block-search__button {
	background: linear-gradient(135deg, #0b4c8c 0%, #00d2ff 100%);
	color: #fff;
	border: 0;
	border-radius: var(--wk-radius-control);
	font-family: var(--wp--preset--font-family--geist);
	font-weight: 600;
	padding-inline: 20px;
}
.wp-block-search .wp-block-search__inside-wrapper {
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--wk-radius-control);
	background: var(--wk-input-bg);
	padding: 4px;
}

/* ---------- Site logo alignment ---------- */
.wk-header .wp-block-site-logo img { display: block; }

/* =========================================================
   RESPONSIVE — Desktop > 1024 · Tablet 768–1024 · Mobile < 768
   Built in per component; grids use auto-fit so they reflow
   without hard breakpoints, these rules tune spacing & edges.
   ========================================================= */

/* Tablet */
@media (max-width: 1024px) {
	:root {
		--wk-section-gap: clamp(56px, 8vw, 88px);
		--wk-glass-blur: 16px;
	}
	.wk-header .wp-block-navigation { --wp--style--block-gap: 20px; }
}

/* Mobile */
@media (max-width: 782px) {
	:root {
		--wk-section-gap: 56px;
		/* Narrow the root padding to the design's 16px mobile margin. */
		--wp--style--root--padding-left: 16px;
		--wp--style--root--padding-right: 16px;
	}
	/* Reduce oversized card padding on small screens. */
	.wk-card { border-radius: 0.625rem; }
	/* Keep the header compact: hide the desktop CTA, nav collapses to the mobile overlay. */
	.wk-header .wp-block-buttons { display: none; }
	/* Ease large display numbers so they never overflow. */
	.wk-card .has-display-lg-font-size { font-size: clamp(32px, 12vw, 48px); }
}

/* Small mobile */
@media (max-width: 480px) {
	.material-symbols-outlined { font-size: 32px; }
	h1, .has-display-lg-font-size { letter-spacing: -0.01em; }
}
