/* ==========================================================================
   Landing Page template — page-templates/template-landing.php
   Loaded only on pages using that template (see inc/landing-page.php).

   Reusable classes (add via Block > Advanced > Additional CSS class):
     Sections    .lp-hero (dark, grid + radar)  .lp-connect (light, 2 cols)
     Layout      .lp-container (1260px)  .lp-cta-row
     Type        .lp-eyebrow  .lp-display  .lp-lede  .lp-lead  .lp-muted
     Buttons     .lp-btn  .lp-btn--download  .lp-btn--sm
   Headline convention (same as /audit):
     <strong> = 800 + brand red    <b> = 800, same colour as the line

   Fonts: only the weights Blocksy already requests are used
   (Poppins 200/800, Roboto Condensed 400–700, Roboto 500) so this page
   adds no font downloads.
   ========================================================================== */

.tm-lp {
	--lp-red: #c41230;
	--lp-red-hover: #a50f28;
	--lp-red-on-dark: #f31949;
	--lp-navy: #101926;
	--lp-ink: #122139;
	--lp-muted: #6b7080;
	--lp-line: #e3e6ea;
	--lp-white: #fff;
	--lp-gutter: clamp(20px, 4vw, 40px);
	--lp-font-head: 'Poppins', sans-serif;
	--lp-font-body: 'Roboto Condensed', sans-serif;
	--lp-font-ui: 'Roboto', sans-serif;

	/* Positioned so the absolute header sits below the admin bar when logged in. */
	position: relative;
	margin: 0;
	background: var(--lp-white);
	color: var(--lp-ink);
	font-family: var(--lp-font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.lp-main > * { margin-block: 0; }

/* Neutralise core flow-layout block gap; components set their own spacing. */
.lp-main :where(.wp-block-group, .wp-block-column) > * { margin-block-start: 0; }

/*
 * Pages without an .lp-hero (thank-you pages etc.): the absolute header would
 * sit on top of the content, so pad below it, give the content area a minimum
 * height (footer stays low on short pages) and centre whatever is in it.
 */
.lp-main:not(:has(> .lp-hero)) {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: min(75vh, 760px);
	padding: calc(88px + clamp(24px, 5vw, 56px)) var(--lp-gutter) clamp(56px, 8vw, 96px);
}
.lp-main:not(:has(> .lp-hero)) > * {
	width: 100%;
	max-width: 760px;
}

/*
 * Site Customizer > Additional CSS has a sitewide rule:
 *   .is-layout-flow.wp-block-group > div { max-width: 1500px; margin: 0 auto; }
 *   @media (max-width:1500px) { ...same selector { padding: 0 20px; } }
 * Specificity 0,2,1 — it beats single-class component rules and stacks 20px
 * padding on every nested group div. The selectors below are 0,3,0 so they
 * win without !important, and only inside landing pages.
 */
.lp-main .wp-block-group > .lp-container {
	max-width: calc(1260px + 2 * var(--lp-gutter));
	margin-inline: auto;
	padding-inline: var(--lp-gutter);
}
.lp-main .lp-hero > .lp-hero__bg {
	max-width: none;
	margin: 0;
	padding: 0;
}
.lp-main .lp-hero__inner > .lp-cta-row {
	max-width: 690px;
	margin: 40px 0 0;
	padding: 30px 0 0;
}
.lp-main .lp-cta-row > .wp-block-buttons {
	max-width: none;
	margin: 0;
	padding: 0;
}

.lp-container {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(1260px + 2 * var(--lp-gutter));
	margin-inline: auto;
	padding-inline: var(--lp-gutter);
}

/* --- Header --------------------------------------------------------------- */

.lp-header {
	position: absolute;
	inset: 0 0 auto;
	z-index: 10;
}

.lp-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 88px;
}

.lp-logo { display: inline-block; line-height: 0; }
.lp-logo__img {
	display: block;
	width: 220px;
	max-width: 100%;
	height: auto;
}

/* --- Buttons (Button block: add .lp-btn; header uses a.lp-btn) ------------- */

.lp-btn .wp-block-button__link,
a.lp-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 18px 34px;
	border: 0;
	border-radius: 999px;
	background: var(--lp-red);
	color: var(--lp-white);
	font-family: var(--lp-font-ui);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: 0 12px 30px -12px rgba(196, 18, 48, 0.7);
	transition: background-color 0.2s ease, transform 0.2s ease;
}
.lp-btn .wp-block-button__link:hover,
a.lp-btn:hover {
	background: var(--lp-red-hover);
	color: var(--lp-white);
	transform: translateY(-1px);
}
.lp-btn .wp-block-button__link:focus-visible,
a.lp-btn:focus-visible {
	outline: 2px solid var(--lp-white);
	outline-offset: 3px;
}

