/* Front page. Layout is CSS Grid throughout. */

:root {
	--serif: "DM Serif Display", Georgia, serif;
	--text: #4a4f57;
	--card: #5b6372;
	--overlay: rgba(4, 27, 54, 0.82);
}

.home .site-main {
	max-width: none;
	padding: 0;
}

.wrap {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.section {
	padding: 80px 0;
}

.section--tight {
	padding-top: 40px;
}

.center {
	text-align: center;
}

.grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 60px;
	align-items: center;
}

/* Typography */
.eyebrow {
	margin: 0 0 6px;
	color: var(--gold);
	font-size: 15px;
	font-weight: 500;
}

.heading {
	margin: 0 0 20px;
	color: var(--navy);
	font-family: var(--serif);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 400;
	line-height: 1.2;
}

/* Title between two gold lines. */
.heading--lines {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 28px;
	margin-bottom: 40px;
	text-align: center;
}

.heading--lines::before,
.heading--lines::after,
.heading--line::after {
	content: "";
	height: 1px;
	background: var(--gold);
}

/* Title with a line to the right. */
.heading--line {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 28px;
	margin-bottom: 36px;
}

.text {
	color: var(--text);
	font-size: 15px;
	line-height: 1.75;
}

.text p {
	margin: 0 0 16px;
}

.rule {
	display: block;
	width: 70px;
	height: 2px;
	margin: 0 0 20px;
	background: var(--gold);
}

.center .rule {
	margin-right: auto;
	margin-left: auto;
}

.btn {
	display: inline-block;
	margin-top: 10px;
	padding: 13px 26px;
	border-radius: 2px;
	background: var(--navy-dark);
	color: var(--white);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s, color 0.2s;
}

.btn:hover,
.btn:focus-visible {
	background: var(--gold);
}

.btn--gold {
	background: var(--gold);
}

.btn--gold:hover,
.btn--gold:focus-visible {
	background: var(--white);
	color: var(--navy);
}

.stars {
	display: inline-grid;
	grid-auto-flow: column;
	gap: 3px;
	color: var(--gold);
}

/* Slider: all slides share one grid cell, so the height never jumps. */
.slider {
	position: relative;
}

.slider__track {
	display: grid;
}

.slider__slide {
	grid-area: 1 / 1;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s, visibility 0.4s;
}

.slider__slide.is-active,
.slider:not(.is-ready) .slider__slide:first-child {
	opacity: 1;
	visibility: visible;
}

.slider__arrow {
	position: absolute;
	top: 50%;
	width: 30px;
	height: 30px;
	margin-top: -15px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--white);
	cursor: pointer;
}

.slider__arrow::before {
	content: "";
	display: block;
	width: 10px;
	height: 10px;
	margin: auto;
	border-bottom: 2px solid currentColor;
	border-left: 2px solid currentColor;
	transform: rotate(45deg);
}

.slider__arrow--prev {
	left: 0;
}

.slider__arrow--next {
	right: 0;
}

.slider__arrow--next::before {
	transform: rotate(-135deg);
}

.slider:not(.is-ready) .slider__arrow,
.slider:not(.is-ready) .slider__dots {
	display: none;
}

/* Slides move sideways instead of fading. */
.slider--slide .slider__track {
	overflow: hidden;
}

.slider--slide .slider__slide {
	opacity: 1;
	transform: translateX(calc(100% + 10px));
	transition: transform 0.5s, visibility 0.5s;
}

.slider--slide .slider__slide.is-before {
	transform: translateX(calc(-100% - 10px));
}

.slider--slide .slider__slide.is-active,
.slider--slide.slider:not(.is-ready) .slider__slide:first-child {
	transform: none;
}

.slider__dots {
	display: grid;
	grid-auto-flow: column;
	gap: 12px;
	justify-content: center;
	align-content: start;
}

.slider__dots button {
	position: relative;
	width: 6px;
	height: 6px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #000;
	opacity: 0.2;
	cursor: pointer;
}

/* Bigger click area. */
.slider__dots button::before {
	content: "";
	position: absolute;
	inset: -9px -6px;
}

.slider__dots button.is-active {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.slider--slide .slider__slide {
		transition: none;
	}
}

.review {
	display: grid;
	justify-items: center;
	gap: 12px;
	margin: 0;
	padding: 0 40px;
	text-align: center;
}

.review p {
	margin: 0;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.5;
}

