/* Legal pages (terms-conditions.html, privacy-policy.html): reading-focused layout using home-v2.css tokens */

.hm-gold-text {
	background: none;
	-webkit-text-fill-color: var(--hm-gold-deep);
	color: var(--hm-gold-deep);
}

/* ── Hero: same top treatment as find-us.html ── */
.hm-legal-hero {
	position: relative;
	padding: 0 0 2rem;
	background: #faf5ec;
	overflow: hidden;
}

.hm-legal-hero::before,
.hm-legal-hero::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	aspect-ratio: 1568 / 344;
	pointer-events: none;
}

.hm-legal-hero::before {
	background: url('../img/find-us.png') center top / 100% auto no-repeat;
}

.hm-legal-hero::after {
	aspect-ratio: auto;
	height: calc(100vw * 344 / 1568 + 3px);
	background:
		linear-gradient(to bottom, rgba(250, 245, 236, 0) 30%, #faf5ec 96%),
		linear-gradient(to bottom, rgba(9, 30, 19, 0.25) 0%, rgba(9, 30, 19, 0.12) 15%, rgba(9, 30, 19, 0.02) 32%, rgba(9, 30, 19, 0) 50%);
}

.hm-legal-hero .hm-wrap {
	position: relative;
	z-index: 1;
}

.hm-legal-hero__head {
	padding-top: calc(10.94vw * 0.85);
}

/* Mobile hero: same as faqs.html */
@media (max-width: 600px) {
	.hm-legal-hero::before,
	.hm-legal-hero::after {
		aspect-ratio: 1568 / 1000;
	}

	.hm-legal-hero {
		padding-bottom: 0.5rem;
	}

	.hm-legal-hero::before {
		background-image: url('../img/section-responsive.png');
		background-position: center top;
		background-size: auto;
	}

	.hm-legal-hero::after {
		height: auto;
		background: transparent;
	}

	.hm-legal-hero .hm-legal-hero__head {
		padding-top: calc(8vw * 0.85);
	}

	.hm-legal-hero .hm-legal-hero__text {
		color: #989898;
	}
}

.hm-legal-hero__title {
	margin-top: 0.8rem;
	color: #fffaf0;
}

.hm-legal-hero__text {
	max-width: 56ch;
	margin: 1rem 0 0;
	font-size: 1.05rem;
	font-weight: 500;
	line-height: 1.6;
	color: var(--hm-ink-soft);
}

.hm-page-legal .for-leaft-section {
	display: none;
}

/* ── Reading area: one calm light surface, narrow measure, large type ── */
.hm-legal {
	padding: 1rem 0 4.5rem;
	background: #faf5ec;
}

.hm-legal__grid {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 4rem;
	align-items: start;
	padding-top: 2rem;
	border-top: 1px solid rgba(154, 116, 38, 0.25);
}

.hm-legal__side {
	position: sticky;
	top: 6rem;
}

.hm-legal__toc {
	display: grid;
	margin-top: 0.8rem;
	border-left: 1px solid rgba(154, 116, 38, 0.25);
}

.hm-legal__toc-link {
	display: flex;
	gap: 0.8rem;
	margin-left: -1px;
	padding: 0.55rem 0 0.55rem 1rem;
	border-left: 2px solid transparent;
	font-size: 0.92rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--hm-ink-soft);
	text-decoration: none;
	transition: color 0.2s, border-color 0.2s;
}

.hm-legal__toc-link span {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.75rem;
	padding-top: 0.15rem;
	color: var(--hm-gold);
}

.hm-legal__toc-link:hover {
	color: var(--hm-ink);
}

.hm-legal__toc-link--active {
	border-left-color: var(--hm-gold);
	font-weight: 700;
	color: var(--hm-ink);
}

.hm-legal__doc {
	max-width: 68ch;
}

.hm-legal__section {
	scroll-margin-top: 6rem;
	padding-bottom: 2.4rem;
	margin-bottom: 2.4rem;
	border-bottom: 1px solid rgba(154, 116, 38, 0.2);
}

.hm-legal__section:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

