/*
Theme Name: Copcu
Theme URI: https://www.copcu.com
Author: copcu.com
Description: Mustafa Copcu'nun "Yaşam Büfesi" köşesi için gazete köşe yazısı düzeninde okuma teması.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
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: copcu
*/

/* ---------- Foundations ---------- */

:root {
	--gutter: clamp(1.25rem, 4vw, 4rem);
	--paper: var(--wp--preset--color--paper);
	--ink: var(--wp--preset--color--ink);
	--red: var(--wp--preset--color--red);
	--grey: var(--wp--preset--color--grey);
	--rule: var(--wp--preset--color--rule);
	--headline: var(--wp--preset--font-family--headline);
	--sans: var(--wp--preset--font-family--sans);
	--serif: var(--wp--preset--font-family--serif);
	--measure: 64ch;
	accent-color: var(--red);
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-variant-numeric: lining-nums proportional-nums;
	caret-color: var(--red);
}

::selection {
	background: var(--ink);
	color: var(--paper);
}

:where(a, button, input, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--red);
	outline-offset: 3px;
	border-radius: 1px;
}

a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-thickness: 2px;
}

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

html {
	scrollbar-color: var(--grey) var(--paper);
}

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

.topstrip {
	padding: 0.5rem var(--gutter);
	align-items: center;
	border-bottom: 1px solid var(--rule);
	font-family: var(--sans);
	font-size: var(--wp--preset--font-size--small);
	color: var(--grey);
}

.topstrip p {
	margin: 0;
}

.topstrip a {
	color: var(--grey);
}

.masthead {
	padding: 1.375rem var(--gutter) 0;
	border-bottom: 4px solid var(--ink);
	gap: 0.75rem 2rem;
}

.masthead .nameplate-row {
	gap: 0;
	margin-bottom: 1.125rem;
}

.nameplate {
	margin: 0;
	display: flex;
}

.nameplate a {
	display: block;
	background: var(--red);
	color: #fff;
	font-family: var(--headline);
	font-weight: 800;
	font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4.75rem);
	line-height: 1;
	padding: 0.13em 0.3em 0.1em;
	text-decoration: none;
	letter-spacing: -0.005em;
	white-space: nowrap;
}

.nameplate a:hover {
	color: #fff;
	background: #A50D26;
}

.byline {
	justify-content: center;
	padding-left: 1.25rem;
	gap: 0.375rem;
}

.byline p {
	margin: 0;
}

.byline-name {
	font-family: var(--headline);
	font-weight: 700;
	font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2.125rem);
	line-height: 1;
}

.byline-count {
	font-family: var(--sans);
	font-size: 1rem;
	color: var(--grey);
}

.masthead-nav {
	margin-bottom: 1.125rem;
	gap: 0.75rem 1.75rem;
}

.masthead-nav .wp-block-navigation {
	gap: 0.5rem 1.75rem;
}

.masthead-nav .wp-block-navigation a,
.site-footer .wp-block-navigation a {
	text-decoration: none;
	padding-block: 0.375rem;
}

.masthead-nav .wp-block-navigation a[aria-current] {
	color: var(--red);
	box-shadow: inset 0 -3px 0 var(--red);
}

.masthead-nav .wp-block-navigation a:hover,
.site-footer .wp-block-navigation a:hover {
	color: var(--red);
	text-decoration: underline;
}

.issue-line time {
	color: var(--ink);
	font-weight: 500;
}

@media (max-width: 599px) {
	.topstrip {
		gap: 0.5rem;
	}

	.issue-tagline {
		display: none;
	}

	.topstrip .strip-search {
		width: 100%;
	}

	.masthead {
		padding-top: 1rem;
	}

	.masthead .nameplate-row,
	.masthead-nav {
		margin-bottom: 0.75rem;
	}

	.masthead-nav,
	.masthead-nav .wp-block-navigation {
		width: 100%;
	}

	.masthead-nav .wp-block-navigation__container {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 1rem;
		width: 100%;
	}

	.masthead-nav .wp-block-navigation a {
		display: block;
		padding-block: 0.5rem;
	}
}

/* ---------- Search ---------- */

.wp-block-search__inside-wrapper {
	border: 1px solid var(--ink) !important;
	background: #fff;
	padding: 0 !important;
}

