@font-face {
	font-family: "Space Grotesk";
	src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
	font-weight: 300 700;
	font-display: swap;
}

@font-face {
	font-family: "Inter";
	src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
}

:root {
	--bg: #f6f4ef;
	--surface: #ffffff;
	--ink: #141414;
	--muted: #5c5b55;
	--line: #e3e0d8;
	--accent: #1f4fd8;
	--accent-ink: #ffffff;
	--accent-soft: #e6ecfc;
	--ok: #1d7a46;
	--err: #b3261e;
	--radius: 14px;
	--wrap: 1120px;
	--head: "Space Grotesk", system-ui, sans-serif;
	--body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #111214;
		--surface: #191a1d;
		--ink: #f1efe9;
		--muted: #a4a29b;
		--line: #2c2d31;
		--accent: #7d9cff;
		--accent-ink: #0d0f14;
		--accent-soft: #1d2440;
		--ok: #5cc48a;
		--err: #ff8a80;
	}
}

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 17px/1.6 var(--body);
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * clamp(16px, 4vw, 40px));
	margin: 0 auto;
	padding: 0 clamp(16px, 4vw, 40px);
}

.icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
	vertical-align: -0.2em;
}

/* Header */
header {
	border-bottom: 1px solid var(--line);
}

header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 68px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--head);
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-decoration: none;
}

.brand span {
	color: var(--muted);
	font-weight: 500;
}

.lang {
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	padding: 6px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
}

.lang:hover {
	border-color: var(--ink);
}

/* Hero and converter */
.hero {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: center;
	padding-top: clamp(40px, 7vw, 96px);
	padding-bottom: clamp(40px, 6vw, 80px);
}

.kicker {
	margin: 0 0 14px;
	color: var(--accent);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

h1 {
	margin: 0;
	font-family: var(--head);
	font-size: clamp(2.4rem, 5.6vw, 4.4rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
}

.lead {
	margin: 20px 0 0;
	color: var(--muted);
	font-size: clamp(1.05rem, 1.6vw, 1.2rem);
	max-width: 34ch;
}

.facts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.95rem;
	font-weight: 500;
}

.facts li {
	display: flex;
	align-items: center;
	gap: 8px;
}

.facts .icon {
	color: var(--accent);
}

.box {
	position: relative;
	padding: clamp(20px, 3vw, 32px);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 6px);
	box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.35);
}

.drop {
	display: grid;
	place-items: center;
	gap: 14px;
	min-height: 300px;
	padding: 28px 20px;
	border: 2px dashed var(--line);
	border-radius: var(--radius);
	text-align: center;
	cursor: pointer;
	transition: border-color 0.25s ease, background-color 0.25s ease;
}

.drop:hover,
.drop.is-over {
	border-color: var(--accent);
	background: var(--accent-soft);
}

.drop .big {
	width: 56px;
	height: 56px;
	padding: 14px;
	border-radius: 16px;
	background: var(--accent-soft);
	color: var(--accent);
}

.drop strong {
	display: block;
	font-family: var(--head);
	font-size: 1.35rem;
	letter-spacing: -0.02em;
}

.drop p {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--ink);
	color: var(--bg);
	font: 600 1rem var(--body);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

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

.btn:active {
	transform: scale(0.97);
}

.btn.ghost {
	background: transparent;
	color: var(--ink);
	border: 1.5px solid var(--line);
}

.btn.ghost:hover {
	border-color: var(--ink);
	background: transparent;
	color: var(--ink);
}

.state {
	display: none;
	min-height: 300px;
	place-items: center;
	align-content: center;
	gap: 16px;
	text-align: center;
	padding: 20px;
}

.box[data-state="busy"] .drop,
.box[data-state="done"] .drop,
.box[data-state="error"] .drop {
	display: none;
}

.box[data-state="busy"] .state-busy,
.box[data-state="done"] .state-done,
.box[data-state="error"] .state-error {
	display: grid;
}

.file-name {
	max-width: 100%;
	overflow: hidden;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.spin {
	width: 44px;
	height: 44px;
	color: var(--accent);
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.bar {
	width: min(320px, 100%);
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--line);
}

.bar span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--accent);
	transition: width 0.3s ease;
}

.step-text {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.state-done .big,
.state-error .big {
	width: 56px;
	height: 56px;
	padding: 14px;
	border-radius: 16px;
}

.state-done .big {
	background: color-mix(in srgb, var(--ok) 14%, transparent);
	color: var(--ok);
}

.state-error .big {
	background: color-mix(in srgb, var(--err) 14%, transparent);
	color: var(--err);
}

.state h2 {
	margin: 0;
	font-family: var(--head);
	font-size: 1.5rem;
	letter-spacing: -0.02em;
}

.state .actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.note {
	margin: 16px 0 0;
	color: var(--muted);
	font-size: 0.85rem;
	text-align: center;
}

/* Sections */
section {
	padding: clamp(48px, 7vw, 96px) 0;
	border-top: 1px solid var(--line);
}

h2.title {
	margin: 0 0 32px;
	font-family: var(--head);
	font-size: clamp(1.8rem, 3.4vw, 2.6rem);
	letter-spacing: -0.03em;
	line-height: 1.1;
}

.grid3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(20px, 3vw, 40px);
}

.grid3 > div {
	padding-top: 18px;
	border-top: 2px solid var(--ink);
}

.grid3 .num {
	color: var(--accent);
	font-family: var(--head);
	font-weight: 700;
}

.grid3 h3 {
	margin: 6px 0 6px;
	font-family: var(--head);
	font-size: 1.2rem;
	letter-spacing: -0.01em;
}

.grid3 p {
	margin: 0;
	color: var(--muted);
}

.faq > * {
	max-width: 760px;
}

.faq details {
	border-bottom: 1px solid var(--line);
}

.faq summary {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 0;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.faq summary::-webkit-details-marker {
	display: none;
}

.faq summary::after {
	content: "+";
	color: var(--accent);
	font-size: 1.3rem;
	line-height: 1;
}

.faq details[open] summary::after {
	content: "\2212";
}

.faq details p {
	margin: 0 0 18px;
	color: var(--muted);
}

footer {
	padding: 32px 0 48px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.9rem;
}

footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px 24px;
}

footer nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

footer a {
	text-decoration: none;
}

footer a:hover {
	color: var(--ink);
}

@media (max-width: 860px) {
	.hero {
		grid-template-columns: minmax(0, 1fr);
	}

	.grid3 {
		grid-template-columns: minmax(0, 1fr);
	}

	.drop,
	.state {
		min-height: 240px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
