:root {
	--green: #006400;
	--green-dark: #004a00;
	--red: #cc0000;
	--red-dark: #a30000;
	--cream: #faf4e8;
	--paper: #fffdf8;
	--ink: #2b2118;
	--muted: #6b5d4f;
	--line: #e3d8c3;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.125rem;
	line-height: 1.65;
}

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

a { color: var(--green); }
a:hover { color: var(--red); }

.skip {
	position: absolute;
	left: -999px;
	top: 0;
	background: var(--green);
	color: #fff;
	padding: .5rem 1rem;
	z-index: 10;
}
.skip:focus { left: 0; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; }

/* Hero */
.hero {
	display: grid;
	grid-template-columns: 1fr;
	border-bottom: 6px solid var(--green);
	position: relative;
}
.hero::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -6px;
	height: 6px;
	background: linear-gradient(to right, var(--green) 0 33.33%, #fff 33.33% 66.66%, var(--red) 66.66% 100%);
}
.hero-photo { order: -1; display: block; }
.hero-photo img {
	width: 100%;
	height: 42vh;
	min-height: 260px;
	object-fit: cover;
	object-position: center 28%;
}
.hero-text {
	padding: 2rem 1.25rem 3rem;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
.logo { width: min(320px, 72vw); height: auto; }
.hero h1 {
	font-size: clamp(2.4rem, 7vw, 3.6rem);
	margin: 1rem 0 .25rem;
	color: var(--green);
	letter-spacing: .02em;
}
.hero h1 span { color: var(--red); }
.tagline {
	margin: 0 0 1.5rem;
	font-style: italic;
	color: var(--muted);
	font-size: 1.25rem;
}

.btn {
	display: inline-block;
	background: var(--green);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: .8rem 1.8rem;
	font: 600 1rem var(--sans);
	text-decoration: none;
	cursor: pointer;
	transition: background .15s;
}
.btn:hover, .btn:focus-visible { background: var(--red); color: #fff; }
.btn:disabled { opacity: .6; cursor: wait; }

/* Sections */
main section { padding: 3.5rem 1.25rem; }
.heritage, .milestone, .guestbook { max-width: 46rem; margin: 0 auto; }
.heritage { text-align: center; }
h2 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin: 0 0 1rem; color: var(--green); }
.heritage p { font-size: 1.3rem; margin: 0; }
.heritage .signature {
	margin-top: 1.25rem;
	font-size: 1.5rem;
	font-style: italic;
	color: var(--green);
	line-height: 1.3;
}
.heritage .signature span {
	display: block;
	font: .95rem var(--sans);
	font-style: normal;
	letter-spacing: .04em;
	color: var(--muted);
}

/* Photos */
.photos {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.75rem;
	align-items: start;
	max-width: 70rem;
	margin: 0 auto;
	padding-top: 0;
}
.photos figure {
	width: 100%;
	max-width: 350px;
	margin: 0 auto;
	background: var(--paper);
	padding: .6rem .6rem 0;
	border: 1px solid var(--line);
	box-shadow: 0 6px 18px rgba(60, 40, 20, .12);
}
.photos img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}
.photos figcaption {
	padding: .8rem .4rem 1rem;
	font-style: italic;
	text-align: center;
	color: var(--muted);
	font-size: 1rem;
}

/* Milestone */
.milestone { text-align: center; }
.timeline {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 0;
	position: relative;
}
.timeline li {
	flex: 1;
	max-width: 14rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .25rem;
	position: relative;
	padding-top: 1.5rem;
}
.timeline li::before {
	content: "";
	position: absolute;
	top: 0;
	width: 1rem; height: 1rem;
	border-radius: 50%;
	background: var(--red);
}
.timeline li:first-child::before { background: var(--green); }
.timeline li + li::after {
	content: "";
	position: absolute;
	top: calc(.5rem - 1px);
	right: 50%;
	width: 100%;
	height: 2px;
	background: var(--line);
	z-index: -1;
}
.timeline strong { font-size: 2rem; color: var(--green); }
.timeline li:last-child strong { color: var(--red); }
.timeline span { color: var(--muted); }

/* Guest book */
.guestbook { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; width: calc(100% - 2.5rem); margin: 0 auto 3rem; padding: 2rem 1.25rem; }
main section.guestbook { padding: 2.25rem 1.25rem; }
.lead { margin-top: 0; color: var(--muted); }
.row { margin-bottom: 1.1rem; }
.row label { display: block; font: 600 .95rem var(--sans); margin-bottom: .3rem; }
.req, .opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], textarea {
	width: 100%;
	padding: .7rem .8rem;
	border: 1px solid #c9bda6;
	border-radius: 8px;
	background: #fff;
	font: 1rem var(--sans);
	color: var(--ink);
}
input:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible {
	outline: 3px solid var(--red);
	outline-offset: 2px;
}
.row.check { display: flex; gap: .6rem; align-items: flex-start; }
.row.check input { margin-top: .35rem; width: 1.1rem; height: 1.1rem; accent-color: var(--green); }
.row.check label { font-weight: 400; margin: 0; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.status { min-height: 1.5rem; margin: 1rem 0 0; font: 600 1rem var(--sans); }
.status.ok { color: var(--green); }
.status.err { color: var(--red-dark); }

.guestbook h3 { margin: 2.5rem 0 1rem; font-size: 1.4rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.guestbook h3 .since { display: block; margin-top: .25rem; font: italic 400 .95rem var(--serif); color: var(--muted); }
.entries .entry {
	border-left: 4px solid var(--green);
	padding: .2rem 0 .2rem 1rem;
	margin-bottom: 1.5rem;
}
.entry p { margin: 0 0 .4rem; white-space: pre-line; }
.entry .by { font: .9rem var(--sans); color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }

/* Footer */
footer {
	background: var(--green-dark);
	color: #f1ead9;
	text-align: center;
	padding: 2rem 1.25rem;
	font: .95rem/1.6 var(--sans);
}
footer p { margin: .2rem 0; }
footer a { color: #fff; }
footer a:hover { color: #ffd9d9; }

/* Wider screens */
@media (min-width: 768px) {
	.hero { grid-template-columns: 1.1fr .9fr; min-height: 640px; }
	.hero-photo { order: 0; }
	.hero-photo { height: 100%; }
	.hero-photo img { height: 100%; min-height: 0; object-position: center 20%; }
	.hero-text { padding: 3rem 2rem; }
	.photos { grid-template-columns: repeat(3, 1fr); }
	.photos figure { max-width: none; margin: 0; }
	.photos figure:nth-child(2) { margin-top: 2rem; }
	.guestbook { padding: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn { transition: none; }
}
