/* ==========================================================================
   Hardscape Home Guide — design system
   --------------------------------------------------------------------------
   Direction: an editorial field guide to hardscape work. Materials drive the
   palette (concrete, bluestone, fired clay, turf, joint sand); the signature
   device is the spec strip — real, checkable numbers under each article title.
   Everything else stays quiet: hairline rules, flat fills, no shadows.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
	/* Material palette */
	--paper:      #f3f3ef; /* cured concrete, cool — deliberately not cream */
	--surface:    #ffffff;
	--ink:        #16211d; /* wet basalt */
	--ink-soft:   #4a5651;
	--ink-mute:   #6d7873;

	--slate:      #3a5468; /* bluestone — primary */
	--slate-dark: #2a3f4f;
	--clay:       #a9622f; /* fired clay paver — accent, cost figures */
	--clay-soft:  #f0e2d6;
	--moss:       #5e7a50; /* turf */
	--moss-soft:  #e6ece0;
	--sand:       #cec5b2; /* joint sand */
	--sand-soft:  #f0ece2;

	--line:       #d9d8d2;
	--line-firm:  #b9b8b0;

	/* Type */
	--font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--font-body:    "Source Serif 4", Georgia, "Times New Roman", serif;
	--font-figure:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	/* Scale */
	--step--1: 0.9375rem;
	--step-0:  1.0625rem;
	--step-1:  1.1875rem;
	--step-2:  clamp(1.375rem, 1.2rem + 0.8vw, 1.625rem);
	--step-3:  clamp(1.625rem, 1.3rem + 1.5vw, 2.125rem);
	--step-4:  clamp(2rem, 1.35rem + 2.9vw, 3.25rem);

	--measure: 40rem;
	--gutter:  clamp(1.125rem, 0.6rem + 2.2vw, 2rem);
	--rule:    1px solid var(--line);
}

/* --- Base --------------------------------------------------------------- */

body,
body.single-post,
body.page {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: 1.68;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--clay-soft);
	color: var(--ink);
}

a {
	color: var(--slate);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover,
a:focus {
	color: var(--slate-dark);
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--clay);
	outline-offset: 2px;
	border-radius: 1px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	color: var(--ink);
	letter-spacing: -0.018em;
	line-height: 1.16;
	text-wrap: balance;
}

h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-2); font-weight: 600; }
h4 { font-size: var(--step-1); font-weight: 600; }

/* --- Site chrome -------------------------------------------------------- */

.site-header,
.site-footer {
	background: var(--surface);
	border-color: var(--line);
}

.site-header {
	border-bottom: var(--rule);
}

.site-footer {
	border-top: var(--rule);
	color: var(--ink-soft);
	font-size: var(--step--1);
}

.site-branding .main-title,
.site-branding .site-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.0625rem;
	letter-spacing: 0.005em;
	line-height: 1.2;
}

.site-branding .main-title a,
.site-branding .site-title a {
	color: var(--ink);
	text-decoration: none;
}

.site-branding .site-description {
	font-family: var(--font-display);
	font-size: 0.8125rem;
	color: var(--ink-mute);
	letter-spacing: 0.002em;
	margin-top: 0.15rem;
}

.main-navigation {
	background: transparent;
}

.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle {
	font-family: var(--font-display);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--ink-soft);
	letter-spacing: 0.004em;
	text-decoration: none;
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item > a {
	color: var(--ink);
}

.main-navigation .main-nav ul li.current-menu-item > a {
	box-shadow: inset 0 -2px 0 var(--clay);
}

/* --- Layout ------------------------------------------------------------- */

.site.grid-container,
.separate-containers .site-main {
	max-width: 78rem;
}

.separate-containers .inside-article,
.one-container .inside-article {
	background: transparent;
	padding: 0;
}

/* Article: single reading column, generous but disciplined */
.entry-content {
	max-width: var(--measure);
	margin-inline: auto;
}

.entry-header,
.hhg-breadcrumbs,
.hhg-byline,
.hhg-specs {
	max-width: var(--measure);
	margin-inline: auto;
}

/* --- Breadcrumbs -------------------------------------------------------- */

.hhg-breadcrumbs {
	margin-bottom: 1.25rem;
	font-family: var(--font-display);
	font-size: 0.8125rem;
	color: var(--ink-mute);
}

.hhg-breadcrumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: baseline;
}

.hhg-breadcrumbs li + li::before {
	content: "/";
	margin-right: 0.5rem;
	color: var(--line-firm);
}

