/* Base: tokens, reset, accessibility, shared typography/layout/buttons. */

:root {
	--navy: #0f1f3d;
	--navy-mid: #1a2f52;
	--navy-nav: #17284a;
	--navy-light: #243d68;
	--gold: #c4972a;
	--gold-mid: #d8a93a;
	--gold-light: #e0b84a;
	--bronze: #966a00;
	--cream: #f8f5ee;
	--paper: #fbf9f7;
	--white: #fff;
	--slate: #667386;
	--ink: #060f1f;
	--muted-on-navy: #aab3c1;
	--charcoal: #2c3545;
	--rule: rgb(196 151 42 / 25%);
	--display: "Playfair Display", Georgia, serif;
	--body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--accent: "Libre Baskerville", Georgia, serif;
	--header-height: 68px;

	/* 80px gutter that grows past 1440px so content never exceeds 1280px. */
	--page-gutter: max(80px, calc((100% - 1280px) / 2));

	@media (max-width: 767.98px) {
		--header-height: 60px;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	/* Shown during rubber-band overscroll: navy continues the hero above and blends with the footer below. */
	background: var(--navy);
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-height);
}

body {
	margin: 0;
	background: var(--cream);
	color: var(--charcoal);
	font: 400 16px/1.6 var(--body);
	-webkit-font-smoothing: antialiased;
}

img {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
}

button,
input,
select,
textarea {
	font: inherit;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;

	&:focus {
		top: 8px;
		left: 8px;
		z-index: 1000;
		width: auto;
		height: auto;
		clip: auto;
		padding: 12px 18px;
		background: var(--white);
		color: var(--navy);
		font-weight: 700;
	}
}

:focus-visible {
	outline: 3px solid var(--gold-light);
	outline-offset: 4px;
}

/* Display-face headings shared across sections. */
.hero-headline,
.section-headline,
.practice-card h3,
.tool-card h3,
.feed-card h3,
.legal-page h1,
.error-page h1 {
	font-family: var(--display);
}

/* Text logo lockup shared by the header and footer. Live text instead of an
   image so the tagline stays legible and scales independently. */
.logo-lockup {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: var(--paper);
	text-decoration: none;
	white-space: nowrap;
}

.logo-kicker {
	color: var(--gold);
	font: 500 10px/1 "DM Mono", monospace;
	letter-spacing: 0.4em;
	text-indent: 0.4em; /* recenters tracked-out glyphs */
}

.logo-name {
	font: 600 30px/1 "Cormorant Garamond", var(--display);
	letter-spacing: 0.02em;
}

.logo-tagline {
	font: 400 11px/1 "DM Mono", monospace;
	letter-spacing: 0.2em;
	text-indent: 0.2em;
	text-transform: uppercase;
}

@media (max-width: 767.98px) {
	.logo-kicker {
		font-size: 8px;
	}

	.logo-name {
		font-size: 24px;
	}

	.logo-tagline {
		font-size: 10px;
	}
}

.btn-primary,
.form-submit {
	display: inline-block;
	padding: 16px 32px;
	border: 0;
	background: var(--gold-mid);
	color: var(--navy-nav);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;

	&:hover,
	&:focus-visible {
		background: var(--gold-light);
		color: var(--ink);
	}

	&:active {
		background: var(--gold);
		color: var(--ink);
		/* Inset ring instead of a border so the pressed state doesn't shift layout. */
		box-shadow: inset 0 0 0 1px var(--gold-mid);
	}
}

.btn-primary {
	@media (max-width: 359px) {
		padding-inline: 22px;
	}
}

.section {
	padding: 96px 80px;

	@media (max-width: 1279.98px) {
		padding: 80px 48px;
	}

	@media (max-width: 767.98px) {
		padding: 56px 16px;
	}
}

.section-inner,
.uvi-inner,
.about-inner,
.form-inner,
.footer-inner {
	width: min(100%, 1280px);
	margin: 0 auto;
}

/* Two-column section shells share one split layout. */
.uvi-inner,
.form-inner,
.about-inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: 84px;
	align-items: center;

	@media (max-width: 1279.98px) {
		grid-template-columns: 1fr;
		gap: 58px;
	}
}

.hero-eyebrow,
.section-label {
	margin: 0 0 16px;
	color: var(--bronze);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.6;
	text-transform: uppercase;
}

.section-headline {
	max-width: 780px;
	margin: 0 0 20px;
	color: var(--navy-nav);
	font-size: clamp(2rem, 3vw, 2.5rem);
	font-weight: 700;
	line-height: 1.18;
	text-wrap: balance;

	@media (max-width: 767.98px) {
		margin-bottom: 16px;
	}
}

.section-sub {
	max-width: 625px;
	margin-bottom: 56px;
	color: var(--slate);
	line-height: 1.6;

	@media (max-width: 767.98px) {
		margin-bottom: 32px;
	}
}

.rule {
	width: 48px;
	height: 2px;
	margin: 0 0 36px;
	background: var(--gold-mid);

	@media (max-width: 767.98px) {
		margin-bottom: 24px;
	}
}

.hero-actions,
.media-badges {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.practice-link,
.feed-view-all,
.feed-card-link {
	display: inline-block;
	margin-top: 24px;
	color: var(--navy);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

@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;
	}
}
