/*!
Theme Name:        SHKTEC Journal
Theme URI:         https://example.com/shktec-journal
Author:            Hamza Hamid
Author URI:        https://example.com
Description:       A lightweight travel/hiking journal theme built for the Travel Journal Core plugin. Ships a custom homepage with a framed hero, glass search capsule, and grids for the Trail and Field Note post types (distance, elevation, difficulty, EXIF).
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.6
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:       shktec-journal
Tags:              travel, blog, custom-colors, custom-menu, featured-images, full-width-template, translation-ready
*/

/* ---------------------------------------------------------------------------
   Design tokens
--------------------------------------------------------------------------- */
:root {
	--ink: #1c1e1b;
	--ink-soft: #2b2e2a;
	--paper: #f4f5f2;
	--white: #ffffff;
	--muted: #6b6f6a;
	--muted-2: #9aa09a;
	--line: rgba(28, 30, 27, 0.12);
	--line-strong: rgba(28, 30, 27, 0.22);

	--pine: #1f4d3a;
	--teal: #2c8a8f;
	--teal-bright: #37a6a0;
	--rust: #b4552a;

	--pill-dark: #1c1e1b;

	--radius-xl: 28px;
	--radius-lg: 20px;
	--radius-md: 14px;
	--radius-pill: 999px;

	--shadow-card: 0 18px 40px -18px rgba(20, 30, 24, 0.35);
	--shadow-soft: 0 10px 30px -14px rgba(20, 30, 24, 0.28);

	--font-display: "Oswald", "Arial Narrow", system-ui, sans-serif;
	--font-body: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-mono: "SFMono-Regular", ui-monospace, "Menlo", "Consolas", monospace;

	--maxw: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a {
	color: inherit;
	text-decoration: none;
}

button {
	font-family: inherit;
	cursor: pointer;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: 0.01em;
	margin: 0;
	line-height: 1;
}

.shk-container {
	width: 100%;
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.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: -9999px;
	top: 0;
	background: var(--ink);
	color: var(--white);
	padding: 10px 16px;
	border-radius: 0 0 10px 0;
	z-index: 999;
}
.skip-link:focus {
	left: 0;
}

:focus-visible {
	outline: 2px solid var(--teal);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.site-header {
	position: relative;
	z-index: 20;
	padding-top: clamp(16px, 3vw, 26px);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	padding: 10px 12px 10px 22px;
	box-shadow: var(--shadow-soft);
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.35rem;
	letter-spacing: 0.02em;
	color: var(--ink);
	white-space: nowrap;
}

.site-brand__mark {
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: var(--ink);
	color: var(--white);
}
.site-brand__mark svg {
	width: 17px;
	height: 17px;
}

.primary-nav ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: clamp(14px, 2.4vw, 34px);
	margin: 0;
	padding: 0;
}

.primary-nav a {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--ink-soft);
	padding: 8px 4px;
	position: relative;
	transition: color 0.18s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
	color: var(--ink);
}
.primary-nav a::after {
	content: "";
	position: absolute;
	left: 4px;
	right: 4px;
	bottom: 2px;
	height: 2px;
	background: var(--teal);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}
.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after {
	transform: scaleX(1);
}

.header-cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--pill-dark);
	color: var(--white);
	font-weight: 600;
	font-size: 0.92rem;
	padding: 11px 20px;
	border-radius: var(--radius-pill);
	border: 1px solid transparent;
	white-space: nowrap;
	transition: transform 0.18s ease, background 0.18s ease;
}
.header-cta:hover {
	background: var(--pine);
	transform: translateY(-1px);
}
.header-cta svg {
	width: 15px;
	height: 15px;
}

.nav-toggle {
	display: none;
	background: none;
	border: 0;
	padding: 8px;
	color: var(--ink);
}

/* ---------------------------------------------------------------------------
   Hero
--------------------------------------------------------------------------- */
.hero {
	position: relative;
	margin-top: clamp(14px, 2.5vw, 22px);
}

