/* Legal pages — matches marketing site (Defensive Online Driving Texas) */

.legal-site,
.legal-site * {
	box-sizing: border-box;
}

.legal-site {
	--blue-900: #081e33;
	--blue-800: #10375c;
	--blue-600: #1a4f82;
	--amber-500: #c1440e;
	--slate-900: #0f172a;
	--slate-700: #334155;
	--slate-600: #475569;
	--slate-200: #e2e8f0;
	--slate-100: #f1f5f9;
	--slate-50: #f8fafc;
	--white: #ffffff;
	--max-w: 1180px;
	--content-w: 820px;
	--font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
	font-family: var(--font);
	color: var(--slate-900);
	background: var(--white);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	-webkit-font-smoothing: antialiased;
}

/* ── Break out of Frappe web layout ── */
body:has(.legal-site) .navbar,
body:has(.legal-site) .web-footer,
body:has(.legal-site) footer.web-footer,
body:has(.legal-site) .page-header,
body:has(.legal-site) .page-header-wrapper,
body:has(.legal-site) .page-breadcrumbs,
body:has(.legal-site) .breadcrumb-container,
body:has(.legal-site) .page-footer {
	display: none !important;
}

body:has(.legal-site) .page-content-wrapper,
body:has(.legal-site) .page-content-wrapper main,
body:has(.legal-site) .page-content-wrapper .page_content {
	margin: 0 !important;
	padding: 0 !important;
	max-width: none !important;
	width: 100% !important;
	background: var(--white) !important;
}

/* Override Frappe heading defaults inside legal pages */
.legal-site h1,
.legal-site h2,
.legal-site h3 {
	font-family: var(--font) !important;
}

.legal-container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 24px;
	width: 100%;
}

/* ── Navbar (matches marketing Navbar.jsx) ── */
.legal-nav {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--white);
	border-bottom: 1px solid var(--slate-200);
	box-shadow: 0 1px 0 rgb(16 55 92 / 0.04);
}

.legal-nav__inner {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 24px;
	height: 70px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.legal-nav__logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
}

.legal-nav__seal {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.legal-nav__brand {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
	gap: 3px;
}

.legal-nav__name {
	font-size: 13px;
	font-weight: 700;
	color: var(--blue-800);
	letter-spacing: -0.01em;
	white-space: nowrap;
}

.legal-nav__state {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--amber-500);
}

.legal-nav__back {
	font-size: 14px;
	font-weight: 600;
	color: var(--slate-600);
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 6px;
	transition: background 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.legal-nav__back:hover {
	background: var(--slate-100);
	color: var(--blue-800);
}

/* ── Hero band (matches About page hero) ── */
.legal-hero {
	position: relative;
	background: #122a46;
	color: var(--white);
	padding: 56px 0 48px;
	overflow: hidden;
}

.legal-hero__grid {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
	background-size: 28px 28px;
	pointer-events: none;
}

.legal-hero__inner {
	position: relative;
	z-index: 1;
}

.legal-hero__eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--amber-500);
	background: rgba(193, 68, 14, 0.12);
	border: 1px solid rgba(193, 68, 14, 0.3);
	padding: 5px 14px;
	border-radius: 999px;
	margin: 0 0 18px;
}

.legal-site .legal-hero h1.legal-hero__title {
	font-size: clamp(2rem, 4.5vw, 2.75rem) !important;
	font-weight: 800 !important;
	letter-spacing: -0.03em !important;
	line-height: 1.12 !important;
	color: #ffffff !important;
	margin: 0 0 14px !important;
}

.legal-hero__date {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.62);
	margin: 0;
}

/* ── Content ── */
.legal-main {
	flex: 1;
	padding: 48px 0 64px;
}

.legal-main__body {
	max-width: var(--content-w);
}

.legal-main__intro {
	font-size: 17px;
	line-height: 1.75;
	color: var(--slate-700);
	margin: 0 0 8px;
}

.legal-site .legal-main h2 {
	font-size: 18px !important;
	font-weight: 700 !important;
	color: var(--blue-800) !important;
	margin: 36px 0 12px !important;
	letter-spacing: -0.01em !important;
	line-height: 1.3 !important;
}

.legal-main p {
	font-size: 15px;
	line-height: 1.75;
	color: var(--slate-700);
	margin: 0 0 14px;
}

.legal-main ul,
.legal-main ol {
	margin: 0 0 16px;
	padding-left: 1.35rem;
}

.legal-main li {
	font-size: 15px;
	line-height: 1.7;
	margin-bottom: 6px;
	color: var(--slate-700);
}

.legal-main strong {
	color: var(--slate-900);
	font-weight: 600;
}

.legal-main a {
	color: var(--blue-800);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.legal-main a:hover {
	color: var(--amber-500);
}

.legal-contact {
	margin-top: 36px;
	padding: 24px;
	background: var(--slate-50);
	border: 1px solid var(--slate-200);
	border-radius: 12px;
}

/* ── Footer strip ── */
.legal-footer {
	background: var(--blue-800);
	color: rgba(255, 255, 255, 0.75);
	text-align: center;
	padding: 22px 24px;
	font-size: 13px;
	line-height: 1.6;
}

.legal-footer a {
	color: rgba(255, 255, 255, 0.9);
	font-weight: 600;
	text-decoration: none;
}

.legal-footer a:hover {
	color: var(--white);
	text-decoration: underline;
}

@media (max-width: 640px) {
	.legal-container,
	.legal-nav__inner {
		padding: 0 16px;
	}

	.legal-nav__inner {
		height: 64px;
	}

	.legal-nav__name {
		font-size: 12px;
	}

	.legal-nav__back span {
		display: none;
	}

	.legal-hero {
		padding: 40px 0 36px;
	}

	.legal-main {
		padding: 36px 0 48px;
	}
}
