@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
	--bg: #faf8f5;
	--surface: #fff;
	--surface-alt: #f2eeea;
	--border: #e5e0da;
	--text: #2c2825;
	--text-dim: #8a8279;
	--accent: #e04e2f;
	--accent-soft: #fbeae6;
	--accent-2: #2d7aed;
	--serif: 'Instrument Serif', Georgia, serif;
	--sans: 'Outfit', sans-serif;
	--radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
	font-family: var(--sans);
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header */
.header { padding: 18px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo {
	font-family: var(--serif);
	font-size: 26px;
	font-style: italic;
	color: var(--text);
	text-decoration: none;
}
.logo em { font-style: italic; color: var(--accent); }
.header-nav a {
	color: var(--text-dim);
	font-size: 14px;
	font-weight: 500;
	margin-left: 20px;
	transition: color 0.15s;
}
.header-nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
	padding: 70px 0 30px;
	text-align: center;
}
.hero .badge {
	display: inline-block;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 13px;
	font-weight: 600;
	padding: 6px 16px;
	border-radius: 100px;
	margin-bottom: 24px;
	letter-spacing: 0.3px;
}
.hero h1 {
	font-family: var(--serif);
	font-size: clamp(36px, 6vw, 56px);
	font-weight: 400;
	line-height: 1.1;
	margin-bottom: 18px;
	letter-spacing: -1px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-desc {
	color: var(--text-dim);
	font-size: 17px;
	max-width: 480px;
	margin: 0 auto 44px;
	line-height: 1.6;
	font-weight: 300;
}

/* Search */
.search-wrap {
	max-width: 600px;
	margin: 0 auto;
	background: var(--surface);
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	display: flex;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0,0,0,0.04);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap:focus-within {
	border-color: var(--accent);
	box-shadow: 0 4px 20px rgba(224, 78, 47, 0.1);
}
.search-wrap input {
	flex: 1;
	min-width: 0;
	padding: 16px 20px;
	border: none;
	background: transparent;
	font-family: var(--sans);
	font-size: 15px;
	color: var(--text);
	outline: none;
}
.search-wrap input::placeholder { color: #c0b8b0; }
.search-wrap button {
	padding: 16px 28px;
	background: var(--accent);
	color: #fff;
	border: none;
	font-family: var(--sans);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}
.search-wrap button:hover { background: #c9401f; }
.search-wrap button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Loading */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: flex; }
.loading-bar {
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 32px 0;
	color: var(--text-dim);
	font-size: 14px;
}
.loading-bar .dot {
	width: 8px; height: 8px;
	background: var(--accent);
	border-radius: 50%;
	animation: pulse 1.2s ease-in-out infinite;
}
.loading-bar .dot:nth-child(2) { animation-delay: 0.2s; }
.loading-bar .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }

/* Intro */
.intro {
	padding: 60px 0;
}
.intro-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
}
.intro-text h2 {
	font-family: var(--serif);
	font-size: 32px;
	line-height: 1.2;
	margin-bottom: 16px;
}
.intro-text p {
	color: var(--text-dim);
	line-height: 1.7;
	font-size: 15px;
	font-weight: 300;
}
.intro-cards { display: flex; flex-direction: column; gap: 12px; }
.intro-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 18px 20px;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	transition: transform 0.15s, box-shadow 0.15s;
}
.intro-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.05); }
.intro-card .num {
	font-family: var(--serif);
	font-size: 28px;
	color: var(--accent);
	line-height: 1;
	flex-shrink: 0;
	width: 32px;
}
.intro-card .txt h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.intro-card .txt p { font-size: 13px; color: var(--text-dim); line-height: 1.5; font-weight: 300; }

/* Features */
.features { padding: 50px 0 60px; }
.features h2 {
	font-family: var(--serif);
	font-size: 32px;
	text-align: center;
	margin-bottom: 40px;
}
.feat-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.feat-item {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 28px 22px;
	text-align: center;
	transition: transform 0.15s, box-shadow 0.15s;
}
.feat-item:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.feat-item .icon { font-size: 28px; margin-bottom: 14px; }
.feat-item h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feat-item p { font-size: 13px; color: var(--text-dim); line-height: 1.6; font-weight: 300; }

/* FAQ */
.faq { padding: 50px 0 60px; }
.faq h2 {
	font-family: var(--serif);
	font-size: 32px;
	text-align: center;
	margin-bottom: 36px;
}
.faq-list { max-width: 640px; margin: 0 auto; }
.faq-item {
	border-bottom: 1px solid var(--border);
	padding: 18px 0;
}
.faq-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.faq-item p { font-size: 14px; color: var(--text-dim); line-height: 1.6; font-weight: 300; }

/* Footer */
.footer {
	padding: 30px 0;
	border-top: 1px solid var(--border);
	text-align: center;
}
.footer-links a { color: var(--text-dim); font-size: 13px; margin: 0 10px; font-weight: 500; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy { font-size: 12px; color: #c0b8b0; margin-top: 10px; }

/* Download Result */
.dl-wrap { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dl-header { display: flex; gap: 20px; padding: 20px; }
.dl-header img { width: 200px; border-radius: 10px; flex-shrink: 0; }
.dl-header .info { display: flex; flex-direction: column; justify-content: center; }
.dl-header .info h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; word-break: break-word; }
.dl-header .info .meta { font-size: 13px; color: var(--text-dim); }
.dl-body { padding: 0 20px 20px; }
.dl-body h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin: 16px 0 10px; }
.dl-table { width: 100%; border-collapse: collapse; }
.dl-table th, .dl-table td { padding: 10px 12px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.dl-table th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); }
.dl-btn {
	display: inline-block;
	padding: 7px 20px;
	background: var(--accent);
	color: #fff;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s;
}
.dl-btn:hover { background: #c9401f; text-decoration: none; color: #fff; }

/* Search Results */
.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 20px; }
.search-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.search-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.search-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.search-card .info { padding: 10px 12px; }
.search-card .info span { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.search-card .info button {
	margin-top: 8px; width: 100%; padding: 8px; background: var(--accent); color: #fff;
	border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.search-card .info button:hover { background: #c9401f; }

/* Responsive */
@media (max-width: 640px) {
	.hero { padding: 40px 0 20px; }
	.search-wrap { flex-direction: column; }
	.search-wrap button { padding: 14px; }
	.intro-grid { grid-template-columns: 1fr; gap: 32px; }
	.feat-row { grid-template-columns: 1fr; }
	.dl-header { flex-direction: column; }
	.dl-header img { width: 100%; }
	.header-nav { display: none; }
}