/* Wider canvas than the rest of the page, with a soft outer margin. */
.hero__wrap {
	max-width: 1400px;
	margin-inline: auto;
	padding-inline: clamp(16px, 2vw, 24px);
}

.hero__frame {
	position: relative;
	min-height: min(90vh, 880px);
	border-radius: 28px;
	overflow: hidden;
	isolation: isolate;
	box-shadow: var(--shadow-card);
	background: #cdd8d0;
}

/* Background photo (WP image) or the CSS Unsplash fallback. */
.hero__media,
.hero__media--fallback {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hero__media--fallback {
	background-image: url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=1600&q=80");
	background-size: cover;
	background-position: center;
}

/* Overlay: darker top (for the white headline) and bottom (for card/stats). */
.hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(12, 18, 15, 0.46) 0%,
		rgba(12, 18, 15, 0.08) 24%,
		rgba(12, 18, 15, 0.18) 52%,
		rgba(12, 18, 15, 0.74) 100%
	);
}

.hero__inner {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.hero__title {
	position: absolute;
	left: clamp(20px, 3vw, 44px);
	right: clamp(20px, 3vw, 44px);
	top: clamp(26px, 5vh, 56px);
	text-align: center;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(3rem, 7.5vw, 7.5rem);
	line-height: 0.95;
	letter-spacing: -0.02em;
	text-transform: none;
	color: #ffffff;
	white-space: nowrap;
	text-shadow: 0 2px 26px rgba(0, 0, 0, 0.38);
}

.hero__lede {
	position: absolute;
	left: clamp(20px, 3vw, 44px);
	top: 45%;
	max-width: 260px;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

/* Connector line from lede to the search capsule. */
.hero__connector {
	position: absolute;
	left: clamp(220px, 24vw, 322px);
	top: 44%;
	width: clamp(120px, 18vw, 240px);
	height: clamp(50px, 10vh, 120px);
	color: rgba(255, 255, 255, 0.6);
	pointer-events: none;
	display: none;
}

/* Search capsule */
.hero-search {
	position: absolute;
	left: 50%;
	top: 52%;
	transform: translateX(-50%);
	width: min(660px, calc(100% - 2 * clamp(20px, 3vw, 44px)));
	display: flex;
	align-items: stretch;
	gap: 6px;
	background: rgba(25, 30, 32, 0.75);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-pill);
	padding: 8px 8px 8px 10px;
	box-shadow: 0 20px 50px -22px rgba(0, 0, 0, 0.6);
}

.hero-search__seg {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	padding: 8px 14px;
	position: relative;
	min-width: 0;
}
.hero-search__seg + .hero-search__seg::before {
	content: "";
	position: absolute;
	left: 0;
	top: 18%;
	bottom: 18%;
	width: 1px;
	background: rgba(255, 255, 255, 0.16);
}

.hero-search__label {
	font-size: 0.66rem;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}

.hero-search__seg select {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	color: var(--white);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	padding: 0 18px 0 0;
	width: 100%;
	cursor: pointer;
	text-overflow: ellipsis;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right center;
}
.hero-search__seg select option {
	color: var(--ink);
}

.hero-search__submit {
	flex: 0 0 auto;
	align-self: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 0;
	background: var(--white);
	color: var(--ink);
	display: grid;
	place-items: center;
	transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.hero-search__submit:hover {
	background: var(--teal);
	color: var(--white);
	transform: scale(1.05);
}
.hero-search__submit svg {
	width: 20px;
	height: 20px;
}

/* Pinned bottom bar: dispatch card (left) + stat counters (right) */
.hero__bottom {
	position: absolute;
	left: clamp(20px, 3vw, 32px);
	right: clamp(20px, 3vw, 32px);
	bottom: clamp(20px, 3vw, 32px);
	z-index: 3;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}

/* Dispatch card (bottom-left) */
.hero-card {
	width: min(360px, 100%);
	background: var(--white);
	border-radius: 18px;
	padding: 14px;
	display: flex;
	align-items: center;
	gap: 14px;
	box-shadow: var(--shadow-card);
}
.hero-card__thumb {
	flex: 0 0 auto;
	width: 74px;
	height: 74px;
	border-radius: 12px;
	overflow: hidden;
	background: #e7ebe6;
}
.hero-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hero-card__eyebrow {
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--teal);
	margin: 0 0 3px;
}
.hero-card__title {
	font-family: var(--font-body);
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 6px;
	color: var(--ink);
}
.hero-card__link {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ink-soft);
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.hero-card__link:hover {
	color: var(--teal);
}
.hero-card__link svg {
	width: 12px;
	height: 12px;
}

/* Stat counters (bottom-right) */
.hero-stats {
	display: flex;
	gap: clamp(24px, 4vw, 40px);
	color: var(--white);
	text-align: left;
	padding-bottom: 4px;
}
.hero-stat__num {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.9rem, 4vw, 2.9rem);
	line-height: 1;
}
.hero-stat__label {
	font-size: 0.76rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: rgba(255, 255, 255, 0.82);
	margin-top: 6px;
}

