/* OmniDB Home — hero/marketing components for the homepage's <main class="hero">.
   Loaded alongside assets/topbar.css (brand tokens + shell chrome) and
   assets/style.css (shell layout: sidebar, main column, base typography) —
   this file only adds marketing-page components, scoped under .hero so it
   never collides with assets/style.css's page-wide h1/h2 rules. Brand color
   tokens below (--white/--light-blue/--dark-blue/...) alias the shared
   --brand-* tokens from topbar.css, which already flip for
   data-theme="light"/"dark" and prefers-color-scheme — see that file's
   header comment. */

:root {
	--white: var(--brand-bg);
	--light-blue: var(--brand-light-blue);
	--dark-blue: var(--brand-navy);
	--text-main: var(--brand-text);
	--text-muted: var(--brand-text-muted);
	--bg-light: var(--brand-bg-alt);
	--border-color: var(--brand-border);
	--card-bg: var(--brand-card-bg);
}

.hero {
	max-width: 880px;
	margin: 0 auto;
	padding: 8px 0 24px;
}

.eyebrow-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 18px;
	border-radius: 999px;
	border: 1px solid var(--border-color);
	background: var(--bg-light);
	color: var(--dark-blue);
	font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.82rem;
	font-weight: 700;
	margin-bottom: 26px;
}

.hero h1 {
	color: var(--dark-blue);
	font-size: 3rem;
	font-weight: 800;
	line-height: 1.1;
	margin: 0 0 22px;
	letter-spacing: -0.03em;
	border-bottom: none;
	padding-bottom: 0;
}

.hero h2 {
	color: var(--dark-blue);
	font-size: 1.6rem;
	margin: 56px 0 22px;
}

.hero .lead {
	font-size: 1.22rem;
	color: var(--text-muted);
	max-width: 680px;
	margin: 0 0 14px;
}

.hero .lead-secondary {
	font-size: 1rem;
	color: var(--text-muted);
	max-width: 680px;
	margin: 0 0 40px;
	opacity: 0.85;
}

.pg-link,
.docs-link a {
	color: var(--dark-blue);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 2px solid var(--light-blue);
}

.pg-link:hover,
.docs-link a:hover {
	opacity: 0.8;
}

/* Install callout */
.get-started {
	margin: 8px 0 52px;
}

.install-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
	margin: 26px 0 20px;
}

.install-card {
	padding: 26px;
	background-color: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: 16px;
}

.install-icon {
	font-size: 1.7rem;
	line-height: 1;
	display: block;
	margin-bottom: 10px;
}

.install-card h3 {
	color: var(--dark-blue);
	margin: 0 0 10px;
	font-size: 1.05rem;
}

.install-tag {
	margin-left: 8px;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--text-muted);
	background: var(--bg-light);
	padding: 3px 8px;
	border-radius: 999px;
	vertical-align: middle;
}

.install-card p {
	margin: 0 0 16px;
	color: var(--text-muted);
	font-size: 0.92rem;
}

.install-command-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

/* assets/style.css's generic `pre{}` rule (dark code-block background,
   meant for actual docs chapter code samples) also matches this <pre> —
   neutralize it so only .install-command's own light pill shows. */
.install-command-row pre {
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
	display: block;
	flex: 1 1 auto;
	min-width: 0;
}

.install-command {
	display: block;
	background: var(--bg-light);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	padding: 0.85rem 1.1rem;
	margin: 0;
	font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--text-main);
	white-space: pre;
	overflow-x: auto;
}

