/*
Theme Name: Elsewhere Journal
Description: An editorial travel journal theme for stories about places, people, and the journey between them.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: elsewhere-journal
*/

:root {
	--color-ink: #20302b;
	--color-muted: #68756e;
	--color-paper: #f7f6f1;
	--color-white: #fff;
	--color-accent: #bb5c3b;
	--color-line: #e2e4dc;
	--font-display: Georgia, "Times New Roman", serif;
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--content-width: 1160px;
	--header-title-font: var(--font-display);
	--header-title-color: var(--color-ink);
	--header-title-size: 25px;
	--header-title-weight: 400;
	--header-title-style: normal;
	--color-content-panel: var(--color-white);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--color-paper);
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
}

a {
	color: inherit;
}

a:hover {
	color: var(--color-accent);
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

:focus-visible {
	outline: 3px solid var(--color-accent);
	outline-offset: 4px;
}

.site-header {
	position: relative;
	z-index: 2;
	background: transparent;
}

.site-header__inner,
.site-footer__inner,
.page-content {
	width: min(var(--content-width), calc(100% - 48px));
	margin-inline: auto;
}

.site-header__inner {
	display: flex;
	min-height: 94px;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	border-bottom: 1px solid var(--color-line);
}

.site-branding {
	min-width: 0;
}

.site-title {
	margin: 0;
	color: var(--header-title-color);
	font-family: var(--header-title-font);
	font-size: var(--header-title-size);
	font-style: var(--header-title-style);
	font-weight: var(--header-title-weight);
	letter-spacing: -0.035em;
	line-height: 1.1;
}

.site-title a {
	color: inherit;
	text-decoration: none;
}

.site-title a:hover {
	color: var(--header-title-color);
}

.custom-logo-link {
	display: block;
	line-height: 0;
}

.custom-logo {
	display: block;
	width: auto;
	max-width: min(360px, 100%);
	max-height: 76px;
	object-fit: contain;
}

.site-description {
	margin: 7px 0 0;
	color: var(--color-muted);
	font-size: 12px;
	letter-spacing: 0.035em;
}

.primary-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-navigation a {
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.skip-link {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 10;
	padding: 10px 14px;
	transform: translateY(-160%);
	background: var(--color-white);
}

.skip-link:focus {
	transform: translateY(0);
}

.page-content {
	position: relative;
	padding: 40px 48px 88px;
	background: var(--color-content-panel);
	box-shadow: 0 12px 34px rgb(23 35 29 / 13%);
}

.section-kicker {
	margin: 0 0 9px;
	color: var(--color-accent);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.section-heading {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(29px, 4vw, 42px);
	font-weight: 400;
	letter-spacing: -0.04em;
	line-height: 1.12;
}

.featured-section {
	margin-bottom: 66px;
}

.featured-section__heading {
	margin-bottom: 22px;
}

.featured-carousel {
	position: relative;
	overflow: hidden;
	min-height: clamp(390px, 48vw, 570px);
	background: #34443d;
	color: var(--color-white);
}

.featured-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: clamp(28px, 6vw, 72px);
	background-color: #34443d;
	background-position: center;
	background-size: cover;
}

.featured-slide[hidden] {
	display: none;
}

.featured-slide::before {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgb(15 25 21 / 74%) 0%, rgb(15 25 21 / 45%) 55%, rgb(15 25 21 / 8%) 100%),
		linear-gradient(0deg, rgb(15 25 21 / 34%), transparent 58%);
	content: "";
	pointer-events: none;
}

.featured-slide__image-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.featured-slide__content {
	position: relative;
	z-index: 2;
	width: min(660px, 100%);
}

.featured-slide__eyebrow {
	margin: 0 0 14px;
	color: #f0c4a8;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

.featured-slide__title {
	max-width: 760px;
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(38px, 7vw, 76px);
	font-weight: 400;
	letter-spacing: -0.045em;
	line-height: 0.98;
}

.featured-slide__title a {
	text-decoration: none;
}

.featured-slide__title a:hover {
	color: #f0c4a8;
}

.featured-slide__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin-top: 22px;
	color: rgb(255 255 255 / 88%);
	font-size: 13px;
}

.featured-slide .post-byline__in {
	color: #f0c4a8;
}

.featured-slide .post-byline__categories a {
	color: var(--color-white);
	text-decoration: underline;
	text-decoration-color: rgb(255 255 255 / 55%);
	text-underline-offset: 3px;
}

.featured-slide > .post-tags--overlay {
	bottom: 24px;
	left: clamp(28px, 6vw, 72px);
	z-index: 3;
}

.post-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 7px 14px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.post-categories a {
	color: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-decoration: none;
	text-transform: uppercase;
}

.post-categories a:hover {
	color: #f0c4a8;
}

.featured-carousel__controls {
	position: absolute;
	right: 24px;
	bottom: 24px;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 8px;
}

.featured-carousel__arrow,
.featured-carousel__dot {
	display: grid;
	width: 40px;
	height: 40px;
	place-items: center;
	border: 1px solid rgb(255 255 255 / 55%);
	border-radius: 50%;
	background: rgb(20 30 26 / 30%);
	color: var(--color-white);
	cursor: pointer;
}

.featured-carousel__arrow {
	font-size: 19px;
	line-height: 1;
}

.featured-carousel__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	background: rgb(255 255 255 / 48%);
}

