/*
Theme Name: Sage Route Atlas
Author: Maren Cole
Description: A classic WordPress atlas-style editorial theme with dynamic category routes and bundled fallback imagery.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: otp-theme
*/

:root {
	--otp-cream: #fbf4e8;
	--otp-cream-deep: #f1e2ca;
	--otp-green-900: #2a3f2d;
	--otp-green-700: #2c4530;
	--otp-green-500: #4f5b51;
	--otp-lime: #a2de64;
	--otp-lime-soft: #dff4be;
	--otp-orange: #ff8a4a;
	--otp-orange-soft: #ffce98;
	--otp-white: #fffef9;
	--otp-ink: #172016;
	--otp-muted: #6f796f;
	--otp-line: rgba(42, 63, 45, 0.16);
	--otp-shadow: 0 18px 45px rgba(42, 63, 45, 0.14);
	--otp-radius: 8px;
	--otp-wide: 1180px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--otp-cream);
	color: var(--otp-ink);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	text-rendering: optimizeLegibility;
}

body::before {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	content: "";
	background-image:
		linear-gradient(rgba(42, 63, 45, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(42, 63, 45, 0.03) 1px, transparent 1px);
	background-size: 44px 44px;
}

a {
	color: inherit;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

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

button,
input,
textarea,
select {
	font: inherit;
}

.otp-page {
	min-height: 100vh;
	overflow: hidden;
}

.otp-screen-reader-text,
.otp-skip-link {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.otp-skip-link:focus {
	top: 12px;
	left: 12px;
	z-index: 1000;
	width: auto;
	height: auto;
	padding: 10px 14px;
	overflow: visible;
	clip: auto;
	color: var(--otp-white);
	background: var(--otp-green-900);
	border-radius: var(--otp-radius);
}

.otp-site-header {
	width: min(calc(100% - 24px), var(--otp-wide));
	margin: 12px auto 0;
}

.otp-nav {
	position: relative;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 66px;
	padding: 10px 12px 10px 16px;
	color: var(--otp-white);
	background: var(--otp-green-900);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	box-shadow: var(--otp-shadow);
}

.otp-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	max-width: calc(100% - 72px);
	color: var(--otp-white);
	font-weight: 800;
	text-decoration: none;
}

.otp-brand-mark {
	display: inline-grid;
	width: 42px;
	height: 42px;
	place-items: center;
	color: var(--otp-green-900);
	background: var(--otp-lime);
	border-radius: 50%;
	font-size: 0.86rem;
	font-weight: 900;
}

.otp-brand-logo {
	display: inline-flex;
	max-width: 48px;
	max-height: 48px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--otp-white);
}

.otp-brand-logo img {
	width: auto;
	max-height: 48px;
}

.otp-brand-text {
	display: inline-block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 1rem;
}

.otp-menu-toggle {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.otp-menu-button {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 46px;
	height: 46px;
	padding: 0;
	cursor: pointer;
	align-items: center;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
}

.otp-menu-line {
	width: 18px;
	height: 2px;
	background: var(--otp-white);
	border-radius: 999px;
}

.otp-nav-panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	left: 0;
	display: none;
	padding: 10px;
	background: var(--otp-green-900);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 24px;
	box-shadow: var(--otp-shadow);
}

.otp-menu-toggle:checked ~ .otp-nav-panel {
	display: block;
}

.otp-nav-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.otp-nav-link {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 13px;
	color: rgba(255, 255, 255, 0.86);
	text-decoration: none;
	border-radius: 999px;
}

.otp-nav-link:hover,
.otp-nav-link:focus,
.otp-is-current > .otp-nav-link {
	color: var(--otp-green-900);
	background: var(--otp-lime);
	outline: none;
}

.otp-main {
	width: 100%;
}

.otp-atlas {
	width: min(calc(100% - 24px), var(--otp-wide));
	margin: 22px auto 0;
	padding: 14px;
	background: rgba(255, 254, 249, 0.44);
	border: 1px solid var(--otp-line);
	border-radius: 28px;
}

.otp-map-copy {
	padding: 18px 10px 8px;
}

.otp-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	color: var(--otp-green-500);
	font-size: 0.78rem;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0;
}

.otp-eyebrow::before {
	width: 10px;
	height: 10px;
	content: "";
	background: var(--otp-orange);
	border-radius: 50%;
	box-shadow: 0 0 0 5px rgba(255, 138, 74, 0.17);
}

.otp-atlas-title,
.otp-archive-title,
.otp-itinerary-heading h2,
.otp-single-title {
	margin: 0;
	color: var(--otp-green-900);
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: 0;
}

.otp-atlas-title {
	max-width: 760px;
	font-size: 3rem;
}

