/* Shared styling for the paged-with-floats demo site. */

:root {
	--paper: #f6f2e9;
	--card: #fffdf9;
	--ink: #23262e;
	--muted: #686d77;
	--accent: #0da6ba;
	--accent-ink: #087f90;
	--line: #ddd5c4;
}

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: Charter, "Iowan Old Style", "Palatino Linotype", Palatino,
		Georgia, serif;
	line-height: 1.55;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-header {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	width: 100%;
	max-width: 64rem;
	margin: 0 auto;
	padding: 1.4rem 1.5rem 0.6rem;
}

.site-header img {
	height: 44px;
	width: auto;
	display: block;
}

.site-name {
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.site-header nav {
	margin-left: auto;
	display: flex;
	gap: 1.3rem;
}

.site-header nav a {
	color: var(--ink);
	text-decoration: none;
	padding-bottom: 2px;
	border-bottom: 2px solid transparent;
}

.site-header nav a:hover {
	border-bottom-color: var(--accent);
}

.hero {
	width: 100%;
	max-width: 48rem;
	margin: 2.6rem auto 0;
	padding: 0 1.5rem;
	text-align: center;
}

.hero h1 {
	margin: 0 0 0.35em;
	font-size: clamp(2.1rem, 5vw, 3.1rem);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.01em;
}

.hero .lede {
	margin: 0 auto 1.7rem;
	max-width: 36rem;
	font-size: 1.16rem;
	color: var(--muted);
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	justify-content: center;
}

.btn {
	display: inline-block;
	padding: 0.62em 1.45em;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	text-decoration: none;
	font-size: 1.02rem;
	transition: background 0.12s ease, transform 0.12s ease,
		box-shadow 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
	background: var(--accent-ink);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(13, 166, 186, 0.35);
}

.btn.secondary {
	background: transparent;
	color: var(--ink);
	border: 1px solid #b9b29e;
}

.btn.secondary:hover {
	background: transparent;
	box-shadow: none;
	border-color: var(--ink);
	transform: translateY(-1px);
}

.group-title {
	width: 100%;
	max-width: 64rem;
	margin: 2.6rem auto 0.9rem;
	padding: 0 1.5rem;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.cards {
	width: 100%;
	max-width: 64rem;
	margin: 0 auto;
	padding: 0 1.5rem 1rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1.1rem;
}

.card {
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 0.65rem;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 1px 3px rgba(35, 38, 46, 0.06);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover,
.card:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 10px 22px rgba(35, 38, 46, 0.14);
}

.card .thumb {
	height: 8.5rem;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-bottom: 1px solid var(--line);
}

.card .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.card .thumb.letter {
	font-size: 4.6rem;
	font-weight: 700;
	line-height: 1;
}

.card .body {
	padding: 0.95rem 1.1rem 1.15rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.card h2 {
	margin: 0 0 0.25em;
	font-size: 1.13rem;
	font-weight: 600;
}

.card p {
	margin: 0;
	font-size: 0.93rem;
	color: var(--muted);
}

.card .tag {
	align-self: flex-start;
	margin-top: auto;
	padding-top: 0.9em;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--accent-ink);
}

code {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 0.86em;
	background: rgba(35, 38, 46, 0.06);
	padding: 0.08em 0.35em;
	border-radius: 4px;
}

.note {
	width: 100%;
	max-width: 64rem;
	margin: 1.2rem auto 0;
	padding: 0 1.5rem;
	font-size: 0.95rem;
	color: var(--muted);
	font-style: italic;
}

.site-footer {
	margin-top: auto;
	border-top: 1px solid var(--line);
}

.site-footer > div {
	width: 100%;
	max-width: 64rem;
	margin: 0 auto;
	padding: 1.2rem 1.5rem 2rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.6rem;
	justify-content: space-between;
	font-size: 0.9rem;
	color: var(--muted);
}

.site-footer a {
	color: var(--accent-ink);
}