.featured-carousel__dot[aria-current="true"] {
	background: var(--color-white);
}

.featured-carousel__arrow:hover,
.featured-carousel__dot:hover {
	background: var(--color-accent);
}

.journal-section__heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 9px;
}

.journal-count {
	margin: 0 0 4px;
	color: var(--color-muted);
	font-size: 12px;
}

.post-list {
	border-top: 1px solid var(--color-line);
}

.post-card {
	display: grid;
	grid-template-columns: minmax(160px, 0.7fr) minmax(0, 2.6fr);
	gap: clamp(24px, 5vw, 58px);
	padding: 27px 0;
	border-bottom: 1px solid var(--color-line);
}

.post-card__image-wrap {
	position: relative;
	min-width: 0;
}

.post-card__image-link {
	position: relative;
	z-index: 1;
	display: block;
	overflow: hidden;
	height: 170px;
	background: #e4e6dc;
}

.post-card__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: cover;
	transition: transform 350ms ease;
}

.post-card__image-link:hover .post-card__image {
	transform: scale(1.035);
}

.post-card__image-placeholder {
	display: grid;
	width: 100%;
	height: 100%;
	min-height: 0;
	place-items: center;
	background: linear-gradient(145deg, #d9e0d6, #ebdfcf);
	color: #78877b;
	font-family: var(--font-display);
	font-size: 30px;
	font-style: italic;
}

.post-tags--overlay {
	position: absolute;
	right: 12px;
	bottom: 12px;
	left: 12px;
	z-index: 2;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.post-tags--overlay a {
	display: inline-block;
	max-width: 100%;
	padding: 4px 8px;
	background: rgb(25 34 29 / 82%);
	color: var(--color-white);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-decoration: none;
	text-transform: uppercase;
}

.post-tags--overlay a:hover {
	background: var(--color-accent);
	color: var(--color-white);
}

.post-byline {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 5px;
}

.post-byline__lead {
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.post-byline__author a,
.post-byline__categories a {
	color: inherit;
	text-decoration: none;
}

.post-byline__in {
	color: var(--color-accent);
	font-style: italic;
	font-weight: 700;
}

.post-byline__categories a:hover,
.post-byline__author a:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.post-card__content {
	align-self: center;
	padding: 8px 0;
}

.post-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 5px 14px;
	margin-bottom: 9px;
	color: var(--color-muted);
	font-size: 12px;
}

.post-card__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(25px, 3vw, 36px);
	font-weight: 400;
	letter-spacing: -0.035em;
	line-height: 1.13;
}

.post-card__title a {
	text-decoration: none;
}

.post-card__excerpt {
	max-width: 650px;
	margin: 12px 0 0;
	color: #536159;
	font-size: 14px;
	line-height: 1.75;
}

.post-card .post-categories {
	margin-top: 15px;
}

.post-card .post-categories a {
	color: var(--color-accent);
}

.post-card .post-categories a:hover {
	color: var(--color-ink);
}

.pagination {
	margin-top: 32px;
}

.pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pagination ul.page-numbers li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pagination .page-numbers a,
.pagination .page-numbers span {
	display: inline-grid;
	min-width: 40px;
	min-height: 40px;
	place-items: center;
	padding: 0 12px;
	border: 1px solid var(--color-line);
	color: var(--color-ink);
	font-size: 13px;
	text-decoration: none;
}

.pagination .current,
.pagination a:hover {
	border-color: var(--color-ink);
	background: var(--color-ink);
	color: var(--color-white);
}

.empty-state {
	padding: 36px 0;
	color: var(--color-muted);
}

.single-story__layout {
	display: grid;
	grid-template-columns: minmax(190px, 1fr) minmax(0, 3fr);
	gap: clamp(32px, 5vw, 68px);
}

.single-story__sidebar {
	padding-right: clamp(20px, 3vw, 38px);
	border-right: 1px solid var(--color-line);
}

.single-story__author {
	margin-bottom: 27px;
}

.single-story__author-avatar {
	display: block;
	width: 88px;
	height: 88px;
	margin-bottom: 13px;
	border-radius: 50%;
	object-fit: cover;
}

.single-story__author-avatar[data-optional-avatar] {
	visibility: hidden;
}

.single-story__main {
	min-width: 0;
}

.single-story__author-name {
	margin: 0;
	font-family: var(--font-display);
	font-size: 21px;
	line-height: 1.25;
}

.single-story__date,
.single-story__taxonomy {
	margin-top: 21px;
}

.single-story__label {
	display: block;
	margin-bottom: 5px;
	color: var(--color-muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.single-story__date time {
	font-size: 13px;
}

.single-story__sidebar .post-categories,
.single-story__sidebar .post-tags {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.single-story__sidebar .post-categories a,
.single-story__sidebar .post-tags a {
	color: var(--color-accent);
	font-size: 12px;
	letter-spacing: 0.02em;
	text-transform: none;
}

.single-story__sidebar .post-tags a {
	font-weight: 600;
	text-decoration: none;
}

.single-story__header {
	margin-bottom: 29px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--color-line);
}

.single-story__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(38px, 6vw, 66px);
	font-weight: 400;
	letter-spacing: -0.045em;
	line-height: 1.02;
}

.entry-content {
	font-family: var(--font-display);
	font-size: 19px;
	line-height: 1.8;
}

.entry-content p {
	margin: 0 0 1.45em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin: 1.7em 0 0.65em;
	font-family: var(--font-display);
	font-weight: 400;
	line-height: 1.2;
}

.entry-content img,
.entry-content video,
.entry-content iframe {
	max-width: 100%;
}

.entry-content img {
	height: auto;
	cursor: zoom-in;
}

.entry-content img:focus-visible {
	outline-offset: 5px;
}

.entry-content figure {
	margin: 2em 0;
}

.entry-content figcaption {
	color: var(--color-muted);
	font-family: var(--font-body);
	font-size: 13px;
	line-height: 1.5;
}

.entry-content blockquote {
	margin: 1.8em 0;
	padding-left: 24px;
	border-left: 2px solid var(--color-accent);
	color: var(--color-muted);
	font-size: 1.12em;
}

.entry-content a {
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.single-story__footer {
	margin-top: 70px;
	padding-top: 34px;
	border-top: 1px solid var(--color-line);
}

.related-posts > .section-heading {
	margin-bottom: 22px;
	font-size: clamp(25px, 3vw, 34px);
	text-transform: uppercase;
}

.related-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.related-post__link {
	display: block;
	height: 100%;
	text-decoration: none;
}

.related-post__image {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: contain;
	background: #e4e6dc;
}

.related-post__title {
	margin: 12px 0 5px;
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
}

.related-post time {
	color: var(--color-muted);
	font-size: 12px;
}

.post-navigation {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin-top: 38px;
	padding: 24px 0;
	border-top: 1px solid var(--color-line);
	border-bottom: 1px solid var(--color-line);
}

.post-navigation__item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.post-navigation__item--next {
	text-align: right;
}

.post-navigation__item a {
	font-family: var(--font-display);
	font-size: 18px;
	text-decoration: none;
}

.comments-area {
	max-width: 850px;
	margin: 64px auto 0;
}

.comments-area > .section-heading {
	margin-bottom: 28px;
}

.comments-area__list-heading {
	margin-top: 44px;
}

.comment-list,
.comment-list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin: 22px 0 0 28px;
	padding-left: 22px;
	border-left: 1px solid var(--color-line);
}

.comment-card {
	margin-bottom: 24px;
}

.comment-card__body {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 17px;
}

.comment-card__profile {
	display: flex;
	align-items: center;
	flex-direction: column;
	gap: 7px;
}

.comment-card__avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
}

.comment-card__website {
	font-size: 10px;
	text-decoration: none;
}

.comment-card__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin-bottom: 8px;
}