.hm-legal__num {
	margin: 0;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	color: var(--hm-gold);
}

.hm-legal__heading {
	margin: 0.3rem 0 1rem;
	font-family: var(--hm-serif);
	font-size: clamp(1.45rem, 2.4vw, 1.85rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--hm-green-900);
}

.hm-legal__short {
	margin: 0 0 1.1rem;
	padding: 0.85rem 1.1rem;
	border-left: 3px solid var(--hm-gold);
	border-radius: 0 10px 10px 0;
	background: var(--hm-card);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--hm-ink-soft);
}

.hm-legal__short strong {
	color: var(--hm-gold-deep);
}

.hm-legal__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-legal__list li {
	position: relative;
	margin-bottom: 0.8rem;
	padding-left: 1.5rem;
	font-size: 1.08rem;
	line-height: 1.8;
	color: var(--hm-ink);
}

.hm-legal__list li:last-child {
	margin-bottom: 0;
}

.hm-legal__list li::before {
	content: '';
	position: absolute;
	top: 0.75em;
	left: 0;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--hm-gold);
}

/* ── Reading progress + back to top ── */
.hm-legal-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 1000;
	pointer-events: none;
}

.hm-legal-progress span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--hm-gold);
	transition: width 0.1s linear;
}

.hm-legal-top {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 900;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.9rem;
	height: 2.9rem;
	border: 1px solid rgba(201, 168, 76, 0.6);
	border-radius: 50%;
	background: var(--hm-green-900);
	box-shadow: var(--hm-shadow);
	cursor: pointer;
	transition: transform 0.2s ease, background-color 0.2s;
}

.hm-legal-top[hidden] {
	display: none;
}

.hm-legal-top:hover {
	transform: translateY(-3px);
	background: var(--hm-green-700);
}

.hm-legal-top svg {
	width: 1.3rem;
	height: 1.3rem;
	fill: none;
	stroke: var(--hm-gold-soft);
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.hm-legal__section a {
	font-weight: 600;
	color: var(--hm-gold-deep);
	text-decoration: none;
	border-bottom: 1px solid rgba(154, 116, 38, 0.4);
}

.hm-legal__section a:hover {
	color: var(--hm-green-900);
}

/* ── CTA ── */
.hm-legal-cta {
	position: relative;
	overflow: hidden;
	padding: 4rem 0;
	background-color: #0a1c10;
	color: #fffaf0;
}

.hm-legal-cta::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: url('../img/heritage-bg.png');
	background-size: cover;
	background-position: center;
	opacity: 0.07;
	pointer-events: none;
}

.hm-legal-cta__inner {
	position: relative;
	max-width: 760px;
	text-align: center;
}

.hm-legal-cta__inner .hm-eyebrow {
	color: var(--hm-gold-soft);
}

.hm-legal-cta__inner .hm-heading {
	margin: 0.8rem 0 1rem;
	color: #fffaf0;
}

.hm-legal-cta__inner p {
	margin: 0 0 0.9rem;
	font-size: 1rem;
	line-height: 1.7;
	color: rgba(255, 250, 240, 0.85);
}

.hm-legal-cta__inner .hm-btn {
	margin-top: 0.8rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
	.hm-legal__grid {
		grid-template-columns: 1fr;
		gap: 1.6rem;
	}

	.hm-legal__side {
		position: static;
	}

	.hm-legal__toc {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem;
		border-left: 0;
	}

	.hm-legal__toc-link,
	.hm-legal__toc-link--active {
		margin-left: 0;
		padding: 0.5rem 0.9rem;
		border: 1px solid rgba(154, 116, 38, 0.3);
		border-radius: 999px;
		font-size: 0.85rem;
	}

	.hm-legal__toc-link--active {
		background: var(--hm-card);
		border-color: var(--hm-gold);
	}
}

@media (max-width: 600px) {
	.hm-legal__list li {
		font-size: 1.02rem;
		line-height: 1.75;
	}

	.hm-legal-top {
		right: 1rem;
		bottom: 1rem;
	}
}
