/**
 * Marymoun styles.
 * Order: reset, base, layout, blocks (alphabetical), states, reduced motion.
 */

/* ===== reset ===== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
}

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

/* ===== base ===== */
body {
	background: var(--color-bg);
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: var(--size-body);
	line-height: var(--leading-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
	margin: 0 0 var(--space-3);
}

a {
	color: inherit;
}

a:hover {
	color: var(--color-accent);
}

:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 3px;
}

/* ===== layout ===== */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ===== entry ===== */
.entry {
	max-width: 80ch;
}

.entry__title {
	font-size: clamp(var(--size-h4), 6vw, var(--size-h2));
	line-height: var(--leading-heading);
}

.entry__meta {
	color: var(--color-ink-muted);
	font-size: var(--size-small);
}

.entry__media img {
	width: 100%;
	border-radius: var(--radius-md);
}

/* ===== no-results ===== */
.no-results {
	max-width: 60ch;
}

/* ===== page-title ===== */
.page-title {
	font-size: clamp(var(--size-h4), 6vw, var(--size-h2));
	line-height: var(--leading-heading);
}

/* ===== post-card ===== */
.post-card__title {
	font-size: var(--size-h4);
	line-height: var(--leading-heading);
}

.post-card__title a {
	text-decoration: none;
}

.post-card__meta {
	color: var(--color-ink-muted);
	font-size: var(--size-small);
}

.post-card__media img {
	width: 100%;
	border-radius: var(--radius-md);
}

/* ===== post-list ===== */
.post-list {
	display: grid;
	gap: var(--space-6);
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	margin-block: var(--space-6);
}

/* ===== site-footer ===== */
.site-footer {
	padding-block: var(--space-5);
	border-top: 1px solid var(--color-border);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
}

.site-footer__copy {
	margin: 0;
	font-size: var(--size-small);
}

.footer-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--size-small);
}

/* ===== site-header ===== */
.site-header {
	padding-block: var(--space-4);
	border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
}

.site-header__logo {
	font-weight: 600;
	text-decoration: none;
}

.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a {
	text-decoration: none;
}

/* ===== site-main ===== */
.site-main {
	padding-block: var(--section-space);
}

/* ===== skip-link ===== */
.skip-link:focus {
	position: fixed;
	top: var(--space-2);
	left: var(--space-2);
	z-index: 100;
	width: auto;
	height: auto;
	padding: var(--space-2) var(--space-3);
	overflow: visible;
	clip: auto;
	background: var(--color-bg);
	color: var(--color-ink);
}

/* ===== states ===== */

/* ===== reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms;
		animation-iteration-count: 1;
		transition-duration: 0.01ms;
		scroll-behavior: auto;
	}
}
