/*
 * Landing Page template (template-landing.php).
 * Standalone — the main site.css is not loaded on this template.
 * Design reference: Figma "H+P – Landing page", 1440 × 1024 frame.
 *
 * Desktop (≥ 768px): every panel is position: sticky, so each following
 * panel (and finally the footer) slides up over the one before it.
 * Mobile: one plain stacked page.
 */

/* ---------- Tokens ---------- */
:root {
	--lp-red: #8a1733;
	--lp-ink: #1a1a1a;
	--lp-grey: #f1f1f1;
	--lp-white: #fff;

	--lp-font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	--lp-gutter: 40px;
	--lp-gap: 20px;
	--lp-header-h: 88px;

	/* 100px at 1440 wide, scales with the viewport */
	--lp-display: clamp(44px, 6.95vw, 128px);
}

@media (max-width: 767px) {
	:root {
		--lp-gutter: 20px;
		--lp-header-h: 64px;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body.lp-body {
	margin: 0;
	background: var(--lp-white);
	color: var(--lp-ink);
	font-family: var(--lp-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Resets use :where() (zero specificity) so single-class component rules win. */
:where(.lp-body) :where(h1, h2, h3, p, dl, dd, address) {
	margin: 0;
}

:where(.lp-body) :where(address) {
	font-style: normal;
}

:where(.lp-body) :where(a) {
	color: inherit;
	text-decoration: none;
}

:where(.lp-body) :where(img, svg) {
	display: block;
	max-width: 100%;
}

/* ---------- Colour schemes (per panel) ---------- */
.lp-bg--white,
.lp-bg--grey {
	--lp-fg: var(--lp-ink);
	--lp-heading: var(--lp-red);
	--lp-accent: var(--lp-red);
	--lp-muted: #6b6b6b;
	--lp-rule: #c4c4c4;
}

.lp-bg--white {
	background-color: var(--lp-white);
}

.lp-bg--grey {
	background-color: var(--lp-grey);
}

.lp-bg--red,
.lp-bg--dark {
	--lp-fg: var(--lp-white);
	--lp-heading: var(--lp-white);
	--lp-accent: var(--lp-white);
	--lp-muted: rgba(255, 255, 255, 0.7);
	--lp-rule: rgba(255, 255, 255, 0.45);
}

.lp-bg--red {
	background-color: var(--lp-red);
}

.lp-bg--dark {
	background-color: var(--lp-ink);
}

/* ---------- Type ---------- */
.lp-display {
	color: var(--lp-heading);
	font-size: var(--lp-display);
	font-weight: 500;
	line-height: 0.92;
	letter-spacing: -0.035em;
	/* Optical alignment with the gutter */
	margin-left: -0.04em;
}

.lp-eyebrow,
.lp-label {
	color: var(--lp-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
}

.lp-lead,
.lp-copy {
	color: var(--lp-fg);
	font-size: 18px;
	line-height: 1.6;
}

.lp-copy p + p {
	margin-top: 1em;
}

.lp-small {
	color: var(--lp-muted);
	font-size: 13px;
	line-height: 1.6;
}

.lp-small a {
	color: var(--lp-accent);
}

/* "+ Label" links */
.lp-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--lp-fg, var(--lp-ink));
	font-size: 15px;
	line-height: 1.4;
	transition: opacity 0.2s ease;
}

.lp-link::before {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	background:
		linear-gradient(var(--lp-accent, var(--lp-red)), var(--lp-accent, var(--lp-red))) center / 100% 1px no-repeat,
		linear-gradient(var(--lp-accent, var(--lp-red)), var(--lp-accent, var(--lp-red))) center / 1px 100% no-repeat;
	transition: transform 0.3s ease;
}

.lp-link--lg {
	font-size: 17px;
}

@media (hover: hover) {
	.lp-link:hover::before {
		transform: rotate(90deg);
	}
}

.lp-link:focus-visible,
.lp-header__logo:focus-visible,
.lp-footer a:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 4px;
}

/* ---------- Header ---------- */
.lp-header {
	position: fixed;
	z-index: 100;
	top: 0;
	left: 0;
	right: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: var(--lp-gap);
	align-items: center;
	height: var(--lp-header-h);
	padding: 0 var(--lp-gutter);
	background: var(--lp-white);
	border-bottom: 1px solid #ececec;
	--lp-fg: var(--lp-ink);
	--lp-accent: var(--lp-red);
}

.lp-body.admin-bar .lp-header {
	top: 32px;
}

.lp-header__logo {
	grid-column: 1;
	justify-self: start;
	color: var(--lp-red);
}

.lp-header__logo .lp-logo {
	width: 45px;
	height: auto;
}

.lp-header__nav {
	grid-column: 4;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

@media (max-width: 767px) {
	.lp-header {
		display: flex;
		justify-content: space-between;
	}

	.lp-header__logo .lp-logo {
		width: 36px;
	}

	.lp-header__nav {
		gap: 16px;
	}

	.lp-header__nav .lp-link {
		font-size: 14px;
	}
}

@media (max-width: 782px) {
	.lp-body.admin-bar .lp-header {
		top: 46px;
	}
}

/* ---------- Panels ---------- */
.lp {
	position: relative;
}

/* Anchor targets sit in normal flow just before each panel, so jump
   links land on the panel's real start even though the panel is sticky. */
.lp-anchor {
	height: 0;
}

/* Logged-in: the admin bar pushes the fixed header down */
.lp-body.admin-bar .lp-anchor {
	scroll-margin-top: 32px;
}

@media (max-width: 782px) {
	.lp-body.admin-bar .lp-anchor {
		scroll-margin-top: 46px;
	}
}

.lp-panel {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
}

.lp-panel__inner {
	display: flex;
	flex-direction: column;
	min-height: inherit;
	padding: calc(var(--lp-header-h) + min(80px, 7.5vh)) var(--lp-gutter) min(96px, 9vh);
}

.lp-panel .lp-eyebrow {
	margin-bottom: clamp(32px, 6.8vh, 70px);
}

@media (min-width: 768px) {
	.lp-panel {
		position: sticky;
		/* JS sets a negative top for panels taller than the viewport,
		   so they stick at their bottom edge instead of being cut off. */
		top: 0;
	}
}

@media (max-width: 767px) {
	.lp-panel {
		min-height: 0;
	}

	.lp-panel:first-of-type {
		min-height: 100svh;
	}

	.lp-panel__inner {
		padding-top: calc(var(--lp-header-h) + 48px);
		padding-bottom: 64px;
	}
}

/* ---------- Layout: Intro ---------- */
.lp-intro__text {
	max-width: 340px;
	margin-top: clamp(48px, 12.2vh, 125px);
}

/* ---------- Layout: Detail ---------- */
.lp-detail__head {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: var(--lp-gap);
	align-items: end;
}

.lp-detail__head .lp-display {
	grid-column: 1 / 4;
}

.lp-detail__links {
	grid-column: 4;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding-bottom: 0.4em;
}

.lp-facts {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px var(--lp-gap);
	margin-top: clamp(56px, 16.6vh, 170px);
}

.lp-facts__item {
	padding-top: 22px;
	border-top: 1px solid var(--lp-rule);
}

.lp-facts__value {
	margin-top: 4px;
	color: var(--lp-fg);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
}

.lp-columns {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 48px var(--lp-gap);
	margin-top: clamp(48px, 12.5vh, 128px);
}

.lp-columns__item .lp-label {
	margin-bottom: 18px;
}

.lp-columns__item .lp-copy {
	max-width: 560px;
}

@media (max-width: 1023px) {
	.lp-detail__head {
		grid-template-columns: 1fr;
		row-gap: 32px;
	}

	.lp-detail__head .lp-display,
	.lp-detail__links {
		grid-column: 1;
	}

	.lp-facts {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.lp-columns {
		grid-template-columns: 1fr;
	}
}

/* ---------- Layout: Form ---------- */
.lp-form {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: var(--lp-gap);
	flex: 1;
}

.lp-form__aside {
	grid-column: 1 / 3;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding-right: var(--lp-gap);
}

.lp-form__body {
	grid-column: 3 / 5;
}

.lp-form__text {
	max-width: 400px;
	margin-top: clamp(40px, 11vh, 115px);
}

.lp-form__small {
	max-width: 380px;
	margin-top: 24px;
}

.lp-form__footnote {
	max-width: 440px;
	margin-top: auto;
	padding-top: 48px;
}

@media (max-width: 1023px) {
	/* Flatten the aside so the footnote can move below the form */
	.lp-form {
		display: flex;
		flex-direction: column;
	}

	.lp-form__aside {
		display: contents;
	}

	.lp-form__body {
		order: 1;
		margin-top: 56px;
	}

	.lp-form__footnote {
		order: 2;
		margin-top: 48px;
		padding-top: 0;
	}
}

/* ---------- Contact Form 7 (see docs/landing-cf7-form.txt) ---------- */
.lp-form__body .wpcf7 {
	--lp-field-rule: #bdbdbd;
}

.lp-fields {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 36px var(--lp-gap);
}

.lp-field {
	display: block;
}

.lp-field--full {
	grid-column: 1 / -1;
}

.lp-field__label {
	display: block;
	margin-bottom: 8px;
	color: #4a4a4a;
	font-size: 13px;
	line-height: 1.4;
}

.lp-form__body .wpcf7-form-control-wrap {
	display: block;
	position: relative;
}

.lp-form__body input[type="text"],
.lp-form__body input[type="email"],
.lp-form__body input[type="tel"],
.lp-form__body input[type="url"],
.lp-form__body textarea {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	padding: 4px 0 12px;
	border: 0;
	border-bottom: 1px solid var(--lp-field-rule);
	border-radius: 0;
	background: transparent;
	color: var(--lp-ink);
	font-family: var(--lp-font);
	font-size: 15px;
	line-height: 1.4;
	transition: border-color 0.2s ease;
}

.lp-form__body textarea {
	height: 110px;
	resize: vertical;
}

.lp-form__body input::placeholder,
.lp-form__body textarea::placeholder {
	color: #a3a3a3;
	opacity: 1;
}

.lp-form__body input:focus,
.lp-form__body textarea:focus {
	outline: none;
	border-bottom-color: var(--lp-red);
}

/* CV upload: the native input is hidden; the label is the button */
.lp-upload__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 16px;
}

.lp-upload__button {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--lp-ink);
	font-size: 17px;
	font-weight: 500;
	cursor: pointer;
}

.lp-upload__button::before {
	content: "";
	width: 10px;
	height: 10px;
	background:
		linear-gradient(var(--lp-red), var(--lp-red)) center / 100% 1px no-repeat,
		linear-gradient(var(--lp-red), var(--lp-red)) center / 1px 100% no-repeat;
}

.lp-upload__button input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.lp-upload__button:focus-within {
	outline: 1px solid var(--lp-red);
	outline-offset: 4px;
}

.lp-upload__hint {
	color: #8a8a8a;
	font-size: 13px;
}

.lp-upload__hint.has-file {
	color: var(--lp-ink);
}

/* The file input's wrap must not take its own line */
.lp-upload__button .wpcf7-form-control-wrap {
	position: static;
	display: inline;
}

/* ...and its error sits underneath, not between button and hint */
.lp-upload__row {
	position: relative;
}

.lp-upload {
	padding-bottom: 4px;
}

.lp-upload__button .wpcf7-not-valid-tip {
	position: absolute;
	top: 100%;
	left: 0;
	white-space: nowrap;
	font-weight: 400;
}

/* Consent checkbox */
.lp-consent .wpcf7-list-item {
	margin: 0;
}

.lp-consent label {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	color: var(--lp-ink);
	font-size: 13px;
	line-height: 1.55;
	cursor: pointer;
}

.lp-consent input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1px solid var(--lp-ink);
	border-radius: 0;
	background: transparent;
	cursor: pointer;
}

.lp-consent input[type="checkbox"]:checked {
	background: var(--lp-red);
	border-color: var(--lp-red);
	box-shadow: inset 0 0 0 3px var(--lp-grey);
}

.lp-consent input[type="checkbox"]:focus-visible {
	outline: 1px solid var(--lp-red);
	outline-offset: 3px;
}

.lp-consent a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Submit */
.lp-form__body input[type="submit"] {
	-webkit-appearance: none;
	appearance: none;
	padding: 0 0 0 20px;
	border: 0;
	border-radius: 0;
	background:
		linear-gradient(var(--lp-red), var(--lp-red)) 0 50% / 10px 1px no-repeat,
		linear-gradient(var(--lp-red), var(--lp-red)) 4.5px 50% / 1px 10px no-repeat;
	color: var(--lp-red);
	font-family: var(--lp-font);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
}

.lp-form__body input[type="submit"]:focus-visible {
	outline: 1px solid var(--lp-red);
	outline-offset: 4px;
}

.lp-form__body input[type="submit"]:disabled {
	opacity: 0.5;
	cursor: default;
}

.lp-form__body .ajax-loader {
	vertical-align: middle;
	margin-left: 12px;
}

/* Validation + response */
.lp-form__body .wpcf7-not-valid {
	border-bottom-color: var(--lp-red) !important;
}

.lp-form__body .wpcf7-not-valid-tip {
	display: block;
	margin-top: 6px;
	color: var(--lp-red);
	font-size: 12px;
}

.lp-form__body .wpcf7-response-output,
.lp-form__body div.wpcf7-validation-errors,
.lp-form__body div.wpcf7-acceptance-missing,
.lp-form__body div.wpcf7-mail-sent-ok,
.lp-form__body div.wpcf7-mail-sent-ng {
	margin: 28px 0 0;
	padding: 0;
	border: 0;
	color: var(--lp-ink);
	font-size: 14px;
}

.lp-form__body div.wpcf7-mail-sent-ok {
	color: var(--lp-red);
	font-weight: 500;
}

@media (max-width: 767px) {
	.lp-fields {
		grid-template-columns: 1fr;
		row-gap: 28px;
	}
}

/* ---------- Footer ---------- */
.lp-footer {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: min(520px, 100vh);
	padding: clamp(64px, 11.7vh, 120px) var(--lp-gutter) 48px;
	background: var(--lp-ink);
	color: var(--lp-white);
	--lp-fg: var(--lp-white);
	--lp-accent: var(--lp-white);
}

.lp-footer__top {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: var(--lp-gap);
	align-items: start;
}

.lp-footer__logo {
	grid-column: 1;
	justify-self: start;
	color: var(--lp-white);
}

.lp-footer__logo .lp-logo {
	width: 75px;
	height: auto;
}

.lp-footer__links {
	grid-column: 3;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.lp-footer__address {
	grid-column: 4;
	color: rgba(255, 255, 255, 0.75);
	font-size: 15px;
	line-height: 1.6;
}

.lp-footer__bottom {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: var(--lp-gap);
	margin-top: auto;
	padding-top: 64px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 11px;
}

.lp-footer__bottom p:last-child {
	grid-column: 3;
}

@media (hover: hover) {
	.lp-footer__bottom a:hover {
		color: var(--lp-white);
	}
}

@media (max-width: 767px) {
	.lp-footer {
		min-height: 0;
	}

	.lp-footer__top,
	.lp-footer__bottom {
		grid-template-columns: 1fr;
		row-gap: 40px;
	}

	.lp-footer__top > *,
	.lp-footer__bottom p:last-child {
		grid-column: 1;
	}

	.lp-footer__bottom {
		row-gap: 8px;
	}
}
