/* ============================================================
   Liminal Salt landing page
   Theme variables — generated from chat/static/themes/liminal-salt.json
   ============================================================ */

:root {
	--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	--font-family-monospace: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

	/* Dark palette is the default so no-JS visitors get the intended look. */
	--background: #1a1c1b;
	--surface: #141615;
	--card: #242726;
	--foreground: #e8e4dc;
	--foreground-secondary: #c5c1b8;
	--foreground-muted: #9e9b93;
	--accent: #8fac98;
	--accent-hover: #a3bfac;
	--accent-foreground: #1a1c1b;
	--ring: #95bebe;
	--border: #2e312f;
	--link: #a3bfac;
	--link-hover: #c0d8c5;
}

@media (prefers-color-scheme: light) {
	:root {
		--background: #f5f2ed;
		--surface: #ebe7e0;
		--card: #fdfcfa;
		--foreground: #2d2b28;
		--foreground-secondary: #5a5753;
		--foreground-muted: #6b6762;
		--accent: #506e58;
		--accent-hover: #425f4a;
		--accent-foreground: #f5f2ed;
		--ring: #3e5d5d;
		--border: #ddd8d0;
		--link: #506e58;
		--link-hover: #425f4a;
	}
}

[data-theme="dark"] {
	--background: #1a1c1b;
	--surface: #141615;
	--card: #242726;
	--foreground: #e8e4dc;
	--foreground-secondary: #c5c1b8;
	--foreground-muted: #9e9b93;
	--accent: #8fac98;
	--accent-hover: #a3bfac;
	--accent-foreground: #1a1c1b;
	--ring: #95bebe;
	--border: #2e312f;
	--link: #a3bfac;
	--link-hover: #c0d8c5;
}

[data-theme="light"] {
	--background: #f5f2ed;
	--surface: #ebe7e0;
	--card: #fdfcfa;
	--foreground: #2d2b28;
	--foreground-secondary: #5a5753;
	--foreground-muted: #6b6762;
	--accent: #506e58;
	--accent-hover: #425f4a;
	--accent-foreground: #f5f2ed;
	--ring: #3e5d5d;
	--border: #ddd8d0;
	--link: #506e58;
	--link-hover: #425f4a;
}

/* ============================================================
   Resets and base
   ============================================================ */

* {
	box-sizing: border-box;
}

html,
body {
	padding: 0;
	margin: 0;
	font-family: var(--font-family);
	color: var(--foreground);
	background-color: var(--background);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

html {
	overflow-y: scroll;
	scroll-behavior: smooth;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--link);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:hover {
	color: var(--link-hover);
}

p {
	line-height: 1.6;
	margin: 0 0 1em;
}

h1, h2, h3 {
	line-height: 1.2;
	margin: 0 0 0.5em;
}

code, pre {
	font-family: var(--font-family-monospace);
}

:not(pre) > code {
	background: var(--card);
	border: 1px solid var(--border);
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 0.9em;
}

/* ============================================================
   Layout
   ============================================================ */

.container {
	max-width: 64em;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.container-narrow {
	max-width: 44em;
	margin: 0 auto;
	padding: 0 1.5rem;
}

#skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--background);
	color: var(--foreground);
	padding: 0.5rem 1rem;
	border: 1px solid var(--border);
	border-radius: 4px;
	z-index: 999;
}

#skip-link:focus {
	left: 1rem;
	top: 1rem;
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
	border-bottom: 1px dashed var(--border);
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 1em 0;
}

.site-title {
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--foreground);
	text-decoration: none;
	padding: 0.25em 0.5em;
	border-radius: 6px;
}

.site-title:hover {
	color: var(--foreground);
	background: var(--card);
}

.theme-toggle-btn {
	background: none;
	border: none;
	border-radius: 6px;
	padding: 0.5em;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent);
	transition: background-color 0.15s ease;
}

.theme-toggle-btn:hover {
	background-color: var(--card);
}

.theme-toggle-btn:active {
	transform: scale(0.95);
}

.theme-toggle-btn svg {
	width: 1.25rem;
	height: 1.25rem;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
	padding: 3rem 0 2rem;
	text-align: center;
}

.hero h1 {
	font-size: clamp(2.25rem, 5vw, 3.5rem);
	margin-bottom: 0.25em;
	letter-spacing: -0.02em;
}

.hero-tagline {
	font-size: 1.15rem;
	color: var(--foreground-secondary);
	max-width: 36em;
	margin: 0 auto 2rem;
}

.hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	margin-bottom: 3rem;
}

.hero-screenshot {
	border: 1px solid var(--border);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.7em 1.25em;
	border-radius: 6px;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
	background: var(--accent);
	color: var(--accent-foreground);
}

.btn-primary:hover {
	background: var(--accent-hover);
	color: var(--accent-foreground);
}