.review cite {
	font-size: 15px;
	font-style: normal;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.review--small p {
	font-size: 14px;
}

.review--small cite {
	font-size: 13px;
}

/* Forms */
.form-card {
	padding: 34px 30px;
	background: var(--white);
	color: var(--ink);
}

.form-card--framed {
	box-shadow: 0 0 0 2px var(--gold), 0 0 0 9px var(--navy-dark), 0 0 0 10px var(--gold);
}

.form-card__title {
	margin: 0 0 8px;
	color: var(--navy);
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}

.form-card__subtitle {
	margin: 0 0 16px;
	padding-top: 12px;
	border-top: 1px solid var(--gold);
	color: var(--navy-dark);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}

.form-card iframe {
	display: block;
	width: 100%;
	border: 0;
}

.form-empty {
	padding: 40px 16px;
	border: 1px dashed var(--gold);
	color: var(--text);
	font-size: 14px;
	text-align: center;
}

/* Hero */
.hero {
	padding-top: 60px;
	background: linear-gradient(var(--overlay), var(--overlay)), var(--bg, none) center / cover no-repeat, var(--navy-dark);
	color: var(--white);
}

.hero__grid {
	display: grid;
	grid-template-columns: minmax(300px, 420px) 1fr;
	grid-template-areas: "form intro";
	gap: 60px;
	align-items: start;
}

.hero__form {
	grid-area: form;
	margin: 10px;
}

.hero__intro {
	grid-area: intro;
	display: grid;
	justify-items: center;
	text-align: center;
}

.hero__photo {
	display: block;
	width: auto;
	max-height: 320px;
}

.hero__title {
	margin: 10px 0 24px;
	font-family: var(--serif);
	font-size: clamp(26px, 2.6vw, 34px);
	font-weight: 400;
	line-height: 1.2;
}

.hero__sliders {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px;
	align-items: center;
	width: 100%;
	padding-bottom: 40px;
}

.hero-result {
	display: grid;
	justify-items: center;
	line-height: 1.1;
}

.hero-result__amount {
	font-size: 72px;
	font-weight: 500;
}

.hero-result__label {
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hero-result__case {
	margin-top: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Badges: full-width carousel. The track is one grid row of equal columns;
   --per-view sets how many badges fit the screen, js/theme.js moves it. */
.badges {
	overflow: hidden;
	padding: 44px 0;
}

.badges__track {
	--per-view: 7;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc(100% / var(--per-view));
	width: 100%;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.badges__track.is-moving {
	transition: transform 0.5s ease;
}

.badges__item {
	display: grid;
	place-items: center;
	padding: 0 12px;
}

.badges__item img {
	width: auto;
	max-width: 100%;
	max-height: 100px;
}

/* Why us */
.section.why-section {
	padding: calc(5% + 10px);
}

.why {
	gap: 80px;
	align-items: start;
}

.why__text,
.testimonials__text {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	justify-items: start;
}

.why .eyebrow,
.testimonials .eyebrow {
	margin: 0;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
}

.why .heading,
.testimonials .heading {
	margin: 0;
	font-size: 36px;
	line-height: 1.3;
}

.why .text {
	color: #334155;
	font-size: 16px;
	line-height: 1.65;
}

.why .btn,
.testimonials .btn {
	margin: 0;
	padding: 18px 30px;
	border-radius: 6px;
	background: #1e293b;
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
}

.why .btn:hover,
.why .btn:focus-visible,
.testimonials .btn:hover,
.testimonials .btn:focus-visible {
	background: var(--gold);
}

.accordion {
	display: grid;
	gap: 30px;
}

.accordion__item {
	border-left: 20px solid #dab46c;
	border-radius: 20px;
	background: var(--white);
	box-shadow: 0 18px 36px rgba(0, 0, 0, 0.11);
	interpolate-size: allow-keywords;
}

.accordion__item summary {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	padding: 20px 20px 20px 30px;
	border-radius: 0 20px 20px 0;
	color: #1f2124;
	font-family: var(--serif);
	font-size: 22px;
	line-height: 1.65;
	list-style: none;
	cursor: pointer;
}

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

/* Chevron when closed, minus when open. */
.accordion__item summary::after {
	content: "";
	width: 13px;
	height: 15px;
	background: currentColor;
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 15'%3E%3Cpath d='M1.6 5 6.5 10l4.9-5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.accordion__item[open] summary::after {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 15'%3E%3Crect y='6' width='13' height='3' rx='1'/%3E%3C/svg%3E");
}

.accordion__item p {
	margin: 0;
	padding: 0 30px 26px;
	color: #334155;
	font-size: 16px;
	line-height: 1.65;
}

/* Smooth opening where the browser supports it. */
.accordion__item::details-content {
	height: 0;
	overflow: clip;
	transition: height 0.4s, content-visibility 0.4s allow-discrete;
}

.accordion__item[open]::details-content {
	height: auto;
}

@media (prefers-reduced-motion: reduce) {
	.accordion__item::details-content {
		transition: none;
	}
}

@media (max-width: 921px) {
	.why .heading,
	.testimonials .heading {
		font-size: 22.8px;
	}

	.why .text,
	.why .accordion__item p {
		font-size: 14.6px;
	}

	.why .btn,
	.testimonials .btn {
		font-size: 16.4px;
	}
}

@media (max-width: 544px) {
	.why .heading,
	.testimonials .heading {
		font-size: 25.5px;
	}
}

/* Attorney (the gold square is part of the photo file). */
.attorney {
	grid-template-columns: 5fr 7fr;
}

.attorney__photo img {
	display: block;
	width: 100%;
}

/* Practice areas */
.areas {
	padding: 130px 0 140px;
	background: var(--navy);
	clip-path: polygon(0 0, 50% 70px, 100% 0, 100% calc(100% - 70px), 50% 100%, 0 calc(100% - 70px));
}

.areas .heading {
	color: var(--white);
}

.areas__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	margin-bottom: 40px;
}

.area-tile {
	display: grid;
	place-items: center;
	aspect-ratio: 2 / 1;
	padding: 12px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	/* Gold overlay at 70%, as on the old site. */
	background: linear-gradient(rgba(200, 162, 74, 0.7), rgba(200, 162, 74, 0.7)), var(--bg, none) center / cover no-repeat, var(--gold);
	color: var(--white);
	font-family: var(--serif);
	font-size: 18px;
	text-align: center;
	text-decoration: none;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s, background-color 0.2s;
}

.area-tile:hover,
.area-tile:focus-visible {
	background-image: linear-gradient(rgba(200, 162, 74, 0.35), rgba(200, 162, 74, 0.35)), var(--bg, none);
	transform: translateY(-3px);
}

/* What to do */
.what {
	align-items: start;
}

.check {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	color: var(--navy);
	font-family: var(--serif);
	font-size: 18px;
}

.check::before {
	content: "";
	width: 18px;
	height: 18px;
	border-radius: 2px;
	background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* The navy corner is part of the image file. */
.what__image img {
	display: block;
	width: 100%;
}

/* Case results */
.results {
	background: var(--navy);
	color: var(--white);
}

.results .heading {
	color: var(--white);
}

.results__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	max-width: 960px;
	margin: 20px auto 40px;
}

.result-card {
	display: grid;
	align-content: start;
	padding: 34px 26px;
	background: var(--white);
	color: var(--text);
	font-size: 13px;
	line-height: 1.6;
	text-align: center;
}

.result-card p {
	margin: 0 0 14px;
}

.result-card .rule {
	margin: 0 auto 16px;
}

.result-card__amount {
	color: var(--navy);
	font-family: var(--serif);
	font-size: 26px;
}

.result-card .result-card__case {
	margin: auto 0 0;
	color: var(--ink);
	font-weight: 700;
}

/* Testimonials */
.section.testimonials-section {
	padding: 5% 5% 2.5%;
}

.testimonials {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 60px;
	align-items: center;
}

.testimonials__box {
	display: grid;
	grid-template-columns: min(500px, calc(100% - 70px));
	justify-content: center;
	align-content: center;
	min-height: 400px;
	background: linear-gradient(rgba(0, 53, 103, 0.7), rgba(30, 41, 59, 0.7)), var(--bg, none) center / cover no-repeat, var(--navy-dark);
	color: var(--white);
}

.testimonials .review {
	grid-template-rows: 140px auto auto;
	gap: 0;
	align-content: start;
	padding: 0;
}

.testimonials .stars {
	gap: 0;
	align-self: center;
}

.testimonials .stars svg {
	width: 28.5px;
	height: 28.5px;
}

.testimonials .stars path {
	stroke: currentColor;
	stroke-width: 2;
	stroke-linejoin: round;
}

.testimonials .review p {
	font-size: 18px;
	line-height: 1.4;
}

.testimonials .review cite {
	margin-top: 25px;
	font-size: 20px;
	line-height: 1.65;
	letter-spacing: 1px;
}

.testimonials .slider__dots {
	height: 40px;
	padding-top: 21px;
}

.testimonials .slider__arrow {
	top: calc(50% - 20px);
	color: rgba(237, 237, 237, 0.9);
}

.testimonials .slider__arrow--prev {
	left: 5px;
}

.testimonials .slider__arrow--next {
	right: 5px;
}

/* Call to action */
.cta {
	padding: 70px 0;
	background: var(--navy);
}

.cta .heading {
	color: var(--white);
}

/* Blog */
.section.blog-section {
	padding: 5% 5% 3%;
}

.blog-section .heading--lines {
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 10px;
	margin: -5px 0 65px;
	color: #1e293b;
	font-size: 36px;
	line-height: 1;
}

.blog-section .heading--lines::before,
.blog-section .heading--lines::after {
	height: 2px;
}

.blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: 1fr;
	gap: 30px;
}

/* The whole card is a link; a featured image shows through the overlay. */
.post-card {
	position: relative;
	display: grid;
	align-content: start;
	min-height: 400px;
	padding: 50px;
	background: var(--bg, none) center / cover no-repeat, var(--white);
	color: var(--white);
}

.post-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(30, 41, 59, 0.73);
	transition: background-color 1.5s;
}

.post-card:hover::before,
.post-card:focus-within::before {
	background: rgba(17, 17, 17, 0.62);
}

.post-card h3,
.post-card p,
.post-card__more {
	z-index: 1;
}

.post-card h3 {
	margin: 0 0 15px;
	font-family: var(--serif);
	font-size: 23px;
	font-weight: 400;
	line-height: 1.3;
}

.post-card a {
	color: var(--white);
	text-decoration: none;
}

.post-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.post-card p {
	margin: 0 0 29px;
	font-size: 14px;
	line-height: 1.65;
}

.post-card .post-card__more {
	justify-self: start;
	font-size: 16px;
	line-height: 1.65;
	text-decoration: underline;
}

/* Contact */
.contact {
	position: relative;
	padding: calc(10% + 10px) calc(5% + 10px) calc(5% + 10px);
	background: var(--bg, none) center / cover no-repeat, var(--navy-dark);
	color: var(--white);
}

/* White V at the top. */
.contact::before {
	content: "";
	position: absolute;
	inset: -3px 0 auto;
	height: 82px;
	background: var(--white);
	clip-path: polygon(0 0, 100% 0, 100% 6%, 50% 99%, 0 6%);
}

.contact__info {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}

.contact .heading {
	margin: 0;
	font-size: 36px;
	line-height: 1.3;
}

.contact .heading,
.contact .heading a {
	color: var(--white);
	text-decoration: none;
	text-transform: uppercase;
}

.contact__info p,
.contact__info address {
	margin: 0 0 16px;
	font-size: 16px;
	font-style: normal;
	line-height: 1.65;
}

/* Firm name. */
.contact__info address::first-line {
	font-weight: 700;
}

.contact .rule {
	width: 200px;
	margin: 5px 0;
}

.contact .form-card {
	padding: 80px 20px;
}

.contact .form-card__title {
	margin: 0 0 10px;
	font-size: 30px;
	line-height: 1.3;
	letter-spacing: 0;
}

/* Tablet */
@media (max-width: 1024px) {
	.badges__track {
		--per-view: 5;
	}

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

/* Mobile: single column; the hero shows the photo and title before the form. */
@media (max-width: 860px) {
	.section {
		padding: 56px 0;
	}

	.grid-2,
	.attorney,
	.testimonials,
	.results__grid,
	.blog-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}

	.hero {
		padding-top: 30px;
	}

	.hero__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"intro"
			"form";
		gap: 10px;
		padding-bottom: 40px;
	}

	.hero__photo {
		max-height: 240px;
	}

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

	.hero-result__amount {
		font-size: 56px;
	}

	.areas {
		padding: 90px 0 100px;
		clip-path: polygon(0 0, 50% 36px, 100% 0, 100% calc(100% - 36px), 50% 100%, 0 calc(100% - 36px));
	}

	.heading--lines {
		gap: 14px;
	}

	.heading--line {
		grid-template-columns: minmax(0, 1fr);
	}

	.heading--line::after {
		display: none;
	}

	.review {
		padding: 0 34px;
	}

	.review p {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.areas__grid {
		gap: 12px;
	}

	.area-tile {
		aspect-ratio: 3 / 2;
		font-size: 15px;
	}

	.badges {
		padding: 30px 0;
	}

	.badges__track {
		--per-view: 3;
	}

	.badges__item img {
		max-height: 80px;
	}
}

@media (max-width: 921px) {
	.contact .heading {
		font-size: 22.8px;
	}

	.contact__info p,
	.contact__info address {
		font-size: 14.6px;
	}

	.contact .form-card__title {
		font-size: 20px;
	}
}

@media (max-width: 544px) {
	.contact .heading {
		font-size: 25.5px;
	}
}

/* Blog: 3, 2 and 1 column, as on the original. */
@media (max-width: 1024px) {
	.blog-section .blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 30px;
	}
}

@media (max-width: 767px) {
	.section.blog-section {
		padding: 10% 5%;
	}

	.blog-section .heading--lines {
		margin: 15px 0 35px;
	}

	.blog-section .blog-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* These sections stay in two columns down to 768px, as on the original. */
@media (min-width: 768px) {
	.contact .grid-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 70px;
	}

	.testimonials-section .testimonials {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: 60px;
	}

	.grid-2.why {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 80px;
	}
}

@media (max-width: 767px) {
	.contact {
		padding-top: calc(30% + 10px);
	}

	.contact .grid-2 {
		gap: 40px;
	}

	.contact .form-card {
		padding: 40px 0;
	}

	.testimonials-section .testimonials {
		gap: 20px;
	}

	.grid-2.why {
		gap: 40px;
	}
}
