/*
Theme Name: akctheme
Theme URI: https://akristinacasasent.com/
Author: A. Kristina Casasent
Author URI: https://akristinacasasent.com/
Description: Lightweight standalone classic theme for the A. Kristina Casasent author site. Delightfully weird, occasionally dark. Renders the header, home page, books directory, book pages and book archives without a page builder.
Version: 0.4.13
Requires at least: 6.4
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: akctheme
*/

/*
 * Class names use the "akctheme-" prefix, so styles from other code that
 * targets generic, page-builder or "akc-" classes cannot match
 * this theme's markup.
 */

/*
 * Fonts (Open Sans @font-face) and the design tokens (CSS custom properties
 * for colors, fonts, font sizes and widths) live in assets/css/tokens.css,
 * which loads before this file on the front end and in the block editor.
 */

/* ---------- Base (mobile first) ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--akctheme-font);
	font-size: var(--akctheme-font-size);
	font-weight: 400;
	line-height: var(--akctheme-line-height);
	color: var(--akctheme-text);
	background: var(--akctheme-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
video,
iframe,
svg {
	max-width: 100%;
	height: auto;
}

img {
	display: block;
}

a {
	color: var(--akctheme-link);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 2px solid var(--akctheme-blue-dark);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.6em;
	font-weight: var(--akctheme-heading-weight);
	line-height: var(--akctheme-heading-line-height);
	color: var(--akctheme-heading);
}

h1 {
	font-size: var(--akctheme-font-size-h1);
}

h2 {
	font-size: var(--akctheme-font-size-h2);
}

h3 {
	font-size: var(--akctheme-font-size-h3);
}

p {
	margin: 0 0 1em;
}

ul,
ol {
	padding-left: 1.25em;
}

hr,
.akctheme-divider {
	height: 0;
	margin: 1.5rem 0;
	border: 0;
	border-top: 1px solid var(--akctheme-blue);
}

/* ---------- Accessibility ---------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	word-wrap: normal !important;
}

.akctheme-skip-link:focus {
	position: fixed !important;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	margin: 0;
	clip: auto;
	clip-path: none;
	color: #fff;
	background: var(--akctheme-heading);
	white-space: normal;
}

/* ---------- Layout ---------- */
.akctheme-container {
	width: var(--akctheme-width);
	max-width: var(--akctheme-max);
	margin: 0 auto;
}

.akctheme-container--narrow {
	max-width: 800px;
}

.akctheme-main {
	padding: 1.5rem 0 3rem;
}

/* ---------- Header ---------- */
.akctheme-header {
	padding-top: 0.5rem;
	background: var(--akctheme-bg);
}

.akctheme-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.akctheme-menu a {
	display: inline-block;
	padding: 0.35rem 0;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.6);
}

.akctheme-menu a:hover,
.akctheme-menu a:focus,
.akctheme-menu .current-menu-item > a {
	color: var(--akctheme-blue);
	text-decoration: none;
}

.akctheme-nav--primary {
	padding-bottom: 0.25rem;
}

/* Phone menu toggle: hidden unless the phone rules below show it (JS only). */
.akctheme-menu-toggle {
	display: none;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	margin: 0;
	padding: 0.35rem 0.75rem;
	border: 1px solid var(--akctheme-line);
	border-radius: 3px;
	font: inherit;
	font-weight: 600;
	line-height: 1.4;
	color: var(--akctheme-heading);
	background: var(--akctheme-bg);
	cursor: pointer;
}

.akctheme-menu-toggle:hover,
.akctheme-menu-toggle[aria-expanded="true"] {
	color: var(--akctheme-blue);
	border-color: var(--akctheme-blue);
}

/* Three bars drawn with borders; they turn into an X when open. */
.akctheme-menu-toggle__icon,
.akctheme-menu-toggle__icon::before,
.akctheme-menu-toggle__icon::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.akctheme-menu-toggle__icon {
	position: relative;
}

.akctheme-menu-toggle__icon::before,
.akctheme-menu-toggle__icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.akctheme-menu-toggle__icon::before {
	top: -6px;
}

.akctheme-menu-toggle__icon::after {
	top: 6px;
}

.akctheme-menu-toggle[aria-expanded="true"] .akctheme-menu-toggle__icon {
	background: transparent;
}

.akctheme-menu-toggle[aria-expanded="true"] .akctheme-menu-toggle__icon::before {
	transform: translateY(6px) rotate(45deg);
}