.wp-block-search__input {
	border: 0;
	background: transparent;
	font-family: var(--sans);
	font-size: 1rem;
	padding: 0.625rem 0.75rem;
	min-width: 0;
	color: var(--ink);
}

.wp-block-search__input::placeholder {
	color: var(--grey);
	opacity: 1;
}

.wp-block-search__button {
	margin: 0;
	border: 0;
	border-radius: 0;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
	padding: 0.625rem 1rem;
	cursor: pointer;
}

.wp-block-search__button:hover {
	background: var(--red);
	color: #fff;
}

.strip-search {
	width: 17rem;
	max-width: 100%;
}

.strip-search .wp-block-search__input,
.strip-search .wp-block-search__button {
	padding: 0.375rem 0.625rem;
	font-size: 0.9375rem;
}

/* ---------- The page: three newspaper columns ---------- */

.kose {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "main" "author" "rail";
	max-width: 1440px;
	margin-inline: auto !important;
	padding: 0 var(--gutter) var(--wp--preset--spacing--50);
}

.kose > * {
	margin-block-start: 0 !important;
}

.kose-main {
	grid-area: main;
	padding-block: 1.875rem 2.5rem;
	min-width: 0;
}

.kose-author {
	grid-area: author;
	padding-block: 1.875rem;
	border-top: 1px solid var(--rule);
}

.kose-rail {
	grid-area: rail;
	padding-block: 1.875rem;
	border-top: 1px solid var(--rule);
}

@media (min-width: 760px) {
	.kose {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-areas: "main main" "author rail";
		column-gap: 2.5rem;
	}
}

@media (min-width: 1100px) {
	.kose {
		grid-template-columns: 15.5rem minmax(0, 1fr) 18.75rem;
		grid-template-areas: "author main rail";
		column-gap: 0;
	}

	.kose-author {
		border-top: 0;
		border-right: 1px solid var(--rule);
		padding-right: 2rem;
	}

	.kose-main {
		padding-inline: 3rem;
	}

	.kose-rail {
		border-top: 0;
		border-left: 1px solid var(--rule);
		padding-left: 2rem;
	}

	.kose-author > * {
		position: sticky;
		top: 1.5rem;
	}

	.single .kose-author > * {
		top: 4.5rem;
	}
}

/* ---------- The column ---------- */

.front-column .wp-block-post-template,
.front-column .wp-block-post-template > li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dateline {
	gap: 0.25rem 0.5rem;
	margin-top: 1rem;
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 500;
	color: var(--grey);
}

.dateline > * {
	margin: 0 !important;
}

.dateline .wp-block-post-date {
	font-size: inherit;
	font-weight: 600;
	color: var(--red);
}

.dateline .dateline-by::before {
	content: "·";
	margin-right: 0.5rem;
}

.column-title {
	margin: 0;
	max-width: 20ch;
	text-wrap: balance;
}

.column-title a {
	color: inherit;
	text-decoration: none;
}

.column-title a:hover {
	color: var(--red);
}

.wp-block-post-title .series {
	display: block;
	font-weight: 600;
	font-size: 0.8em;
	color: var(--grey);
}

.column-body {
	margin-top: 1.75rem;
	font-variant-numeric: oldstyle-nums proportional-nums;
}

.column-body > * {
	max-width: var(--measure);
	margin-block: 0 1.1em;
}

.column-body > p,
.column-body li {
	hanging-punctuation: first;
	text-wrap: pretty;
}

.column-body > :where(.wp-block-embed, .wp-block-image, .wp-block-table, .wp-block-cover, figure) {
	max-width: min(100%, 46rem);
	margin-block: 1.75em;
}

.column-body img {
	height: auto;
}

.column-body :where(h2, h3, h4) {
	margin-block: 1.6em 0.5em;
}

.column-body mark {
	background: transparent;
}

.column-body .has-text-align-center {
	margin-inline: auto;
	max-width: 52ch;
}

/* Drop cap on the first paragraph that opens with plain text (marked in functions.php). */
.column-body .has-copcu-drop-cap::first-letter {
	float: left;
	font-family: var(--headline);
	font-weight: 800;
	font-size: 4.6em;
	line-height: 0.78;
	padding: 0.06em 0.12em 0 0;
	color: var(--red);
}

