/*
Theme Name: Marlene's Miniatures
Description: Custom theme for Marlene's Miniatures. Layout follows Marlene's Every Purpose Home site; colours come from the Marlene's Miniatures logo (olive, cream, stone) with a warm caramel accent.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: marlenes
*/

:root {
	/* From the logo */
	--olive: #646351;
	--cream: #f0eee1;
	--stone: #929081;
	/* Supporting neutrals */
	--olive-deep: #4f4e3f;
	--ink: #34352b;
	--ink-soft: #55564a;
	--paper: #faf9f5;
	--linen: #f5efe6;
	--stone-band: #cfcdbe;
	/* Accent: a warm caramel, a touch more golden than Every Purpose Home's #8f4f32 so it sits with the olive */
	--caramel: #94572e;
	--caramel-deep: #7a4524;

	--font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
	--font-serif: Lora, Georgia, serif;
	--font-script: Caveat, "Segoe Print", cursive;
	--font-caps: Montserrat, "Segoe UI", Arial, sans-serif;

	--wrap: 1160px;
	--gutter: clamp(16px, 4vw, 24px);
	--radius: 6px;
	--band-pad: clamp(56px, 8vw, 88px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.125rem/1.65 var(--font-body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--caramel); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--caramel-deep); }
:focus-visible { outline: 2px solid var(--caramel); outline-offset: 3px; border-radius: 2px; }
.band-olive :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--cream); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(680px + 2 * var(--gutter)); }
.center { text-align: center; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link:focus {
	clip: auto; clip-path: none; width: auto; height: auto; margin: 0; z-index: 100;
	top: 8px; left: 8px; padding: 10px 16px; background: var(--cream); color: var(--ink); border-radius: var(--radius);
}

.button, .wp-block-button__link, .search-form button {
	display: inline-block;
	padding: .8em 1.6em;
	border: 0;
	border-radius: 999px;
	background: var(--olive);
	color: var(--cream);
	font: 600 .95rem/1.2 var(--font-body);
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease;
}
.button:hover, .wp-block-button__link:hover, .search-form button:hover { background: var(--olive-deep); color: var(--cream); }

/* ---------- Header ---------- */
.site-header { background: var(--olive); color: var(--cream); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 104px; }
.site-logo { flex: 0 0 auto; display: block; padding: 14px 0; }
.site-logo img { width: 250px; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.site-nav .menu + .header-search { margin-left: 4px; padding-left: 14px; border-left: 1px solid rgb(240 238 225 / .25); }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.site-nav .menu a {
	display: block; padding: 10px 14px;
	color: var(--cream); text-decoration: none;
	font: 600 1rem/1.2 var(--font-body);
	border-radius: var(--radius);
}
.site-nav .menu a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_parent > a { background: rgb(240 238 225 / .12); color: #fff; }
.site-nav .sub-menu { display: none; }

.header-search { position: relative; display: flex; align-items: center; min-width: 40px; height: 40px; }
.header-search input {
	width: 0; opacity: 0; padding: 0; border: 0;
	transition: width .25s ease, opacity .2s ease, padding .25s ease;
	background: var(--cream); color: var(--ink); border-radius: 999px; height: 40px;
	font: 400 1rem var(--font-body);
}
.header-search:focus-within input, .header-search.is-open input { width: 200px; opacity: 1; padding: 0 44px 0 16px; }
.header-search button {
	position: absolute; right: 0; width: 40px; height: 40px; border: 0; background: none; cursor: pointer;
	color: var(--cream); display: grid; place-items: center; border-radius: 999px;
}
.header-search:focus-within button, .header-search.is-open button { color: var(--olive); }
.header-search .icon { width: 22px; height: 22px; }

.nav-toggle { display: none; }

.tagline-bar { background: var(--paper); border-bottom: 1px solid #e6e2d6; }
.tagline-bar p { margin: 0 auto; padding: 12px var(--gutter); text-align: center; font-size: 1.05rem; color: var(--ink); font-weight: 500; }

/* ---------- Bands ---------- */
.band { padding: var(--band-pad) 0; }
.band-paper { background: var(--paper); }
.band-linen { background: var(--linen); }
.band-stone { background: var(--stone-band); }
.band-olive { background: var(--olive); color: var(--cream); }
.band + .band.band-paper:not(.archive-band) { border-top: 0; }

.duo-heading {
	display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: .45em;
	margin: 0 0 clamp(28px, 4vw, 44px); text-align: center; line-height: 1.1;
}
.duo-heading .kicker {
	font: 600 clamp(.95rem, 1.6vw, 1.15rem)/1 var(--font-caps);
	text-transform: uppercase; letter-spacing: .16em; color: var(--caramel);
}
.duo-heading .accent {
	font: 700 clamp(2.2rem, 4.4vw, 2.9rem)/1 var(--font-script);
	color: var(--caramel);
}

.eyebrow {
	font: 600 .82rem/1.2 var(--font-caps); text-transform: uppercase; letter-spacing: .16em;
	color: var(--caramel); margin: 0 0 14px;
}
.eyebrow a { color: inherit; text-decoration: none; }
.script-heading { font: 700 clamp(2.2rem, 4.6vw, 3rem)/1.1 var(--font-script); color: inherit; margin: 0 0 18px; }

.more-link { text-align: center; margin: clamp(28px, 4vw, 40px) 0 0; }
.more-link a {
	font: 600 .85rem/1 var(--font-caps); text-transform: uppercase; letter-spacing: .14em;
	color: var(--ink); text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent;
}
.more-link a span { color: var(--caramel); margin-left: 4px; display: inline-block; transition: transform .2s ease; }
.more-link a:hover { border-bottom-color: var(--caramel); color: var(--ink); }
.more-link a:hover span { transform: translateX(3px); }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 32px 24px; }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card { text-align: center; min-width: 0; }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-image {
	display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius);
	background: var(--linen); margin-bottom: 16px;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-link:hover .card-image img { transform: scale(1.03); }
.card-kicker {
	display: block; margin: 0 0 6px;
	font: 600 .74rem/1.3 var(--font-caps); text-transform: uppercase; letter-spacing: .14em; color: var(--caramel);
}
.card-title {
	display: block; margin: 0;
	font: 500 1.28rem/1.3 var(--font-serif); color: var(--ink);
	text-wrap: balance;
}
h3.card-title a { color: inherit; text-decoration: none; }
.card-link:hover .card-title, h3.card-title a:hover { color: var(--caramel-deep); }
.card-price { display: block; margin-top: 8px; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.card-cta {
	display: inline-block; margin-top: 10px;
	font: 600 .78rem/1 var(--font-caps); text-transform: uppercase; letter-spacing: .12em; color: var(--ink);
	padding-bottom: 4px; border-bottom: 1px solid var(--caramel);
}

.thumb-placeholder {
	display: grid; place-items: center; width: 100%; height: 100%;
	background: var(--linen); color: #d9d1c1;
}
.band-linen .thumb-placeholder { background: var(--paper); }
.thumb-placeholder .icon { width: 30%; height: auto; max-width: 96px; }

/* Videos */
.video-grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 28px 24px; }
.video-grid .is-feature { grid-row: span 2; }
.video-card { text-align: center; }
.video-card .card-kicker { margin-top: 14px; }
.video-card.is-feature .card-title { font-size: 1.6rem; }
.video-player {
	position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; cursor: pointer;
	border-radius: var(--radius); overflow: hidden; background: var(--olive-deep);
}
.video-player img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.video-player:hover img { transform: scale(1.03); }
.video-player .play {
	position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
	display: grid; place-items: center; border-radius: 50%;
	background: rgb(240 238 225 / .92); color: var(--olive);
	box-shadow: 0 2px 12px rgb(0 0 0 / .18);
	transition: transform .2s ease, background-color .2s ease;
}
.video-player .play svg { margin-left: 3px; }
.video-player:hover .play { transform: scale(1.06); background: var(--cream); }
.video-card.is-feature .play { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; }

/* Browse circles */
.circle-grid {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 18px;
}
.circle-grid li { width: 118px; text-align: center; }
.circle-grid a { text-decoration: none; color: var(--ink); }
.circle {
	display: block; width: 118px; height: 118px; border-radius: 50%; overflow: hidden; margin-bottom: 12px;
	box-shadow: 0 0 0 4px var(--paper);
}
.circle img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.circle-grid a:hover img { transform: scale(1.06); }
.circle-label { font-weight: 600; font-size: 1rem; }
.circle-grid a:hover .circle-label { color: var(--caramel-deep); }

/* Row cards (Fresh from the workbench) */
.row-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.row-card .card-link {
	display: flex; align-items: center; gap: 16px; height: 100%;
	background: var(--linen); border-radius: var(--radius); padding: 16px;
	transition: background-color .2s ease;
}
.row-card .card-link:hover { background: #efe6da; }
.row-image { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 4px; overflow: hidden; }
.row-image img { width: 100%; height: 100%; object-fit: cover; }
.row-image .thumb-placeholder { background: var(--paper); }
.row-text { min-width: 0; }
.row-card .card-title { font-size: 1.12rem; }

/* Empty states */
.empty-panel {
	max-width: 640px; margin: 0 auto; text-align: center;
	background: var(--linen); border-radius: var(--radius); padding: clamp(28px, 5vw, 44px) clamp(20px, 5vw, 48px);
}
.band-linen .empty-panel { background: var(--paper); }
.empty-panel p { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 4px; text-wrap: balance; }
.empty-panel .button { margin-top: 18px; }
.empty-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--cream); color: var(--olive); margin-bottom: 14px; }
.empty-icon .icon { width: 26px; height: 26px; }
.empty-panel .search-form { margin-top: 18px; }

/* About band */
.about-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-photo {
	aspect-ratio: 4 / 5; border-radius: 160px 160px var(--radius) var(--radius); overflow: hidden;
	max-width: 360px; justify-self: center; width: 100%;
	outline: 1px solid var(--caramel); outline-offset: 10px; background: var(--linen);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo .thumb-placeholder { color: var(--stone-band); }
.about-text { text-align: center; max-width: 620px; justify-self: center; }
.about-text .eyebrow { color: var(--ink); }
.about-text .script-heading { color: var(--ink); }
.about-text p { color: var(--ink); }
.about-text .more-link { margin-top: 20px; }

/* Follow band */
.follow-inner { text-align: center; max-width: 760px; }
.follow-band .script-heading { color: var(--cream); }
.follow-lede { font: 400 1.25rem/1.5 var(--font-serif); margin: 0 auto 28px; max-width: 34em; }
.follow-note { opacity: .85; }
.social-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.social-links a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.social-links .icon { width: 22px; height: 22px; flex: none; }
.social-links.is-pills { justify-content: center; }
.social-links.is-pills a {
	color: var(--cream); border: 1.5px solid rgb(240 238 225 / .7); border-radius: 999px; padding: 12px 24px;
	font-weight: 600; transition: background-color .2s ease, color .2s ease;
}
.social-links.is-pills a:hover { background: var(--cream); color: var(--olive); border-color: var(--cream); }

/* Sign-off */
.signoff { text-align: center; padding: 8px var(--gutter) var(--band-pad); background: var(--paper); }
.signoff-text { font: 600 clamp(1.8rem, 3.4vw, 2.3rem)/1.2 var(--font-script); color: var(--ink); margin: 0; }
.signoff-name { font: 700 clamp(2.6rem, 5vw, 3.4rem)/1 var(--font-script); color: var(--caramel); margin: 6px 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--olive); color: var(--cream); padding: 56px 0 28px; }
.site-footer a { color: var(--cream); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid rgb(240 238 225 / .25); }
.footer-brand { max-width: 360px; }
.footer-logo img { width: 200px; margin-bottom: 14px; }
.footer-brand p { margin: 0; font-size: 1rem; opacity: .9; }
.footer-follow { text-align: right; }
.footer-script { font: 700 2rem/1 var(--font-script); margin: 0 0 14px; }
.social-links.is-footer { justify-content: flex-end; }
.social-links.is-footer a { width: 44px; height: 44px; justify-content: center; border-radius: 50%; border: 1.5px solid rgb(240 238 225 / .6); }
.social-links.is-footer a:hover { background: var(--cream); color: var(--olive); }
.footer-email { margin: 16px 0 0; }
.footer-email a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-email .icon { width: 20px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: .92rem; }
.footer-bottom p { margin: 0; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-menu a { text-decoration: none; font-weight: 600; }
.footer-menu a:hover { text-decoration: underline; }

/* ---------- Archives ---------- */
.archive-header { margin-bottom: clamp(28px, 4vw, 44px); }
.archive-header .duo-heading { margin-bottom: 16px; }
.archive-intro { max-width: 640px; margin: 0 auto; text-align: center; color: var(--ink-soft); }
.archive-intro:empty { display: none; }
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
	min-width: 44px; height: 44px; padding: 0 14px; display: inline-grid; place-items: center;
	border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--linen);
}
.pagination .page-numbers.current { background: var(--olive); color: var(--cream); }
.pagination a.page-numbers:hover { background: var(--stone-band); }

.search-form { display: flex; gap: 8px; max-width: 440px; margin: 0 auto; }
.search-form input {
	flex: 1; min-width: 0; height: 48px; padding: 0 18px; border: 1px solid #d8d3c4; border-radius: 999px;
	background: #fff; font: 400 1rem var(--font-body); color: var(--ink);
}
.search-form input:focus { border-color: var(--olive); outline: none; box-shadow: 0 0 0 3px rgb(100 99 81 / .2); }

/* ---------- Single tutorial / pages ---------- */
.entry { padding: clamp(40px, 6vw, 64px) 0 var(--band-pad); }
.entry-header { max-width: calc(760px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.entry-title { font-size: clamp(2rem, 4.2vw, 2.9rem); font-weight: 500; text-wrap: balance; margin-bottom: 12px; }
.entry-meta { color: var(--ink-soft); font-size: 1rem; margin: 0; }
.entry-hero { max-width: calc(980px + 2 * var(--gutter)); margin: 32px auto 0; padding: 0 var(--gutter); }
.entry-hero img { width: 100%; border-radius: var(--radius); }

.entry-content { max-width: calc(720px + 2 * var(--gutter)); margin: 40px auto 0; padding: 0 var(--gutter); }
.entry-content > * { margin-top: 0; margin-bottom: 1.15em; }
.entry-content h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-top: 1.8em; }
.entry-content h3 { font-size: 1.35rem; margin-top: 1.6em; }
.entry-content h2 + *, .entry-content h3 + * { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content li::marker { color: var(--caramel); }
.entry-content img { border-radius: var(--radius); }
.entry-content figcaption { font-size: .92rem; color: var(--ink-soft); text-align: center; margin-top: 8px; }
.entry-content blockquote {
	margin-left: 0; margin-right: 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--caramel);
	font: italic 400 1.2rem/1.55 var(--font-serif);
}
.entry-content .alignwide { max-width: 980px; margin-left: 50%; transform: translateX(-50%); width: calc(100vw - 2 * var(--gutter)); }
.entry-content .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); max-width: none; }
.entry-content .wp-block-embed { margin-bottom: 1.6em; }
.entry-content .wp-block-embed iframe { border-radius: var(--radius); width: 100%; }
.entry-content .wp-block-separator { border: 0; border-top: 1px solid #ddd7c8; margin: 2.4em auto; }
.entry-content .has-linen-background-color, .entry-content .is-style-supplies {
	background: var(--linen); border-radius: var(--radius); padding: 24px 28px;
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid #e3ddcf; text-align: left; }

.entry-shop-note {
	max-width: calc(720px + 2 * var(--gutter)); margin: 48px auto 0; padding: 0 var(--gutter);
}
.entry-shop-note > * { margin-left: auto; margin-right: auto; }
.entry-shop-note {
	text-align: center;
}
.entry-shop-note .script-heading { color: var(--caramel); margin-bottom: 6px; font-size: 2.3rem; }
.entry-shop-note p { color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.row-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
	.site-nav .menu + .header-search { margin-left: 0; padding-left: 0; border-left: 0; }
	.header-inner { min-height: 84px; }
	.site-logo img { width: 190px; }
	.nav-toggle {
		display: grid; place-items: center; margin-left: auto; width: 48px; height: 48px;
		background: none; border: 0; color: var(--cream); cursor: pointer; border-radius: var(--radius);
	}
	.nav-toggle .icon-close { display: none; }
	.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
	.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
	.site-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--olive); padding: 8px var(--gutter) 24px; flex-direction: column; align-items: stretch; gap: 14px;
		border-top: 1px solid rgb(240 238 225 / .2);
	}
	.site-nav.is-open { display: flex; }
	.site-nav .menu { flex-direction: column; gap: 0; }
	.site-nav .menu a { padding: 14px 4px; font-size: 1.1rem; border-bottom: 1px solid rgb(240 238 225 / .15); border-radius: 0; }
	.header-search input, .header-search:focus-within input { width: 100%; opacity: 1; padding: 0 44px 0 16px; height: 46px; }
	.header-search button, .header-search:focus-within button { color: var(--olive); height: 46px; }

	.video-grid { grid-template-columns: 1fr 1fr; }
	.video-grid .is-feature { grid-column: 1 / -1; grid-row: auto; }
	.cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.about-inner { grid-template-columns: 1fr; }
	.about-photo { max-width: 280px; }
	.footer-follow { text-align: left; }
	.social-links.is-footer { justify-content: flex-start; }
}

@media (max-width: 600px) {
	body { font-size: 1.0625rem; }
	.cards { gap: 28px 14px; }
	.cards-3, .video-grid { grid-template-columns: 1fr; }
	.card-title { font-size: 1.12rem; }
	.video-card.is-feature .card-title { font-size: 1.3rem; }
	.row-grid { grid-template-columns: 1fr; }
	.circle-grid li, .circle { width: 96px; }
	.circle { height: 96px; }
	.tagline-bar p { font-size: .98rem; }
	.social-links.is-pills a { padding: 12px 20px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
