/* Thompson Golf Planning — responsive rebuild of the 2000 frames site */
:root {
	--teal: #185a73;
	--teal-dark: #0f4254;
	--orange: #da904c;
	--ink: #1d2327;
	--muted: #5b6770;
	--rule: #d7e0e6;
	--paper: #ffffff;
	--sidebar-w: 200px;
	--font: Arial, Helvetica, sans-serif;
	--serif: Georgia, "Times New Roman", serif;
}

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

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

body {
	margin: 0;
	background: #e7eef4 url(../images/bg-texture.gif);
	color: var(--ink);
	font: 15px/1.65 var(--font);
}

img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

a {
	color: var(--teal);
	text-underline-offset: 2px;
}

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: #fff;
	padding: 8px 12px;
	z-index: 20;
}

.skip-link:focus {
	left: 8px;
}

/* ---------- Layout: fixed sidebar + content column ---------- */
.layout {
	display: grid;
	grid-template-columns: var(--sidebar-w) minmax(0, 820px);
	min-height: 100vh;
}

.sidebar {
	background: #e6e9ef url(../images/bg-nav.jpg);
	border-right: 3px solid #cfd6de;
}

.brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 110px;
	background: var(--teal);
	text-decoration: none;
}

.menu-toggle {
	display: none;
}

.site-nav {
	position: sticky;
	top: 0;
}

.site-nav ul {
	margin: 0;
	padding: 16px 12px;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.site-nav a {
	display: block;
	padding: 6px 10px;
	background: linear-gradient(#1f6d8a, var(--teal) 55%, var(--teal-dark));
	border: 1px solid #0b3342;
	box-shadow: 3px 3px 0 rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
	color: #fff;
	font: bold 14px/1.3 var(--serif);
	text-align: center;
	text-decoration: none;
	transition: color .15s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
	color: var(--orange);
}

.site-nav a[aria-current] {
	color: var(--orange);
	background: linear-gradient(#123f50, #0f3645);
}

.page {
	background: var(--paper);
	box-shadow: 4px 0 10px rgba(40, 60, 80, .12);
	display: flex;
	flex-direction: column;
}

.content {
	flex: 1;
	padding: 0 0 36px;
}

.content > *:not(.banner):not(.home-hero) {
	margin-left: 32px;
	margin-right: 32px;
}

.banner {
	margin: 0;
	line-height: 0;
	background: #fff;
}

.banner img {
	display: block;
	max-height: 126px;
	width: auto;
}

p {
	margin: 0 0 1em;
}

.big {
	display: inline-block;
	font-size: 18px;
	font-weight: bold;
	color: var(--teal);
}

.small {
	font-size: 13px;
}

.teal {
	color: var(--teal);
}

.label {
	font-weight: bold;
	font-size: 17px;
	letter-spacing: .04em;
}

.archive-note {
	padding: 10px 14px;
	border-left: 3px solid var(--teal);
	background: #eef4f7;
	font-size: 13.5px;
	color: var(--muted);
}

/* Old layout tables become wrapping flex rows */
.grid {
	width: 100%;
	margin: 0 0 1em;
}

.row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.row + .row {
	margin-top: 12px;
}

.cell {
	flex: 1 1 300px;
	min-width: 0;
}

.cell.narrow {
	flex: 0 1 220px;
}

.cell.full {
	flex-basis: 100%;
}

.cell.center {
	text-align: center;
}

.cell.right {
	text-align: right;
}

.float-right {
	float: right;
	margin: 4px 0 14px 20px;
	max-width: 45%;
}

.float-left {
	float: left;
	margin: 4px 20px 14px 0;
	max-width: 45%;
}

.content::after,
.cell::after {
	content: "";
	display: block;
	clear: both;
}

.next-icon {
	width: 22px;
	height: 22px;
}

/* ---------- Home ---------- */
.home-hero {
	background: url(../images/backhome.jpg) left top / 532px auto no-repeat;
	min-height: 560px;
	padding: 290px 0 24px 12px;
	max-width: 532px;
}

.home-text {
	width: 360px;
	text-align: center;
}

.tagline {
	font-size: 15px;
	line-height: 1.5;
}

.honors {
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.honors li {
	margin: 0 0 14px;
}

.honors a {
	display: block;
	font-weight: bold;
}

.honors a.sub {
	font-weight: normal;
}

.honors span {
	display: block;
}

/* ---------- Gallery ---------- */
.album-title {
	margin: 0 0 8px;
	font: bold 22px/1.3 var(--serif);
	color: var(--teal);
}

.album-desc {
	max-width: 680px;
}

.album-meta {
	color: var(--muted);
	font-size: 13.5px;
}

.crumbs {
	margin-bottom: 10px;
	font-size: 13.5px;
	color: var(--muted);
}

.albums {
	margin: 20px 32px 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 28px;
}

.albums li {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	gap: 6px 22px;
	align-items: start;
}

.albums a {
	display: contents;
}

.albums img {
	grid-row: 1 / 4;
	border: 1px solid var(--rule);
	box-shadow: 3px 3px 6px rgba(0, 0, 0, .25);
}

.card-title {
	font: bold 18px/1.3 var(--serif);
	text-decoration: underline;
}

.albums p {
	margin: 0;
	grid-column: 2;
}

.album {
	margin: 20px 32px 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 22px 20px;
}

.album li {
	scroll-margin-top: 20px;
}

.album a,
.album li > img {
	display: block;
	line-height: 0;
}

.album img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border: 1px solid var(--rule);
	box-shadow: 3px 3px 6px rgba(0, 0, 0, .22);
	transition: transform .15s, box-shadow .15s;
}

.album a:hover img,
.album a:focus-visible img {
	transform: translateY(-2px);
	box-shadow: 4px 8px 14px rgba(0, 0, 0, .3);
}

.album p {
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.5;
}

.num {
	display: inline-block;
	min-width: 22px;
	margin-right: 4px;
	padding: 0 5px;
	border-radius: 3px;
	background: var(--teal);
	color: #fff;
	font-weight: bold;
	font-size: 11.5px;
	text-align: center;
}

.album-next {
	margin-top: 28px !important;
	font-weight: bold;
}

/* Lightbox */
.lb-open,
.lb-open body {
	overflow: hidden;
}

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(8, 24, 32, .92);
	padding: 16px;
}

.lightbox[hidden] {
	display: none;
}

.lb-inner {
	position: relative;
	width: min(960px, 100%);
	max-height: 100%;
	display: flex;
	justify-content: center;
}

.lightbox figure {
	margin: 0;
	max-width: 100%;
}

.lb-stage {
	position: relative;
	line-height: 0;
}

.lightbox img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 170px);
	width: auto;
	height: auto;
	margin: 0 auto;
	background: #111;
}

