/*
Theme Name: Plajina Atlas
Theme URI: https://plajina.com/
Author: Plajina
Description: An editorial travel-journal theme for plajina.com. Ivory paper, lagoon ink and terracotta sun; arched "window" imagery, boarding-pass Popular Topics, self-hosted Libre Bodoni / Public Sans / DM Mono. Includes a Header widget area printed right after </header>, a Head Code widget area and an Appearance → Plajina Codes page for Google Analytics & AdSense.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: plajina
Tags: blog, news, editorial, one-column, grid-layout, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

/* ---------- Tokens ---------- */
:root {
	--paper: #f4efe6;
	--paper-2: #ebe3d4;
	--paper-3: #e2d7c3;
	--ink: #16211f;
	--ink-soft: #3c4643;
	--muted: #5c625d;
	--lagoon: #123b39;
	--lagoon-deep: #0b2726;
	--sea: #2c6a64;
	--terra: #a8482a;
	--terra-bright: #d4724b;
	--brass: #a9824b;
	--line: #d6cab5;
	--line-dark: rgba(244, 239, 230, 0.16);
	--logo-sun: var(--terra);

	--f-display: "Libre Bodoni", "Bodoni 72", Didot, Georgia, serif;
	--f-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
	--f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--gutter: clamp(1rem, 4vw, 3rem);
	--max: 1320px;
	--read: 41rem;
	--radius: 4px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 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; } }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.0625rem/1.65 var(--f-body);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	background-image: radial-gradient(rgba(22, 33, 31, .035) 1px, transparent 1px);
	background-size: 4px 4px;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--terra); }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1.1em; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--terra); color: var(--paper); }

.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; left: 1rem; top: -4rem; z-index: 100;
	background: var(--ink); color: var(--paper); padding: .7rem 1rem; text-decoration: none;
	font: 500 .8rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
}
.skip-link:focus { top: 1rem; color: var(--paper); }

.eyebrow, .kicker, .meta, .card-no, .ticket-cat, .ticket-meta, .section-title, .tag-chip, .search-toggle, .rail-date, .rail-tagline {
	font-family: var(--f-mono); font-weight: 400; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
}

/* ---------- Header ---------- */
.site-header { position: relative; padding: 0 var(--gutter); border-bottom: 1px solid var(--ink); }
.site-header::after { /* double rule like a printed masthead */
	content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 4px; height: 1px; background: var(--ink);
}
.header-rail {
	max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
	gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); color: var(--muted);
}
.header-rail p { margin: 0; }
.rail-tagline { text-align: center; }
.search-toggle {
	justify-self: end; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px;
	padding: 0 .2rem 0 .8rem; background: none; border: 0; cursor: pointer; color: var(--ink);
}
.search-toggle svg { width: 18px; height: 18px; }
.search-toggle:hover { color: var(--terra); }
.masthead { max-width: var(--max); margin: 0 auto; display: flex; justify-content: center; padding: clamp(1.1rem, 3vw, 2rem) 0 clamp(1.2rem, 3vw, 2.2rem); }

.brand { display: inline-flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: clamp(30px, 4vw, 44px); height: auto; color: var(--lagoon); flex: none; transition: transform .5s var(--ease); }
.brand:hover .brand-mark { transform: translateY(-2px); }
.brand-word {
	font-family: var(--f-display); font-weight: 500; font-size: clamp(2.2rem, 6.5vw, 4.4rem);
	line-height: 1; letter-spacing: .14em; text-transform: uppercase; margin-right: -.14em;
}

.search-panel { max-width: var(--max); margin: 0 auto; }
.js .search-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.js .search-panel > * { overflow: hidden; min-height: 0; }
.js .search-panel.is-open { grid-template-rows: 1fr; }
.search-panel .search-form { padding: 0 0 1.4rem; }
.js .search-panel:not(.is-open) .search-form { padding-bottom: 0; }