/* ---------------------------------------------------------------------------
   Sections
--------------------------------------------------------------------------- */
.section {
	padding-block: clamp(52px, 8vw, 96px);
}

.section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: clamp(26px, 4vw, 44px);
}
.section__eyebrow {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--teal);
	margin: 0 0 10px;
}
.section__title {
	font-size: clamp(2rem, 5vw, 3.3rem);
	font-weight: 600;
	line-height: 0.98;
	color: var(--ink);
}
.section__link {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ink-soft);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	padding-bottom: 6px;
}
.section__link:hover {
	color: var(--teal);
}
.section__link svg {
	width: 14px;
	height: 14px;
}

/* Trail grid */
.trail-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(18px, 2.5vw, 28px);
}

.trail-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.trail-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-card);
}
.trail-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #e7ebe6;
	overflow: hidden;
}
.trail-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.trail-card:hover .trail-card__media img {
	transform: scale(1.05);
}
.trail-card__region {
	position: absolute;
	left: 12px;
	top: 12px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ink);
	font-size: 0.72rem;
	font-weight: 600;
	padding: 5px 11px;
	border-radius: var(--radius-pill);
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.trail-card__region svg {
	width: 11px;
	height: 11px;
	color: var(--teal);
}
.trail-card__body {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1;
}
.trail-card__title {
	font-family: var(--font-body);
	font-size: 1.22rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--ink);
}
.trail-card__terrains {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.chip {
	font-size: 0.72rem;
	font-weight: 500;
	color: var(--muted);
	background: var(--paper);
	border: 1px solid var(--line);
	padding: 3px 9px;
	border-radius: var(--radius-pill);
}

.metric-strip {
	margin-top: auto;
	display: flex;
	align-items: center;
	gap: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--line);
}
.metric {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.metric__value {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.12rem;
	color: var(--ink);
	line-height: 1;
}
.metric__label {
	font-size: 0.66rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted-2);
}
.metric-strip .badge {
	margin-left: auto;
}

/* Difficulty badge */
.badge {
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 5px 12px;
	border-radius: var(--radius-pill);
	text-transform: capitalize;
	white-space: nowrap;
}
.badge[data-level="easy"] {
	background: #e3efe4;
	color: #1f6b3a;
}
.badge[data-level="moderate"] {
	background: #e0eef0;
	color: #1d6a70;
}
.badge[data-level="hard"] {
	background: #f3e7d6;
	color: #8a5a1f;
}
.badge[data-level="expert"] {
	background: #f6e0d6;
	color: var(--rust);
}

