/**
 * Site refresh (2026-11): header + menu, content pages (about, terms, privacy, prices, contact, 404)
 * and the footer. Loaded last on every page; styling only, the markup, texts and scripts are the
 * pages' own. The checkout has its own stylesheet (checkout.css).
 *
 * Colours: the country accent (--lei-accent) for links and highlights, navy text (--lei-text),
 * light grey lines. Selectors stay under the page/component classes they style, so the forms and
 * the home page hero (their own CSS) are untouched apart from the header and footer.
 */

:root {
	--rf-line: #e5e7eb;
	--rf-soft: #f8fafc;
	--rf-muted: #64748b;
	--rf-radius: 8px;
	--rf-header-h: 72px;
}

/* ==========================================================================
   Header: full-width bar, sticky, a hairline under it
   ========================================================================== */

.site-header-bar {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(255, 255, 255, 0.94);
	border-bottom: 1px solid var(--rf-line);
	-webkit-backdrop-filter: saturate(180%) blur(8px);
	backdrop-filter: saturate(180%) blur(8px);
	transition: box-shadow 0.2s;
}

.site-header-bar.is-scrolled {
	box-shadow: 0 4px 18px -10px rgba(15, 23, 42, 0.25);
}

.site-header-bar .site-header {
	position: relative;
	align-items: center;
	justify-content: space-between;
	flex-wrap: nowrap;
	max-width: 1180px;
	min-height: var(--rf-header-h);
	margin: 0 auto;
	padding: 0 24px;
}

.site-header-bar .site-branding {
	flex: none;
}

.site-header-bar .site-header .site-branding .site-logo img {
	display: block;
	width: 150px;
	height: auto;
	margin: 0;
}

/* --- desktop menu --- */

@media (min-width: 992px) {
	.site-header-bar .site-navigation {
		justify-content: flex-end;
	}

	.site-header-bar .site-navigation ul.menu {
		align-items: center;
		flex-wrap: nowrap;
		gap: 4px;
		margin: 0;
	}

	.site-header-bar .site-navigation ul.menu > li {
		align-items: center;
	}

	.site-header-bar .site-navigation ul.menu > li > a {
		position: relative;
		padding: 10px 14px;
		border-radius: 6px;
		color: var(--lei-text);
		font-family: var(--lei-font);
		font-size: 15px;
		font-weight: 500;
		line-height: 1.2;
		text-decoration: none;
		white-space: nowrap;
		transition: color 0.15s, background-color 0.15s;
	}

	.site-header-bar .site-navigation ul.menu > li > a:hover,
	.site-header-bar .site-navigation ul.menu > li > a:focus-visible,
	.site-header-bar .site-navigation ul.menu > li:hover > a {
		color: var(--lei-accent);
		background: var(--rf-soft);
		outline: none;
	}

	/* the current page: accent text with a short underline */
	.site-header-bar .site-navigation ul.menu > li.is-current > a {
		color: var(--lei-accent);
	}

	.site-header-bar .site-navigation ul.menu > li.is-current > a::after {
		content: "";
		position: absolute;
		left: 14px;
		right: 14px;
		bottom: 2px;
		height: 2px;
		border-radius: 2px;
		background: var(--lei-accent);
	}

	/* the submenu caret: a small chevron instead of the big triangle */
	.site-header-bar .site-navigation ul.menu li.has-children {
		padding-right: 0;
	}

	.site-header-bar .site-navigation ul.menu > li.has-children > a {
		padding-right: 30px;
	}

	.site-header-bar .site-navigation ul.menu > li.has-children::after {
		content: "";
		position: absolute;
		right: 14px;
		top: 50%;
		width: 7px;
		height: 7px;
		margin-top: -5px;
		border: solid currentColor;
		border-width: 0 1.5px 1.5px 0;
		color: var(--rf-muted);
		transform: rotate(45deg);
		pointer-events: none;
		transition: transform 0.15s;
	}

	.site-header-bar .site-navigation ul.menu > li.has-children:hover::after {
		color: var(--lei-accent);
		transform: translateY(2px) rotate(45deg);
	}

	/* dropdown: a card under the item, shown on hover and on keyboard focus */
	.site-header-bar .site-navigation ul.menu li ul {
		display: block;
		top: calc(100% + 6px);
		left: 0;
		min-width: 220px;
		margin: 0;
		padding: 6px;
		border: 1px solid var(--rf-line);
		border-radius: 10px;
		background: #fff;
		box-shadow: 0 16px 32px -12px rgba(15, 23, 42, 0.25);
		opacity: 0;
		visibility: hidden;
		transform: translateY(4px);
		transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
	}

	/* hover bridge over the 6px gap */
	.site-header-bar .site-navigation ul.menu li ul::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: -8px;
		height: 8px;
	}

	.site-header-bar .site-navigation ul.menu li:hover > ul,
	.site-header-bar .site-navigation ul.menu li:focus-within > ul {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.site-header-bar .site-navigation ul.menu li ul li {
		display: block;
	}

	.site-header-bar .site-navigation ul.menu li ul li a {
		display: block;
		padding: 10px 12px;
		border-radius: 6px;
		color: var(--lei-text);
		font-size: 14px;
		text-decoration: none;
		white-space: nowrap;
	}

	.site-header-bar .site-navigation ul.menu li ul li a:hover,
	.site-header-bar .site-navigation ul.menu li ul li a:focus-visible {
		background: var(--rf-soft);
		color: var(--lei-accent);
		outline: none;
	}
}

