/* =========================================================
   Typography and spacing rhythm (4.22.0)
   Loaded after the component stylesheets. It only sets type size,
   line height, measure and the space between things, using the
   scale in style.css (--text-*, --lh-*, --flow, --section-y).
   It never sets colour; brand-palette.css does that.

   Space rules
     - Related things sit close (label + title, title + intro).
     - Unrelated things sit far (a section heading + the one above it).
     - Space above a heading is always larger than space below it,
       so a heading visibly belongs to what follows.
   ========================================================= */

/* ---------- Long-form text: articles and pages ---------- */
.article-content,
.page-content {
	font-family: var(--font-body);
	font-size: var(--text-md);
	line-height: var(--lh-body);
}

.article-content > :where(p, ul, ol, dl, blockquote, figure, table, pre),
.page-content > :where(p, ul, ol, dl, blockquote, figure, table, pre) {
	margin-top: 0;
	margin-bottom: var(--flow);
}

.article-content :where(h2, h3, h4),
.page-content :where(h2, h3, h4) {
	font-family: var(--font-display);
	font-style: normal;
	font-weight: 500;
	line-height: var(--lh-heading);
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.article-content h2,
.page-content h2 {
	margin: 2.6em 0 0.6em;
	padding: 0;
	border: 0;
	font-size: var(--text-h2);
}

.article-content h3,
.page-content h3 {
	margin: 2em 0 0.5em;
	font-size: var(--text-h3);
}

.article-content h4,
.page-content h4 {
	margin: 1.6em 0 0.4em;
	font-size: var(--text-h4);
}

.article-content > :where(h2, h3, h4):first-child,
.page-content > :where(h2, h3, h4):first-child {
	margin-top: 0;
}

/* A heading directly after another heading needs no extra gap. */
.article-content :where(h2, h3) + :where(h3, h4),
.page-content :where(h2, h3) + :where(h3, h4) {
	margin-top: 0.8em;
}

.article-content :where(ul, ol),
.page-content :where(ul, ol) {
	padding-left: 1.4em;
}

.article-content li,
.page-content li {
	margin-bottom: 0.5em;
	padding-left: 0.15em;
}

.article-content li > :where(ul, ol),
.page-content li > :where(ul, ol) {
	margin-top: 0.5em;
	margin-bottom: 0;
}

.article-content blockquote,
.page-content blockquote {
	margin-block: 1.8em;
	padding-inline: 1.25em;
	font-size: var(--text-lg);
	line-height: 1.55;
}

/* ---------- Page header band (Terms, About, finder, archives) ---------- */
.page-hero,
.page-header,
.archive-header {
	padding-block: clamp(2.5rem, 2rem + 4vw, 4.5rem);
}

:where(.page-hero, .page-header, .archive-header) h1 {
	margin-bottom: 0.4em;
	font-size: var(--text-h1);
	line-height: var(--lh-tight);
}

:where(.page-hero, .page-header, .archive-header) :where(p, .page-meta) {
	max-width: 56ch;
	margin-bottom: 0;
	font-size: var(--text-md);
	line-height: 1.6;
}

.page-content-wrap,
.page-body {
	padding-block: clamp(2.25rem, 1.75rem + 3vw, 4rem) var(--section-y);
}

/* ---------- Cards: consistent inner spacing and text sizes ---------- */
:where(.perfume-card, .content-card, .post-card) :where(h2, h3) {
	margin: 0 0 0.4em;
	font-size: var(--text-h4);
	line-height: 1.25;
}

:where(.perfume-card, .content-card, .post-card) p {
	margin-bottom: 0.75em;
	font-size: var(--text-sm);
	line-height: 1.6;
}

/* ---------- Small text never goes under 12px; labels get air ---------- */
:where(.eyebrow, .perfume-card__eyebrow, .content-card__meta, .post-meta) {
	font-size: var(--text-xs);
	line-height: 1.4;
}

/* ---------- Footer sections ---------- */
.site-footer :where(h2, h3, h4) {
	margin-bottom: 0.9em;
	line-height: 1.25;
}

.site-footer :where(ul) li {
	margin-bottom: 0.55em;
	line-height: 1.5;
}

/* ---------- Phones ---------- */
@media (max-width: 640px) {
	.article-content,
	.page-content {
		font-size: var(--text-md, 1.0625rem);
		line-height: 1.7;
	}

	.article-content h2,
	.page-content h2 {
		margin-top: 2.2em;
	}
}
