/*
Theme Name: Djævlekløften
Theme URI: https://github.com/mrn-dk/djaevlekloeften
Author: Haveforeningen Djævlekløften
Description: Redaktionelt monokromt tema til haveforeningen Djævlekløften. Indeholder havelodder til salg, bestyrelse, dokumentarkiv og nyheder.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: djaevlekloeften
Tags: blog, custom-menu, editor-style, translation-ready
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
	--bg: #faf8f3;
	--ink: #1c1c19;
	--body: #3a3833;
	--muted: #57554e;
	--faint: #807d74;
	--dim: #a19e95;

	--line: #e0dcd3;
	--rule: #c9c4b8;
	--tint: #f5f2ec;
	--placeholder: #e8e4db;
	--placeholder-ink: #a9a498;
	--placeholder-deep: #e4e0d6;

	--badge-bg: #e7eadf;
	--badge-ink: #414737;

	--dark: #1c1c19;
	--dark-ink: #faf8f3;
	--dark-muted: #9c9a92;

	--serif: Georgia, "Times New Roman", Times, serif;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--fs-label: 0.75rem;
	--fs-small: 0.8125rem;
	--fs-meta: 0.875rem;
	--fs-body: 1.0625rem;

	--ls-label: 0.14em;

	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--rail: 120px;
	--rail-gap: clamp(1.5rem, 3vw, 2.25rem);
	--measure: 34rem;

	--max: 1140px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

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

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

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--body);
	font-family: var(--sans);
	font-size: var(--fs-body);
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

figure {
	margin: 0;
}

a {
	color: inherit;
}

button {
	font: inherit;
	color: inherit;
}

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

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

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--gutter);
	z-index: 100;
	background: var(--ink);
	color: var(--dark-ink);
	padding: 0.75rem 1.25rem;
	font-size: var(--fs-small);
	letter-spacing: 0.06em;
	text-decoration: none;
}

.skip-link:focus {
	top: 0.75rem;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--serif);
	font-weight: 400;
	color: var(--ink);
	line-height: 1.2;
	margin: 0 0 0.6em;
	letter-spacing: 0.005em;
}

p {
	margin: 0 0 1.1em;
}

p:last-child {
	margin-bottom: 0;
}

.label {
	font-family: var(--sans);
	font-size: var(--fs-label);
	letter-spacing: var(--ls-label);
	line-height: 1.7;
	color: var(--faint);
	margin: 0;
	text-transform: none;
}

.meta {
	font-size: var(--fs-meta);
	color: var(--faint);
	line-height: 1.7;
}

.lede {
	font-family: var(--serif);
	font-size: 1.1875rem;
	line-height: 1.65;
	color: var(--muted);
	max-width: var(--measure);
}

.intro {
	font-size: var(--fs-body);
	line-height: 1.75;
	color: var(--muted);
	max-width: 30rem;
}

.page-title {
	font-size: clamp(1.75rem, 4vw, 2.125rem);
	margin: 0 0 0.5rem;
}

.hero-title {
	font-size: clamp(2rem, 6vw, 2.875rem);
	line-height: 1.14;
	margin: 0 0 1rem;
	max-width: 13ch;
}

/* Text links inside prose and the underlined "quiet link" pattern. */
.link-quiet {
	color: var(--ink);
	text-decoration: none;
	border-bottom: 1px solid var(--rule);
	padding-bottom: 2px;
	transition: border-color 0.15s ease;
}

.link-quiet:hover,
.link-quiet:focus {
	border-color: var(--ink);
}

.button {
	display: inline-block;
	background: var(--ink);
	color: var(--dark-ink);
	font-size: var(--fs-meta);
	letter-spacing: 0.06em;
	padding: 0.8rem 1.35rem;
	text-decoration: none;
	border: 1px solid var(--ink);
	transition: background 0.15s ease, color 0.15s ease;
}

