/*
Theme Name: rwhm
Description: A quiet block theme for the rwhm art portfolio and shop. Paper, ink, and room for the work.
Version: 1.1.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rwhm
WC requires at least: 9.0
WC tested up to: 11.3
*/

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
::selection { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }
img { display: block; }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }

/* ---------- Header ---------- */
.rwhm-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.rwhm-header .wp-block-site-title a { text-decoration: none; }
.rwhm-header .wp-block-navigation a,
.rwhm-label {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: .08em;
	text-transform: uppercase;
}
.rwhm-header .wp-block-navigation a { text-decoration: none; }
.rwhm-header .wp-block-navigation a:hover,
.rwhm-header .wp-block-navigation .current-menu-item > a { text-decoration: underline; }
.rwhm-header .wc-block-mini-cart__button { padding: 0; }

/* ---------- Works grid ---------- */
.rwhm-works .wp-block-post-template { gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40); }
.rwhm-works .wp-block-post-featured-image { margin-bottom: var(--wp--preset--spacing--20); overflow: hidden; background: var(--wp--preset--color--line); }
.rwhm-works .wp-block-post-featured-image img { transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .3s; }
.rwhm-works li:hover .wp-block-post-featured-image img { transform: scale(1.02); }
.rwhm-works .wp-block-post-title a { text-decoration: none; }
.rwhm-works li:hover .wp-block-post-title a { text-decoration: underline; }
.rwhm-meta { color: var(--wp--preset--color--muted); }
.rwhm-meta:empty { display: none; }

/* ---------- Single work ---------- */
.rwhm-work-hero img { max-height: 82vh; width: auto !important; margin-inline: auto; object-fit: contain; }
.rwhm-specs { border-top: 1px solid var(--wp--preset--color--line); }
.rwhm-specs > * { border-bottom: 1px solid var(--wp--preset--color--line); padding-block: .7em; margin: 0 !important; }
.rwhm-specs > *:empty { display: none; }

/* ---------- Series filter ---------- */
.rwhm-series .wp-block-categories-list,
.rwhm-series { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4em 1.4em; }
.rwhm-series a { text-decoration: none; color: var(--wp--preset--color--muted); }
.rwhm-series a:hover, .rwhm-series .current-cat a { color: var(--wp--preset--color--ink); text-decoration: underline; }

/* ---------- Buttons ---------- */
.wp-element-button, .wp-block-button__link { transition: background-color .2s, color .2s; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }

/* ---------- WooCommerce ---------- */
.wc-block-components-product-sale-badge, .wc-block-grid__product-onsale {
	background: var(--wp--preset--color--accent) !important; color: var(--wp--preset--color--paper) !important;
	border: 0 !important; border-radius: 0 !important; text-transform: uppercase; letter-spacing: .08em; font-size: 11px;
}
.wc-block-product-template .wp-block-post-title a, .wc-block-grid__product-title { text-decoration: none; }
.wc-block-components-product-image img, .wc-block-grid__product-image img { background: var(--wp--preset--color--line); }
.woocommerce-breadcrumb, .wc-block-breadcrumbs { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); }
.wc-block-components-button:not(.is-link), .single_add_to_cart_button { border-radius: 0 !important; }
.wc-block-store-notices, .woocommerce-notices-wrapper { font-size: var(--wp--preset--font-size--small); }

/* ---------- Footer ---------- */
.rwhm-footer { border-top: 1px solid var(--wp--preset--color--line); }
.rwhm-footer a { text-decoration: none; }
.rwhm-footer a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Masonry for works ---------- */
.rwhm-works .wp-block-post-template.rwhm-masonry {
	display: block;
	columns: 3 300px;
	column-gap: var(--wp--preset--spacing--40);
	list-style: none;
	padding: 0;
	margin-top: 0;
}
.rwhm-masonry > li {
	break-inside: avoid;
	margin: 0 0 var(--wp--preset--spacing--50);
}
.rwhm-masonry .wp-block-post-featured-image img { width: 100%; height: auto; }

/* ---------- About ---------- */
.rwhm-portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--wp--preset--color--line); }
.rwhm-cv { list-style: none; border-top: 1px solid var(--wp--preset--color--line); }
.rwhm-cv li { padding-block: .6em; border-bottom: 1px solid var(--wp--preset--color--line); font-size: var(--wp--preset--font-size--small); }

/* ---------- Single work: stack on small screens ---------- */
@media (max-width: 781px) {
	.rwhm-work-hero img { max-height: none; width: 100% !important; }
}

/* ---------- Monogram & coming soon ---------- */
.rwhm-monogram { line-height: 0; }
.rwhm-monogram img { display: block; width: 100%; height: auto; }
.rwhm-soon .rwhm-monogram { width: clamp(150px, 24vw, 250px); animation: rwhm-rise 1.4s cubic-bezier(.2,.7,.2,1) both; }
.rwhm-soon h1, .rwhm-soon .rwhm-label { animation: rwhm-rise 1.4s .25s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rwhm-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
