/*
Theme Name: Quiet Hours
Theme URI: https://example.com/quiet-hours
Author: OpenAI Codex
Author URI: https://openai.com/
Description: A calm editorial WordPress theme for literary writing, studio practice, curated objects, and intimate gatherings.
Requires at least: 6.6
Tested up to: 6.6
Requires PHP: 8.0
Version: 1.0.0
Text Domain: quiet-hours
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--qh-paper: #f6f0e6;
	--qh-ivory: #fbf7f1;
	--qh-ink: #1f1c1a;
	--qh-muted: #61554c;
	--qh-sage: #667163;
	--qh-mulberry: #6f2c32;
	--qh-brass: #a4874f;
	--qh-stone: #c9bdae;
	--qh-line: #ddd2c5;
	--qh-shadow: 0 18px 40px rgba(31, 28, 26, 0.05);
	--qh-radius-soft: 0.8rem;
	--qh-radius-pill: 999px;
	--qh-site-max: 74rem;
	--qh-content-max: 44rem;
	--qh-space-2xs: 0.375rem;
	--qh-space-xs: 0.75rem;
	--qh-space-s: 1.125rem;
	--qh-space-m: 1.5rem;
	--qh-space-l: 2.25rem;
	--qh-space-xl: 3.5rem;
	--qh-space-2xl: 5rem;
	--qh-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Baskerville, Georgia, serif;
	--qh-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--qh-paper);
	color: var(--qh-ink);
	font-family: var(--qh-sans);
	font-size: 1rem;
	line-height: 1.7;
	text-rendering: optimizeLegibility;
}

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

a {
	color: inherit;
	text-decoration-color: rgba(111, 44, 50, 0.42);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
	text-decoration-color: var(--qh-mulberry);
}

button,
input,
select,
textarea {
	font: inherit;
}

:focus-visible {
	outline: 2px solid var(--qh-mulberry);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed;
	left: var(--qh-space-s);
	top: var(--qh-space-s);
	width: auto;
	height: auto;
	padding: 0.9rem 1rem;
	background: var(--qh-ink);
	color: var(--qh-ivory);
	z-index: 999;
	clip: auto;
}

.site-shell {
	width: min(calc(100% - 2rem), var(--qh-site-max));
	margin-inline: auto;
}

.site-main {
	padding-bottom: var(--qh-space-2xl);
}

.content-section {
	padding: var(--qh-space-xl) 0;
}

.content-section--tinted,
.archive-filter-strip {
	background: rgba(251, 247, 241, 0.8);
}

.section-label,
.site-kicker,
.entry-card__type,
.eyebrow-note {
	margin: 0 0 var(--qh-space-xs);
	color: var(--qh-sage);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.entry-card__title,
.motif-card__title,
.newsletter-card h2 {
	font-family: var(--qh-serif);
	font-weight: 500;
	letter-spacing: -0.015em;
	line-height: 1.12;
}

h1 {
	font-size: clamp(2.4rem, 5vw, 4.7rem);
	margin: 0;
}

h2 {
	font-size: clamp(1.7rem, 3.2vw, 2.75rem);
	margin: 0;
}

h3 {
	font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}

p,
ul,
ol,
figure {
	margin: 0;
}

.prose,
.entry-content {
	max-width: var(--qh-content-max);
}

.prose > * + *,
.entry-content > * + * {
	margin-top: 1.25em;
}

.prose p,
.entry-content p,
.prose li,
.entry-content li {
	color: var(--qh-ink);
	font-size: 1.05rem;
}

.entry-content ul,
.entry-content ol,
.prose ul,
.prose ol {
	padding-left: 1.35rem;
}

.entry-content blockquote,
.prose blockquote {
	margin: 2rem 0;
	padding-left: 1.25rem;
	border-left: 2px solid var(--qh-stone);
	color: var(--qh-muted);
	font-family: var(--qh-serif);
	font-size: 1.15rem;
}

.button,
.wp-element-button,
button,
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.8rem 1.15rem;
	border: 1px solid var(--qh-ink);
	border-radius: var(--qh-radius-pill);
	background: var(--qh-ink);
	color: var(--qh-ivory);
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible,
.wp-element-button:hover,
.wp-element-button:focus-visible,
button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
	transform: translateY(-1px);
	background: var(--qh-mulberry);
	border-color: var(--qh-mulberry);
	color: var(--qh-ivory);
	text-decoration: none;
}

.button--subtle,
.search-form .button {
	background: transparent;
	color: var(--qh-ink);
	border-color: var(--qh-line);
}

.button--subtle:hover,
.button--subtle:focus-visible,
.search-form .button:hover,
.search-form .button:focus-visible {
	background: var(--qh-ink);
	border-color: var(--qh-ink);
	color: var(--qh-ivory);
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin-top: var(--qh-space-l);
}

.button-row--small {
	margin-top: var(--qh-space-s);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(246, 240, 230, 0.96);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid rgba(201, 189, 174, 0.7);
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--qh-space-s);
	padding: 1rem 0;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: var(--qh-space-s);
	min-width: 0;
}

.site-logo img {
	max-height: 3.2rem;
	width: auto;
}

.site-branding__text {
	display: grid;
	gap: 0.2rem;
}

.site-title {
	font-size: 1.45rem;
	text-decoration: none;
}

.site-kicker {
	margin: 0;
	color: var(--qh-muted);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
}

.nav-toggle {
	border-radius: var(--qh-radius-pill);
	background: transparent;
	color: var(--qh-ink);
	border-color: var(--qh-line);
}

.primary-navigation {
	width: 100%;
}

.primary-navigation ul,
.footer-menu,
.term-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.primary-navigation ul {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.primary-navigation a,
.footer-menu a {
	display: inline-block;
	padding: 0.45rem 0;
	text-decoration: none;
}

.has-js .primary-navigation {
	display: none;
}

.has-js .primary-navigation.is-open {
	display: block;
}

.hero {
	padding: clamp(3.5rem, 8vw, 6rem) 0 var(--qh-space-xl);
	background:
		radial-gradient(circle at top right, rgba(164, 135, 79, 0.1), transparent 30%),
		linear-gradient(180deg, rgba(251, 247, 241, 0.7), rgba(246, 240, 230, 0));
}

.hero__grid,
.page-intro__grid,
.section-heading,
.site-footer__grid,
.entry-header__grid,
.entry-object-grid {
	display: grid;
	gap: var(--qh-space-l);
}

.hero__lede,
.footer-note,
.entry-standfirst {
	font-size: 1.12rem;
	color: var(--qh-muted);
}

.hero__aside,
.note-panel,
.empty-state,
.newsletter-card,
.motif-card,
.entry-card,
.archive-filter-strip__inner,
.entry-header__aside,
.object-meta-panel {
	border: 1px solid rgba(201, 189, 174, 0.88);
	border-radius: var(--qh-radius-soft);
	background: rgba(251, 247, 241, 0.78);
	box-shadow: var(--qh-shadow);
}

.hero__aside,
.note-panel,
.empty-state,
.entry-header__aside,
.object-meta-panel {
	padding: var(--qh-space-m);
}

.quiet-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.7rem;
}

.page-intro {
	padding: var(--qh-space-xl) 0 var(--qh-space-l);
	border-bottom: 1px solid rgba(201, 189, 174, 0.55);
}

.archive-note {
	color: var(--qh-muted);
	font-size: 0.95rem;
}

.archive-filter-strip__inner {
	display: grid;
	gap: var(--qh-space-m);
	padding: var(--qh-space-s);
}

.filter-form {
	display: grid;
	gap: 0.5rem;
}

.filter-form label {
	font-size: 0.95rem;
	font-weight: 600;
}

.filter-form select,
.search-field,
input[type="email"],
input[type="text"],
input[type="url"],
input[type="search"],
textarea {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid var(--qh-line);
	border-radius: var(--qh-radius-soft);
	background: #fffdf9;
	color: var(--qh-ink);
}

.section-heading {
	align-items: end;
	margin-bottom: var(--qh-space-l);
}

.section-link {
	font-weight: 600;
	justify-self: start;
}

.card-grid {
	display: grid;
	gap: var(--qh-space-m);
}

.card-grid--two {
	grid-template-columns: 1fr;
}

.entry-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform 180ms ease, border-color 180ms ease;
}

.entry-card:hover,
.entry-card:focus-within {
	transform: translateY(-2px);
	border-color: var(--qh-sage);
}

.entry-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: linear-gradient(180deg, rgba(164, 135, 79, 0.18), rgba(102, 113, 99, 0.12));
}

.entry-card__media--portrait,
.entry-figure--portrait {
	aspect-ratio: 4 / 5;
}

.entry-card__image,
.entry-figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card__placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	min-height: 15rem;
	padding: var(--qh-space-m);
	background:
		linear-gradient(135deg, rgba(164, 135, 79, 0.12), rgba(102, 113, 99, 0.14)),
		repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2) 10px, transparent 10px, transparent 20px);
	color: var(--qh-muted);
	font-family: var(--qh-serif);
	font-size: 1.15rem;
	text-align: center;
}

.entry-card__body {
	display: grid;
	gap: 0.9rem;
	padding: var(--qh-space-m);
}

.entry-card__topline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
}

.entry-card__title {
	font-size: clamp(1.35rem, 2.4vw, 1.85rem);
	margin: 0;
}

.entry-card__title a {
	text-decoration: none;
}

.entry-card__aside {
	color: var(--qh-muted);
	font-size: 0.95rem;
}

.entry-card--lead {
	display: grid;
}

.entry-card--lead .entry-card__title {
	font-size: clamp(2rem, 3.8vw, 3rem);
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	color: var(--qh-muted);
	font-size: 0.92rem;
}

.entry-meta span {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.term-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.term-list--wide {
	gap: 0.65rem;
}

.term-list a {
	display: inline-flex;
	align-items: center;
	padding: 0.42rem 0.78rem;
	border: 1px solid rgba(201, 189, 174, 0.95);
	border-radius: var(--qh-radius-pill);
	background: rgba(255, 255, 255, 0.42);
	color: var(--qh-muted);
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
}

.term-list a:hover,
.term-list a:focus-visible {
	border-color: var(--qh-sage);
	color: var(--qh-ink);
}

.motif-grid {
	display: grid;
	gap: var(--qh-space-m);
}

.motif-card {
	padding: var(--qh-space-m);
}

.motif-card__title {
	margin: 0 0 0.5rem;
	font-size: 1.55rem;
}

.entry-single {
	padding-top: var(--qh-space-l);
}

.entry-header--single {
	padding-bottom: var(--qh-space-l);
}

.entry-header__aside {
	align-self: start;
	color: var(--qh-muted);
}

.entry-figure {
	margin: 0;
	overflow: hidden;
	border-radius: var(--qh-radius-soft);
	border: 1px solid rgba(201, 189, 174, 0.88);
	box-shadow: var(--qh-shadow);
}

.entry-object-grid {
	align-items: start;
}

.entry-footer {
	padding-top: var(--qh-space-s);
	border-top: 1px solid rgba(201, 189, 174, 0.7);
}

.entry-single--post .entry-content > p:first-of-type::first-letter {
	float: left;
	padding-right: 0.12em;
	color: var(--qh-mulberry);
	font-family: var(--qh-serif);
	font-size: 3.6em;
	line-height: 0.82;
}

.newsletter-card {
	display: grid;
	gap: var(--qh-space-l);
	padding: var(--qh-space-l);
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0)),
		rgba(251, 247, 241, 0.92);
}

.newsletter-card__form {
	display: grid;
	gap: 0.85rem;
	align-content: start;
}

.newsletter-card form {
	display: grid;
	gap: 0.75rem;
}

.empty-state {
	display: grid;
	gap: 0.8rem;
	padding: var(--qh-space-l);
}

.content-stack {
	display: grid;
	gap: var(--qh-space-m);
}

.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: center;
}

.search-form .search-field {
	flex: 1 1 14rem;
}

.pagination-wrap {
	display: flex;
	justify-content: center;
	margin-top: var(--qh-space-l);
}

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

.nav-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.6rem;
	padding: 0.6rem 0.9rem;
	border: 1px solid var(--qh-line);
	border-radius: var(--qh-radius-pill);
	background: rgba(255, 255, 255, 0.5);
	text-decoration: none;
}

.nav-links .current {
	background: var(--qh-ink);
	color: var(--qh-ivory);
	border-color: var(--qh-ink);
}

.site-footer {
	border-top: 1px solid rgba(201, 189, 174, 0.7);
	padding: var(--qh-space-xl) 0 var(--qh-space-l);
	background: rgba(251, 247, 241, 0.55);
}

.site-footer__bottom {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding-top: var(--qh-space-l);
	margin-top: var(--qh-space-l);
	border-top: 1px solid rgba(201, 189, 174, 0.55);
	color: var(--qh-muted);
	font-size: 0.92rem;
}

.footer-column {
	display: grid;
	gap: 0.75rem;
}

.footer-menu {
	display: grid;
	gap: 0.2rem;
}

.footer-presence {
	display: grid;
	gap: 0.6rem;
	margin-top: var(--qh-space-s);
}

.wp-block-image img,
.wp-block-cover,
.wp-block-gallery {
	border-radius: var(--qh-radius-soft);
}

.wp-block-separator {
	border: 0;
	border-top: 1px solid rgba(201, 189, 174, 0.72);
}

.wp-block-pullquote {
	border-top: 1px solid rgba(201, 189, 174, 0.72);
	border-bottom: 1px solid rgba(201, 189, 174, 0.72);
	padding: var(--qh-space-m) 0;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	border: 1px solid rgba(201, 189, 174, 0.88);
	border-radius: var(--qh-radius-soft);
	padding: var(--qh-space-m);
	background: rgba(251, 247, 241, 0.78);
}

@media (min-width: 48rem) {
	.site-shell {
		width: min(calc(100% - 3rem), var(--qh-site-max));
	}

	.card-grid,
	.motif-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.card-grid--objects {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.card-grid--two,
	.site-footer__grid,
	.page-intro__grid,
	.section-heading,
	.entry-object-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.section-heading {
		align-items: end;
	}

	.newsletter-card {
		grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.9fr);
		align-items: center;
	}

	.entry-card--lead {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	}
}

@media (min-width: 64rem) {
	.nav-toggle {
		display: none;
	}

	.has-js .primary-navigation,
	.primary-navigation {
		display: block;
		width: auto;
	}

	.primary-navigation ul {
		flex-direction: row;
		align-items: center;
		gap: 1.15rem;
	}

	.primary-navigation a {
		padding: 0.35rem 0;
	}

	.hero__grid,
	.entry-header__grid {
		grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr);
		align-items: end;
	}

	.card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.card-grid--objects {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.motif-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.site-footer__grid {
		grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
	}

	.site-footer__bottom {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
