/*
 * Held Stone Phase 2 R2-2
 * Header, mobile drawer, trust strip, and footer shell.
 * Frontend-only companion to the R2-1 design-system foundation.
 */

body.hsj-r2-shell-active .site-header,
body.hsj-r2-shell-active .site-footer {
	display: none !important;
}

body.hsj-r2-shell-active .site-content {
	background: var(--hsj-r2-bg, #FBF8F3);
}

body.hsj-r2-shell-active.hsj-r2-drawer-open {
	overflow: hidden;
}

.hsj-r2-trust-strip {
	background: var(--hsj-r2-brown, #3A2A22);
	color: #f7efe7;
	font-size: 12px;
	line-height: 1.3;
}

.hsj-r2-trust-strip .hsj-r2-container {
	min-height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: 8px;
	padding-bottom: 8px;
	text-align: center;
}

.hsj-r2-trust-strip p {
	margin: 0;
}

.hsj-r2-trust-strip__mobile {
	display: none;
}

.hsj-r2-header {
	position: relative;
	z-index: 70;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid #e8ded2;
}

.hsj-r2-header__inner {
	min-height: 78px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.hsj-r2-header__brand,
.hsj-r2-drawer__brand {
	color: var(--hsj-r2-text, #2F241C);
	font-family: "Source Serif 4", serif;
	font-size: clamp(24px, 2vw, 29px);
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none;
}

.hsj-r2-header__nav {
	margin-left: auto;
}

.hsj-r2-header__nav-list,
.hsj-r2-header__submenu-list,
.hsj-r2-drawer__list,
.hsj-r2-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hsj-r2-header__nav-list {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hsj-r2-header__nav-item {
	position: relative;
}

.hsj-r2-header__nav-item > a,
.hsj-r2-header__nav-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 14px;
	border: 0;
	background: transparent;
	color: var(--hsj-r2-text, #2F241C);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	border-radius: 999px;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.hsj-r2-header__nav-item > a:hover,
.hsj-r2-header__nav-item > a:focus,
.hsj-r2-header__nav-button:hover,
.hsj-r2-header__nav-button:focus {
	color: var(--hsj-r2-brown, #3A2A22);
	background: rgba(239, 227, 211, 0.7);
	outline: none;
}

.hsj-r2-header__nav-item--has-submenu .hsj-r2-header__nav-button::after {
	content: "";
	width: 8px;
	height: 8px;
	margin-left: 8px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-1px);
}

.hsj-r2-header__submenu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 240px;
	padding: 12px;
	border: 1px solid var(--hsj-r2-border, #E5D8C8);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 20px 44px rgba(47, 36, 28, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.hsj-r2-header__nav-item--has-submenu:hover .hsj-r2-header__submenu,
.hsj-r2-header__nav-item--has-submenu:focus-within .hsj-r2-header__submenu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.hsj-r2-header__submenu-list {
	display: grid;
	gap: 4px;
}

.hsj-r2-header__submenu-list .hsj-r2-link-list__link {
	display: block;
	padding: 10px 12px;
	border-radius: 12px;
	color: var(--hsj-r2-text, #2F241C);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.hsj-r2-header__submenu-list .hsj-r2-link-list__link:hover,
.hsj-r2-header__submenu-list .hsj-r2-link-list__link:focus {
	background: var(--hsj-r2-surface, #F5EEE4);
	color: var(--hsj-r2-brown, #3A2A22);
	outline: none;
}

.hsj-r2-header__menu-toggle {
	display: none;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid var(--hsj-r2-border, #E5D8C8);
	border-radius: 999px;
	background: #fff;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 4px;
	cursor: pointer;
}

.hsj-r2-header__menu-toggle span {
	display: block;
	width: 18px;
	height: 1.5px;
	background: var(--hsj-r2-text, #2F241C);
	border-radius: 999px;
}

.hsj-r2-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 98;
	background: rgba(25, 18, 14, 0.42);
	backdrop-filter: blur(2px);
}

.hsj-r2-drawer[aria-hidden="true"] {
	pointer-events: none;
}

.hsj-r2-drawer__panel {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 99;
	width: min(86vw, 360px);
	height: 100dvh;
	display: flex;
	flex-direction: column;
	background: #fffdf9;
	border-left: 1px solid #e8ded2;
	box-shadow: -18px 0 42px rgba(47, 36, 28, 0.14);
	transform: translateX(100%);
	transition: transform 0.22s ease;
}

.hsj-r2-drawer[aria-hidden="false"] .hsj-r2-drawer__panel {
	transform: translateX(0);
}

.hsj-r2-drawer__top {
	min-height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 18px 16px;
	border-bottom: 1px solid #eee3d6;
}

.hsj-r2-drawer__close {
	width: 42px;
	height: 42px;
	border: 1px solid var(--hsj-r2-border, #E5D8C8);
	border-radius: 999px;
	background: #fff;
	color: var(--hsj-r2-text, #2F241C);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.hsj-r2-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 18px 18px 28px;
}

.hsj-r2-drawer__group + .hsj-r2-drawer__group {
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid #eee3d6;
}

.hsj-r2-drawer__heading {
	margin: 0 0 12px;
	color: var(--hsj-r2-pill-text, #5B4537);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hsj-r2-drawer__list {
	display: grid;
	gap: 6px;
}

.hsj-r2-drawer__list a,
.hsj-r2-drawer__contact a {
	color: var(--hsj-r2-text, #2F241C);
	text-decoration: none;
}

.hsj-r2-drawer__list a {
	display: block;
	padding: 12px 14px;
	border-radius: 14px;
	background: rgba(245, 238, 228, 0.78);
}

.hsj-r2-drawer__contact p {
	margin: 0 0 8px;
	color: var(--hsj-r2-muted, #6F6258);
	line-height: 1.7;
}

.hsj-r2-footer {
	margin-top: 0;
	padding: 62px 0 0;
	background: #fffdf9;
	border-top: 1px solid #e8ded2;
	color: var(--hsj-r2-text, #2F241C);
}

.hsj-r2-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 0.9fr));
	gap: 28px;
}

.hsj-r2-footer__title {
	margin: 0 0 14px;
	font-family: "Source Serif 4", serif;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
}

.hsj-r2-footer__body {
	margin: 0;
	max-width: 28ch;
	color: var(--hsj-r2-muted, #6F6258);
	line-height: 1.72;
}

.hsj-r2-footer__list {
	display: grid;
	gap: 10px;
}

.hsj-r2-footer__list a {
	color: var(--hsj-r2-text, #2F241C);
	text-decoration: none;
}

.hsj-r2-footer__list a:hover,
.hsj-r2-footer__list a:focus {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hsj-r2-footer__bottom {
	margin-top: 42px;
	padding: 18px 0 24px;
	border-top: 1px solid #eee3d6;
}

.hsj-r2-footer__bottom p {
	margin: 0;
	color: var(--hsj-r2-muted, #6F6258);
	font-size: 14px;
}

@media (max-width: 921px) {
	.hsj-r2-header__nav {
		display: none;
	}

	.hsj-r2-header__menu-toggle {
		display: inline-flex;
	}

	.hsj-r2-footer {
		padding-top: 42px;
	}

	.hsj-r2-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 767px) {
	.hsj-r2-trust-strip .hsj-r2-container {
		min-height: 32px;
		padding-top: 7px;
		padding-bottom: 7px;
	}

	.hsj-r2-trust-strip__desktop {
		display: none;
	}

	.hsj-r2-trust-strip__mobile {
		display: block;
	}

	.hsj-r2-header__inner {
		min-height: 72px;
		gap: 16px;
	}

	.hsj-r2-header__brand,
	.hsj-r2-drawer__brand {
		font-size: 22px;
	}

	.hsj-r2-drawer__body {
		padding-left: 16px;
		padding-right: 16px;
		padding-bottom: calc(24px + env(safe-area-inset-bottom));
	}

	.hsj-r2-footer__grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.hsj-r2-footer__bottom {
		margin-top: 30px;
		padding-bottom: calc(20px + env(safe-area-inset-bottom));
	}
}
