/* Kineticlab — mobile-first community proving ground */

:root {
	--ink: #10231f;
	--ink-soft: #2a403a;
	--paper: #f3f6f4;
	--paper-deep: #e4ebe7;
	--surface: #ffffff;
	--accent: #d97706;
	--accent-deep: #b45309;
	--teal: #0f766e;
	--teal-deep: #115e59;
	--line: rgba(16, 35, 31, 0.12);
	--shadow: 0 18px 40px rgba(16, 35, 31, 0.1);
	--radius: 4px;
	--font-sans: "Outfit", "Segoe UI", sans-serif;
	--font-serif: "Source Serif 4", Georgia, serif;
	--container: min(1120px, calc(100% - 2rem));
	--header-h: 64px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ink-soft);
	background:
		radial-gradient(ellipse 80% 50% at 10% -10%, rgba(15, 118, 110, 0.08), transparent 55%),
		radial-gradient(ellipse 60% 40% at 100% 0%, rgba(217, 119, 6, 0.07), transparent 50%),
		var(--paper);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--teal-deep);
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
	color: var(--accent-deep);
}

h1, h2, h3, h4 {
	font-family: var(--font-serif);
	color: var(--ink);
	line-height: 1.2;
	font-weight: 600;
	margin: 0 0 0.6em;
}

p {
	margin: 0 0 1em;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.container {
	width: var(--container);
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.75rem 1.25rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn-lg {
	padding: 0.95rem 1.5rem;
	font-size: 1rem;
}

.btn-block {
	width: 100%;
}

.btn-primary {
	background: var(--teal);
	color: #fff;
}

.btn-primary:hover {
	background: var(--teal-deep);
	color: #fff;
}

.btn-ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.btn-light {
	background: #fff;
	color: var(--ink);
}

.btn-light:hover {
	background: var(--paper-deep);
	color: var(--ink);
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(243, 246, 244, 0.88);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid transparent;
	transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
.site-header--inner {
	border-bottom-color: var(--line);
	box-shadow: 0 8px 24px rgba(16, 35, 31, 0.05);
}

.site-header--front:not(.is-scrolled) {
	background: transparent;
}

.header-inner {
	width: var(--container);
	margin-inline: auto;
	min-height: var(--header-h);
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.75rem;
}

.site-title {
	margin: 0;
	font-family: var(--font-serif);
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.site-title a {
	color: var(--ink);
}

.site-header--front:not(.is-scrolled) .site-title a {
	color: #fff;
}

.custom-logo-link img {
	max-height: 36px;
	width: auto;
}

.nav-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	cursor: pointer;
	order: -1;
}

.site-header--front:not(.is-scrolled) .nav-toggle {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.35);
}

.nav-toggle span {
	display: block;
	height: 2px;
	background: var(--ink);
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header--front:not(.is-scrolled) .nav-toggle span {
	background: #fff;
}

.nav-toggle.is-active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
	opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.main-navigation {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: var(--header-h);
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	padding: 1rem;
	box-shadow: var(--shadow);
}

.main-navigation.is-open {
	display: block;
}

.primary-menu {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.primary-menu a {
	display: block;
	padding: 0.7rem 0.85rem;
	color: var(--ink);
	font-weight: 500;
	border-radius: var(--radius);
}

.primary-menu a:hover {
	background: var(--paper-deep);
	color: var(--teal-deep);
}

.header-cta {
	justify-self: end;
	padding: 0.55rem 0.9rem;
	font-size: 0.88rem;
}

/* Hero — full-bleed, brand first */
.hero-section {
	position: relative;
	min-height: min(92vh, 820px);
	display: flex;
	align-items: flex-end;
	padding: calc(var(--header-h) + 2rem) 0 3.5rem;
	color: #fff;
	overflow: hidden;
}

.hero-media {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(16, 35, 31, 0.35) 0%, rgba(16, 35, 31, 0.72) 55%, rgba(16, 35, 31, 0.88) 100%),
		var(--hero-image) center / cover no-repeat;
	transform: scale(1.04);
	animation: heroZoom 18s ease-out forwards;
}

@keyframes heroZoom {
	to { transform: scale(1); }
}

.hero-copy {
	position: relative;
	z-index: 1;
	max-width: 36rem;
}

.brand-mark {
	margin: 0 0 0.75rem;
	font-family: var(--font-serif);
	font-size: clamp(2rem, 8vw, 3.4rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.05;
	color: #fff;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
	animation: fadeUp 0.8s ease both;
}

.hero-title {
	margin: 0 0 0.85rem;
	font-size: clamp(1.35rem, 4.5vw, 2rem);
	font-weight: 500;
	color: rgba(255, 255, 255, 0.95);
	animation: fadeUp 0.8s ease 0.12s both;
}

.hero-subtitle {
	margin: 0 0 1.5rem;
	font-size: 1.02rem;
	color: rgba(255, 255, 255, 0.86);
	max-width: 34rem;
	animation: fadeUp 0.8s ease 0.22s both;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	animation: fadeUp 0.8s ease 0.32s both;
}

@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Sections */
.section {
	padding: 3.5rem 0;
}

.section-head {
	margin-bottom: 1.75rem;
	max-width: 42rem;
}

.section-head h2 {
	font-size: clamp(1.55rem, 4vw, 2.15rem);
	margin-bottom: 0.5rem;
}

.section-head p {
	margin: 0;
	color: var(--ink-soft);
}

.row-head {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	max-width: none;
}

.view-all {
	font-weight: 600;
	color: var(--teal);
	white-space: nowrap;
}

.view-all:hover {
	color: var(--accent-deep);
}

/* Audience */
.audiences-section {
	background: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
}

.audience-grid {
	display: grid;
	gap: 1.25rem;
}

.audience-block {
	padding: 1.35rem 0;
	border-top: 1px solid var(--line);
}

.audience-block h3 {
	font-size: 1.25rem;
	margin-bottom: 0.45rem;
}

.audience-block p {
	margin-bottom: 0.85rem;
}

.audience-block li {
	margin-bottom: 0.35rem;
}

.audience-block a {
	font-weight: 600;
	color: var(--teal);
}

/* News */
.news-grid {
	display: grid;
	gap: 1.5rem;
}

.news-card-image {
	overflow: hidden;
	border-radius: var(--radius);
	margin-bottom: 0.85rem;
}

.news-card-image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.news-card:hover .news-card-image img {
	transform: scale(1.04);
}

.tag {
	display: inline-block;
	margin-bottom: 0.4rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--accent-deep);
}

.news-card h3 {
	font-size: 1.15rem;
}

/* Media grids */
.resources-section,
.challenges-section,
.paths-section {
	background: var(--surface);
}

.labs-section,
.kits-section,
.writeups-section {
	background: transparent;
}

.media-grid {
	display: grid;
	gap: 1.5rem;
}

.media-thumb {
	display: block;
	overflow: hidden;
	border-radius: var(--radius);
	margin-bottom: 0.75rem;
}

.media-thumb img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.media-item:hover .media-thumb img {
	transform: scale(1.04);
}

.meta {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--accent-deep);
}

.media-body h3 {
	font-size: 1.1rem;
	margin-bottom: 0.35rem;
}

.media-body p {
	margin: 0;
	font-size: 0.95rem;
}

/* Kits & writeups */
.kits-grid,
.writeups-grid {
	display: grid;
	gap: 1rem;
}

.kit-item,
.writeup-item {
	padding: 1.25rem 0;
	border-top: 1px solid var(--line);
}

.kit-org {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--teal);
}

.kit-item h3,
.writeup-item h3 {
	font-size: 1.15rem;
}

/* Community */
.community-section {
	background:
		linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(217, 119, 6, 0.06)),
		var(--paper-deep);
}