.button:hover,
.button:focus {
	background: transparent;
	color: var(--ink);
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.container {
	max-width: var(--max);
	margin: 0 auto;
	padding-inline: var(--gutter);
}

.site-main {
	display: block;
}

/* The label rail: a narrow left column of section labels beside the content. */
.rail {
	display: flex;
	gap: var(--rail-gap);
	align-items: flex-start;
}

.rail__label {
	width: var(--rail);
	flex: 0 0 var(--rail);
	padding-top: 0.35rem;
}

.rail__body {
	flex: 1;
	min-width: 0;
}

/* Content that must line up with .rail__body but has no label of its own.
   Uses margin so it can sit on the same element as .container. */
.rail--offset {
	margin-left: calc(var(--rail) + var(--rail-gap));
}

.section {
	padding-block: clamp(2rem, 5vw, 3rem);
}

.section--tight {
	padding-block: clamp(1.5rem, 3vw, 2rem);
}

.divider-top {
	border-top: 1px solid var(--line);
}

.divider-bottom {
	border-bottom: 1px solid var(--line);
}

.divider-strong {
	border-bottom: 1px solid var(--ink);
}

/* Placeholder blocks shown where no image has been uploaded yet. They fill any
   parent that has a height of its own; sized rules further down override this. */
.placeholder {
	height: 100%;
	background: var(--placeholder);
	color: var(--placeholder-ink);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-size: var(--fs-label);
	letter-spacing: var(--ls-label);
	text-align: center;
	padding: 1rem;
}

.placeholder::before {
	content: "";
	width: 26px;
	height: 22px;
	border: 1.5px solid currentColor;
	border-radius: 2px;
	background-image: linear-gradient(135deg, transparent 55%, currentColor 55%, currentColor 70%, transparent 70%);
	opacity: 0.8;
}

.placeholder--quiet {
	background: var(--placeholder-deep);
	color: #b2aea2;
}

.media {
	background: var(--placeholder);
	overflow: hidden;
}

.media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ==========================================================================
   5. Header & navigation
   ========================================================================== */

.site-header {
	border-bottom: 1px solid var(--ink);
	background: var(--bg);
}

.site-header__inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 1.25rem 1rem;
}

.site-brand__name {
	font-family: var(--serif);
	font-size: 1.3125rem;
	line-height: 1.2;
	color: var(--ink);
	margin: 0;
}

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

.site-brand__meta {
	margin: 0.25rem 0 0;
	font-size: var(--fs-label);
	letter-spacing: 0.16em;
	color: var(--faint);
}

.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: clamp(0.9rem, 2vw, 1.5rem);
	font-size: var(--fs-small);
	letter-spacing: 0.08em;
}

.site-nav a {
	color: var(--muted);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
	white-space: nowrap;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-parent > a,
.site-nav .current-post-ancestor > a {
	color: var(--ink);
	border-color: var(--ink);
}

/* Sub-menus stay simple: a plain indented list on mobile, a drop panel above. */
.site-nav .sub-menu {
	display: none;
}

.nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--rule);
	padding: 0.5rem 0.85rem;
	font-size: var(--fs-small);
	letter-spacing: 0.08em;
	color: var(--ink);
	cursor: pointer;
}

/* ==========================================================================
   6. Footer
   ========================================================================== */

.site-footer {
	background: var(--dark);
	color: var(--dark-muted);
	margin-top: clamp(2.5rem, 6vw, 4rem);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	justify-content: space-between;
	align-items: flex-end;
	padding-block: 1.75rem;
}

.site-footer__name {
	font-family: var(--serif);
	font-size: 1.125rem;
	color: var(--dark-ink);
	margin: 0 0 0.4rem;
}

.site-footer p {
	margin: 0;
	font-size: var(--fs-meta);
	line-height: 1.7;
}

.site-footer a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid #3d3b36;
}

.site-footer a:hover,
.site-footer a:focus {
	color: var(--dark-ink);
	border-color: var(--dark-muted);
}

.site-footer__note {
	font-size: var(--fs-small);
	letter-spacing: 0.12em;
}

/* ==========================================================================
   7. Front page
   ========================================================================== */

.hero {
	padding-block: clamp(2rem, 6vw, 3.25rem) clamp(1.5rem, 4vw, 2.25rem);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	align-items: center;
	margin-top: 1.5rem;
}

.hero-image {
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	height: clamp(220px, 38vw, 380px);
}

.hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Three-up strip of key dates. */
.facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-bottom: 1px solid var(--line);
}

