/*
Theme Name: missestherz
Theme URI: https://missestherz.com
Author: Esther Zhuang
Description: A journal-style block theme for missestherz.com. Sunset hero, oxblood accents, warm paper, polaroids, pressed flowers and handwritten notes.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: missestherz
*/

/* ---------- Paper grain on every background ---------- */
body,
.mz-paper,
.mz-blush,
.mz-dark,
.mz-midnight,
.mz-oxblood {
	background-image: url(assets/images/grain.png);
}
.mz-blush { background-color: var(--wp--preset--color--blush); }
.mz-dark { background-color: var(--wp--preset--color--slate); color: #E6E2EE; }
.mz-midnight { background-color: var(--wp--preset--color--midnight); color: var(--wp--preset--color--cream); }
.mz-oxblood { background-color: var(--wp--preset--color--oxblood); color: var(--wp--preset--color--cream); }
.mz-dark a, .mz-midnight a, .mz-oxblood a { color: var(--wp--preset--color--peach); }
.mz-dark :where(h1,h2,h3), .mz-midnight :where(h1,h2,h3), .mz-oxblood :where(h1,h2,h3) { color: var(--wp--preset--color--cream); }

/* ---------- Header ---------- */
.mz-header { background-color: var(--wp--preset--color--slate); }
.mz-header .wp-block-site-title,
.mz-logo {
	font-family: var(--wp--preset--font-family--handwritten);
	font-size: 24px;
	line-height: 1.6;
	font-weight: 400;
}
.mz-header .wp-block-site-title a { color: #FDF6F0; text-decoration: none; }
.mz-header .wp-block-navigation a { color: #E6E2EE; text-decoration: none; }
.mz-header .wp-block-navigation a:hover { color: var(--wp--preset--color--peach); }
.mz-header .wp-block-navigation__responsive-container.is-menu-open { background-color: var(--wp--preset--color--slate); }
.mz-header .wp-block-navigation__responsive-container-open,
.mz-header .wp-block-navigation__responsive-container-close { color: #FDF6F0; }
.mz-subscribe-link a {
	border: 1px solid var(--wp--preset--color--rust);
	border-radius: 999px;
	padding: 8px 18px !important;
	font-style: normal;
	font-size: 15px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--peach) !important;
}

/* ---------- Sunset hero ---------- */
.mz-hero {
	background-color: #6F7394;
	background-image: url(assets/images/grain.png), url(assets/images/sunset.jpg);
	background-size: auto, cover;
	background-position: 0 0, center;
	color: #FFFFFF;
	text-align: center;
}
.mz-hero p { text-shadow: 0 1px 14px rgba(60, 66, 87, 0.45); }
.mz-hero a { color: #FFFFFF; }
.mz-hero s { color: #E6E2EE; text-decoration-thickness: 2px; }

/* ---------- Handwriting and labels ---------- */
.mz-hand { font-family: var(--wp--preset--font-family--handwritten); font-weight: 400; line-height: 1.8; }
.mz-label {
	font-size: 14px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rust);
}
.mz-hero .mz-label { color: #F1ECF2; }

/* ---------- Polaroids ---------- */
.wp-block-image.is-style-polaroid,
.wp-block-post-featured-image.is-style-polaroid {
	background: #FFFFFF;
	padding: 16px 16px 64px;
	box-shadow: 0 12px 30px rgba(26, 22, 22, 0.18);
	position: relative;
	box-sizing: border-box;
}
.wp-block-image.is-style-polaroid img,
.wp-block-post-featured-image.is-style-polaroid img { display: block; width: 100%; object-fit: cover; }
.wp-block-image.is-style-polaroid figcaption {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 16px;
	margin: 0;
	text-align: left;
	font-family: var(--wp--preset--font-family--handwritten);
	font-size: 15px;
	color: var(--wp--preset--color--ink);
}

/* ---------- Note (the short version) ---------- */
.wp-block-group.is-style-note {
	background-color: var(--wp--preset--color--blush);
	background-image: url(assets/images/grain.png);
	padding: 28px 32px;
	transform: rotate(-1deg);
	box-shadow: 0 10px 24px rgba(60, 66, 87, 0.12);
	position: relative;
}

/* ---------- Book quote ---------- */
.wp-block-quote.is-style-book {
	background-color: var(--wp--preset--color--blush);
	background-image: url(assets/images/grain.png);
	text-align: center;
	padding: 64px 40px;
	margin-left: 0;
	margin-right: 0;
}
.wp-block-quote.is-style-book cite {
	display: block;
	margin-top: 20px;
	font-family: var(--wp--preset--font-family--handwritten);
	font-size: 16px;
	font-style: normal;
	color: var(--wp--preset--color--oxblood);
}

/* ---------- Drop cap ---------- */
.has-drop-cap:not(:focus)::first-letter {
	font-family: var(--wp--preset--font-family--serif-display);
	font-style: italic;
	font-weight: 600;
	color: var(--wp--preset--color--oxblood);
	font-size: 5.4em;
	line-height: 0.8;
	margin: 0.08em 0.12em 0 0;
}

/* ---------- Contents list (numbered posts) ---------- */
.mz-contents .wp-block-post-template { counter-reset: mz; list-style: none; padding: 0; margin: 0; }
.mz-contents .wp-block-post-template > li {
	counter-increment: mz;
	border-top: 1px solid var(--wp--preset--color--line);
	padding: 20px 0;
	margin: 0;
}
.mz-contents .wp-block-post-template > li:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.mz-contents .mz-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.mz-contents .mz-row::before {
	content: counter(mz, decimal-leading-zero);
	font-family: var(--wp--preset--font-family--serif-display);
	font-style: italic;
	font-size: 24px;
	color: var(--wp--preset--color--rust);
	width: 40px;
}
.mz-contents .wp-block-post-featured-image {
	width: 132px;
	flex: 0 0 132px;
	margin: 0;
	border: 5px solid #FFFFFF;
	border-bottom-width: 16px;
	box-shadow: 0 4px 12px rgba(26, 22, 22, 0.16);
	background: var(--wp--preset--color--blush);
	aspect-ratio: 4 / 3;
}
.mz-contents .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.mz-contents .wp-block-post-title { flex: 1 1 320px; min-width: 0; margin: 0; font-size: 32px; line-height: 1.15; }
.mz-contents .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.mz-contents .wp-block-post-title a:hover { color: var(--wp--preset--color--oxblood); }
.mz-contents .mz-meta { font-size: 16px; font-style: italic; color: var(--wp--preset--color--muted); }
.mz-contents .mz-meta a { color: var(--wp--preset--color--muted); text-decoration: none; }

/* ---------- Category links ---------- */
.mz-topic {
	border-top: 1px solid var(--wp--preset--color--rust);
	padding-top: 16px;
}
.mz-topic .mz-topic-name a {
	font-family: var(--wp--preset--font-family--serif-display);
	font-style: italic;
	font-weight: 700;
	font-size: 32px;
	line-height: 1.05;
	color: var(--wp--preset--color--oxblood);
	text-decoration: none;
}
.wp-block-post-terms a { text-decoration: none; }

/* ---------- Pressed flowers (add classes in Advanced > Additional CSS class) ---------- */
.has-flower { position: relative; }
.has-flower::after {
	content: "";
	position: absolute;
	width: 120px;
	height: 160px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	pointer-events: none;
	filter: drop-shadow(0 2px 3px rgba(26, 22, 22, 0.18));
	z-index: 2;
}
.flower-poppy::after { background-image: url(assets/images/poppy-deep.png); width: 120px; height: 360px; }
.flower-poppy-red::after { background-image: url(assets/images/poppy-red.png); width: 96px; height: 300px; }
.flower-poppy-mauve::after { background-image: url(assets/images/poppy-mauve.png); width: 100px; height: 320px; }
.flower-hellebore::after { background-image: url(assets/images/hellebore.png); width: 130px; height: 136px; }
.flower-pansy::after { background-image: url(assets/images/pansy.png); width: 96px; height: 206px; }
.flower-petal::after { background-image: url(assets/images/petal-red.png); width: 60px; height: 116px; }
.flower-petal-plum::after { background-image: url(assets/images/petal-plum.png); width: 64px; height: 62px; }
.flower-top-right::after { top: -48px; right: -40px; transform: rotate(14deg); }
.flower-top-left::after { top: -48px; left: -40px; transform: rotate(-14deg); }
.flower-bottom-right::after { bottom: -60px; right: -40px; transform: rotate(-10deg); }
.flower-bottom-left::after { bottom: -70px; left: -56px; transform: rotate(-24deg); }
@media (max-width: 700px) {
	.has-flower::after { transform: scale(0.65); }
	.flower-top-right::after, .flower-bottom-right::after { right: -10px; }
	.flower-top-left::after, .flower-bottom-left::after { left: -10px; }
}

/* ---------- Torn paper above the footer ---------- */
.mz-torn { position: relative; margin-top: 120px; }
.mz-torn::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -45px;
	height: 46px;
	background: url(assets/images/torn-edge.svg) no-repeat bottom / 100% 100%;
	pointer-events: none;
}

/* ---------- Underline-only form fields (newsletter) ---------- */
.mz-midnight input[type="email"],
.mz-midnight input[type="text"],
.mz-oxblood input[type="email"],
.mz-oxblood input[type="text"] {
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--peach);
	color: var(--wp--preset--color--cream);
	font-family: inherit;
	font-size: 20px;
	padding: 10px 4px;
}
.mz-midnight input[type="submit"],
.mz-oxblood input[type="submit"] {
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--ink);
	border: 0;
	border-radius: 999px;
	padding: 14px 28px;
	font-family: inherit;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

/* ---------- Small screens ---------- */
@media (max-width: 700px) {
	.mz-contents .wp-block-post-featured-image { width: 96px; flex-basis: 96px; }
	.mz-contents .wp-block-post-title { font-size: 26px; }
	.wp-block-image.is-style-polaroid, .wp-block-post-featured-image.is-style-polaroid { padding: 10px 10px 48px; }
}

/* ---------- Helper classes used by the patterns ---------- */
.mz-ox { color: var(--wp--preset--color--oxblood); }
.mz-peach { color: var(--wp--preset--color--peach); }
.mz-center { text-align: center; }
.mz-muted { color: var(--wp--preset--color--muted); }
.mz-hero { padding: 128px 24px 200px; }
.mz-hero-text { font-size: clamp(22px, 2.4vw, 30px); line-height: 2; color: #FFFFFF; }
.mz-hero-links { font-style: italic; font-size: 20px; }
.mz-hero-links a { margin: 0 14px; text-underline-offset: 6px; }
.mz-section { padding-top: 120px; }
.mz-kicker { font-family: var(--wp--preset--font-family--handwritten); font-size: 20px; line-height: 1.8; color: var(--wp--preset--color--oxblood); margin-bottom: 0 !important; }
.mz-dark .mz-kicker, .mz-midnight .mz-kicker, .mz-oxblood .mz-kicker { color: var(--wp--preset--color--peach); }
.mz-row > * { margin: 0 !important; }
.mz-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.mz-meta > * { margin: 0 !important; }
.mz-meta .wp-block-post-terms::after { content: ","; }
.mz-panel { padding: 64px 48px; }
.mz-band { padding: 96px 24px; }
.mz-post-head { text-align: center; padding-top: 88px; padding-bottom: 40px; }
.mz-post-head .wp-block-post-terms a { color: var(--wp--preset--color--muted); }
.mz-dek { font-size: 23px; font-style: italic; color: var(--wp--preset--color--body); }
.mz-dek .wp-block-post-excerpt__more-text { display: none; }
.mz-byline { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; font-style: italic; color: var(--wp--preset--color--muted); font-size: 18px; }
.mz-byline > * { margin: 0 !important; }
.mz-byline .wp-block-post-date { font-family: var(--wp--preset--font-family--handwritten); font-style: normal; font-size: 15px; color: var(--wp--preset--color--oxblood); }
.mz-author { padding: 32px; margin-top: 48px; }
.mz-author .wp-block-post-author__avatar img { border-radius: 50%; }
.mz-author .wp-block-post-author__name { font-family: var(--wp--preset--font-family--handwritten); color: var(--wp--preset--color--peach); font-size: 17px; }
.mz-author .wp-block-post-author__bio { color: #F1ECF2; font-size: 18px; }
.mz-signoff { text-align: right; font-family: var(--wp--preset--font-family--handwritten); font-size: 26px; color: var(--wp--preset--color--oxblood); }
.mz-footer { padding: 56px 24px; font-size: 17px; color: #D3D0DE; }
.mz-footer a { color: #E6E2EE; }
.mz-tsrang-banner { border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); padding: 24px 0; }
.wp-block-post-featured-image.is-style-polaroid.alignwide { max-width: 1040px; }
.mz-latest-title { font-size: clamp(40px, 5vw, 72px); font-style: italic; line-height: 0.98; }
.mz-latest-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.mz-latest-title a:hover { color: var(--wp--preset--color--oxblood); }
.wp-block-post-excerpt__more-link { font-style: italic; }
.mz-dark .wp-block-image { margin: 0; }
.mz-dark .wp-block-image img { height: 100%; min-height: 360px; object-fit: cover; }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 1px solid var(--wp--preset--color--oxblood); color: var(--wp--preset--color--oxblood); background: transparent; }