/* --- mobile menu (burger) --- */

@media (max-width: 991px) {
	:root {
		--rf-header-h: 64px;
	}

	.site-header-bar .site-header {
		padding: 0 16px;
	}

	.site-header-bar .site-header .site-branding .site-logo img {
		width: 130px;
	}

	.site-header-bar .site-nav-burger {
		width: 40px;
		height: 40px;
		padding: 10px 8px;
		border-radius: 8px;
		gap: 5px;
	}

	.site-header-bar .site-nav-burger:hover {
		background: var(--rf-soft);
	}

	.site-header-bar .site-nav-burger span {
		height: 2px;
	}

	.site-header-bar .site-nav-toggle:checked + .site-nav-burger span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	.site-header-bar .site-nav-toggle:checked + .site-nav-burger span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	.site-header-bar .site-navigation {
		top: 100%;
		max-height: calc(100vh - var(--rf-header-h));
		overflow-y: auto;
		padding: 8px 12px 16px;
		border-top: 1px solid var(--rf-line);
		box-shadow: 0 20px 30px -18px rgba(15, 23, 42, 0.35);
	}

	.site-header-bar .site-navigation ul.menu > li + li {
		border-top: 0;
	}

	.site-header-bar .site-navigation ul.menu li a {
		display: block;
		padding: 13px 12px;
		border-radius: 8px;
		color: var(--lei-text);
		font-size: 16px;
		font-weight: 500;
		text-decoration: none;
	}

	.site-header-bar .site-navigation ul.menu li a:hover,
	.site-header-bar .site-navigation ul.menu li.is-current > a {
		background: var(--rf-soft);
		color: var(--lei-accent);
	}

	.site-header-bar .site-navigation ul.menu li ul {
		margin: 0 0 4px 12px;
		padding: 0 0 0 10px;
		border-left: 2px solid var(--rf-line);
		background: none;
	}

	.site-header-bar .site-navigation ul.menu li ul li a {
		padding: 10px 12px;
		font-size: 15px;
		font-weight: 400;
		color: var(--rf-muted);
	}
}

/* in-page jumps (#faq, the table of contents) land below the sticky header */
html {
	scroll-padding-top: calc(var(--rf-header-h) + 16px);
}

/* ==========================================================================
   Content pages: page title, article column, table of contents
   ========================================================================== */

.p-legal,
.p-about {
	padding: 56px 24px 88px;
}

.p-legal > .l-row,
.p-about > .l-row,
.p-legal--privacy .p-legal__row {
	max-width: 1180px;
}

/* the page title: navy, left-aligned over the article, a thin accent line under it */
.p-legal__title.c-title,
.p-about__title.c-title,
.p-prices__title.c-title {
	margin: 0 0 8px;
	color: var(--lei-text);
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-align: left;
}

.p-legal__title::after,
.p-about__title::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin-top: 18px;
	border-radius: 3px;
	background: var(--lei-accent);
}

/* article column + table of contents side by side; the TOC sticks below the header and
   stops at the end of the article (it used to be position:fixed and ran over the footer) */
