/*
Theme Name: ZS Legal — A Modern Legacy
Theme URI: https://zslegalbn.com/
Author: ZS Legal concept team
Description: A lightweight, Gutenberg-editable homepage concept for ZS Legal.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: zs-legal-modern-legacy
*/

:root {
	--zs-forest: #19372f;
	--zs-deep-forest: #10241f;
	--zs-paper: #f5f2eb;
	--zs-white: #fefdf9;
	--zs-ink: #202824;
	--zs-rule: #d7d5c9;
	--zs-sage: #8f9c91;
	--zs-oxblood: #794543;
	--zs-deep-forest-rgb: 16, 36, 31;
	--zs-white-rgb: 254, 253, 249;
	--zs-gutter: clamp(22px, 4.45vw, 64px);
	--zs-content: 1320px;
	--zs-section-space: clamp(76px, 9vw, 132px);
}

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

html {
	scroll-behavior: auto;
	scroll-padding-top: 92px;
}

body {
	margin: 0;
	background: var(--zs-paper);
	color: var(--zs-ink);
	font-family: "DM Sans", Arial, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
	font-family: "DM Sans", Arial, sans-serif;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

a:hover {
	text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid #c6d2c8;
	outline-offset: 4px;
}

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

.skip-link {
	position: fixed;
	z-index: 1000;
	top: 12px;
	left: 12px;
	transform: translateY(-180%);
	padding: 10px 14px;
	background: var(--zs-white);
	color: var(--zs-ink);
	font-weight: 600;
}

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

.site-header {
	position: relative;
	z-index: 20;
	top: 0;
	left: 0;
	width: 100%;
	padding: 8px var(--zs-gutter);
	border-bottom: 1px solid rgba(25, 55, 47, 0.12);
	background: var(--zs-white);
	color: var(--zs-forest);
}

.site-header__inner {
	position: relative;
	display: flex;
	width: min(100%, 1440px);
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	min-height: 78px;
	margin: 0 auto;
}

.custom-logo-link {
	display: block;
	flex: 0 0 auto;
	line-height: 0;
}

.mobile-nav {
	display: none;
}

.custom-logo {
	width: 76px;
	max-height: 72px;
	object-fit: contain;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--zs-forest);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.16em;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.site-brand__mark {
	display: inline-grid;
	width: 35px;
	height: 35px;
	place-items: center;
	border: 1px solid rgba(25, 55, 47, 0.5);
	font-family: "Newsreader", Georgia, serif;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: -0.05em;
}

.site-brand__name {
	font-size: 12px;
	letter-spacing: 0.2em;
}

.primary-nav {
	display: flex;
	align-items: center;
	gap: clamp(20px, 3.1vw, 46px);
}

.primary-nav a {
	color: rgba(25, 55, 47, 0.82);
	font-size: 12px;
	letter-spacing: 0.035em;
	text-decoration: none;
	transition: color 160ms ease;
}

.primary-nav a:hover {
	color: var(--zs-forest);
	text-decoration: underline;
	text-underline-offset: 6px;
}

.primary-nav a:last-child {
	display: inline-flex;
	min-height: 40px;
	align-items: center;
	padding: 0 15px;
	border: 1px solid var(--zs-forest);
	text-decoration: none;
}

.primary-nav a:last-child:hover {
	background: var(--zs-forest);
	color: var(--zs-white);
}

.hero {
	position: relative;
	isolation: isolate;
	display: flex;
	min-height: max(740px, 88svh);
	overflow: hidden;
	background: var(--zs-deep-forest);
	color: var(--zs-white);
}

.hero .hero-image {
	position: absolute !important;
	z-index: 0;
	inset: 0;
	width: auto;
	height: auto;
	max-width: none;
	margin: 0;
	transform: none;
}

.hero-image--desktop {
	display: block;
	overflow: hidden;
}

.hero-image--mobile {
	display: none;
}

.hero .hero-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.hero-image--desktop img,
.hero-image--mobile img {
	filter: brightness(0.94) saturate(0.9) contrast(1.04);
}

.hero-image--desktop::after,
.hero-image--mobile::after {
	position: absolute;
	z-index: 0;
	inset: 0;
	content: "";
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(var(--zs-deep-forest-rgb), 0.76) 0%, rgba(var(--zs-deep-forest-rgb), 0.58) 34%, rgba(var(--zs-deep-forest-rgb), 0.1) 72%, rgba(var(--zs-deep-forest-rgb), 0.18) 100%),
		linear-gradient(0deg, rgba(var(--zs-deep-forest-rgb), 0.56), transparent 44%);
}

