@layer reset, base, layout, components, utilities;

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

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

	body,
	h1,
	h2,
	h3,
	h4,
	p,
	figure,
	blockquote,
	dl,
	dd {
		margin: 0;
	}

	ul[role="list"],
	ol[role="list"] {
		list-style: none;
	}

	img,
	picture,
	svg,
	video {
		display: block;
		max-width: 100%;
	}

	img {
		height: auto;
	}

	button,
	input,
	select,
	textarea {
		font: inherit;
	}
}

@layer base {
	:root {
		--wpdev-header-height: 5rem;
		--wpdev-border-color: var(--wp--preset--color--border, #d9dee7);
		--wpdev-focus-color: var(--wp--preset--color--primary, #2457d6);
		--wpdev-shadow: 0 1rem 2.5rem rgb(15 23 42 / 8%);
	}

	body {
		background: var(--wp--preset--color--background, #fff);
		color: var(--wp--preset--color--foreground, #172033);
		font-family: var(--wp--preset--font-family--system, system-ui, sans-serif);
		font-size: 1rem;
		line-height: 1.6;
	}

	a {
		color: var(--wp--preset--color--primary, #2457d6);
		text-decoration-thickness: 0.08em;
		text-underline-offset: 0.18em;
	}

	a:hover {
		text-decoration-thickness: 0.13em;
	}

	:focus-visible {
		outline: 0.1875rem solid var(--wpdev-focus-color);
		outline-offset: 0.1875rem;
	}

	button,
	input,
	select,
	textarea {
		border: 1px solid var(--wpdev-border-color);
		border-radius: 0.25rem;
	}

	button {
		cursor: pointer;
	}

	input,
	select,
	textarea {
		max-width: 100%;
		padding: 0.7rem 0.85rem;
	}

	textarea {
		min-height: 8rem;
		resize: vertical;
	}
}

@layer layout {
	.site {
		display: grid;
		min-height: 100vh;
		grid-template-rows: auto 1fr auto;
	}

	.site-container {
		width: min(100% - 2rem, var(--wp--style--global--wide-size, 75rem));
		margin-inline: auto;
	}

	.site-main {
		padding-block: clamp(3rem, 7vw, 6rem);
	}

	.entry,
	.page-header,
	.no-results,
	.error-404 {
		width: min(100%, var(--wp--style--global--content-size, 45rem));
		margin-inline: auto;
	}

	.entry-grid {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
		gap: clamp(1.5rem, 4vw, 2.5rem);
		margin-top: 2.5rem;
	}

	.entry-content > .alignwide {
		width: min(var(--wp--style--global--wide-size, 75rem), calc(100vw - 2rem));
		max-width: none;
		margin-inline: 50%;
		transform: translateX(-50%);
	}

	.entry-content > .alignfull {
		width: 100vw;
		max-width: none;
		margin-inline: 50%;
		transform: translateX(-50%);
	}
}

@layer components {
	.site-header {
		position: relative;
		z-index: 20;
		border-bottom: 1px solid var(--wpdev-border-color);
		background: var(--wp--preset--color--background, #fff);
	}

	.site-header__inner {
		display: flex;
		min-height: var(--wpdev-header-height);
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		gap: 1.5rem;
	}

	.custom-logo {
		width: auto;
		max-height: 3.25rem;
	}

	.site-branding__name {
		color: inherit;
		font-size: 1.25rem;
		font-weight: 700;
		text-decoration: none;
	}

	.site-header__menu-toggle {
		display: none;
		align-items: center;
		gap: 0.6rem;
		padding: 0.55rem 0.75rem;
		border-color: var(--wpdev-border-color);
		background: transparent;
		color: inherit;
	}

	html.has-js .site-header__menu-toggle {
		display: inline-flex;
	}

	.site-header__menu-icon,
	.site-header__menu-icon::before,
	.site-header__menu-icon::after {
		display: block;
		width: 1.25rem;
		height: 0.125rem;
		background: currentcolor;
		content: "";
	}

	.site-header__menu-icon {
		position: relative;
	}

	.site-header__menu-icon::before,
	.site-header__menu-icon::after {
		position: absolute;
		left: 0;
	}

	.site-header__menu-icon::before {
		top: -0.375rem;
	}

	.site-header__menu-icon::after {
		top: 0.375rem;
	}

	.site-header__navigation {
		width: 100%;
		padding-bottom: 1rem;
	}

	html.has-js .site-header__navigation {
		display: none;
	}

	html.has-js .site-header.is-menu-open .site-header__navigation {
		display: block;
	}

	.primary-menu,
	.primary-menu .sub-menu,
	.footer-menu {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.primary-menu a,
	.footer-menu a {
		display: block;
		color: inherit;
		text-decoration: none;
	}

	.primary-menu a {
		padding: 0.65rem 0;
	}

	.primary-menu .sub-menu {
		padding-left: 1rem;
	}

	.entry-header,
	.page-header {
		margin-bottom: 2rem;
	}

	.entry-title,
	.page-title {
		text-wrap: balance;
	}

	.entry-meta {
		margin-top: 0.5rem;
		color: var(--wp--preset--color--muted, #5f6b7a);
		font-size: 0.9rem;
	}

	.entry-meta a {
		color: inherit;
	}

	.entry-media {
		display: block;
		margin-bottom: 2rem;
		overflow: hidden;
	}

	.entry-content > * + *,
	.entry-summary > * + * {
		margin-top: 1.25em;
	}

	.entry-content :where(ul, ol) {
		padding-left: 1.25em;
	}

	.entry-content blockquote {
		padding-left: 1.25rem;
		border-left: 0.25rem solid var(--wp--preset--color--primary, #2457d6);
	}

	.entry-card {
		border: 1px solid var(--wpdev-border-color);
		background: var(--wp--preset--color--surface, #f5f7fa);
	}

	.entry-card .entry-media {
		margin: 0;
		aspect-ratio: 16 / 9;
	}

	.entry-card .entry-media img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.entry-card__body {
		padding: 1.5rem;
	}

	.entry-card .entry-header {
		margin-bottom: 1rem;
	}

	.entry-card .entry-title {
		font-size: 1.35rem;
	}

	.entry-card .entry-title a {
		color: inherit;
		text-decoration: none;
	}

	.navigation.pagination,
	.post-navigation {
		margin-top: 3rem;
	}

	.nav-links {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: 1rem;
	}

	.page-numbers {
		padding: 0.35rem 0.65rem;
	}

	.nav-subtitle,
	.nav-title {
		display: block;
	}

	.nav-subtitle {
		color: var(--wp--preset--color--muted, #5f6b7a);
		font-size: 0.8rem;
		text-transform: uppercase;
		letter-spacing: 0.06em;
	}

	.error-404 {
		text-align: center;
	}

	.error-404__code {
		color: var(--wp--preset--color--primary, #2457d6);
		font-size: clamp(4rem, 16vw, 9rem);
		font-weight: 800;
		line-height: 0.9;
	}

	.error-404 .page-title,
	.error-404 p,
	.error-404 .wp-element-button {
		margin-top: 1.5rem;
	}

	.site-footer {
		padding-block: 2rem;
		border-top: 1px solid var(--wpdev-border-color);
	}

	.site-footer__inner,
	.footer-menu {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 1rem 1.5rem;
	}

	.site-footer__copyright {
		color: var(--wp--preset--color--muted, #5f6b7a);
		font-size: 0.9rem;
	}

	@media (min-width: 64rem) {
		.site-header__inner {
			flex-wrap: nowrap;
		}

		.site-header__navigation,
		html.has-js .site-header__navigation {
			display: block;
			width: auto;
			padding: 0;
		}

		html.has-js .site-header__menu-toggle {
			display: none;
		}

		.primary-menu {
			display: flex;
			align-items: center;
			gap: 1.5rem;
		}

		.primary-menu li {
			position: relative;
		}

		.primary-menu > li > a {
			padding-block: 1.75rem;
		}

		.primary-menu .sub-menu {
			position: absolute;
			top: 100%;
			left: 0;
			display: none;
			min-width: 14rem;
			padding: 0.6rem;
			border: 1px solid var(--wpdev-border-color);
			background: var(--wp--preset--color--background, #fff);
			box-shadow: var(--wpdev-shadow);
		}

		.primary-menu .sub-menu .sub-menu {
			top: 0;
			left: 100%;
		}

		.primary-menu li:hover > .sub-menu,
		.primary-menu li:focus-within > .sub-menu {
			display: block;
		}

		.primary-menu .sub-menu a {
			padding: 0.55rem 0.75rem;
		}
	}
}

@layer utilities {
	.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 {
		top: 0.5rem;
		left: 0.5rem;
		z-index: 100000;
		width: auto;
		height: auto;
		padding: 0.75rem 1rem;
		clip: auto;
		background: #fff;
		color: #111;
		font-weight: 700;
		white-space: normal;
	}

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

		*,
		*::before,
		*::after {
			scroll-behavior: auto !important;
			transition-duration: 0.01ms !important;
			animation-duration: 0.01ms !important;
			animation-iteration-count: 1 !important;
		}
	}
}
