/**
 * Home sections, part A: hero, services, about banner, features strip, advisors (WP-02).
 * Reproduces the approved prototype 1:1; colour/type/radius tokens are the aliases defined at the
 * top of style.css, which map to theme.json presets (TECH-002, TECH-018).
 *
 * @package American_Tax_Services
 */

/* ---------- Hero ---------- */
.hero {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	padding: calc(var(--chrome-h) + var(--admin-bar-h)) 0 0;
	color: var(--navy-800);
	background: #fff;
	overflow: hidden;
}

.hero-bg {
	position: absolute;
	inset: 0;
}

/* The photo is an <img> (LCP image) positioned like the prototype's background. */
.hero-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: right center;
}

.hero-bg::before {
	content: "";
	position: absolute;
	z-index: 1;
	inset: 0;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 32%, rgba(255, 255, 255, 0.3) 52%, rgba(255, 255, 255, 0) 66%);
}

.hero-bg::after {
	content: "";
	position: absolute;
	z-index: 1;
	inset: auto 0 0;
	height: 38%;
	background: linear-gradient(0deg, var(--bg-soft) 0%, rgba(242, 246, 252, 0.82) 42%, rgba(242, 246, 252, 0) 100%);
}

.hero-content {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 40px 0 120px;
}

.hero h1 {
	max-width: 560px;
	margin: 0;
	color: var(--navy-800);
	font-family: var(--font-head);
	font-size: clamp(2.4rem, 4.2vw, 3.5rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.025em;
}

.hero h1 span {
	color: var(--red-600);
}

/* Headline reveal (initHeadline() in ats-theme.js): words fade up one after another. The H1 is
 * hidden only while JS is about to split it, with a timed fallback so it can never stay hidden. */
html:not(.no-js) .hero h1:not(.is-split) {
	opacity: 0;
	animation: ats-show 0s 1.2s forwards;
}

.hero h1 .ats-word {
	display: inline-block;
	color: inherit;
}

.hero h1.is-split .ats-word {
	animation: ats-word-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
	animation-delay: calc(0.15s + var(--i) * 0.08s);
}

/* `from` keyframes + fill `both`: the words' own (resting) state is fully visible. */
@keyframes ats-word-in {
	from {
		opacity: 0;
		transform: translate3d(0, 0.45em, 0);
		filter: blur(6px);
	}
}

@keyframes ats-show {
	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	html:not(.no-js) .hero h1:not(.is-split),
	.hero h1.is-split .ats-word {
		animation: none;
	}
}

.hero-lede {
	max-width: 470px;
	margin: 22px 0 0;
	color: #3f5068;
	font-size: 1rem;
}

.hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 34px;
}

/* ---------- Services ---------- */
/* The tiles overlap the hero's lower edge. Qualified so it beats the main-child margin reset. */
.wp-site-blocks .services.services {
	margin-top: -110px;
}

.services {
	position: relative;
	z-index: 2;
	padding-top: 48px;
	background: linear-gradient(180deg, transparent 0%, var(--bg-soft) 90px);
	overflow: hidden;
}

.services::after {
	content: "";
	position: absolute;
	right: -160px;
	top: -80px;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(26, 98, 168, 0.12), transparent 70%);
}

.services-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 0.8fr 1.2fr;
	gap: 64px;
	align-items: center;
}

.services-intro h2 {
	margin: 0;
}

.services-intro p:not(.eyebrow) {
	max-width: 420px;
	margin: 18px 0 30px;
	color: var(--muted);
	font-size: 0.95rem;
}

/* Text link under the button to the Who We Serve page. */
.services-intro p.services-who {
	margin: 16px 0 0;
	font-size: 0.9rem;
}

.services-intro p.services-who a {
	color: var(--navy-800);
	font-weight: 600;
}

.svc-tiles {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 18px;
}

.svc-tile {
	position: relative;
	display: flex;
	grid-column: span 2;
	flex-direction: column;
	justify-content: flex-start;
	gap: 2px;
	min-height: 180px;
	padding: 20px;
	overflow: hidden;
	isolation: isolate;
	border: 0;
	border-radius: 18px;
	background: var(--navy-800);
	box-shadow: var(--shadow-card);
	text-decoration: none;
	transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.svc-tile:nth-child(n + 7) {
	grid-column: span 3;
}

.svc-tile::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background: var(--img) center / cover no-repeat;
	transform: scale(1.02);
	transition: transform 0.6s ease;
}

