/*
Theme Name: Travel Junk Journal
Theme URI: https://traveljunkjournal.com
Author: Bay
Description: A hand-built, vintage field-guide theme for Travel Junk Journal. Homepage with photo hero, featured story, latest articles, about collage and a Substack postcard; articles with a table of contents and trip notes; a blog page grouped by country.
Version: 1.5.0
Requires at least: 6.0
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: tjj
*/

/* ==========================================================================
   1. Design tokens — change things here first
   ========================================================================== */
:root {
	--cream: #FBF6E9;
	--paper: #F3EAD5;
	--note: #FFFDF6;
	--cobalt: #2D4E9E;
	--postcard-blue: #2E3F94;
	--butter: #F8DD95;
	--gold: #F4C64E;
	--verm: #D2472C;
	--verm-dark: #C8372A;
	--ink: #232B42;
	--kraft: #D6BF8E;

	--font-serif: "Instrument Serif", Georgia, serif;
	--font-sans: "Familjen Grotesk", system-ui, sans-serif;
	--font-logo: "Nothing You Could Do", cursive;
	--font-script: "Yellowtail", cursive;
	/* --font-hand is set from Appearance → Customize → Handwriting font */

	--radius: 4px;
	--wrap: 1328px;
	--gutter: clamp(20px, 4vw, 56px);
	--section: clamp(72px, 9vw, 110px);
	--shadow: 0 10px 24px rgba(31, 23, 13, .16);
	--shadow-sm: 0 4px 8px rgba(31, 23, 13, .22);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font: 400 17px/1.65 var(--font-sans);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
/* Paper grain over everything (very light). */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 999;
	opacity: .09;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; color: var(--cobalt); margin: 0; line-height: 1; letter-spacing: -.01em; }
h1 em, h2 em, h3 em, h4 em { font-style: italic; }
p { margin: 0 0 1em; }
button { font: inherit; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.section { padding: var(--section) 0; position: relative; }
.section--tight { padding-top: 40px; }

.screen-reader-text, .skip-link:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 1000; background: var(--cobalt); color: var(--cream); padding: 10px 16px; border-radius: var(--radius); }
:focus-visible { outline: 2px solid var(--verm); outline-offset: 3px; }

/* Small shared bits */
.eyebrow {
	font: 600 12px/1.3 var(--font-sans);
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--verm);
	margin: 0 0 14px;
}
.section-title { font-size: clamp(48px, 6vw, 82px); line-height: 1; margin-bottom: 24px; }
.section-head .section-title { margin-bottom: 0; }
.hand { font-family: var(--font-hand, cursive); color: var(--verm); line-height: 1.15; }

.btn {
	display: inline-block;
	font: 600 12px/1 var(--font-sans);
	letter-spacing: .16em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 16px 30px;
	border-radius: var(--radius);
	background: var(--cobalt);
	color: var(--cream);
	border: 1.5px solid var(--cobalt);
	cursor: pointer;
	transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--ink); border-color: var(--ink); }
.btn--outline { background: transparent; color: var(--cobalt); }
.btn--outline:hover { background: var(--cobalt); color: var(--cream); border-color: var(--cobalt); }
.btn--cream { background: var(--cream); color: var(--cobalt); border-color: var(--cream); }
.btn--cream:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.link {
	display: inline-block;
	font: 600 12px/1 var(--font-sans);
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--cobalt);
	text-decoration: none;
	padding-bottom: 5px;
	border-bottom: 1.5px solid currentColor;
}
.link:hover { color: var(--verm); }

.label {
	display: inline-block;
	background: var(--cobalt);
	color: var(--cream);
	font: 600 11px/1 var(--font-sans);
	letter-spacing: .16em;
	text-transform: uppercase;
	padding: 11px 22px;
	border-radius: var(--radius);
}

.sticker { position: absolute; pointer-events: none; height: auto; filter: drop-shadow(0 4px 6px rgba(31, 23, 13, .22)); }
.sticker[src*="/fl_"] { filter: none; }

/* ==========================================================================
   3. Header
   ========================================================================== */
