/*
Theme Name: Unison
Description: Авторский WordPress-блог о вымышленных мирах и писательстве.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: unison
*/

:root {
	--paper: #f9f4e9;
	--hero: #f3e9d9;
	--ink: #302620;
	--muted: #66584f;
	--wine: #793c47;
	--wine-dark: #5c2935;
	--line: #d6c6b1;
	--serif: Georgia, "Times New Roman", serif;
	--sans: system-ui, -apple-system, sans-serif;
	--column: 44rem;
}

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.6;
}

body > main { min-height: 52vh; }
a { color: var(--wine); text-underline-offset: .22em; }
a:hover { color: var(--wine-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--wine);
	outline-offset: 4px;
}

h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: 500;
	line-height: 1.13;
}

h1, h2, h3, p { overflow-wrap: anywhere; }
img, video, iframe { max-width: 100%; }
img, video { height: auto; }

.frame { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.skip-link, .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.skip-link:focus, .screen-reader-text:focus {
	z-index: 10;
	top: .75rem;
	left: .75rem;
	width: auto;
	height: auto;
	padding: .6rem 1rem;
	clip-path: none;
	background: var(--paper);
}

.site-header { border-bottom: 1px solid var(--line); }
.masthead {
	min-height: 4.8rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font: 600 1.26rem/1 var(--serif);
	letter-spacing: .15em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ink);
}
.brand-mark { color: var(--wine); font-size: 1.1rem; }
.site-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem clamp(.9rem, 3vw, 2.25rem);
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-nav a { color: var(--ink); text-decoration: none; font-size: .9375rem; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--wine); text-decoration: underline; }

.introduction {
	background: radial-gradient(ellipse at 81% 45%, #efe1cd, transparent 62%), var(--hero);
	border-bottom: 1px solid var(--line);
}
.introduction-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(2rem, 6vw, 5.3rem);
	padding-block: clamp(4rem, 8vw, 7rem);
}
.introduction h1 {
	max-width: 11em;
	margin: 0 0 1.45rem;
	font-size: clamp(2.7rem, 5.9vw, 5.15rem);
	line-height: 1.02;
	letter-spacing: -.055em;
	text-wrap: balance;
}
.introduction p {
	margin: 0;
	max-width: 31rem;
	color: var(--muted);
	font: clamp(1.15rem, 2vw, 1.43rem)/1.55 var(--serif);
}
.intro-link {
	display: inline-block;
	margin-top: 1.9rem;
	border: 1px solid var(--wine);
	border-radius: .25rem;
	padding: .65rem 1.05rem;
	font-size: .9375rem;
	text-decoration: none;
}
.intro-link:hover { background: var(--wine); color: var(--paper); }

.book-art {
	--foil: #d9ae77;
	display: grid;
	place-items: center;
	padding: 0 0 1rem;
	pointer-events: none;
}
.book-cover {
	position: relative;
	isolation: isolate;
	display: grid;
	place-items: center;
	width: min(75%, 16rem);
	aspect-ratio: .73;
	border-radius: .32rem .65rem .53rem .32rem;
	background: linear-gradient(90deg, #4a2530 0%, #84515a 6%, #61333e 10%, #713e4a 29%, #542e39 100%);
	color: var(--foil);
	box-shadow: 4px 6px 0 #b5936e, 7px 9px 0 #f0dcb8, 10px 12px 0 #512d37, 13px 23px 32px #613b3f38;
	transform: rotate(9deg);
}
.book-cover::before, .book-cover::after {
	content: "";
	position: absolute;
	inset: 6% 8% 6% 11%;
	border: 1px solid #d9ae779c;
	border-radius: .22rem;
}
.book-cover::after { inset: 8% 10.5% 8% 13.5%; opacity: .65; }
.book-orbit {
	position: absolute;
	width: 59%;
	height: 28%;
	border: 1px solid #d9ae778c;
	border-radius: 50%;
}
.orbit-one { transform: rotate(-43deg); }
.orbit-two { transform: rotate(22deg); }
.orbit-three { transform: rotate(87deg); }
.book-star { font-size: clamp(2rem, 5vw, 4.8rem); line-height: 1; transform: rotate(-9deg); }

.index-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 19rem);
	gap: clamp(2.25rem, 7vw, 6.5rem);
	padding-block: clamp(2.5rem, 6vw, 5rem);
}
.index-layout--archive { grid-template-columns: minmax(0, var(--column)); }
.section-title { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 1rem; }
.archive-description, .empty-message { color: var(--muted); }
.empty-message, .post-list { border-top: 1px solid var(--line); }
.empty-message { margin: 0; padding-block: 1.25rem; }
.post-card {
	padding: 1.4rem 0 1.6rem;
	border-bottom: 1px solid var(--line);
}
.post-card-title { margin: .5rem 0; font-size: clamp(1.55rem, 3.25vw, 2.3rem); }
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-title a:hover { color: var(--wine); text-decoration: underline; }
.post-card p { margin: .55rem 0 0; color: var(--muted); }
.entry-meta { color: var(--muted); font-size: .875rem; }
.entry-meta time { margin-inline-end: .55rem; }
.entry-meta ul { display: inline; list-style: none; margin: 0; padding: 0; }
.entry-meta li { display: inline; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .9rem; margin-block: 1.5rem; }
.pagination .current { font-weight: 700; }