.otp-atlas-summary {
	max-width: 620px;
	margin: 18px 0 0;
	color: var(--otp-green-500);
	font-size: 1.02rem;
}

.otp-route-button,
.otp-card-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 20px;
	padding: 10px 16px;
	color: var(--otp-white);
	font-weight: 800;
	text-decoration: none;
	background: var(--otp-green-900);
	border: 1px solid var(--otp-green-900);
	border-radius: 999px;
}

.otp-route-button:hover,
.otp-route-button:focus,
.otp-card-link:hover,
.otp-card-link:focus {
	color: var(--otp-green-900);
	background: var(--otp-lime);
	outline: none;
}

.otp-map-board {
	position: relative;
	display: grid;
	gap: 14px;
	min-height: 620px;
	padding: 14px;
	overflow: hidden;
	background:
		radial-gradient(circle at 16px 16px, rgba(42, 63, 45, 0.13) 1.4px, transparent 1.8px),
		var(--otp-cream-deep);
	background-size: 28px 28px, auto;
	border: 1px solid rgba(42, 63, 45, 0.12);
	border-radius: 22px;
}

.otp-route-svg {
	display: none;
}

.otp-ticket {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px;
	color: var(--otp-green-900);
	text-decoration: none;
	background: var(--otp-lime);
	border: 2px dashed rgba(42, 63, 45, 0.28);
	border-radius: var(--otp-radius);
	box-shadow: 0 16px 28px rgba(42, 63, 45, 0.16);
}

.otp-ticket-kicker,
.otp-ticket-date {
	font-size: 0.78rem;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0;
}

.otp-ticket-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.45rem;
	line-height: 1.08;
}

.otp-map-stop {
	position: relative;
	display: grid;
	gap: 8px;
	padding: 8px;
	color: var(--otp-green-900);
	text-decoration: none;
	background: var(--otp-white);
	border: 1px solid rgba(42, 63, 45, 0.13);
	border-radius: var(--otp-radius);
	box-shadow: 0 12px 26px rgba(42, 63, 45, 0.12);
}

.otp-map-stop:hover,
.otp-map-stop:focus {
	transform: translateY(-2px);
	outline: none;
}

.otp-map-stop-image {
	width: 100%;
	aspect-ratio: 1.25 / 1;
	object-fit: cover;
	border-radius: 6px;
}

.otp-map-stop-title {
	font-size: 0.9rem;
	font-weight: 900;
	line-height: 1.2;
}

.otp-map-stop-chip,
.otp-tag-chip,
.otp-category-chip,
.otp-card-category,
.otp-single-category,
.otp-footer-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 5px 10px;
	font-size: 0.78rem;
	font-weight: 900;
	line-height: 1;
	text-decoration: none;
	border-radius: 999px;
}

.otp-map-stop-chip {
	justify-self: start;
	color: var(--otp-green-900);
	background: var(--otp-orange-soft);
}

.otp-floating-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.otp-tag-chip {
	color: var(--otp-green-900);
	background: var(--otp-white);
	border: 1px solid rgba(42, 63, 45, 0.15);
}

.otp-tag-chip:hover,
.otp-tag-chip:focus,
.otp-category-chip:hover,
.otp-category-chip:focus,
.otp-card-category:hover,
.otp-card-category:focus,
.otp-single-category:hover,
.otp-single-category:focus,
.otp-footer-chip:hover,
.otp-footer-chip:focus {
	color: var(--otp-green-900);
	background: var(--otp-lime);
	outline: none;
}

.otp-category-route {
	width: min(calc(100% - 24px), var(--otp-wide));
	margin: 18px auto 0;
	padding: 14px;
	background: var(--otp-green-900);
	border-radius: 999px;
	box-shadow: var(--otp-shadow);
}

.otp-category-route-label {
	display: block;
	margin: 0 0 10px;
	color: rgba(255, 255, 255, 0.66);
	font-size: 0.78rem;
	font-weight: 900;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0;
}

.otp-category-track {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: thin;
}

.otp-category-chip {
	flex: 0 0 auto;
	gap: 8px;
	color: var(--otp-white);
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.13);
}

.otp-category-chip-current {
	color: var(--otp-green-900);
	background: var(--otp-lime);
}

.otp-category-dot {
	width: 8px;
	height: 8px;
	background: var(--otp-orange);
	border-radius: 50%;
}

.otp-category-chip small {
	color: inherit;
	opacity: 0.68;
}

.otp-archive-hero {
	width: min(calc(100% - 24px), var(--otp-wide));
	margin: 22px auto 0;
	padding: 28px 20px;
	background: var(--otp-white);
	border: 1px solid var(--otp-line);
	border-radius: 28px;
	box-shadow: var(--otp-shadow);
}

.otp-archive-title {
	font-size: 2.55rem;
}