.copy-btn {
	flex: 0 0 auto;
	width: 42px;
	border: 1px solid var(--border-color);
	border-radius: 10px;
	background: var(--bg-light);
	color: var(--dark-blue);
	cursor: pointer;
	font-size: 1.05rem;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover {
	background: var(--border-color);
}

.copy-btn.copied::after {
	content: '✓';
}

.copy-btn.copied .copy-btn-icon {
	display: none;
}

.btn-small {
	padding: 9px 18px;
	font-size: 0.88rem;
	display: inline-block;
}

.docs-link {
	margin: 0 0 6px;
}

.small-note {
	opacity: 0.65;
}

/* Screenshot compare slider */
.screenshot-showcase {
	margin: 8px 0 52px;
}

.lead-small {
	color: var(--text-muted);
	margin: -6px 0 22px;
}

.compare-slider {
	position: relative;
	width: 100%;
	aspect-ratio: 2548 / 1534;
	max-width: 100%;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid var(--border-color);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
	cursor: ew-resize;
	user-select: none;
	touch-action: none;
	background: var(--bg-light);
}

.compare-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

.compare-overlay {
	clip-path: inset(0 50% 0 0);
	transition: clip-path 0.05s linear;
}

.compare-slider.is-animating .compare-overlay {
	transition: clip-path 1.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.compare-slider.is-animating .compare-handle {
	transition: left 1.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.compare-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 0;
	pointer-events: none;
}

.compare-handle::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: -1px;
	width: 2px;
	background: #ffffff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.compare-handle-grip {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--dark-blue);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.15rem;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.compare-label {
	position: absolute;
	bottom: 14px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	background: rgba(0, 0, 0, 0.55);
	color: #ffffff;
	pointer-events: none;
}

.compare-label-left {
	left: 14px;
}

.compare-label-right {
	right: 14px;
}

/* Features Grid */
.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 20px;
	margin: 26px 0 8px;
}

.feature-card {
	padding: 24px;
	aspect-ratio: 1 / 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background-color: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: 16px;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	opacity: 0;
	transform: translateY(16px);
	animation: feature-card-in 0.5s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.05s; }
.feature-card:nth-child(2) { animation-delay: 0.12s; }
.feature-card:nth-child(3) { animation-delay: 0.19s; }
.feature-card:nth-child(4) { animation-delay: 0.26s; }
.feature-card:nth-child(5) { animation-delay: 0.33s; }
.feature-card:nth-child(6) { animation-delay: 0.4s; }

@keyframes feature-card-in {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.feature-card:hover {
	transform: translateY(-4px);
	border-color: var(--light-blue);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.06);
}

.feature-icon {
	font-size: 1.8rem;
	line-height: 1;
	margin-bottom: 12px;
	display: block;
}

.feature-card h3 {
	color: var(--dark-blue);
	margin: 0 0 10px;
	font-size: 1.1rem;
}

.feature-card p {
	margin: 0;
	color: var(--text-muted);
	font-size: 0.92rem;
	line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
	.feature-card {
		opacity: 1;
		transform: none;
		animation: none;
	}

	.compare-slider.is-animating .compare-overlay,
	.compare-slider.is-animating .compare-handle {
		transition: none;
	}
}

/* Buttons */
.button-group {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin: 48px 0 8px;
}

.btn {
	text-decoration: none;
	padding: 14px 30px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 1.02rem;
	transition: all 0.2s ease;
}

.btn-primary {
	background-color: var(--dark-blue);
	color: #ffffff !important;
	box-shadow: 0 6px 16px rgba(25, 46, 77, 0.28);
}

.btn-primary:hover {
	opacity: 0.92;
	transform: translateY(-2px);
}

.btn-outline {
	border: 2px solid var(--dark-blue);
	color: var(--dark-blue);
}

.btn-outline:hover {
	background-color: var(--dark-blue);
	color: #ffffff !important;
}

/* Footer (unique element on the homepage only, safe as a bare selector).
   margin-left matches main's sidebar offset (assets/style.css) so the
   centered .footer-inner centers within the visible area, not the full
   viewport width hidden partly behind the fixed sidebar. */
footer {
	background-color: #0f172a;
	color: #f8fafc;
	padding: 56px 20px;
	margin-top: 40px;
	margin-left: 300px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
}

.footer-author {
	font-size: 1rem;
	margin: 0 0 10px;
}

.footer-copyright {
	margin: 0;
	font-size: 0.9rem;
	opacity: 0.8;
}

.footer-note {
	font-size: 0.85rem;
	margin: 22px 0 0;
	opacity: 0.55;
}

footer a {
	color: var(--light-blue);
	text-decoration: none;
	font-weight: 600;
}

footer a:hover {
	text-decoration: underline;
}

.footer-author strong {
	color: var(--light-blue);
	font-weight: 800;
}

footer p a {
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (max-width: 768px) {
	footer {
		margin-left: 0;
	}
}

@media (max-width: 640px) {
	.hero h1 {
		font-size: 2.1rem;
	}

	.button-group {
		flex-direction: column;
	}

	.button-group .btn {
		text-align: center;
	}
}