.akctheme-menu-toggle[aria-expanded="true"] .akctheme-menu-toggle__icon::after {
	transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 767.98px) {

	.akctheme-js .akctheme-menu-toggle {
		display: inline-flex;
	}

	.akctheme-js .akctheme-nav--primary .akctheme-menu {
		display: none;
	}

	.akctheme-js .akctheme-nav--primary.is-open .akctheme-menu {
		display: flex;
		flex-direction: column;
		gap: 0;
		margin-top: 0.5rem;
	}

	.akctheme-js .akctheme-nav--primary.is-open .akctheme-menu a {
		display: block;
		padding: 0.5rem 0;
	}
}

.akctheme-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0.4rem 0 0.5rem;
}

.akctheme-brand__logo {
	flex: 0 0 auto;
}

.akctheme-brand__logo .custom-logo-link {
	display: block;
}

.akctheme-brand__logo img {
	width: 56px;
	height: auto;
}

.akctheme-bylines {
	margin: 0;
	line-height: 1.45;
	color: var(--akctheme-heading);
}

.akctheme-bylines__line--name {
	font-size: 1.15rem;
	font-weight: 700;
}

.akctheme-bylines__line--tagline {
	font-size: 0.95rem;
}

.akctheme-bylines__line--promise {
	font-size: 0.88rem;
}

.akctheme-divider--header {
	width: var(--akctheme-width);
	max-width: var(--akctheme-max);
	margin: 0 auto;
	border-top-width: var(--akctheme-divider);
}

/* ---------- End-of-post book blurb (centered; cover above text) ---------- */
.akctheme-book-blurb {
	margin: 2rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--akctheme-line);
	text-align: center;
}

.akctheme-book-blurb__heading {
	margin: 0 0 1.25rem;
	font-size: var(--akctheme-font-size-h2);
	font-weight: var(--akctheme-heading-weight);
	line-height: var(--akctheme-heading-line-height);
	color: var(--akctheme-heading);
	text-align: center;
}

.akctheme-book-blurb__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
}

.akctheme-book-blurb__book {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1 1 20rem;
	max-width: 24rem;
	width: 100%;
	text-align: center;
}

.akctheme-book-blurb__cover {
	display: block;
	margin: 0 auto 0.75rem;
	width: 7rem;
}

.akctheme-book-blurb__cover .akctheme-cover__img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
}

.akctheme-book-blurb__body {
	width: 100%;
	text-align: center;
}

.akctheme-book-blurb__title {
	margin: 0 0 0.4rem;
	font-size: 1.15rem;
	font-weight: var(--akctheme-heading-weight);
	line-height: var(--akctheme-heading-line-height);
	color: var(--akctheme-heading);
	text-align: center;
}

.akctheme-book-blurb__title a {
	color: var(--akctheme-heading);
}

.akctheme-book-blurb__title a:hover,
.akctheme-book-blurb__title a:focus {
	color: var(--akctheme-blue);
}

.akctheme-book-blurb__tagline {
	margin: 0 0 0.75rem;
	color: var(--akctheme-text);
	text-align: center;
}

.akctheme-book-blurb__buy {
	margin: 0.25rem 0 0;
	text-align: center;
}

/* ---------- Newsletter signup (above the footer links) ---------- */
/* Spacing and width only; the MailerLite form keeps its own styles. */
.akctheme-signup {
	padding: 2rem 0;
	border-top: 1px solid var(--akctheme-line);
}

.akctheme-signup__inner > :first-child {
	margin-top: 0;
}

.akctheme-signup__inner > :last-child {
	margin-bottom: 0;
}

/* ---------- Footer ---------- */
.akctheme-footer {
	padding: 1.25rem 0 2rem;
	border-top: 1px solid var(--akctheme-line);
	font-size: var(--akctheme-font-size-small);
}

.akctheme-nav--footer .akctheme-menu {
	justify-content: center;
}

/* ---------- Page headings ---------- */
.akctheme-page-header {
	margin-bottom: 1.5rem;
}

.akctheme-page-header__label {
	margin: 0 0 0.25rem;
	font-weight: 700;
	color: var(--akctheme-heading);
}

.akctheme-section {
	margin: 0 0 1.5rem;
}

.akctheme-section__title a {
	color: inherit;
}

/*
 * Kit inline forms ("clean" style) reserve 56px at the top for a form heading
 * at widths of 700px and up; this form has no heading, so that space showed
 * as a gap under the divider on Home. Keep the divider's own 1.5rem rhythm.
 */
.akctheme-home .akctheme-home__after .formkit-form[data-uid] [data-style="clean"] {
	padding-top: 0;
}

.akctheme-section__title a:hover,
.akctheme-section__title a:focus {
	color: var(--akctheme-blue);
}

