/**
 * LPA Accountancy — design system
 *
 * Token-first. Every colour, radius and shadow used anywhere in the theme is
 * declared once here; components below only reference the tokens.
 */

:root {
	/* Brand */
	--lpa-green: #4CAF50;
	--lpa-green-600: #43A047;
	--lpa-green-700: #388E3C;
	--lpa-green-050: #EDF7EE;

	/* Dark slate — text, headers, primary UI */
	--lpa-slate: #2D3748;
	--lpa-slate-800: #1F2733;
	--lpa-slate-600: #4A5568;
	--lpa-slate-400: #718096;
	--lpa-slate-200: #CBD5E0;

	/* Light */
	--lpa-bg: #F7FAFC;
	--lpa-white: #FFFFFF;
	--lpa-border: #E2E8F0;

	/* Signals */
	--lpa-danger: #E53E3E;

	/* Scale */
	--lpa-radius-sm: 6px;
	--lpa-radius: 10px;
	--lpa-radius-lg: 16px;
	--lpa-shadow-sm: 0 1px 2px rgba(45, 55, 72, .06);
	--lpa-shadow: 0 4px 14px rgba(45, 55, 72, .08);
	--lpa-shadow-lg: 0 12px 32px rgba(45, 55, 72, .12);
	--lpa-transition: 180ms cubic-bezier(.4, 0, .2, 1);

	--lpa-container: 1200px;
	--lpa-gap: clamp(1rem, 2.5vw, 2rem);
}

/* ==========================================================================
   Base
   ========================================================================== */

