/*
Theme Name: Cozy Crest 3D
Theme URI: https://cozyncrest.com/
Author: Cozy Crest Editorial Team
Author URI: https://cozyncrest.com/
Description: A warm, dimensional theme for Cozy Crest — layered cards, soft shadows, and a calm cream, gold and cranberry palette.
Version: 1.0.5
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cozy-crest-3d
Tags: blog, home-decor, warm, cream, gold, cranberry, responsive, custom-menu, featured-images
*/

/* ---------- Tokens ---------- */
:root {
	--ink: #23201d;
	--cream: #faf6ef;
	--cream-2: #f3ead9;
	--white: #fffdf8;
	--gold: #c9a86a;
	--gold-soft: #e9d9b8;
	--cranberry: #8e2f3c;
	--cranberry-deep: #7a2833;
	--line: #e7dcc6;
	--muted: #6f6455;
	--shadow-sm: 0 1px 2px rgba(35, 32, 29, 0.07), 0 6px 18px rgba(35, 32, 29, 0.07);
	--shadow-md: 0 2px 4px rgba(35, 32, 29, 0.06), 0 16px 40px rgba(35, 32, 29, 0.1);
	--shadow-lg: 0 2px 6px rgba(35, 32, 29, 0.06), 0 24px 60px rgba(35, 32, 29, 0.14);
	--radius: 24px;
}

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

/* Page scroll: horizontal clipping lives on html (with an explicit
   vertical auto) and never on body — body-level clipping traps
   vertical scrolling in some mobile browsers. */
html {
	scroll-behavior: smooth;
	overflow-x: clip;
	overflow-y: auto;
}

body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 17px;
	line-height: 1.65;
}

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

a { color: var(--cranberry); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; line-height: 1.15; margin: 0 0 16px; }
h1 { font-size: 52px; font-weight: 900; }
h2 { font-size: 38px; font-weight: 700; }
h3 { font-size: 26px; font-weight: 700; }
p { margin: 0 0 16px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.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;
}

/* ---------- Pills & buttons ---------- */
.pill {
	display: inline-block;
	padding: 5px 14px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.pill-gold { background: var(--gold); color: var(--ink); }
.pill-cranberry { background: var(--cranberry); color: var(--cream); }

.eyebrow {
	margin: 0 0 12px;
	color: var(--cranberry);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.btn {
	display: inline-block;
	padding: 14px 28px;
	border: 0;
	border-radius: 999px;
	font-family: "Outfit", sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
	background: var(--cranberry);
	color: var(--cream);
	box-shadow: 0 10px 24px rgba(142, 47, 60, 0.35);
}
.btn-primary:hover { background: var(--cranberry-deep); box-shadow: 0 16px 32px rgba(142, 47, 60, 0.4); }
.btn-gold {
	background: var(--gold);
	color: var(--ink);
	box-shadow: 0 10px 24px rgba(201, 168, 106, 0.4);
}

/* ---------- Latest Ideas ---------- */
.latest-ideas { padding: 64px 0 72px; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head .eyebrow { margin-bottom: 8px; }
.section-head h2 { margin: 0; }
.ideas-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}
.idea-card {
	background: var(--white);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-md);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.idea-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.idea-thumb { display: block; }
.idea-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.idea-body { padding: 16px 18px 18px; }
.idea-cat {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cranberry);
}
.idea-title { margin: 0 0 8px; font-size: 19px; line-height: 1.3; }
.idea-title a { color: var(--ink); text-decoration: none; }
.idea-title a:hover { color: var(--cranberry); text-decoration: none; }
.idea-date { margin: 0; font-size: 14px; color: var(--muted); }
.idea-excerpt p { margin: 0 0 10px; font-size: 15px; color: var(--muted); }



/* ---------- Trending Now (chip links) ---------- */
.trending { padding: 48px 0 8px; }
.trending-inner { text-align: center; }
.trend-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-top: 18px;
}
.trend-chip {
	display: inline-block;
	padding: 9px 18px;
	border: 1.5px solid var(--gold);
	background: rgba(201, 168, 106, 0.12);
	color: var(--ink);
	border-radius: 999px;
	font-family: "Outfit", sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}
.trend-chip:hover { background: var(--gold); color: var(--ink); text-decoration: none; transform: translateY(-2px); }