/* Field Notes — masonry via CSS columns */
.notes-section {
	background: var(--white);
	border-top: 1px solid var(--line);
}
.notes-masonry {
	columns: 3;
	column-gap: clamp(18px, 2.5vw, 26px);
}
.note-card {
	break-inside: avoid;
	margin-bottom: clamp(18px, 2.5vw, 26px);
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
	display: inline-block;
	width: 100%;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.note-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-soft);
}
.note-card__media {
	background: #e7ebe6;
	overflow: hidden;
}
.note-card__media img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.note-card:hover .note-card__media img {
	transform: scale(1.05);
}
.note-card__body {
	padding: 16px;
}
.note-card__region {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--teal);
	margin: 0 0 6px;
}
.note-card__title {
	font-family: var(--font-body);
	font-size: 1.06rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--ink);
	margin: 0 0 12px;
}
.exif-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.exif-chip {
	font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
	font-size: 0.68rem;
	font-weight: 500;
	color: var(--ink-soft);
	background: var(--white);
	border: 1px solid var(--line);
	padding: 3px 8px;
	border-radius: 7px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.exif-chip svg {
	width: 11px;
	height: 11px;
	color: var(--muted-2);
}

/* Empty states */
.empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: clamp(36px, 6vw, 64px);
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius-lg);
	color: var(--muted);
}
.empty-state h3 {
	font-family: var(--font-body);
	font-size: 1.15rem;
	color: var(--ink);
	margin: 0 0 8px;
}
.empty-state a {
	color: var(--teal);
	font-weight: 600;
}

/* Plugin-missing admin-facing notice on the front end */
.shk-plugin-warning {
	background: #fbe9df;
	color: #8a3d1a;
	border: 1px solid #efc3ad;
	border-radius: var(--radius-md);
	padding: 14px 18px;
	margin-top: 20px;
	font-size: 0.92rem;
}

/* ---------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */
.site-footer {
	background: var(--ink);
	color: rgba(255, 255, 255, 0.75);
	padding-block: clamp(40px, 6vw, 64px);
	margin-top: clamp(20px, 4vw, 40px);
}
.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}
.site-footer .site-brand {
	color: var(--white);
}
.site-footer__note {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.55);
}

/* ---------------------------------------------------------------------------
   Entry content (shared long-form typography)
--------------------------------------------------------------------------- */
.entry-content {
	font-size: 1.075rem;
	line-height: 1.78;
	color: var(--ink-soft);
}
.entry-content > * + * {
	margin-top: 1.2em;
}
.entry-content h2,
.entry-content h3,
.entry-content h4 {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: 0.005em;
	color: var(--ink);
	line-height: 1.1;
}
.entry-content h2 {
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	margin-top: 1.7em;
}
.entry-content h3 {
	font-size: clamp(1.3rem, 2.4vw, 1.6rem);
	margin-top: 1.5em;
}
.entry-content a {
	color: var(--teal);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
.entry-content a:hover {
	color: var(--pine);
}
.entry-content strong {
	color: var(--ink);
}
.entry-content ul,
.entry-content ol {
	padding-left: 1.3em;
}
.entry-content li + li {
	margin-top: 0.4em;
}
.entry-content blockquote {
	margin-inline: 0;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--teal);
	font-size: 1.2rem;
	line-height: 1.5;
	color: var(--ink);
	font-style: italic;
}
.entry-content img,
.entry-content figure img {
	border-radius: 14px;
}
.entry-content figure {
	margin: 0;
}
.entry-content figcaption {
	margin-top: 8px;
	font-size: 0.85rem;
	color: var(--muted);
	text-align: center;
}
.entry-content code {
	font-family: var(--font-mono);
	font-size: 0.9em;
	background: var(--paper);
	border: 1px solid var(--line);
	padding: 1px 6px;
	border-radius: 6px;
}
.page-links {
	margin-top: 1.4em;
	font-size: 0.9rem;
	font-weight: 600;
}

/* Shared sub-headings used on single templates. */
.trail-map__heading,
.ba__heading {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(1.4rem, 3vw, 1.9rem);
	color: var(--ink);
	margin: 0 0 clamp(14px, 2vw, 20px);
}

