/* ==========================================================================
   Blokk CRE base styles: tokens, fonts, reset, typography, buttons,
   header, mobile menu, footer. Block styles live in each /blocks folder.
   Breakpoints (min-width): 640 / 768 / 1024 / 1280 / 1536.
   ========================================================================== */

@font-face {
	font-family: "Satoshi";
	font-weight: 200;
	font-display: swap;
	src: url("../fonts/Satoshi-Light.woff2") format("woff2"), url("../fonts/Satoshi-Light.woff") format("woff");
}

@font-face {
	font-family: "Satoshi";
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/Satoshi-Regular.woff2") format("woff2"), url("../fonts/Satoshi-Regular.woff") format("woff");
}

@font-face {
	font-family: "Satoshi";
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/Satoshi-Bold.woff2") format("woff2"), url("../fonts/Satoshi-Bold.woff") format("woff");
}

:root {
	--green: #323f32;
	--green-dark: #1e261e;
	--green-darker: #192019;
	--green-mid: #475647;
	--sage: #93aa93;
	--sage-dark: #5f785f;
	--sage-light: #e9ede9;
	--offwhite: #edeee9;
	--stone: #d3d6c9;
	--khaki: #b9bdaa;
	--btn-white-hover: #bebeba;
	--text-body: oklch(37.3% 0.034 259.733);
	--closed: rgb(188 11 0 / 0.7);
	--tag-bg: rgb(204 215 204 / 0.7);
	--font-sans: "Satoshi", ui-sans-serif, system-ui, sans-serif;
	--font-label: "commuters-sans", "Satoshi", ui-sans-serif, sans-serif;
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	--shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
	--wrap: 1396px;
	--wrap-content: 1271px;
	--wrap-team: 80rem;
	--cut-hex: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0 100%, 0 0);
	--cut-left: polygon(20% 0%, 100% 0, 100% 20%, 100% 80%, 100% 100%, 20% 100%, 0% 80%, 0% 20%);
}

/* ---------- Reset (subset of the original preflight) ---------- */

*,
::before,
::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 0 solid;
}

html {
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
	font-family: var(--font-sans);
	background-color: var(--offwhite);
	scroll-behavior: smooth;

	@media (prefers-reduced-motion: reduce) {
		scroll-behavior: auto;
	}
}

body {
	background-color: var(--offwhite);
	color: inherit;
	line-height: inherit;
}

h1, h2, h3, h4, h5, h6 {
	font-size: inherit;
	font-weight: inherit;
}

a {
	color: inherit;
	text-decoration: inherit;
}

ol, ul, menu {
	list-style: none;
}

img, svg, video, canvas, iframe {
	display: block;
	vertical-align: middle;
}

img, video {
	max-width: 100%;
	height: auto;
}

button, input, select, textarea {
	font: inherit;
	color: inherit;
	letter-spacing: inherit;
	background-color: transparent;
	border-radius: 0;
}

button {
	cursor: pointer;
}

address {
	font-style: normal;
}

section[id],
div[id] {
	scroll-margin-top: 8rem;
}

[hidden]:where(:not([hidden="until-found"])) {
	display: none !important;
}

:focus-visible {
	outline: 2px solid var(--sage);
	outline-offset: 2px;
}

/* ---------- Utilities ---------- */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: var(--offwhite);
	color: var(--green);
	font-family: var(--font-label);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;

	&:focus {
		top: 1rem;
	}
}

.tag {
	font-family: var(--font-label);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;
}

.pre-line {
	white-space: pre-line;
}

/* ---------- Buttons ---------- */

.btn,
.btn-txt {
	display: inline-block;
	font-family: var(--font-label);
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	line-height: 1;
	letter-spacing: 3px;
	cursor: pointer;
}

.btn {
	padding: 0.5rem 1rem;
	transition: background-color 0.15s;
}

.btn-white {
	background-color: var(--offwhite);
	color: var(--green);

	&:hover {
		background-color: var(--btn-white-hover);
	}
}

.btn-green {
	background-color: var(--green);
	color: var(--offwhite);

	&:hover {
		background-color: var(--green-dark);
	}
}

.btn-txt-green {
	color: var(--sage-dark);

	&:hover {
		color: var(--green-dark);
		text-decoration: underline;
	}
}

/* ---------- Shared section shapes ---------- */

.triangle-up {
	width: 14rem;
	height: 6rem;
	margin: -4rem auto 0;
	background-color: var(--offwhite);
	clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.triangle-corner {
	display: none;
	width: 8rem;
	height: 8rem;
	margin-top: -8rem;
	background-color: var(--offwhite);
	clip-path: polygon(0 0, 0% 100%, 100% 100%);

	@media (min-width: 1280px) {
		display: block;
	}
}

/* Zero specificity so block styles (e.g. an absolutely positioned hero image) always win. */
:where(.cut-img) {
	position: relative;
	overflow: hidden;

	& > img {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}
}

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	width: 100%;
	pointer-events: none;

	& > * {
		pointer-events: auto;
	}
}