.rubrics {
	align-self: start;
	padding-inline-start: 1.5rem;
	border-inline-start: 1px solid var(--line);
}
.rubrics .section-title { font-size: 1.75rem; margin-bottom: .8rem; }
.rubrics ul { list-style: none; padding: 0; margin: 0; }
.rubrics li { padding-block: .75rem; }
.rubrics li + li { border-top: 1px solid var(--line); }
.rubrics a, .rubrics li > span { font: 1.13rem/1.3 var(--serif); }
.rubrics li > span { color: var(--wine); }
.rubrics p { margin: .32rem 0 0; font-size: .9375rem; color: var(--muted); }

.reading-layout { width: min(100% - 3rem, var(--column)); padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.entry-heading { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.back-link { font-size: .9375rem; }
.entry-heading h1 { margin: 1rem 0; font-size: clamp(2.4rem, 5.5vw, 4.75rem); letter-spacing: -.04em; }
.entry-cover { margin: 0 0 2rem; }
.entry-cover img { display: block; }
.entry-content { font: 1.1875rem/1.75 var(--serif); overflow-wrap: anywhere; }
.entry-content h2 { font-size: clamp(1.75rem, 4vw, 2.35rem); }
.entry-content h2, .entry-content h3 { margin-top: 1.7em; }
.entry-content blockquote {
	margin: 1.7rem 0;
	padding: .4rem 1.25rem;
	border-inline-start: .18rem solid var(--wine);
	color: var(--muted);
}
.entry-content figure { max-width: 100%; margin-inline: 0; }
.entry-content figcaption { color: var(--muted); font: .875rem/1.5 var(--sans); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content pre { overflow: auto; padding: 1rem; background: var(--hero); }
.comments-area { margin-top: 3.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.comment-list { padding-inline-start: 1.35rem; }

input:not([type="checkbox"]):not([type="radio"]), textarea, button {
	max-width: 100%;
	font: inherit;
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: .25rem;
	padding: .45rem .65rem;
}
button, input[type="submit"] { cursor: pointer; }

.site-footer { border-top: 1px solid var(--line); }
.footer-content {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .8rem 2rem;
	padding-block: 1.5rem 2rem;
}
.footer-brand { font-size: 1rem; }
.footer-content p { margin: 0; color: var(--muted); font-size: .9375rem; }

@media (max-width: 45rem) {
	.frame { width: calc(100% - 2.25rem); }
	.masthead { min-height: 4rem; }
	.introduction-inner { gap: 1.25rem; padding-block: 3.25rem; }
	.index-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
	.rubrics { border-inline-start: 0; padding-inline-start: 0; }
	.rubrics li:first-child { border-top: 1px solid var(--line); }
}

@media (max-width: 34rem) {
	.introduction-inner { grid-template-columns: minmax(0, 1fr); }
	.introduction h1 { max-width: 100%; text-wrap: initial; }
	.book-art { display: none; }
}