/* ---------------------------------------------------------------------------
   Single Trail — utility / guide layout
--------------------------------------------------------------------------- */
.trail-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: min(64vh, 560px);
	background-image: var(--hero);
	background-size: cover;
	background-position: center;
	isolation: isolate;
}
.trail-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		to top,
		rgba(9, 16, 12, 0.86) 0%,
		rgba(9, 16, 12, 0.32) 48%,
		rgba(9, 16, 12, 0.42) 100%
	);
}
.trail-hero__inner {
	position: relative;
	z-index: 1;
	color: #fff;
	padding-block: clamp(28px, 5vw, 60px);
}
.trail-hero__region {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 14px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(255, 255, 255, 0.24);
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	backdrop-filter: blur(6px);
}
.trail-hero__region svg {
	width: 13px;
	height: 13px;
	color: var(--teal-bright);
}
.trail-hero__title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(2.4rem, 6vw, 5rem);
	line-height: 0.98;
	letter-spacing: -0.01em;
	color: #fff;
	text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
	max-width: 16ch;
}
.trail-hero__terrains {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}
.chip--ondark {
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.26);
}

.trail-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
	padding-block: clamp(40px, 6vw, 72px);
}
.trail-main {
	min-width: 0;
}

.trail-map {
	margin-top: clamp(34px, 5vw, 56px);
}
.trail-map__canvas {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid var(--line);
	background-color: #e7ebe6;
	background-image:
		linear-gradient(rgba(28, 30, 27, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(28, 30, 27, 0.06) 1px, transparent 1px);
	background-size: 28px 28px;
	display: grid;
	place-items: center;
}
/* Once Leaflet initializes it adds .leaflet-container to the element. */
.trail-map__canvas.leaflet-container {
	display: block;
	background: #e9ece6;
}
.trail-map__placeholder {
	text-align: center;
	color: var(--muted);
	padding: 20px;
}
.trail-map__placeholder svg {
	width: 40px;
	height: 40px;
	color: var(--muted-2);
	margin-bottom: 10px;
}
.trail-map__placeholder p {
	margin: 0;
	font-weight: 600;
	color: var(--ink-soft);
}
.trail-map__placeholder span {
	display: block;
	margin-top: 4px;
	font-family: var(--font-mono);
	font-size: 0.76rem;
	color: var(--muted-2);
}

.trail-sidebar {
	position: sticky;
	top: 24px;
}
.facts-card {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 40%),
		var(--ink);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 20px;
	padding: 22px;
	box-shadow: var(--shadow-card);
}
.facts-card__eyebrow {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--teal-bright);
}
.facts-list {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
}
.facts-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.facts-list li:last-child {
	border-bottom: 0;
}
.facts-list__label {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.6);
}
.facts-list__value {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.4rem;
	color: #fff;
	line-height: 1;
}
.facts-list__value small {
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.6);
	margin-left: 2px;
}
.facts-list__na {
	color: rgba(255, 255, 255, 0.4);
}
.gpx-btn {
	margin-top: 20px;
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--teal);
	color: #fff;
	border: 0;
	border-radius: var(--radius-pill);
	padding: 13px 18px;
	font-weight: 700;
	font-size: 0.95rem;
	transition: background 0.18s ease, transform 0.18s ease;
}
.gpx-btn:not([disabled]):hover {
	background: var(--teal-bright);
	transform: translateY(-1px);
}
.gpx-btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}
.gpx-btn svg {
	width: 16px;
	height: 16px;
}
.gpx-note {
	margin: 8px 0 0;
	text-align: center;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.5);
}

/* ---------------------------------------------------------------------------
   Single Field Note — visual / creator layout
--------------------------------------------------------------------------- */
.note-header.shk-container {
	max-width: 820px;
	text-align: center;
	padding-top: clamp(32px, 5vw, 60px);
}
.note-header__region {
	margin: 0 0 10px;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--teal);
}
.note-header__title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(2.2rem, 5vw, 4rem);
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--ink);
}
.note-header__meta {
	margin: 14px 0 0;
	font-size: 0.9rem;
	color: var(--muted);
}