.site-header { position: relative; z-index: 50; background: var(--cream); border-bottom: 1px solid rgba(45, 78, 158, .25); }
.site-header__inner {
	max-width: calc(var(--wrap) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 22px var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.logo { font: 400 30px/1 var(--font-logo); color: var(--cobalt); text-decoration: none; white-space: nowrap; }
.logo--text { font: 600 12px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; padding: 6px 0; }
.site-header__label { margin: 0; font: 500 12px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 38px; }
.site-nav a { font: 600 12px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cobalt); text-decoration: none; padding: 6px 0; border-bottom: 1.5px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_parent > a { border-bottom-color: currentColor; }
.nav-toggle { display: none; }

/* Homepage: header sits on top of the photo, then turns cream when you scroll. */
.has-hero .site-header { position: fixed; top: 0; left: 0; right: 0; background: transparent; border-color: transparent; transition: background .25s ease, border-color .25s ease; }
.has-hero .site-header .logo, .has-hero .site-header .site-nav a { color: var(--cream); transition: color .25s ease; }
.has-hero.scrolled .site-header { background: var(--cream); border-color: rgba(45, 78, 158, .25); }
.has-hero.scrolled .site-header .logo, .has-hero.scrolled .site-header .site-nav a { color: var(--cobalt); }
.admin-bar.has-hero .site-header { top: 32px; }

/* ==========================================================================
   4. Homepage — hero
   ========================================================================== */
.hero {
	position: relative;
	min-height: max(640px, 100svh);
	display: grid;
	place-items: center;
	text-align: center;
	color: var(--cream);
	background: var(--ink) var(--hero-img, none) center / cover no-repeat;
	overflow: hidden;
	isolation: isolate;
}
.hero::before { /* soft dark fade top + bottom so text stays readable */
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to bottom, rgba(26, 23, 18, .5) 0%, rgba(26, 23, 18, .12) 28%, rgba(26, 23, 18, .15) 70%, rgba(26, 23, 18, .55) 100%);
}
.hero__inner { padding: 140px var(--gutter) 160px; max-width: 1340px; width: 100%; position: relative; }
.hero__title {
	font-family: var(--font-serif);
	font-size: clamp(54px, 11.4vw, 164px);
	line-height: .9;
	letter-spacing: -.01em;
	text-transform: uppercase;
	color: var(--gold);
	text-shadow: .04em .04em 0 var(--verm-dark);
	margin: 0;
}
.hero__script { font: 400 clamp(30px, 4.4vw, 64px)/1 var(--font-script); color: var(--cream); margin: 0; position: relative; z-index: 1; }
.hero__script--top { text-align: left; margin: 0 0 .1em 5%; transform: rotate(6deg); transform-origin: left; }
/* "Greetings from" writes itself in, left to right, once on load. */
.hero__script--top {
	-webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
	mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
	-webkit-mask-size: 260% 100%;
	mask-size: 260% 100%;
	-webkit-mask-position: 100% 0;
	mask-position: 100% 0;
	animation: tjj-write 2.2s cubic-bezier(.45, .05, .4, 1) .5s forwards;
}
@keyframes tjj-write { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .hero__script--top { animation: none; -webkit-mask-image: none; mask-image: none; } }
.hero__sub { font: 500 clamp(16px, 1.4vw, 19px)/1.5 var(--font-sans); margin: 40px auto 24px; max-width: 34em; }
.hero__scroll { position: absolute; left: 0; right: 0; bottom: 34px; text-align: center; margin: 0; font: 500 12px/1.5 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }

/* ==========================================================================
   5. Homepage — featured story
   ========================================================================== */
.featured { display: grid; grid-template-columns: 1fr 1fr; min-height: 640px; }
.featured__media { display: block; position: relative; background: var(--paper); }
.featured__media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; filter: saturate(.85) sepia(.08); }
.featured__panel { background: var(--butter); padding: clamp(56px, 10vw, 150px) clamp(28px, 7vw, 100px); position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.featured__title { font-size: clamp(48px, 5.4vw, 76px); line-height: .94; margin-bottom: 24px; }
.featured__title a { text-decoration: none; }
.featured__excerpt { font-size: 17px; line-height: 1.62; max-width: 430px; margin-bottom: 28px; }

/* ==========================================================================
   6. Travel band
   ========================================================================== */
.band--red { background: var(--verm) !important; }
.band { background: var(--cobalt); color: var(--cream); height: 56px; overflow: hidden; display: flex; align-items: center; }
.band__track { display: flex; width: max-content; animation: band 40s linear infinite; }
.band__group { display: flex; align-items: center; gap: 44px; padding-right: 44px; }
.band__icon { flex: none; }
@keyframes band { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .band__track { animation: none; } }

/* ==========================================================================
   7. Cards (used everywhere)
   ========================================================================== */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 56px; flex-wrap: wrap; }
