/*
Theme Name: NSFW Editorial
Theme URI: https://www.nsfw.info/
Template: newspaper-builder
Description: NSFW house design, a child of Newspaper Builder: editorial typography, working section navigation, a lead-story front page and readable articles. No animation.
Version: 1.0.0
Requires at least: 6.6
Author: Private Cloud Ops (Hermes)
Text Domain: nsfw-editorial
*/

@font-face {
	font-family: "Newsreader";
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("assets/fonts/newsreader-latin-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Newsreader";
	font-style: italic;
	font-weight: 200 800;
	font-display: swap;
	src: url("assets/fonts/newsreader-latin-italic.woff2") format("woff2");
}

:root {
	--nsfw-ink: #111314;
	--nsfw-ink-2: #2b3033;
	--nsfw-muted: #5c6367;
	--nsfw-rule: #e3e6e8;
	--nsfw-paper: #ffffff;
	--nsfw-wash: #f5f5f2;
	--nsfw-accent: #ffc934;
	--nsfw-serif: "Newsreader", Georgia, "Times New Roman", serif;
	--nsfw-sans: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--nsfw-max: 1200px;
	--nsfw-measure: 700px;
	--nsfw-gutter: 24px;
}

body {
	background: var(--nsfw-paper);
	color: var(--nsfw-ink);
	font-family: var(--nsfw-sans);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.wp-site-blocks {
	padding: 0;
}

.wp-site-blocks > * + * {
	margin-block-start: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 3px solid var(--nsfw-accent);
	outline-offset: 2px;
}

/* ---------- Masthead ---------- */

.nsfw-masthead {
	background: var(--nsfw-ink);
	color: #fff;
}

.nsfw-masthead__inner {
	max-width: var(--nsfw-max);
	margin: 0 auto;
	padding: 30px var(--nsfw-gutter) 22px;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 22px;
}

.nsfw-masthead__inner > * {
	margin-block: 0;
}

.nsfw-masthead__inner .nsfw-search {
	margin-left: auto;
	align-self: center;
}

.nsfw-wordmark,
.nsfw-wordmark a {
	margin: 0;
	font-family: var(--nsfw-serif);
	font-weight: 800;
	font-size: clamp(44px, 6vw, 68px);
	line-height: 0.95;
	letter-spacing: -0.03em;
	color: #fff;
	text-decoration: none;
}

.nsfw-wordmark a:hover {
	color: var(--nsfw-accent);
}

.nsfw-tagline {
	margin: 0;
	color: #b9bfc3;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nsfw-navbar {
	max-width: var(--nsfw-max);
	margin: 0 auto;
	padding: 0 var(--nsfw-gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	border-top: 1px solid #2c3033;
}

.nsfw-nav .wp-block-navigation__container {
	gap: 4px 22px;
}

.nsfw-nav .wp-block-navigation-item__content {
	display: block;
	padding: 15px 0 12px;
	border-bottom: 3px solid transparent;
	color: #fff;
	font: 700 13px/1 var(--nsfw-sans);
	letter-spacing: 0.09em;
	text-transform: uppercase;
	text-decoration: none;
}

.nsfw-nav .wp-block-navigation-item__content:hover,
.nsfw-nav .current-menu-item > .wp-block-navigation-item__content,
body.home .nsfw-nav .wp-block-navigation__container > .wp-block-navigation-item:first-child > .wp-block-navigation-item__content {
	border-bottom-color: var(--nsfw-accent);
}

.nsfw-nav .wp-block-navigation__responsive-container-open {
	min-height: 44px;
	margin: 6px 0;
	padding: 10px 16px;
	border: 1px solid #4a5054;
	font: 700 13px/1 var(--nsfw-sans);
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.nsfw-nav .wp-block-navigation__responsive-container-open,
.nsfw-nav .wp-block-navigation__responsive-container-close {
	color: #fff;
}

.nsfw-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--nsfw-ink);
	color: #fff;
	padding: 24px;
}

.nsfw-search {
	margin: 0;
}

.nsfw-search .wp-block-search__inside-wrapper {
	border: 1px solid #4a5054;
	border-radius: 0;
	padding: 2px 4px 2px 12px;
	background: #1b1e20;
}

.nsfw-search .wp-block-search__input {
	background: transparent;
	border: 0;
	color: #fff;
	font: 14px var(--nsfw-sans);
	min-width: 160px;
}

.nsfw-search .wp-block-search__input::placeholder {
	color: #c3c8cb;
	opacity: 1;
}

.nsfw-search .wp-block-search__button {
	background: transparent;
	color: #fff;
	border: 0;
	padding: 6px;
	margin: 0;
}

h1, h2, h3,
.wp-block-post-title {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

/* ---------- Page frame ---------- */

.nsfw-main {
	max-width: var(--nsfw-max);
	margin: 0 auto;
	padding: 40px var(--nsfw-gutter) 56px;
}

.nsfw-page-head {
	margin: 0 0 32px;
	padding-top: 10px;
	border-top: 3px solid var(--nsfw-ink);
}

.nsfw-page-head h1,
.nsfw-page-head .wp-block-query-title {
	margin: 0;
	font-family: var(--nsfw-serif);
	font-weight: 700;
	font-size: clamp(32px, 4vw, 44px);
	letter-spacing: -0.015em;
	line-height: 1.1;
}

.nsfw-page-head .wp-block-term-description,
.nsfw-page-head p {
	margin: 8px 0 0;
	color: var(--nsfw-muted);
	font-size: 16px;
}

/* ---------- Story cards ---------- */

.nsfw-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 44px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nsfw-grid > li {
	margin: 0;
	min-width: 0;
}

.nsfw-card {
	display: flex;
	flex-direction: column;
	gap: 0;
	height: 100%;
}

.nsfw-card > * {
	margin-block-start: 0;
}

.nsfw-card .wp-block-post-featured-image {
	margin: 0 0 14px;
	aspect-ratio: 16 / 9;
	background: var(--nsfw-wash);
	overflow: hidden;
}

.nsfw-card .wp-block-post-featured-image a {
	display: block;
	height: 100%;
}

.nsfw-card .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.nsfw-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.nsfw-card__body > * {
	margin-block-start: 0;
}

.nsfw-kicker {
	margin: 0 0 8px;
	font: 700 12px/1.2 var(--nsfw-sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.nsfw-kicker a {
	display: inline-block;
	padding: 4px 7px 3px;
	background: var(--nsfw-accent);
	color: var(--nsfw-ink);
	text-decoration: none;
}

.nsfw-kicker .wp-block-post-terms__separator {
	display: none;
}

.nsfw-kicker a + a,
.nsfw-kicker a ~ a {
	margin-left: 10px;
}

.nsfw-card__title {
	margin: 0 0 8px;
	font-family: var(--nsfw-serif);
	font-weight: 700;
	font-size: 23px;
	line-height: 1.18;
	letter-spacing: -0.01em;
}

.nsfw-card__title a {
	color: var(--nsfw-ink);
	text-decoration: none;
}

.nsfw-card__title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--nsfw-accent);
	text-underline-offset: 4px;
}

.nsfw-card__excerpt {
	display: none;
	margin: 0 0 10px;
}

.nsfw-card__excerpt p {
	margin: 0;
}

.nsfw-card__excerpt .wp-block-post-excerpt__more-text {
	display: none;
}

.nsfw-card__date {
	margin: auto 0 0;
	padding-top: 4px;
	color: var(--nsfw-muted);
	font-size: 13px;
	letter-spacing: 0.02em;
}

/* Lead story: first item on the first page of the front page. */
body:not(.paged) .nsfw-home .nsfw-grid > li:first-child {
	grid-column: 1 / -1;
	padding-bottom: 44px;
	border-bottom: 1px solid var(--nsfw-rule);
}

body:not(.paged) .nsfw-home .nsfw-grid > li:first-child .nsfw-card {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: 36px;
	align-items: center;
}

body:not(.paged) .nsfw-home .nsfw-grid > li:first-child .wp-block-post-featured-image {
	margin: 0;
}

body:not(.paged) .nsfw-home .nsfw-grid > li:first-child .nsfw-card__title {
	font-size: clamp(30px, 3.4vw, 46px);
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin-bottom: 14px;
}

body:not(.paged) .nsfw-home .nsfw-grid > li:first-child .nsfw-card__excerpt {
	display: block;
	font-family: var(--nsfw-serif);
	font-size: 20px;
	line-height: 1.5;
	color: var(--nsfw-ink-2);
}

.nsfw-pagination {
	margin-top: 48px;
	padding-top: 20px;
	border-top: 1px solid var(--nsfw-rule);
	gap: 8px;
	font: 700 14px var(--nsfw-sans);
}

.nsfw-pagination {
	align-items: center;
}

.nsfw-pagination a,
.nsfw-pagination .page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 9px 12px;
	border: 1px solid var(--nsfw-rule);
	color: var(--nsfw-ink);
	text-align: center;
	text-decoration: none;
}

.nsfw-pagination .page-numbers.dots {
	border-color: transparent;
}

.nsfw-pagination .page-numbers.current {
	background: var(--nsfw-ink);
	color: #fff;
}

.nsfw-pagination a:hover {
	background: var(--nsfw-wash);
}

.nsfw-empty {
	padding: 40px 0;
	color: var(--nsfw-muted);
	font-size: 18px;
}

/* ---------- Article ---------- */

.nsfw-article {
	max-width: var(--nsfw-measure);
	margin: 0 auto;
}

.nsfw-article > * {
	margin-block-start: 0;
}

.nsfw-article__title {
	margin: 6px 0 18px;
	font-family: var(--nsfw-serif);
	font-weight: 700;
	font-size: clamp(34px, 4.8vw, 54px);
	line-height: 1.06;
	letter-spacing: -0.02em;
}

.nsfw-article__meta {
	gap: 6px 18px;
	margin: 0 0 24px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--nsfw-rule);
	color: var(--nsfw-muted);
	font-size: 14px;
}

.nsfw-article__meta > * {
	margin: 0;
}

.nsfw-article__meta .wp-block-post-author-name {
	color: var(--nsfw-ink);
	font-weight: 700;
}

.nsfw-article__meta .wp-block-post-author-name::before {
	content: "By ";
	font-weight: 400;
	color: var(--nsfw-muted);
}

.nsfw-hero {
	width: min(1040px, calc(100vw - 2 * var(--nsfw-gutter)));
	max-width: none;
	margin: 0 0 32px 50%;
	transform: translateX(-50%);
}

.nsfw-hero img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.nsfw-hero::after {
	content: "Illustration";
	display: block;
	margin-top: 8px;
	color: var(--nsfw-muted);
	font: 12px/1.4 var(--nsfw-sans);
	letter-spacing: 0.04em;
}

.nsfw-body {
	font-family: var(--nsfw-serif);
	font-size: 20px;
	line-height: 1.65;
	color: #1c2023;
}

.nsfw-body > * {
	margin-block: 0 1.1em;
}

.nsfw-body p,
.nsfw-body li,
.nsfw-body blockquote {
	font-family: var(--nsfw-serif);
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

.nsfw-body > p:first-child {
	padding: 20px 24px;
	background: var(--nsfw-wash);
	border-left: 4px solid var(--nsfw-accent);
	font-size: 21px;
	line-height: 1.55;
}

.nsfw-body h2,
.nsfw-body h3 {
	margin: 1.8em 0 0.5em;
	font-family: var(--nsfw-serif);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--nsfw-ink);
}

.nsfw-body h2 {
	font-size: 28px;
}

.nsfw-body h3 {
	font-size: 23px;
}

.nsfw-body a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--nsfw-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.nsfw-body a:hover {
	background: #fff3cc;
}

.nsfw-body ul,
.nsfw-body ol {
	padding-left: 1.2em;
}

.nsfw-body li + li {
	margin-top: 0.35em;
}

.nsfw-body blockquote {
	margin: 1.6em 0;
	padding-left: 20px;
	border-left: 3px solid var(--nsfw-ink);
	font-style: italic;
}

.nsfw-perspective {
	margin: 2.2em 0 1.6em;
	padding: 34px 34px 16px;
	background: var(--nsfw-ink);
	color: #eceeef;
}

.nsfw-perspective h2,
.nsfw-perspective h3 {
	margin: 0 0 14px;
	color: #fff;
	font-size: 25px;
}

.nsfw-perspective h2::before,
.nsfw-perspective h3::before {
	content: "";
	display: block;
	width: 52px;
	height: 4px;
	margin-bottom: 16px;
	background: var(--nsfw-accent);
}

.nsfw-perspective p {
	margin: 0 0 1em;
}

.nsfw-perspective a {
	color: #fff;
}

.nsfw-source {
	margin-top: 1.4em;
	padding-top: 14px;
	border-top: 1px solid var(--nsfw-rule);
	color: var(--nsfw-muted);
	font: italic 15px/1.5 var(--nsfw-sans);
}

.nsfw-source a {
	color: var(--nsfw-ink);
}

.nsfw-tags {
	margin-top: 28px;
	font: 700 13px var(--nsfw-sans);
	color: var(--nsfw-muted);
}

.nsfw-tags a {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 6px 10px;
	background: var(--nsfw-wash);
	color: var(--nsfw-ink);
	text-decoration: none;
}

.nsfw-tags .wp-block-post-terms__separator {
	display: none;
}

.nsfw-more {
	margin-top: 72px;
}

.nsfw-section__title {
	margin: 0 0 24px;
	padding-top: 10px;
	border-top: 3px solid var(--nsfw-ink);
	font-family: var(--nsfw-serif);
	font-weight: 700;
	font-size: 28px;
}

/* Plain pages (About, contact) */
.nsfw-page {
	max-width: var(--nsfw-measure);
	margin: 0 auto;
}

.nsfw-page .wp-block-post-title {
	font-family: var(--nsfw-serif);
	font-weight: 700;
	font-size: clamp(34px, 4.6vw, 50px);
	line-height: 1.08;
	margin: 0 0 24px;
}

.nsfw-page .wp-block-post-content {
	font-family: var(--nsfw-serif);
	font-size: 20px;
	line-height: 1.65;
}

/* ---------- Footer ---------- */

.nsfw-footer {
	margin-top: 0;
	background: var(--nsfw-ink);
	color: #b9bfc3;
	font-size: 15px;
}

.nsfw-footer__inner {
	max-width: var(--nsfw-max);
	margin: 0 auto;
	padding: 52px var(--nsfw-gutter) 28px;
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 40px;
}

.nsfw-footer__inner > * {
	margin-block-start: 0;
}

.nsfw-wordmark--small,
.nsfw-wordmark--small a {
	font-size: 40px;
}

.nsfw-footer__brand p {
	max-width: 440px;
	margin: 14px 0 0;
	line-height: 1.6;
}

.nsfw-footer__title {
	margin: 0 0 14px;
	color: #fff;
	font: 700 13px/1 var(--nsfw-sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.nsfw-footer__list,
.nsfw-footer .wp-block-categories {
	margin: 0;
	padding: 0;
	list-style: none;
	line-height: 2;
}

.nsfw-footer a,
.nsfw-footer .wp-block-categories a,
.nsfw-footer .nsfw-footer__list a {
	color: #fff;
	text-decoration: none;
}

.nsfw-footer a:hover {
	color: var(--nsfw-accent);
}

.nsfw-footer__legal {
	max-width: var(--nsfw-max);
	margin: 0 auto;
	padding: 18px var(--nsfw-gutter) 28px;
	border-top: 1px solid #2c3033;
	color: #8e959a;
	font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
	.nsfw-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body:not(.paged) .nsfw-home .nsfw-grid > li:first-child .nsfw-card {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.nsfw-footer__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.nsfw-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	:root {
		--nsfw-gutter: 18px;
	}

	.nsfw-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.nsfw-grid > li + li {
		padding-top: 28px;
		border-top: 1px solid var(--nsfw-rule);
	}

	body:not(.paged) .nsfw-home .nsfw-grid > li:first-child {
		padding-bottom: 0;
		border-bottom: 0;
	}

	body:not(.paged) .nsfw-home .nsfw-grid > li:first-child .nsfw-card__title {
		font-size: 30px;
	}

	.nsfw-masthead__inner {
		padding-top: 22px;
		padding-bottom: 14px;
	}

	.nsfw-main {
		padding-top: 24px;
	}

	.nsfw-navbar {
		padding-top: 6px;
		padding-bottom: 6px;
	}

	.nsfw-search {
		display: none;
	}

	.nsfw-body {
		font-size: 18px;
	}

	.nsfw-body > p:first-child {
		font-size: 19px;
		padding: 16px 18px;
	}

	.nsfw-perspective {
		padding: 22px 20px 6px;
	}

	.nsfw-footer__inner {
		grid-template-columns: minmax(0, 1fr);
	}
}

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