.hero-image--desktop .wp-element-caption,
.hero-image--mobile .wp-element-caption {
	position: absolute;
	z-index: 1;
	right: 14px;
	bottom: 12px;
	left: 14px;
	margin: 0;
	color: rgba(var(--zs-white-rgb), 0.78);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 9px;
	letter-spacing: 0.055em;
	line-height: 1.4;
	text-transform: uppercase;
}

.hero-image--mobile .wp-element-caption {
	font-size: 8px;
}

.hero-inner {
	position: relative;
	z-index: 1;
	display: flex;
	width: min(100%, 1440px);
	min-height: inherit;
	flex-direction: column;
	margin: 0 auto;
	padding: 66px var(--zs-gutter) 54px;
}

.hero-inner > :not(.hero-image) {
	position: relative;
	z-index: 1;
}

.hero-topline,
.hero-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.hero-topline {
	color: rgba(var(--zs-white-rgb), 0.75);
}

.hero-eyebrow,
.concept-label,
.micro-label,
.section-kicker,
.origin-caption,
.record-label,
.contact-meta,
.footer-meta {
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 0.105em;
	line-height: 1.55;
	text-transform: uppercase;
}

.hero-eyebrow,
.concept-label {
	margin: 0;
}

.concept-label {
	color: rgba(var(--zs-white-rgb), 0.54);
	text-align: right;
}

.hero-title {
	width: min(100%, 760px);
	max-width: 760px;
	margin: auto 0 0;
	font-size: clamp(62px, 5.5vw, 80px);
	font-weight: 400;
	letter-spacing: -0.055em;
	line-height: 0.97;
}

.hero-title > span {
	display: block;
}

.hero-bottom {
	width: 100%;
	align-items: flex-end;
	gap: 26px;
	margin-top: auto;
	padding-top: 36px;
}

.hero-summary {
	max-width: 280px;
}

.hero-summary p {
	margin: 0;
	color: rgba(var(--zs-white-rgb), 0.77);
	font-size: 15px;
	line-height: 1.55;
}

.hero-actions {
	display: flex;
	align-items: center;
	gap: clamp(20px, 3.5vw, 54px);
}

.hero-buttons {
	margin: 0;
}

.hero-buttons .wp-block-button__link {
	display: inline-flex;
	min-height: 52px;
	align-items: center;
	justify-content: center;
	padding: 0 24px;
	border: 1px solid var(--zs-paper);
	border-radius: 0;
	background: var(--zs-paper);
	color: var(--zs-deep-forest);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background 160ms ease, color 160ms ease;
}

.hero-buttons .wp-block-button__link:hover {
	background: transparent;
	color: var(--zs-white);
}

.hero-contact-link {
	margin: 0;
}

.hero-contact-link a {
	color: var(--zs-white);
	font-size: 13px;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
}

.hero-caption {
	position: absolute;
	right: var(--zs-gutter);
	bottom: 16px;
	margin: 0;
	color: rgba(254, 253, 249, 0.44);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 9px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.section {
	position: relative;
	padding: var(--zs-section-space) var(--zs-gutter);
}

.section-shell {
	width: min(100%, var(--zs-content));
	margin: 0 auto;
}

.section-kicker {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 42px;
	color: #5b6b61;
}

.section-kicker::before {
	width: 20px;
	height: 1px;
	background: currentColor;
	content: "";
}

.origin-layout {
	display: grid;
	grid-template-columns: minmax(230px, 0.82fr) minmax(0, 1.55fr);
	align-items: start;
	gap: clamp(50px, 10vw, 160px);
}

.origin-year-wrap {
	padding-top: 6px;
}

.origin-year {
	margin: 0;
	color: var(--zs-forest);
	font-family: "Newsreader", Georgia, serif;
	font-size: clamp(112px, 12.1vw, 184px);
	font-weight: 400;
	letter-spacing: -0.09em;
	line-height: 0.78;
}

.origin-caption {
	max-width: 205px;
	margin: 22px 0 0 5px;
	color: #59645c;
	font-size: 9px;
}

.origin-copy {
	max-width: 750px;
}

.origin-heading {
	max-width: 760px;
	margin: 0 0 30px;
	color: var(--zs-forest);
	font-family: "Newsreader", Georgia, serif;
	font-size: clamp(42px, 5.05vw, 72px);
	font-weight: 400;
	letter-spacing: -0.055em;
	line-height: 1.02;
}

.origin-copy p {
	max-width: 690px;
	margin: 0 0 18px;
	color: #343e38;
	font-size: 16px;
	line-height: 1.72;
}

.origin-copy .origin-note {
	margin-top: 30px;
	padding-top: 18px;
	border-top: 1px solid var(--zs-rule);
	color: #59645c;
	font-size: 12px;
	line-height: 1.6;
}

.section--practice {
	padding-top: 24px;
}

.practice-intro {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(270px, 0.63fr);
	align-items: end;
	gap: 44px;
	margin-bottom: 52px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--zs-rule);
}