.search-form { display: flex; gap: .5rem; max-width: 40rem; margin: 0 auto; }
.search-field {
	flex: 1; min-width: 0; min-height: 48px; padding: .6rem 1rem; background: transparent;
	border: 0; border-bottom: 1px solid var(--ink); font-family: var(--f-display); font-size: 1.35rem; font-style: italic;
}
.search-field:focus { outline: none; border-bottom-color: var(--terra); box-shadow: 0 1px 0 var(--terra); }
.search-submit, .button, .comment-form input[type="submit"] {
	min-height: 48px; padding: 0 1.4rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
	font: 400 .74rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; border-radius: 999px;
	transition: background .2s, color .2s, border-color .2s;
}
.search-submit:hover, .button:hover, .comment-form input[type="submit"]:hover { background: var(--terra); border-color: var(--terra); }

/* Header widget area (printed right after </header>) */
.header-widget { max-width: var(--max); margin: 1.2rem auto 0; padding: 0 var(--gutter); text-align: center; }
.header-widget:empty { display: none; }

/* ---------- Layout helpers ---------- */
.site-main { display: block; }
.cover, .dispatches, .ledger, .page-head, .pagination, .empty-state, .comments { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section-head { display: flex; align-items: center; gap: 1.2rem; margin: 0 0 2rem; }
.section-title { margin: 0; color: var(--ink); font-size: .78rem; white-space: nowrap; }
.section-rule { flex: 1; height: 1px; background: var(--ink); position: relative; }
.section-rule::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--terra); }

.kicker { color: var(--terra); }
.kicker-link { text-decoration: none; }
.kicker-link:hover { text-decoration: underline; }
.meta { color: var(--muted); margin: 0; display: flex; flex-wrap: wrap; gap: .1rem .55rem; font-size: .68rem; }
.meta-sep { color: var(--line); }
.byline { text-decoration: none; color: var(--ink); }

/* ---------- Media ---------- */
.media { display: block; position: relative; overflow: hidden; background: var(--paper-3); aspect-ratio: 3 / 2; border-radius: var(--radius); }
.media img, .media .thumb-fallback { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .6s; }
.arch { border-radius: 999px 999px var(--radius) var(--radius); aspect-ratio: 4 / 5; }
.card:hover .media img { transform: scale(1.035); }