a.lp-btn--sm { padding: 13px 24px; font-size: 13px; }

/* Download arrow as a CSS mask: Button block text can't hold inline SVG. */
.lp-btn--download .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 15px;
	height: 15px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m-5-5 5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m-5-5 5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- Type ----------------------------------------------------------------- */

.lp-eyebrow {
	margin: 0 0 28px;
	font-family: var(--lp-font-head);
	font-size: clamp(13px, 1.25vw, 16px);
	font-weight: 800;
	letter-spacing: 0.14em;
	word-spacing: 0.35em;
	line-height: 1.4;
	text-transform: uppercase;
	text-wrap: balance;
}
.lp-eyebrow strong { color: var(--lp-red); font-weight: inherit; }

.lp-display {
	margin: 0 0 32px;
	color: var(--lp-navy);
	font-family: var(--lp-font-head);
	font-size: clamp(34px, 4.4vw, 56px);
	font-weight: 200;
	letter-spacing: -0.01em;
	line-height: 1.03;
	text-transform: uppercase;
	text-wrap: balance;
}
.lp-display strong { color: var(--lp-red); font-weight: 800; }
.lp-display b { color: inherit; font-weight: 800; }

.lp-lede {
	margin: 0;
	font-size: clamp(17px, 1.5vw, 20px);
	line-height: 1.65;
}

.lp-lead {
	margin: 0 0 18px;
	color: var(--lp-navy);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.5;
}

.lp-muted {
	margin: 0;
	color: var(--lp-muted);
	font-size: 18px;
	line-height: 1.6;
}

/* --- Hero ----------------------------------------------------------------- */

.lp-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(140px, 15vw, 190px) clamp(64px, 8vw, 110px);
	background:
		radial-gradient(ellipse 60% 70% at 100% 0%, rgba(196, 18, 48, 0.28), transparent 70%),
		linear-gradient(160deg, #161d2c 0%, #0f1523 55%, #0b111c 100%);
	color: var(--lp-white);
}

.lp-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.lp-hero__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 64px 64px;
}

.lp-hero__rings {
	position: absolute;
	top: 50%;
	right: max(-80px, -5vw);
	width: min(36vw, 480px);
	aspect-ratio: 1;
	transform: translateY(-50%);
}
.lp-hero__rings span {
	position: absolute;
	inset: 0;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 50%;
}
.lp-hero__rings span:nth-child(2) { inset: 13%; border-color: rgba(255, 255, 255, 0.09); }
.lp-hero__rings span:nth-child(3) { inset: 30%; border-color: rgba(196, 18, 48, 0.45); }
.lp-hero__rings span:nth-child(4) {
	inset: 44%;
	border: 0;
	background: radial-gradient(circle, rgba(243, 25, 73, 0.85) 0%, rgba(196, 18, 48, 0.3) 40%, transparent 70%);
}

.lp-hero__inner > * { max-width: 690px; }
.lp-hero .lp-display {
	max-width: 760px;
	color: var(--lp-white);
	font-size: clamp(42px, 6.4vw, 82px);
}
.lp-hero .lp-lede { color: rgba(255, 255, 255, 0.72); }
.lp-hero .lp-lede strong { color: var(--lp-white); font-weight: 700; }

.lp-cta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.lp-cta-row > p {
	flex: 1 1 260px;
	max-width: 320px;
	margin: 0;
	font-size: 19px;
	font-weight: 500;
	line-height: 1.45;
}
.lp-cta-row .wp-block-buttons { margin: 0; }

/* --- Connect -------------------------------------------------------------- */

.lp-connect {
	padding-block: clamp(56px, 8vw, 110px);
	background: linear-gradient(180deg, #f2f5f7 0%, var(--lp-white) 100%);
	/* Room for nothing sticky; keeps #connect jump flush with the section top. */
	scroll-margin-top: 0;
}

.wp-block-columns.lp-connect__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(32px, 6vw, 72px);
	align-items: start;
	margin-block: 0;
}
.lp-connect__inner > .wp-block-column { margin: 0; }
.lp-connect__copy > * { max-width: 500px; }
.lp-connect__copy p { text-wrap: balance; }