.filters { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; color: var(--cobalt); }
.filters li + li::before { content: "/"; margin-right: 14px; }
.filters a { text-decoration: none; }
.filters a:hover, .filters a.is-active { text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
.filters--small { font-size: 14px; margin-top: 42px; }
.filters--small .filters__label { font: 600 11px/1.9 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.filters--small .filters__label::before, .filters--small .filters__label + li::before { content: none; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 16px; }
.card__link { display: block; text-decoration: none; color: inherit; }
.card__media { position: relative; margin-bottom: 36px; }
.card__img { width: 100%; aspect-ratio: 432 / 440; object-fit: cover; background: var(--paper); filter: saturate(.88) sepia(.06); transition: transform .3s ease; }
.card__img--blank { background: #D9CDB4; }
.card__star { width: 64px; right: -14px; top: -18px; transform: rotate(12deg); z-index: 2; }
.card__media .label { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%); }
.card__meta { font: 500 11px/1.4 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--verm); margin-bottom: 10px; }
.card__title { font-size: 36px; line-height: 1.04; margin-bottom: 12px; }
.card__excerpt { font-size: 15px; line-height: 1.6; margin: 0; max-width: 400px; }
.card__link:hover .card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.card__link:hover .card__img { transform: rotate(-.6deg); }
.latest .center, .section .center { margin-top: 64px; }

/* ==========================================================================
   8. Homepage — from the author
   ========================================================================== */
.about { background: var(--paper); display: grid; grid-template-columns: 1fr 457px 140px; align-items: center; min-height: 625px; }
.about__copy { padding: 80px var(--gutter); max-width: 560px; }
.about__text p { font-size: 17px; line-height: 1.65; max-width: 430px; }
.about__sign { font-size: 34px; margin: 10px 0 0; }
.about__photo { background: var(--butter); align-self: stretch; padding: 25px 30px 24px; display: flex; }
.about__photo img, .about__blank { width: 100%; height: 100%; min-height: 520px; object-fit: cover; background: #D9CDB4; }

/* ==========================================================================
   9. Substack postcard
   ========================================================================== */
.subscribe { padding-top: 80px; }
.postcard {
	position: relative;
	max-width: 918px;
	margin: 30px auto 0;
	aspect-ratio: 918 / 535;
	background: url("assets/img/bluepostcard.webp") center / 100% 100% no-repeat;
	box-shadow: 0 16px 30px rgba(31, 23, 13, .26);
	transform: rotate(-1.5deg);
	display: grid;
	grid-template-columns: 1fr 1fr;
	color: var(--postcard-blue);
}
.postcard__message { padding: 21% 7% 0 13%; }
.postcard__title { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.02; color: var(--postcard-blue); margin-bottom: 16px; }
.postcard__message p { font-size: 14px; line-height: 1.6; max-width: 300px; }
.postcard__hand { font-size: 30px; transform: rotate(-3deg); margin-top: 20px; color: var(--verm) !important; }
.postcard__address { position: relative; padding: 46% 9% 0 7%; }
.postcard__form label { display: block; font: 600 10px/1 var(--font-sans); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 10px; }
.postcard__form input {
	width: 100%;
	border: 0;
	border-bottom: 1.5px solid var(--postcard-blue);
	background: transparent;
	font: 400 26px/1.4 var(--font-hand, cursive);
	color: var(--ink);
	padding: 4px 0;
	margin-bottom: 26px;
	border-radius: 0;
}
.postcard__form input::placeholder { color: var(--postcard-blue); opacity: .35; }
.postcard__form input:focus { outline: none; border-bottom-color: var(--verm); }
.postcard__form .btn { background: var(--postcard-blue); border-color: var(--postcard-blue); }
.postcard__small { font-size: 12px; margin: 14px 0 0; }
.stamp {
	position: absolute; right: 6%; top: 4%;
	width: 96px; height: 116px;
	background: #E7EEF6;
	outline: 6px dotted var(--note);
	outline-offset: -1px;
	border: 6px solid var(--note);
	box-shadow: var(--shadow-sm);
	transform: rotate(4deg);
	display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
	padding: 6px;
}
.stamp img { position: absolute; top: 10px; left: 50%; width: 70px; transform: translateX(-50%) rotate(-8deg); }
.stamp__value { font: italic 22px/1 var(--font-serif); align-self: flex-start; }
.stamp__air { font: 600 7px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; position: absolute; right: 8px; bottom: 10px; }
.postcard__pin { width: 84px; left: -34px; top: -28px; transform: rotate(-14deg); }

/* ==========================================================================
   10. Footer
   ========================================================================== */
.site-footer { background: var(--cobalt); color: var(--cream); padding: 64px 0 0; }
.site-footer__top { display: grid; grid-template-columns: 1fr auto; gap: 48px; padding-bottom: 48px; }
.site-footer__logo { font: 400 clamp(52px, 6vw, 84px)/1.25 var(--font-sans); text-decoration: none; display: inline-block; }
.site-footer__blurb { max-width: 380px; font-size: 16px; line-height: 1.6; }
.socials { list-style: none; margin: 24px 0 0; padding: 0; display: flex; gap: 12px; }
.socials a { display: block; color: var(--cream); transition: color .15s; }
.socials a:hover { color: var(--gold); }
.site-footer__cols { display: grid; grid-auto-flow: column; gap: 72px; align-self: center; }
.footer-head { font: 600 12px/1 var(--font-sans); letter-spacing: .18em; text-transform: uppercase; color: var(--butter); margin-bottom: 18px; }
.site-footer .menu { list-style: none; margin: 0; padding: 0; font-size: 16px; line-height: 2; }
.site-footer .menu a { text-decoration: none; }
.site-footer .menu a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__bottom { border-top: 1px solid rgba(251, 246, 233, .4); display: flex; justify-content: space-between; padding-top: 20px; padding-bottom: 28px; font: 500 11px/1 var(--font-sans); letter-spacing: .18em; text-transform: uppercase; }
.site-footer__bottom a { text-decoration: none; }

/* ==========================================================================
   11. Article page
   ========================================================================== */
.post-header { position: relative; text-align: center; padding: 124px var(--gutter) 64px; max-width: 1100px; margin: 0 auto; }
.crumbs { font: 500 13px/1 var(--font-sans); color: var(--cobalt); margin-bottom: 30px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.post-header .eyebrow { margin-bottom: 18px; }
.post-title { font-size: clamp(52px, 7.4vw, 104px); line-height: .94; letter-spacing: -.02em; max-width: 1000px; margin: 0 auto 26px; }
.post-dek { font-size: 20px; line-height: 1.55; max-width: 640px; margin: 0 auto 28px; }
.post-meta { font: 500 13px/1 var(--font-sans); letter-spacing: .06em; margin: 0; }
.post-header__st1 { width: 64px; right: 9%; top: 90px; transform: rotate(12deg); }
.post-header__st2 { width: 58px; left: 4%; bottom: 60px; transform: rotate(-14deg); }
.post-header--page { padding-bottom: 40px; }

.post-hero { position: relative; max-width: 1240px; margin: 0 auto 80px; padding: 0 var(--gutter); }
.post-hero img:not(.sticker) { width: 100%; max-height: 700px; object-fit: cover; box-shadow: 0 8px 24px rgba(31, 23, 13, .14); filter: saturate(.9) sepia(.06); }
.post-hero figcaption { font-size: 13px; opacity: .7; margin-top: 14px; }
.post-hero__st { width: 96px; right: -10px; top: -30px; transform: rotate(-10deg); }
.post-hero__fl { width: 96px; left: -20px; bottom: 10px; transform: rotate(-18deg); }

.post-body { display: grid; grid-template-columns: 1fr minmax(0, 640px) 1fr; gap: 40px; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter) 100px; }
.toc-col, .notes-col { position: relative; }
.toc { position: sticky; top: 40px; width: 240px; margin-left: auto; }
.has-hero .toc, .admin-bar .toc { top: 72px; }
.toc summary { list-style: none; cursor: pointer; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 4px 0 24px; padding: 0; }
.toc li a { display: flex; gap: 14px; align-items: baseline; padding: 12px 0 12px 16px; border-left: 1px solid rgba(45, 78, 158, .2); text-decoration: none; color: var(--cobalt); font: 400 21px/1.15 var(--font-serif); }
.toc li a span { font: 500 11px/1 var(--font-sans); letter-spacing: .1em; opacity: .6; }
.toc li a:hover { color: var(--verm); }
.toc li a.is-active { color: var(--verm); font-style: italic; border-left: 3px solid var(--verm); padding-left: 14px; }
.toc li a.is-active span { opacity: 1; }
.toc__top { font-size: 11px; }

.trip-notes { position: sticky; top: 40px; width: 270px; background: var(--note); border: 1.2px dashed var(--verm); padding: 18px 24px 22px; transform: rotate(2deg); box-shadow: 0 6px 14px rgba(31, 23, 13, .12); }
.trip-notes__title { font-size: 34px; margin: 0 0 12px; }
.trip-notes dl { margin: 0; }
.trip-notes dt { font: 600 10px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cobalt); margin-top: 14px; }
.trip-notes dd { margin: 4px 0 0; font: 400 22px/1.15 var(--font-serif); }
.trip-notes__fl { width: 80px; right: -30px; top: -40px; transform: rotate(-10deg); }

/* Post content — what you write in the editor */
.entry-content { font-size: 18px; line-height: 1.78; min-width: 0; }
.entry-content > p:first-child { font-size: 21px; line-height: 1.6; font-weight: 500; }
.entry-content > * { margin-top: 0; margin-bottom: 0; }
.entry-content > * + * { margin-top: 28px; }
.entry-content a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content > h2 { font-size: 48px; line-height: 1; margin-top: 64px; scroll-margin-top: 100px; }
.entry-content > h3 { font-size: 30px; margin-top: 44px; }
.entry-content ul { padding-left: 1.2em; }

/* Images: white photo frame with masking tape + handwritten caption */
.entry-content figure.wp-block-image, .entry-content .wp-caption { margin-left: 0; margin-right: 0; }
.entry-content > figure.wp-block-image:not(.alignwide):not(.alignfull) { position: relative; background: var(--note); padding: 12px 12px 6px; box-shadow: 0 8px 20px rgba(31, 23, 13, .18); transform: rotate(-1.2deg); margin-top: 48px; margin-bottom: 48px; }
.entry-content > figure.wp-block-image:nth-of-type(even):not(.alignwide):not(.alignfull) { transform: rotate(1deg); }
.entry-content > figure.wp-block-image:not(.alignwide):not(.alignfull)::before { content: ""; position: absolute; left: 50%; top: -14px; width: 130px; height: 34px; background: rgba(214, 191, 142, .85); transform: translateX(-50%) rotate(2deg); }
.entry-content figure img:not(.sticker) { width: 100%; }
.entry-content figcaption, .entry-content .wp-element-caption { font-family: var(--font-hand, cursive); color: var(--verm); font-size: 24px; line-height: 1.2; margin: 8px 4px 4px; text-align: left; }
.entry-content .alignwide { margin-left: -140px; margin-right: -140px; max-width: none; }

/* Two-up / gallery images stay flat */
.entry-content .wp-block-gallery figure, .entry-content .wp-block-columns figure { background: none; padding: 0; box-shadow: none; transform: none; }
.entry-content .wp-block-gallery figure::before { display: none; }
.entry-content .wp-block-gallery figcaption { background: none !important; color: var(--verm) !important; position: static !important; padding: 6px 0 0 !important; font-size: 22px !important; }

/* Quotes become a scrap of yellow paper */
.entry-content blockquote, .entry-content .wp-block-quote, .entry-content .wp-block-pullquote {
	position: relative;
	margin: 56px 20px;
	padding: 34px 40px 28px;
	background: var(--butter);
	border: 0;
	transform: rotate(-1.2deg);
	text-align: left;
}
.entry-content blockquote p { font: 400 36px/1.05 var(--font-serif); color: var(--cobalt); }
.entry-content blockquote cite, .entry-content blockquote .wp-block-quote__citation { display: block; margin-top: 14px; font: normal 24px/1.2 var(--font-hand, cursive); color: var(--verm); transform: rotate(-2deg); }
.entry-content blockquote::after { content: ""; position: absolute; right: -14px; top: -16px; width: 52px; height: 57px; background: url("assets/img/st_redemb.webp") center / contain no-repeat; transform: rotate(14deg); }

/* Numbered lists become the "ranking" style */
.entry-content ol { list-style: none; padding: 0; counter-reset: rank; }
.entry-content ol > li { counter-increment: rank; position: relative; padding: 20px 0 20px 68px; border-top: 1px solid rgba(45, 78, 158, .25); font-size: 16px; line-height: 1.65; }
.entry-content ol > li::before { content: counter(rank, decimal-leading-zero); position: absolute; left: 0; top: 14px; font: italic 44px/1 var(--font-serif); color: var(--verm); }
.entry-content ol > li strong:first-child { display: block; font: 400 28px/1.1 var(--font-serif); color: var(--cobalt); margin-bottom: 6px; }

.sign-off { font-size: 38px; margin-top: 40px !important; }

.post-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(45, 78, 158, .25); padding-top: 24px; margin-top: 40px !important; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.tags a { display: block; font: 500 13px/1 var(--font-sans); color: var(--cobalt); text-decoration: none; border: 1.2px solid var(--cobalt); border-radius: var(--radius); padding: 9px 14px; }
.tags a:hover { background: var(--cobalt); color: var(--cream); }
.share { margin: 0; display: flex; gap: 12px; align-items: center; font-size: 14px; }
.share span { font: 600 12px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; }
.share a, .share button { color: var(--cobalt); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }

.entry-content--page { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter) 100px; }

