/*
Theme Name: Room Moods
Theme URI: https://roommoods.com/
Author: Room Moods
Description: Fast, SEO-ready classic theme for a Pinterest-driven home decor blog. Self-hosted fonts, no jQuery, JSON-LD, Open Graph and Rich Pin tags, automatic table of contents, affiliate disclosure, seasonal "mood" skins, and article components for "one room, many styles" posts.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: roommoods
*/

/* ------------------------------------------------------------------
   Fonts (self-hosted, latin subset, OFL)
------------------------------------------------------------------- */
@font-face {
	font-family: "Fraunces";
	src: url("assets/fonts/fraunces-latin.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Inter";
	src: url("assets/fonts/inter-latin.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

/* ------------------------------------------------------------------
   Tokens. Default mood: warm linen, espresso ink, clay accent, sage.
   Seasonal moods (option roommoods_mood) swap the accent set only.
------------------------------------------------------------------- */
:root {
	--bg: #faf6f0;
	--surface: #ffffff;
	--ink: #2b2622;
	--muted: #6b615a;
	--line: #e7dfd4;
	--accent: #a65f45;
	--accent-strong: #8a4b35;
	--accent-ink: #ffffff;
	--sage: #6f7f64;
	--sand: #efe4d4;
	--tint: #f6ede3;

	--font-head: "Fraunces", Georgia, "Times New Roman", serif;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(43, 38, 34, 0.06), 0 6px 20px rgba(43, 38, 34, 0.06);
	--measure: 720px;
	--wide: 1200px;
}

body.mood-fall {
	--bg: #fbf5ee;
	--accent: #9a4e2a;
	--accent-strong: #7e3f21;
	--sage: #6d6a3c;
	--sand: #f1e2cf;
	--tint: #f7ebdd;
}
body.mood-holiday {
	--bg: #faf7f2;
	--accent: #8c2f2f;
	--accent-strong: #722626;
	--sage: #2f5b47;
	--sand: #ece6db;
	--tint: #f4eee6;
}
body.mood-spring {
	--bg: #f9faf5;
	--accent: #56764f;
	--accent-strong: #44603e;
	--sage: #8a6a9e;
	--sand: #e9eedf;
	--tint: #f0f4e8;
}
body.mood-summer {
	--bg: #f7faf9;
	--accent: #2e6b75;
	--accent-strong: #235760;
	--sage: #b0794b;
	--sand: #e3eeee;
	--tint: #edf4f3;
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.7;
	text-rendering: optimizeLegibility;
}
img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}
a {
	color: var(--accent-strong);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
a:hover {
	color: var(--accent);
}
:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}
h1,
h2,
h3,
h4 {
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--ink);
	margin: 0 0 0.5em;
}
h1 {
	font-size: clamp(2rem, 4.5vw, 2.9rem);
}
h2 {
	font-size: clamp(1.5rem, 3vw, 1.95rem);
}
h3 {
	font-size: 1.3rem;
}
p {
	margin: 0 0 1.1em;
}
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto;
	width: auto;
	height: auto;
	z-index: 100;
	top: 8px;
	left: 8px;
	padding: 8px 14px;
	background: var(--surface);
	color: var(--ink);
}