.column-body > p:last-of-type::after {
	content: "";
	display: inline-block;
	width: 0.55em;
	height: 0.55em;
	margin-left: 0.4em;
	background: var(--red);
	vertical-align: baseline;
}

.column-body .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--rule);
	max-width: 12rem;
	margin-inline: 0;
}

.column-body figcaption {
	margin-top: 0.5rem;
}

.column-body blockquote {
	border-left: 0;
	padding: 0;
	margin-inline: 0;
}

.column-body table {
	font-family: var(--sans);
	font-size: 1rem;
	border-collapse: collapse;
}

.column-body :where(td, th) {
	border: 1px solid var(--rule);
	padding: 0.5rem 0.75rem;
}

.column-end {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--rule);
	font-family: var(--sans);
	font-size: 0.9375rem;
	color: var(--grey);
}

.column-end > * {
	margin: 0;
}

.column-end a {
	color: var(--ink);
}

.column-nav {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 4px solid var(--ink);
	gap: 1.5rem;
	font-family: var(--sans);
	font-size: var(--wp--preset--font-size--small);
	color: var(--grey);
}

.column-nav > * {
	flex: 1 1 14rem;
	margin: 0;
}

.column-nav a {
	display: block;
	margin-top: 0.25rem;
	font-family: var(--headline);
	font-weight: 600;
	font-size: 1.5rem;
	line-height: 1.15;
	color: var(--ink);
	text-decoration: none;
}

.column-nav a:hover {
	color: var(--red);
}

.column-nav .post-navigation-link__label {
	display: block;
	font-family: var(--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	color: var(--grey);
}

.column-comments {
	margin-top: 3rem;
	max-width: var(--measure);
	font-size: 1.0625rem;
}

.column-comments .wp-block-comment-author-name {
	font-family: var(--sans);
	font-weight: 600;
}

.column-comments .wp-block-comment-date {
	font-family: var(--sans);
	font-size: var(--wp--preset--font-size--small);
	color: var(--grey);
}

.column-comments :where(input[type="text"], input[type="email"], input[type="url"], textarea) {
	width: 100%;
	border: 1px solid var(--ink);
	background: #fff;
	font: inherit;
	padding: 0.625rem 0.75rem;
}

.column-comments input[type="submit"] {
	background: var(--ink);
	color: var(--paper);
	border: 0;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
	padding: 0.75rem 1.25rem;
	cursor: pointer;
}

.column-comments input[type="submit"]:hover {
	background: var(--red);
}

/* ---------- Columnist box ---------- */

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

.author-head {
	gap: 0.875rem;
	padding-bottom: 1.125rem;
	border-bottom: 1px solid var(--rule);
}

.author-photo {
	margin: 0;
	flex: none;
}

.author-photo img {
	display: block;
	width: 92px;
	height: 92px;
	object-fit: cover;
	object-position: left top;
	border: 1px solid var(--ink);
	filter: grayscale(1) contrast(1.05);
}

.author-name {
	gap: 0.25rem;
}

.author-name p {
	margin: 0;
}

.author-title {
	font-family: var(--headline);
	font-weight: 700;
	font-size: 1.625rem;
	line-height: 1;
}

.author-role {
	font-family: var(--sans);
	font-size: 0.9375rem;
	color: var(--grey);
}

.author-motto {
	margin-top: 1rem !important;
	font-size: 1rem;
	line-height: 1.5;
}

.author-link {
	margin-top: 0.75rem !important;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
}

/* ---------- Rail: earlier columns and archive ---------- */

.rail-heading {
	margin: 0;
	padding-bottom: 0.375rem;
	border-bottom: 2px solid var(--ink);
	font-size: 1.5rem;
}

.rail-heading + * {
	margin-top: 0 !important;
}

.kose-rail .rail-heading ~ .rail-heading {
	margin-top: 2.25rem !important;
}

.rail-latest .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rail-latest .wp-block-post-template > li {
	margin: 0;
	padding: 0.875rem 0;
	border-bottom: 1px solid var(--rule);
}

.rail-latest .wp-block-post-date {
	font-weight: 500;
	color: var(--grey);
}

.rail-title {
	margin: 0.125rem 0 0;
	font-family: var(--headline);
	font-weight: 600;
	font-size: 1.4375rem;
	line-height: 1.1;
}

.rail-title a {
	color: var(--ink);
	text-decoration: none;
}

.rail-title a:hover {
	color: var(--red);
	text-decoration: underline;
}

.rail-title .series {
	display: none;
}

.rail-archive {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.25rem 0.75rem;
	margin: 0.875rem 0 0;
	padding: 0;
	list-style: none;
	font-family: var(--sans);
	font-size: 0.9375rem;
	color: var(--grey);
	font-variant-numeric: lining-nums tabular-nums;
}

.rail-archive li {
	padding-block: 0.25rem;
}

.rail-archive a {
	font-weight: 600;
	color: var(--ink);
}

/* ---------- Listings: archive, search, index ---------- */

.listing-title {
	margin: 0 0 1.5rem;
	font-size: var(--wp--preset--font-size--headline);
	line-height: 1;
}

.column-list .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 4px solid var(--ink);
}

