/* ==========================================================================
   ebg section library - shared primitives.
   Every library entry may use these classes. Entries depend on the theme
   token contract (tokens.css: --ebg-*, --fs-*, --space-*, --font-*) and on
   nothing else. Synced to <theme>/assets/css/library/_primitives.css.
   ========================================================================== */

@layer components {

	/* The editor canvas has no theme reset: without this, padded library boxes
	   grow by their padding there (h03 growth card 238x249 instead of 198x209). */
	[class*="ebg-"],
	[class*="ebg-"]::before,
	[class*="ebg-"]::after { box-sizing: border-box; }


	.ebg-shell {
		inline-size: 100%;
		max-inline-size: var(--container);
		margin-inline: auto;
		padding-inline: var(--gutter);
	}

	.ebg-section {
		position: relative;
		padding-block: var(--section-py);
	}

	.ebg-section-head {
		max-inline-size: 80ch;
		margin-block-end: var(--space-2xl, 3rem);
	}

	.ebg-eyebrow-chip {
		display: inline-flex;
		align-items: center;
		gap: var(--space-2xs);
		margin: 0;
		padding: .4rem .85rem;
		border: 1px solid var(--ebg-border-strong);
		border-radius: var(--radius-pill);
		background-color: var(--ebg-surface-1);
		color: var(--ebg-ink-2);
		font-family: var(--font-sans);
		font-size: var(--fs-11);
		font-weight: 700;
		line-height: 1;
		letter-spacing: var(--tr-eyebrow);
		text-transform: uppercase;

		&::before {
			content: "";
			inline-size: 7px;
			block-size: 7px;
			border-radius: 2px;
			background-color: var(--ebg-accent);
		}
	}

	.ebg-eyebrow-chip--dark {
		border-color: var(--ebg-rim);
		background-color: var(--ebg-glass-fill-subtle);
		color: var(--ebg-on-dark);
	}

	.ebg-section-title {
		margin-block: var(--space-xs) var(--space-s);
		color: var(--ebg-heading-ink);
		font-family: var(--font-display);
		font-size: var(--text-3xl);
		font-weight: 750;
		line-height: var(--lh-heading);
		letter-spacing: var(--tr-heading);
	}

	.ebg-section-title--dark { color: var(--ebg-on-dark); }

	.ebg-section-lead {
		margin: 0;
		color: var(--ebg-ink-2);
		font-size: var(--text-base);
		line-height: var(--lh-body);
	}

	.ebg-section-lead--dark { color: var(--ebg-on-dark-2); }

	/* One focus phrase per heading: <mark class="ebg-mark"> (Gutenberg "Highlight" format). */
	.ebg-mark,
	.ebg-hero__mark {
		background: none;
		color: var(--ebg-accent);
	}

	/* Legal and long-form text pages (privacy policy): readable measure, ruled headings. */
	.ebg-legal {
		max-inline-size: 72ch;
		margin-inline: auto;
		padding-block: var(--space-2xl) var(--space-3xl);

		/* The page title lives in the content (Blocksy's title band is off on these pages). */
		& h1 {
			margin-block: 0 var(--space-s);
			font-size: var(--fs-40);
			line-height: 1.1;
		}

		& h2 {
			margin-block: var(--space-xl) var(--space-xs);
			padding-block-start: var(--space-s);
			border-block-start: 1px solid var(--ebg-hairline);
			font-size: var(--fs-22);
		}
	}
}
