/*
  Design tokens translated from the original WordPress theme's theme.json.
  Link/footer colors are darkened slightly from the theme's raw brand blue
  (#2681c4) to meet WCAG AA contrast (4.5:1) for text use; the original
  brand blue is kept as --color-primary for non-text/decorative use.
*/

@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/assets/fonts/roboto-v29-latin-regular.woff2") format("woff2");
}

@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("/assets/fonts/roboto-v29-latin-500.woff2") format("woff2");
}

:root {
	/* Colors */
	--color-primary: #2681c4;
	--color-primary-dark: #247bbb; /* footer/button-on-primary backgrounds: passes AA for white text */
	--color-link: #2274b1; /* darkened from --color-primary to pass AA on body background */
	--color-secondary: #6862f6;
	--color-base: #01382e;
	--color-base-dark: #012a22;
	--color-white: #ffffff;
	--color-black: #000000;
	--color-border: #a2a2a2;
	--color-bg: #f1f5ff;

	/* Spacing scale */
	--space-1: 1rem;
	--space-2: 1.5rem;
	--space-3: 1.75rem;
	--space-4: 2rem;
	--space-5: 3rem;
	--space-6: 5rem;

	/* Layout */
	--content-width: 1200px;

	/* Typography */
	--font-body: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
	--font-size-small: 1rem;
	--font-size-medium: 1.125rem;
	--font-size-large: clamp(1.5rem, 3vw, 1.75rem);
	--font-size-title: clamp(2rem, 3vw, 3rem);
	--line-height-body: 1.7;
	--line-height-heading: 1.3;
	--line-height-page-title: 1.1;

	/* Breakpoints (used in media queries below; custom properties kept for reference) */
	--breakpoint-sm: 599px;
	--breakpoint-lg: 999px;
}

/* Reset */

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

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

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

body {
	margin: 0;
	background-color: var(--color-bg);
	color: var(--color-base);
	font-family: var(--font-body);
	font-size: var(--font-size-medium);
	line-height: var(--line-height-body);
}

img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

/* Skip link */

.skip-link {
	position: absolute;
	top: -100%;
	left: var(--space-2);
	z-index: 100;
	padding: var(--space-1) var(--space-2);
	background: var(--color-base);
	color: var(--color-white);
	text-decoration: none;
	border-radius: 0 0 4px 4px;
}

.skip-link:focus {
	top: 0;
}

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

/* Typography */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-body);
	font-weight: 600;
	line-height: var(--line-height-heading);
	margin: var(--space-4) 0 0;
}

h1 {
	font-size: var(--font-size-title);
	line-height: var(--line-height-page-title);
}

h2 {
	font-size: var(--font-size-large);
}

h3 {
	font-size: clamp(1.3rem, 3vw, 1.65rem);
}

p {
	margin: var(--space-1) 0 0;
}

:is(p, h2, h3, h4, h5, h6):first-child {
	margin-top: 0;
}

a {
	color: var(--color-link);
	text-decoration: none;
}

a:hover,
a:focus {
	color: var(--color-secondary);
	text-decoration: underline;
}

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

ul {
	padding-left: 1.25em;
}

.content li + li {
	margin-top: var(--space-1);
}

/* Layout helpers */

.container {
	max-width: var(--content-width);
	margin-inline: auto;
	padding-inline: var(--space-2);
}

.wide {
	max-width: var(--content-width);
	margin-inline: auto;
	padding-inline: var(--space-2);
}

main {
	display: block;
}

/* Page hero (header + title, shared white background) */

.page-hero {
	background-color: var(--color-white);
}

.page-hero h1 {
	margin-top: calc(var(--space-4) / 3);
	padding-bottom: var(--space-2);
}

/* Header */

.site-header {
	padding: var(--space-2);
}

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

.site-logo {
	/* the logo mark has a sliver of transparent padding baked into the
	   source image; nudge it left so its visible edge lines up with text below */
	margin-left: -6px;
}

.site-logo img {
	width: 100%;
	max-width: 280px;
	height: auto;
}

@media (min-width: 600px) {
	.site-logo img {
		max-width: 380px;
	}
}

/* Primary nav */