.svc-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(0deg, rgba(7, 29, 51, 0.92) 0%, rgba(12, 45, 78, 0.72) 55%, rgba(19, 64, 111, 0.6) 100%);
	transition: opacity 0.4s;
}

.svc-tile:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lift);
}

.svc-tile:hover::before {
	transform: scale(1.1);
}

.svc-tile:hover::after {
	opacity: 0.82;
}

.svc-tile-ico {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-bottom: auto;
	padding: 0;
	border-radius: 13px;
	color: #fff;
}

.svc-tile-ico--red {
	background: var(--red-600);
	box-shadow: 0 8px 18px rgba(199, 28, 44, 0.28);
}

.svc-tile-ico--blue {
	background: var(--blue-500);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.svc-tile strong {
	color: #fff;
	font-family: var(--font-head);
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.25;
}

.svc-tile small {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.8rem;
	font-weight: 500;
}

.svc-tile-arrow {
	position: absolute;
	top: 22px;
	right: 20px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: var(--navy-800);
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity 0.3s, transform 0.3s, background-color 0.3s, color 0.3s;
}

.svc-tile-arrow .ats-icon {
	width: 15px;
	height: 15px;
}

.svc-tile:hover .svc-tile-arrow,
.svc-tile:focus-visible .svc-tile-arrow {
	opacity: 1;
	transform: none;
	background: var(--red-600);
	color: #fff;
}

/* ---------- About banner ---------- */
.about-banner {
	position: relative;
	padding: 110px 0;
	color: #fff;
	overflow: hidden;
	background: var(--navy-900);
}

.about-bg {
	position: absolute;
	inset: -25% 0;
	will-change: transform;
	background:
		linear-gradient(0deg, rgba(7, 29, 51, 0.85) 15%, rgba(7, 29, 51, 0) 55%),
		linear-gradient(90deg, rgba(7, 29, 51, 0.92) 0%, rgba(12, 45, 78, 0.65) 38%, rgba(12, 45, 78, 0.05) 72%),
		url("../images/photos/about-office.webp") right center / cover no-repeat;
}

.about-inner {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 40px;
}

.about-copy {
	max-width: 470px;
}

.about-copy h2 {
	margin: 0;
	color: #fff;
}

.about-copy p:not(.eyebrow) {
	margin: 16px 0 28px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.95rem;
}

.about-stats {
	display: flex;
	gap: 46px;
	margin: 0;
	padding: 0;
	list-style: none;
	text-shadow: 0 2px 12px rgba(7, 29, 51, 0.6);
}

.about-stats strong {
	display: block;
	font-family: var(--font-head);
	font-size: 2.1rem;
	font-weight: 600;
	line-height: 1.1;
}

.about-stats small {
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.82rem;
}

/* ---------- Features strip ---------- */
.features {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin: -46px 0 0;
	padding: 26px 30px;
	list-style: none;
	border-radius: var(--radius-lg);
	background: #fff;
	box-shadow: var(--shadow-lift);
}

.features li {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 18px;
	color: var(--navy-800);
	font-family: var(--font-head);
	font-size: 0.88rem;
	font-weight: 500;
	line-height: 1.35;
}

.features li + li {
	border-left: 1px solid var(--line);
}

.feat-ico {
	display: grid;
	flex: none;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: var(--wp--preset--color--surface-2);
	color: var(--blue-600);
}

/* ---------- Section head ---------- */
.section-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 30px;
	margin-bottom: 40px;
}

.section-head h2 {
	margin: 0;
}

.section-head p:not(.eyebrow) {
	max-width: 480px;
	margin: 12px 0 0;
	color: var(--muted);
	font-size: 0.93rem;
}

/* ---------- Advisors: "Meet Claudia" profile ---------- */
/* One person, one profile (client review 2026-11-03): an uncropped portrait with a name plate,
 * and the heading, lead and links beside it. Stacks below 860px. */