.note-stage {
	max-width: 1100px;
	margin: clamp(24px, 4vw, 44px) auto 0;
	padding-inline: var(--gutter);
}
.note-stage__frame {
	border-radius: 20px;
	overflow: hidden;
	border: 1px solid var(--line);
	box-shadow: var(--shadow-card);
	background: #0c0f0d;
}
.note-stage__media {
	display: block;
	width: 100%;
	height: auto;
}

/* Monospace EXIF strip — camera viewfinder feel. */
.exif-bar.shk-container {
	max-width: 1100px;
	margin-top: 16px;
	padding: 12px 20px;
}
.exif-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--ink);
	color: #fff;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	overflow-x: auto;
}
.exif-bar__rec {
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #e5484d;
	box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.18);
}
.exif-bar__list {
	display: flex;
	align-items: center;
	gap: clamp(16px, 3vw, 34px);
	margin: 0;
	flex: 1;
}
.exif-bar__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	white-space: nowrap;
}
.exif-bar__item dt {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 0.62rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
}
.exif-bar__item dd {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 0.92rem;
	font-weight: 500;
	color: #fff;
}

.note-body.shk-container {
	max-width: 760px;
	padding-block: clamp(36px, 5vw, 64px);
}
/* Let wide/full blocks break the reading measure. */
.note-body .entry-content .alignwide {
	width: min(1100px, 92vw);
	margin-left: 50%;
	transform: translateX(-50%);
}
.note-body .entry-content .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: 50%;
	transform: translateX(-50%);
}
.note-body .entry-content .alignfull img {
	border-radius: 0;
	width: 100%;
}

/* Before / after color-grade slider */
.ba {
	margin-top: clamp(36px, 5vw, 56px);
}
.ba-slider {
	position: relative;
	aspect-ratio: 16 / 10;
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid var(--line);
	user-select: none;
	touch-action: pan-y;
	background: #0c0f0d;
}
.ba-slider__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ba-slider__img--before {
	clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}
.ba-slider__range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
}
.ba-slider:focus-within {
	outline: 2px solid var(--teal);
	outline-offset: 2px;
}
.ba-slider__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--pos, 50%);
	width: 2px;
	background: #fff;
	transform: translateX(-50%);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
	pointer-events: none;
}
.ba-slider__handle::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%231c1e1b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-4 4 4 4M15 7l4 4-4 4'/%3E%3C/svg%3E")
		center / 22px no-repeat;
	box-shadow: var(--shadow-soft);
}
.ba-slider__tag {
	position: absolute;
	bottom: 12px;
	font-family: var(--font-mono);
	font-size: 0.66rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(0, 0, 0, 0.45);
	padding: 4px 10px;
	border-radius: var(--radius-pill);
	backdrop-filter: blur(4px);
	pointer-events: none;
}
.ba-slider__tag--before {
	left: 12px;
}
.ba-slider__tag--after {
	right: 12px;
}
.ba__note {
	margin: 12px 0 0;
	text-align: center;
	font-size: 0.82rem;
	color: var(--muted);
}

/* ---------------------------------------------------------------------------
   Archives
--------------------------------------------------------------------------- */
.archive-head {
	max-width: 760px;
	margin: 0 auto clamp(24px, 4vw, 40px);
	text-align: center;
}
.archive-head__eyebrow {
	margin: 0 0 10px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--teal);
}
.archive-head__title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(2.2rem, 5vw, 3.6rem);
	line-height: 1;
	color: var(--ink);
}
.archive-head__sub {
	margin: 14px auto 0;
	max-width: 52ch;
	color: var(--muted);
	font-size: 1rem;
}

/* Static filter capsule (shares segment styles with the hero search). */
.filter-bar {
	display: flex;
	align-items: stretch;
	gap: 6px;
	width: 100%;
	max-width: 720px;
	margin: 0 auto clamp(30px, 5vw, 48px);
	background: rgba(25, 30, 32, 0.92);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-pill);
	padding: 8px 8px 8px 10px;
	box-shadow: var(--shadow-soft);
}

