/**
 * Chasing the Horizon — Main Theme Stylesheet
 *
 * "Helm" design direction: seafoam + gold + teak.
 * Like standing on a teak deck looking out at the ocean.
 * Bold wood textures, organic wave transitions, warm illustrated vibe.
 *
 * All colors reference CSS custom properties set by theme.json so the
 * palette stays in sync between the editor and the front end.
 *
 * @package Chasing_Horizon
 */


/* ==========================================================================
   1. RESET
   ========================================================================== */

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

body,
h1, h2, h3, h4, h5, h6,
p,
figure,
blockquote,
dl, dd {
	margin: 0;
}

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

ul, ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

a {
	color: var(--wp--preset--color--brass);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	transition: color 200ms ease;
}

a:hover {
	color: var(--wp--preset--color--amber);
}


/* ==========================================================================
   2. BASE TYPOGRAPHY
   ========================================================================== */

/* html background matches footer so no texture bleeds below it */
html {
	background-color: #1A120B;
}

body {
	font-family: 'Raleway', sans-serif;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--wp--preset--color--teak);
	background-color: var(--wp--preset--color--seafoam);
	background-image: url('../images/bg.jpg');
	background-size: 50% auto;
	background-repeat: repeat;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Film grain is applied directly to the body background via grain.js —
   no separate overlay div needed. */

h1, h2, h3, h4, h5, h6 {
	font-family: 'Lora', serif;
	color: var(--wp--preset--color--gold);
	line-height: 1.3;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }


/* ==========================================================================
   3. ACCESSIBILITY
   ========================================================================== */

/* Skip link — hidden until focused */
.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	z-index: 9999;
	padding: 0.75rem 1.5rem;
	background: var(--wp--preset--color--brass);
	color: var(--wp--preset--color--teak-dark);
	font-weight: 700;
	text-decoration: none;
}

.skip-link:focus {
	top: 0;
}

/* Visible focus outlines for keyboard navigation */
:focus-visible {
	outline: 3px solid var(--wp--preset--color--brass);
	outline-offset: 2px;
}

/* Screen reader text — visually hidden, accessible to AT */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	width: auto;
	z-index: 100000;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}


/* ==========================================================================
   4. TEAK WOOD TEXTURE
   Bold CSS wood grain for hero, CTA, and chapter headers.
   Three layers: narrow vertical grain lines, wide horizontal planks,
   and a dark-to-mid gradient for depth.
   ========================================================================== */

.teak-section {
	background-color: #1A120B;
	color: var(--wp--preset--color--deck-light);
}

/* Headings on teak should be gold */
.teak-section h1,
.teak-section h2,
.teak-section h3 {
	color: var(--wp--preset--color--gold);
}

/* Links on teak use brass/amber */
.teak-section a {
	color: var(--wp--preset--color--brass);
}

.teak-section a:hover {
	color: var(--wp--preset--color--amber);
}

/* CTA buttons/links need high contrast text against brass bg */
.hero__cta,
.closing-cta__link {
	color: #FFFFFF !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero__cta:hover,
.closing-cta__link:hover {
	color: #FFFFFF !important;
}


/* ==========================================================================
   5. SVG WAVE DIVIDERS
   Organic transitions between teak and seafoam sections.
   The SVGs are inline in templates; these styles control sizing.
   ========================================================================== */

.wave-divider {
	position: relative;
	width: 100%;
	overflow: hidden;
	line-height: 0;
	margin: 0;
	padding: 0;
}

.wave-divider svg {
	display: block;
	width: 100%;
	height: auto;
	min-height: 60px;
}

/* Teak-to-seafoam */
.wave-divider--teak-to-seafoam {
	background-color: transparent;
}

/* Seafoam-to-teak */
.wave-divider--seafoam-to-teak {
	background-color: transparent;
}


/* ==========================================================================
   6. SITE HEADER
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: var(--wp--preset--color--teak-dark);
	border-bottom: 1px solid var(--wp--preset--color--teak-light);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem 1.5rem;
}

/* Site branding */
.site-branding .site-title {
	font-family: 'Lora', serif;
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--wp--preset--color--gold);
	text-decoration: none;
	letter-spacing: -0.01em;
}

.site-branding .site-title:hover {
	color: var(--wp--preset--color--amber);
}