.comment-card__author {
	font-size: 14px;
	font-style: normal;
	font-weight: 700;
}

.comment-card__header time {
	color: var(--color-muted);
	font-size: 11px;
}

.comment-card__text {
	font-size: 14px;
	line-height: 1.7;
}

.comment-card__text > :last-child {
	margin-bottom: 0;
}

.comment-card__moderation {
	color: var(--color-accent);
	font-size: 12px;
}

.comment-reply-link {
	display: inline-block;
	margin-top: 9px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.comment-respond {
	margin-top: 42px;
}

.comment-reply-title {
	margin: 0 0 18px;
	font-family: var(--font-display);
	font-size: 27px;
	font-weight: 400;
}

.comment-form {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.comment-form > p {
	margin: 0;
}

.comment-form .comment-notes,
.comment-form .logged-in-as,
.comment-form .comment-form-comment,
.comment-form .comment-form-cookies-consent,
.comment-form .form-submit {
	grid-column: 1 / -1;
}

.comment-form label {
	display: block;
	margin-bottom: 5px;
	font-size: 12px;
	font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--color-line);
	border-radius: 0;
	background: var(--color-white);
	color: var(--color-ink);
	font: inherit;
	font-size: 14px;
}

.comment-form textarea {
	min-height: 160px;
	resize: vertical;
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 9px;
}

.comment-form-cookies-consent input {
	margin: 4px 0 0;
}

.comment-form .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
}