/* ------------------------------------------------------------------
   Header / footer
------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	backdrop-filter: saturate(1.2) blur(8px);
	border-bottom: 1px solid var(--line);
}
.header-inner {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	gap: 24px;
}
.wordmark {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-head);
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: -0.02em;
}
.wordmark-mark {
	width: 22px;
	height: 22px;
	border-radius: 50% 50% 50% 4px;
	background: conic-gradient(var(--accent) 0 25%, var(--sand) 0 50%, var(--sage) 0 75%, var(--ink) 0);
}
.site-nav {
	margin-left: auto;
	overflow-x: auto;
}
.primary-menu {
	list-style: none;
	display: flex;
	gap: 22px;
	margin: 0;
	padding: 0;
	white-space: nowrap;
}
.primary-menu a {
	color: var(--ink);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
}
.primary-menu a:hover,
.primary-menu .current-menu-item a {
	color: var(--accent-strong);
}
.search-toggle {
	color: var(--ink);
	display: inline-flex;
	padding: 6px;
}
.site-main {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 28px 20px 64px;
}
.site-footer {
	border-top: 1px solid var(--line);
	background: var(--tint);
	padding: 40px 20px 24px;
	font-size: 0.95rem;
}
.footer-inner {
	max-width: var(--wide);
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 24px 48px;
	justify-content: space-between;
}
.footer-name {
	font-family: var(--font-head);
	font-size: 1.3rem;
	font-weight: 600;
	margin: 0 0 4px;
}
.footer-tagline {
	color: var(--muted);
}
.footer-menu,
.footer-menu ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin: 0;
	padding: 0;
}
.footer-menu a {
	color: var(--ink);
	text-decoration: none;
}
.footer-legal {
	max-width: var(--wide);
	margin: 28px auto 0;
	color: var(--muted);
	font-size: 0.85rem;
}

/* ------------------------------------------------------------------
   Shared bits: kicker, chips, buttons, breadcrumbs, search form
------------------------------------------------------------------- */
.kicker {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent-strong);
	text-decoration: none;
	margin-bottom: 8px;
}
.chips {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
}
.chips a {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	text-decoration: none;
	font-size: 0.9rem;
}
.chips a:hover {
	border-color: var(--accent);
	color: var(--accent-strong);
}
.button,
.search-submit,
.wp-block-button__link {
	display: inline-block;
	padding: 11px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-ink);
	font: 600 0.95rem/1.2 var(--font-body);
	text-decoration: none;
	cursor: pointer;
}
.button:hover,
.search-submit:hover {
	background: var(--accent-strong);
	color: var(--accent-ink);
}
.breadcrumbs ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 18px;
	padding: 0;
	font-size: 0.85rem;
	color: var(--muted);
}
.breadcrumbs li + li::before {
	content: "/";
	margin: 0 6px;
	color: var(--line);
}
.breadcrumbs a {
	color: var(--muted);
	text-decoration: none;
}
.search-form {
	display: flex;
	gap: 8px;
	max-width: 520px;
	margin: 16px 0 24px;
}
.search-form label {
	flex: 1;
}
.search-field {
	width: 100%;
	padding: 11px 16px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	font: inherit;
}

/* ------------------------------------------------------------------
   Home + archives + cards (2:3, same shape as the pins)
------------------------------------------------------------------- */
.home-intro {
	max-width: 820px;
	margin: 12px 0 40px;
}
.home-title {
	font-size: clamp(2.1rem, 5vw, 3.2rem);
}
.home-lede {
	font-size: 1.15rem;
	color: var(--muted);
	max-width: 640px;
}
.chip-row {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-top: 14px;
}
.chip-label {
	flex: 0 0 64px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}
.section-title {
	font-size: 1.5rem;
	margin: 0 0 18px;
}
.archive-header {
	max-width: 820px;
	margin-bottom: 28px;
}
.archive-description {
	color: var(--muted);
	font-size: 1.05rem;
}
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 28px 22px;
}
.post-card-link {
	display: block;
	color: var(--ink);
	text-decoration: none;
}
.post-card-thumb {
	display: block;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--sand);
	box-shadow: var(--shadow);
}
.post-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}
.post-card-link:hover .post-card-thumb img {
	transform: scale(1.03);
}
.post-card-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(160deg, var(--sand), var(--tint));
}
.post-card-body {
	display: block;
	padding: 12px 2px 0;
}
.post-card-body .kicker {
	margin-bottom: 4px;
}
.post-card-title {
	display: block;
	font-family: var(--font-head);
	font-size: 1.12rem;
	font-weight: 600;
	line-height: 1.3;
}
.pagination {
	margin-top: 40px;
}
.nav-links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.page-numbers {
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	text-decoration: none;
	color: var(--ink);
	background: var(--surface);
}
.page-numbers.current {
	background: var(--ink);
	color: var(--bg);
	border-color: var(--ink);
}
.empty-state,
.not-found {
	max-width: 640px;
}

