/* Public header, footer and shared design tokens. */
:root {
	--color-ink: #33302e;
	--color-orange: var(--welmana-brand-orange);
	--color-pale-green: var(--welmana-green-soft);
	--color-pale-peach: var(--welmana-orange-soft);
	--content-width: 62.5rem;
	--page-inline: max(1.5rem, calc((100% - var(--content-width)) / 2));
	--font-sans: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

.site-header {
	position: var(--welmana-header-position);
	top: var(--welmana-header-top);
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding-inline: max(1.5rem, calc((100% - var(--content-width)) / 2));
	padding-block: 0.75rem;
	min-height: 6rem;
	border-bottom: 1px solid var(--welmana-brand-green);
	color: var(--color-ink);
	background: #fff;
}

.site-header__logo {
	display: block;
	flex-shrink: 0;
}

.site-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 53.25rem;
	max-width: 100%;
	gap: 4rem;
}

.site-header__logo-image {
	display: block;
	width: auto;
	height: var(--welmana-logo-height);
	max-width: 100%;
}

.global-nav, .global-nav__list {
	display: flex;
	align-items: center;
}

.public-header-actions {
	display: flex;
	align-items: center;
	min-width: 0;
	gap: 1.5rem;
}

.public-menu summary {
	font-size: 0.875rem;
}

.public-menu[open] > summary {
	display: none;
}

.global-nav__link {
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.5;
	text-decoration: none;
}

.button-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.625rem 1.25rem;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	background: var(--color-orange);
	border-radius: 62.4375rem;
}

.button-link--member {
	flex-shrink: 0;
	white-space: nowrap;
}

.site-footer {
	width: 100%;
	padding: 2.75rem var(--page-inline);
	color: #fff;
	background: var(--welmana-brand-green);
}

.site-footer__menu {
	margin-top: 1.5rem;
}

.site-footer__links {
	justify-content: center;
}

.site-footer__links a {
	color: inherit;
	text-decoration: none;
}

.site-footer__links a:is(:hover, :focus, :active, :visited) {
	/* Override the later general link colors on the green footer. */
	color: #fff;
}

.site-footer__links a:is(:hover, :focus-visible) {
	text-decoration: underline;
}

.site-footer__links a:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 4px;
}

.site-footer__logo {
	font-size: 1.5rem;
	font-weight: 700;
}

.site-footer__info {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
	margin-top: 0.5rem;
}

.site-footer__description {
	flex: 1 1 30rem;
}

.site-footer__address {
	margin: 0;
	padding-inline-end: 4em;
	font-style: normal;
}

/* Keep shared chrome independent of each page's body typography and reset. */
.site-header, .site-footer {
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.8;
}

.site-header a {
	color: inherit;
}

.site-header .button-link--member {
	color: #fff;
	background: var(--welmana-brand-orange);
	border-radius: var(--welmana-nav-radius);
	transition: background-color var(--welmana-nav-transition-duration) ease;
}

.site-header .button-link--member:is(:hover, :focus-visible) {
	background: #d95511;
	text-decoration: none;
}

.global-nav__list {
	gap: 0.5rem;
	padding: 0;
	margin: 0;
	list-style: none;
}

.site-footer p {
	margin: 0;
}

.site-footer p.site-footer__copyright {
	margin-top: 1.5rem;
	font-size: 0.75rem;
	text-align: center;
}

.site-header :focus-visible {
	outline: 3px solid #19830d;
	outline-offset: 4px;
}

/* Keep labels on one line by opening a panel before the header gets crowded. */
@media (max-width: 68.75em) {
	.site-header {
		min-height: 0;
		padding: 0;
	}

	.site-header__inner {
		width: min(53.25rem, calc(100% - 3rem));
		margin: auto;
		gap: 1.5rem;
		padding-block: 0.5rem;
	}

	.site-header__logo {
		/* Retain the desktop size until the adjacent controls need the space. */
		width: var(--welmana-logo-width);
		min-width: 0;
		flex-shrink: 1;
	}

	.site-header__logo-image {
		width: 100%;
		height: auto;
	}

	.public-header-actions {
		flex-shrink: 0;
		margin-left: auto;
		gap: 0.5rem;
	}

	.public-menu summary {
		font-size: 1rem;
		line-height: normal;
	}

	.site-header .button-link--member {
		padding-inline: 0.875rem;
		font-size: 0.875rem;
	}

	.public-menu[open] > summary {
		display: list-item;
	}

	.public-menu[open] > .global-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: block;
		max-height: 75vh;
		max-height: min(75vh, calc(100dvh - var(--welmana-header-offset, 8rem) - 1rem));
		overflow-y: auto;
		padding: 0.75rem;
		background: #fff;
		border: 1px solid var(--welmana-line);
		border-radius: var(--welmana-nav-panel-radius);
		box-shadow: var(--welmana-nav-panel-shadow);
	}

	.global-nav__list {
		display: grid;
		gap: 0.25rem;
	}

	.global-nav__link {
		display: flex;
		padding-block: 0.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header .button-link--member {
		transition: none;
	}
}

@media (max-width: 43.75em) {
	:root {
		--page-inline: 0.9375rem;
	}

	.site-header {
		min-height: 4.375rem;
	}

	.site-header__inner {
		min-height: 4.375rem;
		column-gap: 0.75rem;
	}

	.public-header-actions {
		max-width: 100%;
	}

	.public-menu summary {
		font-size: 0.875rem;
	}

	.site-header .button-link--member {
		padding-inline: 0.5rem;
	}

	.site-footer {
		padding: 1.75rem var(--page-inline);
	}

}