@media (min-width: 1025px) {
	.p-legal .l-col,
	.p-about .l-col {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 280px;
		column-gap: 64px;
		align-items: start;
	}

	.p-legal .l-col > *,
	.p-about .l-col > * {
		grid-column: 1;
		margin-bottom: 0;
	}

	.p-legal .l-col > .p-legal__title,
	.p-about .l-col > .p-about__title {
		grid-column: 1 / -1;
		margin-bottom: 40px;
	}

	.p-legal .l-col > .c-toc,
	.p-about .l-col > .c-toc {
		grid-column: 2;
		grid-row: 2 / span 20;
		align-self: start;
		position: sticky;
		top: calc(var(--rf-header-h) + 24px);
		width: auto;
		max-width: none;
		max-height: calc(100vh - var(--rf-header-h) - 48px);
		overflow-y: auto;
		right: auto;
		z-index: 1;
	}
}

@media (max-width: 1024px) {
	.p-legal .l-col > .p-legal__title,
	.p-about .l-col > .p-about__title {
		margin-bottom: 28px;
	}
}

/* the article text: readable size and measure */
.p-legal__text,
.p-about__text,
.p-about__explained {
	width: 100%;
	max-width: 760px;
	font-size: 16px;
	line-height: 1.7;
	color: #334155;
}

.p-legal--privacy .p-legal__text {
	text-align: left;
}

.p-legal__text p,
.p-about__text p,
.p-legal__text li,
.p-about__text li {
	font-size: 16px;
	line-height: 1.7;
}

.p-legal__text p,
.p-about__text p {
	margin: 0 0 16px;
}

/* the legal texts carry inline font sizes from the old editor; one size for the whole article */
.p-legal__text [style*="font-size"],
.p-about__text [style*="font-size"] {
	font-size: inherit !important;
	letter-spacing: normal !important;
}

.p-legal__text h2,
.p-legal__text h3,
.p-about .c-prose h3 {
	margin: 44px 0 14px;
	color: var(--lei-text);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.005em;
}

.p-legal__text > :first-child,
.p-about__text:first-of-type > :first-child {
	margin-top: 0;
}

.p-legal__text h4,
.p-legal__text h5,
.p-legal__text h6 {
	margin: 28px 0 10px;
	color: var(--lei-text);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
}

.p-legal__text ul,
.p-legal__text ol,
.p-about__text ul,
.p-about__text ol {
	margin: 0 0 18px;
	padding-left: 22px;
}

.p-legal__text li,
.p-about__text li {
	margin: 0 0 6px;
}