.akctheme-more-link {
	margin: 1rem 0 0;
	font-weight: 600;
}

/* ---------- Entries ---------- */
.akctheme-entry__media {
	margin: 0 0 1.5rem;
}

.akctheme-entry__media--square img {
	width: 100%;
	max-width: 400px;
	aspect-ratio: 1 / 1;
	margin: 0 auto;
	object-fit: cover;
}

.akctheme-entry__content > * + * {
	margin-top: 1em;
}

/*
 * Post sections (inc/post-template.php): the section groups have no padding or
 * border here, so they add no space of their own. Give the blocks inside a
 * section the same top margin they would have as direct children of the
 * content, including the first block of every section after the first, so a
 * post looks the same with or without sections.
 * Classic theme (no layout support): core/group renders its blocks inside
 * div.wp-block-group__inner-container, so cover both markups.
 */
.akctheme-entry__content > .akc-section > * + *,
.akctheme-entry__content > .akc-section > .wp-block-group__inner-container > * + *,
.akctheme-entry__content > * + .akc-section > :first-child:not(.wp-block-group__inner-container),
.akctheme-entry__content > * + .akc-section > .wp-block-group__inner-container > :first-child {
	margin-top: 1em;
}

.akctheme-entry__content .aligncenter {
	margin-right: auto;
	margin-left: auto;
}

.akctheme-entry__content figcaption {
	margin-top: 0.4em;
	font-size: var(--akctheme-font-size-small);
	text-align: center;
}

.akctheme-post-meta {
	margin: 0 0 1rem;
	font-size: var(--akctheme-font-size-small);
}

.akctheme-post-meta a {
	color: var(--akctheme-text);
}

.akctheme-sep {
	margin: 0 0.35em;
}

.akctheme-notice {
	padding: 0.75rem 1rem;
	border-left: 4px solid var(--akctheme-blue);
	background: var(--akctheme-soft);
}

/* ---------- Blog list ---------- */
.akctheme-blog-cats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.65rem;
	margin: 0 0 1.5rem;
	padding: 0 0 1rem;
	border-bottom: 1px solid var(--akctheme-line);
	font-size: 0.95rem;
}

.akctheme-blog-cats__label {
	margin-right: 0.25rem;
	font-weight: 600;
}

.akctheme-blog-cats__link {
	display: inline-block;
	padding: 0.25rem 0.7rem;
	border-radius: 999px;
	color: inherit;
	line-height: 1.4;
	background: var(--akctheme-soft);
}

.akctheme-blog-cats__link:hover,
.akctheme-blog-cats__link:focus {
	text-decoration: none;
	background: var(--akctheme-soft-hover);
}

/* Hide any stray .akc-blog-cats list (it links to another domain); the theme prints its own category list. */
.akc-blog-cats {
	display: none !important;
}

.akctheme-card {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin: 0 0 2.5rem;
}

.akctheme-card__media img {
	width: 160px;
	max-height: 160px;
	object-fit: cover;
}

.akctheme-card__title {
	margin-bottom: 0.25rem;
}

.akctheme-card__title a {
	color: inherit;
}

.akctheme-card__excerpt p:last-child {
	margin-bottom: 0;
}