.hhg-breadcrumbs a {
	color: var(--ink-mute);
	text-decoration: none;
}

.hhg-breadcrumbs a:hover {
	color: var(--slate);
	text-decoration: underline;
}

.hhg-breadcrumbs [aria-current] {
	color: var(--ink-soft);
}

/* --- Entry header ------------------------------------------------------- */

.entry-header {
	margin-bottom: 1.75rem;
}

.entry-header .entry-title {
	margin-bottom: 0.75rem;
}

.entry-header .entry-meta {
	font-family: var(--font-display);
	font-size: 0.8125rem;
	color: var(--ink-mute);
}

/* --- Spec strip (signature device) --------------------------------------
   Real numbers a reader can act on. Grid of label/value pairs separated by
   hairlines — no cards, no shadows.
   ------------------------------------------------------------------------ */

.hhg-specs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
	gap: 0;
	margin: 0 auto 2.25rem;
	padding: 1.125rem 0;
	border-top: 2px solid var(--ink);
	border-bottom: var(--rule);
}

.hhg-spec {
	padding: 0.35rem 1.125rem;
	border-left: var(--rule);
}

.hhg-spec:first-child {
	border-left: 0;
	padding-left: 0;
}

.hhg-spec-label {
	display: block;
	font-family: var(--font-display);
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--ink-mute);
	margin-bottom: 0.2rem;
}

.hhg-spec-value {
	display: block;
	font-family: var(--font-display);
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--ink);
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.hhg-spec-value small {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--ink-mute);
}

/* --- Byline ------------------------------------------------------------- */

.hhg-byline {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 1.25rem 2rem;
	align-items: start;
	margin: 0 auto 2.5rem;
	padding-bottom: 1.5rem;
	border-bottom: var(--rule);
}

.hhg-byline-author {
	display: flex;
	gap: 0.875rem;
	align-items: flex-start;
}

.hhg-byline-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	flex: 0 0 auto;
	margin: 0;
	border: var(--rule);
}

.hhg-byline-name {
	font-family: var(--font-display);
	font-size: 0.9375rem;
	font-weight: 600;
	margin: 0 0 0.15rem;
	line-height: 1.3;
}

.hhg-byline-name a {
	color: var(--ink);
	text-decoration: none;
	border-bottom: 1px solid var(--line-firm);
}

.hhg-byline-name a:hover {
	border-bottom-color: var(--clay);
	color: var(--ink);
}

.hhg-byline-meta {
	font-family: var(--font-display);
	font-size: 0.8125rem;
	color: var(--ink-mute);
	margin: 0 0 0.4rem;
}

.hhg-byline-bio {
	font-size: var(--step--1);
	color: var(--ink-soft);
	margin: 0;
	max-width: 34rem;
	line-height: 1.55;
}

.hhg-byline-dates {
	margin: 0;
	display: grid;
	grid-template-columns: auto auto;
	gap: 0.15rem 0.75rem;
	font-size: 0.8125rem;
	font-family: var(--font-display);
	align-self: start;
}

.hhg-byline-dates dt {
	color: var(--ink-mute);
	font-weight: 500;
	white-space: nowrap;
}

.hhg-byline-dates dd {
	margin: 0;
	color: var(--ink-soft);
	white-space: nowrap;
}

.hhg-byline-dates dd a {
	color: var(--slate);
}

/* --- Article body ------------------------------------------------------- */

.entry-content > * + * {
	margin-top: 1.25rem;
}

.entry-content p {
	margin-bottom: 0;
}

/* Opening paragraph of a guide or page: a step up in size, same colour. */
.entry-content .hhg-lead {
	font-size: var(--step-1);
	line-height: 1.55;
	letter-spacing: -0.005em;
}

.entry-content h2 {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: var(--rule);
}

.entry-content h3 {
	margin-top: 2.25rem;
}

.entry-content h2 + *,
.entry-content h3 + * {
	margin-top: 0.75rem;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.35rem;
}

.entry-content li + li {
	margin-top: 0.45rem;
}

.entry-content li::marker {
	color: var(--ink-mute);
}

.entry-content strong {
	font-weight: 600;
	color: var(--ink);
}

.entry-content hr {
	border: 0;
	border-top: var(--rule);
	margin: 2.5rem 0;
}

.entry-content blockquote {
	margin: 2rem 0;
	padding: 0 0 0 1.5rem;
	border-left: 3px solid var(--sand);
	font-size: var(--step-1);
	line-height: 1.55;
	color: var(--ink-soft);
}

.entry-content blockquote p {
	margin: 0;
}

