/*
 * Home page — bespoke layout for index.php
 * Overrides parts of .hero-splash with a split layout + visual extras.
 */

/* === Hero === */
.home-hero {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: var(--space-12);
	align-items: center;
	padding: var(--space-12) 0 var(--space-16);
	min-height: auto;
	margin: 0 0 var(--space-16);
	text-align: left;
	position: relative;
}

.home-hero::before {
	content: "";
	position: absolute;
	inset: -10% -20% auto auto;
	width: 60%;
	height: 60%;
	background:
		radial-gradient(circle at 30% 40%, rgba(108, 140, 255, 0.18), transparent 55%),
		radial-gradient(circle at 70% 60%, rgba(255, 200, 140, 0.12), transparent 55%);
	filter: blur(40px);
	pointer-events: none;
	z-index: -1;
}

.home-hero-text {
	min-width: 0;
}

.home-hero .hero-badge {
	margin-bottom: var(--space-5);
}

.home-hero h1 {
	font-size: clamp(2rem, 4.5vw, 3.5rem);
	font-weight: var(--font-extrabold);
	line-height: 1.05;
	letter-spacing: -0.03em;
	margin: 0 0 var(--space-5);
}

.home-hero h1 .accent {
	background: linear-gradient(120deg, #6c8cff 0%, #b86cff 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.home-hero .hero-subtitle {
	font-size: var(--text-lg);
	color: var(--text-muted);
	max-width: 480px;
	margin: 0 0 var(--space-8);
	line-height: 1.55;
}

.home-hero .hero-actions {
	display: flex;
	gap: var(--space-3);
	flex-wrap: wrap;
	justify-content: flex-start;
	margin-bottom: var(--space-8);
}

.home-stats {
	display: flex;
	gap: var(--space-8);
	margin-top: var(--space-6);
	flex-wrap: wrap;
}

.home-stat .num {
	font-size: var(--text-2xl);
	font-weight: var(--font-extrabold);
	color: var(--text-primary);
	line-height: 1;
}

.home-stat .lbl {
	font-size: var(--text-xs);
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: var(--space-1);
}

/* === Hero visual (right side) === */
.home-hero-visual {
	position: relative;
}

.home-hero-visual .win {
	background: #0e0e10;
	color: #e7e7ea;
	border-radius: var(--radius-xl);
	overflow: hidden;
	font-family: var(--font-sans);
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
	transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
	transition: transform 0.3s ease;
}

.home-hero-visual .win:hover {
	transform: perspective(1400px) rotateY(-3deg) rotateX(1deg);
}

.home-hero-visual .win-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	background: #16161a;
	border-bottom: 1px solid #232328;
}

.home-hero-visual .win-bar .d {
	width: 11px;
	height: 11px;
	border-radius: 50%;
}