.p-legal__text a,
.p-about__text a,
.p-prices-note a,
.p-contact .c-prose a {
	color: var(--lei-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.p-legal__text a:hover,
.p-about__text a:hover {
	text-decoration-thickness: 2px;
}

/* --- table of contents (terms, privacy, about) --- */

.p-legal .c-toc,
.p-about .c-toc {
	border: 1px solid var(--rf-line);
	border-radius: var(--rf-radius);
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.p-legal .c-toc__header,
.p-about .c-toc__header {
	padding: 16px 18px;
	border-bottom: 1px solid var(--rf-line);
}

.p-legal .c-toc__title,
.p-about .c-toc__title {
	color: var(--lei-text);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.p-legal .c-toc__toggle {
	color: var(--rf-muted);
}

.p-legal .c-toc__body,
.p-about .c-toc__body {
	padding: 12px 10px 14px;
}

.p-legal .c-toc__item,
.p-about .c-toc__item {
	margin: 0;
}

.p-legal .c-toc__item > a,
.p-about .c-toc__item > a {
	align-items: baseline;
	padding: 7px 8px;
	border-radius: 6px;
	color: #475569;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}

.p-legal .c-toc__item > a::before,
.p-about .c-toc__item > a::before {
	flex: none;
	min-width: 22px;
	margin-right: 6px;
	color: #94a3b8;
	font-variant-numeric: tabular-nums;
}

.p-legal .c-toc__item > a:hover,
.p-about .c-toc__item > a:hover,
.p-legal .c-toc__item > a.is-active,
.p-about .c-toc__item > a.is-active {
	background: var(--rf-soft);
	color: var(--lei-accent);
	text-decoration: none;
}

.p-legal .c-toc__item > a.is-active::before,
.p-about .c-toc__item > a.is-active::before {
	color: var(--lei-accent);
}

/* --- the LEI number infographic on the about page keeps its look, just centred in the column --- */
.p-about__explained {
	margin: 8px 0 24px;
}

/* ==========================================================================
   Prices page
   ========================================================================== */

.p-prices {
	padding: 56px 24px 24px;
}

.p-prices__title.c-title {
	margin: 0;
	text-align: center;
}

.p-prices-band {
	margin-top: 32px;
	padding: 80px 24px 96px;
	background-image: linear-gradient(160deg, #2c3c63 0%, #3b507c 60%, #415a8a 100%);
}

.p-prices-band__heading.c-title {
	font-size: clamp(28px, 3.4vw, 40px);
	font-weight: 600;
	line-height: 1.2;
}

.p-prices-band__intro {
	color: rgba(255, 255, 255, 0.82);
	font-size: 16px;
}

.p-prices__boxes {
	gap: 0;
	padding-top: 40px;
}

.p-prices .c-pricebox,
.p-prices-band .c-pricebox {
	border-radius: 0;
}

.p-prices-note {
	padding: 48px 24px 72px;
}

.p-prices-note .c-prose {
	max-width: 860px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.7;
	color: #334155;
}

.p-prices-note .c-prose h3 {
	color: var(--lei-text);
	font-size: 26px;
	font-weight: 600;
	margin: 0 0 14px;
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.p-contact {
	padding: 48px 24px 88px;
}

.p-contact > .l-row {
	max-width: 1080px;
}

.p-contact__logo img {
	max-width: 320px;
	height: auto;
}

.p-contact .l-row--wide {
	margin-top: 24px;
}

.p-contact .l-row--wide > .l-col:first-child {
	padding: 32px;
	border: 1px solid var(--rf-line);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.2);
}

@media (min-width: 768px) {
	.p-contact .l-row--wide > .l-col:first-child {
		width: calc(50% - 24px);
		margin-right: 48px;
	}

	.p-contact .l-row--wide > .l-col:last-child {
		width: calc(50% - 24px);
		padding: 32px 0;
	}
}

.p-contact .c-prose {
	font-size: 16px;
	line-height: 1.7;
	color: #334155;
}

.p-contact .c-form__field {
	margin-top: 18px;
}

.p-contact .c-form label {
	display: block;
	margin-bottom: 6px;
	color: var(--lei-text);
	font-size: 14px;
	font-weight: 500;
}

.p-contact .c-form input,
.p-contact .c-form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	color: var(--lei-text);
	font-size: 15px;
	line-height: 1.4;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.p-contact .c-form input:focus,
.p-contact .c-form textarea:focus {
	border-color: var(--lei-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--lei-accent) 18%, transparent);
	outline: none;
}

.p-contact .c-form__submit.c-btn {
	margin-top: 22px;
	padding: 13px 28px;
	border-radius: 8px;
	background: var(--lei-accent);
	font-size: 15px;
	font-weight: 600;
}

.p-contact .c-form__submit.c-btn:hover {
	filter: brightness(0.93);
}

/* ==========================================================================
   404
   ========================================================================== */

.page--404 .page-header {
	max-width: 1180px;
	margin: 0 auto;
	padding: 96px 24px 120px;
	text-align: center;
}

.page--404 .entry-title {
	color: var(--lei-text);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	margin-top: 0;
	background: #2f4069;
	background-image: linear-gradient(180deg, #3b507c 0%, #2f4069 100%);
}

.site-footer__inner {
	max-width: 1180px;
	padding: 48px 24px 40px;
	align-items: flex-start;
}

.site-footer__col {
	color: rgba(255, 255, 255, 0.86);
	font-size: 14px;
	line-height: 1.7;
}

.site-footer__col p {
	margin: 0 0 10px;
}

.site-footer__col strong {
	color: #fff;
	font-weight: 600;
}

.site-footer a,
.site-footer a:visited {
	color: #7dd3fc;
	text-decoration: none;
	transition: color 0.15s;
}

.site-footer a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.site-footer__col--brand img {
	max-width: 150px;
	height: auto;
}

@media (min-width: 768px) {
	.site-footer__col--brand {
		align-self: center;
	}
}

@media (max-width: 767px) {
	.site-footer__inner {
		padding: 36px 16px 28px;
	}

	.site-footer__col {
		padding: 10px 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header-bar,
	.site-header-bar *,
	.p-legal .c-toc__item > a,
	.p-about .c-toc__item > a {
		transition: none !important;
	}
}