.advisors {
	background: linear-gradient(180deg, #fff, var(--bg-soft));
}

.leader {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: clamp(40px, 6vw, 96px);
	align-items: center;
}

.leader-portrait {
	position: relative;
	max-width: 480px;
	margin: 0;
}

.leader-photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 944 / 1040;
	object-fit: cover;
	border-radius: var(--radius-lg);
	background: #e8f0fb;
	box-shadow: 0 24px 48px -20px rgba(11, 35, 65, 0.35);
}

.leader-photo--initials {
	display: grid;
	place-items: center;
	background: linear-gradient(160deg, #e8f0fb, var(--wp--preset--color--surface-2));
}

.leader-photo--initials span {
	color: var(--navy-800);
	font-family: var(--font-head);
	font-size: 5rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* Name plate: overlaps the portrait's lower edge so name and face read as one unit. */
.leader-plate {
	position: absolute;
	right: -28px;
	bottom: 32px;
	display: grid;
	gap: 2px;
	padding: 16px 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: var(--shadow-card);
}

.leader-plate strong {
	color: var(--navy-800);
	font-family: var(--font-head);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
}

.leader-plate span {
	color: var(--muted);
	font-size: 0.85rem;
	line-height: 1.4;
}

.leader-copy h2 {
	margin: 0;
	font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.5rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.leader-copy p {
	max-width: 46ch;
	margin: 20px 0 0;
	color: var(--muted);
	font-size: 1.05rem;
	line-height: 1.7;
}

.leader-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 36px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.services-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}

@media (max-width: 860px) {
	.leader {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.leader-portrait {
		width: min(100%, 420px);
	}

	.leader-plate {
		right: 16px;
		bottom: 16px;
	}

	.hero-img {
		object-position: 72% center;
	}

	.hero-bg::before {
		background: linear-gradient(180deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.85) 45%, rgba(242, 246, 252, 0.7) 100%);
	}

	/* Phones / tablets: the hero fits its content (no full-viewport height), copy starts right
	 * under the header and the bottom padding leaves room for the overlapping service tiles. */
	.hero {
		min-height: 0;
	}

	.hero-content {
		justify-content: flex-start;
		padding: 56px 0 120px;
	}

	.services {
		padding-top: 28px;
	}

	.wp-site-blocks .services.services {
		margin-top: -64px;
	}

	.features {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px 0;
		margin-top: -30px;
	}

	.features li:nth-child(3) {
		border-left: 0;
	}

	.section-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.about-banner {
		padding: 80px 0 90px;
	}

	.about-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.about-bg {
		background:
			linear-gradient(180deg, rgba(7, 29, 51, 0.7), rgba(7, 29, 51, 0.92)),
			url("../images/photos/about-office.webp") 70% center / cover no-repeat;
	}
}

@media (max-width: 560px) {
	.hero h1 {
		font-size: 2.15rem;
	}

	.hero-content {
		padding: 48px 0 96px;
	}

	.hero-cta {
		gap: 12px;
		margin-top: 26px;
	}

	.services {
		padding-top: 20px;
	}

	.wp-site-blocks .services.services {
		margin-top: -48px;
	}

	.svc-tiles {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.svc-tile,
	.svc-tile:nth-child(n + 7) {
		grid-column: span 1;
		min-height: 150px;
		padding: 16px;
	}

	.svc-tile-ico {
		width: 40px;
		height: 40px;
	}

	.svc-tile strong {
		margin-top: 14px;
	}

	.svc-tile-arrow {
		display: none;
	}

	.features {
		grid-template-columns: 1fr;
		padding: 20px;
	}

	.features li {
		padding: 0;
	}

	.features li + li {
		border-left: 0;
	}


	.about-stats {
		gap: 26px;
	}

	.about-stats strong {
		font-size: 1.6rem;
	}
}

@media (min-width: 861px) and (max-height: 780px) {
	.hero-content {
		padding: 16px 0 90px;
	}

	.hero h1 {
		font-size: clamp(2.4rem, 4.6vw, 3.4rem);
	}

	.hero-lede {
		margin-top: 16px;
	}

	.hero-cta {
		margin-top: 24px;
	}
}
