/*
Theme Name: Shribble Publishing
Theme URI: https://www.shribblepublishing.com/
Description: Custom book-catalog theme for Shribble Publishing.
Author: Shribble Publishing
Version: 1.0.0
Text Domain: shribble
*/

/*
Palette and type pairing matched to thequestionhabit.com (one of Mandy's
other Avada sites, explicitly named as a visual reference in the build
spec): warm cream background, charcoal-navy text, gold accent, DM Serif
Display for headlines over DM Sans for body/nav.
*/
:root {
	--sh-bg: #fef7e9;
	--sh-bg-alt: #f8ecd3;
	--sh-text: #212934;
	--sh-text-muted: #4f4f4f;
	--sh-accent: #f4b429;
	--sh-border: #e4d9bd;
	--sh-footer-bg: #212934;
	--sh-footer-text: #fef7e9;
	--sh-max-width: 1160px;
	--sh-radius: 6px;
	--sh-font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--sh-font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--sh-bg);
	color: var(--sh-text);
	font-family: var(--sh-font-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
}

h1, h2, h3, h4 {
	font-family: var(--sh-font-display);
	line-height: 1.2;
	margin: 0 0 0.5em;
}

h3 {
	margin-top: 1.5em;
}

.sh-container {
	max-width: var(--sh-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.sh-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Header */
.sh-header {
	background: var(--sh-bg);
	border-bottom: 1px solid var(--sh-border);
	position: sticky;
	top: 0;
	z-index: 20;
}

.sh-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
}

.sh-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	font-family: var(--sh-font-display);
	font-size: 1.25rem;
	font-weight: bold;
	color: var(--sh-text);
}

.sh-logo img {
	height: 40px;
	width: 40px;
}

.sh-nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--sh-border);
	border-radius: var(--sh-radius);
	padding: 8px 12px;
	font-size: 1rem;
	cursor: pointer;
}

.sh-nav ul {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
}

.sh-nav a {
	text-decoration: none;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	color: var(--sh-text);
}

.sh-nav a:hover {
	color: var(--sh-accent);
}

@media (max-width: 720px) {
	.sh-nav-toggle {
		display: block;
	}
	.sh-nav {
		display: none;
		width: 100%;
	}
	.sh-nav.is-open {
		display: block;
	}
	.sh-nav ul {
		flex-direction: column;
		gap: 0;
		padding: 8px 24px 20px;
	}
	.sh-nav li {
		padding: 10px 0;
		border-bottom: 1px solid var(--sh-border);
	}
	.sh-header-inner {
		flex-wrap: wrap;
	}
}

/* Masthead / hero */
.sh-masthead {
	padding: 72px 24px;
	text-align: center;
}

.sh-masthead img.sh-masthead-logo {
	height: 72px;
	width: 72px;
	margin: 0 auto 24px;
}

.sh-masthead h1 {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	max-width: 720px;
	margin: 0 auto 16px;
}

.sh-masthead p {
	color: var(--sh-text-muted);
	max-width: 560px;
	margin: 0 auto;
	font-size: 1.05rem;
}

/* Book / author grids */
.sh-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 32px;
	padding: 0 24px 64px;
}

.sh-section-heading {
	text-align: center;
	padding: 48px 24px 8px;
}

.sh-card {
	text-decoration: none;
	color: var(--sh-text);
	display: block;
}

