/* wow section, layered on top of ../bruk-modern.css */

body
{
	background-image:
		url(../mook.png),
		radial-gradient(800px 500px at 10% -10%, rgba(222, 157, 56, 0.16), transparent 70%),
		radial-gradient(700px 500px at 100% 0%, rgba(140, 90, 220, 0.10), transparent 70%);
	background-repeat: no-repeat;
	background-position: right bottom, 0 0, 0 0;
	background-size: min(30vw, 260px) auto, auto, auto;
	/* mook sits at the end of the page instead of following the scroll */
	background-attachment: scroll, fixed, fixed;
}

.wrap
{
	max-width: 900px;
	padding-bottom: 280px;
}

/* breadcrumb back to the main site */

.crumb
{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 28px;
	color: var(--muted);
	font-family: var(--mono);
	font-size: 13px;
	text-decoration: none;
	transition: color 0.2s;
}

.crumb i
{
	font-size: 11px;
	transition: transform 0.2s;
}

.crumb:hover,
.crumb:focus-visible
{
	color: var(--accent);
	outline: none;
}

.crumb:hover i
{
	transform: translateX(-3px);
}

/* section headings already carry a dashed rule, so drop the header's */
.masthead
{
	padding-bottom: 0;
	border-bottom: 0;
}

.title.sub
{
	font-size: clamp(40px, 8vw, 68px);
}

.lede
{
	max-width: 60ch;
	margin: 20px 0 0;
	color: #cfcfcf;
	font-size: 18px;
}

/* news / bulletin */

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

.news li
{
	padding: 18px 22px;
	border: 1px solid var(--line);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius);
	background: var(--card);
}

.news time
{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--accent);
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* pulsing dot on the newest post */
.news li:first-child time::before
{
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 0 rgba(222, 157, 56, 0.6);
	animation: pulse 2s infinite;
}

@keyframes pulse
{
	70% { box-shadow: 0 0 0 8px rgba(222, 157, 56, 0); }
	100% { box-shadow: 0 0 0 0 rgba(222, 157, 56, 0); }
}

.news h3
{
	margin: 4px 0 6px;
	font-size: 20px;
	letter-spacing: -0.01em;
}

.news p
{
	margin: 0;
	color: #cfcfcf;
}

.news p + p
{
	margin-top: 10px;
}

.news li.old
{
	border-left-color: var(--line);
	opacity: 0.7;
}

/* featured template card */

.links a.feature
{
	display: block;
	padding: 0;
	overflow: hidden;
}

.feature .body
{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
	padding: 22px 24px;
}

.feature .info
{
	flex: 1 1 320px;
}

.feature h3
{
	margin: 4px 0 6px;
	font-size: 26px;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.feature p
{
	margin: 0;
	color: var(--muted);
	font-weight: 400;
}

.feature strong
{
	color: var(--text);
	font-family: var(--mono);
	font-size: 0.9em;
	font-weight: 500;
}

.badge
{
	display: inline-block;
	padding: 2px 9px;
	border: 1px solid rgba(222, 157, 56, 0.5);
	border-radius: 99px;
	color: var(--accent);
	font-family: var(--mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.btn
{
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 11px 18px;
	border-radius: 10px;
	background: var(--accent);
	color: var(--bg);
	font-weight: 700;
	white-space: nowrap;
	transition: gap 0.2s, box-shadow 0.2s;
}

.links a.feature:hover .btn,
.links a.feature:focus-visible .btn
{
	gap: 14px;
	box-shadow: 0 0 24px rgba(222, 157, 56, 0.5);
}

.shot
{
	display: block;
	border-top: 1px solid var(--line);
	background: #0b0b0b;
}

.shot img
{
	display: block;
	width: 100%;
	height: auto;
	opacity: 0.92;
	transition: opacity 0.2s;
}

.links a.feature:hover .shot img
{
	opacity: 1;
}

.note
{
	display: flex;
	gap: 10px;
	margin: 14px 0 0;
	color: var(--muted);
	font-size: 14px;
}

.note i
{
	margin-top: 4px;
	color: var(--accent);
}

.links ul + ul
{
	margin-top: 10px;
}

/* card descriptions for the classic templates */

.links .text .desc
{
	margin-top: 4px;
	color: var(--muted);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
}

.links .grid.wide
{
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.links .grid.two
{
	grid-template-columns: repeat(2, 1fr);
}

.links .grid.wide a
{
	align-items: flex-start;
}

.links .grid.wide .go
{
	align-self: center;
}

/* step-by-step guide pages */

.intro
{
	padding: 20px 22px;
	border: 1px solid var(--line);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius);
	background: var(--card);
	color: #cfcfcf;
}

.intro p
{
	margin: 0;
}

.intro p + p
{
	margin-top: 12px;
}

.steps
{
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: step;
}

.steps > li
{
	position: relative;
	padding: 0 0 36px 56px;
	counter-increment: step;
}

/* number bubble */
.steps > li::before
{
	content: counter(step);
	position: absolute;
	top: 0;
	left: 0;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--accent-soft);
	color: var(--accent);
	font-family: var(--mono);
	font-weight: 500;
}

/* dashed line linking the steps */
.steps > li:not(:last-child)::after
{
	content: "";
	position: absolute;
	top: 44px;
	bottom: 8px;
	left: 17px;
	border-left: 1px dashed rgba(222, 157, 56, 0.35);
}

.steps p
{
	margin: 6px 0 0;
}

.steps p:first-child
{
	margin-top: 5px;
}

.steps h3
{
	margin: 4px 0 0;
	font-size: 20px;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.steps h3 + p
{
	margin-top: 6px;
}

.steps p code
{
	padding: 1px 6px;
	border-radius: 5px;
	background: var(--accent-soft);
	color: var(--accent);
}

.steps figure + p
{
	margin-top: 16px;
}

.intro + .links
{
	margin-top: 44px;
}

/* plain inline links, undoing the .links card styling */
.links .steps a,
.links .news a,
.intro a
{
	display: inline;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	box-shadow: none;
	transform: none;
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.steps figure
{
	margin: 16px 0 0;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--card);
}

.steps figure img
{
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 6px;
}

.steps figcaption
{
	margin-top: 8px;
	color: var(--muted);
	font-size: 13px;
	font-style: italic;
	text-align: center;
}

code,
pre
{
	font-family: var(--mono);
	font-size: 13px;
}

pre
{
	margin: 12px 0 0;
	padding: 14px 16px;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.6);
	color: #f3bd63;
	white-space: pre;
}

@media (max-width: 600px)
{
	.feature .body
	{
		padding: 18px;
	}

	.btn
	{
		width: 100%;
		justify-content: center;
	}

	.links .grid.wide,
	.links .grid.two
	{
		grid-template-columns: 1fr;
	}

	.steps > li
	{
		padding-left: 0;
		padding-top: 46px;
	}

	.steps > li:not(:last-child)::after
	{
		display: none;
	}
}

@media (prefers-reduced-motion: reduce)
{
	.news li:first-child time::before { animation: none; }
	.crumb,
	.crumb i,
	.btn,
	.shot img { transition: none; }
}
