/*
Theme Name: Memorial Stone Care
Theme URI: https://memorialstonecare.com/
Author: Memorial Stone Care
Description: Granite, limestone and grass. A reference theme for cemetery history, burial questions and headstone care.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: memorialstonecare
*/

:root {
	--ink: #1f2224;
	--granite: #2c3033;
	--granite-2: #3b4044;
	--slate: #5d6266;
	--lichen: #9ea3a0;
	--rule: #cfccc4;
	--limestone: #e7e5df;
	--paper: #f5f4f0;
	--white: #fcfcfa;
	--red: #9b1c1c;
	--red-dk: #7a1414;
	--moss: #4f6b35;
	--grass: #6f8f45;
	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--carved: "Cinzel", "Trajan Pro", Georgia, serif;
	--grass-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28' preserveAspectRatio='none'%3E%3Cpath fill='%234f6b35' d='M0 28V18l3-9 2 9 3-13 2 13 4-10 1 10 3-15 3 15 2-8 3 8 4-12 1 12 3-9 3 9 2-14 3 14 3-7 2 7 4-11 2 11 2-16 3 16 3-9 2 9 4-12 2 12 2-7 3 7 3-14 2 14 3-10 3 10 2-8 3 8 4-13 1 13 3-9 3 9 2-15 3 15 3-8 2 8 4-11 2 11 3-7 2 7 3-12 2 12V28z'/%3E%3Cpath fill='%236f8f45' d='M0 28v-6l4-8 1 8 4-11 2 11 3-7 2 7 4-13 2 13 3-6 2 6 4-10 2 10 3-8 2 8 3-12 2 12 4-6 2 6 3-11 2 11 3-9 3 9 2-13 3 13 3-6 2 6 4-10 2 10 3-7 2 7 3-12 2 12 4-8 2 8 3-11 2 11 2-6 3 6 4-12 2 12 3-8 2 8 3-10 2 10V28z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 19px;
	line-height: 1.68;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dk); }
h1, h2, h3, h4 { font-family: var(--carved); font-weight: 600; line-height: 1.22; color: var(--granite); letter-spacing: .02em; }
.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 99; background: var(--white); padding: 8px 12px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
	background:
		radial-gradient(circle at 20% 30%, rgba(255,255,255,.035) 0 1px, transparent 2px) 0 0/7px 7px,
		radial-gradient(circle at 70% 60%, rgba(0,0,0,.18) 0 1px, transparent 2px) 0 0/11px 11px,
		var(--granite);
	color: var(--limestone);
	border-bottom: 3px solid var(--red);
	position: relative;
	z-index: 5;
}
.site-header .bar { max-width: 1180px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--limestone); text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brand .mark { width: 34px; height: 41px; color: var(--limestone); flex: none; }
.brand .name { display: block; white-space: nowrap; font-family: var(--carved); font-weight: 700; font-size: 1.28rem; letter-spacing: .12em; text-transform: uppercase; line-height: 1.1; }
.brand .tag { display: block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--lichen); margin-top: 3px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.nav a { display: block; white-space: nowrap; padding: 8px 10px; color: var(--limestone); text-decoration: none; font-family: var(--carved); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; border-bottom-color: var(--grass); }
.nav-toggle { display: none; background: none; border: 1px solid var(--slate); color: var(--limestone); font-family: var(--carved); letter-spacing: .1em; text-transform: uppercase; padding: 8px 14px; font-size: .78rem; cursor: pointer; }

@media (max-width: 1120px) {
	.nav-toggle { display: block; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--granite); border-bottom: 3px solid var(--red); }
	.nav.open { display: block; }
	.nav ul { flex-direction: column; padding: 8px 20px 16px; }
	.nav a { padding: 12px 0; border-bottom: 1px solid var(--granite-2); }
	.brand .tag { display: none; }
}