.practice-heading {
	margin: 0;
	color: var(--zs-ink);
	font-size: clamp(36px, 4.1vw, 58px);
	font-weight: 400;
	letter-spacing: -0.065em;
	line-height: 1.03;
}

.practice-intro-copy {
	max-width: 460px;
	margin: 0 0 4px;
	color: #4c5750;
	font-size: 14px;
	line-height: 1.65;
}

.practice-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.practice-card {
	display: flex;
	min-height: 168px;
	flex-direction: column;
	align-items: flex-start;
	padding: 23px 24px 25px;
	border: 1px solid var(--zs-rule);
	border-radius: 4px;
	background: var(--zs-white);
	transition: border-color 180ms ease, transform 180ms ease;
}

.practice-card:hover {
	border-color: var(--zs-forest);
	transform: translateY(-2px);
}

.practice-card__number {
	margin: 0 0 25px;
	color: #69756b;
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 10px;
	letter-spacing: 0.08em;
}

.practice-card__title {
	margin: auto 0 0;
	color: var(--zs-ink);
	font-size: clamp(19px, 2vw, 25px);
	font-weight: 500;
	letter-spacing: -0.035em;
	line-height: 1.15;
}

.practice-card__description {
	max-width: 340px;
	margin: auto 0 0;
	color: #566159;
	font-size: 13px;
	line-height: 1.55;
}

.practice-note {
	margin: 22px 0 0;
	color: #5c685f;
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 10px;
	letter-spacing: 0.025em;
	line-height: 1.7;
}

.practice-additional {
	margin: 16px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--zs-rule);
	color: #4a554d;
	font-size: 13px;
	line-height: 1.6;
}

.practice-additional strong {
	color: var(--zs-ink);
	font-weight: 600;
}

.section--people {
	overflow: hidden;
	background: var(--zs-forest);
	color: var(--zs-white);
}

.section--people .section-shell {
	position: relative;
	z-index: 1;
}

.section--people .section-kicker {
	color: #c5cec5;
}

.people-heading {
	max-width: 820px;
	margin: 0 0 24px;
	color: var(--zs-white);
	font-family: "Newsreader", Georgia, serif;
	font-size: clamp(48px, 6.3vw, 88px);
	font-weight: 400;
	letter-spacing: -0.06em;
	line-height: 0.98;
}

.people-intro {
	max-width: 560px;
	margin: 0 0 52px;
	color: rgba(254, 253, 249, 0.72);
	font-size: 14px;
	line-height: 1.65;
}

.people-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.person-card {
	min-width: 0;
}

.portrait-photo {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	margin: 0;
	background: var(--zs-rule);
}

.portrait-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 28%;
}

.portrait-photo .wp-element-caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	margin: 0;
	padding: 30px 14px 11px;
	background: linear-gradient(0deg, rgba(var(--zs-deep-forest-rgb), 0.78), transparent);
	color: var(--zs-white);
	font-family: "IBM Plex Mono", "Courier New", monospace;
	font-size: 8px;
	letter-spacing: 0.075em;
	line-height: 1.4;
	text-transform: uppercase;
}

.person-details {
	padding-top: 18px;
}

.person-name {
	max-width: 410px;
	margin: 0 0 6px;
	color: var(--zs-white);
	font-size: clamp(19px, 2vw, 24px);
	font-weight: 500;
	letter-spacing: -0.03em;
	line-height: 1.2;
}