/* --- Contact list ([tm_contact_list]) ------------------------------------- */

.tm-contact-list {
	display: grid;
	gap: 14px;
	max-width: 545px !important;
	margin: 36px 0 0;
	padding: 32px 0 0;
	border-top: 1px solid var(--lp-line);
	list-style: none;
}
.tm-contact-list li { margin: 0; }
.tm-contact-list__person {
	display: flex;
	flex-direction: column;
	margin-bottom: 4px !important;
	line-height: 1.35;
}
.tm-contact-list__person strong {
	color: var(--lp-navy);
	font-family: var(--lp-font-head);
	font-size: 20px;
	font-weight: 800;
}
.tm-contact-list__person span {
	color: var(--lp-muted);
	font-size: 17px;
}
.tm-contact-list a {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	color: var(--lp-navy);
	font-size: 18px;
	font-weight: 500;
	text-decoration: none;
}
.tm-contact-list a:hover { color: var(--lp-red); }
.tm-contact-list__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--lp-red);
	color: var(--lp-white);
}

/* --- Note (.lp-note on a Row group: round photo + personal message) ------
   Used on thank-you pages. Inside an .lp-hero the hero centres it vertically.
   A leading <strong> (e.g. "Hello,") becomes the headline line. */

.lp-hero:has(.lp-note) {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-height: min(80vh, 720px);
}
.lp-hero:has(.lp-note) > .lp-hero__inner { width: 100%; }

.lp-main .lp-note {
	align-items: center;
	gap: clamp(24px, 4vw, 48px);
	max-width: 760px;
}
.lp-note .wp-block-image.alignleft,
.lp-note .wp-block-image {
	flex: none;
	float: none;
	width: 160px;
	margin: 0;
}
.lp-note .wp-block-image img {
	display: block;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	object-fit: cover;
	/* Radar-style rings to match the hero graphic. */
	box-shadow:
		0 0 0 10px rgba(255, 255, 255, 0.04),
		0 0 0 11px rgba(196, 18, 48, 0.5),
		0 0 0 26px rgba(255, 255, 255, 0.025),
		0 0 0 27px rgba(255, 255, 255, 0.08);
}
.lp-note p {
	margin: 0;
	font-size: clamp(17px, 1.5vw, 20px);
	line-height: 1.65;
}
.lp-note p > strong:first-child {
	display: block;
	margin-bottom: 10px;
	font-family: var(--lp-font-head);
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.1;
	text-transform: uppercase;
}
.lp-hero .lp-note p { color: rgba(255, 255, 255, 0.75); }
.lp-hero .lp-note p > strong:first-child { color: var(--lp-white); }

/* --- Footer --------------------------------------------------------------- */

.lp-footer {
	padding-block: 64px 28px;
	background: var(--lp-navy);
	color: rgba(255, 255, 255, 0.72);
	font-size: 16px;
}
.lp-footer p { margin: 0; line-height: 1.75; }
.lp-footer a:not(.lp-logo) { color: inherit; text-decoration: none; }
.lp-footer a:not(.lp-logo):hover { color: var(--lp-white); }

.lp-footer__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
	align-items: start;
}

.lp-footer .lp-footer__label {
	margin-bottom: 12px;
	color: var(--lp-red-on-dark);
	font-family: var(--lp-font-head);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.lp-footer .lp-footer__legal {
	margin-top: 56px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	color: #7d89a6;
	font-size: 13px;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
	.lp-hero__rings { display: none; }
	.wp-block-columns.lp-connect__inner { grid-template-columns: minmax(0, 1fr); }
	.lp-connect__copy > * { max-width: none; }
}

@media (max-width: 700px) {
	.lp-header__inner { height: 72px; }
	.lp-logo__img { width: 170px; }
	a.lp-btn--sm { padding: 11px 18px; font-size: 12px; }
	.lp-main .lp-hero__inner > .lp-cta-row,
	.lp-cta-row > p { max-width: none; }
	.lp-main .lp-note { flex-wrap: wrap; }
	.lp-cta-row .wp-block-buttons,
	.lp-cta-row .wp-block-button,
	.lp-cta-row .wp-block-button__link { width: 100%; justify-content: center; }
	.lp-footer__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.lp-btn .wp-block-button__link,
	a.lp-btn { transition: none; }
}
