/* sitnis.rs: the app's design language (ui/src/app.css), light and dark
   following the system, the app's coral accent ("Crvena" in ui/src/lib/prefs.ts), the system font. No web fonts, no
   scripts. */

:root {
	color-scheme: light dark;
	--bg: light-dark(#f6f7f5, #111412);
	--surface: light-dark(#ffffff, #1a1e1b);
	--surface-2: light-dark(#f0f2ef, #232825);
	--text: light-dark(#1c211e, #e7ebe8);
	--muted: light-dark(#66706a, #9aa49e);
	--border: light-dark(#e2e6e1, #2e3430);
	--on-accent: light-dark(#ffffff, #16110f);
	--accent: light-dark(#c2414a, #ee7a7c);
	--accent-strong: light-dark(#a3333b, #f39a9b);
	--accent-soft: light-dark(#fdeaea, #3b2022);
	--gold: #e5b332;
	--radius: 12px;
	--radius-sm: 8px;
	--shadow: light-dark(0 1px 2px rgb(0 0 0 / 5%), 0 0 0 transparent), light-dark(0 2px 8px rgb(0 0 0 / 4%), 0 0 0 transparent);
	--space: 16px;
	--font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

* {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 1rem/1.55 var(--font);
	-webkit-font-smoothing: antialiased;
}

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

a:hover {
	text-decoration: underline;
}

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

h1,
h2,
h3 {
	line-height: 1.2;
	letter-spacing: -0.01em;
}

h2 {
	font-size: 1.75rem;
	margin: 0 0 24px;
}

h3 {
	font-size: 1.1rem;
	margin: 0 0 6px;
}

p {
	margin: 0 0 12px;
}

.wrap {
	max-width: 1040px;
	margin: 0 auto;
	padding: 0 var(--space);
}

.muted {
	color: var(--muted);
}

.small {
	font-size: 0.875rem;
}

.skip {
	position: absolute;
	left: -999px;
}

.skip:focus {
	left: 16px;
	top: 16px;
	z-index: 20;
	padding: 8px 12px;
	background: var(--surface);
	border-radius: var(--radius-sm);
}

/* Buttons, as in the app. */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: var(--shadow);
}

.btn:hover {
	text-decoration: none;
	border-color: var(--accent);
}

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

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

.btn.small {
	min-height: 36px;
	padding: 0 12px;
	font-size: 0.9rem;
}

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

/* Header: the app's top bar. */
.top {
	position: sticky;
	top: 0;
	z-index: 10;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border);
}

.top .inner {
	max-width: 1040px;
	margin: 0 auto;
	padding: 10px var(--space);
	display: flex;
	align-items: center;
	gap: 24px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text);
	font-weight: 700;
	font-size: 1.1rem;
}

.brand:hover {
	text-decoration: none;
}

.nav {
	display: flex;
	gap: 4px;
	margin-right: auto;
}

.nav a {
	padding: 6px 10px;
	border-radius: var(--radius-sm);
	color: var(--muted);
	font-weight: 550;
}

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

/* Hero. */
.hero {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 48px;
	align-items: center;
	padding-top: 64px;
	padding-bottom: 48px;
}

.coin {
	display: block;
	margin-bottom: 12px;
	filter: drop-shadow(0 6px 16px rgb(201 150 26 / 30%));
}

.hero h1 {
	/* Even lines: no lone word on the last one. */
	text-wrap: balance;
	font-size: clamp(2.4rem, 6vw, 3.6rem);
	margin: 0 0 16px;
	letter-spacing: -0.02em;
}

.lead {
	text-wrap: pretty;
	font-size: 1.2rem;
	color: var(--muted);
	max-width: 34em;
	margin-bottom: 24px;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

/* The app's home page: a phone on narrow screens, a browser window on
   wide ones (one <picture>, mockup/). The images are flattened onto the
   page's own background, so their corners and shadows blend in. */
.shot {
	justify-self: center;
}

.shot img {
	display: block;
	width: 320px;
	height: auto;
}

/* Wide screens: the text centred above the browser window. */
@media (min-width: 861px) {
	.hero {
		grid-template-columns: 1fr;
		gap: 32px;
		text-align: center;
	}

	.hero-text {
		max-width: 760px;
		margin: 0 auto;
	}

	.coin {
		margin-inline: auto;
	}

	.lead {
		margin-inline: auto;
	}

	.actions {
		justify-content: center;
	}

	.shot {
		width: 100%;
		max-width: 1000px;
	}

	.shot img {
		width: 100%;
		aspect-ratio: 2000 / 1370;
	}
}

/* Sections. */
.section {
	padding-top: 56px;
	padding-bottom: 8px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space);
}

.feature p,
.steps p {
	color: var(--muted);
	margin: 0;
}

.icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-bottom: 14px;
	border-radius: 12px;
	background: var(--accent-soft);
}

.icon svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: var(--accent);
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space);
	counter-reset: none;
}

.num {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: var(--gold);
	color: #141715;
	font-weight: 800;
	box-shadow: inset 0 0 0 3px rgb(158 116 16 / 45%);
}

.open {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 24px;
	align-items: center;
	padding: 32px;
	background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%);
}

.open h2 {
	margin-bottom: 16px;
}

.checks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.checks li {
	position: relative;
	padding-left: 28px;
}

.checks li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: var(--accent);
	font-weight: 800;
}

.open-actions {
	display: grid;
	gap: 12px;
	justify-items: stretch;
}

/* The installation guide (instalacija/, en/installation/). */
.doc {
	max-width: 820px;
	padding-top: 32px;
}

.doc h1 {
	font-size: clamp(2rem, 5vw, 2.8rem);
	margin: 0 0 12px;
}

.doc .lead {
	max-width: none;
	margin-bottom: 12px;
}

.doc section {
	padding-top: 40px;
}

.doc section > h2 {
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border);
}

.doc h3 {
	margin: 28px 0 8px;
}

.doc ul {
	padding-left: 20px;
	margin: 0 0 12px;
}

.doc li + li {
	margin-top: 6px;
}

.crumbs {
	margin-bottom: 16px;
	font-weight: 550;
}

.choices {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space);
	margin-top: 24px;
}

.choice {
	position: relative;
	display: block;
	color: var(--text);
}

.choice:hover {
	text-decoration: none;
	border-color: var(--accent);
}

.choice h2 {
	margin: 0 0 6px;
	font-size: 1.3rem;
}

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

.tag {
	position: absolute;
	top: 16px;
	right: 16px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-strong);
	font-size: 0.75rem;
	font-weight: 700;
}