.home-hero-visual .win-bar .d.r { background: #ff5f57; }
.home-hero-visual .win-bar .d.y { background: #febc2e; }
.home-hero-visual .win-bar .d.g { background: #28c840; }

.home-hero-visual .win-bar .url {
	margin-left: 10px;
	font-size: 11px;
	color: #8a8a92;
	background: #0a0a0c;
	padding: 4px 10px;
	border-radius: 5px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.home-hero-visual .win-body {
	display: grid;
	grid-template-columns: 130px 1fr;
	min-height: 380px;
}

.home-hero-visual .side {
	background: #0b0b0d;
	border-right: 1px solid #232328;
	padding: 14px 10px;
	font-size: 12px;
}

.home-hero-visual .side .brand {
	display: flex;
	align-items: center;
	gap: 7px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 14px;
	padding: 4px 6px;
}

.home-hero-visual .side .brand .logo {
	width: 22px;
	height: 22px;
	border-radius: 5px;
	background: linear-gradient(135deg, #6c8cff, #b86cff);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	color: #fff;
	font-weight: 800;
}

.home-hero-visual .side ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.home-hero-visual .side li {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 6px 8px;
	border-radius: 5px;
	color: #b5b5bc;
}

.home-hero-visual .side li.active {
	background: #1c1c22;
	color: #fff;
}

.home-hero-visual .side li .ic {
	width: 13px;
	height: 13px;
	border-radius: 3px;
	background: #2a2a30;
	flex-shrink: 0;
}

.home-hero-visual .main {
	padding: 16px 18px;
	min-width: 0;
}

.home-hero-visual .main-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.home-hero-visual .main-head h5 {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
}

.home-hero-visual .pill-btn {
	font-size: 11px;
	background: #fff;
	color: #0e0e10;
	padding: 5px 11px;
	border-radius: 5px;
	font-weight: 600;
}

.home-hero-visual .stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	margin-bottom: 12px;
}

.home-hero-visual .stat {
	background: #16161a;
	border: 1px solid #232328;
	border-radius: 7px;
	padding: 8px 10px;
}

.home-hero-visual .stat .lbl {
	font-size: 9px;
	color: #8a8a92;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.home-hero-visual .stat .num {
	font-size: 18px;
	font-weight: 800;
	color: #fff;
	margin-top: 2px;
}

.home-hero-visual .stat .delta {
	font-size: 9px;
	color: #6cc46b;
	margin-top: 1px;
}

.home-hero-visual .rows {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.home-hero-visual .row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 9px;
	background: #16161a;
	border: 1px solid #232328;
	border-radius: 6px;
	font-size: 11px;
}

.home-hero-visual .row .thumb {
	width: 26px;
	height: 26px;
	border-radius: 4px;
	flex-shrink: 0;
}

.home-hero-visual .row .thumb.green { background: linear-gradient(135deg, #2d4a3d, #1a2d23); }
.home-hero-visual .row .thumb.blue { background: linear-gradient(135deg, #2d3d4a, #1a232d); }
.home-hero-visual .row .thumb.amber { background: linear-gradient(135deg, #4a3d2d, #2d231a); }

.home-hero-visual .row .name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #e7e7ea;
}

.home-hero-visual .pill {
	font-size: 9px;
	padding: 2px 7px;
	border-radius: 999px;
	font-weight: 600;
}

.home-hero-visual .pill.pub { background: #1f3a25; color: #6cc46b; }
.home-hero-visual .pill.draft { background: #3a311f; color: #c4a36c; }
.home-hero-visual .pill.sched { background: #1f2d3a; color: #6c9bc4; }

/* Floating code chip */
.home-hero-visual .chip {
	position: absolute;
	bottom: -22px;
	left: -28px;
	background: #0e0e10;
	border: 1px solid #232328;
	border-radius: 10px;
	padding: 10px 14px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 11px;
	color: #b5b5bc;
	white-space: nowrap;
}

.home-hero-visual .chip .kw { color: #b86cff; }
.home-hero-visual .chip .fn { color: #6c8cff; }
.home-hero-visual .chip .str { color: #c4a36c; }

/* === Trust strip === */
.trust-strip {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3) var(--space-8);
	justify-content: center;
	align-items: center;
	padding: var(--space-6) var(--space-6);
	margin-bottom: var(--space-16);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

.trust-strip .trust-item {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--text-muted);
	font-size: var(--text-sm);
	font-weight: var(--font-medium);
}

.trust-strip iconify-icon {
	color: var(--text-secondary);
}

/* === Highlight band === */
.highlight-band {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-5);
	margin-bottom: var(--space-16);
}

.highlight {
	padding: var(--space-6);
	background: var(--bg-secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	transition: border-color 0.2s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
}

.highlight:hover {
	border-color: var(--border-strong);
	transform: translateY(-3px);
}

.highlight-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	background: var(--bg-tertiary);
	border-radius: var(--radius);
	margin-bottom: var(--space-4);
	color: var(--text-primary);
}

.highlight h3 {
	font-size: var(--text-lg);
	font-weight: var(--font-semibold);
	margin: 0 0 var(--space-2);
}

.highlight p {
	font-size: var(--text-sm);
	color: var(--text-muted);
	line-height: var(--leading-relaxed);
	margin: 0 0 var(--space-4);
}

.highlight-code {
	background: #0e0e10;
	color: #b5b5bc;
	border-radius: var(--radius);
	padding: var(--space-3) var(--space-4);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	line-height: 1.5;
	margin-top: auto;
	overflow-x: auto;
}

.highlight-code .kw { color: #b86cff; }
.highlight-code .fn { color: #6c8cff; }
.highlight-code .str { color: #c4a36c; }
.highlight-code .cm { color: #5a5a62; }

/* === Articles section title === */
.home-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: var(--space-8);
	gap: var(--space-4);
	flex-wrap: wrap;
}

.home-section-head h2 {
	font-size: var(--text-3xl);
	font-weight: var(--font-bold);
	margin: 0;
	letter-spacing: -0.02em;
}

.home-section-head a {
	font-size: var(--text-sm);
	color: var(--text-muted);
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
}

.home-section-head a:hover {
	color: var(--text-primary);
}

/* === Closing CTA === */
.home-cta {
	text-align: center;
	padding: var(--space-16) var(--space-6);
	background:
		radial-gradient(circle at 30% 30%, rgba(108, 140, 255, 0.10), transparent 55%),
		radial-gradient(circle at 70% 70%, rgba(184, 108, 255, 0.08), transparent 55%),
		var(--bg-tertiary);
	border-radius: var(--radius-2xl);
	margin-bottom: var(--space-12);
	border: 1px solid var(--border);
}

.home-cta h2 {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: var(--font-extrabold);
	letter-spacing: -0.02em;
	margin: 0 0 var(--space-3);
}

.home-cta p {
	font-size: var(--text-base);
	color: var(--text-muted);
	max-width: 460px;
	margin: 0 auto var(--space-8);
}

.home-cta .home-cta-actions {
	display: inline-flex;
	gap: var(--space-3);
	flex-wrap: wrap;
	justify-content: center;
}

/* === Responsive === */
@media (max-width: 960px) {
	.home-hero {
		grid-template-columns: 1fr;
		gap: var(--space-10);
		text-align: center;
	}

	.home-hero .hero-actions,
	.home-stats {
		justify-content: center;
	}

	.home-hero-visual .win {
		transform: none;
	}

	.home-hero-visual .chip {
		left: 50%;
		transform: translateX(-50%);
	}

	.highlight-band {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.home-hero-visual .win-body {
		grid-template-columns: 1fr;
	}

	.home-hero-visual .side {
		display: none;
	}

	.trust-strip {
		gap: var(--space-2) var(--space-5);
	}

	.home-section-head h2 {
		font-size: var(--text-2xl);
	}
}