.more-articles { background: var(--paper); }

/* Author box */
.author-box { background: var(--paper); padding: 90px var(--gutter); }
.author-box__inner { max-width: 760px; margin: 0 auto; display: flex; gap: 40px; align-items: center; }
.author-box__photo { position: relative; flex: none; }
.author-box__photo img:not(.sticker) { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 8px solid var(--note); box-shadow: 0 6px 14px rgba(31, 23, 13, .16); background: #D9CDB4; }
.author-box__st { width: 54px; right: -10px; top: -8px; transform: rotate(-12deg); }
.author-box__name { font-size: 52px; margin-bottom: 14px; }
.author-box p:not(.eyebrow) { font-size: 17px; max-width: 520px; }

/* ==========================================================================
   12. Blog page (grouped by country) + archives
   ========================================================================== */
.blog-header { padding: 138px 0 0; }
.blog-header .wrap::after { content: ""; display: block; height: 1px; background: rgba(45, 78, 158, .25); margin-top: 108px; }
.blog-header__search { margin-top: 53px; }
.blog-header__search .searchbox { margin-bottom: 0; }
.blog-header .blog-title { margin-bottom: 0; }
.blog-header__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.blog-title { font-size: clamp(64px, 9vw, 128px); line-height: .92; letter-spacing: -.02em; margin-bottom: 34px; }
.blog-intro { font-size: 18px; line-height: 1.6; max-width: 460px; margin-bottom: 32px; }
.searchbox { display: flex; align-items: center; gap: 12px; width: 360px; max-width: 100%; border-bottom: 1.5px solid var(--cobalt); padding-bottom: 10px; margin-bottom: 14px; color: var(--cobalt); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 17px/1.3 var(--font-sans); color: var(--ink); padding: 0; }
.searchbox input::placeholder { color: var(--cobalt); opacity: .55; }
.searchbox input:focus { outline: none; }
.searchbox:focus-within { border-bottom-color: var(--verm); }
.searchbox button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--cobalt); font: 600 12px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; }
.searchbox button:hover { color: var(--verm); }
.blog-header .chips { margin-top: 34px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 16px; border: 1.2px solid var(--cobalt); border-radius: var(--radius); color: var(--cobalt); text-decoration: none; font: 500 14px/1 var(--font-sans); }
.chip em { font: italic 16px/1 var(--font-serif); color: var(--verm); }
.chip:hover, .chip.is-active { background: var(--cobalt); color: var(--cream); }
.chip.is-active em, .chip:hover em { color: var(--butter); }
.blog-map { position: relative; }
.blog-map__img { width: 100%; transform: rotate(-2deg); box-shadow: 0 10px 22px rgba(31, 23, 13, .2); }
.blog-map__st { width: 70px; left: -20px; top: -20px; transform: rotate(-14deg); }
.blog-map__note { position: absolute; right: 8%; bottom: -54px; font-size: 30px; transform: rotate(-4deg); margin: 0; }