code {
	font-family: var(--mono);
	font-size: 0.88em;
}

:not(pre) > code {
	padding: 1px 5px;
	border-radius: 5px;
	background: var(--surface-2);
	overflow-wrap: anywhere;
}

pre {
	margin: 0 0 14px;
	padding: 14px 16px;
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	line-height: 1.5;
}

pre code {
	font-size: 0.84rem;
}

.note {
	padding: 10px 14px;
	border-left: 3px solid var(--accent);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	background: var(--accent-soft);
}

.table {
	overflow-x: auto;
	margin: 0 0 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
	background: var(--surface);
}

th,
td {
	padding: 10px 12px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--border);
}

tr:last-child td {
	border-bottom: 0;
}

th {
	background: var(--surface-2);
	font-weight: 650;
}

/* Setting names stay whole; the table scrolls on narrow screens. */
td:first-child code {
	white-space: nowrap;
	overflow-wrap: normal;
}

/* Footer, as in the app. */
.foot {
	margin-top: 64px;
	padding-top: 24px;
	padding-bottom: 40px;
	border-top: 1px solid var(--border);
	text-align: center;
	color: var(--muted);
}

.foot p:first-child {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
}

.foot .small {
	max-width: 46em;
	margin: 8px auto 0;
}

/* Tablets and phones. */
@media (max-width: 860px) {
	.hero {
		grid-template-columns: 1fr;
		gap: 40px;
		padding-top: 40px;
	}

	.grid,
	.steps {
		grid-template-columns: 1fr 1fr;
	}

	.open {
		grid-template-columns: 1fr;
		padding: 24px;
	}
}

@media (max-width: 600px) {
	.nav {
		display: none;
	}

	.choices {
		grid-template-columns: 1fr;
	}

	/* The logo left, the buttons together on the right. */
	.top .inner {
		gap: 8px;
	}

	.brand {
		margin-right: auto;
	}

	.grid,
	.steps {
		grid-template-columns: 1fr;
	}

	.shot img {
		width: 280px;
	}

	h2 {
		font-size: 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
