/* Offline Bilingual Translator — project site styles.
   No external fonts, no CDN: the site works offline, like the extension. */

:root {
	--bg: #f6f8fd;
	--bg-soft: #eef2fb;
	--surface: #ffffff;
	--text: #16203a;
	--muted: #5b6785;
	--brand: #3a63f3;
	--brand-2: #7a55e6;
	--accent: #0f9d81;
	--border: #e3e8f4;
	--shadow: 0 18px 45px rgba(29, 47, 100, 0.1);
	--shadow-sm: 0 8px 24px rgba(29, 47, 100, 0.07);
	--radius: 18px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0d1220;
		--bg-soft: #141c2e;
		--surface: #161e31;
		--text: #eef2ff;
		--muted: #9aa8c4;
		--brand: #7b9cff;
		--brand-2: #b394ff;
		--accent: #4fd1ae;
		--border: #27324c;
		--shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
		--shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.25);
	}
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

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

:focus-visible {
	outline: 3px solid var(--brand);
	outline-offset: 3px;
	border-radius: 6px;
}

.container {
	width: min(1120px, calc(100% - 40px));
	margin: 0 auto;
}

/* ---------- header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: color-mix(in srgb, var(--bg) 86%, transparent);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 68px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 11px;
	font-weight: 700;
	font-size: 16px;
	color: var(--text);
	letter-spacing: 0.2px;
}

.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }

.nav {
	display: flex;
	align-items: center;
	gap: 22px;
	margin-left: auto;
}

.nav a {
	color: var(--muted);
	font-size: 14px;
	font-weight: 500;
}

.nav a:hover { color: var(--brand); text-decoration: none; }

.lang-switch {
	display: inline-flex;
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 3px;
	background: var(--surface);
	gap: 2px;
}

.lang-switch button {
	border: 0;
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 11px;
	border-radius: 999px;
	cursor: pointer;
}

.lang-switch button.active {
	background: var(--brand);
	color: #fff;
}

/* ---------- hero ---------- */

.hero {
	position: relative;
	overflow: hidden;
	padding: 86px 0 64px;
}

.hero::before {
	content: "";
	position: absolute;
	inset: -180px -10% auto 35%;
	height: 620px;
	background: radial-gradient(circle at 50% 50%, rgba(122, 85, 230, 0.18), transparent 62%);
	pointer-events: none;
}

.hero-grid {
	position: relative;
	display: grid;
	grid-template-columns: 1.02fr 1fr;
	gap: 56px;
	align-items: center;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--brand);
	background: color-mix(in srgb, var(--brand) 10%, var(--surface));
	border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border));
	padding: 5px 13px;
	border-radius: 999px;
	margin-bottom: 22px;
}

.eyebrow-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent);
}

h1 {
	font-size: clamp(34px, 4.6vw, 56px);
	line-height: 1.18;
	letter-spacing: -0.5px;
	margin: 0 0 20px;
}

