/**
 * Theme Name: Hearth & Haven
 * Theme URI: https://example.com/hearth-and-haven
 * Description: A lightweight editorial block theme for food, home, and lifestyle publishing.
 * Version: 1.2.0
 * Requires at least: 6.5
 * Requires PHP: 8.0
 * Text Domain: hearth-and-haven
 *
 * Design reminder: Contemporary editorial domesticity — warm paper, mulberry ink,
 * refined brass rules, generous DM-Serif-like headings, and tactile recipe-index utility.
 */

:root {
  --hh-paper: #fbf7ef;
  --hh-cream: #f0e5d5;
  --hh-ink: #292521;
  --hh-muted: #6c635c;
  --hh-mulberry: #742b44;
  --hh-brass: #b89a62;
  --hh-sage: #61745c;
  --hh-line: rgba(65, 52, 43, 0.18);
}

html { scroll-behavior: smooth; }
body { background-color: var(--hh-paper); color: var(--hh-ink); }
a { text-underline-offset: 0.18em; }

.wp-site-blocks { overflow: clip; }
.hh-paper { background-color: var(--hh-paper); background-image: radial-gradient(rgba(116, 43, 68, .055) .65px, transparent .65px); background-size: 8px 8px; }
.hh-kicker { display: flex; align-items: center; gap: .55rem; color: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hh-kicker::before { width: 1.6rem; height: 1px; background: var(--hh-mulberry); content: ""; }
.hh-rule { height: 1px; margin: 1.5rem 0; border: 0; background: var(--hh-brass); }

.wp-block-site-title { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.055em; }
.wp-block-navigation { font-family: system-ui, sans-serif; font-size: .73rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.wp-block-navigation a { text-decoration: none; }

.hh-hero { padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3.5rem, 7vw, 6rem); background: var(--hh-paper); }
.hh-hero h1, .hh-post-header h1 { max-width: 13ch; margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.07em; line-height: .87; }
.hh-hero h1 { font-size: clamp(3.4rem, 8vw, 8.2rem); }
.hh-post-header h1 { font-size: clamp(3rem, 6vw, 6.7rem); }
.hh-hero__deck, .hh-post-deck { max-width: 37rem; color: var(--hh-muted); font-size: 1.05rem; line-height: 1.75; }
.hh-feature-frame { position: relative; overflow: hidden; border: 1px solid var(--hh-line); box-shadow: 10px 10px 0 var(--hh-cream); }
.hh-feature-frame::after { position: absolute; inset: .6rem; border: 1px solid rgba(255,255,255,.72); content: ""; pointer-events: none; }
.hh-feature-frame img { display: block; width: 100%; min-height: 25rem; object-fit: cover; filter: saturate(.83) sepia(.08); }

.hh-index-card { height: 100%; padding: 1rem; border: 1px solid var(--hh-line); background: var(--hh-paper); }
.hh-index-card .wp-block-post-featured-image { overflow: hidden; margin-bottom: 1rem; }
.hh-index-card .wp-block-post-featured-image img { aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(.8) sepia(.08); transition: transform .28s cubic-bezier(.23, 1, .32, 1); }
.hh-index-card:hover .wp-block-post-featured-image img { transform: scale(1.025); }
.hh-index-card .wp-block-post-title { margin: .35rem 0 .8rem; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.045em; line-height: .98; }
.hh-index-card .taxonomy-category { color: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }

.hh-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; color: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hh-post-tags { display: flex; flex-wrap: wrap; gap: .38rem; padding-left: 1.6rem; position: relative; }
.hh-post-tags::before { position: absolute; top: .15rem; left: 0; width: 1rem; height: 1rem; background: url("assets/hearth-mark.png") center / contain no-repeat; content: ""; }
.hh-post-tags a { padding: .35rem .45rem; border: 1px dashed rgba(116,43,68,.32); color: var(--hh-mulberry); background: #f5eadb; font-family: system-ui, sans-serif; font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-decoration: none; text-transform: uppercase; }

.hh-reading-progress { position: fixed; z-index: 1000; top: 0; right: 0; left: 0; height: 4px; overflow: hidden; background: rgba(116,43,68,.18); pointer-events: none; }
.hh-reading-progress span { display: block; width: 100%; height: 100%; background: var(--hh-mulberry); transform: scaleX(0); transform-origin: left; transition: transform .1s linear; }
.hh-article-layout { display: grid; grid-template-columns: minmax(9rem, .48fr) minmax(0, 2fr); gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.hh-toc { position: sticky; top: 5rem; padding: 1.25rem 0; border-top: 1px solid var(--hh-brass); border-bottom: 1px solid var(--hh-brass); }
.hh-toc__label { display: block; margin-bottom: .7rem; color: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hh-toc a { display: block; margin: .2rem 0; padding: .35rem 0 .35rem .6rem; border-left: 1px solid var(--hh-line); color: var(--hh-muted); font-size: .78rem; line-height: 1.35; text-decoration: none; }
.hh-toc a:hover, .hh-toc a.is-active { padding-left: .85rem; border-left-color: var(--hh-mulberry); color: var(--hh-mulberry); font-weight: 700; }
.hh-article-content { max-width: 44rem; }
.hh-article-content > * + * { margin-top: 1.5rem; }
.hh-article-content h2 { margin-top: 3.8rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 400; letter-spacing: -.055em; line-height: .94; scroll-margin-top: 6rem; }
.hh-article-content p, .hh-article-content li { color: #514a44; font-size: 1.02rem; line-height: 1.82; }
.hh-article-content blockquote { margin: 3rem 0; padding: 1.5rem 0 1.5rem 1.5rem; border-top: 1px solid var(--hh-brass); border-bottom: 1px solid var(--hh-brass); color: var(--hh-mulberry); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.65rem, 3vw, 2.55rem); letter-spacing: -.05em; line-height: 1.05; }
.hh-margin-note { max-width: 22rem; margin: 2.5rem 0 2.5rem -2.5rem; padding: 1rem; border-top: 1px solid var(--hh-brass); border-bottom: 1px solid var(--hh-brass); background-color: #eee3d2; background-image: radial-gradient(rgba(116,43,68,.08) .6px, transparent .6px); background-size: 7px 7px; color: var(--hh-mulberry); font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; line-height: 1.05; }

.hh-pinterest-share { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--hh-mulberry); padding: .65rem .75rem; color: #fff; background: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hh-pinterest-share:hover { background: #5a1f35; }
.hh-pin-picker { width: min(55rem, calc(100vw - 2rem)); border: 1px solid var(--hh-brass); padding: 1.25rem; color: var(--hh-ink); background: var(--hh-paper); box-shadow: 12px 12px 0 var(--hh-cream); }
.hh-pin-picker::backdrop { background: rgba(35,28,24,.5); }
.hh-pin-picker__header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.hh-pin-picker__header h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 400; letter-spacing: -.05em; }
.hh-pin-picker__close { border: 0; padding: .4rem; color: var(--hh-mulberry); background: transparent; font-weight: 800; }
.hh-pin-picker__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
.hh-pin-picker__item { position: relative; display: block; overflow: hidden; border: 1px solid var(--hh-line); }
.hh-pin-picker__item img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.hh-pin-picker__item span { display: block; padding: .55rem; color: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .63rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.hh-author-card, .hh-newsletter { display: grid; gap: 1.2rem; align-items: center; padding: clamp(1.4rem, 4vw, 2.5rem); border: 1px solid var(--hh-brass); background-color: #eee3d2; background-image: radial-gradient(rgba(116,43,68,.08) .6px, transparent .6px); background-size: 7px 7px; box-shadow: 8px 8px 0 var(--hh-cream); }
.hh-author-card { grid-template-columns: auto 1fr; }
.hh-author-card .wp-block-avatar img { border: 1px solid var(--hh-mulberry); }
.hh-author-card__avatar img { width: 68px; height: 68px; border: 1px solid var(--hh-mulberry); border-radius: 50%; }
.hh-author-card h2, .hh-newsletter h2 { margin: .25rem 0 .5rem; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.05em; line-height: .95; }
.hh-author-socials { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
.hh-author-socials a { padding-bottom: .2rem; border-bottom: 1px solid var(--hh-mulberry); color: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .64rem; font-weight: 800; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
.hh-newsletter { grid-template-columns: minmax(0, 1fr) minmax(16rem, .75fr); }
.hh-newsletter form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.hh-newsletter input { min-width: 0; border: 0; padding: .7rem; color: var(--hh-ink); background: transparent; }
.hh-newsletter input[name="email"] { border-bottom: 1px solid var(--hh-ink); background: rgba(255,250,242,.65); }
.hh-newsletter-consent { display: block; grid-column: 1 / -1; color: var(--hh-muted); font-family: system-ui, sans-serif; font-size: .68rem; line-height: 1.35; }
.hh-newsletter-consent input { width: auto; min-width: auto; padding: 0; }
.hh-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.hh-newsletter button { border: 0; padding: .7rem .85rem; color: #fff; background: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.hh-newsletter small { display: block; grid-column: 1 / -1; margin-top: .1rem; color: var(--hh-muted); font-size: .65rem; line-height: 1.4; }
.hh-topline p { margin: 0; }
.hh-site-header { position: relative; z-index: 20; background: var(--hh-paper); }
.hh-site-header .wp-block-navigation { font-family: system-ui, sans-serif; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.hh-header-actions { gap: 1rem; }
.hh-header-actions .wp-block-search__inside-wrapper { border: 0; }
.hh-header-actions .wp-block-search__input { width: 9rem; border: 1px solid var(--hh-rule); background: transparent; font-family: system-ui, sans-serif; font-size: .72rem; }
.hh-header-actions .wp-block-search__button { min-width: 2.25rem; padding: .5rem; }
.hh-mood-grid { border-top: 1px solid var(--hh-rule); }
.hh-mood-card { min-height: 13rem; padding: 1.4rem; border: 1px solid var(--hh-rule); background: rgba(240,229,213,.46); }
.hh-mood-card h3 { margin-top: 0; font-size: clamp(1.55rem,2.5vw,2.2rem); }
.hh-mood-card p { color: var(--hh-muted); font-size: .88rem; }
.hh-mood-card .wp-block-read-more, .hh-home-shelf .wp-block-read-more { color: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.hh-home-shelf { border-top: 1px solid var(--hh-rule); }
.hh-archive-intro { max-width: 54rem; }
.hh-taxonomy-links { gap: .65rem; margin-bottom: 2rem; }
.hh-taxonomy-links p { margin: 0; }
.hh-taxonomy-links a { display: inline-block; padding: .45rem .7rem; border: 1px solid var(--hh-rule); color: var(--hh-ink); font-family: system-ui, sans-serif; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.hh-search-card { padding: 1.6rem 0; border-top: 1px solid var(--hh-rule); }
.hh-site-footer .wp-block-navigation { font-family: system-ui, sans-serif; font-size: .7rem; font-weight: 700; }
.hh-editorial-sidebar { border: 1px solid var(--hh-rule); background: rgba(240,229,213,.52); }
.hh-editorial-sidebar .wp-block-latest-posts { margin-left: 0; }
.hh-editorial-sidebar .wp-block-latest-posts__post-date { color: var(--hh-muted); font-family: system-ui, sans-serif; font-size: .68rem; }
.hh-legal-page { max-width: 50rem; }
.hh-legal-page .wp-block-heading { margin-top: 2.2rem; }
.hh-post-actions { gap: .65rem; }
.hh-favorite-button { border: 1px solid var(--hh-mulberry); padding: .65rem .8rem; color: var(--hh-mulberry); background: transparent; font-family: system-ui, sans-serif; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transition: transform 160ms var(--hh-ease), background-color 160ms var(--hh-ease), color 160ms var(--hh-ease); }
.hh-favorite-button:hover, .hh-favorite-button.is-saved { color: #fffaf2; background: var(--hh-mulberry); }
.hh-favorite-button:active { transform: scale(.97); }
.hh-recipe-index { padding-bottom: 4rem; }
.hh-recipe-filters { display: grid; grid-template-columns: minmax(13rem, 1.8fr) repeat(4, minmax(8rem, 1fr)) auto auto; gap: .75rem; padding: 1.25rem; border: 1px solid var(--hh-rule); background: rgba(240,229,213,.5); }
.hh-recipe-filters label { display: grid; gap: .3rem; color: var(--hh-muted); font-family: system-ui, sans-serif; font-size: .62rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.hh-recipe-filters input, .hh-recipe-filters select { width: 100%; min-height: 2.65rem; border: 1px solid var(--hh-rule); padding: .5rem; color: var(--hh-ink); background: #fffaf2; font: inherit; font-size: .85rem; letter-spacing: normal; text-transform: none; }
.hh-recipe-filters button { align-self: end; min-height: 2.65rem; border: 1px solid var(--hh-mulberry); padding: .55rem .7rem; color: #fffaf2; background: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.hh-recipe-filters .hh-filter-reset { color: var(--hh-mulberry); background: transparent; }
.hh-recipe-index__status { min-height: 1.6rem; margin: 1rem 0; color: var(--hh-muted); font-family: system-ui, sans-serif; font-size: .75rem; }
.hh-recipe-results { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.hh-recipe-result { border: 1px solid var(--hh-rule); background: rgba(255,250,242,.68); }
.hh-recipe-result__image { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--hh-cream); }
.hh-recipe-result__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 240ms var(--hh-ease); }
.hh-recipe-result:hover .hh-recipe-result__image img { transform: scale(1.025); }
.hh-recipe-result__body { padding: 1rem; }
.hh-recipe-result h2 { margin: .35rem 0 .5rem; font-size: 1.65rem; }
.hh-recipe-result h2 a, .hh-related-card h3 a { color: inherit; text-decoration: none; }
.hh-recipe-result p { color: var(--hh-muted); font-size: .82rem; }
.hh-recipe-results__empty { grid-column: 1 / -1; padding: 2rem 0; color: var(--hh-muted); }
.hh-related-content { margin: 4rem auto; padding: 3rem 0; border-top: 1px solid var(--hh-rule); border-bottom: 1px solid var(--hh-rule); }
.hh-related-content__head h2 { margin-top: .35rem; font-size: clamp(2rem,4vw,3.4rem); }
.hh-related-content__grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.hh-related-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hh-related-card h3 { margin: .45rem 0 0; font-size: 1.55rem; }
.hh-favorites-list { max-width: 50rem; margin: 3rem auto; padding: 2rem; border: 1px solid var(--hh-rule); background: rgba(240,229,213,.5); }
.hh-favorites-list ul { padding-left: 1.1rem; }
.hh-favorites-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--hh-rule); }
.hh-favorites-list button { border: 0; color: var(--hh-mulberry); background: transparent; font-family: system-ui, sans-serif; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.hh-favorites-link { display: inline-flex; align-items: center; gap: .32rem; color: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.hh-favorites-link [data-hh-favorites-count] { display: inline-grid; min-width: 1.35rem; min-height: 1.35rem; place-items: center; border-radius: 99px; color: #fffaf2; background: var(--hh-mulberry); font-size: .62rem; }
.hh-cookie-preferences { border: 0; padding: 0; color: var(--hh-mulberry); background: transparent; font: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.hh-ad-slot:empty { display: none; }
.hh-ad-slot:not(:empty) { display: grid; min-height: 100px; place-items: center; margin: 2.5rem 0; overflow: hidden; border-top: 1px solid var(--hh-rule); border-bottom: 1px solid var(--hh-rule); }
@media (max-width: 1100px) { .hh-recipe-filters { grid-template-columns: repeat(3, minmax(0,1fr)); } .hh-recipe-search { grid-column: span 3; } }
@media (max-width: 700px) { .hh-recipe-filters { grid-template-columns: 1fr 1fr; } .hh-recipe-search { grid-column: span 2; } .hh-recipe-results, .hh-related-content__grid { grid-template-columns: 1fr; } }
@media (max-width: 782px) { .hh-header-actions .wp-block-search__input { width: 7.25rem; } .hh-site-footer .wp-block-column + .wp-block-column { margin-top: 1.5rem; } }

.wp-block-comments { max-width: 50rem; margin: 4rem auto; padding: 2.25rem 0 0; border-top: 1px solid var(--hh-brass); }
.wp-block-comments-title, .comment-reply-title { margin-bottom: 1.25rem; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 400; letter-spacing: -.05em; }
.wp-block-comment-template { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.wp-block-comment-template > li { padding: 1.15rem; border: 1px solid var(--hh-line); background: rgba(255,250,242,.72); }
.wp-block-comment-author-name { color: var(--hh-ink); font-family: system-ui, sans-serif; font-size: .8rem; font-weight: 800; }
.wp-block-comment-date, .wp-block-comment-edit-link, .wp-block-comment-reply-link { color: var(--hh-muted); font-family: system-ui, sans-serif; font-size: .68rem; }
.wp-block-comment-content { margin-top: .5rem; }
.wp-block-comments .comment-respond { margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--hh-rule); background: rgba(240,229,213,.45); }
.wp-block-comments label { display: block; margin: .85rem 0 .3rem; color: var(--hh-muted); font-family: system-ui, sans-serif; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.wp-block-comments input, .wp-block-comments textarea { width: 100%; border: 1px solid var(--hh-line); padding: .7rem; color: var(--hh-ink); background: #fffaf2; }
.wp-block-comments textarea { min-height: 9rem; resize: vertical; }
.wp-block-comments input:focus, .wp-block-comments textarea:focus { outline: 2px solid var(--hh-brass); outline-offset: 2px; }
.wp-block-comments input[type="submit"] { width: auto; margin-top: 1rem; color: #fff; border-color: var(--hh-mulberry); background: var(--hh-mulberry); font-family: system-ui, sans-serif; font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.wp-block-comments .comment-awaiting-moderation { margin: .75rem 0; color: var(--hh-sage); font-family: system-ui, sans-serif; font-size: .75rem; font-style: normal; font-weight: 700; }

@media (max-width: 780px) {
  .hh-article-layout, .hh-newsletter { grid-template-columns: 1fr; }
  .hh-toc { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: .25rem .7rem; }
  .hh-toc__label { grid-column: 1 / -1; }
  .hh-margin-note { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