body {
	color: var(--lpa-slate);
	background-color: var(--lpa-white);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-title {
	color: var(--lpa-slate);
	letter-spacing: -0.015em;
	line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; }

a {
	color: var(--lpa-green-700);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: color var(--lpa-transition);
}

a:hover,
a:focus {
	color: var(--lpa-green);
}

/* Visible focus for keyboard users — accessibility and a ranking-adjacent
   usability signal. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--lpa-green);
	outline-offset: 2px;
	border-radius: var(--lpa-radius-sm);
}

/* ==========================================================================
   Top location bar
   ========================================================================== */

.lpa-topbar {
	background: var(--lpa-slate);
	color: var(--lpa-white);
	font-size: 0.8125rem;
	line-height: 1.4;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.lpa-topbar__inner {
	max-width: var(--lpa-container);
	margin-inline: auto;
	padding: 0.5rem var(--lpa-gap);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
}

.lpa-topbar__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lpa-topbar__item {
	display: flex;
	align-items: center;
	margin: 0;
}

/* Separators drawn with pseudo-elements so adding a 5th office needs no
   markup change. */
.lpa-topbar__item + .lpa-topbar__item::before {
	content: "";
	width: 1px;
	height: 0.85em;
	margin-right: 0.5rem;
	background: rgba(255, 255, 255, .22);
}

.lpa-topbar__link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.25rem 0.4rem;
	border-radius: var(--lpa-radius-sm);
	color: rgba(255, 255, 255, .88);
	text-decoration: none;
	white-space: nowrap;
	transition: background var(--lpa-transition), color var(--lpa-transition);
}

a.lpa-topbar__link:hover,
a.lpa-topbar__link:focus {
	background: rgba(255, 255, 255, .1);
	color: var(--lpa-white);
}

.lpa-topbar__link.is-inactive {
	color: rgba(255, 255, 255, .55);
	cursor: default;
}

.lpa-topbar__item.is-current .lpa-topbar__link {
	color: var(--lpa-white);
	box-shadow: inset 0 -2px 0 var(--lpa-green);
}

.lpa-topbar__badge {
	display: inline-block;
	padding: 0.1rem 0.4rem;
	border-radius: 999px;
	background: var(--lpa-green);
	color: var(--lpa-white);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.lpa-topbar__item.is-coming-soon .lpa-topbar__badge {
	background: rgba(255, 255, 255, .16);
	color: rgba(255, 255, 255, .8);
}

.lpa-topbar__contact {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.lpa-topbar__contact a {
	color: var(--lpa-white);
	text-decoration: none;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.lpa-topbar__contact a:hover,
.lpa-topbar__contact a:focus {
	color: var(--lpa-green);
}

.lpa-icon--phone::before {
	content: "\260E";
	font-size: 0.95em;
}

/*
 * With fifteen cities the bar would wrap to three rows on a laptop, so the
 * list scrolls horizontally at every width instead. A soft fade on the right
 * edge signals there is more to see.
 */
.lpa-topbar__locations {
	position: relative;
	min-width: 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.lpa-topbar__locations::-webkit-scrollbar {
	display: none;
}

.lpa-topbar__list {
	flex-wrap: nowrap;
}

.lpa-topbar__inner::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 36px;
	height: 100%;
	pointer-events: none;
	background: linear-gradient(90deg, transparent, var(--lpa-slate));
}

.lpa-topbar__inner {
	position: relative;
}

@media (max-width: 600px) {
	.lpa-topbar__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.lpa-topbar__locations {
		width: 100%;
	}

	/* The fade would sit over the contact row once the bar stacks. */
	.lpa-topbar__inner::after {
		display: none;
	}
}

/* ==========================================================================
   Header & navigation
   ========================================================================== */

.site-header,
.ast-primary-header-bar {
	background: var(--lpa-white);
	box-shadow: var(--lpa-shadow-sm);
}

.main-header-menu > .menu-item > .menu-link,
.ast-header-break-point .main-header-menu .menu-link {
	color: var(--lpa-slate);
	font-weight: 600;
	transition: color var(--lpa-transition);
}

.main-header-menu > .menu-item > .menu-link:hover,
.main-header-menu > .menu-item.current-menu-item > .menu-link,
.main-header-menu > .menu-item.current-menu-ancestor > .menu-link {
	color: var(--lpa-green-700);
}

/* Underline (uses ::before; Astra uses ::after for dropdown arrows) that grows from the centre — absolutely positioned so it never takes
   space inside the flex menu link (fixes two-word items wrapping/jumping on hover). */
.main-header-menu > .menu-item > .menu-link {
	position: relative;
	white-space: nowrap;
}

.main-header-menu > .menu-item > .menu-link::before {
	content: "";
	position: absolute;
	left: 15px;
	right: 15px;
	bottom: 14px;
	height: 2px;
	background: var(--lpa-green);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform var(--lpa-transition);
	pointer-events: none;
}

.main-header-menu > .menu-item:hover > .menu-link::before,
.main-header-menu > .menu-item:focus-within > .menu-link::before,
.main-header-menu > .menu-item.current-menu-item > .menu-link::before {
	transform: scaleX(1);
}

/* Mobile / tablet menu: no hover underline (it sat beside the text and looked broken). */
.ast-header-break-point .main-header-menu > .menu-item > .menu-link::before,
.ast-mobile-header-wrap .main-header-menu > .menu-item > .menu-link::before {
	display: none;
}
.ast-header-break-point .main-header-menu > .menu-item > .menu-link,
.ast-mobile-header-wrap .main-header-menu > .menu-item > .menu-link {
	white-space: normal;
}

/* Mobile menu: Astra gives top-level links height:100% of the <li>; when a submenu is
   open the <li> grows, so the link stretched and left a large empty gap. */
.ast-header-break-point .main-header-menu > .menu-item > .menu-link {
	height: auto;
}

.main-header-menu .sub-menu {
	border: 1px solid var(--lpa-border);
	border-radius: var(--lpa-radius);
	box-shadow: var(--lpa-shadow-lg);
	overflow: hidden;
	padding: 0.35rem;
}

.main-header-menu .sub-menu .menu-link {
	border-radius: var(--lpa-radius-sm);
	color: var(--lpa-slate-600);
}

.main-header-menu .sub-menu .menu-link:hover {
	background: var(--lpa-green-050);
	color: var(--lpa-green-700);
}

/* ==========================================================================
   Buttons & CTAs
   ========================================================================== */

.lpa-btn,
.ast-button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	border: 0;
	border-radius: var(--lpa-radius);
	background: var(--lpa-green);
	color: var(--lpa-white);
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	box-shadow: var(--lpa-shadow-sm);
	transition: background var(--lpa-transition), transform var(--lpa-transition), box-shadow var(--lpa-transition);
}

.lpa-btn:hover,
.ast-button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
	background: var(--lpa-green-600);
	color: var(--lpa-white);
	transform: translateY(-1px);
	box-shadow: var(--lpa-shadow);
}

.lpa-btn:active,
input[type="submit"]:active,
button[type="submit"]:active {
	transform: translateY(0);
	box-shadow: var(--lpa-shadow-sm);
}

.lpa-btn--secondary {
	background: transparent;
	color: var(--lpa-slate);
	box-shadow: inset 0 0 0 2px var(--lpa-border);
}

.lpa-btn--secondary:hover {
	background: var(--lpa-bg);
	color: var(--lpa-green-700);
	box-shadow: inset 0 0 0 2px var(--lpa-green);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.lpa-hero {
	background:
		radial-gradient(1000px 400px at 85% -10%, var(--lpa-green-050), transparent 60%),
		var(--lpa-bg);
	padding: clamp(3rem, 7vw, 6rem) var(--lpa-gap);
}

.lpa-hero__inner {
	max-width: var(--lpa-container);
	margin-inline: auto;
	display: grid;
	gap: var(--lpa-gap);
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	align-items: center;
}

.lpa-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	background: var(--lpa-white);
	box-shadow: var(--lpa-shadow-sm);
	color: var(--lpa-green-700);
	font-size: 0.8125rem;
	font-weight: 600;
}

.lpa-hero__title {
	margin: 1rem 0 0.75rem;
}

.lpa-hero__lead {
	color: var(--lpa-slate-600);
	font-size: clamp(1rem, 1.6vw, 1.15rem);
	max-width: 56ch;
}

.lpa-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

@media (max-width: 880px) {
	.lpa-hero__inner {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Support availability badges
   ========================================================================== */

.lpa-support {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lpa-support__item {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	white-space: nowrap;
}

.lpa-support__icon::before {
	font-size: 0.95em;
	line-height: 1;
}

.lpa-support__icon--phone::before { content: "\260E"; }
.lpa-support__icon--chat::before  { content: "\1F4AC"; }
.lpa-support__icon--clock::before { content: "\23F1"; }

/* Compact variant for the top bar. */
.lpa-support--bar {
	font-size: 0.78rem;
	font-weight: 600;
	color: rgba(255, 255, 255, .85);
}

.lpa-support--bar .lpa-support__item::after {
	content: "";
	width: 1px;
	height: 0.85em;
	margin-left: 1rem;
	background: rgba(255, 255, 255, .22);
}

.lpa-support--bar .lpa-support__item:last-child::after {
	display: none;
}

/* Full variant for page content. */
.lpa-support--block {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem;
	margin-block: 1.5rem;
}

.lpa-support--block .lpa-support__item {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--lpa-border);
	border-left: 4px solid var(--lpa-green);
	border-radius: var(--lpa-radius);
	background: var(--lpa-white);
	box-shadow: var(--lpa-shadow-sm);
	white-space: normal;
}

.lpa-support--block .lpa-support__label {
	font-weight: 700;
	color: var(--lpa-slate);
}

.lpa-support--block .lpa-support__detail {
	color: var(--lpa-slate-600);
	font-size: 0.875rem;
}

@media (max-width: 782px) {
	.lpa-support--bar {
		font-size: 0.72rem;
	}
}

/* ==========================================================================
   Fallback page title
   Injected only on pages that would otherwise render no H1 at all.
   ========================================================================== */

.lpa-page-title {
	max-width: var(--lpa-container);
	margin: 0 auto clamp(1rem, 3vw, 2rem);
	padding: clamp(1.5rem, 4vw, 2.5rem) var(--lpa-gap) 0;
	color: var(--lpa-slate);
}

/* ==========================================================================
   Service directory
   ========================================================================== */

.lpa-services {
	padding-block: clamp(2rem, 5vw, 4rem);
}

.lpa-services__group + .lpa-services__group {
	margin-top: 2.5rem;
}

.lpa-services__heading {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--lpa-border);
}

.lpa-services__heading::before {
	content: "";
	width: 4px;
	height: 1.1em;
	border-radius: 2px;
	background: var(--lpa-green);
}

.lpa-services__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lpa-services__item {
	margin: 0;
}

.lpa-services__link {
	display: block;
	height: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid var(--lpa-border);
	border-radius: var(--lpa-radius);
	background: var(--lpa-white);
	color: var(--lpa-slate);
	font-weight: 500;
	text-decoration: none;
	transition: border-color var(--lpa-transition), box-shadow var(--lpa-transition), transform var(--lpa-transition);
}

a.lpa-services__link:hover,
a.lpa-services__link:focus {
	border-color: var(--lpa-green);
	color: var(--lpa-green-700);
	box-shadow: var(--lpa-shadow);
	transform: translateY(-2px);
}

.lpa-services__link.is-inactive {
	background: var(--lpa-bg);
	color: var(--lpa-slate-400);
	cursor: default;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.lpa-footer-locations {
	max-width: var(--lpa-container);
	margin-inline: auto;
	padding: clamp(2rem, 4vw, 3rem) var(--lpa-gap);
}

.lpa-footer-locations__title {
	font-size: 1.25rem;
	margin-bottom: 1.25rem;
}

.lpa-footer-locations__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
}

.lpa-footer-locations__card {
	padding: 1.25rem;
	border: 1px solid var(--lpa-border);
	border-radius: var(--lpa-radius-lg);
	background: var(--lpa-white);
	box-shadow: var(--lpa-shadow-sm);
}

.lpa-footer-locations__card.is-coming-soon {
	background: var(--lpa-bg);
	border-style: dashed;
}

.lpa-footer-locations__name {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1rem;
	margin: 0 0 0.5rem;
}

.lpa-footer-locations__card .lpa-topbar__badge {
	background: var(--lpa-slate-200);
	color: var(--lpa-slate-600);
}

.lpa-address {
	font-style: normal;
	color: var(--lpa-slate-600);
	line-height: 1.6;
}

.lpa-footer-locations__note {
	margin: 0.5rem 0 0;
	color: var(--lpa-slate-400);
	font-size: 0.875rem;
}

/* ==========================================================================
   Protected page form (carried over from the previous inline styles)
   ========================================================================== */

.protected-wrapper {
	display: flex;
	justify-content: center;
	padding: clamp(2rem, 6vw, 4rem) var(--lpa-gap);
}

.protected-card {
	width: min(420px, 100%);
	padding: 2rem;
	border: 1px solid var(--lpa-border);
	border-radius: var(--lpa-radius-lg);
	background: var(--lpa-white);
	box-shadow: var(--lpa-shadow);
	text-align: center;
}

.protected-title {
	font-size: 1.35rem;
	margin: 0 0 0.5rem;
}

.protected-subtitle {
	color: var(--lpa-slate-600);
	margin: 0 0 1.25rem;
}

.protected-error {
	margin-bottom: 1rem;
	padding: 0.65rem 0.85rem;
	border-radius: var(--lpa-radius-sm);
	background: #FDECEC;
	color: var(--lpa-danger);
	font-size: 0.9rem;
}

.protected-input-group input[type="password"] {
	width: 100%;
	padding: 0.7rem 0.9rem;
	margin-bottom: 0.85rem;
	border: 1px solid var(--lpa-border);
	border-radius: var(--lpa-radius);
	font: inherit;
}

.protected-card button[type="submit"] {
	width: 100%;
}

/* ==========================================================================
   WhatsApp live-chat button (sitewide, fixed bottom-right)
   ========================================================================== */

.lpa-whatsapp-fab {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px;
	border-radius: 999px;
	background: var(--lpa-green);
	color: var(--lpa-white);
	text-decoration: none;
	box-shadow: 0 10px 30px rgba(76, 175, 80, .45);
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.lpa-whatsapp-fab:hover,
.lpa-whatsapp-fab:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 14px 36px rgba(76, 175, 80, .55);
	background: var(--lpa-green-600);
	color: var(--lpa-white);
}

.lpa-whatsapp-fab__icon {
	display: flex;
	flex: none;
}

.lpa-whatsapp-fab__icon svg {
	display: block;
	width: 28px;
	height: 28px;
}

.lpa-whatsapp-fab__label {
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	max-width: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-width .25s ease, opacity .2s ease;
}

@media (min-width: 782px) {
	.lpa-whatsapp-fab:hover .lpa-whatsapp-fab__label,
	.lpa-whatsapp-fab:focus-visible .lpa-whatsapp-fab__label {
		max-width: 110px;
		opacity: 1;
	}
}

@media (max-width: 480px) {
	.lpa-whatsapp-fab {
		right: 14px;
		bottom: 14px;
		padding: 12px;
	}

	.lpa-whatsapp-fab__icon svg {
		width: 24px;
		height: 24px;
	}
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}