.entry-content blockquote cite {
	display: block;
	margin-top: 0.6rem;
	font-family: var(--font-display);
	font-size: 0.8125rem;
	font-style: normal;
	color: var(--ink-mute);
}

/* Lead paragraph */
.entry-content > p:first-of-type {
	font-size: var(--step-1);
	line-height: 1.6;
	color: var(--ink-soft);
}

/* --- Tables (spec tables) ---------------------------------------------- */

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--font-display);
	font-size: 0.9375rem;
	margin: 1.75rem 0;
}

.entry-content table caption {
	caption-side: top;
	text-align: left;
	font-size: 0.8125rem;
	color: var(--ink-mute);
	padding-bottom: 0.6rem;
}

.entry-content th,
.entry-content td {
	padding: 0.7rem 0.75rem;
	border-bottom: var(--rule);
	text-align: left;
	vertical-align: top;
}

.entry-content thead th {
	border-bottom: 2px solid var(--ink);
	font-weight: 600;
	font-size: 0.8125rem;
	color: var(--ink);
}

.entry-content tbody tr:last-child td {
	border-bottom: 2px solid var(--ink);
}

.entry-content td:not(:first-child),
.entry-content th:not(:first-child) {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.entry-content tbody th {
	font-weight: 500;
	text-align: left;
}

.entry-content .hhg-table-note {
	font-family: var(--font-display);
	font-size: 0.8125rem;
	color: var(--ink-mute);
	margin-top: -1rem;
}

/* --- Figures & measured-drawing illustrations -------------------------- */

.entry-content figure,
.hhg-figure {
	margin: 2.25rem 0;
}

/* Break wide diagrams out of the reading column */
.entry-content figure.hhg-figure-wide {
	width: min(60rem, 92vw);
	margin-left: 50%;
	transform: translateX(-50%);
}

.entry-content figure img,
.entry-content figure svg {
	display: block;
	width: 100%;
	height: auto;
	border: var(--rule);
	background: var(--surface);
}

.entry-content figcaption {
	margin-top: 0.7rem;
	font-family: var(--font-display);
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--ink-mute);
}

.entry-content figcaption strong {
	color: var(--ink-soft);
	font-weight: 600;
}

/* --- Callouts ----------------------------------------------------------- */

.hhg-note {
	margin: 2rem 0;
	padding: 1.125rem 1.25rem;
	background: var(--sand-soft);
	border-left: 3px solid var(--clay);
	font-size: var(--step--1);
	line-height: 1.6;
}

.hhg-note > *:first-child { margin-top: 0; }
.hhg-note > *:last-child  { margin-bottom: 0; }

.hhg-note-title {
	display: block;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.8125rem;
	color: var(--ink);
	margin-bottom: 0.3rem;
}

.hhg-note--code {
	background: var(--moss-soft);
	border-left-color: var(--moss);
}

.hhg-note--warning {
	background: var(--clay-soft);
	border-left-color: var(--clay);
}

/* --- FAQ ---------------------------------------------------------------- */

.hhg-faq {
	margin: 2.5rem 0;
	border-top: 2px solid var(--ink);
}

.hhg-faq details {
	border-bottom: var(--rule);
}

.hhg-faq summary {
	cursor: pointer;
	list-style: none;
	padding: 1.05rem 2rem 1.05rem 0;
	position: relative;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--ink);
}

.hhg-faq summary::-webkit-details-marker { display: none; }

.hhg-faq summary::after {
	content: "";
	position: absolute;
	right: 0.4rem;
	top: 1.5rem;
	width: 0.55rem;
	height: 0.55rem;
	border-right: 2px solid var(--ink-mute);
	border-bottom: 2px solid var(--ink-mute);
	transform: rotate(45deg);
	transition: transform 0.18s ease;
}

.hhg-faq details[open] summary::after {
	transform: rotate(-135deg);
	top: 1.7rem;
}

.hhg-faq summary:hover { color: var(--slate); }

.hhg-faq .hhg-faq-answer {
	padding: 0 0 1.25rem;
	font-size: var(--step--1);
	line-height: 1.65;
	color: var(--ink-soft);
}

.hhg-faq .hhg-faq-answer > *:first-child { margin-top: 0; }
.hhg-faq .hhg-faq-answer > *:last-child  { margin-bottom: 0; }

/* --- Sources ------------------------------------------------------------ */

.hhg-sources {
	margin: 3rem 0 0;
	padding-top: 1.5rem;
	border-top: var(--rule);
}

