/* Silent Guns (memorial.php): the wall of gold plates lettered in dark brown, and a name's own page. */

/* Cinzel, SIL Open Font License 1.1 (fonts/Cinzel-OFL.txt): the plates' raised lettering. Latin only. */
@font-face {
	font-family: "Cinzel";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("fonts/cinzel-600.woff2") format("woff2");
}

.cgc-sgw {
	--sg-ink: #3a2410;  /* the lettering, the dashed line, the beads */
	--sg-hi: #f4e6b6;   /* the gold face, light to deep */
	--sg-mid: #dec27e;
	--sg-lo: #bc9a4e;
	container-type: inline-size;
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Every plate the same width: 4 across, then 3, 2, 1 as the column narrows. */
.cgc-sg {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px 16px;
}
@container (max-width: 1000px) { .cgc-sg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 740px) { .cgc-sg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 500px) { .cgc-sg { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.cgc-sg > li { margin: 0; padding: 0; display: flex; min-width: 0; }

.cgc-sg__plate {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	box-sizing: border-box; /* the theme leaves boxes content-box: padding inside the height, or the plates grow */
	width: 100%;
	min-height: 64px;
	padding: 12px 14px;
	border-radius: 3px;
	color: var(--sg-ink);
	text-align: center;
	text-decoration: none;
	background: radial-gradient(130% 160% at 28% 18%, var(--sg-hi), var(--sg-mid) 55%, var(--sg-lo));
	box-shadow: inset 0 0 0 1px rgba(122, 94, 38, .75), inset 0 0 0 3px rgba(255, 248, 225, .35), 0 2px 5px rgba(60, 40, 10, .22);
}
/* The border: a dark brown dashed line inside the edge, with a bead at each corner. */
.cgc-sg__plate::before,
.cgc-sg__plate::after {
	content: "";
	position: absolute;
	inset: 5px;
	pointer-events: none;
}
.cgc-sg__plate::before {
	border: 1.5px dashed rgba(58, 36, 16, .55);
	border-radius: 2px;
}
.cgc-sg__plate::after {
	inset: 0;
	background:
		radial-gradient(circle, var(--sg-ink) 0 1.8px, transparent 2.4px) 0 0 / 12px 12px no-repeat,
		radial-gradient(circle, var(--sg-ink) 0 1.8px, transparent 2.4px) 100% 0 / 12px 12px no-repeat,
		radial-gradient(circle, var(--sg-ink) 0 1.8px, transparent 2.4px) 0 100% / 12px 12px no-repeat,
		radial-gradient(circle, var(--sg-ink) 0 1.8px, transparent 2.4px) 100% 100% / 12px 12px no-repeat;
}
a.cgc-sg__plate { transition: transform .15s ease, filter .15s ease; }
a.cgc-sg__plate:hover { color: var(--sg-ink); filter: brightness(1.05); transform: translateY(-2px); }
a.cgc-sg__plate:focus-visible { outline: 3px solid var(--wp--preset--color--blue, #3e6189); outline-offset: 3px; }
.cgc-sg__plate--photo { justify-content: flex-start; text-align: left; padding: 11px 14px 11px 12px; }

/* A square photo, as tall as the plate's lettering. */
.cgc-sg__photo {
	flex: none;
	box-sizing: border-box;
	width: 42px !important;
	height: 42px !important;
	max-width: none;
	object-fit: cover;
	object-position: center 30%;
	border-radius: 2px;
	box-shadow: 0 0 0 1.5px var(--sg-ink);
}
.cgc-sg__text { display: block; min-width: 0; }
.cgc-sg__name,
.cgc-sg__year,
.cgc-sg__more { display: block; }
.cgc-sg__name {
	font: 600 .9rem/1.3 "Cinzel", "Trajan Pro", Georgia, serif;
	letter-spacing: .03em;
	text-wrap: balance;
	overflow-wrap: anywhere;
	text-shadow: 0 1px 0 rgba(255, 248, 222, .6); /* cut into the gold */
}
.cgc-sg__year {
	margin-top: 3px;
	font: 600 .82rem/1 "Cinzel", "Trajan Pro", Georgia, serif;
	letter-spacing: .14em;
	font-variant-numeric: lining-nums;
	opacity: .88;
	text-shadow: 0 1px 0 rgba(255, 248, 222, .6);
}
.cgc-sg__more {
	margin-top: 4px;
	font: 700 .6rem/1 var(--wp--preset--font-family--sans, system-ui, sans-serif);
	letter-spacing: .16em;
	text-transform: uppercase;
	color: rgba(58, 36, 16, .75);
}
@media (prefers-reduced-motion: reduce) { a.cgc-sg__plate { transition: none; } a.cgc-sg__plate:hover { transform: none; } }

/* A name's own page: on the left the photo, then the title or role, the years, the dates and the other lines;
   the obituary on the right. One left edge with the name in the title band above. */
.cgc-mem {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: 2rem 3.5rem;
	align-items: start;
}
.cgc-mem--nowords { grid-template-columns: 320px; }
.cgc-mem > * { min-width: 0; }
.cgc-mem__side > :first-child { margin-top: 0; }
.cgc-mem__photo { margin: 0 0 1.4rem; }
.cgc-mem__photo img { display: block; width: 100%; height: auto; border-radius: 6px; }

/* The title or role: a heading in the site's slab, at the h3 size. */
.cgc-mem__role {
	margin: 0;
	font-family: var(--wp--preset--font-family--slab, "Roboto Slab", Georgia, serif);
	font-size: var(--wp--preset--font-size--large, 1.35rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--wp--preset--color--navy, #15233a);
	text-wrap: balance;
}
/* The years, set apart from the words: the slab, walnut, spaced. */
.cgc-mem__span {
	margin: .45rem 0 0;
	font-family: var(--wp--preset--font-family--slab, "Roboto Slab", Georgia, serif);
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: .06em;
	font-variant-numeric: lining-nums;
	color: var(--wp--preset--color--walnut, #7b4a24);
}
.cgc-mem__dates,
.cgc-mem__details {
	margin: 1rem 0 0;
	padding: 1rem 0 0;
	border-top: 1px solid rgba(21, 35, 58, .14);
}
.cgc-mem__dates { display: grid; gap: .55rem; }
.cgc-mem__dates div { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr); align-items: baseline; }
.cgc-mem__dates dt {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--walnut, #7b4a24);
}
.cgc-mem__dates dd { margin: 0; font-size: 1rem; color: var(--wp--preset--color--ink, #1e2530); }
.cgc-mem__details { list-style: none; display: grid; gap: .4rem; }
.cgc-mem__details li { margin: 0; font-size: 1rem; line-height: 1.4; color: var(--wp--preset--color--slate, #4a5566); }
.cgc-mem__dates + .cgc-mem__details { margin-top: 1rem; }

.cgc-mem__words { max-width: 66ch; }
.cgc-mem__words > :first-child { margin-top: 0; }
.cgc-mem__words p { font-size: 1.06rem; line-height: 1.65; }
.cgc-mem__back { margin: 2rem 0 0; font-weight: 600; }
@media (max-width: 760px) {
	.cgc-mem,
	.cgc-mem--nowords { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
	.cgc-mem__side { max-width: 420px; }
}