.column-list .wp-block-post-template > li {
	margin: 0;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--rule);
	max-width: var(--measure);
}

.column-list .wp-block-post-date {
	color: var(--red);
}

.list-title {
	margin: 0.375rem 0 0.5rem;
	font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem);
	line-height: 1.05;
}

.list-title a {
	color: var(--ink);
	text-decoration: none;
}

.list-title a:hover {
	color: var(--red);
}

.column-list .wp-block-post-excerpt {
	margin: 0;
}

.column-list .wp-block-post-excerpt__excerpt {
	margin: 0;
	text-wrap: pretty;
}

.column-list .wp-block-post-excerpt__more-text {
	margin: 0.5rem 0 0;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
}

.wp-block-query-pagination {
	margin-top: 2rem;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1rem;
	gap: 1rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .current {
	padding: 0.375rem 0.5rem;
}

.wp-block-query-pagination .current {
	background: var(--ink);
	color: var(--paper);
}

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

.site-footer {
	padding: 1.5rem var(--gutter) 3rem;
	border-top: 4px solid var(--ink);
	font-family: var(--sans);
	font-size: 1rem;
	color: var(--grey);
	gap: 1.5rem 3rem;
}

.site-footer p {
	margin: 0;
}

.footer-plate {
	display: inline-block;
	background: var(--red);
	color: #fff;
	font-family: var(--headline);
	font-weight: 800;
	font-size: 1.625rem;
	line-height: 1;
	padding: 0.15em 0.35em 0.1em;
	margin-bottom: 0.5rem !important;
}

.site-footer .wp-block-navigation {
	gap: 0.25rem 1.5rem;
	color: var(--ink);
}

.site-footer .footer-credit {
	flex-basis: 100%;
	padding-top: 1rem;
	border-top: 1px solid var(--rule);
	font-size: var(--wp--preset--font-size--small);
}

.site-footer .footer-credit a {
	color: var(--ink);
	font-weight: 600;
}

.site-footer .footer-credit a:hover {
	color: var(--red);
}

/* ---------- Running head (single column) ---------- */

.running-head {
	position: fixed;
	z-index: 50;
	top: 0;
	left: 0;
	right: 0;
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 0.5rem var(--gutter);
	background: var(--paper);
	border-bottom: 1px solid var(--rule);
	box-shadow: 0 6px 16px -10px rgb(22 22 22 / 0.35);
	font-family: var(--sans);
	transform: translateY(-110%);
	transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.running-head.is-shown {
	transform: translateY(0);
}

.running-head::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: var(--red);
	transform-origin: left center;
	transform: scaleX(var(--progress, 0));
}

.running-head__plate {
	flex: none;
	background: var(--red);
	color: #fff;
	font-family: var(--headline);
	font-weight: 800;
	font-size: 1.25rem;
	line-height: 1;
	padding: 0.2em 0.4em 0.15em;
}

.running-head__title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-family: var(--headline);
	font-weight: 700;
	font-size: 1.375rem;
	line-height: 1.2;
}

.running-head__date {
	flex: none;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--grey);
}

.admin-bar .running-head {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .running-head {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.running-head__date {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.running-head {
		transition: none;
	}
}

@media print {
	.topstrip,
	.masthead-nav,
	.kose-rail,
	.column-nav,
	.column-comments,
	.site-footer,
	.running-head {
		display: none !important;
	}
}