.lightbox figcaption {
	margin-top: 10px;
	color: #e8eef2;
	font-size: 14px;
	line-height: 1.5;
	max-width: 800px;
}

.lb-count {
	color: var(--orange);
	font-weight: bold;
	margin-right: 6px;
}

.lb-close,
.lb-prev,
.lb-next {
	position: absolute;
	border: 0;
	background: rgba(0, 0, 0, .5);
	color: #fff;
	cursor: pointer;
	font: 34px/1 Georgia, serif;
}

.lb-close {
	top: -6px;
	right: -6px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	z-index: 2;
	font-size: 30px;
}

.lb-prev,
.lb-next {
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 70px;
}

.lb-prev {
	left: 0;
}

.lb-next {
	right: 0;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover,
.lb-close:focus-visible,
.lb-prev:focus-visible,
.lb-next:focus-visible {
	background: var(--teal);
}

/* ---------- Footer ---------- */
.site-footer {
	border-top: 9px solid transparent;
	border-image: url(../images/plaidbar.jpg) 0 0 100% 0 / 9px 0 0 0 stretch;
	margin: 0 32px;
	padding: 12px 0 22px;
	font-size: 12px;
	color: var(--muted);
	text-align: center;
}

.site-footer p {
	margin: 0;
}

/* ---------- Tablet / phone ---------- */
@media (max-width: 760px) {
	.layout {
		display: block;
	}

	.sidebar {
		position: sticky;
		top: 0;
		z-index: 10;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		background: var(--teal);
		border: 0;
		box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
	}

	.brand {
		flex-direction: row;
		height: auto;
		padding: 8px 14px;
		gap: 10px;
	}

	.brand-mark {
		width: 38px;
		height: 38px;
	}

	.menu-toggle {
		display: flex;
		align-items: center;
		gap: 8px;
		margin-right: 12px;
		padding: 9px 12px;
		background: rgba(0, 0, 0, .25);
		border: 1px solid rgba(255, 255, 255, .45);
		border-radius: 5px;
		color: #fff;
		font: bold 13px var(--font);
		text-transform: uppercase;
		letter-spacing: .05em;
		cursor: pointer;
	}

	.bars,
	.bars::before,
	.bars::after {
		display: block;
		width: 18px;
		height: 2px;
		background: #fff;
		position: relative;
	}

	.bars::before,
	.bars::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.bars::before {
		top: -6px;
	}

	.bars::after {
		top: 6px;
	}

	.site-nav {
		display: none;
		flex-basis: 100%;
		position: static;
		background: #e6e9ef url(../images/bg-nav.jpg);
	}

	.site-nav.open {
		display: block;
	}

	.site-nav ul {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		padding: 12px;
	}

	.site-nav a {
		padding: 10px 8px;
	}

	.content > *:not(.banner):not(.home-hero) {
		margin-left: 16px;
		margin-right: 16px;
	}

	.albums,
	.album {
		margin-left: 16px;
		margin-right: 16px;
	}

	.site-footer {
		margin: 0 16px;
	}

	.float-right,
	.float-left {
		float: none;
		display: block;
		max-width: 100%;
		margin: 12px auto;
	}

	.home-hero {
		background-size: 100% auto;
		padding: calc((100vw - 3px) * 1.02) 16px 24px;
		min-height: 0;
		max-width: none;
	}

	.home-text {
		width: auto;
	}

	.albums li {
		grid-template-columns: 1fr;
	}

	.albums img,
	.albums p {
		grid-row: auto;
		grid-column: auto;
	}

	.album {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 18px 14px;
	}

	.lb-prev,
	.lb-next {
		width: 38px;
		height: 56px;
	}
}
