/* =========================================================
   Header styles only. Uses design tokens defined in style.css (:root).
   Scoped under #masthead / .mobile-menu wherever a class name could
   collide with something else in the theme, to keep this self-contained.
   ========================================================= */

/* ---------- Fixed header bar ---------- */
.site-header{
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 50;
	background: transparent;
	transition: background-color .5s ease, box-shadow .5s ease, backdrop-filter .5s ease;
}
.site-header.is-scrolled{
	background: rgba(255,255,255,.95);
	backdrop-filter: blur(10px);
	box-shadow: 0 1px 0 0 rgba(107,33,168,.15);
}

#masthead .site-header__inner{
	width: 100%;
	padding: 0 1rem;
	min-height: var(--header-height, 80px);
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	column-gap: 1rem;
	position: relative;
}
@media (min-width: 768px){
	#masthead .site-header__inner{ padding: 0 2.5rem; }
}

/* ---------- Logo ---------- */
#masthead .site-branding{ grid-column: 1; display: flex; align-items: center; z-index: 2; min-width: 0; }
#masthead .site-logo-link{ display: flex; align-items: center; text-decoration: none; }
#masthead .site-logo-link img,
#masthead .site-logo-link .custom-logo{
	height: 56px;
	width: auto;
	object-fit: contain;
	display: block;
}
@media (min-width: 768px){
	#masthead .site-logo-link img,
	#masthead .site-logo-link .custom-logo{ height: 224px; }
}
/* Text fallback when no custom logo is uploaded yet */
#masthead .site-title-fallback{
	display: inline-block;
	max-width: 200px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--color-accent);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: .02em;
}
@media (min-width: 768px){
	#masthead .site-title-fallback{ max-width: 280px; font-size: 1.25rem; }
}

/* ---------- Desktop nav ---------- */
#masthead .main-navigation{ display: none; grid-column: 2; justify-self: center; min-width: 0; }
@media (min-width: 768px){
	#masthead .main-navigation{ display: flex; align-items: center; gap: 2rem; }
}
#masthead #primary-menu{
	display: flex;
	align-items: center;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-link{
	background: none;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	color: var(--color-accent);
	font-size: .875rem;
	font-weight: 500;
	letter-spacing: .05em;
	text-decoration: none;
	font-family: inherit;
	transition: color .2s ease;
	padding: 0;
}
.nav-link:hover{ color: var(--color-accent-dark); }

.chevron{ transition: transform .2s ease; }
.nav-link--toggle[aria-expanded="true"] .chevron{ transform: rotate(180deg); }

.nav-dropdown{ position: relative; }

/* Dropdown panel */
.dropdown-panel{
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(-8px);
	margin-top: 1rem;
	width: 14rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
	z-index: 10;
}
.nav-dropdown[data-open="true"] .dropdown-panel{
	opacity: 1;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}
.dropdown-panel__box{
	background: rgba(253,251,247,.95);
	backdrop-filter: blur(16px);
	border-radius: 1rem;
	padding: .5rem;
	box-shadow: 0 8px 40px rgba(0,0,0,.1);
	border: 1px solid rgba(26,26,26,.06);
}
.dropdown-panel__list{ list-style: none; margin: 0; padding: 0; }
.dropdown-panel__item + .dropdown-panel__item{ margin-top: 2px; }
.dropdown-panel__link{
	display: flex;
	flex-direction: column;
	padding: .75rem 1rem;
	border-radius: .75rem;
	text-decoration: none;
	transition: background-color .2s ease;
}
.dropdown-panel__link:hover{ background: rgba(26,26,26,.06); }
.dropdown-panel__label{
	color: var(--color-foreground);
	font-size: .875rem;
	font-weight: 500;
	transition: color .2s ease;
}
.dropdown-panel__link:hover .dropdown-panel__label{ color: var(--color-accent); }
.dropdown-panel__desc{
	color: rgba(26,26,26,.35);
	font-size: .75rem;
	margin-top: 2px;
}
.nav-dropdown .dropdown-panel:has(.dropdown-panel__item:nth-child(3)){ width: 16rem; }

/* ---------- CTA button ---------- */
#masthead .site-header__cta{ grid-column: 3; justify-self: end; display: none; }
@media (min-width: 768px){ #masthead .site-header__cta{ display: flex; align-items: center; } }

.btn-cta{
	display: inline-block;
	background: var(--color-accent);
	color: #fff;
	font-size: .875rem;
	font-weight: 500;
	letter-spacing: .06em;
	padding: .625rem 1.25rem;
	border-radius: 9999px;
	text-decoration: none;
	transition: background-color .3s ease;
	white-space: nowrap;
}
.btn-cta:hover{ background: var(--color-accent-light); color: #fff; }

/* ---------- Mobile hamburger ---------- */
#masthead .menu-toggle{
	grid-column: 3;
	justify-self: end;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: .5rem;
	background: none;
	border: none;
	cursor: pointer;
	flex-shrink: 0;
	z-index: 60;
}
@media (min-width: 768px){ #masthead .menu-toggle{ display: none; } }

#masthead .menu-toggle__bar{
	display: block;
	height: 1px;
	width: 24px;
	background: var(--color-accent);
	transition: transform .3s ease, opacity .3s ease;
	transform-origin: center;
}
#masthead .menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1){ transform: rotate(45deg) translateY(7px); }
#masthead .menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2){ opacity: 0; }
#masthead .menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3){ transform: rotate(-45deg) translateY(-7px); }

/* ---------- Mobile menu ---------- */
.mobile-menu{
	display: none;
	position: fixed;
	top: 80px; left: 0; right: 0;
	z-index: 40;
	background: rgba(35,8,60,.97);
	backdrop-filter: blur(20px);
	border-bottom: 1px solid rgba(107,33,168,.35);
	opacity: 0;
	pointer-events: none;
	transform: translateY(-8px);
	transition: opacity .3s ease, transform .3s ease;
}
@media (max-width: 767px){ .mobile-menu{ display: block; } }
.mobile-menu.is-open{ opacity: 1; pointer-events: auto; transform: translateY(0); }

.mobile-menu__inner{
	padding: 2rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

#mobile-primary-menu{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.5rem; }

.mobile-link{
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	color: #fff;
	font-size: 1.25rem;
	font-weight: 500;
	text-decoration: none;
	font-family: inherit;
	padding: 0;
	transition: color .2s ease;
}
.mobile-link:hover{ color: #d8b4fe; }

.mobile-accordion__panel{
	overflow: hidden;
	max-height: 0;
	transition: max-height .3s ease;
}
.mobile-accordion[data-open="true"] .mobile-accordion__panel{
	max-height: 20rem;
	margin-top: 1rem;
}
.mobile-accordion__list{
	list-style: none;
	margin: 0;
	padding: 0 0 0 1rem;
	border-left: 1px solid rgba(192,132,252,.4);
	display: flex;
	flex-direction: column;
	gap: .75rem;
}
.mobile-sublink{
	color: rgba(255,255,255,.7);
	font-size: 1rem;
	text-decoration: none;
	transition: color .2s ease;
}
.mobile-sublink:hover{ color: #d8b4fe; }

.btn-cta--mobile{
	text-align: center;
	padding: 1rem 1.25rem;
	margin-top: .5rem;
}

.mobile-menu__backdrop{
	display: none;
	position: fixed;
	inset: 0;
	z-index: 30;
	background: rgba(0,0,0,.4);
}
.mobile-menu__backdrop.is-visible{ display: block; }