/* ------------------------------------------------------------------
   Single article
------------------------------------------------------------------- */
.article {
	max-width: var(--measure);
	margin: 0 auto;
}
.entry-header {
	margin-bottom: 22px;
}
.entry-dek {
	font-size: 1.2rem;
	color: var(--muted);
	line-height: 1.55;
}
.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 0.9rem;
	color: var(--muted);
	margin: 0;
}
.entry-author {
	font-weight: 600;
	color: var(--ink);
}
.entry-hero {
	position: relative;
	max-width: 560px;
	margin: 0 auto 32px;
}
.entry-hero img {
	width: 100%;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.pin-button {
	position: absolute;
	top: 14px;
	right: 14px;
	padding: 8px 16px;
	border-radius: 999px;
	background: #e60023;
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}
.entry-hero:hover .pin-button,
.entry-hero:focus-within .pin-button {
	opacity: 1;
}
@media (hover: none) {
	.pin-button {
		opacity: 1;
	}
}
.pin-button:hover {
	color: #fff;
	background: #ad081b;
}

.entry-content > * {
	margin-top: 0;
}
.entry-content h2 {
	margin-top: 2em;
	scroll-margin-top: 90px;
}
.entry-content h3 {
	margin-top: 1.6em;
	scroll-margin-top: 90px;
}
.entry-content ul,
.entry-content ol {
	padding-left: 1.3em;
	margin: 0 0 1.2em;
}
.entry-content li {
	margin-bottom: 0.35em;
}
.entry-content li::marker {
	color: var(--accent);
}
.entry-content img {
	border-radius: var(--radius-sm);
}
.entry-content figure {
	margin: 1.6em 0;
}
.entry-content figcaption {
	font-size: 0.88rem;
	color: var(--muted);
	margin-top: 8px;
	text-align: center;
}
.entry-content blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--accent);
	font-family: var(--font-head);
	font-size: 1.25rem;
	line-height: 1.45;
}
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.6em 0;
	font-size: 0.95rem;
	background: var(--surface);
	border-radius: var(--radius-sm);
	overflow: hidden;
	box-shadow: var(--shadow);
}
.entry-content th,
.entry-content td {
	padding: 11px 14px;
	text-align: left;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}
.entry-content th {
	background: var(--tint);
	font-weight: 600;
}
.entry-content tr:last-child td {
	border-bottom: 0;
}
.entry-content hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 2.4em 0;
}

/* Disclosure (added automatically by inc/content.php) */
.rm-disclosure {
	font-size: 0.85rem;
	color: var(--muted);
	padding: 10px 14px;
	border: 1px dashed var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
}

/* Table of contents (added automatically when a post has 3+ H2s) */
.rm-toc {
	margin: 1.6em 0;
	padding: 16px 20px;
	border-radius: var(--radius);
	background: var(--tint);
	border: 1px solid var(--line);
}
.rm-toc summary {
	cursor: pointer;
	font-family: var(--font-head);
	font-weight: 600;
	font-size: 1.1rem;
}
.rm-toc ol {
	margin: 10px 0 0;
	padding-left: 1.3em;
	columns: 2 240px;
	column-gap: 28px;
}
.rm-toc a {
	color: var(--ink);
	text-decoration: none;
}
.rm-toc a:hover {
	color: var(--accent-strong);
}

/* ------------------------------------------------------------------
   Article components (format: engine/prompts/formats/home-decor.md)
------------------------------------------------------------------- */

/* One room, many styles: a grid of the same room restyled. */
.rm-styles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
	margin: 1.6em 0;
}
.rm-styles figure {
	margin: 0;
	position: relative;
}
.rm-styles img {
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: var(--radius-sm);
}
.rm-styles figcaption {
	position: absolute;
	left: 10px;
	bottom: 10px;
	margin: 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ink);
	font-size: 0.82rem;
	font-weight: 600;
	text-align: left;
}

/* Palette swatches: <ul class="rm-palette"><li style="--c:#c9b79c">Oat</li></ul> */
.entry-content .rm-palette {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 1em 0 1.4em;
	padding: 0;
}
.rm-palette li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 76px;
	margin: 0;
	font-size: 0.8rem;
	color: var(--muted);
	text-align: center;
	line-height: 1.25;
}
.rm-palette li::before {
	content: "";
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--c, var(--sand));
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Style card: "Key pieces / Why it works" per style. */
.rm-style-card {
	margin: 1.4em 0;
	padding: 18px 20px;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
}
.rm-style-card > :last-child {
	margin-bottom: 0;
}
.entry-content .rm-style-card h4 {
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent-strong);
	margin: 0.9em 0 0.4em;
}
.entry-content .rm-style-card h4:first-child {
	margin-top: 0;
}

