/*
Theme Name: Lawfirm
Description: A considered, editorial law firm theme with an ACF-managed Homepage template.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: lawfirm
*/

/* Shared tokens and foundations */
:root {
	--navy: #111f2b;
	--navy-deep: #0c1720;
	--ivory: #f6f4ee;
	--white: #fffdf8;
	--gold: #cbb58b;
	--gold-dark: #78613b;
	--ink: #172630;
	--muted: #5a6468;
	--line: #dbdad2;
	--serif: Georgia, 'Times New Roman', serif;
	--sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--shell: 1280px;
	--gutter: clamp(24px, 5vw, 88px);
	--section-space: clamp(72px, 8vw, 120px);
	--space-small: 16px;
	--space-medium: 32px;
	--space-large: 56px;
	--header-height: 104px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--ivory);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

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

a {
	color: inherit;
	text-underline-offset: 5px;
}

button {
	font: inherit;
}

button,
summary,
a {
	-webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
	outline: 3px solid var(--gold-dark);
	outline-offset: 6px;
}

.site-header :focus-visible,
.site-footer :focus-visible {
	outline-color: var(--gold);
}

h1,
h2,
h3,
p,
figure {
	margin: 0;
}

h1,
h2,
h3 {
	font-family: var(--serif);
	font-weight: 400;
	line-height: 1.15;
}

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

.skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 100;
	padding: 12px 20px;
	transform: translateY(-200%);
	background: var(--white);
	color: var(--ink);
}

.skip-link:focus {
	transform: translateY(0);
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	min-height: 54px;
	padding: 14px 24px;
	border: 1px solid var(--gold);
	background: var(--gold);
	color: var(--navy-deep);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.025em;
	text-decoration: none;
	transition: background-color 180ms ease, color 180ms ease;
}

.button:hover {
	background: var(--white);
	border-color: var(--white);
}

.button span {
	font-size: 21px;
	line-height: 1;
}

.button-outline {
	background: transparent;
	color: var(--ivory);
	border-color: #71808a;
}

.button-outline:hover {
	color: var(--navy);
}

/* Shared header and WordPress navigation */
.site-header {
	position: relative;
	z-index: 10;
	background: var(--navy-deep);
	color: var(--ivory);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 36px;
	min-height: var(--header-height);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin-right: auto;
	text-decoration: none;
}

.brand-mark {
	width: 39px;
	flex: 0 0 39px;
	color: var(--gold);
}

.brand-mark svg {
	display: block;
	width: 100%;
}

.brand-name {
	font-family: var(--serif);
	font-size: 25px;
	line-height: 1.2;
}

.brand-name small {
	display: block;
	margin-top: 7px;
	font-family: var(--sans);
	font-size: 8px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

.custom-logo {
	width: auto;
	max-width: 240px;
	max-height: 64px;
}

.primary-menu,
.footer-menu,
.legal-menu,
.mobile-menu-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 28px;
	font-size: 12px;
}

.primary-menu a,
.footer-menu a,
.legal-menu a {
	display: inline-block;
	padding-block: 8px;
	text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.footer-menu a:hover,
.legal-menu a:hover {
	color: var(--gold);
}

.primary-menu li {
	position: relative;
}

.primary-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	display: none;
	min-width: 220px;
	padding: 16px;
	background: var(--navy);
	list-style: none;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
	display: block;
}

.primary-menu .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

.mobile-menu {
	display: none;
}

/* Shared footer */
.site-footer {
	padding-top: 72px;
	background: var(--navy-deep);
	color: #bfc5c8;
	font-size: 13px;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.5fr 0.75fr 1fr;
	gap: var(--space-large);
	padding-bottom: 60px;
}

.footer-wordmark {
	color: var(--ivory);
	font-family: var(--serif);
	font-size: 32px;
	text-decoration: none;
}

.footer-brand p {
	max-width: 280px;
	margin-top: 12px;
}

.footer-heading {
	margin-bottom: 18px;
	color: var(--gold);
	font-family: var(--sans);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.footer-menu .sub-menu {
	padding-left: 16px;
	list-style: none;
}

.footer-contact > a {
	display: block;
	width: fit-content;
	padding-block: 6px;
	text-decoration: none;
}

.footer-contact address {
	margin-top: 12px;
	font-style: normal;
}

.footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: 24px;
	border-top: 1px solid #344049;
	font-size: 11px;
}

.legal-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

.footer-disclaimer {
	padding-bottom: 24px;
	color: #a3afb5;
	font-size: 11px;
}

/* Fallback content supports future WordPress pages. */
.site-content {
	min-height: 50vh;
	padding-block: var(--section-space);
}

.site-content h1 {
	margin-bottom: 32px;
	font-size: clamp(36px, 5vw, 64px);
}

.site-content p {
	margin-bottom: 24px;
}

/* Navigation and footer on smaller screens */
@media (max-width: 1000px) {
	:root {
		--header-height: 88px;
	}

	.desktop-nav,
	.header-contact {
		display: none;
	}

	.mobile-menu {
		display: block;
	}

	.mobile-menu summary {
		display: flex;
		align-items: center;
		gap: 14px;
		min-height: 48px;
		padding: 10px 0 10px 12px;
		cursor: pointer;
		font-size: 12px;
		list-style: none;
	}

	.mobile-menu summary::-webkit-details-marker {
		display: none;
	}

	.menu-bars {
		width: 20px;
		height: 8px;
		border-top: 1px solid currentColor;
		border-bottom: 1px solid currentColor;
	}

	.mobile-menu nav {
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		max-height: calc(100dvh - 100px);
		overflow-y: auto;
		padding: 24px var(--gutter) 32px;
		border-top: 1px solid #344049;
		background: var(--navy-deep);
		box-shadow: 0 16px 30px #0003;
	}

	.mobile-menu-list {
		margin-bottom: 24px;
	}

	.mobile-menu-list a {
		display: block;
		padding: 12px 0;
		text-decoration: none;
	}

	.mobile-menu-list .sub-menu {
		padding-left: 20px;
		list-style: none;
	}
}

@media (max-width: 640px) {
	.brand-name {
		font-size: 22px;
	}

	.brand-mark {
		width: 32px;
		flex-basis: 32px;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 36px 24px;
	}

	.footer-brand {
		grid-column: 1 / -1;
	}

	.footer-bottom {
		align-items: flex-start;
		flex-direction: column;
		gap: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}