.thumb-fallback { display: grid; place-items: center; color: var(--paper); font-family: var(--f-display); font-style: italic; font-size: clamp(2rem, 6vw, 5rem); }
.thumb-fallback.tone-0 { background: linear-gradient(160deg, #2c6a64, #123b39); }
.thumb-fallback.tone-1 { background: linear-gradient(160deg, #d4724b, #a8482a); }
.thumb-fallback.tone-2 { background: linear-gradient(160deg, #c3a676, #8a6a3a); }
.thumb-fallback.tone-3 { background: linear-gradient(160deg, #46605c, #16211f); }

/* ---------- Cards ---------- */
.card { position: relative; }
.card > a { display: block; text-decoration: none; }
.card-body { padding-top: 1rem; }
.card-top { display: flex; gap: .9rem; align-items: baseline; margin-bottom: .55rem; }
.card-no { color: var(--brass); }
.card-title { font-size: clamp(1.25rem, 1.6vw, 1.5rem); margin: 0 0 .5rem; }
.card-title a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease); }
.card-title a:hover, .card:hover .card-title a { background-size: 100% 1px; color: var(--ink); }
.card-excerpt { color: var(--ink-soft); font-size: .98rem; margin-bottom: .8rem; }

/* Cover story */
.cover { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.card-lead { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: center; }
.card-lead .media { aspect-ratio: 4 / 5; max-height: 78vh; }
.card-lead .card-body { padding: 0; position: relative; }
.card-lead .card-body::before {
	content: "Cover Story"; display: block; margin-bottom: 1.6rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line);
	font: 400 .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.card-lead .card-title { font-size: clamp(2.4rem, 5.4vw, 5rem); line-height: 1; letter-spacing: -.02em; margin-bottom: 1.4rem; }
.card-lead .card-excerpt { font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 36rem; }

/* Dispatches */
.dispatches { padding-bottom: clamp(3rem, 7vw, 6rem); }
.dispatch-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: repeat(3, auto); gap: 1.6rem clamp(1.5rem, 4vw, 4rem); }
.card-feature { grid-row: 1 / span 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.8rem; align-items: end; }
.card-feature .media { aspect-ratio: 3 / 4; }
.card-feature .card-title { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }
.card-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1.2rem; align-items: center; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.card-row:last-child { border-bottom: 0; padding-bottom: 0; }
.card-row .card-body { padding: 0; }
.card-row .card-title { font-size: 1.2rem; }

/* Story grid */
.ledger { padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: 2rem; }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem clamp(1.2rem, 3vw, 2.5rem); }
.card-grid { border-top: 1px solid var(--ink); padding-top: 1rem; }
.card-grid .media { order: 0; }

/* ---------- Page head ---------- */
.page-head { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2rem, 4vw, 3.5rem); text-align: center; }
.page-head .eyebrow { color: var(--terra); }
.page-title { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 1; margin: .6rem 0 0; }
.page-dek { max-width: 40rem; margin: 1.2rem auto 0; color: var(--ink-soft); }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; padding-top: 3rem; padding-bottom: 4rem; font: 400 .8rem var(--f-mono); }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; letter-spacing: .08em; white-space: nowrap; }
.pagination a.page-numbers:hover { border-color: var(--ink); color: var(--ink); }
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .dots { border-color: transparent; }

/* ---------- Popular Topics (boarding passes) ---------- */
.popular {
	--stub: 58px;
	background: var(--lagoon); color: var(--paper); margin: clamp(2rem, 5vw, 4rem) 0 0;
	padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
	background-image:
		radial-gradient(120% 70% at 100% 0%, rgba(212, 114, 75, .16), transparent 60%),
		repeating-linear-gradient(0deg, transparent 0 39px, rgba(244, 239, 230, .035) 39px 40px);
}
.popular-inner { max-width: var(--max); margin: 0 auto; }
.popular-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 2.4rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line-dark); }
.popular-head .eyebrow { margin: 0; color: var(--terra-bright); order: 2; }
.popular-title { margin: 0; font-size: clamp(2.2rem, 5vw, 4rem); font-style: italic; font-weight: 400; color: var(--paper); }
.popular-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; counter-reset: none; }
.ticket { display: flex; }
.ticket > a {
	flex: 1; display: grid; grid-template-columns: var(--stub) minmax(0, 1fr); min-height: 132px;
	background: var(--paper); color: var(--ink); text-decoration: none; border-radius: 10px;
	-webkit-mask: radial-gradient(circle 9px at var(--stub) 0, #0000 98%, #000) top / 100% 51% no-repeat,
		radial-gradient(circle 9px at var(--stub) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
	mask: radial-gradient(circle 9px at var(--stub) 0, #0000 98%, #000) top / 100% 51% no-repeat,
		radial-gradient(circle 9px at var(--stub) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
	transition: transform .35s var(--ease), background-color .25s;
}
.ticket > a:hover { transform: translateY(-3px); background: #fffaf1; color: var(--ink); }
.ticket > a:focus-visible { outline-color: var(--terra-bright); }
.ticket-stub { display: grid; place-items: center; border-right: 1.5px dashed var(--line); background: var(--paper-2); }
.ticket-no { font: 400 1.6rem/1 var(--f-display); font-style: italic; color: var(--terra); writing-mode: vertical-rl; transform: rotate(180deg); }
.ticket-main { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: .9rem; padding: .9rem .9rem .9rem 1rem; align-items: center; }
.ticket-thumb { display: block; width: 64px; overflow: hidden; background: var(--paper-3); }
.ticket-thumb img, .ticket-thumb .thumb-fallback { width: 100%; height: 100%; object-fit: cover; font-size: 1.6rem; }
.ticket-text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.ticket-cat { color: var(--sea); font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-title { font: 500 1.02rem/1.22 var(--f-display); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-meta { color: var(--muted); font-size: .6rem; }

/* ---------- Single ---------- */
.story { padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) 0; }
.story-head { max-width: 58rem; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.story-kicker { margin-bottom: 1.4rem; }
.story-kicker .kicker-link { display: inline-block; padding: .45rem .95rem; border: 1px solid currentColor; border-radius: 999px; }
.story-title { font-size: clamp(2.3rem, 5.6vw, 4.8rem); line-height: 1.02; letter-spacing: -.02em; margin-bottom: 1.4rem; }
.story-dek { font: italic 400 clamp(1.15rem, 1.8vw, 1.45rem)/1.45 var(--f-display); color: var(--ink-soft); max-width: 44rem; margin: 0 auto 1.6rem; }
.story-head .meta { justify-content: center; }
.story-hero { max-width: var(--max); margin: 0 auto clamp(2.5rem, 5vw, 4rem); position: relative; }
.story-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 999px 999px var(--radius) var(--radius) / 220px 220px var(--radius) var(--radius); }
.story-hero figcaption { margin-top: .8rem; font: 400 .7rem var(--f-mono); letter-spacing: .08em; color: var(--muted); text-align: right; }

.entry-content { max-width: var(--read); margin: 0 auto; font-size: 1.125rem; line-height: 1.75; }
.entry-content > * { margin-top: 0; margin-bottom: 1.35em; }
.entry-content > p:first-of-type::first-letter {
	float: left; font: 500 4.6em/.8 var(--f-display); margin: .08em .1em 0 -.02em; color: var(--terra);
}
.entry-content h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-top: 2em; }
.entry-content h3 { font-size: 1.45rem; margin-top: 1.8em; }
.entry-content a { color: var(--sea); text-decoration-color: rgba(44, 106, 100, .4); }
.entry-content a:hover { color: var(--terra); text-decoration-color: currentColor; }
.entry-content blockquote, .entry-content .wp-block-quote, .entry-content .wp-block-pullquote {
	margin: 2.2em 0; padding: 0 0 0 1.6rem; border-left: 2px solid var(--terra);
	font: italic 400 1.45rem/1.4 var(--f-display); color: var(--ink);
}
.entry-content blockquote cite { display: block; margin-top: .8rem; font: normal 400 .72rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.entry-content img { border-radius: var(--radius); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption, .wp-element-caption { font: 400 .72rem/1.5 var(--f-mono); letter-spacing: .06em; color: var(--muted); margin-top: .6rem; }
.entry-content .alignwide { max-width: min(68rem, calc(100vw - 2 * var(--gutter))); margin-inline: calc(50% - min(34rem, 50vw - var(--gutter))); width: auto; }
.entry-content .alignfull { max-width: 100vw; width: 100vw; margin-inline: calc(50% - 50vw); }
.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content li::marker { color: var(--terra); }
.entry-content hr { border: 0; height: 1px; background: var(--line); margin: 3em auto; max-width: 8rem; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: .6rem .5rem; text-align: left; }
.entry-content iframe { max-width: 100%; }
.page-links { font: 400 .8rem var(--f-mono); display: flex; gap: .5rem; }

.story-foot { max-width: var(--read); margin: 3rem auto 0; padding-bottom: 1rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.tag-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .66rem; }
.tag-chip:hover { border-color: var(--terra); }
.after-content { margin: 0 0 2.5rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.post-nav-item a { display: flex; flex-direction: column; gap: .4rem; padding: 1.4rem 0; text-decoration: none; height: 100%; }
.post-nav-item.is-next { text-align: right; border-left: 1px solid var(--line); }
.post-nav-item.is-next a { padding-left: 1.2rem; }
.post-nav-item.is-prev a { padding-right: 1.2rem; }
.post-nav-item:only-child { grid-column: 1 / -1; border-left: 0; }
.post-nav .label { font: 400 .68rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--terra); }
.post-nav .title { font: 500 1.15rem/1.25 var(--f-display); }

/* ---------- Comments ---------- */
.comments { max-width: calc(var(--read) + 2 * var(--gutter)); padding-top: 4rem; padding-bottom: 4rem; }
.comments .section-title { margin-bottom: 1.5rem; }
.comment-list, .comment-list .children { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { padding-left: 1.5rem; border-left: 1px solid var(--line); margin-top: 1.5rem; }
.comment-body { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.comment-head { display: flex; gap: .9rem; align-items: center; margin-bottom: .8rem; }
.comment-avatar { border-radius: 50%; }
.comment-author { display: block; font-family: var(--f-display); font-size: 1.05rem; }
.comment-author a { text-decoration: none; }
.comment-time { font: 400 .66rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.comment-reply a, .cancel-reply { font: 400 .68rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--terra); }
.comment-form label { display: block; font: 400 .7rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .4rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: .8rem 1rem; background: #fffaf1; border: 1px solid var(--line); border-radius: var(--radius); min-height: 48px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px rgba(44, 106, 100, .15); }
.comment-form .comment-form-cookies-consent label { display: inline; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: .9rem; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.empty-state .eyebrow { color: var(--terra); }
.empty-state .search-form { margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--lagoon-deep); color: var(--paper); --logo-sun: var(--terra-bright); position: relative; }
.popular + .site-footer, .popular + .comments + .site-footer { margin-top: 0; }
.site-main + .site-footer { margin-top: 0; }
.footer-horizon { height: 6px; background: linear-gradient(90deg, var(--terra) 0 33%, var(--brass) 33% 66%, var(--sea) 66%); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 6vw, 4.5rem) var(--gutter) 2rem; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: start; }
.brand-footer { color: var(--paper); }
.brand-footer:hover { color: var(--paper); }
.brand-footer .brand-mark { color: var(--paper); }
.brand-footer .brand-word { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.footer-tagline { margin: 1rem 0 0; font: italic 400 1.15rem var(--f-display); color: rgba(244, 239, 230, .75); }
.footer-nav { justify-self: end; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; justify-content: flex-end; }
.footer-menu a { display: inline-flex; min-height: 44px; align-items: center; font: 400 .74rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: rgba(244, 239, 230, .85); }
.footer-menu a:hover { color: var(--terra-bright); }
.footer-base { max-width: var(--max); margin: 0 auto; padding: 1.2rem var(--gutter) 2rem; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line-dark); font: 400 .7rem var(--f-mono); letter-spacing: .1em; color: rgba(244, 239, 230, .7); }
.footer-base p { margin: 0; }
.to-top { text-decoration: none; color: inherit; }
.to-top:hover { color: var(--terra-bright); }

/* Widgets in content areas */
.content-widget .widget-title { font: 400 .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Reveal motion ---------- */
@media (prefers-reduced-motion: no-preference) {
	.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
	.js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
	.popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
	.story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dispatch-grid { grid-template-columns: 1fr; }
	.card-feature { grid-row: auto; }
}
@media (max-width: 760px) {
	body { font-size: 1rem; }
	.header-rail { grid-template-columns: 1fr auto; }
	.rail-tagline { display: none; }
	.brand-word { letter-spacing: .1em; margin-right: -.1em; }
	.card-lead { grid-template-columns: 1fr; }
	.card-lead .media { max-height: none; aspect-ratio: 4 / 4.4; }
	.card-feature { grid-template-columns: 1fr; }
	.card-feature .media { aspect-ratio: 4 / 4.4; }
	.story-grid { grid-template-columns: 1fr; }
	.popular-grid { grid-template-columns: 1fr; }
	.story-hero img { aspect-ratio: 4 / 3; border-radius: 999px 999px var(--radius) var(--radius) / 120px 120px var(--radius) var(--radius); }
	.entry-content { font-size: 1.06rem; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-item.is-next { border-left: 0; border-top: 1px solid var(--line); text-align: left; }
	.post-nav-item.is-next a { padding-left: 0; }
	.footer-inner { grid-template-columns: 1fr; }
	.footer-nav { justify-self: start; }
	.footer-menu { justify-content: flex-start; }
	.footer-base { flex-direction: column; }
	.entry-content .alignleft, .entry-content .alignright { float: none; max-width: 100%; margin: 0 0 1.35em; }
}

@media print {
	.site-header .header-rail, .search-panel, .popular, .site-footer, .comments, .post-nav, .header-widget { display: none !important; }
	body { background: #fff; }
}
