/*
 * Copyright (c) 2026 Ernesto Reinaldo Barreiro (reiern70@gmail.com).
 * All rights reserved.
 */
:root {
	--bg: #f5f7fb;
	--surface: #ffffff;
	--text: #1c2333;
	--muted: #5b6478;
	--border: #e1e5ee;
	--primary: #2f5bd3;
	--primary-dark: #1d3d99;
	--available: #1f8a4c;
	--in-progress: #b26a00;
	--planned: #5b6478;
	--radius: 10px;
}

/* the page takes the colors of the theme the session chose, put on <body> */
.antilia-theme {
	--bg: var(--antilia-theme-surface-alt);
	--surface: var(--antilia-theme-surface);
	--text: var(--antilia-theme-text);
	--muted: color-mix(in srgb, var(--antilia-theme-text) 68%, transparent);
	--border: var(--antilia-theme-border);
	--primary: var(--antilia-theme-primary);
	--primary-dark: var(--antilia-theme-primary-dark);
	--on-primary: var(--antilia-theme-on-primary);
	--accent: var(--antilia-theme-accent);
	color-scheme: var(--antilia-theme-color-scheme);
}

* { box-sizing: border-box; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main { flex: 1; }

a { color: var(--accent, var(--primary)); }

.container {
	width: 100%;
	max-width: 1800px;
	margin: 0 auto;
	padding: 0 16px;
}

/* top bar */
.topbar {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}
.topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
}
/* the logo: three cogs in the colors of the theme */
.logo { flex: none; }
.logo__cog--solid { fill: var(--primary); }
.logo__cog--outline {
	fill: none;
	stroke: var(--accent, var(--primary));
	stroke-width: 1.4;
	stroke-linejoin: round;
}
.logo__cog--toned { fill: color-mix(in srgb, var(--text) 45%, transparent); }
.logo__hub { fill: var(--primary-dark); }
.ws-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--muted);
}
.ws-status::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--planned);
}
.ws-status--live { color: var(--available); }
.ws-status--live::before { background: var(--available); }

/* hero */
.hero {
	background: linear-gradient(135deg, var(--primary-dark), var(--primary));
	color: var(--on-primary, #fff);
	padding: 56px 0 48px;
}
.hero h1 {
	margin: 0 0 8px;
	font-size: clamp(28px, 5vw, 42px);
	line-height: 1.15;
}
.hero__lead {
	margin: 0;
	max-width: 640px;
	font-size: 18px;
	opacity: .9;
}
.hero__meta {
	margin: 20px 0 0;
	font-size: 14px;
	opacity: .8;
}

/* catalog */
.catalog { padding-top: 40px; padding-bottom: 56px; }
.catalog h2 { margin: 0 0 20px; font-size: 22px; }

.cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	transition: box-shadow .15s, transform .15s;
}
.card:hover {
	box-shadow: 0 6px 20px rgba(28, 35, 51, .08);
	transform: translateY(-2px);
}
.card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.card__category {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .6px;
	color: var(--primary);
}
.card__name { margin: 12px 0 6px; font-size: 18px; }
.card__description { margin: 0; color: var(--muted); font-size: 14px; }

.badge {
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 999px;
	border: 1px solid currentColor;
	white-space: nowrap;
}
.badge--available { color: var(--available); }
.badge--in-progress { color: var(--in-progress); }
.badge--planned { color: var(--planned); }
/* whether the component of a demo is public, or private for now: an open or a closed lock */
.visibility {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid currentColor;
	vertical-align: middle;
	cursor: default;
}
.visibility--public { color: var(--available); }
.visibility--private { color: var(--in-progress); }
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.demo__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
}
.tab-visibility {
	width: 20px;
	height: 20px;
	margin-left: 6px;
}
.tab-visibility svg { width: 12px; height: 12px; }