.facts__item {
	padding: 1.25rem var(--gutter);
	border-right: 1px solid var(--line);
}

.facts__item:last-child {
	border-right: 0;
}

.facts__value {
	font-family: var(--serif);
	font-size: 1.375rem;
	color: var(--ink);
	margin: 0.45rem 0 0;
}

/* Compact news teasers on the front page. */
.teaser {
	display: flex;
	gap: 1.25rem;
	padding-block: 1.5rem;
	border-bottom: 1px solid var(--line);
}

.teaser:last-child {
	border-bottom: 0;
}

.teaser__media {
	width: 190px;
	height: 122px;
	flex-shrink: 0;
}

.teaser__body {
	flex: 1;
	min-width: 0;
}

.teaser__title {
	font-size: 1.3125rem;
	margin: 0.4rem 0 0.4rem;
}

.teaser__title a {
	text-decoration: none;
}

.teaser__title a:hover,
.teaser__title a:focus {
	border-bottom: 1px solid var(--rule);
}

.teaser__excerpt {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--muted);
	margin: 0;
}

/* ==========================================================================
   8. News archive
   ========================================================================== */

.archive-intro {
	padding-block: clamp(1.75rem, 4vw, 2.5rem) 1.25rem;
}

.story-list {
	padding-bottom: 0.5rem;
}

.meta--narrow {
	max-width: 24rem;
}

.archive-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 1.25rem;
}

.filter-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 0;
	padding: 0;
	font-size: var(--fs-small);
	letter-spacing: 0.08em;
}

.filter-list a {
	color: var(--muted);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
}

.filter-list a:hover,
.filter-list a:focus,
.filter-list .is-current a {
	color: var(--ink);
	border-color: var(--ink);
}

.lead-story {
	border-bottom: 1px solid var(--ink);
	padding-bottom: clamp(1.75rem, 4vw, 2.25rem);
}

.lead-story__media {
	border-top: 1px solid var(--line);
	margin-bottom: 1.5rem;
}

.lead-story__media img,
.lead-story__media .placeholder {
	width: 100%;
	height: clamp(200px, 32vw, 340px);
	object-fit: cover;
}

.lead-story__title {
	font-size: clamp(1.5rem, 3.5vw, 2rem);
	line-height: 1.2;
	max-width: 20ch;
	margin: 0 0 0.75rem;
}

.lead-story__title a {
	text-decoration: none;
}

/* Dated list rows for the rest of the archive. */
.story-row {
	display: flex;
	gap: var(--rail-gap);
	padding-block: 1.4rem;
	border-bottom: 1px solid var(--line);
}

.story-row__rail {
	width: var(--rail);
	flex: 0 0 var(--rail);
}

.story-row__body {
	flex: 1;
	min-width: 0;
}

.story-row__title {
	font-size: 1.3125rem;
	margin: 0 0 0.35rem;
}

.story-row__title a {
	text-decoration: none;
}

.story-row__title a:hover,
.story-row__title a:focus {
	border-bottom: 1px solid var(--rule);
}

.story-row__media {
	width: 150px;
	height: 94px;
	flex-shrink: 0;
}

/* ==========================================================================
   9. Single article
   ========================================================================== */

.breadcrumb-bar {
	border-bottom: 1px solid var(--line);
	padding-block: 0.9rem;
	font-size: var(--fs-small);
	letter-spacing: 0.08em;
}

.breadcrumb-bar a {
	color: var(--muted);
	text-decoration: none;
}

.breadcrumb-bar a:hover,
.breadcrumb-bar a:focus {
	color: var(--ink);
}

.article-head {
	padding-block: clamp(2rem, 5vw, 2.75rem) clamp(1.25rem, 3vw, 2rem);
}

.article-title {
	font-size: clamp(1.875rem, 5vw, 2.75rem);
	line-height: 1.16;
	max-width: 18ch;
	margin: 0 0 1rem;
}

.article-hero {
	border-top: 1px solid var(--line);
}

.article-hero img,
.article-hero .placeholder {
	width: 100%;
	height: clamp(220px, 36vw, 400px);
	object-fit: cover;
}