.btn-outline {
	background: transparent;
	color: var(--accent);
	border-color: var(--accent);
}

.btn-outline:hover {
	background: var(--accent);
	color: var(--accent-foreground);
}

/* ============================================================
   Sections
   ============================================================ */

.section {
	padding: 3rem 0;
	border-top: 1px dashed var(--border);
}

.section h2 {
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
	text-align: center;
}

.section-lede {
	text-align: center;
	color: var(--foreground-secondary);
	max-width: 36em;
	margin: 0 auto 2.5rem;
}

/* Why — three column pillars */
.pillars {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1.5rem;
}

.pillar h3 {
	font-size: 1.1rem;
	color: var(--accent);
	margin-bottom: 0.5em;
}

.pillar p {
	color: var(--foreground-secondary);
	margin: 0;
}

/* Features — card grid */
.features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	gap: 1.25rem;
}

.feature {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 1.25rem;
}

.feature h3 {
	font-size: 1rem;
	margin-bottom: 0.4em;
	color: var(--foreground);
}

.feature p {
	color: var(--foreground-secondary);
	margin: 0;
	font-size: 0.95rem;
}

/* Screenshot gallery */
.screenshot-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
	gap: 1.25rem;
}

.screenshot {
	margin: 0;
}

.screenshot img {
	border: 1px solid var(--border);
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.screenshot img:hover {
	transform: translateY(-2px);
	border-color: var(--accent);
	opacity: 0.95;
}

.screenshot img:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 3px;
}

.screenshot figcaption {
	margin-top: 0.6em;
	color: var(--foreground-secondary);
	font-size: 0.9rem;
	text-align: center;
}

/* ============================================================
   Modal (image lightbox)
   ============================================================ */

.modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	animation: modal-fade-in 0.15s ease;
}

.modal[hidden] {
	display: none;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.75);
	cursor: zoom-out;
}

.modal-container {
	position: relative;
	z-index: 1001;
	max-width: 100%;
	max-height: 100%;
}

.modal-image-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	animation: modal-slide-in 0.2s ease;
}

.modal-image-full {
	max-width: 100%;
	max-height: calc(100vh - 6rem);
	border-radius: 8px;
	border: 1px solid var(--border);
	box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.6);
}

.modal-image-caption {
	margin: 0;
	color: var(--foreground-secondary);
	font-size: 0.9rem;
	text-align: center;
}

.modal-close {
	position: absolute;
	top: -0.5rem;
	right: -0.5rem;
	background: var(--card);
	color: var(--foreground);
	border: 1px solid var(--border);
	border-radius: 999px;
	width: 2.25rem;
	height: 2.25rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1002;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.modal-close:hover {
	background: var(--accent);
	color: var(--accent-foreground);
	border-color: var(--accent);
}

.modal-close:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 2px;
}

@keyframes modal-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes modal-slide-in {
	from { transform: translateY(8px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

/* Theme card */
.theme-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 2rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
}

@media (min-width: 48em) {
	.theme-card {
		grid-template-columns: 1.5fr 1fr;
	}
}

.theme-card h2 {
	text-align: left;
	margin-top: 0;
	font-size: 1.6rem;
}

.theme-card p {
	color: var(--foreground-secondary);
}

.theme-tools {
	font-size: 0.95rem;
	line-height: 1.9;
	margin-bottom: 1.5rem;
}

.theme-tools strong {
	color: var(--foreground);
	display: inline-block;
	min-width: 5.5em;
}

.theme-card-palette {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	max-width: 18rem;
	margin: 0 auto;
}

.theme-card-palette .swatch {
	display: block;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 8px;
	border: 1px solid var(--border);
}

/* Quick start */
.quick-start pre {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 1rem 1.25rem;
	overflow-x: auto;
	margin: 1rem 0;
	line-height: 1.5;
	font-size: 0.95rem;
}

.quick-start ul {
	color: var(--foreground-secondary);
	padding-left: 1.25em;
}

.quick-start li {
	margin-bottom: 0.4em;
}

/* ============================================================
   404 page
   ============================================================ */

.not-found {
	padding: 5rem 0 6rem;
	text-align: center;
}

.not-found-code {
	font-family: var(--font-family-monospace);
	font-size: clamp(4rem, 12vw, 8rem);
	line-height: 1;
	margin: 0 0 0.5rem;
	color: var(--accent);
	letter-spacing: -0.05em;
}

.not-found h1 {
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin: 0 0 1rem;
	letter-spacing: -0.01em;
}

.not-found-message {
	color: var(--foreground-secondary);
	max-width: 32em;
	margin: 0 auto 2rem;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
	border-top: 1px dashed var(--border);
	padding: 2rem 0 3rem;
	color: var(--foreground-muted);
	font-size: 0.9rem;
	text-align: center;
}

.site-footer p {
	margin: 0 0 0.5em;
}