/* ---------- Seasonal Shelf (large feature card) ---------- */
.seasonal-shelf { padding: 8px 0 72px; }
.shelf-card {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 28px;
	overflow: hidden;
	box-shadow: var(--shadow-lg);
}
.shelf-thumb { display: block; overflow: hidden; }
.shelf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shelf-body {
	padding: 44px;
	background: linear-gradient(135deg, var(--cream-2), var(--cream));
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
}
.shelf-body h3 { font-size: 32px; line-height: 1.25; margin-bottom: 12px; }
.shelf-body h3 a { color: var(--ink); text-decoration: none; }
.shelf-body h3 a:hover { color: var(--cranberry); text-decoration: none; }
.shelf-excerpt p { color: var(--muted); margin-bottom: 8px; }
.shelf-body .btn { margin-top: 10px; }

.email-pill {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--white);
	border-radius: 999px;
	padding: 4px 4px 4px 16px;
	box-shadow: var(--shadow-sm);
}
.email-pill > span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.email-pill input {
	border: 0;
	outline: 0;
	background: transparent;
	font-family: "Outfit", sans-serif;
	font-size: 15px;
	color: var(--ink);
	min-width: 170px;
	flex: 1;
}
.email-pill input:focus { outline: 0; }

.btn-small { padding: 10px 20px; font-size: 14px; }
.btn-dark { background: var(--ink); color: var(--cream); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3); }
.btn-dark:hover { background: #000; }

/* ---------- Masthead ---------- */
.masthead { background: var(--cream); padding: 36px 0 28px; }
.masthead-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 24px;
}
.wordmark {
	font-family: "Playfair Display", Georgia, serif;
	font-size: 54px;
	font-weight: 900;
	line-height: 1;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: -0.01em;
}
.wordmark:hover { text-decoration: none; }
.wordmark span { color: var(--gold); }
.tagline {
	margin: 8px 0 0;
	font-family: "Playfair Display", Georgia, serif;
	font-style: italic;
	font-size: 19px;
	color: var(--muted);
}
.masthead-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.masthead-note {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--muted);
}
.search-form { display: flex; gap: 0; box-shadow: var(--shadow-sm); border-radius: 999px; overflow: hidden; background: var(--white); }
.search-form input[type="search"] {
	border: 0;
	outline: 0;
	background: transparent;
	font-family: "Outfit", sans-serif;
	font-size: 15px;
	color: var(--ink);
	padding: 12px 6px 12px 18px;
	min-width: 200px;
}
.search-form button {
	border: 0;
	background: var(--gold);
	color: var(--ink);
	font-family: "Outfit", sans-serif;
	font-size: 15px;
	font-weight: 600;
	padding: 12px 22px;
	cursor: pointer;
	transition: background 0.2s ease;
}
.search-form button:hover { background: #d8b878; }

/* ---------- Menu ---------- */
.main-nav { background: var(--cream); }
.main-nav .wrap { border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
.menu {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px 26px;
	list-style: none;
	margin: 0;
	padding: 16px 0;
}
.menu a {
	color: var(--ink);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	padding: 4px 2px;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}
.menu a:hover, .menu .current-menu-item a { color: var(--cranberry); border-bottom-color: var(--gold); text-decoration: none; }

/* ---------- Cards ---------- */
.card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: 48px;
}
.card-center { text-align: center; max-width: 860px; margin: 0 auto; }

/* ---------- Hero (3D) ---------- */
.hero {
	padding: 72px 0 84px;
	background:
		radial-gradient(1100px 480px at 88% -10%, rgba(201, 168, 106, 0.28), transparent 60%),
		radial-gradient(900px 420px at -8% 112%, rgba(142, 47, 60, 0.1), transparent 55%),
		var(--cream);
}
.hero-grid {
	display: grid;
	grid-template-columns: 1fr 1.08fr;
	gap: 56px;
	align-items: center;
}
.hero-copy h1 { font-size: 58px; margin-bottom: 20px; }
.hero-copy h1 em { color: var(--gold); font-style: italic; }
.hero-lead { font-size: 19px; color: var(--muted); margin-bottom: 28px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }

.hero-media { position: relative; }
.hero-photo {
	position: relative;
	border-radius: 28px;
	overflow: hidden;
	box-shadow:
		0 2px 6px rgba(35, 32, 29, 0.08),
		0 18px 36px rgba(35, 32, 29, 0.12),
		0 48px 90px rgba(35, 32, 29, 0.22);
	transform: rotate(0.6deg);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.hero-photo:hover { transform: rotate(0deg) translateY(-6px); }
.hero-photo::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 28px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
	pointer-events: none;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.hero-media::before {
	content: "";
	position: absolute;
	inset: 0;
	border: 2px solid var(--gold);
	background: rgba(201, 168, 106, 0.14);
	border-radius: 28px;
	transform: translate(22px, 22px);
	z-index: -1;
}
.hero-badge {
	position: absolute;
	top: -14px;
	right: 24px;
	z-index: 2;
	background: var(--gold);
	color: var(--ink);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 8px 16px;
	border-radius: 999px;
	box-shadow: var(--shadow-md);
	animation: cozycrest3d-float 5s ease-in-out infinite;
}
@keyframes cozycrest3d-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

/* ---------- Newsletter band ---------- */
.letter { padding: 24px 0 84px; }
.letter-grid {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: 48px;
	align-items: center;
	background: linear-gradient(135deg, var(--cream-2), var(--cream));
	border: 1px solid var(--line);
	border-radius: 28px;
	box-shadow: var(--shadow-lg);
	padding: 56px;
}
.letter-copy h2 { font-size: 42px; }
.letter-copy h2 em { color: var(--gold); font-style: italic; }
.letter-points { list-style: none; margin: 0 0 18px; padding: 0; }
.letter-points li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.letter-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--gold);
	box-shadow: 0 0 0 4px rgba(201, 168, 106, 0.22);
}
.letter-sign { font-family: "Playfair Display", Georgia, serif; font-style: italic; color: var(--muted); margin: 0; }
.letter-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 22px;
	box-shadow: var(--shadow-md);
	padding: 32px;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.letter-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.letter-card h3 { margin: 12px 0 8px; }
