/*
Theme Name: Steppe & Hearth
Description: Block theme for Steppe & Hearth. Colours and fonts live in theme.json; layout classes live here.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: steppe-hearth
*/

:root {
  --paper: #fbf8f2; --felt: #f2ebdf; --sand: #dccbb0; --line: #e4d8c6;
  --ink: #2b2723; --muted: #6e655c; --sky: #2e4a6b; --sky-dark: #22384f;
  --ember: #a9502b; --ember-dark: #8b3f20; --gold: #c99a3e;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: Lato, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
:root h1, :root h2, :root h3, :root h4 { margin: 0 0 .5em; }
:root p { margin: 0 0 1em; }
:root .wp-block-image, :root figure { margin: 0; }
.wp-site-blocks { overflow-x: clip; }

.wrap { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.eyebrow { font: 700 .74rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ember); margin: 0 0 14px; }
.eyebrow a { color: inherit; text-decoration: none; }
.lead, .lead p { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* announcement + header */
.announce { background: var(--sky); color: #e9eef5; text-align: center; font-size: .85rem; padding: 8px 16px; letter-spacing: .02em; }
.announce a { color: #fff; }
header.site { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.admin-bar header.site { top: 32px; }
header.site > .wrap { display: flex; align-items: center; gap: 28px; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo svg { width: 40px; height: 40px; flex: none; color: var(--sky); }
.logo span { font: 500 1.75rem/1 Fraunces, Georgia, serif; letter-spacing: -.02em; white-space: nowrap; color: var(--ink); }
.logo .amp { font-style: italic; color: var(--gold); }
.logo.rev svg { color: #fbf8f2; }
.logo.rev span { color: #fff; font-size: 1.6rem; }
header.site .wp-block-navigation.main { margin-left: auto; font-size: .95rem; }
header.site .wp-block-navigation.main .wp-block-navigation__container { gap: 24px; }
header.site .wp-block-navigation.main a { color: var(--ink); text-decoration: none; }
header.site .wp-block-navigation.main a:hover { color: var(--ember); }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--paper) !important; padding: 28px 24px !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { align-items: flex-start !important; padding-top: 40px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 22px !important; align-items: flex-start !important; font: 600 1.7rem/1.1 var(--serif); }

/* buttons (HTML blocks use .btn, button blocks use theme.json + these) */
a.btn, button.btn { display: inline-block; background: var(--ember); color: #fff; text-decoration: none; padding: 14px 26px; border-radius: 2px; font: 700 .9rem/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; border: 0; cursor: pointer; }
a.btn:hover, button.btn:hover { background: var(--ember-dark); color: #fff; }
a.btn.light { background: #fff; color: var(--ink); }
a.btn.light:hover { background: var(--felt); color: var(--ink); }
.wp-block-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
:root .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 13px 25px; }
:root .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--ink); color: #fff; }

/* hero */
.hero { position: relative; min-height: 640px; display: flex; align-items: flex-end; color: #fff; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,24,30,.05) 30%, rgba(20,24,30,.62)); }
.hero .wrap { position: relative; z-index: 1; padding-bottom: 72px; width: 100%; }
:root .hero h1 { color: #fff; max-width: 720px; }
.hero p { max-width: 560px; font-size: 1.12rem; color: #f1ece4; }
.hero .eyebrow { color: #f6d3b6; text-shadow: 0 1px 10px rgba(0,0,0,.55); }
.hero h1, .hero p { text-shadow: 0 1px 14px rgba(0,0,0,.35); }
.hero .btns { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

/* key-pattern band */
.band { height: 22px; background-color: var(--felt); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22' viewBox='0 0 44 22'%3E%3Cpath d='M0 19h8V3h14v12h-8V9h4' fill='none' stroke='%23a9502b' stroke-width='1.6'/%3E%3Cpath d='M22 19h8V3h14' fill='none' stroke='%23a9502b' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-position: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.sec { padding: 88px 0; }
.sec.alt { background: var(--felt); }

/* promise strip */
.promise { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.promise div { font-size: .92rem; color: var(--muted); }
.promise strong { display: block; font: 600 1.15rem/1.2 var(--serif); color: var(--ink); margin-bottom: 4px; }

/* category tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; text-align: left; }
.tile { position: relative; display: block; overflow: hidden; color: #fff; text-decoration: none; aspect-ratio: 4/5; background: var(--sand); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tile:hover img { transform: scale(1.03); }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; background: linear-gradient(180deg, transparent, rgba(20,24,30,.7)); }
:root .tile h3 { color: #fff; font-size: 2rem; margin: 0 0 4px; }
.tile p { margin: 0; color: #eee6dc; }
.tile .go { display: inline-block; margin-top: 10px; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid #fff; }

/* split: image + text */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.split > * { margin: 0 !important; min-width: 0; }
.split.rev > .media { order: 2; }
.split .media img { width: 100%; aspect-ratio: 5/4; object-fit: cover; }
.split.top { align-items: start; }
.facts { list-style: none; padding: 0; margin: 22px 0 28px; border-top: 1px solid var(--line); }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.facts strong { min-width: 120px; font-weight: 700; color: var(--sky); }

/* product and article cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 36px; padding: 0; list-style: none; }
.grid > * { margin: 0 !important; }
.card { display: block; text-decoration: none; color: var(--ink); }
a.card:hover { color: var(--ember); }
.card .ph { aspect-ratio: 1; background: var(--felt); overflow: hidden; position: relative; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .tag { position: absolute; top: 12px; left: 12px; background: var(--paper); color: var(--ink); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; }
:root .card h3 { font-size: 1.35rem; margin: 16px 0 2px; color: inherit; }
.card .price { color: var(--muted); font-size: .95rem; }
.swatches { display: flex; gap: 6px; margin-top: 8px; }
.swatches i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); display: block; }

/* journal index (query loop) */
.wp-block-post-template.grid .wp-block-post-featured-image img { aspect-ratio: 1; width: 100%; object-fit: cover; }
.wp-block-post-template.grid .wp-block-post-title { font-size: 1.35rem; margin: 16px 0 6px; }
.wp-block-post-template.grid .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.wp-block-post-template.grid .wp-block-post-excerpt { color: var(--muted); font-size: .95rem; }

/* waitlist */
.waitlist { background: var(--sky); color: #e8eef5; padding: 88px 0; }
.waitlist .eyebrow { color: #f0c9a8; }
:root .waitlist h2 { color: #fff; }
.waitlist .lead { color: #d5dfea; }
.waitlist form { display: flex; gap: 10px; max-width: 520px; margin: 22px auto 10px; }
.waitlist input[type=email] { flex: 1; padding: 14px 16px; border: 0; font: inherit; border-radius: 2px; min-width: 0; }
.waitlist .small { color: #b9c7d8; margin: 0; }
.waitlist .hp { position: absolute; left: -9999px; }

/* page header */
.crumbs { font-size: .85rem; color: var(--muted); padding: 20px 0 0; margin: 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.page-head { padding: 34px 0 48px; border-bottom: 1px solid var(--line); }
.page-head .lead { margin-bottom: 0; }

/* prose */
.prose { max-width: 720px; }
:root .prose h2 { font-size: 2rem; margin-top: 1.6em; }
:root .prose h3 { margin-top: 1.4em; }
:root .prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
:root .prose figure.wp-block-image { margin: 32px 0; }
.prose figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; text-align: left; }
.callout { background: var(--felt); border-left: 3px solid var(--ember); padding: 18px 22px; margin: 26px 0; }
.callout p:last-child { margin: 0; }
:root .wp-block-table.spec { margin: 18px 0 26px; }
.spec table { width: 100%; border-collapse: collapse; font-size: .95rem; }
:root .spec th, :root .spec td { text-align: left; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); }
:root .spec thead { border: 0; }
.spec th { font-weight: 700; background: var(--felt); }
.spec.rows td:first-child { font-weight: 700; background: var(--felt); width: 32%; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--ember); font-size: 1.2rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* product page */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; padding: 30px 0 70px; }
.gallery .main { aspect-ratio: 1; object-fit: cover; width: 100%; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.thumbs img { aspect-ratio: 1; object-fit: cover; opacity: .85; }
:root .buy h1 { font-size: 2.6rem; }
.buy .price { font: 600 1.6rem var(--serif); margin: 4px 0 18px; }
.opt { margin: 18px 0; }
.opt .label { display: block; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.opt .choices { display: flex; gap: 8px; flex-wrap: wrap; }
.opt .choices span { border: 1px solid var(--line); background: #fff; padding: 9px 14px; font-size: .9rem; }
.buy a.btn { width: 100%; text-align: center; margin-top: 10px; }
.ship { margin-top: 20px; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.ship div { padding: 4px 0; }

/* journal article */
.article-head { max-width: 760px; margin: 0 auto; padding: 30px 24px 10px; text-align: center; }
.article-head .lead, .article-head .wp-block-post-excerpt { margin: 0 auto; }
.article-head .wp-block-post-excerpt__excerpt { font-size: 1.15rem; color: var(--muted); }
.article-hero { max-width: 1000px; margin: 20px auto 0 !important; padding: 0 24px; }
.article-hero img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.article-body { padding: 50px 24px 80px; }
.article-body .prose { margin: 0 auto; }

/* footer */
footer.site { background: var(--ink); color: #cfc6bb; padding: 64px 0 30px; font-size: .92rem; }
footer.site h4 { font: 600 1.2rem var(--serif); color: #fff; margin: 0 0 12px; }
footer.site a { color: #cfc6bb; text-decoration: none; display: block; padding: 3px 0; }
footer.site a:hover { color: #fff; }
footer.site a.logo { display: flex; padding: 0; }
.fcols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.fbase { border-top: 1px solid #47403a; margin-top: 44px; padding-top: 20px; font-size: .82rem; color: #9b9086; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .promise { grid-template-columns: 1fr 1fr; }
  .split, .product { grid-template-columns: 1fr; gap: 32px; }
  .split.rev > .media { order: 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .fcols { grid-template-columns: 1fr 1fr; }
  .sec, .waitlist { padding: 64px 0; }
}
@media (max-width: 782px) { .admin-bar header.site { top: 46px; } }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  header.site > .wrap { height: 64px; gap: 12px; }
  .logo span { font-size: 1.45rem; }
  .logo svg { width: 32px; height: 32px; }
  .hero { min-height: 560px; }
  .hero::after { background: linear-gradient(180deg, rgba(20,24,30,.15) 0%, rgba(20,24,30,.7) 55%); }
  .hero .wrap { padding-bottom: 48px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 1; }
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  :root .card h3 { font-size: 1.15rem; }
  .waitlist form { flex-direction: column; }
  .fcols { grid-template-columns: 1fr; gap: 26px; }
  .facts strong { min-width: 96px; }
}