/* Navigation — hidden until hamburger opens it on all screen sizes */
.main-navigation {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: var(--wp--preset--color--teak-dark);
	border-bottom: 1px solid var(--wp--preset--color--teak-light);
	padding: 1rem 1.5rem;
	box-shadow: 0 4px 12px rgba(26, 18, 11, 0.3);
	max-height: calc(100vh - 64px);
	overflow-y: auto;
	z-index: 999;
}

.main-navigation.toggled {
	display: block;
}

.main-navigation ul {
	flex-direction: column;
	gap: 0;
}

.main-navigation a {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--wp--preset--color--deck-light);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: color 200ms ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	color: var(--wp--preset--color--brass);
}

/* Hamburger toggle — mobile only */
.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
}

.menu-toggle__bar {
	display: block;
	width: 24px;
	height: 2px;
	background-color: var(--wp--preset--color--deck-light);
	transition: transform 250ms ease, opacity 250ms ease;
}

/* Hamburger → X animation when menu is open */
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================================
   7. MAIN CONTENT
   ========================================================================== */

.site-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Reading section — cream background for chapter content */
.reading-section {
	background-color: var(--wp--preset--color--reading-bg);
	color: var(--wp--preset--color--reading-text);
}

.reading-section a {
	color: var(--wp--preset--color--brass);
}

.reading-section a:hover {
	color: var(--wp--preset--color--amber);
}

/* Entry content — reading-optimized column */
.entry-content {
	max-width: 680px;
	margin: 0 auto;
	padding: 2rem 0 4rem;
}

.entry-content p {
	margin-bottom: 1.5rem;
}

/* Drop cap on first paragraph */
.entry-content > p:first-of-type::first-letter {
	font-family: 'Lora', serif;
	font-size: 3.5em;
	float: left;
	line-height: 0.8;
	margin: 0.05em 0.15em 0 0;
	color: var(--wp--preset--color--brass);
}

/* Pull quotes */
.entry-content blockquote,
.wp-block-quote {
	border-left: 4px solid var(--wp--preset--color--brass);
	margin: 2rem 0;
	padding: 1rem 1.5rem;
	font-family: 'Lora', serif;
	font-size: 1.2rem;
	font-style: italic;
	color: var(--wp--preset--color--teak);
	background-color: rgba(202, 138, 4, 0.08);
}


/* ==========================================================================
   8. HERO SECTION (Front Page)
   ========================================================================== */

/* Front page removes default site-main constraints */
.site-main--front-page {
	max-width: none;
	padding: 0;
}

.hero {
	padding-top: 6rem;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
	padding-bottom: 0;
	text-align: center;
}

/* Video hero variant — wave mask cuts bottom into organic shape */
.hero--video {
	position: relative;
	overflow: hidden;
	padding-bottom: 400px;
	margin-bottom: -2px;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 960' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L1440,0 L1440,840 C1200,870 960,980 720,920 C480,860 240,940 0,840 Z' fill='white'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 960' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L1440,0 L1440,840 C1200,870 960,980 720,920 C480,860 240,940 0,840 Z' fill='white'/%3E%3C/svg%3E");
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.hero__video {
	position: absolute;
	top: 50%;
	left: 50%;
	min-width: 100%;
	min-height: 100%;
	width: auto;
	height: auto;
	transform: translate(-50%, -50%);
	object-fit: cover;
	z-index: 0;
}

/* Dark overlay for text readability over video */
.hero__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(26, 18, 11, 0.55);
	z-index: 1;
}

.hero--video .hero__inner {
	position: relative;
	z-index: 2;
}