.admin-bar .site-header {
	@media (min-width: 601px) {
		top: 46px;
	}

	@media (min-width: 783px) {
		top: 32px;
	}
}

.site-header__bar {
	padding-block: 1.5rem;
	transition: background-color 0.25s, box-shadow 0.25s;

	@media (min-width: 1024px) {
		padding-block: 2.5rem;
	}

	.header-solid & {
		background-color: var(--green);
	}

	.site-header.is-sticky & {
		background-color: var(--green);
		box-shadow: var(--shadow-lg);
	}
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: 1rem;
}

.site-header__logo {
	position: relative;
	width: 100%;

	@media (min-width: 768px) {
		width: 16.6667%;
	}

	@media (min-width: 1024px) {
		width: 25%;
	}

	/* The logo is at most 180px wide and shrinks with its column, so the menu never overlaps it. */
	a {
		display: block;
		width: 11.25rem;
		max-width: 100%;
		margin-inline: auto;
		color: var(--offwhite);

		@media (min-width: 768px) {
			margin-inline: 0;
		}
	}

	img {
		width: 100%;
	}
}

/* Desktop navigation */

.desktop-nav {
	display: none;
	align-items: center;
	width: 83.3333%;
	font-family: var(--font-label);
	text-transform: uppercase;
	letter-spacing: 0.05em;

	@media (min-width: 768px) {
		display: flex;
	}

	@media (min-width: 1024px) {
		width: 75%;
	}
}

.desktop-nav__list {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-left: auto;

	@media (min-width: 900px) {
		gap: 2rem;
	}

	@media (min-width: 1024px) {
		gap: 3rem;
	}
}

.desktop-nav__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: var(--offwhite);

	@media (min-width: 1024px) {
		font-size: 11px;
	}

	@media (min-width: 1280px) {
		font-size: 1rem;
	}

	& > a:hover {
		text-decoration: underline;
	}

	/* Last item (Contact) renders as a button. */
	&:last-child {
		font-size: 0.75rem;
		line-height: 1;
		letter-spacing: 3px;

		@media (min-width: 1024px) {
			font-size: 0.875rem;
		}

		& > a {
			padding: 0.5rem 1rem;
			background-color: var(--offwhite);
			color: var(--green);

			&:hover {
				background-color: var(--btn-white-hover);
				text-decoration: none;
			}
		}
	}
}

.desktop-nav__toggle {
	display: flex;
	align-items: center;
	color: inherit;

	svg {
		transition: transform 0.2s;
	}

	&[aria-expanded="true"] svg {
		transform: rotate(180deg);
	}
}

.desktop-nav__dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 10;
	min-width: 24rem;
	margin-top: 0.5rem;
	padding: 1.5rem;
	background-color: var(--offwhite);
	color: var(--green);
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	box-shadow: var(--shadow-2xl);
	clip-path: polygon(0 0, 100% 0, 100% 20%, 100% 70%, 80% 100%, 0 100%, 0% 80%, 0% 20%);
	opacity: 0;
	visibility: hidden;
	transform: scale(0.95);
	transform-origin: top left;
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;

	.is-open > & {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	li {
		margin-bottom: 0.25rem;
	}

	a {
		display: block;
		width: 100%;
		padding-block: 0.25rem;

		&:hover {
			text-decoration: underline;
		}
	}

	.header-solid & {
		background-color: #fff;
		color: #000;
	}

	.site-header.is-sticky & {
		background-color: var(--offwhite);
		color: #000;
	}
}

/* Mobile menu */

.mobile-toggle {
	position: fixed;
	inset-inline: 0;
	bottom: 2.5rem;
	z-index: 60;
	width: max-content;
	margin-inline: auto;

	@media (min-width: 768px) {
		display: none;
	}

	img {
		width: 4.5rem;
		height: auto;
	}

	.mobile-toggle__close {
		display: none;
	}

	&[aria-expanded="true"] {
		.mobile-toggle__open {
			display: none;
		}

		.mobile-toggle__close {
			display: block;
		}
	}
}

.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 55;
	margin-top: 2rem;
	overflow-y: auto;
	background-color: var(--offwhite);
	color: var(--green);
	clip-path: polygon(20% 0%, 100% 0, 100% 20%, 100% 80%, 100% 100%, 0 100%, 0% 80%, 0% 10%);
	opacity: 0;
	pointer-events: none;
	transform: scale(1.1);
	transition: transform 0.25s ease, opacity 0.25s ease;

	&.is-open {
		opacity: 1;
		pointer-events: auto;
		transform: scale(1);
	}

	&:focus {
		outline: none;
	}

	@media (min-width: 768px) {
		display: none;
	}
}

.mobile-menu__inner {
	position: relative;
	padding-bottom: 12.5rem;
}

.mobile-menu__logo {
	display: flex;
	justify-content: center;
	padding: 2.5rem 0.75rem 0;

	img {
		width: 12.5rem;
	}
}