.community-inner {
	display: grid;
	gap: 1.75rem;
	align-items: center;
}

.community-image {
	overflow: hidden;
	border-radius: var(--radius);
}

.community-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.community-copy h2 {
	font-size: clamp(1.5rem, 4vw, 2rem);
}

/* Blog */
.blog-grid {
	display: grid;
	gap: 1.5rem;
}

.blog-card-image {
	display: block;
	overflow: hidden;
	border-radius: var(--radius);
	margin-bottom: 0.75rem;
}

.blog-card-image img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.blog-meta {
	font-size: 0.85rem;
	color: var(--ink-soft);
	margin-bottom: 0.35rem;
}

.blog-card h3 {
	font-size: 1.15rem;
}

.blog-card h3 a {
	color: var(--ink);
}

.read-more {
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--teal);
}

.demo-note {
	margin-top: 1rem;
	font-size: 0.88rem;
	opacity: 0.7;
}

/* CTA */
.cta-banner {
	position: relative;
	padding: 4.5rem 0;
	background-size: cover;
	background-position: center;
	color: #fff;
	text-align: center;
}

.cta-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(16, 35, 31, 0.82), rgba(17, 94, 89, 0.75));
}

.cta-inner {
	position: relative;
	z-index: 1;
	max-width: 36rem;
}