h1 .gradient {
	background: linear-gradient(100deg, var(--brand), var(--brand-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero-lead {
	font-size: 18px;
	color: var(--muted);
	max-width: 520px;
	margin: 0 0 30px;
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 22px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 12px 22px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
	color: #fff;
	background: linear-gradient(105deg, var(--brand), var(--brand-2));
	box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 30%, transparent);
}
.btn-secondary {
	background: var(--surface);
	border-color: var(--border);
	color: var(--text);
	box-shadow: var(--shadow-sm);
}

.btn svg { width: 17px; height: 17px; }

.hero-note { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- demo window ---------- */

.demo-window {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	transform: rotate(1deg);
}

.demo-bar {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 11px 16px;
	background: var(--bg-soft);
	border-bottom: 1px solid var(--border);
}

.demo-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff6a6a; }
.demo-dot:nth-child(2) { background: #ffc44d; }
.demo-dot:nth-child(3) { background: #4dcb8b; }

.demo-url {
	margin-left: 12px;
	font-size: 12px;
	color: var(--muted);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 3px 12px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.demo-badge {
	margin-left: auto;
	font-size: 11px;
	font-weight: 600;
	color: var(--accent);
	white-space: nowrap;
}

.demo-body { padding: 26px 26px 20px; }
.demo-title { font-size: 17px; font-weight: 700; margin: 0 0 18px; }
.demo-orig { font-size: 14px; line-height: 1.8; margin: 0 0 6px; }
.demo-trans {
	font-size: 13px;
	line-height: 1.75;
	color: var(--muted);
	border-left: 2px solid var(--brand);
	padding-left: 12px;
	margin: 0 0 20px;
}
.demo-trans:last-child { margin-bottom: 4px; }

/* ---------- stats ---------- */

.stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	padding: 0 0 12px;
}

.stat {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 18px 20px;
	box-shadow: var(--shadow-sm);
}

.stat strong {
	display: block;
	font-size: 22px;
	letter-spacing: -0.4px;
	background: linear-gradient(100deg, var(--brand), var(--brand-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.stat span { font-size: 13px; color: var(--muted); }

/* ---------- sections ---------- */

section { padding: 62px 0 0; }

.section-head { max-width: 700px; margin-bottom: 32px; }
.section-head h2 {
	font-size: clamp(25px, 3vw, 34px);
	line-height: 1.3;
	margin: 0 0 10px;
	letter-spacing: -0.3px;
}
.section-head p { color: var(--muted); margin: 0; font-size: 16px; }

.kicker {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--brand);
	margin: 0 0 10px;
}

/* ---------- features ---------- */

.feature-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 26px 24px;
	box-shadow: var(--shadow-sm);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-icon {
	width: 46px;
	height: 46px;
	border-radius: 13px;
	display: grid;
	place-items: center;
	color: #fff;
	background: linear-gradient(135deg, var(--brand), var(--brand-2));
	margin-bottom: 18px;
}

.card:nth-child(2n) .card-icon { background: linear-gradient(135deg, #4c74f5, #12a5b8); }
.card:nth-child(3n) .card-icon { background: linear-gradient(135deg, #8a5cf0, #e06a9c); }
.card-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.card h3 { font-size: 17px; margin: 0 0 8px; }
.card p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- split / offline ---------- */

.split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 44px;
	align-items: center;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 24px;
	padding: 42px;
	box-shadow: var(--shadow-sm);
}

.split h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 14px; line-height: 1.3; }
.split p { color: var(--muted); margin: 0 0 18px; }

.flow-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.flow-list li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 14px 16px;
	font-size: 14px;
}
.flow-list b { display: block; font-size: 14px; }
.flow-list small { color: var(--muted); }
.flow-num {
	flex: none;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.network-box {
	background: var(--bg-soft);
	border: 1px dashed var(--border);
	border-radius: 16px;
	padding: 22px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
}

.network-box .line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.network-box .line:last-child { border-bottom: 0; }
.network-box .ok { color: var(--accent); font-weight: 700; }
.network-box .muted { color: var(--muted); }

/* ---------- steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow-sm);
}
.step-num {
	font-size: 13px;
	font-weight: 700;
	color: var(--brand);
	letter-spacing: 1px;
	margin-bottom: 10px;
}
.step h3 { font-size: 16px; margin: 0 0 8px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }
.step code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: 5px;
	padding: 1px 5px;
	word-break: break-all;
}

/* ---------- pipeline ---------- */

.pipeline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px;
	box-shadow: var(--shadow-sm);
}

.pipe-node {
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 9px 14px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}
.pipe-node.hl {
	color: #fff;
	background: linear-gradient(105deg, var(--brand), var(--brand-2));
	border-color: transparent;
}
.pipe-arrow { color: var(--muted); font-size: 15px; }

/* ---------- faq ---------- */

.faq { display: grid; gap: 12px; }
.faq details {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 16px 20px;
	box-shadow: var(--shadow-sm);
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.faq details p { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

/* ---------- cta ---------- */

.cta {
	margin-top: 70px;
	background: linear-gradient(120deg, var(--brand), var(--brand-2));
	border-radius: 24px;
	padding: 46px 40px;
	text-align: center;
	color: #fff;
	box-shadow: var(--shadow);
}
.cta h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 10px; }
.cta p { margin: 0 0 24px; opacity: 0.9; }
.cta .btn-primary { background: #fff; color: var(--brand); box-shadow: none; }
.cta .btn-secondary { background: transparent; border-color: rgba(255, 255, 255, 0.6); color: #fff; box-shadow: none; }

/* ---------- footer ---------- */

footer {
	margin-top: 70px;
	border-top: 1px solid var(--border);
	padding: 36px 0 44px;
	color: var(--muted);
	font-size: 14px;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }

/* ---------- privacy page ---------- */

.prose { max-width: 820px; }
.prose h1 { font-size: clamp(30px, 4vw, 44px); margin: 12px 0 8px; }
.prose .updated { color: var(--muted); font-size: 14px; margin: 0 0 36px; }
.prose h2 { font-size: 21px; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--muted); font-size: 15px; }
.prose ul { padding-left: 22px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.prose th { background: var(--bg-soft); color: var(--text); }
.prose td { color: var(--muted); }
.prose .callout {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 4px solid var(--accent);
	border-radius: 12px;
	padding: 18px 20px;
	margin: 0 0 28px;
	box-shadow: var(--shadow-sm);
}
.prose .callout strong { color: var(--text); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
	.hero-grid, .split { grid-template-columns: 1fr; gap: 34px; }
	.hero { padding: 56px 0 40px; }
	.demo-window { transform: none; }
	.feature-grid, .steps { grid-template-columns: repeat(2, 1fr); }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.split { padding: 30px; }
}

@media (max-width: 640px) {
	.container { width: min(100% - 28px, 1120px); }
	.header-inner { min-height: 60px; }
	.brand span { display: none; }
	.nav { gap: 14px; }
	.nav .nav-hide-sm { display: none; }
	.hero { padding: 42px 0 28px; }
	.feature-grid, .steps, .stats { grid-template-columns: 1fr; }
	.hero-lead { font-size: 16px; }
	.cta { padding: 36px 22px; }
	.demo-body { padding: 20px 18px; }
	.split { padding: 22px; }
}