.otp-archive-description {
	max-width: 720px;
	margin-top: 14px;
	color: var(--otp-muted);
}

.otp-itinerary {
	width: min(calc(100% - 24px), var(--otp-wide));
	margin: 34px auto 64px;
}

.otp-itinerary-heading {
	display: grid;
	gap: 6px;
	margin-bottom: 18px;
}

.otp-itinerary-heading h2 {
	font-size: 2.4rem;
}

.otp-itinerary-grid {
	display: grid;
	gap: 14px;
}

.otp-itinerary-card {
	display: grid;
	overflow: hidden;
	background: var(--otp-white);
	border: 1px solid rgba(42, 63, 45, 0.13);
	border-radius: var(--otp-radius);
	box-shadow: 0 14px 34px rgba(42, 63, 45, 0.1);
}

.otp-card-image-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.otp-card-image {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.otp-card-content {
	display: grid;
	gap: 12px;
	padding: 16px;
}

.otp-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: var(--otp-muted);
	font-size: 0.82rem;
	font-weight: 800;
}

.otp-card-category,
.otp-single-category,
.otp-footer-chip {
	color: var(--otp-green-900);
	background: var(--otp-lime-soft);
}

.otp-card-title {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.42rem;
	line-height: 1.12;
	letter-spacing: 0;
}

.otp-card-title a {
	text-decoration: none;
}

.otp-card-title a:hover,
.otp-card-title a:focus {
	color: var(--otp-green-500);
	outline: none;
}

.otp-card-excerpt {
	color: var(--otp-green-500);
}

.otp-card-excerpt p {
	margin: 0;
}

.otp-card-link {
	justify-self: start;
	margin-top: 0;
}

.otp-empty-state {
	padding: 32px;
	background: var(--otp-white);
	border: 1px solid var(--otp-line);
	border-radius: var(--otp-radius);
}

.otp-single-shell {
	width: 80vw;
	max-width: 940px;
	margin: 34px auto 68px;
}

.otp-single-header {
	padding: 26px 0 22px;
	border-bottom: 1px solid var(--otp-line);
}

.otp-single-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.otp-single-date {
	margin: 0 0 10px;
	color: var(--otp-muted);
	font-size: 0.9rem;
	font-weight: 800;
}

.otp-single-title {
	font-size: 2.7rem;
}

.otp-single-excerpt {
	max-width: 680px;
	margin: 18px 0 0;
	color: var(--otp-green-500);
	font-size: 1.12rem;
}

.otp-single-content {
	padding: 26px 0 0;
	color: var(--otp-ink);
}

.otp-single-content > * {
	max-width: 100%;
}

.otp-single-content p,
.otp-single-content ul,
.otp-single-content ol {
	margin-top: 0;
	margin-bottom: 1.25em;
}

.otp-single-content h2,
.otp-single-content h3,
.otp-single-content h4 {
	margin-top: 1.8em;
	color: var(--otp-green-900);
	line-height: 1.18;
	letter-spacing: 0;
}

.otp-single-content blockquote {
	margin: 28px 0;
	padding: 18px 20px;
	color: var(--otp-green-900);
	background: var(--otp-lime-soft);
	border-left: 5px solid var(--otp-lime);
	border-radius: var(--otp-radius);
}

.otp-single-content img {
	border-radius: var(--otp-radius);
}

.otp-page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 24px;
}

.otp-single-footer {
	margin-top: 34px;
	padding-top: 24px;
	border-top: 1px solid var(--otp-line);
}

.otp-post-nav-links {
	display: grid;
	gap: 12px;
}

.otp-post-nav-card {
	display: grid;
	gap: 4px;
	padding: 16px;
	color: var(--otp-green-900);
	text-decoration: none;
	background: var(--otp-white);
	border: 1px solid var(--otp-line);
	border-radius: var(--otp-radius);
}

.otp-post-nav-label {
	color: var(--otp-muted);
	font-size: 0.76rem;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0;
}

.otp-post-nav-title {
	font-weight: 900;
}

.otp-site-footer {
	width: min(calc(100% - 24px), var(--otp-wide));
	margin: 0 auto 20px;
}

.otp-footer-board {
	display: grid;
	gap: 20px;
	padding: 22px;
	color: var(--otp-white);
	background: var(--otp-green-900);
	border-radius: 26px;
}

.otp-footer-kicker {
	margin: 0 0 6px;
	color: var(--otp-lime);
	font-size: 0.78rem;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0;
}

.otp-footer-title {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.8rem;
	font-weight: 800;
	line-height: 1;
}

.otp-footer-text {
	max-width: 560px;
	margin: 10px 0 0;
	color: rgba(255, 255, 255, 0.72);
}

.otp-footer-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-content: start;
}

