/*
 * pelote.css - pelote.slitaz.org
 *
 * Copyright (C) 2026 SliTaz GNU/Linux - BSD License
 *
 * No JavaScript, no web font, no external file: the vhost CSP allows
 * none, and the page loads in one round trip on 3G.
 */
:root {
	--orange: #e8731c;
	--orange-dark: #b85a0f;
	--green: #6ba539;
	--green-dark: #4c7f25;
	--bg: #fbfaf8;
	--band: #f2eee8;
	--card: #ffffff;
	--text: #1f1c19;
	--muted: #6b645c;
	--line: #e3ddd4;
	--code: #f1ece5;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #15130f;
		--band: #1d1a16;
		--card: #24201b;
		--text: #eee8e1;
		--muted: #a59d93;
		--line: #353029;
		--code: #2d2822;
		--shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
	}
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "DejaVu Sans", sans-serif;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--orange-dark); }
@media (prefers-color-scheme: dark) { a { color: var(--orange); } }

code, pre {
	font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
	font-size: .88em;
}
code {
	background: var(--code);
	padding: .1em .35em;
	border-radius: 5px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 2rem; letter-spacing: -.02em; }
h3 { font-size: 1.15rem; }

/* --- Header --- */

.top {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: .7rem max(1.2rem, calc((100% - 1280px) / 2 + 1.2rem));
	min-height: 63px;
	background: var(--bg);
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	backdrop-filter: saturate(1.5) blur(10px);
	border-bottom: 1px solid var(--line);
}
.brand {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-weight: 700;
	font-size: 1.3rem;
	color: var(--text);
	text-decoration: none;
}
.top nav { display: flex; align-items: center; gap: 1.2rem; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.top nav a:hover { color: var(--text); }
.top nav a.button { color: #fff; }

/* --- Buttons --- */

.button {
	display: inline-block;
	padding: .75rem 1.3rem;
	border-radius: 999px;
	background: var(--orange);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	transition: transform .15s, box-shadow .15s, background .15s;
}
.button:hover {
	background: var(--orange-dark);
	transform: translateY(-1px);
}
.button.small { padding: .45rem .95rem; font-size: .95rem; }
.button.ghost {
	background: transparent;
	color: var(--text);
	box-shadow: inset 0 0 0 2px var(--line);
}
.button.ghost:hover { box-shadow: inset 0 0 0 2px var(--green); background: transparent; }

/* --- Sections --- */

main > section {
	padding: 4.5rem max(1.2rem, calc((100% - 1100px) / 2));
}
main > section.band { background: var(--band); }
.note { color: var(--muted); font-size: .95rem; }
.small { font-size: .9rem; color: var(--muted); }

/* --- Hero --- */

.hero {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	gap: 3rem;
	align-items: center;
	padding-top: 5rem !important;
	padding-left: max(1.2rem, calc((100% - 1280px) / 2 + 1.2rem));
	padding-right: max(1.2rem, calc((100% - 1280px) / 2 + 1.2rem));
	background:
		radial-gradient(900px 400px at 85% 20%, rgba(232,115,28,.14), transparent 60%),
		radial-gradient(700px 400px at 10% 90%, rgba(107,165,57,.12), transparent 60%);
}
.kicker {
	color: var(--green-dark);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .85rem;
	margin: 0 0 .8rem;
}
@media (prefers-color-scheme: dark) { .kicker { color: var(--green); } }
.hero h1 {
	font-size: clamp(2.3rem, 5vw, 3.6rem);
	letter-spacing: -.035em;
	margin-bottom: 1rem;
}
/* Plain colour: gradient text needs background-clip support some
 * engines claim and do not have (Soie paints a block over the words) */
.hero h1 span { color: var(--orange); }
.lead { font-size: 1.15rem; margin: 0 0 1rem; max-width: 36em; }
.lead.small { font-size: 1rem; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* The phone mock-up, all CSS */
.phone {
	justify-self: center;
	width: 290px;
	padding: 14px;
	border-radius: 38px;
	background: #1b1815;
	box-shadow: 0 30px 60px rgba(0,0,0,.25), inset 0 0 0 2px #2e2924;
}
.phone img { display: block; width: 100%; height: auto; border-radius: 26px; }
.screen {
	border-radius: 26px;
	background: var(--card);
	padding: 1.1rem 1rem 1rem;
	font-size: .85rem;
	min-height: 470px;
}
.bar { font-weight: 700; display: flex; align-items: center; gap: .45rem; margin-bottom: .9rem; }
.bar em { font-style: normal; font-weight: 500; color: var(--green-dark); margin-left: auto; font-size: .8rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(107,165,57,.25); }
.gauges div {
	display: grid;
	grid-template-columns: 3em 1fr;
	align-items: center;
	gap: .6rem;
	margin: .35rem 0;
}
.gauges b { font-weight: 600; color: var(--muted); font-size: .78rem; }
.gauges i {
	display: block;
	height: 7px;
	border-radius: 9px;
	background: linear-gradient(90deg, var(--green), var(--orange));
}
.cat { margin: 1rem 0 .4rem; color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.act {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .55rem .7rem;
	margin: .35rem 0;
	border-radius: 10px;
	background: var(--band);
	font-weight: 500;
}
.act span { color: var(--orange); font-size: 1rem; width: 1.1em; text-align: center; }
.act small { margin-left: auto; font-size: .7rem; color: var(--orange-dark); }
.act small.high { color: #c0392b; }
.act small.low { color: var(--green-dark); }
.screen pre {
	margin: .9rem 0 0;
	padding: .7rem .8rem;
	border-radius: 10px;
	background: #1b1815;
	color: #d8f0c4;
	font-size: .72rem;
	line-height: 1.5;
	white-space: pre;
	overflow: hidden;
}

/* --- Steps --- */

.steps {
	list-style: none;
	padding: 0;
	margin: 2rem 0 3rem;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.4rem;
}
.steps li {
	background: var(--card);
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}
.num {
	display: inline-grid;
	place-items: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	background: var(--orange);
	color: #fff;
	font-weight: 700;
	margin-bottom: .8rem;
}
.steps p { margin: 0; color: var(--muted); }

/* Architecture: app - relay - machine, the tunnel over them */
.diagram {
	display: grid;
	grid-template-columns: 1fr auto 1fr auto 1fr;
	align-items: center;
	gap: .6rem;
	position: relative;
	padding-top: 2.6rem;
}
.node {
	background: var(--card);
	border: 2px solid var(--line);
	border-radius: var(--radius);
	padding: 1rem;
	text-align: center;
	font-weight: 600;
}
.node small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.node.relay { border-style: dashed; }
.wire { text-align: center; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.wire span { display: block; font-family: ui-monospace, monospace; color: var(--green-dark); }
.wire::after { content: "⟷"; display: block; font-size: 1.4rem; color: var(--line); }
.tunnel {
	position: absolute;
	top: 0;
	left: 8%;
	right: 8%;
	text-align: center;
	font-size: .85rem;
	font-weight: 600;
	color: var(--green-dark);
	border: 2px solid var(--green);
	border-bottom: none;
	border-radius: 18px 18px 0 0;
	height: 2rem;
	padding-top: .2rem;
}
@media (prefers-color-scheme: dark) {
	.wire span, .tunnel, .bar em, .act small.low { color: var(--green); }
}

/* --- Security cards --- */

.cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.4rem;
	margin: 2rem 0 1.5rem;
}
.cards article {
	background: var(--card);
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
	border-top: 4px solid var(--green);
}
.cards article:nth-child(2n) { border-top-color: var(--orange); }
.cards p { margin: 0; color: var(--muted); }

/* --- Install --- */

.term {
	background: #1b1815;
	color: #f3eee8;
	padding: 1.1rem 1.3rem;
	border-radius: var(--radius);
	overflow-x: auto;
	line-height: 1.8;
	max-width: 40rem;
}
.term .p { color: var(--orange); user-select: none; }
table { border-collapse: collapse; margin: 1rem 0 1.5rem; }
td { padding: .45rem 1.4rem .45rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td:last-child { color: var(--muted); }

/* --- Download --- */

.download {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 2rem;
	background: var(--card);
	border-radius: var(--radius);
	padding: 2rem;
	box-shadow: var(--shadow);
	margin: 2rem 0 1rem;
	border-left: 6px solid var(--orange);
}
.download .button { margin: .6rem 0 1rem; }
dl { margin: 0; }
dt { font-weight: 600; font-size: .9rem; margin-top: .6rem; }
dd { margin: .2rem 0 0; }
dd code {
	display: block;
	word-break: break-all;
	overflow-wrap: anywhere;
	font-size: .78rem;
	padding: .5rem .6rem;
}

/* --- Footer --- */

footer {
	padding: 2rem 1.2rem 3rem;
	text-align: center;
	color: var(--muted);
	font-size: .9rem;
	border-top: 1px solid var(--line);
}
footer img { vertical-align: -4px; margin-right: .3rem; }

/* --- Small screens --- */

@media (max-width: 860px) {
	.hero { grid-template-columns: 1fr; padding-top: 3rem !important; }
	.steps, .cards, .download { grid-template-columns: 1fr; }
	.diagram { grid-template-columns: 1fr; padding-top: 0; }
	.wire::after { content: "↕"; }
	.tunnel { position: static; border: 2px solid var(--green); border-radius: 12px; height: auto; padding: .4rem; order: -1; }
	.top nav a:not(.button) { display: none; }
	main > section { padding-top: 3rem; padding-bottom: 3rem; }
}
