/*
Theme Name: Moose's Neighborhood
Theme URI: https://adognamedmoose.com
Author: Mark
Description: Custom storybook-watercolor theme for A Dog Named Moose, an English Yellow Lab. Illustrated Neighborhood homepage plus Ask Moose tools.
Version: 0.1.0
Text Domain: moose
*/

:root {
	--cream: #fbf3e1;
	--paper: #fffaf0;
	--gold: #e8b64c;
	--gold-dark: #c98f1e;
	--caramel: #b9772f;
	--brown: #4a2f18;
	--ink: #3b2a1a;
	--sage: #8fae8b;
	--sage-dark: #5e7f5a;
	--sky: #bfddeb;
	--safe: #4f8a4b;
	--caution: #d28a10;
	--toxic: #b3392b;
	--radius: 18px;
	--shadow: 0 6px 18px rgba(74, 47, 24, .14);
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; }
a { color: var(--caramel); }
a:hover { color: var(--brown); }

h1, h2, h3, h4 { font-family: 'Roboto', sans-serif; line-height: 1.2; color: var(--brown); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.2rem); font-weight: 900; }
h3 { font-size: 1.2rem; font-weight: 700; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(780px, 100% - 2.5rem); margin-inline: auto; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 99; background: #fff; padding: .6rem 1rem; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header { background: rgba(255, 250, 240, .94); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 50; backdrop-filter: blur(6px); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 900; font-size: 1.35rem; color: var(--brown); }
.brand img { height: 68px; width: auto; display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.site-nav a { display: block; padding: .5rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--brown); }
.site-nav a:hover, .site-nav .current a { background: var(--gold); color: var(--brown); }
.nav-toggle { display: none; background: var(--gold); border: 0; border-radius: 999px; padding: .55rem 1.1rem; font: inherit; font-weight: 700; color: var(--brown); cursor: pointer; }

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 3px solid var(--gold); padding: .5rem 1.25rem 1rem; }
	.site-nav.open { display: block; }
	.site-nav ul { flex-direction: column; }
}

/* ---------- Hero / Neighborhood scene ---------- */
.hero { padding: 1.5rem 0 .5rem; text-align: center; }
.hero .lede { max-width: 640px; margin: 0 auto 1rem; font-size: 1.15rem; }

.scene {
	position: relative;
	width: min(1600px, 100%);
	margin: 0 auto;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	background: var(--sky);
}
.scene-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.hotspot { position: absolute; display: block; border-radius: 24px; text-decoration: none; outline: 3px dashed transparent; outline-offset: 2px; transition: background .25s, outline-color .25s, transform .25s; }
.hotspot::before {
	content: '🐾';
	position: absolute; left: 50%; top: 50%; translate: -50% -50%;
	width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
	background: rgba(255, 250, 240, .85); border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
	animation: pulse 2.6s ease-in-out infinite;
}
.hotspot:hover, .hotspot:focus-visible { background: rgba(255, 255, 255, .22); outline-color: var(--gold-dark); transform: translateY(-4px); }
.hotspot-label {
	position: absolute; left: 50%; bottom: 100%; translate: -50% 6px;
	background: var(--paper); color: var(--brown); border: 2px solid var(--gold);
	padding: .35rem .8rem; border-radius: 999px; font-weight: 900; white-space: nowrap; font-size: .95rem; text-align: center;
	opacity: 0; transition: opacity .2s, translate .2s; pointer-events: none; box-shadow: var(--shadow);
}
.hotspot-label small { display: block; font-weight: 500; font-size: .75rem; line-height: 1.2; }
.hotspot:hover .hotspot-label, .hotspot:focus-visible .hotspot-label { opacity: 1; translate: -50% -4px; }

.moose-btn { position: absolute; left: 41%; top: 53%; width: 23%; height: 44%; background: none; border: 0; cursor: pointer; border-radius: 50%; }
.moose-btn:focus-visible { outline: 3px dashed var(--gold-dark); }
.moose-btn.wag { animation: wag .6s ease; }

.moose-say {
	position: absolute; left: 50%; top: 5%; translate: -50% 0;
	max-width: min(520px, 86%); text-align: center;
	background: var(--paper); border: 3px solid var(--gold); border-radius: 22px;
	padding: .6rem 1.2rem; font-weight: 700; color: var(--brown); box-shadow: var(--shadow);
	transition: transform .2s;
}
.moose-say::after { content: ''; position: absolute; left: 50%; top: 100%; translate: -50% -2px; border: 12px solid transparent; border-top-color: var(--gold); }
.moose-say.on { transform: scale(1.04); }