/* Tip / renter note callouts. */
.rm-tip,
.rm-renter {
	margin: 1.4em 0;
	padding: 14px 18px 14px 16px;
	border-radius: var(--radius-sm);
	border-left: 4px solid var(--sage);
	background: var(--tint);
}
.rm-renter {
	border-left-color: var(--accent);
}
.rm-tip > :last-child,
.rm-renter > :last-child {
	margin-bottom: 0;
}
.rm-tip > p > strong:first-child,
.rm-renter > p > strong:first-child {
	display: block;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 4px;
}

/* Shop the look: a short list of picks with buttons. */
.rm-shop {
	margin: 1.6em 0;
	padding: 18px 20px;
	border-radius: var(--radius);
	background: var(--sand);
}
.rm-shop > p:first-child {
	font-family: var(--font-head);
	font-size: 1.15rem;
	font-weight: 600;
	margin-bottom: 6px;
}
.entry-content .rm-shop ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.rm-shop li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	margin: 0;
	border-top: 1px solid rgba(43, 38, 34, 0.1);
}
.rm-shop li:first-child {
	border-top: 0;
}
.rm-shop li a {
	flex: 0 0 auto;
	padding: 7px 16px;
	border-radius: 999px;
	background: var(--ink);
	color: var(--bg);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}
.rm-shop li a:hover {
	background: var(--accent-strong);
	color: var(--accent-ink);
}

/* FAQ: <details class="rm-faq"><summary>Question</summary><p>Answer</p></details> */
.rm-faq {
	border-bottom: 1px solid var(--line);
	padding: 14px 0;
}
.rm-faq summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 16px;
}
.rm-faq summary::-webkit-details-marker {
	display: none;
}
.rm-faq summary::after {
	content: "+";
	color: var(--accent);
	font-size: 1.3rem;
	line-height: 1;
}
.rm-faq[open] summary::after {
	content: "\2212";
}
.rm-faq p {
	margin: 10px 0 0;
	color: var(--muted);
}

/* After the article: chips, save prompt, author box, related posts. */
.article > .chips {
	margin: 32px 0 0;
}
.save-cta {
	margin: 36px 0;
	padding: 22px 24px;
	border-radius: var(--radius);
	background: var(--ink);
	color: var(--bg);
}
.save-cta-title {
	font-family: var(--font-head);
	font-size: 1.35rem;
	margin: 0 0 6px;
}
.save-cta p {
	color: color-mix(in srgb, var(--bg) 85%, transparent);
}
.save-cta .button {
	background: #e60023;
	color: #fff;
}
.save-cta .button:hover {
	background: #ad081b;
}
.author-box {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 20px 0;
	border-top: 1px solid var(--line);
	font-size: 0.95rem;
}
.author-box img {
	border-radius: 50%;
	flex: 0 0 auto;
}
.author-name {
	font-weight: 700;
	margin: 0 0 4px;
}
.related-posts {
	max-width: var(--wide);
	margin: 48px auto 0;
}
.related-posts .card-grid {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ------------------------------------------------------------------
   Core block alignment
------------------------------------------------------------------- */
.alignwide {
	max-width: 1000px;
	margin-left: auto;
	margin-right: auto;
}
.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}
.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

/* ------------------------------------------------------------------
   Small screens
------------------------------------------------------------------- */
@media (max-width: 720px) {
	body {
		font-size: 1rem;
	}
	.header-inner {
		flex-wrap: wrap;
		gap: 10px 16px;
		padding: 12px 16px;
	}
	.site-nav {
		order: 3;
		flex: 1 0 100%;
		margin-left: 0;
	}
	.search-toggle {
		margin-left: auto;
	}
	.site-main {
		padding: 20px 16px 48px;
	}
	.card-grid,
	.related-posts .card-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px 12px;
	}
	.chip-row {
		flex-direction: column;
		gap: 6px;
	}
	.rm-styles {
		grid-template-columns: repeat(2, 1fr);
	}
	/* Wide comparison tables scroll inside themselves, not the page. */
	.entry-content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.entry-content th,
	.entry-content td {
		padding: 9px 10px;
		white-space: nowrap;
	}
	.rm-shop li {
		flex-direction: column;
		align-items: flex-start;
	}
}