/* Pause video when user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
	.hero__video {
		display: none;
	}
	.hero--video {
		background-image: url('../images/hero-poster.png');
		background-size: cover;
		background-position: center;
	}
}

.hero__inner {
	max-width: 680px;
	margin: 0 auto;
	padding-bottom: 4rem;
}

.hero__title {
	font-family: 'Lora', serif;
	font-size: clamp(2.5rem, 7vw, 4.5rem);
	margin-bottom: 1.25rem;
	color: var(--wp--preset--color--gold);
	letter-spacing: -0.02em;
}

.hero__tagline {
	font-size: clamp(1.05rem, 2.5vw, 1.25rem);
	color: var(--wp--preset--color--deck-light);
	max-width: 540px;
	margin: 0 auto;
	line-height: 1.7;
}

/* Brass CTA button on hero */
.hero__cta {
	display: inline-block;
	margin-top: 2.5rem;
	padding: 1.1rem 3rem;
	background-color: var(--wp--preset--color--brass);
	font-family: 'Raleway', sans-serif;
	font-weight: 700;
	font-size: 1.15rem;
	text-decoration: none;
	border-radius: 4px;
	border: 2px solid var(--wp--preset--color--amber);
	box-shadow: 0 4px 16px rgba(202, 138, 4, 0.3);
	transition: background-color 250ms ease, transform 250ms ease, box-shadow 250ms ease;
}

.hero__cta:hover {
	background-color: var(--wp--preset--color--amber);
	transform: translateY(-2px);
	box-shadow: 0 6px 24px rgba(232, 160, 48, 0.4);
}

.hero__cta:focus-visible {
	outline: 3px solid var(--wp--preset--color--amber);
	outline-offset: 2px;
}

/* Scroll-down indicator */
.scroll-indicator {
	margin-top: 2.5rem;
}

.scroll-indicator__arrow {
	display: inline-block;
	width: 24px;
	height: 24px;
	border-right: 2px solid var(--wp--preset--color--deck-light);
	border-bottom: 2px solid var(--wp--preset--color--deck-light);
	transform: rotate(45deg);
	animation: scroll-bounce 2s ease infinite;
	opacity: 0.6;
}

@keyframes scroll-bounce {
	0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.6; }
	50%      { transform: rotate(45deg) translateY(6px); opacity: 1; }
}


/* ==========================================================================
   9. SECTION HEADINGS (Front Page)
   ========================================================================== */

.section-heading {
	text-align: center;
	margin-bottom: 2.5rem;
	font-family: 'Lora', serif;
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	color: var(--wp--preset--color--gold);
}

.section-heading::after {
	content: '';
	display: block;
	width: 60px;
	height: 3px;
	background-color: var(--wp--preset--color--brass);
	margin: 0.75rem auto 0;
	border-radius: 2px;
}

/* On seafoam backgrounds, body text uses teak-brown for WCAG AA contrast */
.seafoam-section {
	background-color: transparent;
	color: var(--wp--preset--color--teak);
}


/* ==========================================================================
   10. CHAPTER CARDS (Homepage + Archive)
   ========================================================================== */

.chapters-grid {
	padding: 3rem 1.5rem 4rem;
	max-width: 1200px;
	margin: 0 auto;
}

.chapters-grid__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

.chapter-card {
	display: block;
	padding: 2rem;
	border: 1px solid var(--wp--preset--color--sage);
	border-left: 4px solid var(--wp--preset--color--sage);
	border-radius: 4px;
	background-color: #F5F0E1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	text-decoration: none;
	cursor: pointer;
	transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}

.chapter-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.chapter-card__number {
	display: block;
	font-family: 'Caveat', cursive;
	font-size: 0.95rem;
	color: var(--wp--preset--color--sage);
	margin-bottom: 0.25rem;
}

.chapter-card__title {
	font-size: 1.35rem;
	color: var(--wp--preset--color--gold);
	margin-bottom: 0.5rem;
}

.chapter-card__location {
	display: block;
	font-family: 'Caveat', cursive;
	font-size: 0.9rem;
	color: var(--wp--preset--color--sage);
	margin-bottom: 0.5rem;
}

.chapter-card__excerpt {
	font-size: 0.9rem;
	color: var(--wp--preset--color--teak);
	line-height: 1.6;
}


/* ==========================================================================
   11. ILLUSTRATED MAP PLACEHOLDER
   ========================================================================== */

/* Illustrated map section */
.illustrated-map-section {
	padding: 3rem 1.5rem 4rem;
	max-width: 1200px;
	margin: 0 auto;
}

.map-container {
	position: relative;
	width: 100%;
	border-radius: 8px;
	overflow: hidden;
	border: 4px solid #CA8A04;
	box-shadow:
		0 4px 16px rgba(0, 0, 0, 0.25),
		0 12px 48px rgba(0, 0, 0, 0.3),
		0 24px 80px rgba(0, 0, 0, 0.2);
}

