/*
menning.name: a small family site. Photo-first, light and dark, no framework.
The photo viewer is PhotoSwipe (assets/vendor/photoswipe, MIT).
*/

:root{
	--bg: #faf8f5;
	--surface: #ffffff;
	--ink: #1f2328;
	--muted: #686d74;
	--line: #e7e2da;
	--accent: #b4532a;
	--accent-ink: #ffffff;
	--radius: 10px;
	--shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 6%);
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark){
	:root{
		--bg: #15171a;
		--surface: #1e2124;
		--ink: #ece9e4;
		--muted: #a2a6ab;
		--line: #2d3135;
		--accent: #e08a5f;
		--accent-ink: #15171a;
		--shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 4px 16px rgb(0 0 0 / 30%);
	}
}

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

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

body{
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

a{ color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible, button:focus-visible{ outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap{
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 20px;
}

.skip{ position: absolute; left: -9999px; }
.skip:focus{ left: 12px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* ── header / footer ─────────────────────────────────────────────────── */

.site-header{
	border-bottom: 1px solid var(--line);
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	position: sticky;
	top: 0;
	z-index: 5;
	backdrop-filter: blur(8px);
}
.site-header .wrap{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 60px;
}
.wordmark{
	color: var(--ink);
	text-decoration: none;
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: -0.01em;
}
.wordmark span{ color: var(--accent); }
.site-header nav{ display: flex; gap: 4px; }
.site-header nav a{
	color: var(--muted);
	text-decoration: none;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 0.95rem;
}
.site-header nav a:hover{ color: var(--ink); background: var(--line); }
.site-header nav a.active{ color: var(--ink); background: var(--line); font-weight: 600; }

main{ flex: 1; padding-top: 32px; padding-bottom: 56px; }

.site-footer{
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.9rem;
}
.site-footer p{ margin: 20px 0; }

/* ── type ────────────────────────────────────────────────────────────── */

h1{ font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
h2{ font-size: 1.15rem; margin: 36px 0 12px; }
.lede{ color: var(--muted); font-size: 1.05rem; max-width: 60ch; margin: 0 0 24px; }
.meta{ color: var(--muted); margin: 0 0 8px; font-size: 0.95rem; }
.crumbs{ font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a{ color: var(--muted); }

/* ── home ────────────────────────────────────────────────────────────── */

.hero{ padding: 40px 0 24px; max-width: 760px; }
.hero .eyebrow{ color: var(--muted); font-size: 1.05rem; margin: 0 0 4px; }
.hero h1{ font-size: clamp(2.6rem, 9vw, 5rem); margin: 0; }
.rotator{
	color: var(--accent);
	display: inline-block;
	min-width: 6ch;
	transition: opacity 0.35s ease, transform 0.35s ease;
}
.rotator.out{ opacity: 0; transform: translateY(0.15em); }
.hero .names{ font-size: 1.1rem; color: var(--muted); margin: 16px 0 0; }
.names-controls{ margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.names-controls button{
	font: inherit;
	font-size: 0.85rem;
	color: var(--muted);
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 3px 12px;
	cursor: pointer;
}
.names-controls button[aria-pressed="true"]{ color: var(--ink); border-color: var(--ink); }

.panel{
	margin-top: 40px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 24px;
	max-width: 760px;
}
.panel h2{ margin-top: 0; }
.panel p{ margin: 0 0 16px; color: var(--muted); }
.button{
	display: inline-block;
	background: var(--accent);
	color: var(--accent-ink);
	text-decoration: none;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: 999px;
}
.button:hover{ filter: brightness(1.08); }

/* ── album index ─────────────────────────────────────────────────────── */

.cards{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 20px;
}
.card{
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	text-decoration: none;
	color: var(--ink);
	box-shadow: var(--shadow);
	transition: transform 0.15s ease;
}
.card:hover{ transform: translateY(-2px); }
.card img{ width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--line); }
.card-title{ font-weight: 600; padding: 12px 14px 0; }
.card-meta{ color: var(--muted); font-size: 0.9rem; padding: 0 14px 12px; }

/* ── album grid ──────────────────────────────────────────────────────── */

.grid{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 6px;
}
.grid a{ display: block; border-radius: 6px; overflow: hidden; background: var(--line); }
.grid img{
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	transition: transform 0.2s ease;
}
.grid a:hover img{ transform: scale(1.03); }

@media (max-width: 520px){
	.grid{ grid-template-columns: repeat(3, 1fr); gap: 3px; }
	.grid a{ border-radius: 3px; }
}

/* ── videos ──────────────────────────────────────────────────────────── */

.videos{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
	margin-top: 16px;
}
.video{ margin: 0; }
.video video{
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius);
	background: #000;
}
.video figcaption{ margin-top: 8px; font-weight: 600; }

@media (prefers-reduced-motion: reduce){
	*, *::before, *::after{ transition: none !important; }
}