.cta-inner h2 {
	color: #fff;
	font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.cta-inner p {
	color: rgba(255, 255, 255, 0.88);
}

/* Contact */
.contact-section {
	background: var(--surface);
}

.contact-grid {
	display: grid;
	gap: 2rem;
}

.contact-details {
	margin-top: 1rem;
}

.contact-details li {
	padding: 0.35rem 0;
	border-bottom: 1px solid var(--line);
}

.contact-form {
	display: grid;
	gap: 0.85rem;
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font: inherit;
	background: var(--paper);
	color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus {
	outline: 2px solid var(--teal);
	outline-offset: 1px;
	background: #fff;
}

.form-feedback {
	min-height: 1.25em;
	margin: 0;
	font-size: 0.92rem;
}

.form-feedback.is-success {
	color: var(--teal-deep);
}

.form-feedback.is-error {
	color: #b91c1c;
}

/* Footer */
.site-footer {
	background: var(--ink);
	color: rgba(255, 255, 255, 0.78);
}

.footer-main {
	padding: 2.75rem 0 1.5rem;
}

.footer-grid {
	display: grid;
	gap: 1.75rem;
}

.footer-brand .site-title a,
.footer-brand .site-title {
	color: #fff;
}

.footer-brand p {
	margin-top: 0.75rem;
	max-width: 28rem;
	font-size: 0.95rem;
}

.footer-menu {
	display: grid;
	gap: 0.45rem;
}

.footer-menu a,
.footer-contact-col a,
.social-links a {
	color: rgba(255, 255, 255, 0.82);
}

.footer-menu a:hover,
.footer-contact-col a:hover,
.social-links a:hover {
	color: #fff;
}

.social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-top: 0.75rem;
	font-size: 0.9rem;
	font-weight: 600;
}

.footer-links-bar {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding: 1rem 0;
}

.footer-links-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1.25rem;
	justify-content: flex-start;
	align-items: center;
}

.footer-links-row a {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.88rem;
	white-space: nowrap;
}

.footer-links-row a:hover {
	color: #fff;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding: 1rem 0 1.35rem;
	font-size: 0.85rem;
}

.footer-bottom p {
	margin: 0;
}

/* Inner pages */
.page-wrap {
	padding: 2.5rem 0 3.5rem;
}

.page-title {
	font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.archive-header {
	margin-bottom: 1.75rem;
}

.entry-card {
	display: grid;
	gap: 1rem;
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--line);
}

.entry-thumb img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--radius);
}

.entry-single .entry-featured {
	margin: 1.25rem 0 1.5rem;
	overflow: hidden;
	border-radius: var(--radius);
}

.entry-single .entry-featured img {
	width: 100%;
}

.entry-content {
	font-size: 1.05rem;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.comments-area {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid var(--line);
}

.error-wrap {
	text-align: center;
	padding-block: 4rem;
}

.no-results {
	padding: 2rem 0;
}

.search-form {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-top: 1rem;
}

.search-form input[type="search"] {
	flex: 1 1 200px;
	padding: 0.75rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font: inherit;
}

/* Reveal motion */
.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.55s ease var(--reveal-delay, 0ms), transform 0.55s ease var(--reveal-delay, 0ms);
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.hero-media,
	.reveal,
	.news-card-image img,
	.media-thumb img {
		animation: none !important;
		transition: none !important;
		transform: none !important;
		opacity: 1 !important;
	}
}

/* Tablet+ */
@media (min-width: 640px) {
	.news-grid,
	.media-grid,
	.blog-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.kits-grid,
	.writeups-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.25rem 2rem;
	}

	.resources-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 768px) {
	.row-head {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
		gap: 1.5rem;
	}

	.audience-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 2rem;
	}

	.audience-block {
		border-top: none;
		border-left: 1px solid var(--line);
		padding: 0 0 0 1.25rem;
	}

	.audience-block:first-child {
		border-left: none;
		padding-left: 0;
	}

	.community-inner,
	.contact-grid {
		grid-template-columns: 1fr 1fr;
		gap: 2.5rem;
	}

	.footer-grid {
		grid-template-columns: 1.4fr 1fr 1fr;
	}

	.entry-card {
		grid-template-columns: 240px 1fr;
		align-items: start;
	}
}

/* Desktop */
@media (min-width: 992px) {
	:root {
		--header-h: 72px;
		--container: min(1180px, calc(100% - 3rem));
	}

	.nav-toggle {
		display: none;
	}

	.header-inner {
		grid-template-columns: auto 1fr auto;
		gap: 1.5rem;
	}

	.main-navigation {
		display: block;
		position: static;
		background: transparent;
		border: 0;
		padding: 0;
		box-shadow: none;
	}

	.primary-menu {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 0.15rem;
	}

	.primary-menu a {
		padding: 0.45rem 0.7rem;
		font-size: 0.94rem;
	}

	.site-header--front:not(.is-scrolled) .primary-menu a {
		color: rgba(255, 255, 255, 0.92);
	}

	.site-header--front:not(.is-scrolled) .primary-menu a:hover {
		background: rgba(255, 255, 255, 0.12);
		color: #fff;
	}

	.hero-section {
		align-items: center;
		padding-bottom: 5rem;
	}

	.hero-copy {
		max-width: 40rem;
	}

	.section {
		padding: 4.5rem 0;
	}

	.news-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.resources-grid,
	.challenges-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.challenges-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.labs-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.paths-grid,
	.blog-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.blog-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.kits-grid,
	.writeups-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.writeups-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 1200px) {
	.resources-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}
