/*
 * digiloom: site header.
 * Mirrors the Figma Make `Layout.tsx` sticky masthead — dark slate bar that
 * compresses on scroll, brand lockup left, pill-highlighted nav right.
 * The `is-scrolled` class is applied by js/digiloom-motion.js.
 */

.digiloom-header {
	background-color: var(--wp--preset--color--ink);
	position: sticky;
	top: 0;
	z-index: 50;
	padding-block: 24px;
	transition: padding var(--wp--custom--transition--slow), background-color var(--wp--custom--transition--slow), box-shadow var(--wp--custom--transition--slow);
}

.digiloom-header.is-scrolled {
	background-color: rgba(15, 23, 42, 0.95);
	backdrop-filter: blur(12px);
	box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.3);
	padding-block: 12px;
}

/* Brand lockup ------------------------------------------------------- */

.digiloom-header .wp-block-site-logo img {
	height: 40px;
	width: 40px;
	transition: height var(--wp--custom--transition--slow), width var(--wp--custom--transition--slow);
}

.digiloom-header.is-scrolled .wp-block-site-logo img {
	height: 32px;
	width: 32px;
}

.digiloom-header .wp-block-site-title a {
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 24px;
	font-weight: var(--wp--custom--font-weight--bold);
	letter-spacing: -0.02em;
	text-decoration: none;
	transition: font-size var(--wp--custom--transition--slow);
}

.digiloom-header.is-scrolled .wp-block-site-title a {
	font-size: 20px;
}

/* Navigation --------------------------------------------------------- */

.digiloom-header .wp-block-navigation {
	--navigation-layout-gap: 4px;
}

.digiloom-header .wp-block-navigation .wp-block-navigation-item__content {
	align-items: center;
	border-radius: var(--wp--custom--radius--md);
	color: var(--wp--preset--color--slate-muted);
	display: flex;
	font-size: var(--wp--preset--font-size--xx-small);
	font-weight: var(--wp--custom--font-weight--medium);
	gap: 8px;
	padding: 10px 16px;
	text-decoration: none;
	transition: color var(--wp--custom--transition--base), background-color var(--wp--custom--transition--base);
}

.digiloom-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: #e2e8f0;
}

/* Active page pill — the static equivalent of the prototype's shared-layout
   motion pill. WordPress marks the current page for us. */
.digiloom-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.digiloom-header .wp-block-navigation .current_page_item > .wp-block-navigation-item__content {
	background-color: rgba(255, 255, 255, 0.1);
	color: var(--wp--preset--color--white);
}

/*
 * Per-item nav icons.
 * The core navigation block has no icon field, so icons are attached by href
 * suffix. A page whose slug is not listed simply renders without an icon —
 * degrade, don't break.
 */
.digiloom-header .wp-block-navigation .wp-block-navigation-item__content::before {
	background-color: currentColor;
	content: "";
	flex: 0 0 auto;
	height: 16px;
	width: 16px;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	opacity: 0.7;
}

.digiloom-header .wp-block-navigation .wp-block-navigation-item__content:hover::before,
.digiloom-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::before {
	opacity: 1;
}

/* Fallback: no icon unless a rule below matches. */
.digiloom-header .wp-block-navigation .wp-block-navigation-item__content::before {
	display: none;
}

.digiloom-header .wp-block-navigation a[href$="/"]:not([href*="/values"]):not([href*="/history"]):not([href*="/style-guide"]):not([href*="/contact"])::before,
.digiloom-header .wp-block-navigation a[href*="/values"]::before,
.digiloom-header .wp-block-navigation a[href*="/history"]::before,
.digiloom-header .wp-block-navigation a[href*="/style-guide"]::before,
.digiloom-header .wp-block-navigation a[href*="/contact"]::before {
	display: block;
}

/* Lightbulb — Overview */
.digiloom-header .wp-block-navigation a[href$="/"]:not([href*="/values"]):not([href*="/history"]):not([href*="/style-guide"]):not([href*="/contact"])::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3C/svg%3E");
}

/* Heart — Mission & Values */
.digiloom-header .wp-block-navigation a[href*="/values"]::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E");
}

/* Clock/history — Our History */
.digiloom-header .wp-block-navigation a[href*="/history"]::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M12 7v5l4 2'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M12 7v5l4 2'/%3E%3C/svg%3E");
}

/* Palette — Style Guide (tinted pink, as in the prototype) */
.digiloom-header .wp-block-navigation a[href*="/style-guide"]::before {
	background-color: var(--wp--preset--color--pink-light);
	opacity: 1;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13.5' cy='6.5' r='.5' fill='%23000'/%3E%3Ccircle cx='17.5' cy='10.5' r='.5' fill='%23000'/%3E%3Ccircle cx='8.5' cy='7.5' r='.5' fill='%23000'/%3E%3Ccircle cx='6.5' cy='12.5' r='.5' fill='%23000'/%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13.5' cy='6.5' r='.5' fill='%23000'/%3E%3Ccircle cx='17.5' cy='10.5' r='.5' fill='%23000'/%3E%3Ccircle cx='8.5' cy='7.5' r='.5' fill='%23000'/%3E%3Ccircle cx='6.5' cy='12.5' r='.5' fill='%23000'/%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2Z'/%3E%3C/svg%3E");
}

/* Mail — Contact Us */
.digiloom-header .wp-block-navigation a[href*="/contact"]::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
}

/* Mobile drawer ------------------------------------------------------ */

.digiloom-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--ink-soft);
	padding: 24px;
}

.digiloom-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--x-small);
	padding: 12px 16px;
	width: 100%;
}

.digiloom-header .wp-block-navigation__responsive-container-open,
.digiloom-header .wp-block-navigation__responsive-container-close {
	color: #cbd5e1;
}

.digiloom-header .wp-block-navigation__responsive-container-open:hover,
.digiloom-header .wp-block-navigation__responsive-container-close:hover {
	color: var(--wp--preset--color--white);
}