.sh-card-cover {
	aspect-ratio: 2 / 3;
	background: var(--sh-bg-alt);
	border-radius: var(--sh-radius);
	overflow: hidden;
	margin-bottom: 14px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.sh-card-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sh-card-photo {
	aspect-ratio: 1 / 1;
	background: var(--sh-bg-alt);
	border-radius: 50%;
	overflow: hidden;
	margin: 0 auto 14px;
	width: 160px;
}

.sh-card-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sh-card h3 {
	font-size: 1.05rem;
	margin-bottom: 4px;
}

.sh-card-meta {
	font-size: 0.85rem;
	color: var(--sh-text-muted);
}

.sh-badge {
	display: inline-block;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: var(--sh-accent);
	color: var(--sh-text);
	padding: 3px 10px;
	border-radius: 999px;
	margin-bottom: 8px;
}

/* Single book / author */
.sh-single-book,
.sh-single-author {
	padding: 56px 24px 80px;
}

.sh-single-book-hero,
.sh-single-author-hero {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 48px;
	max-width: var(--sh-max-width);
	margin: 0 auto 48px;
}

.sh-single-author-hero {
	grid-template-columns: 220px 1fr;
	align-items: start;
}

@media (max-width: 780px) {
	.sh-single-book-hero,
	.sh-single-author-hero {
		grid-template-columns: 1fr;
	}
}

.sh-single-book-cover img {
	border-radius: var(--sh-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.sh-single-author-photo img {
	border-radius: 50%;
	aspect-ratio: 1/1;
	object-fit: cover;
}

.sh-tagline {
	font-size: 1.15rem;
	color: var(--sh-text-muted);
	margin-bottom: 20px;
}

.sh-formats {
	font-size: 0.85rem;
	color: var(--sh-text-muted);
	margin-bottom: 12px;
}

.sh-contributors a {
	text-decoration: underline;
	text-decoration-color: var(--sh-border);
	text-underline-offset: 3px;
}

.sh-cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 24px 0;
}

.sh-btn {
	display: inline-block;
	padding: 12px 22px;
	border-radius: var(--sh-radius);
	text-decoration: none;
	font-size: 0.95rem;
	border: 1px solid var(--sh-text);
	color: var(--sh-text);
}

.sh-btn-primary {
	background: var(--sh-text);
	color: #fff;
}

.sh-retailer-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0;
}

.sh-retailer-row a {
	font-size: 0.85rem;
	padding: 6px 14px;
	border: 1px solid var(--sh-border);
	border-radius: 999px;
	text-decoration: none;
}

.sh-audiobook-callout {
	background: var(--sh-bg-alt);
	border-radius: var(--sh-radius);
	padding: 24px;
	margin: 32px 0;
	max-width: var(--sh-max-width);
	margin-left: auto;
	margin-right: auto;
}

.sh-series-module {
	max-width: var(--sh-max-width);
	margin: 56px auto 0;
	padding-top: 32px;
	border-top: 1px solid var(--sh-border);
}

.sh-series-list {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.sh-series-list a {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--sh-text);
}

.sh-series-list img {
	width: 56px;
	height: 84px;
	object-fit: cover;
	border-radius: 4px;
}

.sh-pull-quote {
	font-family: var(--sh-font-display);
	font-style: italic;
	font-size: 1.1rem;
	color: var(--sh-text-muted);
	margin: 12px 0 20px;
}

.sh-social-links {
	display: flex;
	gap: 14px;
	margin-top: 16px;
}

.sh-social-links a {
	text-decoration: none;
	font-size: 0.85rem;
	border-bottom: 1px solid var(--sh-border);
}

/* Static pages */
.sh-page-content {
	max-width: 760px;
	margin: 0 auto;
	padding: 56px 24px 80px;
}

.sh-page-content h1 {
	margin-bottom: 24px;
}

/* Contact form */
.sh-contact-form {
	max-width: 520px;
}

.sh-form-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sh-form-row {
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sh-form-row label {
	font-size: 0.85rem;
	color: var(--sh-text-muted);
}

.sh-form-row input,
.sh-form-row textarea {
	font: inherit;
	padding: 10px 12px;
	border: 1px solid var(--sh-border);
	border-radius: var(--sh-radius);
	background: #fff;
	color: var(--sh-text);
}

.sh-form-notice {
	padding: 12px 16px;
	border-radius: var(--sh-radius);
	margin-bottom: 20px;
	font-size: 0.9rem;
}

.sh-form-notice-success {
	background: #e4f3ec;
	color: #1d5f42;
}

.sh-form-notice-error {
	background: #fbe6e6;
	color: #8a2c2c;
}

.sh-footer .sh-contact-form {
	max-width: 100%;
}

.sh-footer .sh-form-row input,
.sh-footer .sh-form-row textarea {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.2);
	color: var(--sh-footer-text);
}

.sh-footer .sh-form-row label {
	color: rgba(255, 255, 255, 0.7);
}

/* Scripture quote */
.sh-scripture-quote {
	padding: 0 24px 64px;
}

.sh-scripture-quote blockquote {
	max-width: 720px;
	margin: 0 auto;
	padding: 40px 48px;
	background: var(--sh-bg-alt);
	border-top: 3px solid var(--sh-accent);
	border-radius: var(--sh-radius);
	text-align: center;
}

.sh-scripture-quote p {
	font-family: var(--sh-font-display);
	font-style: italic;
	font-size: 1.2rem;
	line-height: 1.5;
	color: var(--sh-text);
	margin: 0 0 16px;
}

.sh-scripture-quote cite {
	font-style: normal;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	color: var(--sh-text-muted);
}

/* Footer */
.sh-footer {
	background: var(--sh-footer-bg);
	color: var(--sh-footer-text);
	padding: 56px 24px 32px;
	margin-top: 64px;
}

.sh-footer-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	max-width: var(--sh-max-width);
	margin: 0 auto;
}

@media (max-width: 720px) {
	.sh-footer-grid {
		grid-template-columns: 1fr;
	}
}

.sh-footer h4 {
	font-family: var(--sh-font-body);
	text-transform: uppercase;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	color: var(--sh-footer-text);
	opacity: 0.7;
	margin-bottom: 14px;
}

.sh-footer a {
	color: var(--sh-footer-text);
	text-decoration: none;
	opacity: 0.9;
}

.sh-footer a:hover {
	opacity: 1;
	text-decoration: underline;
}

.sh-footer-logo {
	height: 32px;
	width: 32px;
	margin-bottom: 12px;
}

.sh-footer-social {
	display: flex;
	gap: 16px;
	margin-top: 12px;
}

.sh-footer-bottom {
	max-width: var(--sh-max-width);
	margin: 40px auto 0;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.8rem;
	opacity: 0.7;
	text-align: center;
}

/* 404 */
.sh-404 {
	max-width: 640px;
	margin: 0 auto;
	padding: 96px 24px;
	text-align: center;
}