.country { padding: 108px 0 100px; }
.blog-header + .country { margin-top: 30px; }
.country--alt { background: var(--paper); }
.country__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 46px; }
.country__head .link { margin-bottom: 12px; }
.country__name { font-size: clamp(56px, 7vw, 96px); letter-spacing: -.02em; margin-bottom: 10px; }
.country__dek { font: italic 24px/1.3 var(--font-serif); color: var(--ink); margin: 0; }
.country__side { display: flex; flex-direction: column; align-items: flex-end; gap: 24px; }
.passport {
	width: 130px; height: 130px;
	border-radius: 50%;
	border: 3px solid var(--verm);
	color: var(--verm);
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center;
	position: relative;
	transform: rotate(-12deg);
	opacity: .85;
}
.passport::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 1.4px dashed currentColor; }
.passport b { font: 600 12px/1.1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; padding: 0 16px; }
.passport small { font: 500 9px/1 var(--font-sans); letter-spacing: .22em; text-transform: uppercase; margin-top: 6px; }
.passport--blue { color: var(--cobalt); border-color: var(--cobalt); transform: rotate(10deg); }

.soon { display: flex; align-items: center; justify-content: center; }
.soon p { background: var(--note); border: 1.2px dashed var(--verm); padding: 36px 32px; font-size: 32px; transform: rotate(-3deg); box-shadow: 0 4px 10px rgba(31, 23, 13, .1); margin: 0; max-width: 300px; }