.article-caption {
	font-size: var(--fs-meta);
	line-height: 1.7;
	color: var(--faint);
	margin: 0.65rem 0 0;
	max-width: var(--measure);
}

.entry-content {
	max-width: var(--measure);
	color: var(--body);
	line-height: 1.85;
}

.entry-content > * + * {
	margin-top: 1.1em;
}

.entry-content h2 {
	font-size: 1.5rem;
	margin-top: 1.8em;
}

.entry-content h3 {
	font-size: 1.25rem;
	margin-top: 1.6em;
}

.entry-content a {
	color: var(--ink);
	text-decoration: none;
	border-bottom: 1px solid var(--rule);
}

.entry-content a:hover,
.entry-content a:focus {
	border-color: var(--ink);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.25rem;
}

.entry-content li + li {
	margin-top: 0.4em;
}

.entry-content blockquote {
	border-left: 2px solid var(--ink);
	padding: 0.15rem 0 0.15rem 1.1rem;
	margin: 1.5em 0;
	font-family: var(--serif);
	font-size: 1.1875rem;
	line-height: 1.55;
	color: var(--ink);
}

.entry-content blockquote p {
	margin: 0;
}

.entry-content blockquote cite,
.entry-content blockquote .wp-block-quote__citation {
	display: block;
	margin-top: 0.5rem;
	font-family: var(--sans);
	font-size: var(--fs-meta);
	font-style: normal;
	letter-spacing: 0.1em;
	color: var(--faint);
}

.entry-content figcaption {
	font-size: var(--fs-meta);
	line-height: 1.7;
	color: var(--faint);
	margin-top: 0.5rem;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
}

.entry-content th,
.entry-content td {
	text-align: left;
	padding: 0.6rem 0.5rem 0.6rem 0;
	border-bottom: 1px solid var(--line);
}

.entry-content code,
.entry-content kbd {
	font-size: 0.9em;
	background: var(--tint);
	padding: 0.1em 0.35em;
}

/* Previous / next pair below an article. */
.post-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border-top: 1px solid var(--ink);
}

.post-nav__item {
	padding-block: 1.25rem;
	padding-right: var(--gutter);
	border-right: 1px solid var(--line);
}

.post-nav__item:last-child {
	border-right: 0;
	text-align: right;
	padding-right: 0;
	padding-left: var(--gutter);
}

/* Beats .post-nav__item:last-child when only one neighbour exists. */
.post-nav .post-nav__item--only {
	grid-column: 1 / -1;
	text-align: left;
	border-right: 0;
}

.post-nav__title {
	font-family: var(--serif);
	font-size: 1.1875rem;
	color: var(--ink);
	margin: 0.45rem 0 0.2rem;
}

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

.post-nav a:hover .post-nav__title,
.post-nav a:focus .post-nav__title {
	border-bottom: 1px solid var(--rule);
	display: inline-block;
}

.copy-link {
	background: none;
	border: 0;
	border-bottom: 1px solid var(--rule);
	padding: 0;
	color: var(--ink);
	font-size: var(--fs-label);
	letter-spacing: var(--ls-label);
	cursor: pointer;
}

/* ==========================================================================
   10. Board members
   ========================================================================== */

.board-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 1px solid var(--line);
}