.comment-form .form-submit {
	margin-top: 2px;
}

.comment-form .submit {
	padding: 12px 20px;
	border: 0;
	background: var(--color-ink);
	color: var(--color-white);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.comment-form .submit:hover {
	background: var(--color-accent);
}

.comments-closed {
	color: var(--color-muted);
	font-size: 14px;
}

.image-lightbox {
	position: relative;
	max-width: min(96vw, 1440px);
	max-height: 96vh;
	padding: 54px 24px 22px;
	border: 0;
	background: #151a17;
	color: var(--color-white);
}

.image-lightbox::backdrop {
	background: rgb(8 12 10 / 88%);
}

.image-lightbox__close {
	position: absolute;
	top: 12px;
	right: 14px;
	display: grid;
	width: 38px;
	height: 38px;
	place-items: center;
	border: 1px solid rgb(255 255 255 / 45%);
	border-radius: 50%;
	background: transparent;
	color: var(--color-white);
	font-size: 25px;
	cursor: pointer;
}

.image-lightbox__figure {
	display: flex;
	max-width: calc(96vw - 48px);
	max-height: calc(96vh - 76px);
	align-items: center;
	flex-direction: column;
	gap: 10px;
	margin: 0;
}

.image-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: calc(96vh - 130px);
	object-fit: contain;
}

.image-lightbox__caption {
	color: rgb(255 255 255 / 80%);
	font-family: var(--font-body);
	font-size: 13px;
	line-height: 1.45;
	text-align: center;
}

.site-footer {
	border-top: 1px solid var(--color-line);
}

.site-footer__inner {
	display: flex;
	min-height: 86px;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	color: var(--color-muted);
	font-size: 12px;
}

.site-footer p {
	margin: 0;
}

.site-footer a {
	text-decoration: none;
}

@media (max-width: 700px) {
	.site-header__inner,
	.site-footer__inner,
	.page-content {
		width: min(100% - 32px, var(--content-width));
	}

	.site-header__inner {
		min-height: 78px;
		gap: 14px;
	}

	.site-description {
		max-width: 220px;
		font-size: 11px;
	}

	.custom-logo {
		max-width: min(220px, 100%);
		max-height: 56px;
	}

	.primary-navigation ul {
		gap: 12px;
	}

	.page-content {
		padding: 28px 20px 60px;
	}

	.featured-section {
		margin-bottom: 48px;
	}

	.featured-carousel {
		min-height: 450px;
	}

	.featured-slide {
		padding: 28px 24px 84px;
	}

	.featured-carousel__controls {
		right: 18px;
		bottom: 18px;
	}

	.post-card {
		grid-template-columns: 1fr;
		gap: 15px;
		padding: 20px 0 24px;
	}

	.post-card__image-link {
		height: auto;
		aspect-ratio: 16 / 9;
		min-height: 0;
	}

	.post-card__image,
	.post-card__image-placeholder {
		height: 100%;
		min-height: 0;
		aspect-ratio: auto;
	}

	.post-card__content {
		padding: 0;
	}


	.single-story__layout {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.single-story__sidebar {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 17px 20px;
		padding: 0 0 22px;
		border-right: 0;
		border-bottom: 1px solid var(--color-line);
	}

	.single-story__author,
	.single-story__date,
	.single-story__taxonomy {
		margin: 0;
	}

	.single-story__author {
		grid-column: 1 / -1;
	}

	.single-story__author-avatar {
		width: 68px;
		height: 68px;
	}

	.single-story__footer {
		margin-top: 48px;
	}

	.related-posts__grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.post-navigation {
		gap: 14px;
	}

	.comment-list .children {
		margin-left: 12px;
		padding-left: 12px;
	}

	.comment-form {
		grid-template-columns: 1fr;
	}

	.comment-form > p {
		grid-column: 1 / -1;
	}

	.image-lightbox {
		padding-right: 12px;
		padding-left: 12px;
	}

	.journal-section__heading {
		align-items: start;
		flex-direction: column;
		gap: 6px;
		margin-bottom: 16px;
	}

	.site-footer__inner {
		min-height: 76px;
		align-items: flex-start;
		flex-direction: column;
		justify-content: center;
		gap: 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