.letter-card .email-pill { margin-bottom: 14px; box-shadow: none; border: 1px solid var(--line); }
.letter-card .btn { width: 100%; }
.letter-fine { margin: 14px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.form-confirm { font-weight: 600; color: var(--cranberry); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #efe8d8; }
.footer-grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr;
	gap: 48px;
	padding: 56px 24px 40px;
}
.footer-brand .wordmark { color: var(--cream); font-size: 42px; }
.footer-brand p { margin: 14px 0 0; color: #cfc6b4; max-width: 460px; }
.footer-depts h2, .footer-magazine h2 {
	font-family: "Outfit", sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gold);
	margin-bottom: 16px;
}
.footer-depts ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.footer-magazine ul { list-style: none; margin: 0; padding: 0; }
.footer-depts li, .footer-magazine li { margin-bottom: 10px; }
.footer-depts a, .footer-magazine a { color: #efe8d8; }
.footer-depts a:hover, .footer-magazine a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(250, 246, 239, 0.16); padding: 20px 0; text-align: center; }
.footer-bottom p { margin: 0; font-size: 14px; color: #cfc6b4; }

/* ---------- Generic sections ---------- */
.page-intro, .archive-head, .search-head, .notfound { padding: 64px 0 84px; }
.archive-card h1 em { color: var(--cranberry); font-style: italic; }
.archive-desc { color: var(--muted); font-size: 18px; margin-bottom: 28px; }
.empty-state {
	border-top: 1px solid var(--line);
	padding-top: 28px;
	margin-top: 8px;
}
.empty-title {
	font-family: "Playfair Display", Georgia, serif;
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 8px;
}
.empty-state .btn { margin-top: 12px; }

/* ---------- Archive post list ---------- */
.archive-list { margin-top: 36px; }
.archive-head .card + .card { margin-top: 36px; }
.archive-list .pagination { margin-top: 36px; text-align: center; }
.archive-list .pagination .nav-links { display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.archive-list .pagination .page-numbers {
	display: inline-block;
	padding: 10px 16px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	font-weight: 600;
}
.archive-list .pagination .page-numbers.current { background: var(--cranberry); border-color: var(--cranberry); color: var(--cream); }
.archive-list .pagination a:hover { text-decoration: none; border-color: var(--gold); }

/* ---------- Single article ---------- */
.article { padding: 0; overflow: hidden; }
.article-inner { padding: 56px 64px; max-width: 860px; margin: 0 auto; }
.article-back { margin-bottom: 20px; font-weight: 600; }
.article h1 { font-size: 46px; margin-bottom: 14px; }
.byline { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.article-hero { margin: 0 0 32px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-md); }
.article-hero img { width: 100%; }
.article-content { font-size: 18px; }
.article-content h2 { font-size: 30px; margin: 36px 0 14px; }
.article-content h3 { font-size: 23px; margin: 30px 0 12px; }
.article-content img { border-radius: 18px; box-shadow: var(--shadow-md); margin: 8px 0 20px; }
.article-content ul, .article-content ol { margin: 0 0 18px; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
	margin: 24px 0;
	padding: 18px 24px;
	border-left: 4px solid var(--gold);
	background: var(--cream);
	border-radius: 0 16px 16px 0;
	font-family: "Playfair Display", Georgia, serif;
	font-style: italic;
	font-size: 20px;
}

/* ---------- Pages ---------- */
.page { padding: 0; overflow: hidden; }
.page-inner { padding: 56px 64px; max-width: 860px; margin: 0 auto; }
.page-inner h1 { font-size: 46px; }
.page-content { font-size: 18px; }

/* ---------- Search results list ---------- */
.search-results { margin-top: 32px; display: grid; gap: 24px; }
.search-empty { margin-top: 32px; }
.result-card {
	display: flex;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.result-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.result-thumb { flex: 0 0 240px; overflow: hidden; }
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-body { padding: 28px 32px; min-width: 0; }
.result-body h2 { font-size: 28px; margin-bottom: 8px; }
.result-body h2 a { color: var(--ink); }
.result-body h2 a:hover { color: var(--cranberry); text-decoration: none; }
.result-body .byline { margin-bottom: 12px; }
.result-body p:last-child { margin-bottom: 0; }
.result-link { font-weight: 600; }
.search-head .pagination { margin-top: 32px; text-align: center; }
.search-head .pagination .nav-links { display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.search-head .pagination .page-numbers {
	display: inline-block;
	padding: 10px 16px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	font-weight: 600;
}
.search-head .pagination .page-numbers.current { background: var(--cranberry); border-color: var(--cranberry); color: var(--cream); }
.search-head .pagination a:hover { text-decoration: none; border-color: var(--gold); }

/* ---------- Search & 404 ---------- */
.search-head .search-form, .notfound .search-form { margin: 24px auto 8px; max-width: 440px; }
.notfound h1 { font-size: 52px; }
.notfound h1 em { color: var(--gold); font-style: italic; }
.notfound .btn { margin-top: 12px; }
.search-head h1 { font-size: 40px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.hero-grid, .letter-grid, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
	.hero { padding: 56px 0 72px; }
	.hero-copy h1 { font-size: 44px; }
	.hero-media::before { display: none; }
	.masthead-side { align-items: flex-start; }
	.card { padding: 36px 28px; }
	.letter-grid { padding: 40px 28px; }
	.ideas-grid { grid-template-columns: repeat(2, 1fr); }
	.article-inner, .page-inner { padding: 40px 28px; }
	.shelf-card { grid-template-columns: 1fr; }
	.shelf-thumb img { aspect-ratio: 16 / 9; }
	.shelf-body { padding: 32px 28px; }
}

@media (max-width: 600px) {
	body { font-size: 16px; }
	h1 { font-size: 38px; }
	h2 { font-size: 30px; }
	.wordmark { font-size: 42px; }
	.tagline { font-size: 16px; }
	.hero-copy h1 { font-size: 38px; }
	.hero { padding: 44px 0 56px; }
	.menu { gap: 8px 18px; }
	.menu a { font-size: 15px; }
	.search-form input[type="search"] { min-width: 0; flex: 1; }
	.card { padding: 28px 20px; }
	.letter-grid { padding: 32px 20px; }
	.article h1, .page-inner h1 { font-size: 32px; }
	.footer-depts ul { columns: 1; }
	.latest-ideas { padding: 44px 0 56px; }
	.ideas-grid { grid-template-columns: 1fr; }
	.shelf-body h3 { font-size: 26px; }
	.trending { padding: 36px 0 4px; }
	/* Masthead: stack full-width so nothing can overflow at narrow widths. */
	.masthead { padding: 28px 0 22px; }
	.masthead-inner { flex-direction: column; align-items: stretch; gap: 16px; }
	.masthead-brand { min-width: 0; }
	.masthead-side { width: 100%; min-width: 0; align-items: stretch; }
	.masthead-note { overflow-wrap: break-word; }
	.masthead-side .search-form { width: 100%; max-width: 100%; }
	.masthead-side .search-form button { flex-shrink: 0; }
	.email-pill { min-width: 0; }
	.email-pill input { min-width: 0; }
	/* Search results: stack thumbnail above text. */
	.result-card { flex-direction: column; }
	.result-thumb { flex-basis: auto; }
	.result-thumb img { aspect-ratio: 16 / 9; }
	.result-body { padding: 24px 20px; }
	.result-body h2 { font-size: 24px; }
}

/* Extra-narrow phones (320px): shrink the wordmark and masthead note. */
@media (max-width: 380px) {
	.wordmark { font-size: 36px; }
	.masthead-note { font-size: 11px; letter-spacing: 0.12em; }
	.search-form button { padding: 12px 16px; }
	.tagline { font-size: 15px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
	html { scroll-behavior: auto; }
}