.board-card {
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.board-card:nth-child(4n) {
	border-right: 0;
}

.board-card__media {
	height: 150px;
}

.board-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.board-card__text {
	padding: 1rem 1.15rem 1.25rem;
}

.board-card__name {
	font-family: var(--serif);
	font-size: 1.1875rem;
	color: var(--ink);
	margin: 0.45rem 0 0.2rem;
}

.board-card__plot {
	font-size: var(--fs-meta);
	color: var(--faint);
	margin: 0;
}

/* Deputies are rendered a shade quieter than elected members. */
.board-card--deputy .board-card__media {
	background: #eae7df;
}

.board-card--deputy .board-card__name {
	color: var(--muted);
}

.board-card--deputy .label {
	color: var(--dim);
}

.board-card--contact {
	background: var(--tint);
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.board-card--contact .board-card__name {
	font-size: 1.125rem;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.board-card--contact a {
	text-decoration: none;
	border-bottom: 1px solid var(--rule);
}

/* ==========================================================================
   11. Document lists (rules, minutes)
   ========================================================================== */

.doc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.doc-list__item {
	display: flex;
	align-items: baseline;
	gap: 0.9rem;
	padding-block: 0.85rem;
	border-top: 1px solid var(--line);
}

.doc-list__item:first-child {
	border-top: 1px solid var(--ink);
}

.doc-list--minutes .doc-list__item:last-child {
	border-bottom: 1px solid var(--line);
}

.doc-list__date {
	width: 130px;
	flex: 0 0 130px;
	font-size: var(--fs-meta);
	letter-spacing: 0.08em;
	color: var(--faint);
}

.doc-list__title {
	flex: 1;
	min-width: 0;
	font-size: 1.0625rem;
	color: var(--ink);
	text-decoration: none;
	border-bottom: 1px solid var(--rule);
}

.doc-list__title:hover,
.doc-list__title:focus {
	border-color: var(--ink);
}

.doc-list__file {
	font-size: var(--fs-meta);
	color: var(--faint);
	white-space: nowrap;
}

.callout {
	background: var(--tint);
	padding: 1.35rem 1.5rem;
}

/* Contact details, three across. */
.contact-grid {
	display: grid;
	gap: 1.5rem clamp(1.5rem, 4vw, 2.5rem);
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	border-top: 1px solid var(--ink);
	padding-top: 1.35rem;
}

.contact-grid__value {
	font-family: var(--serif);
	font-size: 1.1875rem;
	color: var(--ink);
	margin: 0.4rem 0 0.25rem;
	overflow-wrap: anywhere;
}

.callout__title {
	font-family: var(--serif);
	font-size: 1.1875rem;
	color: var(--ink);
	margin: 0 0 0.4rem;
}

.callout p {
	font-size: 1rem;
	line-height: 1.75;
	color: var(--muted);
	margin: 0;
}

/* ==========================================================================
   12. Plots for sale
   ========================================================================== */

.plot-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	padding-block: 0.85rem;
	border-top: 1px solid var(--line);
	font-size: var(--fs-meta);
	letter-spacing: 0.08em;
	color: var(--faint);
}

.plot-bar__sort {
	margin-left: auto;
}

.plot {
	border-top: 2px solid var(--ink);
	padding-bottom: clamp(2rem, 5vw, 3rem);
}

.plot__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 0.9rem 0.85rem;
}

.plot__number {
	font-size: var(--fs-meta);
	letter-spacing: 0.16em;
	color: var(--ink);
	margin: 0;
}

.badge {
	background: var(--badge-bg);
	color: var(--badge-ink);
	font-size: var(--fs-label);
	letter-spacing: 0.13em;
	padding: 0.25rem 0.6rem;
	white-space: nowrap;
}

.badge--reserveret {
	background: transparent;
	border: 1px solid var(--rule);
	color: var(--faint);
}

.badge--solgt {
	background: transparent;
	border: 1px solid var(--rule);
	color: var(--dim);
}

.plot__body {
	padding-top: 1.15rem;
}

.plot__gallery {
	display: grid;
	gap: 2px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Aspect ratios rather than fixed heights: members upload whatever their phone
   produces, and 3:2 is close enough to most of it that the crop stays gentle.
   The full photo is always one click away in the lightbox. */
.plot__shot {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	background: var(--placeholder);
}

.plot__shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.15s ease;
}

.plot__shot:hover img,
.plot__shot:focus-visible img {
	opacity: 0.86;
}

.plot__shot:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: -2px;
}

.plot__shot:first-child {
	grid-column: 1 / -1;
	aspect-ratio: 2 / 1;
	max-height: 440px;
}

/* Only the first few photos are shown; the rest live in the lightbox. */
.plot__gallery .plot__shot:nth-child(n + 8) {
	display: none;
}

.plot__gallery--compact .plot__shot:first-child {
	aspect-ratio: 3 / 1;
	max-height: 240px;
}

.plot__gallery--compact .plot__shot:nth-child(n + 2) {
	display: none;
}

