/*
 * Public page styles. Brand colours/fonts arrive as CSS variables set per page.
 * Spacing and type scale mirror Flya v1 (Tailwind classes noted where useful) so pages look unchanged.
 */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
}
html {
	-webkit-text-size-adjust: 100%;
}
body {
	font-family: var(--font-body);
	line-height: 1.5;
	color: var(--dark);
	background: var(--light);
	-webkit-font-smoothing: antialiased;
}
img {
	max-width: 100%;
	height: auto;
	display: block;
}
a {
	color: inherit;
}
h1,
h2,
h3,
h4 {
	font-family: var(--font-heading);
	font-weight: 400;
	font-size: inherit;
}

/* Breakpoints follow Tailwind: md 768, lg 1024, xl 1280 */
.wrap-3xl {
	max-width: 48rem;
	margin-inline: auto;
	padding-inline: 1rem;
}
.wrap-4xl {
	max-width: 56rem;
	margin-inline: auto;
	padding-inline: 1rem;
}
.wrap-4xl.pad {
	padding-block: 1rem;
}
@media (min-width: 1024px) {
	.wrap-4xl.pad {
		padding-inline: 0;
	}
}

/* Block colour styles (v1: bg-base-light / -dark / -highlight) */
.style-light {
	background: var(--light);
	color: var(--dark);
}
.style-dark {
	background: var(--dark);
	color: var(--light);
}
.style-action {
	background: var(--action);
	color: var(--highlight);
}

/* Rich text ("scribe" in v1) */
.scribe {
	font-size: 1rem;
}
.scribe h1,
.scribe h2,
.scribe h3,
.scribe h4 {
	font-weight: 600;
	margin-bottom: 1em;
	line-height: 1.4;
}
.scribe h1 {
	font-size: 1.75rem;
}
.scribe h2 {
	font-size: 1.675rem;
}
.scribe h3 {
	font-size: 1.375rem;
}
.scribe h4 {
	font-size: 1.125rem;
}
.scribe p {
	margin-bottom: 1em;
	line-height: 1.4;
}
.scribe ul,
.scribe ol {
	padding-left: 1em;
	margin-bottom: 1em;
}
.scribe ul {
	list-style: disc;
}
.scribe ol {
	list-style: decimal;
}
.scribe a {
	text-decoration: underline;
}
.style-action .scribe a {
	color: var(--dark);
}
.scribe mark {
	background: var(--action);
	color: var(--highlight);
}
.style-action .scribe mark {
	background: var(--highlight);
	color: var(--action);
}
.scribe-nomargin h2 {
	margin-bottom: 0;
}
@media (min-width: 768px) {
	.scribe {
		font-size: 1.125rem;
	}
	.scribe h1 {
		font-size: 2.5rem;
	}
	.scribe h2 {
		font-size: 2rem;
	}
	.scribe h3 {
		font-size: 1.75rem;
	}
}

/* Page header: logos float over the first block, like v1 */
.page {
	position: relative;
	min-height: 100vh;
	padding-bottom: 6rem;
}
.page-header {
	position: absolute;
	inset: 0 0 auto;
	z-index: 50;
	pointer-events: none;
	display: flex;
	max-width: 80rem;
	margin-inline: auto;
	padding: 1rem 1rem 0;
}
.page-header img {
	max-height: 4rem;
	width: auto;
}
.page-header > :last-child:not(:first-child) {
	margin-left: auto;
}
.page-header a {
	pointer-events: auto;
}
.page-footer {
	position: absolute;
	inset: auto 0 0;
	padding-block: 2rem;
	text-align: center;
	font-family: system-ui, sans-serif;
	font-weight: 500;
	color: #581c87;
}
.page-footer a {
	text-decoration: none;
}
.page-footer a:hover {
	text-decoration: underline;
}

/* Text (py-8 md:py-16) */
.block-text {
	padding-block: 2rem;
}
@media (min-width: 768px) {
	.block-text {
		padding-block: 4rem;
	}
}

