/* iVote — ivote.cz */

:root {
	--bg: #fbfbfd;
	--bg-alt: #f5f5f7;
	--surface: #ffffff;
	--text: #1d1d1f;
	--muted: #6e6e73;
	--line: rgba(0, 0, 0, 0.08);
	--red: #d70d0a;
	--navy: #1a4c8c;
	--accent: #c4102b;
	--grad: linear-gradient(120deg, #e3130c 0%, #8e2a63 50%, #1a4c8c 100%);
	--nav-bg: rgba(251, 251, 253, 0.72);
	--bezel: #1d1d1f;
	--shadow: 0 30px 60px -20px rgba(20, 20, 40, 0.28), 0 18px 36px -18px rgba(0, 0, 0, 0.22);
	--radius: 28px;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #000000;
		--bg-alt: #0b0b0d;
		--surface: #1c1c1e;
		--text: #f5f5f7;
		--muted: #a1a1a6;
		--line: rgba(255, 255, 255, 0.12);
		--accent: #ff4d55;
		--grad: linear-gradient(120deg, #ff3b30 0%, #c04b9b 50%, #5b8def 100%);
		--nav-bg: rgba(0, 0, 0, 0.66);
		--bezel: #2c2c2e;
		--shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.9);
	}
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.47;
	letter-spacing: -0.01em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.07; }

p { margin: 0; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* Centred blocks stack their children as flex items, so each one is only as wide as its text.
   Safari paints a multi-line selection out to the edges of the enclosing block; this keeps the
   highlight on the text instead of across the whole window. */
.hero > .wrap, .section-head, .privacy > .wrap, .final > .wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
}
.doc .wrap, .doc-en {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.doc .summary, .doc-en { align-self: stretch; }

.gradient-text {
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* ---------- Navigation ---------- */

.nav {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--nav-bg);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--line);
}

.nav .wrap {
	display: flex;
	align-items: center;
	gap: 24px;
	height: 52px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	font-weight: 700;
	font-size: 19px;
	letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand .i { color: var(--red); }

.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 13px; }
.nav-links a { color: var(--text); opacity: 0.8; }
.nav-links a:hover { opacity: 1; text-decoration: none; }

.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 980px;
	background: var(--text);
	color: var(--bg);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}
.pill:hover { text-decoration: none; opacity: 0.85; }

/* ---------- Hero ---------- */

.hero { padding: 88px 0 0; text-align: center; overflow: hidden; }

.eyebrow {
	font-size: 15px;
	font-weight: 600;
	color: var(--muted);
	letter-spacing: 0;
	margin-bottom: 14px;
}

.hero h1 { font-size: clamp(48px, 9vw, 96px); letter-spacing: -0.04em; }

.lead {
	max-width: 640px;
	margin: 22px auto 0;
	font-size: clamp(19px, 2.4vw, 24px);
	line-height: 1.38;
	color: var(--muted);
	letter-spacing: -0.015em;
}
.lead strong { color: var(--text); font-weight: 600; }

.cta { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 32px; flex-wrap: wrap; }
.cta .badge img { height: 54px; width: auto; }
.cta .more { font-size: 17px; }

.hero-phones {
	position: relative;
	height: 540px;
	margin-top: 80px;
	/* Clip only the bottom edge, so the phones run into the stats strip without hiding their shadows. */
	clip-path: inset(-200px -100vw 0 -100vw);
}
.hero-phones .phone { position: absolute; top: 56px; left: calc(50% - var(--w) / 2); }
.hero-phones .phone.center { z-index: 2; --w: 300px; top: 0; }
.hero-phones .phone.left { transform: translateX(-230px) rotate(-6deg); }
.hero-phones .phone.right { transform: translateX(230px) rotate(6deg); }

/* ---------- Phone frame ---------- */

/* Proportions of iPhone 17 Pro: screen corner radius ≈ 13.7 % of the screen width,
   Dynamic Island 125 × 37 pt, 11 pt from the top of a 402 pt wide screen. */
