/* What every page of gromaos.com shares: the font, Groma's tokens, the
   page's base and the bar along the top. */

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

/* Groma's own tokens, from shell/Theme.qml. */
:root {
	--desktop-base: #0d3242;
	--wash-a: #9cc86c;
	--wash-b: #886de9;
	--slate: rgba(61, 76, 87, .92);
	--glass: rgba(255, 255, 255, .12);
	--glass-hover: rgba(255, 255, 255, .18);
	--glass-edge: rgba(255, 255, 255, .32);
	--glass-edge-soft: rgba(255, 255, 255, .16);
	--text: #fff;
	--text-2: rgba(255, 255, 255, .85);
	--text-3: rgba(255, 255, 255, .6);
	--tag-blue: #8ab4f8;
	--tag-yellow: #fdd663;
	--tag-cyan: #78d9ec;
	--tag-red: #f28b82;
	--tag-green: #81c995;
	--tag-purple: #c58af9;
	--tag-pink: #ff8bcb;
	--radius-panel: 24px;
	--radius-media: 12px;
	--radius-row: 16px;
	--radius-pill: 12px;
	--shadow: 0 16px 40px rgba(0, 0, 0, .30);
	--spatial: cubic-bezier(.38, 1.21, .22, 1);
	--effects: cubic-bezier(.34, .8, .34, 1);
	--page: 1180px;
	--gutter: 24px;
	color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--desktop-base);
	color: var(--text);
	font: 400 17px/1.6 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-feature-settings: "cv11", "ss01";
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* Groma's drawn wallpaper, as the design writes it, held still behind the page. */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(100% 80% at 15% 15%, var(--wash-a) 0%, transparent 55%),
		radial-gradient(90% 90% at 85% 75%, var(--wash-b) 0%, transparent 60%),
		var(--desktop-base);
}

a { color: inherit; }
img, video { display: block; max-width: 100%; height: auto; }

:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
	border-radius: 8px;
}

.wrap {
	width: min(var(--page), 100% - 2 * var(--gutter));
	margin-inline: auto;
}

/* --- The bar ------------------------------------------------------------ */

.bar {
	position: sticky;
	top: 0;
	z-index: 10;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
	height: 52px;
	padding: 0 12px;
	transition: background .3s var(--effects), box-shadow .3s var(--effects);
}
.bar.scrolled {
	background: rgba(13, 50, 66, .55);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	backdrop-filter: blur(18px) saturate(1.4);
	box-shadow: 0 1px 0 var(--glass-edge-soft);
}

.pills { display: flex; gap: 8px; min-width: 0; }
.pill {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	padding: 5px 12px;
	border-radius: var(--radius-pill);
	background: var(--c);
	color: #16161c;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: transform .35s var(--spatial), box-shadow .2s var(--effects);
}
.pill span { font-weight: 400; opacity: .7; }
.pill:hover { transform: translateY(1px); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }

.clock {
	font-size: 15px;
	color: var(--text);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.bar-end { display: flex; justify-content: flex-end; }
.bar-end a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border-radius: var(--radius-pill);
	font-size: 15px;
	text-decoration: none;
	color: var(--text-2);
	transition: background .2s var(--effects);
}
.bar-end a:hover { background: var(--glass-hover); color: var(--text); }
.bar-end svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
	.bar { grid-template-columns: 1fr auto; }
	.clock { display: none; }
	.pills { gap: 6px; }
	.pill { padding: 5px 10px; font-size: 14px; }
	.bar-end a .label { display: none; }
}
/* Four pills and an icon, on the narrowest phones. */
@media (max-width: 420px) {
	.bar { padding: 0 8px; gap: 6px; }
	.pills { gap: 4px; }
	.pill { padding: 5px 8px; }
}