.map-container__image {
	display: block;
	width: 100%;
	height: auto;
}

/* Map pins */
.map-pin {
	position: absolute;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	transform: translate(-50%, -50%);
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

/* Offset Laos label right to not crowd Thailand */
.map-pin[data-location="laos"] .map-pin__label {
	padding-left: 2.5rem;
}

.map-pin::before {
	content: '';
	display: block;
	width: 16px;
	height: 16px;
	background-color: var(--wp--preset--color--brass, #CA8A04);
	border: 3px solid var(--wp--preset--color--cream, #F5F0E1);
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	transition: transform 250ms ease, box-shadow 250ms ease;
	animation: pin-pulse 2.5s ease-in-out infinite;
}

.map-pin:hover::before,
.map-pin--active::before {
	transform: scale(1.3);
	box-shadow: 0 0 12px rgba(202, 138, 4, 0.6);
	animation: none;
}

.map-pin__label {
	font-family: 'Caveat', cursive;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--wp--preset--color--gold, #CA8A04);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 6px rgba(0, 0, 0, 0.2);
	white-space: nowrap;
	pointer-events: none;
}

@keyframes pin-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(202, 138, 4, 0.4); }
	50% { box-shadow: 0 0 0 8px rgba(202, 138, 4, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.map-pin::before { animation: none; }
}

/* Inline pin gallery */
.pin-gallery {
	margin-top: 1.5rem;
	background: rgba(127, 182, 158, 0.18);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(127, 182, 158, 0.35);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(26, 18, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
	animation: gallery-open 250ms ease forwards;
}

@keyframes gallery-open {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.pin-gallery[hidden] { display: none; }

.pin-gallery__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid rgba(127, 182, 158, 0.3);
}

.pin-gallery__title {
	font-family: 'Caveat', cursive;
	font-size: 1.6rem;
	color: var(--wp--preset--color--gold, #CA8A04);
	margin: 0;
	letter-spacing: 0.02em;
	text-shadow: 0 1px 3px rgba(26, 18, 11, 0.6), 0 2px 8px rgba(26, 18, 11, 0.4);
}

.pin-gallery__close {
	background: none;
	border: none;
	font-size: 1.75rem;
	color: rgba(245, 240, 225, 0.7);
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	line-height: 1;
	transition: color 200ms ease;
}

.pin-gallery__close:hover {
	color: var(--wp--preset--color--gold, #CA8A04);
}

.pin-gallery__carousel {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1.25rem 1.5rem;
}

.pin-gallery__prev,
.pin-gallery__next {
	background: rgba(127, 182, 158, 0.25);
	border: 1px solid rgba(127, 182, 158, 0.4);
	color: var(--wp--preset--color--cream, #F5F0E1);
	font-size: 1.25rem;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 200ms ease, border-color 200ms ease;
}

.pin-gallery__prev:hover,
.pin-gallery__next:hover {
	background: rgba(202, 138, 4, 0.3);
	border-color: var(--wp--preset--color--gold, #CA8A04);
}

.pin-gallery__media {
	flex: 1;
	min-width: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 8px;
	overflow: hidden;
	background-color: rgba(26, 18, 11, 0.4);
	box-shadow: 0 2px 12px rgba(26, 18, 11, 0.3);
}

.pin-gallery__video,
.pin-gallery__image {
	width: 100%;
	max-height: 500px;
	object-fit: contain;
	display: block;
}

.pin-gallery__dots {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	padding: 0 1.5rem 1.25rem;
}

.pin-gallery__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: rgba(127, 182, 158, 0.4);
	border: 1px solid rgba(127, 182, 158, 0.6);
	cursor: pointer;
	padding: 0;
	transition: background-color 200ms ease, transform 200ms ease;
}

.pin-gallery__dot--active {
	background-color: var(--wp--preset--color--gold, #CA8A04);
	border-color: var(--wp--preset--color--gold, #CA8A04);
	transform: scale(1.3);
}

@media (max-width: 768px) {
	.map-pin__label { font-size: 0.85rem; }
	.map-pin::before { width: 12px; height: 12px; border-width: 2px; }
	.pin-gallery__carousel { flex-direction: column; padding: 1rem; }
	.pin-gallery__video, .pin-gallery__image { max-height: 300px; }
}


/* ==========================================================================
   12. SINGLE CHAPTER — Hero + Floating Reading Card
   ========================================================================== */

/* Chapter hero — featured image with overlay + wave mask */
.chapter-hero {
	position: relative;
	overflow: hidden;
	min-height: 50vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background-color: #1A120B;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 960' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L1440,0 L1440,840 C1200,870 960,980 720,920 C480,860 240,940 0,840 Z' fill='white'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 960' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L1440,0 L1440,840 C1200,870 960,980 720,920 C480,860 240,940 0,840 Z' fill='white'/%3E%3C/svg%3E");
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	margin-bottom: -2px;
}

/* Hide featured image — solid teak background is used instead */
.chapter-hero__image {
	display: none;
}

/* Hide overlay — not needed without an image */
.chapter-hero__overlay {
	display: none;
}

/* Hero text content */
.chapter-hero__content {
	position: relative;
	z-index: 2;
	max-width: 680px;
	padding: 5rem 1.5rem 8rem;
}

.chapter-hero__number {
	display: block;
	font-family: 'Caveat', cursive;
	font-size: 1.25rem;
	color: var(--wp--preset--color--deck-light, #E8C9A0);
	opacity: 0.8;
	margin-bottom: 0.5rem;
}

.chapter-hero__title {
	color: var(--wp--preset--color--gold, #CA8A04);
	font-size: clamp(2rem, 5vw, 3.5rem);
	margin-bottom: 0.75rem;
}

.chapter-hero__subtitle {
	font-size: 1.2rem;
	color: var(--wp--preset--color--deck-light, #E8C9A0);
	font-style: italic;
	line-height: 1.6;
	margin-bottom: 1rem;
}

.chapter-hero__meta {
	font-family: 'Caveat', cursive;
	font-size: 1.1rem;
	color: var(--wp--preset--color--deck-light, #E8C9A0);
	opacity: 0.7;
}

.chapter-hero__meta span {
	margin: 0 0.35rem;
}

/* Floating cream reading card */
.chapter-card-wrapper {
	max-width: 850px;
	margin: -2rem auto 4rem;
	padding: 0 1.5rem;
}

.chapter-reading-card {
	background-color: var(--wp--preset--color--reading-bg, #F5F0E1);
	color: var(--wp--preset--color--reading-text, #3E2723);
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 12px 48px rgba(0, 0, 0, 0.08);
	padding: 3rem 3rem 2rem;
	position: relative;
}

/* Mood color accent bar at top of card */
.chapter-reading-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 2rem;
	right: 2rem;
	height: 4px;
	background-color: var(--chapter-mood, var(--wp--preset--color--brass, #CA8A04));
	border-radius: 0 0 2px 2px;
}

/* Featured pullquote */
.chapter-pullquote {
	max-width: 600px;
	margin: 0 auto 2.5rem;
	padding: 1.5rem 0;
	border: none;
	border-top: 2px solid var(--wp--preset--color--brass, #CA8A04);
	border-bottom: 2px solid var(--wp--preset--color--brass, #CA8A04);
	text-align: center;
}

.chapter-pullquote p {
	font-family: 'Lora', serif;
	font-size: clamp(1.1rem, 2.5vw, 1.35rem);
	font-style: italic;
	color: var(--wp--preset--color--teak, #3E2723);
	line-height: 1.7;
	margin: 0;
}

/* Chapter content area inside the card */
.chapter-reading-card .entry-content {
	max-width: 680px;
	margin: 0 auto;
	padding: 0 0 2rem;
	color: var(--wp--preset--color--reading-text, #3E2723);
}

.chapter-reading-card .entry-content a {
	color: var(--wp--preset--color--brass, #CA8A04);
}

.chapter-reading-card .entry-content a:hover {
	color: var(--wp--preset--color--amber, #E8A030);
}

/* Chapter navigation — styled cards at bottom */
.chapter-nav {
	max-width: 680px;
	margin: 2rem auto 0;
	padding-top: 2rem;
	border-top: 1px solid rgba(62, 39, 35, 0.15);
}

.chapter-nav__links {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
}

.chapter-nav__link {
	display: block;
	flex: 1;
	padding: 1.25rem 1.5rem;
	background-color: rgba(127, 182, 158, 0.15);
	border-radius: 8px;
	text-decoration: none;
	transition: background-color 250ms ease, transform 250ms ease;
}

.chapter-nav__link:hover {
	background-color: rgba(127, 182, 158, 0.3);
	transform: translateY(-2px);
}

.chapter-nav__link--next {
	text-align: right;
}

.chapter-nav__direction {
	display: block;
	font-family: 'Caveat', cursive;
	font-size: 0.9rem;
	color: var(--wp--preset--color--sage, #5A9178);
	margin-bottom: 0.25rem;
}

.chapter-nav__name {
	display: block;
	font-family: 'Lora', serif;
	font-weight: 600;
	font-size: 1.1rem;
	color: var(--wp--preset--color--brass, #CA8A04);
}

.chapter-nav__link:hover .chapter-nav__name {
	color: var(--wp--preset--color--amber, #E8A030);
}

@media (max-width: 768px) {
	.chapter-hero__content {
		padding: 4rem 1.5rem 6rem;
	}

	.chapter-reading-card {
		padding: 2rem 1.5rem 1.5rem;
	}

	.chapter-card-wrapper {
		padding: 0 0.75rem;
	}

	.chapter-nav__links {
		flex-direction: column;
	}

	.chapter-nav__link--next {
		text-align: left;
	}
}


/* ==========================================================================
   13. ARCHIVE HEADER
   ========================================================================== */

.archive-header {
	max-width: 680px;
	margin: 3rem auto 2rem;
	text-align: center;
}

.archive-header__title {
	color: var(--wp--preset--color--gold);
	margin-bottom: 0.75rem;
}

.archive-header__description {
	font-family: 'Caveat', cursive;
	font-size: 1.15rem;
	color: var(--wp--preset--color--teak);
}


/* ==========================================================================
   14. PAGE HEADER
   ========================================================================== */

.page-header {
	max-width: 680px;
	margin: 3rem auto 2rem;
}

.page-header__title {
	text-align: center;
	color: var(--wp--preset--color--gold);
}


/* ==========================================================================
   15. 404 PAGE
   ========================================================================== */

.error-404 {
	max-width: 680px;
	margin: 0 auto;
	padding: 6rem 1.5rem;
	text-align: center;
}

.error-404__title {
	font-size: clamp(2rem, 5vw, 3rem);
	margin-bottom: 1rem;
	color: var(--wp--preset--color--gold);
}

.error-404__message {
	font-size: 1.1rem;
	margin-bottom: 2rem;
	color: var(--wp--preset--color--teak);
}

.error-404__home-link {
	display: inline-block;
	padding: 0.75rem 2rem;
	background-color: var(--wp--preset--color--brass);
	color: var(--wp--preset--color--teak-dark);
	font-weight: 600;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 200ms ease;
}

.error-404__home-link:hover {
	background-color: var(--wp--preset--color--amber);
	color: var(--wp--preset--color--teak-dark);
}

.error-404__search {
	margin-top: 3rem;
}

.error-404__search p {
	margin-bottom: 1rem;
	color: var(--wp--preset--color--teak);
}

/* Search form styling */
.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 400px;
	margin: 0 auto;
}

.search-form .search-field {
	flex: 1;
	padding: 0.6rem 1rem;
	border: 1px solid var(--wp--preset--color--sage);
	border-radius: 4px;
	font-family: inherit;
	font-size: 1rem;
	background-color: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--teak);
}

.search-form .search-field:focus {
	border-color: var(--wp--preset--color--brass);
	outline: none;
	box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.2);
}

.search-form .search-submit {
	padding: 0.6rem 1.25rem;
	background-color: var(--wp--preset--color--brass);
	color: var(--wp--preset--color--teak-dark);
	border: none;
	border-radius: 4px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 200ms ease;
}

.search-form .search-submit:hover {
	background-color: var(--wp--preset--color--amber);
}


/* ==========================================================================
   16. FOOTER
   ========================================================================== */

.site-footer {
	border-top: none;
	background-color: #1A120B;
	color: var(--wp--preset--color--deck-light);
	margin-top: 0;
}

/* Front page: CTA section abuts footer, no extra margin */
.site-main--front-page + .site-footer {
	margin-top: 0;
}

.site-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem;
	text-align: center;
}

.footer-navigation {
	margin-bottom: 1.5rem;
}

.footer-navigation ul {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.footer-navigation a {
	font-size: 0.85rem;
	color: var(--wp--preset--color--deck-light);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: color 200ms ease;
}

.footer-navigation a:hover {
	color: var(--wp--preset--color--brass);
}

.site-footer__copyright {
	font-size: 0.8rem;
	color: var(--wp--preset--color--teak-light);
}


/* ==========================================================================
   17. WIDGET AREA / SIDEBAR
   ========================================================================== */

.widget-area {
	padding: 2rem 0;
}

.widget-area .widget {
	margin-bottom: 2rem;
}

.widget-area .widget-title {
	font-size: 1rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--wp--preset--color--brass);
}


/* ==========================================================================
   18. JOURNEY SECTIONS (Front Page — Stats + Map)
   ========================================================================== */

.journey-section {
	padding: 3rem 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
}

.journey-section--stats {
	text-align: center;
}

.journey-section--map {
	padding-top: 2rem;
	padding-bottom: 4rem;
}

.journey-section__heading {
	text-align: center;
	margin-bottom: 2rem;
	font-size: clamp(1.5rem, 3.5vw, 2.25rem);
	color: var(--wp--preset--color--gold);
}

.journey-section__inner {
	max-width: 1200px;
	margin: 0 auto;
}


/* ==========================================================================
   19. CLOSING CTA (Front Page)
   ========================================================================== */

.closing-cta {
	padding: 5rem 1.5rem;
	text-align: center;
}

.closing-cta__inner {
	max-width: 680px;
	margin: 0 auto;
}

.closing-cta__text {
	font-family: 'Lora', serif;
	font-size: clamp(1.5rem, 3.5vw, 2rem);
	color: var(--wp--preset--color--gold);
	margin-bottom: 1.5rem;
	line-height: 1.4;
}

.closing-cta__link {
	display: inline-block;
	padding: 0.85rem 2.5rem;
	background-color: var(--wp--preset--color--brass);
	color: var(--wp--preset--color--teak-dark);
	font-weight: 600;
	font-size: 1.05rem;
	text-decoration: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 250ms ease, transform 250ms ease;
}

.closing-cta__link:hover {
	background-color: var(--wp--preset--color--amber);
	color: var(--wp--preset--color--teak-dark);
	transform: translateY(-2px);
}

.closing-cta__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--amber);
	outline-offset: 2px;
}


/* ==========================================================================
   20. RESPONSIVE — Mobile first, breakpoints at 768px and 1024px
   ========================================================================== */

/* -- Navigation styles shared across all breakpoints -- */
.main-navigation li {
	border-bottom: 1px solid var(--wp--preset--color--teak-light);
}

.main-navigation li:last-child {
	border-bottom: none;
}

.main-navigation a {
	display: block;
	padding: 0.85rem 0;
	color: var(--wp--preset--color--deck-light);
	font-size: 1rem;
}

.main-navigation .current-menu-item > a {
	color: var(--wp--preset--color--brass);
}

/* Prevent body scroll while mobile menu is open */
body.nav-open {
	overflow: hidden;
}

/* -- Mobile-only overrides -- */
@media (max-width: 767px) {
	/* Show hamburger on mobile */
	.menu-toggle {
		display: flex;
	}

	/* Reduce the hero bottom padding so the wave doesn't eat half the screen */
	.hero--video {
		padding-bottom: 100px;
	}

	/* Expand map pin tap targets to WCAG 44×44px minimum */
	.map-pin {
		min-width: 44px;
		min-height: 44px;
		justify-content: center;
	}

	/* Both chapter-nav buttons should align left when stacked */
	.chapter-nav__link--prev,
	.chapter-nav__link--next {
		text-align: left;
	}
}

/* -- Tablet: 2-column chapter grid -- */
@media (min-width: 768px) {
	.chapters-grid__inner {
		grid-template-columns: repeat(2, 1fr);
	}

	.chapter-navigation .nav-links {
		flex-direction: row;
	}
}

/* -- Desktop: wider hero, enhanced spacing -- */
@media (min-width: 1024px) {
	.hero {
		padding: 8rem 1.5rem 6rem;
	}
}
