/* ==========================================================================
   Legal pages — Privacy Policy and Terms of Use
   --------------------------------------------------------------------------
   Loaded only on those two pages (inc/legal-pages.php). Uses only the
   existing type sizes, weights, spacing, radii, shadows and colours from
   main.css. Shared components used as-is: .section, .status-badge, .btn.
   1. Hero
   2. The sections (side index + text)
   3. Questions? card
   ========================================================================== */


/* 1. Hero
   ========================================================================== */

/* Same top offset as the FAQ hero. */
.lg-hero {
	align-items: flex-start;
	row-gap: var(--space-m);
	margin-top: calc(var(--space-xl) + var(--space-xxl));
	font-family: var(--font-sans);
}

.lg-hero__title {
	color: var(--color-ink);
	font-size: var(--size-display);
	font-weight: 500;
	letter-spacing: -0.5px;
	line-height: 1.1;
}

.lg-hero__text {
	max-width: 560px;
	color: var(--color-ink);
	font-size: 18px;
	font-weight: 300;
	letter-spacing: -0.5px;
	line-height: 1.2;
	opacity: 0.7;
}


/* 2. The sections (side index + text)
   ========================================================================== */

.lg-body__grid {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	align-items: start;
	gap: var(--space-xl);
	width: 100%;
	padding-top: var(--space-m);
	border-top: 1px solid var(--color-line);
	font-family: var(--font-sans);
}

/* The side index, pinned while you read. The section you're on shows in
   full with its number in orange; the rest are faded. */
.lg-index {
	position: sticky;
	top: calc(var(--space-xxl) + var(--space-m));
	display: flex;
	flex-direction: column;
	gap: var(--space-s);
}

.lg-index__label {
	color: var(--color-ink);
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	opacity: 0.6;
}

.lg-index__list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lg-index__link {
	display: flex;
	align-items: baseline;
	gap: var(--space-s);
	padding: var(--space-xs) 0;
	color: var(--color-ink);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: -0.5px;
	line-height: 1.4;
	opacity: 0.4;
	transition: opacity 0.3s, translate 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.lg-index__link:hover {
	opacity: 0.8;
}

.lg-index__link.is-current {
	opacity: 1;
	translate: 8px 0;
}

.lg-index__n {
	flex-shrink: 0;
	width: 20px;
	font-size: 12px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.lg-index__link.is-current .lg-index__n {
	color: var(--color-orange);
}

.lg-sections {
	display: flex;
	flex-direction: column;
	max-width: 900px;
}

.lg-section {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr);
	gap: var(--space-m);
	padding: var(--space-l) 0;
	scroll-margin-top: calc(var(--space-xxl) + var(--space-m));
}

.lg-section:first-child {
	padding-top: var(--space-s);
}

.lg-section + .lg-section {
	border-top: 1px solid var(--color-line);
}

.lg-section__n {
	color: var(--color-orange);
	font-size: var(--size-title-md);
	font-weight: 700;
	letter-spacing: -0.5px;
	line-height: 1.1;
}

.lg-section__body {
	display: flex;
	flex-direction: column;
	gap: var(--space-s);
}

.lg-section__title {
	margin-bottom: var(--space-xs);
	color: var(--color-ink);
	font-size: var(--size-title-md);
	font-weight: 500;
	letter-spacing: -0.5px;
	line-height: 1.1;
}

.lg-section__text {
	color: var(--color-body);
	font-size: 16px;
	font-weight: 300;
	letter-spacing: -0.5px;
	line-height: 1.7;
}

.lg-section__text a {
	color: var(--color-ink);
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}


/* 3. Questions? card (the FAQ page's dark card)
   ========================================================================== */

.lg-ask {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-m);
	margin-top: var(--space-l);
	padding: var(--space-xl) var(--space-l);
	border-radius: var(--radius);
	background-color: var(--color-night);
	background-image: url("../images/ui/dark-light-rays.webp");
	background-position: right top;
	background-blend-mode: soft-light;
	box-shadow: var(--shadow-deep);
}

.lg-ask__title {
	color: var(--color-paper);
	font-size: var(--size-title-lg);
	font-weight: 500;
	letter-spacing: -0.5px;
	line-height: 1.1;
}

.lg-ask__text {
	max-width: 420px;
	color: var(--color-paper);
	font-size: 15px;
	font-weight: 300;
	letter-spacing: -0.5px;
	line-height: 1.2;
	opacity: 0.6;
}


/* Smaller screens
   ========================================================================== */

@media (max-width: 1200px) {
	.lg-hero {
		margin-top: calc(var(--space-xl) + var(--space-l));
	}

	.lg-body__grid {
		grid-template-columns: 220px minmax(0, 1fr);
		gap: var(--space-l);
	}
}

@media (max-width: 810px) {
	.lg-hero__text {
		font-size: 15px;
	}

	/* No side index: the sections follow one another. */
	.lg-body__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.lg-index {
		display: none;
	}

	.lg-section {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--space-s);
		padding: var(--space-m) 0;
	}

	.lg-section__text {
		font-size: 15px;
	}

	.lg-ask {
		padding: var(--space-l) var(--space-m);
	}
}

@media (max-width: 478px) {
	.lg-hero {
		margin-top: var(--space-xxl);
	}
}

@media (prefers-reduced-motion: reduce) {
	.btn,
	.lg-index__link {
		transition: none;
	}
}