/* Photo count on the lead tile, "+N flere" when the grid is truncated. */
.plot__shot[data-count]::after,
.plot__shot[data-more]::after {
	position: absolute;
	bottom: 12px;
	left: 12px;
	background: rgba(28, 28, 25, 0.82);
	color: var(--dark-ink);
	font-size: var(--fs-label);
	letter-spacing: 0.12em;
	padding: 0.3rem 0.65rem;
}

.plot__shot[data-count]::after {
	content: attr(data-count);
}

.plot__shot[data-more]::after {
	content: attr(data-more);
	left: auto;
	right: 12px;
}

.plot__gallery .placeholder {
	grid-column: 1 / -1;
	height: clamp(200px, 30vw, 300px);
}

.plot__title-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1.25rem;
	margin-bottom: 0.5rem;
	flex-wrap: wrap;
}

.plot__title {
	font-size: 1.5rem;
	margin: 0;
	max-width: 24ch;
}

.plot__price {
	font-family: var(--serif);
	font-size: 1.625rem;
	color: var(--ink);
	white-space: nowrap;
	margin: 0;
}

.plot__specs {
	font-size: var(--fs-meta);
	letter-spacing: 0.1em;
	color: var(--faint);
	margin: 0 0 0.85rem;
}

.plot__description {
	font-size: var(--fs-body);
	line-height: 1.75;
	color: var(--muted);
	max-width: var(--measure);
	margin: 0 0 1.25rem;
}

.plot__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 1.15rem;
	align-items: center;
}

.plot__seller {
	font-size: var(--fs-meta);
	color: var(--faint);
}

/* Reserved and sold plots recede into the page. */
.plot--quiet {
	background: var(--tint);
}

.plot--quiet .plot__number,
.plot--quiet .plot__title,
.plot--quiet .plot__price {
	color: var(--faint);
}

.plot--quiet .plot__price {
	color: var(--dim);
}

.plot__foot {
	border-top: 1px solid var(--line);
	padding-block: 1.15rem 1.6rem;
	font-size: var(--fs-meta);
	letter-spacing: 0.1em;
	color: var(--faint);
}

/* ==========================================================================
   13. Lightbox
   ========================================================================== */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	/* Near-solid: at 0.95 the light page bled through and read as a rendering
	   fault rather than an overlay. */
	background: #181815;
}

.lightbox[hidden] {
	display: none;
}

.lightbox__stage {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3.5rem 4.5rem 1rem;
}

.lightbox__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	/* contain, never cover: this is the uncropped view. */
	object-fit: contain;
}

.lightbox__foot {
	flex-shrink: 0;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1rem clamp(1rem, 4vw, 2.5rem) 1.5rem;
	color: var(--dark-muted);
}

.lightbox__caption {
	font-size: var(--fs-meta);
	line-height: 1.6;
	margin: 0;
	max-width: 46rem;
}

.lightbox__counter {
	font-size: var(--fs-label);
	letter-spacing: 0.14em;
	white-space: nowrap;
	margin: 0;
}

.lightbox__button {
	position: absolute;
	background: none;
	border: 1px solid rgba(250, 248, 243, 0.35);
	color: var(--dark-ink);
	width: 44px;
	height: 44px;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.lightbox__button:hover,
.lightbox__button:focus-visible {
	background: rgba(250, 248, 243, 0.14);
	border-color: var(--dark-ink);
}

.lightbox__button[disabled] {
	opacity: 0.3;
	cursor: default;
}

.lightbox__close {
	top: 1rem;
	right: clamp(1rem, 4vw, 2.5rem);
}

.lightbox__prev {
	left: clamp(0.5rem, 2vw, 1.25rem);
	top: 50%;
	transform: translateY(-50%);
}

.lightbox__next {
	right: clamp(0.5rem, 2vw, 1.25rem);
	top: 50%;
	transform: translateY(-50%);
}

/* Stops the page behind the lightbox from scrolling. */
body.lightbox-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.lightbox__stage {
		padding: 3.5rem 0.5rem 0.5rem;
	}

	.lightbox__prev {
		left: 0.5rem;
	}

	.lightbox__next {
		right: 0.5rem;
	}

	.lightbox__foot {
		flex-direction: column;
		gap: 0.4rem;
	}
}