/* Shared headings: text-2xl xl:text-3xl, mb-4 */
.block-heading {
	margin-bottom: 1rem;
	font-size: 1.5rem;
	line-height: 2rem;
}
@media (min-width: 1280px) {
	.block-heading {
		font-size: 1.875rem;
		line-height: 2.25rem;
	}
}

/* Image with caption pill */
.media {
	position: relative;
}
.media-img {
	width: 100%;
	border-radius: 0.25rem;
	box-shadow:
		0 4px 6px -1px rgb(0 0 0 / 0.1),
		0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.caption {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	max-width: calc(100% - 1rem);
	padding: 0.25rem 1rem;
	border-radius: 0.25rem;
	background: rgb(0 0 0 / 0.6);
	color: #fff;
	font-size: 0.75rem;
	line-height: 1rem;
}

/* Banner: image in flow at a fixed crop per breakpoint; text centred over it */
.block-banner {
	position: relative;
}
.banner-img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
.banner-overlay {
	position: absolute;
	inset: 0;
	opacity: 0.3;
	background: inherit;
}
.banner-text {
	position: relative;
	display: flex;
	align-items: center;
}
.has-image .banner-text {
	position: absolute;
	inset: 0;
}
.banner-text .wrap-4xl {
	padding-block: 8rem;
	text-align: center;
}
.banner-heading {
	margin-bottom: 0.5rem;
	font-size: 1.5rem;
	line-height: 2rem;
}
.banner-sub {
	font-family: var(--font-body);
	font-size: 1.125rem;
	line-height: 1.75rem;
}
@media (min-width: 480px) {
	.banner-img {
		aspect-ratio: 768 / 480;
	}
}
@media (min-width: 768px) {
	.banner-img {
		aspect-ratio: 2 / 1;
	}
	.banner-heading {
		font-size: 1.875rem;
		line-height: 2.25rem;
	}
	.banner-sub {
		font-size: 1.25rem;
	}
}
@media (min-width: 1024px) {
	.banner-heading {
		font-size: 2.25rem;
		line-height: 2.5rem;
	}
	.banner-sub {
		font-size: 1.5rem;
		line-height: 2rem;
	}
}
@media (min-width: 1280px) {
	.banner-img {
		aspect-ratio: 1440 / 640;
	}
	.banner-heading {
		font-size: 3rem;
		line-height: 1;
	}
	.banner-sub {
		font-size: 1.875rem;
		line-height: 2.25rem;
	}
}
@media (min-width: 1440px) {
	.banner-img {
		aspect-ratio: 1920 / 720;
	}
}

/* Full-screen image */
.block-fullimage {
	height: 100vh;
	overflow: hidden;
	background: #f3f4f6;
}
.fullimage-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Split (boxed): max-w-7xl, py-8 md:py-16, halves side by side from lg */
.split {
	max-width: 80rem;
	margin-inline: auto;
	padding-block: 2rem;
	display: flex;
	flex-direction: column;
}
.split.image-below {
	flex-direction: column-reverse;
}
.split-media {
	padding-inline: 1rem;
}
.split-text {
	padding: 1rem;
}
@media (min-width: 768px) {
	.split {
		padding-block: 4rem;
	}
}
@media (min-width: 1024px) {
	.split,
	.split.image-below {
		flex-direction: row;
	}
	.split.image-right {
		flex-direction: row-reverse;
	}
	.split-media,
	.split-text {
		width: 50%;
	}
	.split-text {
		align-self: center;
	}
}

/* Half and half (full bleed) */
.half {
	display: flex;
	flex-direction: column;
}
.half.image-below {
	flex-direction: column-reverse;
}
.half-media {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}
.half-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.half-text {
	padding: 1rem;
	margin-block: auto;
}
.half-text-inner {
	max-width: 48rem;
	margin-inline: auto;
}
@media (min-width: 768px) {
	.half-media {
		aspect-ratio: 4 / 3;
	}
}
@media (min-width: 1024px) {
	.half,
	.half.image-below {
		flex-direction: row;
		align-items: center;
	}
	.half.image-right {
		flex-direction: row-reverse;
	}
	.half-media {
		width: 50%;
		align-self: stretch;
		aspect-ratio: auto;
		min-height: 100vh;
	}
	.half-text {
		width: 50%;
		padding-inline: 2rem;
	}
	.half-text-inner {
		max-width: 36rem;
	}
}

/* Carousel: native scroll-snap, no JS */
.block-carousel {
	padding: 2rem 0.25rem;
}
.carousel {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 0.5rem calc((100% - min(100%, 56rem)) / 2 + 0.5rem);
	scrollbar-width: thin;
}
.slide {
	flex: 0 0 min(100% - 1rem, 55rem);
	scroll-snap-align: center;
}
.slide .media-img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
.keep-size .slide .media-img {
	aspect-ratio: auto;
}

/* Button ("Action" in v1): py-16 xl:py-32, centred */
.action {
	padding-block: 4rem;
	text-align: center;
}
.action-heading {
	margin-bottom: 2rem;
	font-size: 1.875rem;
	line-height: 2.25rem;
}
@media (min-width: 1280px) {
	.action {
		padding-block: 8rem;
	}
	.action-heading {
		font-size: 2.25rem;
		line-height: 2.5rem;
	}
}
.btn {
	display: inline-block;
	padding: 1rem 2rem;
	border: 0;
	border-radius: 0.375rem;
	box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	background: var(--action);
	color: var(--highlight);
	transition:
		transform 0.2s,
		box-shadow 0.2s;
}
.btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.style-action .btn {
	background: var(--highlight);
	color: var(--action);
}

/* Video */
.video {
	width: 100%;
	border-radius: 0.25rem;
	overflow: hidden;
	box-shadow:
		0 20px 25px -5px rgb(0 0 0 / 0.1),
		0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.video iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* Chart (v1: white card, chart then legend of value + label) */
.block-chart {
	padding-block: 4rem;
}
.chart {
	padding-top: 1rem;
}
.bars {
	display: flex;
	align-items: flex-end;
	gap: 0.5rem;
	height: 15rem;
}
.bar {
	flex: 1;
	border-radius: 0.375rem 0.375rem 0 0;
}
.pie {
	display: block;
	width: 24rem;
	max-width: 100%;
	margin-inline: auto;
}
.chart-legend {
	list-style: none;
	padding: 1rem 0 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1rem;
	color: #475569;
}
.chart-legend li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.swatch {
	width: 2rem;
	height: 2rem;
	border-radius: 0.375rem;
	flex: none;
}
.swatch.round {
	border-radius: 50%;
}
.legend-value {
	display: block;
	font-size: 0.75rem;
	line-height: 1;
	color: #94a3b8;
}
.legend-label {
	display: block;
}

/* Form ("Response" in v1): white card on the block colour */
.block-form {
	padding-block: 4rem;
}
.form-card {
	padding: 1rem;
	border-radius: 0.75rem;
	background: var(--light);
	color: var(--dark);
	box-shadow:
		0 10px 15px -3px rgb(0 0 0 / 0.1),
		0 4px 6px -4px rgb(0 0 0 / 0.1);
}
@media (min-width: 768px) {
	.form-card {
		padding: 2rem;
	}
}
@media (min-width: 1280px) {
	.form-card {
		padding: 3rem;
	}
}
.flya-form {
	display: grid;
	gap: 1.25rem;
	margin-top: 1.5rem;
}
.flya-form fieldset {
	border: 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}
.flya-form legend {
	font-size: 1.125rem;
	margin-bottom: 0.5rem;
}
.flya-form label {
	display: grid;
	gap: 0.3rem;
}
.flya-form label.option {
	display: flex;
	gap: 0.6rem;
	align-items: center;
}
.flya-form input:not([type="radio"]),
.flya-form textarea {
	font: inherit;
	font-size: 16px;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #111827;
}
.flya-form .hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Password gate & messages */
.password-gate {
	max-width: 22rem;
	margin: 20vh auto;
	padding: 1rem;
}
.password-gate h1 {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}
.password-gate .flya-form {
	margin-top: 1rem;
}
.error {
	color: #b00020;
	font-weight: 600;
}