.archive-header { padding: 70px 0 40px; position: relative; }
.archive-header .crumbs { justify-content: flex-start; }
.archive-header__stamp { position: absolute; right: var(--gutter); top: 60px; }

.pagination { margin-top: 72px; }
.country + .pagination, .country ~ .pagination { margin: 0; padding: 60px 0 76px; }
.pagination .nav-links { display: flex; justify-content: center; align-items: center; gap: 12px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border: 1.2px solid var(--cobalt); border-radius: var(--radius); color: var(--cobalt); text-decoration: none; font: 400 22px/1 var(--font-serif); }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--cobalt); color: var(--cream); }
.pagination .prev, .pagination .next { border: 0; font: 600 12px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; }
.pagination .prev:hover, .pagination .next:hover { background: none !important; color: var(--verm) !important; }

/* 404 */
.lost { position: relative; text-align: center; padding: 140px var(--gutter); }
.lost__note { font-size: 34px; margin-bottom: 32px; }
.lost__st1 { width: 100px; left: 20%; top: 80px; transform: rotate(10deg); }
.lost__st2 { width: 130px; right: 18%; bottom: 80px; transform: rotate(-8deg); }

/* ==========================================================================
   13. Responsive
   ========================================================================== */
@media (max-width: 1240px) {
	.post-body { grid-template-columns: 220px minmax(0, 640px); gap: 40px; }
	.notes-col { grid-column: 2; grid-row: 1; }
	.trip-notes { position: static; transform: rotate(1deg); width: auto; max-width: 420px; margin-bottom: 24px; }
	.entry-content { grid-column: 2; }
	.entry-content .alignwide { margin-left: 0; margin-right: 0; }
	.about { grid-template-columns: 1fr 400px; }
}

