/*
Theme Name: Fernlight
Theme URI: https://wordpress.org/themes/fernlight/
Author: Mara
Description: A quiet theme for photographs and short notes. Big pictures, small words.
Version: 1.3.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fernlight
*/

:root {
	--paper: #F4F5F0;
	--ink: #1C251F;
	--sub: #5F6B61;
	--line: #D6DCD1;
	--moss: #46613A;
	--lichen: #C9D3A6;
	--serif: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.65 var(--serif); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-color: var(--moss); }
::selection { background: var(--lichen); }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: static !important; width: auto; height: auto; clip: auto; display: block; padding: 8px 16px; background: var(--ink); color: var(--paper); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 728px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 36px; padding-bottom: 22px; flex-wrap: wrap; }
.site-title { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -0.015em; }
.site-title a { color: var(--ink); text-decoration: none; }
.site-description { margin: 6px 0 0; font: 15px/1.4 var(--sans); color: var(--sub); }
.main-navigation { display: flex; gap: 26px; font: 15px/1 var(--sans); }
.main-navigation a { color: var(--sub); text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.main-navigation a:hover { color: var(--ink); }
.main-navigation a[aria-current] { color: var(--ink); border-bottom-color: var(--moss); }

/* Lists of posts */
.site-main { padding: 48px 0 72px; }
.site-main.wrap { padding: 48px 24px 72px; }
.entry-meta { margin: 0 0 6px; font: 13px/1.4 var(--sans); color: var(--sub); letter-spacing: 0.01em; }
.entry-meta a { color: var(--sub); text-decoration: none; }
.entry-meta a:hover { color: var(--moss); }
.entry-meta .sep { color: var(--line); margin: 0 4px; }
.entry-title { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.entry-title a { color: var(--ink); text-decoration: none; }
.entry-title a:hover { color: var(--moss); }
.entry-summary p { margin: 10px 0 0; color: #3A443D; }

.entry-featured { margin-bottom: 72px; }
.entry-featured .entry-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.entry-featured .entry-header { margin-top: 22px; }
.entry-featured .entry-title { font-size: 44px; }
.entry-featured .entry-summary { max-width: 640px; font-size: 20px; }

.entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 48px; }
.entries .entry-thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--line); margin-bottom: 18px; }
.entries .entry-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.entries .entry-thumb:hover img { transform: scale(1.025); }
.entries .entry-title { font-size: 27px; }
.entry-thumb.is-locked { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(135deg, #E6EAE1 0 14px, #EDF0E8 14px 28px); color: var(--sub); font: 15px/1.4 var(--sans); text-decoration: none; }
.entry-thumb.is-locked span { padding: 8px 14px; background: var(--paper); border: 1px solid var(--line); }
.post-password-required .entry-title a::before { content: "\1F512\00a0"; font-size: .7em; }

.page-header { margin-bottom: 48px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.archive-kind { margin: 0 0 4px; font: 13px/1.4 var(--sans); color: var(--sub); }
.page-title { margin: 0; font-size: 40px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
.page-title span { color: var(--moss); }
.no-results p { font-size: 19px; }

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--line); font: 15px/1.4 var(--sans); }
.pagination .current { color: var(--sub); }
.pagination .next { margin-left: auto; }

/* Single post */
.single .entry-header, .page .entry-header { margin-bottom: 32px; }
.single .entry-title, .page .entry-title { font-size: 46px; }
.photo { margin: 0 auto 40px; max-width: 1180px; padding: 0 24px; }
.photo.is-portrait { max-width: 820px; }
.photo img { width: 100%; }
.wp-caption-text { max-width: 728px; margin: 12px auto 0; padding: 0 24px; font: 14px/1.5 var(--sans); color: var(--sub); }
.photo.is-portrait .wp-caption-text { max-width: none; padding: 0; }
.prose { margin-bottom: 40px; }
.prose p { margin: 0 0 1.1em; font-size: 19px; line-height: 1.72; }
.prose h2 { font-size: 26px; margin: 1.6em 0 .4em; font-weight: 600; }
.entry-footer { font: 14px/1.5 var(--sans); color: var(--sub); }
.entry-footer .tags-links { display: block; padding-top: 18px; border-top: 1px solid var(--line); }
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; margin-bottom: 56px; }
.post-navigation a { display: block; color: var(--ink); text-decoration: none; font-size: 19px; line-height: 1.35; }
.post-navigation a:hover { color: var(--moss); }
.post-navigation .meta-nav { display: block; font: 13px/1.6 var(--sans); color: var(--sub); }
.post-navigation .nav-next { text-align: right; grid-column: 2; }

.post-password-form { padding: 28px; border: 1px solid var(--line); background: #fff; font-size: 17px; }

/* Comments */
.comments-area { padding-top: 8px; }
.comments-title, .comment-reply-title { font-size: 24px; font-weight: 600; margin: 0 0 20px; }
.comment-list { list-style: none; margin: 0 0 48px; padding: 0; }
.comment { padding: 18px 0; border-top: 1px solid var(--line); }
.comment-meta { font: 14px/1.4 var(--sans); color: var(--sub); }
.comment-meta .fn { color: var(--ink); font-weight: 600; margin-right: 8px; }
.bypostauthor .comment-meta .fn::after { content: "author"; margin-left: 8px; padding: 1px 6px; border-radius: 3px; background: var(--lichen); color: var(--ink); font-weight: 400; font-size: 12px; }
.comment-content p { margin: 6px 0 0; font-size: 17px; }
.comment-awaiting-moderation { margin: 6px 0 0; font: italic 14px/1.4 var(--sans); color: var(--moss); }

/* Forms */
input[type=text], input[type=email], input[type=url], input[type=password], input[type=search], textarea {
	width: 100%; padding: 10px 12px; border: 1px solid #C3CBBE; border-radius: 2px; background: #fff; color: var(--ink); font: 16px/1.4 var(--sans);
}
input:focus, textarea:focus { border-color: var(--moss); outline: none; box-shadow: 0 0 0 3px rgba(70, 97, 58, .18); }
.comment-form label, .wpcf7 label { font: 14px/1.6 var(--sans); color: var(--sub); }
.comment-notes { font: 14px/1.5 var(--sans); color: var(--sub); }
.required { color: #9A3B2B; }
input[type=submit], button { border: 0; border-radius: 2px; padding: 11px 22px; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--sans); cursor: pointer; }
input[type=submit]:hover, button:hover { background: var(--moss); }
.post-password-form input[type=password] { width: auto; }
.wpcf7-response-output { padding: 14px 18px; border-left: 3px solid var(--moss); background: #fff; font: 16px/1.5 var(--sans); }

/* Footer */
.site-footer { background: var(--ink); color: #C9D0C4; font: 15px/1.6 var(--sans); }
.site-footer a { color: #E8ECE2; }
.site-footer a:hover { color: var(--lichen); }
.widgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; padding-top: 56px; padding-bottom: 40px; }
.widget-title { margin: 0 0 10px; font: 600 15px/1.4 var(--serif); color: #fff; letter-spacing: .01em; }
.widget ul { list-style: none; margin: 0 0 28px; padding: 0; }
.widget li { padding: 3px 0; }
.widget p { margin: 0 0 28px; }
.search-form { display: flex; gap: 8px; margin-bottom: 28px; }
.search-form label { flex: 1; }
.site-footer .search-field { border-color: #3A463D; background: #263029; color: #fff; }
.site-footer .search-submit { background: var(--lichen); color: var(--ink); }
.site-info { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid #2F3A32; font-size: 13px; color: #9AA597; }
.site-info a { color: #9AA597; }

@media (max-width: 760px) {
	body { font-size: 17px; }
	.header-in { padding-top: 24px; align-items: flex-start; flex-direction: column; }
	.entries { grid-template-columns: 1fr; gap: 48px; }
	.entry-featured .entry-title, .single .entry-title, .page .entry-title { font-size: 34px; }
	.page-title { font-size: 32px; }
	.widgets { grid-template-columns: 1fr; gap: 8px; }
	.photo { padding: 0; }
	.wp-caption-text { padding: 0 24px; }
	.post-navigation { grid-template-columns: 1fr; }
	.post-navigation .nav-next { grid-column: auto; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .entries .entry-thumb img { transition: none; } }