.mobile-nav__list {
	/* No bottom padding: keeps the phone/email above the floating close button. */
	padding: 2.5rem 1.5rem 0;

	@media (min-width: 640px) {
		padding-inline: 3rem;
	}
}

.mobile-nav__item {
	width: 100%;
	padding-bottom: 2rem;
	font-size: 2.25rem;
	line-height: 2.5rem;

	@media (min-width: 640px) {
		font-size: 3rem;
		line-height: 1;
	}

	& > a {
		display: flex;
		width: 100%;
	}

	&:last-child {
		padding-bottom: 0;
	}
}

.mobile-nav__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	text-align: left;

	svg {
		width: 1.25rem;
		height: 1.25rem;
		fill: none;
		stroke: var(--green);
		transition: transform 0.25s;
	}

	&[aria-expanded="true"] svg {
		transform: rotate(180deg);
	}
}

.mobile-nav__sub {
	padding: 0.75rem 1rem;

	li {
		padding-bottom: 0.5rem;
		font-size: 1.5rem;
		line-height: 2rem;
	}

	a {
		display: flex;
		width: 100%;
	}
}

.mobile-menu__contact {
	display: flex;
	flex-wrap: wrap;
	padding: 2.5rem 3rem;
	font-family: var(--font-label);
	font-weight: 600;

	a {
		width: 100%;
		font-size: 1.125rem;
		line-height: 1.75rem;
	}
}

body.menu-open {
	overflow: hidden;
}

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

.site-footer {
	background-color: var(--green-darker);
	font-family: var(--font-label);
	color: var(--offwhite);
}

.site-footer__main {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding: 3rem 1rem 4rem;

	@media (min-width: 768px) {
		display: grid;
		grid-template-columns: repeat(12, minmax(0, 1fr));
	}
}

.site-footer__brand {
	grid-column: span 4 / span 4;

	@media (min-width: 1280px) {
		grid-column: span 6 / span 6;
	}

	img {
		width: auto;
		max-width: 11.25rem;
	}
}

.site-footer__addresses {
	padding-top: 3rem;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 600;
	text-transform: uppercase;

	address {
		padding-bottom: 1rem;
	}

	span {
		display: block;
	}
}

.site-footer__contact {
	display: flex;
	flex-wrap: wrap;
	padding-bottom: 1rem;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 600;

	a {
		&:first-child {
			width: 100%;
		}

		&:hover {
			text-decoration: underline;
		}
	}
}

.site-footer__nav {
	grid-column: span 8 / span 8;
	gap: 1rem;
	padding-top: 4rem;

	@media (min-width: 640px) {
		display: grid;
		grid-template-columns: repeat(12, minmax(0, 1fr));
	}

	@media (min-width: 768px) {
		padding-top: 0;
	}

	@media (min-width: 1024px) {
		gap: 0;
	}

	@media (min-width: 1280px) {
		grid-column: span 6 / span 6;
	}
}

.footer-menu {
	grid-column: span 3 / span 3;
	padding-bottom: 4rem;
	font-size: 0.75rem;
	line-height: 1rem;
	text-transform: uppercase;

	@media (min-width: 640px) {
		padding-bottom: 0;
	}

	a:hover {
		text-decoration: underline;
	}
}

.footer-menu__top > a {
	display: block;
	padding-bottom: 1rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: var(--khaki);
}

.footer-menu__top + .footer-menu__top {
	margin-top: 0;
}

.footer-menu__child > a {
	display: block;
	padding-bottom: 0.5rem;
	font-weight: 500;
	color: var(--offwhite);
}

.site-footer__cta {
	grid-column: span 3 / span 3;
	margin-left: auto;
}

.site-footer__bottom {
	justify-content: space-between;
	width: calc(100% - 2rem);
	max-width: calc(var(--wrap) - 2rem);
	margin-inline: auto;
	padding: 2rem 0 8rem;
	border-top: 1px solid var(--sage-dark);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--khaki);

	@media (min-width: 640px) {
		display: flex;
	}

	@media (min-width: 768px) {
		padding-bottom: 3rem;
	}
}

.site-footer__copyright {
	padding-bottom: 3rem;

	@media (min-width: 640px) {
		padding-bottom: 0;
		padding-right: 2rem;
	}
}

.site-footer__credit {
	display: flex;
	align-items: center;
	gap: 1rem;

	&:hover {
		text-decoration: underline;
	}
}

/* ---------- Message section (404, thank you) ---------- */

.message-section {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	margin-inline: auto;
	padding: 16rem 0.5rem 20rem;
	color: var(--green);
	text-align: center;
}

.message-section__inner {
	width: 100%;
}

.message-section__title {
	font-size: 3rem;
	font-weight: 700;
	line-height: 1;
}

.message-section__text {
	padding: 1.5rem 0 3rem;
	white-space: pre-line;
}

/* ---------- Editor-only placeholder ---------- */

.blokk-placeholder {
	padding: 2rem;
	border: 2px dashed var(--sage);
	color: var(--green);
	font-family: var(--font-label);
	text-align: center;
}