.phone {
	--w: 270px;
	--bz: calc(var(--w) * 0.03);
	--r: calc(var(--w) * 0.94 * 0.137);
	position: relative;
	width: var(--w);
	padding: var(--bz);
	border-radius: calc(var(--r) + var(--bz));
	background: var(--bezel);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 0 0 2px rgba(0, 0, 0, 0.5), var(--shadow);
	flex-shrink: 0;
}
.phone .screen {
	position: relative;
	overflow: hidden;
	border-radius: var(--r);
	background: #f9f9f9;
}
.phone img { width: 100%; height: auto; }
.phone .screen::after {
	content: "";
	position: absolute;
	top: calc(var(--w) * 0.94 * 11 / 402);
	left: 50%;
	width: calc(var(--w) * 0.94 * 125 / 402);
	height: calc(var(--w) * 0.94 * 37 / 402);
	transform: translateX(-50%);
	border-radius: 999px;
	background: #000;
}

/* ---------- Stats ---------- */

.stats {
	position: relative;
	z-index: 3;
	background: var(--bg);
	border-top: 1px solid var(--line);
	padding: 56px 0;
}
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat b { display: block; font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; }

/* ---------- Sections ---------- */

section { padding: 120px 0; }
.alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 72px; }
.section-head h2 { font-size: clamp(36px, 6vw, 64px); }
.section-head p { margin-top: 18px; font-size: clamp(19px, 2.2vw, 22px); color: var(--muted); line-height: 1.4; }

.kicker {
	display: block;
	margin-bottom: 12px;
	font-size: 15px;
	font-weight: 600;
	color: var(--accent);
	letter-spacing: 0;
}

/* Feature rows */

.feature {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 64px;
	padding: 0 64px;
	border-radius: var(--radius);
	background: var(--surface);
	overflow: hidden;
}
.feature + .feature { margin-top: 28px; }
.feature.flip { grid-template-columns: auto 1fr; }
.feature.flip .feature-text { order: 2; }
.feature-text { padding: 64px 0; }
.feature-text h3 { font-size: clamp(30px, 4vw, 44px); }
.feature-text p { margin-top: 18px; font-size: 19px; color: var(--muted); line-height: 1.47; max-width: 460px; }
.feature-text p strong { color: var(--text); font-weight: 600; }

.feature-media {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 20px;
	align-self: end;
	height: 500px;
	padding-top: 56px;
	overflow: hidden;
}
.feature-media .phone { --w: 260px; }
.feature-media.duo .phone { --w: 230px; }
.feature-media.duo .phone:nth-child(2) { margin-top: 48px; }

/* Bento cards */

.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 28px; }
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 36px 32px 0;
	border-radius: var(--radius);
	background: var(--surface);
	overflow: hidden;
	min-height: 520px;
}
.card h3 { font-size: 26px; }
.card p { margin-top: 10px; color: var(--muted); font-size: 17px; }
.card .phone { --w: 220px; margin: 32px auto -120px; }

/* Small feature list */

.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 28px; }
.extra { padding: 32px; border-radius: var(--radius); background: var(--surface); }
.extra svg { display: block; width: 34px; height: 34px; color: var(--accent); }
.extra h3 { margin-top: 18px; font-size: 21px; letter-spacing: -0.02em; }
.extra p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.tag {
	display: inline-block;
	margin-left: 6px;
	padding: 3px 9px;
	border-radius: 980px;
	background: var(--grad);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	vertical-align: 3px;
}

/* ---------- Elections ---------- */

