html {
	scroll-behavior: smooth;
	accent-color: var(--bgm-color-primary);
	-webkit-tap-highlight-color: rgb(20 108 98 / 0.18);
}

body {
	margin: 0;
	background: var(--bgm-color-bg);
	color: var(--bgm-color-text);
	font-family: var(--bgm-font-body);
	font-size: var(--bgm-text-base);
	font-weight: var(--bgm-weight-regular);
	line-height: var(--bgm-line-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-block: 0 var(--bgm-space-6);
	color: var(--bgm-color-text);
	font-family: var(--bgm-font-heading);
	font-weight: var(--bgm-weight-extrabold);
	line-height: var(--bgm-line-heading);
	letter-spacing: var(--bgm-tracking-section);
}

h1 { font-size: var(--bgm-text-hero); }
h2 { font-size: var(--bgm-text-3xl); }
h3 { font-size: var(--bgm-text-2xl); }

p {
	margin-block: 0 var(--bgm-space-6);
}

button,
button[type="button"],
button[type="reset"],
button[type="submit"],
input[type="button"],
input[type="reset"],
input[type="submit"] {
	border-color: var(--bgm-color-border);
	color: var(--bgm-color-text);
}

a {
	color: inherit;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
	text-underline-offset: 0.18em;
	transition: color var(--bgm-duration-fast) var(--bgm-ease-out), text-decoration-color var(--bgm-duration-fast) var(--bgm-ease-out);
}

a:hover {
	color: var(--bgm-color-primary);
	text-decoration-color: currentColor;
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 3px solid color-mix(in srgb, var(--bgm-color-primary) 44%, transparent);
	outline-offset: 3px;
}

::selection {
	background: var(--bgm-leaf-100);
	color: var(--bgm-color-primary-hover);
}

img {
	max-width: 100%;
	height: auto;
}

.bgm-container {
	width: min(100% - (2 * var(--bgm-gutter)), var(--bgm-container));
	margin-inline: auto;
}

.bgm-section {
	padding-block: var(--bgm-section-space);
}

.bgm-display {
	max-width: 100%;
	font-family: var(--bgm-font-heading);
	font-size: var(--bgm-text-display);
	font-weight: var(--bgm-weight-extrabold);
	line-height: var(--bgm-leading-hero);
	letter-spacing: var(--bgm-tracking-hero);
}

.bgm-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--bgm-space-2);
	margin-bottom: var(--bgm-space-5);
	color: var(--bgm-color-accent);
	font-size: var(--bgm-text-2xs);
	font-weight: var(--bgm-weight-bold);
	letter-spacing: var(--bgm-tracking-eyebrow);
	line-height: var(--bgm-leading-tight);
	text-transform: uppercase;
}

.bgm-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--bgm-space-2);
	min-height: 3rem;
	padding: var(--bgm-button-padding);
	border: 0;
	border-radius: var(--bgm-button-radius);
	background: var(--bgm-button-bg);
	color: var(--bgm-button-text);
	font-family: var(--bgm-font-body);
	font-size: var(--bgm-button-font-size);
	font-weight: var(--bgm-button-font-weight);
	line-height: var(--bgm-leading-card);
	text-decoration: none;
	transition: background var(--bgm-duration-fast) var(--bgm-ease-out), transform var(--bgm-duration-fast) var(--bgm-ease-out);
}

.bgm-button:hover {
	background: var(--bgm-button-bg-hover);
	color: var(--bgm-button-text);
	transform: translateY(-2px);
}

.bgm-card {
	border: var(--bgm-border-width) solid var(--bgm-card-border);
	border-radius: var(--bgm-card-radius);
	background: var(--bgm-card-bg);
	overflow: clip;
	transition: box-shadow var(--bgm-duration-normal) var(--bgm-ease-out), transform var(--bgm-duration-normal) var(--bgm-ease-out);
}

.bgm-card:hover {
	box-shadow: var(--bgm-card-shadow-hover);
	transform: translateY(-2px);
}

/*
 * Shared "just confirmed" mark-in used by state badges that appear only
 * after a successful action (follow, participation) — a quiet settle,
 * not a celebration. Neutralised globally by the reduced-motion rule below.
 */