/* ==========================================================================
   14. Pagination, search and 404
   ========================================================================== */

.pagination {
	padding-block: 1.5rem 2rem;
	font-size: var(--fs-small);
	letter-spacing: 0.08em;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.pagination a,
.pagination .current {
	text-decoration: none;
	color: var(--muted);
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
}

.pagination a:hover,
.pagination a:focus,
.pagination .current {
	color: var(--ink);
	border-color: var(--ink);
}

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 26rem;
}

.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	font: inherit;
	font-size: 1rem;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--rule);
	background: #fff;
	color: var(--ink);
}

.search-form button {
	background: var(--ink);
	color: var(--dark-ink);
	border: 1px solid var(--ink);
	padding: 0.6rem 1.1rem;
	font-size: var(--fs-meta);
	letter-spacing: 0.06em;
	cursor: pointer;
}

.notice {
	font-size: var(--fs-body);
	color: var(--muted);
	max-width: var(--measure);
}

/* ==========================================================================
   15. WordPress core classes
   ========================================================================== */

.alignleft {
	float: left;
	margin: 0.35rem 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.35rem 0 1rem 1.5rem;
}

.aligncenter {
	margin-inline: auto;
}

.alignwide,
.alignfull {
	max-width: none;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	font-size: var(--fs-meta);
	color: var(--faint);
	margin-top: 0.5rem;
}

.sticky .story-row__title::after {
	content: " ·";
	color: var(--faint);
}

/* ==========================================================================
   16. Responsive
   ========================================================================== */

@media (max-width: 900px) {
	:root {
		--rail: 96px;
	}

	.board-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.board-card:nth-child(4n) {
		border-right: 1px solid var(--line);
	}

	.board-card:nth-child(2n) {
		border-right: 0;
	}

	.plot__gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.site-header__inner {
		flex-wrap: wrap;
		align-items: center;
	}

	.nav-toggle {
		display: block;
	}

	.site-nav {
		flex-basis: 100%;
		display: none;
	}

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

	.site-nav ul {
		flex-direction: column;
		gap: 0;
		padding-block: 0.5rem 0.75rem;
		font-size: var(--fs-body);
	}

	.site-nav li {
		border-top: 1px solid var(--line);
	}

	.site-nav a {
		display: block;
		padding-block: 0.7rem;
		border-bottom: 0;
	}

	.site-nav .current-menu-item > a,
	.site-nav .current_page_item > a {
		border-bottom: 0;
	}

	/* The rail stacks above its content on small screens. */
	.rail {
		display: block;
	}

	.rail__label {
		width: auto;
		flex: none;
		padding: 0 0 0.75rem;
	}

	.rail--offset {
		margin-left: 0;
	}

	.facts {
		grid-template-columns: 1fr;
	}

	.facts__item {
		border-right: 0;
		border-bottom: 1px solid var(--line);
	}

	.facts__item:last-child {
		border-bottom: 0;
	}

	.teaser {
		flex-direction: column;
	}

	.teaser__media {
		width: 100%;
		height: 190px;
	}

	.story-row {
		display: block;
	}

	.story-row__rail {
		width: auto;
		flex: none;
		margin-bottom: 0.5rem;
	}

	.story-row__media {
		width: 100%;
		height: 180px;
		margin-top: 1rem;
	}

	.doc-list__item {
		flex-wrap: wrap;
		gap: 0.35rem 0.9rem;
	}

	.doc-list__date {
		width: 100%;
		flex: none;
	}

	.doc-list__title {
		flex: 1 1 100%;
	}

	.post-nav {
		grid-template-columns: 1fr;
	}

	.post-nav__item {
		border-right: 0;
		border-bottom: 1px solid var(--line);
		padding-right: 0;
	}

	.post-nav__item:last-child {
		text-align: left;
		border-bottom: 0;
		padding-left: 0;
	}

	.plot__gallery {
		grid-template-columns: 1fr;
	}

	.plot__gallery img {
		height: 220px;
	}
}

@media (max-width: 520px) {
	.board-grid {
		grid-template-columns: 1fr;
	}

	.board-card,
	.board-card:nth-child(2n) {
		border-right: 0;
	}
}