.navigation.pagination {
	margin: 2rem 0;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

.nav-links .current {
	font-weight: 700;
}

/* ---------- Home ---------- */
.akctheme-feature {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.akctheme-feature__media img {
	width: 160px;
	height: auto;
}

.akctheme-feature__title a {
	color: inherit;
}

/* Make the whole card clickable through the title link. */
.akctheme-feature__link::after {
	position: absolute;
	inset: 0;
	content: "";
}

.akctheme-feature:hover .akctheme-feature__title a {
	color: var(--akctheme-blue);
}

.akctheme-feature__excerpt p:last-child {
	margin-bottom: 0;
}

/* ---------- Covers ---------- */
.akctheme-cover {
	display: block;
}

.akctheme-cover__img {
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.akctheme-cover__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 2 / 3;
	padding: 0.5rem;
	font-size: 0.8rem;
	text-align: center;
	color: var(--akctheme-heading);
	background: var(--akctheme-soft);
}

.akctheme-cover-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.akctheme-cover-grid--titled {
	grid-template-columns: repeat(2, minmax(0, 150px));
	justify-content: center;
}

.akctheme-cover-grid__title {
	margin: 0.4rem 0 0;
	font-size: 0.95rem;
	line-height: 1.3;
}

.akctheme-cover-grid__title a {
	color: inherit;
}

.akctheme-universe {
	margin-bottom: 2.5rem;
}

/* ---------- Book archive cards ---------- */
.akctheme-book-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.akctheme-book-card {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.akctheme-book-card__cover {
	flex: 0 0 96px;
}

.akctheme-book-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

.akctheme-book-card__title {
	margin-bottom: 0.4rem;
	font-size: 1.35rem;
}

.akctheme-book-card__title a {
	color: var(--akctheme-heading);
}

.akctheme-book-card__title a:hover,
.akctheme-book-card__title a:focus {
	color: var(--akctheme-blue);
}

.akctheme-book-card__tagline {
	margin-bottom: 0.6rem;
}

.akctheme-book-meta {
	margin: 0 0 0.4rem;
}

.akctheme-book-meta strong,
.akctheme-bylines strong {
	font-weight: 700;
}

.akctheme-book-card__more {
	margin: 0.4rem 0 0;
}

/* ---------- Single book ---------- */
.akctheme-book-detail {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.akctheme-book-detail__cover {
	margin: 0 auto;
	width: 100%;
	max-width: 320px;
}

.akctheme-book-detail__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin-bottom: 1rem;
}

.akctheme-book-detail__title {
	margin: 0;
}

.akctheme-book-detail__tagline {
	font-size: 1.05rem;
}

.akctheme-book-detail__facts,
.akctheme-book-detail__extra,
.akctheme-book-detail__content,
.akctheme-book-stores {
	margin-top: 1.25rem;
}

.akctheme-book-stores__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.akctheme-book-stores__item {
	margin: 0 0 0.35rem;
}

.akctheme-book-stores__name {
	font-weight: 600;
	color: var(--akctheme-heading);
}

.akctheme-button {
	display: inline-block;
	padding: 0.45rem 1.1rem;
	border: 2px solid var(--akctheme-blue);
	border-radius: 3px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--akctheme-blue);
	background: transparent;
}

.akctheme-button:hover,
.akctheme-button:focus {
	text-decoration: none;
	color: #fff;
	background: var(--akctheme-blue);
}

.akctheme-book-detail__buy {
	margin-top: 1.25rem;
}

/* ---------- 404 / no results / forms ---------- */
.akctheme-no-results {
	margin: 1rem 0 2rem;
}

.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
	max-width: 100%;
	padding: 0.5rem 0.65rem;
	border: 1px solid #bbb;
	font: inherit;
}

.search-submit,
input[type="submit"],
button {
	padding: 0.5rem 1rem;
	border: 0;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--akctheme-blue-dark);
	cursor: pointer;
}

/* ---------- Core blocks used in page content ---------- */
.wp-block-latest-posts__list li {
	display: flow-root;
}

.wp-block-post-template {
	padding-left: 0;
}

.wp-block-separator {
	border-top-color: var(--akctheme-blue);
}

/* ---------- Comments ---------- */
.comment-list {
	padding-left: 0;
	list-style: none;
}

.comment-list .children {
	padding-left: 1.5rem;
	list-style: none;
}

/* ---------- Core alignment / captions ---------- */
.alignleft {
	float: left;
	margin: 0 1.25rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0 0 1rem 1.25rem;
}

.aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
	font-size: var(--akctheme-font-size-small);
}

.sticky,
.bypostauthor {
	display: block;
}

/* ---------- Tablet and up ---------- */
@media (min-width: 600px) {

	.akctheme-cover-grid--titled {
		grid-template-columns: repeat(4, minmax(0, 150px));
	}

	.akctheme-cover-grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	}

	.akctheme-feature {
		flex-direction: row;
		align-items: flex-start;
	}

	.akctheme-feature__media {
		flex: 0 0 160px;
	}

	.akctheme-book-card__cover {
		flex-basis: 112px;
	}

	.akctheme-brand__logo img {
		width: 72px;
	}
}

@media (min-width: 768px) {

	.akctheme-card {
		grid-template-columns: 160px minmax(0, 1fr);
		column-gap: 1.5rem;
	}

	.akctheme-book-detail {
		flex-direction: row;
		align-items: flex-start;
		gap: 2rem;
	}

	.akctheme-book-detail__cover {
		flex: 0 0 min(360px, 38%);
		margin: 0;
	}

	.akctheme-book-detail__body {
		flex: 1 1 auto;
		min-width: 0;
	}
}

/* ---------- Desktop ---------- */
@media (min-width: 981px) {

	.akctheme-card {
		grid-template-columns: 200px minmax(0, 1fr);
	}

	.akctheme-card__media img {
		width: 200px;
		max-height: 200px;
	}
}

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}

@media print {

	.akctheme-header nav,
	.akctheme-footer,
	.akctheme-skip-link {
		display: none;
	}
}