@keyframes bgm-confirm-in {
	from {
		opacity: 0;
		transform: scale(0.85);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Signature element: a quiet cartographic thread used only in route-led sections. */
.bgm-route-thread {
	position: relative;
}

.bgm-route-thread::before {
	position: absolute;
	inset-block: var(--bgm-space-6);
	inset-inline-start: calc(var(--bgm-space-4) * -1);
	width: 2px;
	border-radius: var(--bgm-radius-pill);
	background: linear-gradient(to bottom, var(--bgm-color-accent), var(--bgm-color-primary));
	content: "";
}

/*
 * Archive result counts are wayfinding information rather than display
 * headlines. Give every archive the same restrained editorial scale.
 */
.bgm-explore-results-bar h2,
.bgm-route-results-header h2,
.bgm-events-results__header h2,
.bgm-guides-results__header h2,
.bgm-collections-results__header h2 {
	max-width: 20ch;
	font-size: clamp(2rem, 3vw, 2.75rem) !important;
	letter-spacing: var(--bgm-tracking-card);
	line-height: var(--bgm-leading-card) !important;
	text-wrap: balance;
}

/*
 * Detail-page continuation headings are supporting navigation, not a second
 * hero. Keep their editorial presence while protecting the page hierarchy
 * from the globally managed block-title scale.
 */
.bgm-place-related-heading h2.bgm-managed-text,
.bgm-route-related .bgm-route-section-heading h2.bgm-managed-text,
.bgm-event-related__header h2.bgm-managed-text,
.bgm-guide-related__header h2.bgm-managed-text,
.bgm-collection-related__header h2.bgm-managed-text {
	max-width: 20ch;
	font-size: clamp(2.15rem, 3.2vw, 3rem) !important;
	letter-spacing: var(--bgm-tracking-card);
	line-height: var(--bgm-leading-section) !important;
	text-wrap: balance;
}

/*
 * Narrative and sequence headings use the established long-form article
 * scale. This keeps route, event and collection stories aligned with place
 * and guide content without turning each section into another hero.
 */
.bgm-route-copy > h2.bgm-managed-text,
.bgm-route-flow .bgm-route-section-heading h2.bgm-managed-text,
.bgm-event-story > header h2.bgm-managed-text,
.bgm-collection-story-copy > h2.bgm-managed-text,
.bgm-collection-flow__header h2.bgm-managed-text {
	max-width: 20ch;
	font-size: clamp(2.25rem, 3.5vw, 3.25rem) !important;
	letter-spacing: var(--bgm-tracking-card);
	line-height: var(--bgm-leading-card) !important;
	text-wrap: balance;
}

/* Keep editorial subheadings consistent inside every detail-page narrative. */
.bgm-place-prose h2,
.bgm-route-content h2,
.bgm-event-story__content h2,
.bgm-guide-content h2,
.bgm-collection-content h2 {
	font-size: clamp(2rem, 3.5vw, 3.25rem) !important;
	line-height: var(--bgm-leading-card) !important;
	text-wrap: balance;
}

/*
 * Planning, visit, amenity and season modules share the quieter place-detail
 * scale. They support decisions and should never compete with the narrative.
 */
.bgm-place-features h2.bgm-managed-text,
.bgm-place-visit h2.bgm-managed-text,
.bgm-route-plan h2.bgm-managed-text,
.bgm-route-seasons h2.bgm-managed-text {
	max-width: 20ch;
	font-size: clamp(1.75rem, 3vw, 2.6rem) !important;
	letter-spacing: var(--bgm-tracking-card);
	line-height: var(--bgm-leading-card) !important;
	text-wrap: balance;
}

@media (max-width: 767px) {
	:root {
		--bgm-section-space: var(--bgm-section-space-mobile);
	}

	.bgm-display {
		max-width: 100%;
	}
}

/* Shared call-to-action icons are SVGs rather than Unicode glyphs so mobile
 * browsers cannot substitute a coloured emoji. */
.bgm-action-icon {
	display: inline-block;
	inline-size: 1em;
	block-size: 1em;
	margin-inline-start: 0.28em;
	vertical-align: -0.12em;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.9;
}

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