@media (max-width: 1100px) {
	.cards { grid-template-columns: repeat(2, 1fr); }
	.post-body { grid-template-columns: minmax(0, 640px); justify-content: center; gap: 0; }
	.toc-col, .notes-col, .entry-content { grid-column: 1; grid-row: auto; }
	.toc { position: static; max-width: none; margin: 0 0 32px; background: var(--note); border: 1px solid rgba(45, 78, 158, .2); border-radius: var(--radius); padding: 16px 18px 4px; }
	.toc summary { margin: 0 0 12px; }
	.toc summary::after { content: " ↓"; }
	.toc details[open] summary::after { content: " ↑"; }
	.blog-header__grid { grid-template-columns: 1fr; }
	.blog-map { max-width: 560px; }
	.site-footer__top { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
	body { font-size: 16px; }
	.nav-toggle { display: inline-flex; flex-direction: column; gap: 6px; background: none; border: 0; padding: 8px; cursor: pointer; color: inherit; position: relative; z-index: 60; }
	.nav-toggle__bar { display: block; width: 26px; height: 2px; background: currentColor; transition: transform .2s; }
	.has-hero .nav-toggle { color: var(--cream); }
	.has-hero.scrolled .nav-toggle, .nav-open .nav-toggle { color: var(--cobalt) !important; }
	.nav-open .nav-toggle__bar:first-child { transform: translateY(4px) rotate(45deg); }
	.nav-open .nav-toggle__bar:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
	.site-nav { position: fixed; inset: 0; background: var(--cream); display: none; align-items: center; justify-content: center; z-index: 55; }
	.nav-open .site-nav { display: flex; }
	.site-nav .menu { flex-direction: column; align-items: center; gap: 28px; }
	.site-nav a, .has-hero .site-header .site-nav a { font: 400 48px/1 var(--font-serif); letter-spacing: 0; text-transform: none; color: var(--cobalt); }
	.nav-open .logo { color: var(--cobalt) !important; position: relative; z-index: 60; }

	.hero__script--top { margin-left: 0; }
	
	.featured { grid-template-columns: 1fr; }
	.featured__media { aspect-ratio: 4 / 3; }

	.cards { grid-template-columns: 1fr; gap: 48px; }
	.card__title { font-size: 32px; }

	.about { grid-template-columns: 1fr; }
	.about__photo img, .about__blank { min-height: 420px; }

	/* Postcard stacks into a simple card on phones */
	.postcard { aspect-ratio: auto; background: var(--paper); transform: none; grid-template-columns: 1fr; padding: 32px 24px; border: 1px solid rgba(46, 63, 148, .3); }
	.postcard__message, .postcard__address { padding: 0; }
	.postcard__address { padding-top: 24px; margin-top: 24px; border-top: 1.5px solid var(--postcard-blue); }
	.stamp { position: absolute; top: -30px; right: 14px; transform: rotate(6deg) scale(.8); }
	.postcard__pin { display: none; }

	.post-header__st1, .post-header__st2, .post-hero__st, .post-hero__fl { display: none; }
	.post-hero { padding: 0; }
	.entry-content > h2 { font-size: 38px; }
	.entry-content blockquote { margin: 40px 0; padding: 26px 24px; }
	.entry-content blockquote p { font-size: 28px; }
	.author-box__inner { flex-direction: column; text-align: center; }

	.country__head { flex-direction: column; align-items: flex-start; }
	.country__side { flex-direction: row-reverse; align-items: center; justify-content: space-between; width: 100%; }
	.passport { width: 96px; height: 96px; }
	.passport b { font-size: 10px; }
	.archive-header__stamp { display: none; }

	.site-footer__cols { grid-auto-flow: row; gap: 32px; }
	.site-footer__bottom { flex-direction: column; gap: 12px; }
}

@media (max-width: 782px) { .admin-bar.has-hero .site-header { top: 46px; } }
.archive-header__search { margin-top: 28px; }

/* ==========================================================================
   14. Resources page
   ========================================================================== */
.btn--small { padding: 12px 20px; font-size: 11px; }
.res-header { padding: 110px 0 0; }
.res-header .wrap::after { content: ""; display: block; height: 1px; background: rgba(45, 78, 158, .25); margin-top: 70px; grid-column: 1 / -1; }
.res-header__grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: end; }
.res-title { max-width: 900px; }
.res-note { background: var(--note); border: 1.2px dashed var(--verm); border-radius: var(--radius); padding: 22px 24px; transform: rotate(1.5deg); margin-bottom: 80px; }
.res-note p:last-child { margin: 0; font-size: 14px; line-height: 1.55; }
.res-section { padding: 100px 0; }
.res-section--alt { background: var(--paper); }
.res-section__name { margin-bottom: 10px; }
.res-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 56px 21px; margin-top: 50px; }
.res-card__img { position: relative; background: var(--note); border: 1px solid rgba(45, 78, 158, .15); padding: 20px; margin-bottom: 16px; }
.res-card__img img, .res-card__blank { width: 100%; aspect-ratio: 1; object-fit: cover; background: #D9CDB4; }
.res-card__pick { position: absolute; left: 14px; top: 14px; background: var(--verm); color: var(--cream); border-radius: var(--radius); font: 600 10px/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; padding: 8px 12px; }
.res-card .card__meta { margin-bottom: 8px; }
.res-card__name { font-size: 30px; line-height: 1.04; margin-bottom: 10px; }
.res-card__why { font-size: 15px; line-height: 1.58; margin-bottom: 16px; }
.res-ask { text-align: center; padding: 80px var(--gutter); }
.res-ask__title { font-size: 48px; margin-bottom: 24px; }
@media (max-width: 1100px) {
	.res-cards { grid-template-columns: repeat(2, 1fr); }
	.res-header__grid { grid-template-columns: 1fr; }
	.res-note { margin-bottom: 0; max-width: 420px; }
}
@media (max-width: 560px) { .res-cards { grid-template-columns: 1fr; } }