.hhg-sources h2 {
	margin-top: 0 !important;
	padding-top: 0 !important;
	border-top: 0 !important;
	font-size: 1.125rem;
}

.hhg-sources ol {
	font-size: var(--step--1);
	color: var(--ink-soft);
	line-height: 1.55;
}

.hhg-sources li + li { margin-top: 0.5rem; }

.hhg-sources a { word-break: break-word; }

/* --- Author page / archive cards --------------------------------------- */

.hhg-archive-intro {
	max-width: var(--measure);
	margin: 0 auto 2.5rem;
	font-size: var(--step-1);
	color: var(--ink-soft);
}

.hhg-card-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: 52rem;
	margin-inline: auto;
}

.hhg-card {
	padding: 1.5rem 0;
	border-bottom: var(--rule);
}

.hhg-card:first-child { border-top: 2px solid var(--ink); }

.hhg-card-title {
	font-size: var(--step-2);
	margin: 0 0 0.4rem;
}

.hhg-card-title a {
	color: var(--ink);
	text-decoration: none;
}

.hhg-card-title a:hover {
	color: var(--slate);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.hhg-card-meta {
	font-family: var(--font-display);
	font-size: 0.8125rem;
	color: var(--ink-mute);
	margin: 0 0 0.5rem;
}

.hhg-card-excerpt {
	margin: 0;
	color: var(--ink-soft);
	font-size: var(--step--1);
	line-height: 1.6;
	max-width: 42rem;
}

/* --- Footer ------------------------------------------------------------- */

.hhg-footer-cols {
	display: grid;
	grid-template-columns: 1.5fr repeat(3, minmax(9rem, 1fr));
	gap: 2rem 1.75rem;
	padding: 2.75rem 0 2rem;
	text-align: left;
	border-top: var(--rule);
}

.hhg-footer-col h3 {
	font-family: var(--font-display);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 0.7rem;
	color: var(--ink);
}

.hhg-footer-col p {
	margin: 0 0 0.6rem;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--ink-soft);
	max-width: 24rem;
}

.hhg-footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hhg-footer-col li + li { margin-top: 0.35rem; }

.hhg-footer-col a {
	color: var(--ink-soft);
	text-decoration: none;
	font-size: 0.875rem;
}

.hhg-footer-col a:hover {
	color: var(--slate);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.hhg-footer-note {
	border-top: var(--rule);
	padding: 1.25rem 0;
	font-size: 0.8125rem;
	color: var(--ink-mute);
	line-height: 1.6;
}

.hhg-footer-note p { margin: 0 0 0.5rem; }
.hhg-footer-note p:last-child { margin-bottom: 0; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 768px) {
	.hhg-byline {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.hhg-byline-dates {
		grid-template-columns: auto 1fr;
	}

	.hhg-specs {
		grid-template-columns: repeat(2, 1fr);
	}

	.hhg-spec {
		padding: 0.6rem 0.9rem;
		border-top: var(--rule);
	}

	.hhg-spec:nth-child(-n + 2) {
		border-top: 0;
	}

	.hhg-spec:nth-child(odd) {
		border-left: 0;
		padding-left: 0;
	}

	.entry-content figure.hhg-figure-wide {
		width: 100%;
		margin-left: 0;
		transform: none;
	}

	.hhg-footer-cols {
		grid-template-columns: 1fr 1fr;
		gap: 1.75rem 1.5rem;
		padding-top: 2rem;
	}
}

@media (max-width: 480px) {
	.hhg-footer-cols {
		grid-template-columns: 1fr;
	}

	.hhg-specs {
		grid-template-columns: 1fr;
	}

	.hhg-spec {
		padding-left: 0;
		border-left: 0;
	}

	.hhg-spec:nth-child(2) {
		border-top: var(--rule);
	}

	.entry-content table {
		font-size: 0.875rem;
	}

	.entry-content th,
	.entry-content td {
		padding: 0.55rem 0.4rem;
	}
}

/* --- Accessibility ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* --- Print -------------------------------------------------------------- */

@media print {
	.site-header,
	.site-footer,
	.site-info,
	.hhg-footer-cols,
	.hhg-breadcrumbs,
	.hhg-byline,
	.hhg-faq summary::after {
		display: none;
	}

	body {
		background: #fff;
		font-size: 11pt;
	}

	.entry-content {
		max-width: none;
	}

	.entry-content h2 {
		page-break-after: avoid;
	}

	.entry-content figure,
	.entry-content table {
		page-break-inside: avoid;
	}
}