/* Pagination */
.pagination {
	margin-top: clamp(32px, 5vw, 52px);
}
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
}
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border-radius: var(--radius-pill);
	border: 1px solid var(--line);
	background: var(--white);
	color: var(--ink-soft);
	font-weight: 600;
	font-size: 0.92rem;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.pagination a.page-numbers:hover {
	border-color: var(--teal);
	color: var(--teal);
}
.pagination .page-numbers.current {
	background: var(--ink);
	color: #fff;
	border-color: var(--ink);
}
.pagination .page-numbers.dots {
	border: 0;
	background: transparent;
	min-width: 0;
}

/* ---------------------------------------------------------------------------
   Responsive
--------------------------------------------------------------------------- */
@media (min-width: 900px) {
	.hero__connector {
		display: block;
	}
}

@media (max-width: 900px) {
	.trail-layout {
		grid-template-columns: 1fr;
	}
	.trail-sidebar {
		position: static;
	}
}

@media (max-width: 1024px) {
	.trail-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.notes-masonry {
		columns: 2;
	}
	.hero__frame {
		min-height: min(88vh, 760px);
	}
	.hero__lede {
		top: 42%;
		max-width: 220px;
	}
	.hero-search {
		top: 50%;
	}
}

@media (max-width: 760px) {
	.primary-nav,
	.header-cta {
		display: none;
	}
	.nav-toggle {
		display: inline-grid;
		place-items: center;
	}
	.primary-nav.is-open {
		display: block;
		position: absolute;
		left: var(--gutter);
		right: var(--gutter);
		top: calc(100% + 8px);
		background: var(--white);
		border: 1px solid var(--line);
		border-radius: var(--radius-md);
		box-shadow: var(--shadow-card);
		padding: 10px;
	}
	.primary-nav.is-open ul {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}
	.primary-nav.is-open a {
		display: block;
		padding: 10px 12px;
	}

	/* Hero unwinds from absolute positioning into a natural stack. */
	.hero__frame {
		min-height: 0;
		background: transparent;
		box-shadow: none;
		overflow: visible;
		border-radius: 0;
	}
	.hero__media,
	.hero__media--fallback {
		position: relative;
		height: 220px;
		border-radius: var(--radius-lg);
	}
	.hero__overlay {
		display: none;
	}
	.hero__inner {
		position: static;
	}
	.hero__title {
		position: static;
		text-align: left;
		white-space: normal;
		font-size: clamp(2.4rem, 11vw, 3.4rem);
		line-height: 0.98;
		color: var(--ink);
		text-shadow: none;
		margin-top: 18px;
	}
	.hero__lede {
		position: static;
		max-width: none;
		color: var(--ink-soft);
		text-shadow: none;
		font-size: 15px;
		margin-top: 12px;
	}
	.hero-search {
		position: static;
		transform: none;
		width: 100%;
		flex-wrap: wrap;
		border-radius: var(--radius-lg);
		margin-top: 18px;
		background: rgba(25, 30, 32, 0.92);
	}
	.filter-bar {
		flex-wrap: wrap;
		border-radius: var(--radius-lg);
	}
	.hero-search__seg {
		flex: 1 1 40%;
	}
	.hero-search__seg + .hero-search__seg::before {
		display: none;
	}
	.hero-search__submit {
		flex: 1 1 100%;
		width: 100%;
		border-radius: var(--radius-pill);
		height: 46px;
	}
	.hero__bottom {
		position: static;
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		margin-top: 18px;
	}
	.hero-card {
		width: 100%;
	}
	.hero-stats {
		justify-content: space-between;
		color: var(--ink);
	}
	.hero-stat__label {
		color: var(--muted);
	}
	.trail-grid,
	.notes-masonry {
		grid-template-columns: 1fr;
		columns: 1;
	}
	.section__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}