.otp-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	width: min(calc(100% - 24px), var(--otp-wide));
	margin: -34px auto 60px;
}

.otp-page-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 8px 12px;
	color: var(--otp-green-900);
	text-decoration: none;
	background: var(--otp-white);
	border: 1px solid var(--otp-line);
	border-radius: 999px;
}

.otp-page-number-current {
	background: var(--otp-lime);
}

@media (min-width: 760px) {
	.otp-site-header {
		margin-top: 22px;
	}

	.otp-nav {
		padding: 10px 14px 10px 18px;
	}

	.otp-menu-button {
		display: none;
	}

	.otp-nav-panel {
		position: static;
		display: block;
		width: auto;
		padding: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
	}

	.otp-nav-list {
		flex-direction: row;
		align-items: center;
		gap: 4px;
	}

	.otp-nav-link {
		min-height: 42px;
		padding: 9px 13px;
	}

	.otp-atlas {
		margin-top: 28px;
		padding: 20px;
	}

	.otp-atlas-title {
		font-size: 4.6rem;
	}

	.otp-map-board {
		min-height: 720px;
	}

	.otp-itinerary-grid {
		grid-template-columns: 1.12fr 0.88fr;
		align-items: stretch;
	}

	.otp-itinerary-card-featured {
		grid-row: span 3;
	}

	.otp-itinerary-card-featured .otp-card-image {
		aspect-ratio: 4 / 3;
	}

	.otp-itinerary-card:not(.otp-itinerary-card-featured) {
		grid-template-columns: 150px 1fr;
	}

	.otp-itinerary-card:not(.otp-itinerary-card-featured) .otp-card-image {
		height: 100%;
		min-height: 190px;
		aspect-ratio: auto;
	}

	.otp-archive-title,
	.otp-single-title {
		font-size: 4rem;
	}

	.otp-post-nav-links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.otp-footer-board {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
	}
}

@media (min-width: 1040px) {
	.otp-atlas {
		display: grid;
		grid-template-columns: 0.72fr 1.28fr;
		gap: 20px;
		align-items: stretch;
		min-height: 740px;
	}

	.otp-map-copy {
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 36px 8px 36px 18px;
	}

	.otp-atlas-title {
		font-size: 5.55rem;
	}

	.otp-map-board {
		min-height: 700px;
	}

	.otp-route-svg {
		position: absolute;
		inset: 52px 24px 24px 20px;
		display: block;
		width: calc(100% - 44px);
		height: calc(100% - 76px);
		pointer-events: none;
	}

	.otp-route-path {
		fill: none;
		stroke: var(--otp-green-900);
		stroke-width: 4;
		stroke-dasharray: 11 13;
		stroke-linecap: round;
		opacity: 0.48;
	}

	.otp-route-dot {
		fill: var(--otp-orange);
		stroke: var(--otp-white);
		stroke-width: 4;
	}

	.otp-ticket {
		position: absolute;
		z-index: 5;
		top: 286px;
		left: 244px;
		width: 260px;
		transform: rotate(-4deg);
	}

	.otp-map-stop {
		position: absolute;
		z-index: 4;
		width: 210px;
		transition: transform 180ms ease;
	}

	.otp-stop-1 {
		top: 36px;
		right: 34px;
		width: 238px;
		transform: rotate(3deg);
	}

	.otp-stop-2 {
		top: 100px;
		left: 32px;
		width: 216px;
		transform: rotate(-4deg);
	}

	.otp-stop-3 {
		right: 166px;
		bottom: 34px;
		width: 236px;
		transform: rotate(5deg);
	}

	.otp-stop-4 {
		right: 18px;
		bottom: 198px;
		width: 186px;
		transform: rotate(-3deg);
	}

	.otp-stop-5 {
		left: 72px;
		bottom: 52px;
		width: 192px;
		transform: rotate(4deg);
	}

	.otp-stop-1:hover,
	.otp-stop-1:focus,
	.otp-stop-2:hover,
	.otp-stop-2:focus,
	.otp-stop-3:hover,
	.otp-stop-3:focus,
	.otp-stop-4:hover,
	.otp-stop-4:focus,
	.otp-stop-5:hover,
	.otp-stop-5:focus {
		transform: translateY(-4px) rotate(0deg);
	}

	.otp-floating-tags {
		position: absolute;
		z-index: 6;
		top: 228px;
		left: 30px;
		max-width: 240px;
		transform: rotate(2deg);
	}
}

@media (max-width: 420px) {
	.otp-atlas-title {
		font-size: 2.55rem;
	}

	.otp-map-board {
		min-height: auto;
	}

	.otp-category-route {
		border-radius: 24px;
	}

	.otp-single-shell {
		width: 80vw;
	}

	.otp-single-title {
		font-size: 2.28rem;
	}
}
