/* ==========================================================================
   Futurearth design tokens
   ========================================================================== */

:root {
	/* Brand colours */
	--fe-gold-700: #9d7935;
	--fe-gold-600: #b58f42;
	--fe-gold-500: #c39b48;

	--fe-green-800: #004f2c;
	--fe-green-700: #006838;
	--fe-green-600: #087443;

	/* Neutral colours */
	--fe-heading: #202020;
	--fe-body: #565656;
	--fe-muted: #787878;
	--fe-border: #d9d1c3;
	--fe-beige: #f3efe8;
	--fe-light: #f7f7f5;
	--fe-white: #ffffff;
	--fe-black: #111111;
	--fe-error: #a61b1b;
	--fe-success: #176b3a;

	/* Typography */
	--fe-font-primary: "Poppins", Arial, sans-serif;
	--fe-font-secondary: "Poppins", Arial, sans-serif;

	/* Font sizes */
	--fe-font-xs: 0.75rem;
	--fe-font-sm: 0.875rem;
	--fe-font-base: 1rem;
	--fe-font-md: 1.125rem;
	--fe-font-lg: 1.375rem;
	--fe-font-xl: 1.75rem;
	--fe-font-2xl: 2.25rem;
	--fe-font-3xl: 3rem;
	--fe-font-4xl: 4rem;

	/* Layout */
	--fe-container-width: 1280px;
	--fe-container-narrow: 960px;
	--fe-container-padding: 24px;

	/* Spacing */
	--fe-space-1: 4px;
	--fe-space-2: 8px;
	--fe-space-3: 12px;
	--fe-space-4: 16px;
	--fe-space-5: 20px;
	--fe-space-6: 24px;
	--fe-space-8: 32px;
	--fe-space-10: 40px;
	--fe-space-12: 48px;
	--fe-space-16: 64px;
	--fe-space-20: 80px;
	--fe-space-24: 96px;

	/* Other */
	--fe-header-height: 106px;
	--fe-radius-sm: 2px;
	--fe-transition: 200ms ease;
	--fe-shadow-header: 0 4px 20px rgb(0 0 0 / 7%);
	--fe-shadow-card: 0 12px 34px rgb(0 0 0 / 8%);
}

/* ==========================================================================
   Safe reset
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	font-size: 100%;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-width: 320px;
	overflow-x: hidden;
	background: var(--fe-white);
	color: var(--fe-body);
	font-family: var(--fe-font-primary);
	font-size: var(--fe-font-base);
	font-weight: 400;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body.menu-open,
body.offcanvas-open {
	overflow: hidden;
}

/*
 * Apply responsive image rules only to actual media.
 * SVG is intentionally excluded.
 */
img,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

picture {
	display: block;
}

svg {
	display: block;
}

iframe {
	max-width: 100%;
	border: 0;
}

button,
input,
select,
textarea {
	font: inherit;
}

button {
	cursor: pointer;
}

a {
	color: inherit;
	text-decoration: none;
}

p {
	margin-top: 0;
	margin-bottom: 1.25em;
}

figure {
	margin: 0;
}

table {
	width: 100%;
	border-collapse: collapse;
}

::selection {
	background: var(--fe-gold-600);
	color: var(--fe-white);
}

/* ==========================================================================
   Base typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-top: 0;
	color: var(--fe-heading);
	font-family: var(--fe-font-secondary);
	line-height: 1.18;
}

/*
 * Only content headings receive large responsive sizes.
 * Header, footer and off-canvas headings retain their component CSS.
 */
.entry-content h1,
.page-content h1,
.fe-heading-1 {
	font-size: clamp(2.5rem, 5.5vw, 4rem);
	font-weight: 400;
}

.entry-content h2,
.page-content h2,
.fe-heading-2 {
	font-size: clamp(2rem, 3.6vw, 3rem);
	font-weight: 500;
}

.entry-content h3,
.page-content h3,
.fe-heading-3 {
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 500;
}

.entry-content h4,
.page-content h4,
.fe-heading-4 {
	font-size: clamp(1.2rem, 1.8vw, 1.5rem);
	font-weight: 500;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 18px;
	clip: auto;
	overflow: visible;
	background: var(--fe-white);
	color: var(--fe-black);
	font-weight: 600;
	white-space: normal;
}

:focus-visible {
	outline: 3px solid rgb(181 143 66 / 45%);
	outline-offset: 3px;
}

/* ==========================================================================
   Theme containers
   ========================================================================== */

.fe-container {
	width: min(
		calc(100% - (var(--fe-container-padding) * 2)),
		var(--fe-container-width)
	);
	margin-inline: auto;
}

.fe-container--narrow {
	width: min(
		calc(100% - (var(--fe-container-padding) * 2)),
		var(--fe-container-narrow)
	);
	margin-inline: auto;
}

.fe-container--fluid {
	width: 100%;
	padding-inline: var(--fe-container-padding);
}

/* ==========================================================================
   Theme sections
   ========================================================================== */

.fe-section {
	padding-block: var(--fe-space-20);
}

.fe-section--large {
	padding-block: var(--fe-space-24);
}

.fe-section--compact {
	padding-block: var(--fe-space-12);
}

.fe-section--beige {
	background: var(--fe-beige);
}

.fe-section--light {
	background: var(--fe-light);
}

.fe-section--green {
	background: var(--fe-green-700);
	color: var(--fe-white);
}

/* ==========================================================================
   Theme grids
   ========================================================================== */

.fe-grid {
	display: grid;
	gap: var(--fe-space-8);
}

.fe-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fe-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fe-grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fe-grid--auto {
	grid-template-columns: repeat(
		auto-fit,
		minmax(min(100%, 260px), 1fr)
	);
}

/* ==========================================================================
   Theme buttons
   ========================================================================== */

.fe-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 46px;
	padding: 12px 26px;
	border: 1px solid transparent;
	border-radius: var(--fe-radius-sm);
	font-size: var(--fe-font-sm);
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	transition:
		background-color var(--fe-transition),
		color var(--fe-transition),
		border-color var(--fe-transition),
		transform var(--fe-transition);
}

.fe-button:hover {
	transform: translateY(-1px);
}

.fe-button--gold {
	background: var(--fe-gold-600);
	color: var(--fe-white);
}

.fe-button--gold:hover {
	background: var(--fe-gold-700);
	color: var(--fe-white);
}

.fe-button--green {
	background: var(--fe-green-700);
	color: var(--fe-white);
}

.fe-button--green:hover {
	background: var(--fe-green-800);
	color: var(--fe-white);
}

.fe-button--outline {
	border-color: var(--fe-gold-600);
	background: transparent;
	color: var(--fe-gold-700);
}

.fe-button--outline:hover {
	background: var(--fe-gold-600);
	color: var(--fe-white);
}

/* ==========================================================================
   Responsive global rules
   ========================================================================== */

@media (max-width: 1024px) {
	:root {
		--fe-container-padding: 22px;
		--fe-space-20: 64px;
		--fe-space-24: 76px;
	}

	.fe-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	:root {
		--fe-container-padding: 18px;
		--fe-space-20: 48px;
		--fe-space-24: 58px;
	}

	.fe-grid--2,
	.fe-grid--3,
	.fe-grid--4 {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}