.person-role {
	margin: 0;
	color: #c5cec5;
	font-size: 13px;
	line-height: 1.5;
}

.person-bio {
	max-width: 420px;
	margin: 14px 0 0;
	color: rgba(254, 253, 249, 0.78);
	font-size: 13px;
	line-height: 1.7;
}

.section--contact {
	padding-top: clamp(70px, 8vw, 108px);
	padding-bottom: 30px;
	background: var(--zs-deep-forest);
	color: var(--zs-white);
}

.contact-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(290px, 0.7fr);
	align-items: start;
	gap: clamp(60px, 11vw, 170px);
	padding-bottom: clamp(68px, 8vw, 112px);
}

.contact-heading {
	max-width: 670px;
	margin: 0 0 30px;
	color: var(--zs-white);
	font-family: "Newsreader", Georgia, serif;
	font-size: clamp(55px, 7.5vw, 104px);
	font-weight: 400;
	letter-spacing: -0.065em;
	line-height: 0.94;
}

.contact-intro {
	max-width: 380px;
	margin: 0;
	color: rgba(254, 253, 249, 0.67);
	font-size: 14px;
	line-height: 1.65;
}

.contact-details {
	padding-top: 12px;
}

.contact-meta {
	margin: 0 0 14px;
	color: #b8c4b9;
}

.contact-address {
	max-width: 380px;
	margin: 0 0 24px;
	color: var(--zs-white);
	font-size: 16px;
	line-height: 1.65;
}

.contact-link {
	display: table;
	margin: 0 0 11px;
	color: var(--zs-white);
	font-size: 15px;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
}

.site-footer {
	border-top: 1px solid rgba(254, 253, 249, 0.2);
}

.site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 18px;
	color: rgba(254, 253, 249, 0.64);
}

.site-footer__brand {
	margin: 0;
	color: var(--zs-white);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.15em;
}

.footer-meta {
	margin: 0;
	font-size: 9px;
	letter-spacing: 0.06em;
	text-transform: none;
}

.site-footer__top {
	font-size: 11px;
	text-decoration: none;
}

.site-footer__top:hover {
	color: var(--zs-white);
	text-decoration: underline;
}

.wp-block-buttons {
	gap: 0;
}

.wp-block-button {
	margin: 0;
}

@media (max-width: 1100px) {
	.hero {
		min-height: max(700px, 84svh);
	}

	.hero-inner {
	min-height: inherit;
		padding-top: 50px;
		padding-bottom: 42px;
	}

	.hero-title {
		max-width: 720px;
		font-size: clamp(60px, 8vw, 78px);
	}

	.hero-image--desktop {
		display: block;
	}

	.hero-bottom {
		width: 100%;
	}
}

@media (max-width: 900px) {
	:root {
		--zs-section-space: 88px;
	}

	.hero {
		min-height: max(700px, 84svh);
	}

	.hero-title {
		font-size: clamp(60px, 8.4vw, 76px);
	}

	.origin-layout {
		grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr);
		gap: 55px;
	}

	.origin-year {
		font-size: clamp(108px, 15vw, 154px);
	}

	.practice-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.people-grid {
		gap: 12px;
	}

	.person-name {
		font-size: 20px;
	}

	.contact-layout {
		gap: 60px;
	}
}