.spot-list { list-style: none; margin: 1.25rem auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.spot-list a { display: inline-block; padding: .55rem 1.1rem; border-radius: 999px; background: var(--paper); border: 2px solid var(--gold); text-decoration: none; font-weight: 700; color: var(--brown); }
.spot-list a:hover { background: var(--gold); }

@keyframes pulse { 0%, 100% { scale: 1; opacity: .9; } 50% { scale: 1.18; opacity: 1; } }
@keyframes wag { 0%, 100% { rotate: 0deg; } 25% { rotate: -4deg; } 75% { rotate: 4deg; } }

@media (max-width: 700px) {
	.hotspot-label { display: none; }
	.hotspot::before { width: 1.7rem; height: 1.7rem; font-size: .8rem; }
	.moose-say { font-size: .85rem; padding: .4rem .8rem; }
}

@media (prefers-reduced-motion: reduce) {
	.hotspot::before, .moose-btn.wag { animation: none; }
	html { scroll-behavior: auto; }
}

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section.alt { background: rgba(232, 182, 76, .16); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head p { margin: 0; }

.page-hero { padding: 2.5rem 0 1.5rem; text-align: center; background: linear-gradient(var(--sky), var(--cream)); }
.page-hero.has-banner { min-height: 220px; background-size: cover; background-position: center; display: grid; align-items: center; }
.page-hero p { max-width: 640px; margin: 0 auto; font-size: 1.15rem; }

.btn { display: inline-block; padding: .75rem 1.5rem; border-radius: 999px; background: var(--gold); border: 0; color: var(--brown); font: inherit; font-weight: 900; text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 var(--gold-dark); transition: transform .15s; }
.btn:hover { transform: translateY(-2px); color: var(--brown); }
.btn.ghost { background: var(--paper); box-shadow: 0 3px 0 var(--sage); border: 2px solid var(--sage); }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s; }
.card:nth-child(odd):hover { transform: translateY(-5px) rotate(-.6deg); }
.card:nth-child(even):hover { transform: translateY(-5px) rotate(.6deg); }
.card-img { display: block; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--sky), var(--cream)); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-ph { display: grid; place-items: center; height: 100%; font-size: 3rem; }
.card-body { padding: 1rem 1.2rem 1.3rem; }
.card-body h3 a { text-decoration: none; color: var(--brown); }
.card-body p { margin: .4rem 0 0; font-size: .95rem; }
.badge { display: inline-block; padding: .1rem .7rem; border-radius: 999px; background: var(--sage); color: #fff; font-size: .75rem; font-weight: 700; margin: 0 .3rem .4rem 0; }
.badge.gold { background: var(--gold); color: var(--brown); }

/* ---------- Tools ---------- */
.tool { background: var(--paper); border: 3px solid var(--gold); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.tool input[type=search], .tool input[type=text] {
	width: 100%; padding: .85rem 1.2rem; border: 2px solid var(--sage); border-radius: 999px; font: inherit; background: #fff; color: var(--ink);
}
.tool input:focus { outline: 3px solid var(--gold); border-color: var(--gold-dark); }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.chip { padding: .35rem 1rem; border-radius: 999px; border: 2px solid var(--sage); background: #fff; font: inherit; font-weight: 700; cursor: pointer; color: var(--brown); }
.chip[aria-pressed=true] { background: var(--gold); border-color: var(--gold-dark); }
.food-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; }
.food { border-radius: 14px; background: #fff; border-left: 8px solid var(--sage); padding: .8rem 1rem; box-shadow: 0 2px 8px rgba(74, 47, 24, .1); }
.food strong { display: block; font-size: 1.05rem; }
.food span.tag { display: inline-block; font-size: .72rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #fff; padding: .05rem .6rem; border-radius: 999px; margin: .15rem 0 .3rem; }
.food p { margin: 0; font-size: .9rem; line-height: 1.45; }
.food.safe { border-left-color: var(--safe); } .food.safe .tag { background: var(--safe); }
.food.caution { border-left-color: var(--caution); } .food.caution .tag { background: var(--caution); }
.food.toxic { border-left-color: var(--toxic); } .food.toxic .tag { background: var(--toxic); }
.empty { text-align: center; padding: 1rem; font-weight: 700; }
.disclaimer { font-size: .85rem; margin: 1rem 0 0; padding: .8rem 1rem; background: rgba(179, 57, 43, .08); border-radius: 12px; }
.soon { opacity: .75; border-style: dashed; }

/* ---------- Single posts ---------- */
.single { padding: 2rem 0 3rem; }
.single .meta { color: var(--caramel); font-weight: 700; margin-bottom: 1rem; }
.single .feature { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 1rem 0 1.5rem; }
.entry-content > * { max-width: 100%; }
.entry-content img { border-radius: 12px; }
.recipe-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.recipe-meta div { background: var(--paper); border: 2px solid var(--gold); border-radius: 14px; padding: .5rem 1rem; text-align: center; min-width: 110px; }
.recipe-meta b { display: block; font-size: 1.2rem; color: var(--brown); }
.recipe-box { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.5rem; margin: 1.5rem 0; }
.recipe-box ul { padding-left: 1.2rem; }
.safety { border-left: 6px solid var(--caution); background: rgba(210, 138, 16, .1); padding: .8rem 1rem; border-radius: 0 12px 12px 0; margin: 1.2rem 0; }
.share { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 2rem 0; padding-top: 1.2rem; border-top: 2px dashed var(--gold); }

/* ---------- The Pack ---------- */
.social-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.social-big a { display: block; text-align: center; padding: 1.3rem 1rem; border-radius: var(--radius); background: var(--paper); border: 3px solid var(--gold); font-weight: 900; font-size: 1.15rem; text-decoration: none; color: var(--brown); box-shadow: var(--shadow); transition: transform .2s; }
.social-big a:hover { transform: translateY(-4px) rotate(-1deg); background: var(--gold); }
.video-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-frame iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; display: block; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 3rem; background: var(--brown); color: var(--cream); padding: 2rem 0; text-align: center; }
.site-footer a { color: var(--gold); font-weight: 700; }
.site-footer .links { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.site-footer .links a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); transition: transform .15s, background .15s; }
.site-footer .links a:hover, .site-footer .links a:focus-visible { background: var(--gold); color: var(--brown); transform: translateY(-2px); }
.site-footer .links svg { width: 22px; height: 22px; fill: currentColor; }
.site-footer p { margin: .3rem 0; }

/* ---------- Pagination ---------- */
.pagination { margin: 2rem 0; display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.pagination a, .pagination span { padding: .4rem .9rem; border-radius: 999px; background: var(--paper); border: 2px solid var(--gold); text-decoration: none; font-weight: 700; }
.pagination .current { background: var(--gold); }

/* Make the hidden attribute win over component display rules (filters rely on it). */
[hidden] { display: none !important; }

/* Sticky footer: footer sits at the bottom of the screen on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body > .site-footer { margin-top: auto; flex-shrink: 0; }

/* Icons inside The Pack buttons */
.social-big a { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; }
.social-big a svg { width: 24px; height: 24px; fill: currentColor; flex-shrink: 0; }

/* Meet Moose */
.meet { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2.5rem; align-items: start; }
.meet-photo img { width: 100%; border-radius: var(--radius); border: 6px solid var(--paper); box-shadow: var(--shadow); transform: rotate(-1.2deg); }
.stat-row { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; text-align: center; }
.stat-row li { background: var(--paper); border: 3px solid var(--gold); border-radius: var(--radius); padding: .8rem .4rem; box-shadow: var(--shadow); }
.stat-row strong { display: block; font-size: 1.3rem; font-weight: 900; color: var(--brown); line-height: 1.2; }
.stat-row span { font-size: .85rem; line-height: 1.3; display: block; }
.meet-text h2 { margin-top: 0; }
.meet-text h3 { margin: 1.5rem 0 .25rem; color: var(--caramel); }
.meet-text .lead { font-size: 1.2rem; }
.meet-cards h3 { margin-top: 0; }
.wrap.narrow { width: min(820px, 100% - 2.5rem); }
.chips.static { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips.static .chip { cursor: default; }
.moose-cta { display: inline-block; padding: .9rem 1.6rem; border-radius: 999px; background: var(--gold); color: var(--brown); font-weight: 900; text-decoration: none; box-shadow: var(--shadow); }
.moose-cta:hover { transform: translateY(-2px); }
@media (max-width: 800px) { .meet { grid-template-columns: 1fr; } }

/* Ask Moose calculators */
.tool h2 { margin-top: 0; }
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem 1.25rem; margin: 1.25rem 0; align-items: start; }
.calc label { display: block; font-weight: 700; }
.calc small { display: block; font-weight: 400; font-size: .82rem; line-height: 1.35; margin-top: .25rem; }
.calc input, .calc select { width: 100%; padding: .65rem .8rem; border-radius: 12px; border: 2px solid var(--sage); font: inherit; background: #fff; color: var(--ink); margin-top: .3rem; }
.calc input:focus, .calc select:focus { outline: 3px solid var(--gold); border-color: var(--gold-dark); }
.calc .inline { display: flex; gap: .5rem; }
.calc .inline select { width: 90px; }
.calc .moose-cta { grid-column: 1 / -1; justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 900; }
.result { background: #fff; border-left: 8px solid var(--gold); border-radius: 14px; padding: 1rem 1.25rem; margin: 1rem 0; box-shadow: 0 2px 8px rgba(74, 47, 24, .1); }
.result p { margin: .4rem 0; }
.result .big { font-size: 1.5rem; }
.growth-panel { background: #fff; border-left: 8px solid var(--sage); border-radius: 14px; padding: 1rem 1.25rem; box-shadow: 0 2px 8px rgba(74, 47, 24, .1); }
.growth-panel h3 { margin: 0 0 .25rem; color: var(--caramel); }
.growth-panel .weight { margin: 0 0 .5rem; }
.growth-panel ul { margin: 0; padding-left: 1.2rem; }
.growth-panel li { margin: .3rem 0; }
.growth-panel .moose-note { margin: .8rem 0 0; font-weight: 700; }

/* Newsletter */
.newsletter { background: linear-gradient(var(--cream), rgba(191, 221, 235, .45)); }
.news-embed { max-width: 520px; margin: 1rem auto 0; text-align: left; }
.news-embed input[type=email], .news-embed input[type=text] { width: 100%; padding: .7rem .9rem; border-radius: 999px; border: 2px solid var(--sage); font: inherit; margin: .3rem 0; }
.news-embed button, .news-embed input[type=submit] { padding: .75rem 1.5rem; border: 0; border-radius: 999px; background: var(--gold); color: var(--brown); font: inherit; font-weight: 900; cursor: pointer; }

/* Big logo: top half in the header, bottom half hangs onto the page */
.site-header .bar { min-height: 76px; padding: 0; }
.brand { position: relative; display: block; width: 138px; height: 76px; flex-shrink: 0; }
.brand img { position: absolute; left: 0; top: 4px; height: 152px; width: auto; filter: drop-shadow(0 5px 8px rgba(74, 47, 24, .35)); transition: transform .2s; transform-origin: top left; }
.brand:hover img, .brand:focus-visible img { transform: rotate(-3deg) scale(1.03); }
@media (max-width: 860px) {
	.site-header .bar { min-height: 64px; }
	.brand { width: 100px; height: 64px; }
	.brand img { top: 3px; height: 112px; }
}
@media (max-width: 860px) {
	.brand img { height: 100px; }
	body > main { padding-top: 1.5rem; }
}

.jetpack-news .wp-block-jetpack-subscriptions__container, .jetpack-news form { margin: 0; }
.jetpack-news input[type=email] { width: 100%; padding: .7rem .9rem; border-radius: 999px; border: 2px solid var(--sage); font: inherit; background: #fff; }
.jetpack-news button, .jetpack-news input[type=submit], .jetpack-news .wp-block-button__link { padding: .75rem 1.5rem; border: 0; border-radius: 999px; background: var(--gold); color: var(--brown); font: inherit; font-weight: 900; cursor: pointer; margin-top: .5rem; }
.news-embed .wp-block-jetpack-subscriptions__subscount, .news-embed .jetpack_subscription_widget p { font-size: .9rem; }

/* Moose Approved / affiliate picks */
.aff-note { background: rgba(143, 174, 139, .18); border-left: 6px solid var(--sage); padding: .7rem 1rem; border-radius: 0 12px 12px 0; margin: 1rem 0; font-size: .95rem; }
.picks-box { margin: 2.5rem 0 1.5rem; }
.picks-box h2 { margin-bottom: .5rem; }
.pick-store { margin: 0; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--caramel); }
.card.pick .card-body p { margin: .5rem 0 0; }
.foot-links a { color: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Amazon product box */
.amz-box { margin: 2.2rem 0 1.5rem; }
.amz-card { display: grid; grid-template-columns: 200px 1fr; gap: 1.2rem; align-items: center; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; }
.amz-img { display: grid; place-items: center; background: #fff; border-radius: 12px; padding: .6rem; }
.amz-img img { max-width: 100%; max-height: 200px; width: auto; height: auto; display: block; }
.amz-kicker { margin: 0; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--caramel); }
.amz-body h3 { margin: .2rem 0 .4rem; font-size: 1.15rem; line-height: 1.3; }
.amz-body h3 a { color: var(--brown); text-decoration: none; }
.amz-desc { margin: 0 0 .5rem; font-size: .95rem; }
.amz-price { margin: 0 0 .6rem; font-size: 1.3rem; color: var(--brown); }
.amz-save { font-size: .8rem; font-weight: 800; background: var(--safe); color: #fff; border-radius: 999px; padding: .1rem .5rem; vertical-align: middle; }
.amz-fine { margin: .5rem 0 0; font-size: .75rem; opacity: .75; }
@media (max-width: 600px) { .amz-card { grid-template-columns: 1fr; } .amz-img img { max-height: 180px; } }

.amz-home { padding-block: 1rem; }
.amz-home .amz-box { margin: 0; }