/* footer */
.footer {
	border-top: 1px solid var(--border);
	background: var(--surface);
	color: var(--muted);
	font-size: 13px;
}
.footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	padding-top: 16px;
	padding-bottom: 16px;
}

/* demo pages */
.demo { padding-top: 24px; padding-bottom: 56px; }
.demo h1 { margin: 0 0 16px; font-size: 28px; }
.demo__explanation { margin-bottom: 20px; }
.demo__options {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 16px;
}
a.brand { color: inherit; text-decoration: none; }

.demos { padding-top: 40px; }
.demos h2 { margin: 0 0 20px; font-size: 22px; }
.card__link { color: inherit; text-decoration: none; display: block; }

.hero .ws-status { margin-left: 12px; color: inherit; }

/* links of a demo page to the home page and to the previous and next demo */
.demo__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 12px;
	font-size: 14px;
}
.demo__nav a { text-decoration: none; }
.demo__nav a:hover { text-decoration: underline; }
.demo__steps { display: flex; gap: 16px; }

/* the drop-downs choosing the theme, the language and the Ajax engine, and the link to register */
.topbar__inner {
	gap: 16px;
}
.topbar__tools {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}
.topbar__settings {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: 14px;
}
.topbar__setting {
	display: flex;
	align-items: center;
	gap: 6px;
}
.topbar__setting-label {
	color: var(--muted);
	font-size: 13px;
}
.topbar__setting .antilia-dropdown {
	min-width: 8.5em;
}
.topbar__register {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--primary);
	color: var(--on-primary, #fff);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.topbar__register:hover {
	background: var(--primary-dark);
}

/* on narrow screens the top bar wraps: the settings go below the logo, without their labels */
@media (max-width: 900px) {
	.topbar__inner {
		flex-wrap: wrap;
		height: auto;
		padding-top: 8px;
		padding-bottom: 8px;
	}
	.topbar__tools {
		flex-wrap: wrap;
		width: 100%;
		justify-content: space-between;
	}
	.topbar__settings {
		flex-wrap: wrap;
		gap: 8px;
	}
	.topbar__setting-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}
	.topbar__register-label {
		display: none;
	}
}

/* the registration and the email confirmation */
.register {
	display: grid;
	place-items: start center;
	padding-top: 40px;
	padding-bottom: 56px;
}
.register__card {
	width: 100%;
	max-width: 640px;
	padding: 28px 32px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 6px 20px rgba(28, 35, 51, .06);
}
.register__card h1 { margin: 0 0 6px; font-size: 26px; }
.register__lead { margin: 0 0 20px; color: var(--muted); }
.register__form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 18px;
}
.register__field {
	display: grid;
	gap: 4px;
	font-size: 14px;
}
.register__field--wide,
.register__actions { grid-column: 1 / -1; }
.register__field input {
	padding: 0.4em 0.6em;
	border: 1px solid var(--border);
	border-radius: 0.4em;
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 15px;
}
.register__field input:focus {
	outline: none;
	border-color: var(--accent, var(--primary));
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, var(--primary)) 25%, transparent);
}
.register__field .antilia-dropdown { width: 100%; font-size: 15px; }
/* the field robots fill in and people never see */
.register__honeypot {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.register__actions { margin: 6px 0 0; }
.register__submit {
	padding: 10px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--primary);
	color: var(--on-primary, #fff);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.register__submit:hover { background: var(--primary-dark); }
.register__card--done { text-align: center; }
.register__mail { color: var(--primary); }
.register__hint { color: var(--muted); font-size: 14px; }
@media (max-width: 600px) {
	.register__form { grid-template-columns: 1fr; }
	.register__card { padding: 20px; }
}

/* in demo mode (-Dwicket.demo=true): the branch and commit the demo was built from */
.footer__built {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.build-info {
	padding: 1px 8px;
	border: 1px dashed var(--accent, var(--primary));
	border-radius: 999px;
	color: var(--accent, var(--primary));
	font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
	font-size: 12px;
}