.elections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.election {
	padding: 30px 28px;
	border-radius: 22px;
	background: var(--surface);
	border: 1px solid var(--line);
}
.election .count { font-size: 15px; font-weight: 600; color: var(--accent); }
.election h3 { margin-top: 6px; font-size: 24px; letter-spacing: -0.02em; }
.years { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.years span {
	padding: 3px 10px;
	border-radius: 980px;
	background: var(--bg-alt);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	color: var(--muted);
}
.source { margin-top: 36px; text-align: center; color: var(--muted); font-size: 15px; }

/* ---------- Privacy ---------- */

.privacy { text-align: center; }
.privacy .lock {
	width: 76px;
	height: 76px;
	margin: 0 auto 28px;
	color: var(--accent);
}
.privacy h2 { font-size: clamp(36px, 6vw, 64px); }
.privacy p { max-width: 640px; margin: 20px auto 0; font-size: clamp(19px, 2.2vw, 22px); color: var(--muted); line-height: 1.4; }
.privacy .link { display: inline-block; margin-top: 24px; font-size: 19px; }

/* ---------- Final CTA ---------- */

.final { text-align: center; padding-bottom: 140px; }
.final .app-icon {
	width: 128px;
	height: 128px;
	margin: 0 auto 28px;
	border-radius: 29px;
	box-shadow: 0 20px 40px -12px rgba(140, 20, 50, 0.45);
}
.final h2 { font-size: clamp(40px, 7vw, 72px); }
.final p { margin-top: 14px; font-size: 21px; color: var(--muted); }

/* ---------- Footer ---------- */

.footer {
	padding: 28px 0 40px;
	background: var(--bg-alt);
	border-top: 1px solid var(--line);
	font-size: 12px;
	color: var(--muted);
}
.footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer a { color: var(--text); opacity: 0.8; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Document pages (privacy policy) ---------- */

.doc { padding: 88px 0 120px; }
.doc .wrap { max-width: 720px; }
.doc h1 { font-size: clamp(40px, 7vw, 64px); }
.doc .summary {
	margin-top: 32px;
	padding: 24px 28px;
	border-radius: 20px;
	background: var(--surface);
	border: 1px solid var(--line);
	font-size: 19px;
	font-weight: 600;
	color: var(--text);
}
.doc h2 { margin-top: 48px; font-size: 28px; letter-spacing: -0.02em; }
.doc p { margin-top: 16px; font-size: 18px; color: var(--muted); line-height: 1.55; }
.doc .intro { margin-top: 24px; font-size: 21px; color: var(--text); line-height: 1.45; }
.doc .kicker { margin-bottom: 14px; }
.doc-en { margin-top: 72px; padding-top: 56px; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.doc-en h2 { margin-top: 0; }
.doc-en h3 { margin-top: 36px; font-size: 21px; letter-spacing: -0.02em; }
.doc-en p { font-size: 16px; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
	.feature, .feature.flip { grid-template-columns: 1fr; gap: 0; padding: 0 32px; text-align: center; }
	.feature.flip .feature-text { order: 0; }
	.feature-text { padding: 48px 0 0; }
	.feature-text p { margin-inline: auto; }
	.feature-media { height: 440px; padding-top: 40px; }
	.bento, .extras { grid-template-columns: 1fr 1fr; }
	.bento .card:last-child { grid-column: 1 / -1; }
	.elections { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 734px) {
	body { font-size: 16px; }
	.nav-links { display: none; }
	.nav .pill { margin-left: auto; }
	.hero { padding-top: 56px; }
	.hero-phones { height: 430px; margin-top: 56px; }
	.hero-phones .phone { top: 44px; }
	.hero-phones .phone.center { --w: 230px; }
	.hero-phones .phone { --w: 200px; }
	.hero-phones .phone.left { transform: translateX(-150px) rotate(-6deg); }
	.hero-phones .phone.right { transform: translateX(150px) rotate(6deg); }
	.stats .wrap { grid-template-columns: 1fr 1fr; row-gap: 36px; }
	section { padding: 80px 0; }
	.section-head { margin-bottom: 48px; }
	.feature, .feature.flip { padding: 0 20px; }
	.feature-text { padding-top: 40px; }
	.feature-text p { font-size: 17px; }
	.feature-media { height: 380px; }
	.feature-media .phone { --w: 230px; }
	.feature-media.duo { gap: 12px; }
	.feature-media.duo .phone { --w: 160px; }
	.feature-media.duo .phone:nth-child(2) { margin-top: 32px; }
	.bento, .extras, .elections { grid-template-columns: 1fr; }
	.card { min-height: 0; }
	.card .phone { --w: 220px; }
	.footer .wrap { flex-direction: column; }
}