@media (max-width: 640px) {
	html {
		scroll-padding-top: 72px;
	}

	.site-header {
		padding-top: 6px;
		padding-bottom: 6px;
	}

	.site-header__inner {
		display: flex;
		min-height: 66px;
		gap: 8px;
	}

	.custom-logo {
		width: 54px;
		max-height: 52px;
	}

	.site-brand {
		gap: 7px;
		font-size: 11px;
	}

	.site-brand__mark {
		width: 30px;
		height: 30px;
		font-size: 13px;
	}

	.site-brand__name {
		font-size: 10px;
		letter-spacing: 0.15em;
	}

	.primary-nav {
		width: auto;
		min-width: 0;
		justify-content: flex-end;
		gap: clamp(5px, 1.3vw, 8px);
		margin-left: auto;
		padding-top: 0;
	}

	.primary-nav a {
		font-size: 8px;
		letter-spacing: 0;
		white-space: nowrap;
	}

	.primary-nav a:last-child {
		min-height: 30px;
		padding: 0 6px;
	}

	.hero {
		min-height: max(740px, 88svh);
	}

	.hero-inner {
		min-height: inherit;
		padding-top: 26px;
		padding-bottom: 32px;
	}

	.hero-image--desktop {
		display: none;
	}

	.hero-image--mobile {
		display: block;
		overflow: hidden;
	}

	.hero-image--mobile::after {
		background:
			linear-gradient(180deg, rgba(var(--zs-deep-forest-rgb), 0.42) 0%, rgba(var(--zs-deep-forest-rgb), 0.08) 38%, rgba(var(--zs-deep-forest-rgb), 0.3) 70%, rgba(var(--zs-deep-forest-rgb), 0.82) 100%),
			linear-gradient(90deg, rgba(var(--zs-deep-forest-rgb), 0.34), transparent 72%);
	}

	.hero-topline {
		align-items: flex-start;
	}

	.hero-eyebrow,
	.concept-label {
		max-width: 160px;
		font-size: 8px;
		letter-spacing: 0.075em;
	}

	.concept-label {
		max-width: 130px;
	}

	.hero-title {
		width: 100%;
		max-width: 100%;
		margin-top: 36px;
		margin-bottom: 0;
		font-size: clamp(36px, 9.7vw, 42px);
		line-height: 0.96;
		letter-spacing: -0.06em;
	}

	.hero-bottom {
		display: block;
		width: 100%;
		max-width: none;
		padding-top: 26px;
		margin-top: auto;
	}

	.hero-summary {
		max-width: 340px;
	}

	.hero-summary p {
		font-size: 14px;
	}

	.hero-actions {
		gap: 22px;
		margin-top: 20px;
	}

	.hero-buttons .wp-block-button__link {
		min-height: 48px;
		padding: 0 17px;
		font-size: 12px;
	}

	.hero-contact-link a {
		font-size: 12px;
	}

	.section {
		padding: var(--zs-section-space) var(--zs-gutter);
	}

	.section-kicker {
		margin-bottom: 30px;
		font-size: 9px;
	}

	.origin-layout {
		grid-template-columns: 1fr;
		gap: 44px;
	}

	.origin-year {
		font-size: clamp(106px, 30vw, 138px);
	}

	.origin-caption {
		max-width: 240px;
		margin-top: 16px;
	}

	.origin-heading {
		margin-bottom: 22px;
		font-size: clamp(40px, 11vw, 54px);
	}

	.origin-copy p {
		font-size: 15px;
	}

	.section--practice {
		padding-top: 0;
	}

	.practice-intro {
		grid-template-columns: 1fr;
		gap: 18px;
		margin-bottom: 28px;
		padding-bottom: 22px;
	}

	.practice-heading {
		font-size: clamp(38px, 10.6vw, 52px);
	}

	.practice-intro-copy {
		font-size: 13px;
	}

	.practice-grid {
		grid-template-columns: 1fr;
		gap: 9px;
	}

	.practice-card {
		min-height: 166px;
		padding: 19px 20px 21px;
	}

	.practice-card__number {
		margin-bottom: 19px;
	}

	.practice-card__title {
		font-size: 22px;
	}

	.practice-card__description {
		margin-top: 0;
	}

	.practice-additional {
		margin-top: 18px;
	}

	.people-heading {
		margin-bottom: 20px;
		font-size: clamp(48px, 12.5vw, 62px);
	}

	.people-intro {
		margin-bottom: 34px;
		font-size: 13px;
	}

	.people-grid {
		grid-template-columns: 1fr;
		gap: 34px;
	}

	.person-details {
		padding-top: 14px;
	}

	.person-name {
		max-width: 350px;
		font-size: 22px;
	}

	.person-bio {
		font-size: 13px;
	}

	.contact-layout {
		grid-template-columns: 1fr;
		gap: 42px;
		padding-bottom: 64px;
	}

	.contact-heading {
		margin-bottom: 20px;
		font-size: clamp(57px, 15vw, 74px);
	}

	.contact-address {
		max-width: 330px;
		font-size: 15px;
	}

	.contact-link {
		font-size: 14px;
	}

	.site-footer__inner {
		flex-wrap: wrap;
		gap: 8px 18px;
		padding-top: 16px;
	}

	.site-footer__brand {
		font-size: 9px;
	}

	.footer-meta {
		order: 3;
		width: 100%;
		font-size: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