.primary-nav__list {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav__list a {
	color: var(--color-base);
	font-weight: 600;
	text-decoration: none;
	padding-bottom: 2px;
}

.primary-nav__list a:hover,
.primary-nav__list a:focus,
.primary-nav__list a[aria-current="page"] {
	color: var(--color-link);
	padding-bottom: 0;
	border-bottom: 2px solid var(--color-link);
	text-decoration: none;
}

.nav-toggle {
	display: none;
}

/* Page title accent bar (decorative — matches the original theme's colored
   divider beneath the page title; intentionally carries no text) */

.page-title-bar {
	background-color: var(--color-primary);
	height: calc(var(--space-1) * 2);
}

/* Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	background-color: var(--color-primary-dark);
	color: var(--color-white);
	font-weight: 400;
	font-size: var(--font-size-medium);
	padding: 0.75em 1.5em;
	border-radius: 6px;
	border: 1px solid transparent;
	text-decoration: none;
}

.btn:hover,
.btn:focus {
	background-color: #1d6499;
	color: var(--color-white);
	text-decoration: underline;
}

.btn-group {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-top: var(--space-2);
}

/* Content */

.content {
	max-width: var(--content-width);
	margin-inline: auto;
	padding: 0 var(--space-2) var(--space-6);
}

.rounded-photo {
	border-radius: 10px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
}

.media-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-4);
	align-items: center;
	margin-top: var(--space-4);
}

.media-row > * {
	min-width: 0;
}

.media-row + .media-row {
	margin-top: var(--space-5);
}

.hero-card {
	background-color: var(--color-white);
	border-radius: 16px;
	padding: var(--space-4);
	margin-top: var(--space-4);
}

.media-row--compact {
	grid-template-columns: 1fr 2fr;
}

@media (max-width: 999px) {
	.media-row,
	.media-row--compact {
		grid-template-columns: 1fr;
	}

	.hero-card .media-row__media {
		order: -1;
	}
}

.icon-link-list {
	list-style: none;
	margin: var(--space-3) 0 0;
	padding: 0;
	display: grid;
	gap: var(--space-2);
}

.icon-link {
	display: flex;
	align-items: center;
	gap: var(--space-1);
	font-size: var(--font-size-medium);
	font-weight: 600;
}

.icon-link svg {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	fill: var(--color-base);
}

/* Footer */

.site-footer {
	background-color: var(--color-primary-dark);
	color: var(--color-white);
	margin-top: var(--space-5);
	padding: var(--space-2);
}

.site-footer__inner {
	max-width: var(--content-width);
	margin-inline: auto;
	text-align: left;
}

.site-footer a {
	color: var(--color-white);
}

/* Back to top button: a circular ring that fills as the page is scrolled */

.back-to-top {
	--scroll-progress: 0%;
	position: fixed;
	right: 25px;
	bottom: 25px;
	width: 4rem;
	height: 4rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: conic-gradient(
		var(--color-secondary) 0%,
		var(--color-secondary) var(--scroll-progress),
		var(--color-primary) var(--scroll-progress),
		var(--color-primary) 100%
	);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
	.back-to-top {
		transition: none;
	}
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
}

.back-to-top__inner {
	width: 75%;
	height: 75%;
	border-radius: 50%;
	background-color: var(--color-white);
	display: flex;
	align-items: center;
	justify-content: center;
}

.back-to-top svg {
	width: 45%;
	height: auto;
	fill: var(--color-primary);
	transition: fill 0.2s ease;
}

.back-to-top:hover svg,
.back-to-top:focus-visible svg {
	fill: var(--color-secondary);
}

/* Responsive nav: hamburger dropdown on tablet and mobile */

@media (max-width: 999px) {
	.site-header__inner {
		position: relative;
	}

	.nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		border: 1px solid var(--color-border);
		border-radius: 6px;
		background: var(--color-white);
		cursor: pointer;
	}

	.nav-toggle svg {
		width: 22px;
		height: 22px;
	}

	/* Take the nav out of the header's flex flow entirely so it doesn't
	   claim a share of justify-content:space-between — otherwise the
	   toggle button ends up short of the true right edge. */
	.primary-nav {
		display: contents;
	}

	.primary-nav__list {
		position: absolute;
		top: calc(100% + 8px);
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: var(--space-1);
		width: max-content;
		min-width: 220px;
		max-width: calc(100vw - var(--space-2) * 2);
		margin-top: 0;
		padding: var(--space-2);
		background-color: var(--color-white);
		border: 1px solid var(--color-border);
		border-radius: 8px;
		box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-6px);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
		z-index: 60;
	}

	@media (prefers-reduced-motion: reduce) {
		.primary-nav__list {
			transition: none;
		}
	}

	.primary-nav.is-open .primary-nav__list {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.btn-group {
		flex-direction: column;
		align-items: flex-start;
	}
}
