/* =================================================================
   SITE HEADER — Shared component styles
   Loaded by every page. Landing-page-specific overrides (dark glass,
   position: fixed) live in site-style.css and cascade on top of these.
   ================================================================= */

/* Ensure --header-h is always available, even on pages without site-style.css */
:root {
	--header-h: 52px;
}

/* Baseline horizontal overflow guard — applied to every page via this shared file.
   overflow-x: clip (not hidden) — clips visual overflow without creating a scroll
   container, so position: fixed and position: sticky children are never affected,
   and iOS Safari's scroll is never accidentally locked. */
body {
	overflow-x: clip;
}

/* Prevent scrolling when mobile nav is open */
body.no-scroll {
	overflow: hidden;
}

body.no-scroll .nav-overlay {
	pointer-events: auto;
}

/* Custom element is a transparent wrapper — no box in layout */
site-header {
	display: contents;
}

.site-header {
	position: sticky;
	top: 0;
	left: 0;
	right: 0;
	height: var(--header-h);
	z-index: 1000;
	background: rgba(15, 17, 23, 0.88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav {
	display: flex;
	align-items: center;
	height: 100%;
	padding: 0 clamp(1.5rem, 3vw, 2.5rem);
}

.nav-logo {
	margin-right: auto;
	text-decoration: none;
	color: #ffffff;
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: clamp(1.1rem, 2.5vw, 1.5rem);
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.nav-links-desktop {
	display: flex;
	list-style: none;
	gap: clamp(1rem, 2.5vw, 3rem);
}

@media (max-width: 48rem) {
	.nav-links-desktop {
		display: none;
	}
}

.nav-links-desktop a {
	text-decoration: none;
	color: #ffffff;
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: 0.875rem;
	font-weight: 500;
	opacity: 0.65;
	transition: opacity 0.2s ease;
}

.nav-links-desktop a:hover {
	opacity: 1;
}

.nav-links-desktop a[aria-current='page'] {
	opacity: 1;
	font-weight: 600;
}

/* Hamburger — visible on mobile only */
.hamburger {
	display: none;
	background: none;
	border: none;
	padding: 0.5rem;
	margin-right: 0.5rem;
	cursor: pointer;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

@media (max-width: 48rem) {
	.hamburger {
		display: flex;
		margin-right: 0;
	}

	.site-nav {
		padding-right: 1rem;
	}
}

.hamburger .bar {
	display: block;
	background-color: #ffffff;
	height: 4px;
	width: 36px;
	margin: 2px;
	border-radius: 10px;
}

/* Mobile nav drawer */
.mobile-nav {
	position: fixed;
	height: 100vh;
	width: clamp(15rem, 70vw, 25rem);
	top: 0;
	right: 0;
	z-index: 9999;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(15px);
	-webkit-backdrop-filter: blur(15px);
	/* Closed state — GSAP manages show/hide */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: clamp(2rem, 5vw, 4rem);
	border-left: 1px solid rgba(0, 0, 0, 0.08);
}

/* X close button — top-left corner of the drawer */
.mobile-nav-close {
	position: absolute;
	top: 1.25rem;
	left: 1.25rem;
	width: 2.75rem;
	height: 2.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.06);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 50%;
	cursor: pointer;
	color: #0f1117;
	transition: background 0.2s ease;
	padding: 0;
}

.mobile-nav-close:hover {
	background: rgba(0, 0, 0, 0.12);
}

.mobile-nav-links {
	opacity: 0;
}

.mobile-nav-links ul {
	list-style: none;
	padding: 0;
}

.mobile-nav-links ul li {
	margin-bottom: clamp(1rem, 4vh, 2.5rem);
}

.mobile-nav-links ul li a {
	text-decoration: none;
	font-size: clamp(1.5rem, 5vw, 2rem);
	color: #0f1117;
	font-weight: 500;
	font-family: 'DM Sans', system-ui, sans-serif;
}

/* Dim + blur overlay behind mobile nav */
.nav-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 9998;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

/* Anchor scroll offset — accounts for the sticky/fixed header height */
#section-about,
#section-policies,
#section-faq,
#section-contact,
#section-gallery,
#section-amenities {
	scroll-margin-top: var(--header-h);
}