/* ---------- Grass ---------- */
.grass { height: 26px; background: var(--grass-svg) repeat-x bottom / 240px 26px; }
.footer-grass { background-color: transparent; margin-bottom: -1px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-block; padding: 13px 22px; background: var(--red); color: #fff; text-decoration: none;
	font-family: var(--carved); font-weight: 700; font-size: .84rem; letter-spacing: .12em; text-transform: uppercase;
	border: 1px solid var(--red); transition: background .15s;
}
.btn:hover { background: var(--red-dk); color: #fff; }
.btn.ghost { background: transparent; color: var(--limestone); border-color: var(--lichen); }
.btn.ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
.textlink { font-family: var(--carved); font-weight: 700; font-size: .86rem; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Hero ---------- */
.hero {
	position: relative; overflow: hidden; color: var(--limestone);
	background:
		linear-gradient(180deg, rgba(31,34,36,.0) 40%, rgba(31,34,36,.55) 100%),
		radial-gradient(ellipse at 75% 0%, #6b7276 0%, transparent 60%),
		linear-gradient(180deg, #4a5054 0%, #3a3f43 55%, #2f3437 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 84px 20px 200px; }
.kicker { font-family: var(--carved); font-size: .8rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #e0a6a6; margin-bottom: 14px; }
.kicker::before { content: ""; display: inline-block; width: 28px; height: 2px; background: var(--red); vertical-align: middle; margin-right: 12px; }
.hero h1 { color: #f3f1ec; font-size: clamp(2.1rem, 4.6vw, 3.6rem); max-width: 860px; margin: 0 0 18px; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.hero .lede { max-width: 640px; font-size: 1.14rem; color: #d6d4ce; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .skyline { position: absolute; left: 0; right: 0; bottom: 20px; width: 100%; height: 180px; z-index: 1; opacity: .92; }
.hero .grass { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }

/* ---------- Bands / sections ---------- */
.band { padding: 64px 0; }
.band + .band { border-top: 1px solid var(--rule); }
.stone-band { background: var(--limestone); }
.states-band { background: var(--white); }
.sec-head { max-width: 760px; margin-bottom: 30px; }
.sec-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin: 0 0 8px; padding-bottom: 12px; position: relative; }
.sec-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 3px; background: linear-gradient(90deg, var(--red) 0 22px, transparent 22px 28px, var(--grass) 28px); }
.sec-head p { margin: 10px 0 0; color: var(--slate); }

/* ---------- Headstone state tiles ---------- */
.stones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 14px; }
.stone > a, .stone > span {
	display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-decoration: none;
	padding: 20px 6px 14px; min-height: 118px; text-align: center; position: relative;
	border-radius: 52px 52px 3px 3px;
	background:
		radial-gradient(circle at 30% 20%, rgba(255,255,255,.5) 0 1px, transparent 1.5px) 0 0/6px 6px,
		linear-gradient(180deg, #e2e0da 0%, #cfccc5 100%);
	border: 1px solid #b9b6ae;
	box-shadow: inset 0 0 0 4px rgba(255,255,255,.35), 0 2px 0 #a9a69e;
	color: var(--granite);
	transition: transform .15s, box-shadow .15s;
}
.stone > a::after, .stone > span::after { content: ""; position: absolute; left: -8px; right: -8px; bottom: -8px; height: 9px; background: var(--grass-svg) repeat-x bottom / 60px 9px; }
.stone .ab { font-family: var(--carved); font-weight: 700; font-size: 1.55rem; letter-spacing: .06em; color: var(--granite-2); line-height: 1; margin-top: 8px; text-shadow: 0 1px 0 rgba(255,255,255,.7), 0 -1px 0 rgba(0,0,0,.18); }
.stone .nm { font-size: .78rem; line-height: 1.25; margin-top: 10px; color: var(--slate); letter-spacing: .02em; }
.stone > a:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 4px rgba(255,255,255,.35), 0 5px 0 #a9a69e; }
.stone > a:hover .ab { color: var(--red); }
.stone.here > a { background: linear-gradient(180deg, #4a5054, #34393c); border-color: var(--granite); }
.stone.here .ab { color: #fff; text-shadow: none; }
.stone.here .nm { color: var(--lichen); }
.stone.soon > span { opacity: .5; }
.stones.compact { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 16px 10px; }
.stones.compact .stone > a, .stones.compact .stone > span { min-height: 92px; padding-top: 14px; border-radius: 42px 42px 3px 3px; }
.stones.compact .ab { font-size: 1.2rem; }
.stones.compact .nm { font-size: .68rem; margin-top: 7px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--rule); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--slate); transform: translateY(-2px); color: var(--ink); }
.card .thumb { aspect-ratio: 16/10; background: linear-gradient(180deg, #8e9396, #5d6266); overflow: hidden; border-bottom: 3px solid var(--grass); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75); transition: filter .2s; }
.card:hover .thumb img { filter: saturate(1); }
.card .body { padding: 18px 20px 22px; }
.card .label { font-family: var(--carved); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
.card h3 { font-size: 1.08rem; margin: 0 0 8px; }
.card:hover h3 { color: var(--red); }
.card p { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--slate); }

/* ---------- About band ---------- */
.about-band { background: var(--granite); color: #d6d4ce; border-top: 0 !important; }
.about-band h2 { color: #f3f1ec; font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-top: 0; }
.about-band a { color: #e7b0b0; }
.about-grid { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; }
.plaque {
	aspect-ratio: 4/5; border-radius: 110px 110px 4px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px;
	background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.45) 0 1px, transparent 1.5px) 0 0/6px 6px, linear-gradient(180deg, #dcdad3, #bfbcb4);
	color: var(--granite); box-shadow: inset 0 0 0 7px rgba(255,255,255,.3), 0 10px 0 -2px var(--moss);
}
.plaque span { font-family: var(--carved); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--slate); }
.plaque strong { font-family: var(--carved); font-size: 1.35rem; line-height: 1.2; letter-spacing: .06em; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } .plaque { width: 170px; } }

/* ---------- Page header ---------- */
.page-head { padding: 40px 0 30px; border-bottom: 1px solid var(--rule); background: var(--white); }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin: 6px 0 10px; }
.page-head .meta, .page-head .sub { color: var(--slate); font-size: .95rem; margin: 0; }
.page-head.carved {
	position: relative; padding-bottom: 54px; border-bottom: 0; color: var(--limestone);
	background: radial-gradient(ellipse at 80% 0%, #6b7276 0%, transparent 60%), linear-gradient(180deg, #474d51, #33383b);
}
.page-head.carved h1 { color: #f3f1ec; }
.page-head.carved .meta, .page-head.carved .sub { color: #c4c2bc; }
.page-head.carved .crumbs a { color: #d8d6d0; }
.page-head.carved .grass { position: absolute; left: 0; right: 0; bottom: 0; }
.state-badge {
	display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 76px; margin-top: 10px;
	border-radius: 32px 32px 3px 3px; background: linear-gradient(180deg, #e2e0da, #c6c3bb); color: var(--granite);
	font-family: var(--carved); font-weight: 700; font-size: 1.4rem; padding-top: 8px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35);
}
.crumbs { font-size: .82rem; color: var(--slate); font-family: var(--carved); letter-spacing: .08em; text-transform: uppercase; }
.crumbs a { color: var(--slate); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs span { margin: 0 8px; opacity: .5; }

/* ---------- Article ---------- */
.article { padding-top: 34px; padding-bottom: 56px; }
.hero-img { margin: 0 0 30px; border-bottom: 4px solid var(--grass); }
.hero-img img { width: 100%; max-height: 460px; object-fit: cover; }
.entry > *:first-child { margin-top: 0; }
.entry h2 { font-size: 1.55rem; margin: 2.1em 0 .6em; padding-top: 18px; border-top: 1px solid var(--rule); position: relative; }
.entry h2::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 3px; background: var(--red); }
.entry h3 { font-size: 1.16rem; margin: 1.7em 0 .4em; color: var(--granite-2); }
.entry p, .entry li { max-width: 72ch; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin: .35em 0; }
.entry li::marker { color: var(--grass); }
.entry blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--grass); color: var(--slate); font-style: italic; }
.entry figure { margin: 1.8em 0; }
.entry figcaption { font-size: .82rem; color: var(--slate); margin-top: 6px; }
.entry img { border-radius: 2px; }
.table-wrap { overflow-x: auto; margin: 1.6em 0; }
.entry table, .msc-table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--white); border: 1px solid var(--rule); }
.entry th, .entry td { padding: 11px 14px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.entry th { font-family: var(--carved); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; background: var(--granite); color: var(--limestone); }
.entry tr td:first-child { font-weight: 600; color: var(--granite-2); width: 34%; }
/* Kadence / core blocks from the old theme */
.entry .wp-block-image, .entry .kb-image { margin: 1.8em 0; }
.entry .wp-block-table table { border: 1px solid var(--rule); }
.entry .kt-accordion-panel-inner, .entry .wp-block-kadence-accordion { font-size: .98rem; }

.author-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 46px; padding: 22px 24px; background: var(--limestone); border-left: 4px solid var(--grass); }
.author-box svg { width: 40px; height: 48px; flex: none; }
.author-box p { margin: 0; font-size: .95rem; line-height: 1.6; }
.more-states { background: var(--limestone); }

/* ---------- Listing ---------- */
.listing { padding-top: 40px; padding-bottom: 60px; }
.pagination { margin-top: 34px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--rule); background: var(--white); text-decoration: none; font-family: var(--carved); font-size: .85rem; }
.pagination .current { background: var(--granite); color: #fff; border-color: var(--granite); }

/* ---------- Footer ---------- */
.site-footer {
	background:
		radial-gradient(circle at 20% 30%, rgba(255,255,255,.03) 0 1px, transparent 2px) 0 0/7px 7px,
		#1f2224;
	color: #b9b7b1; padding: 48px 0 28px; font-size: .92rem;
}
.site-footer .cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; }
.site-footer .fbrand { font-family: var(--carved); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--limestone); font-size: 1.05rem; margin-bottom: 10px; }
.site-footer h4 { color: var(--limestone); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid #3b4044; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 7px 0; }
.site-footer a { color: #d3d1cb; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red); }
.site-footer .fine { margin-top: 38px; padding-top: 18px; border-top: 1px solid #34393c; font-size: .8rem; color: #8a8d8b; }
.footer-grass { background-color: var(--paper); }
@media (max-width: 960px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .about-col { grid-column: 1 / -1; } }

@media (max-width: 600px) {
	body { font-size: 18px; }
	.site-header .bar { padding: 12px 16px; gap: 12px; }
	.brand .name { font-size: .98rem; letter-spacing: .08em; white-space: normal; }
	.brand .mark { width: 28px; height: 34px; }
	.page-head h1 { font-size: 1.75rem; }
	.hero h1 { font-size: 2rem; }
	.wrap, .narrow { padding: 0 16px; }
	.hero-inner { padding: 56px 16px 170px; }
	.hero .skyline { height: 130px; }
	.band { padding: 48px 0; }
	.stones { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 16px 10px; }
	.stone > a, .stone > span { min-height: 100px; }
	.stone .ab { font-size: 1.3rem; }
	.cards { grid-template-columns: 1fr; }
	.entry tr td:first-child { width: 40%; }
}
