/*
Theme Name: Cosmos
Theme URI: https://cosmoenergytt.com
Author: Cosmo Energy Cooling
Author URI: https://cosmoenergytt.com
Description: Custom block theme for Cosmo Energy Cooling, end-to-end HVAC solutions in Trinidad & Tobago. Minimal, airy design system with frosted-glass surfaces, navy ink, one blue accent, orange CTA.
Version: 1.7.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cosmos
Tags: block-patterns, block-styles, editor-style, wide-blocks, full-site-editing
*/

/* ===========================================================================
   COSMOS DESIGN SYSTEM, minimal + frosted glass (glassmorphism)
   -------------------------------------------------------------------------
   Direction: white/near-white base, generous whitespace, navy as INK,
   one blue accent (brand-blue), orange reserved for primary CTA only.
   Frosted glass surfaces with @supports solid fallback.
   =========================================================================== */

:root {
	--cosmos-glass-bg: rgba(255, 255, 255, 0.6);
	--cosmos-glass-bg-strong: rgba(255, 255, 255, 0.72);
	--cosmos-glass-border: rgba(17, 51, 94, 0.1);
	--cosmos-glass-blur: saturate(160%) blur(16px);
	--cosmos-glass-blur-lg: saturate(150%) blur(20px);
	--cosmos-radius: 18px;
	--cosmos-radius-sm: 12px;
	--cosmos-shadow: 0 1px 1px rgba(11, 35, 66, 0.04), 0 10px 30px -16px rgba(11, 35, 66, 0.28);
	--cosmos-shadow-lift: 0 2px 4px rgba(11, 35, 66, 0.06), 0 26px 50px -22px rgba(11, 35, 66, 0.4);
	--cosmos-glass-dark-bg: rgba(13, 33, 60, 0.5);
	--cosmos-glass-dark-border: rgba(255, 255, 255, 0.14);
}

/* ---------------------------------------------------------------------------
   Soft gradient-mesh atmospheres (replaces flat navy + blueprint grid)
--------------------------------------------------------------------------- */

/* Light mesh, for interior page headers: barely-there blues on white */
.cosmos-mesh-light {
	position: relative;
	background-color: var(--wp--preset--color--base);
	background-image:
		radial-gradient(60% 80% at 12% 0%, rgba(56, 108, 176, 0.14) 0%, rgba(56, 108, 176, 0) 60%),
		radial-gradient(50% 70% at 92% 18%, rgba(234, 242, 250, 0.9) 0%, rgba(234, 242, 250, 0) 70%),
		radial-gradient(45% 60% at 70% 100%, rgba(255, 127, 0, 0.06) 0%, rgba(255, 127, 0, 0) 65%);
	overflow: hidden;
}

/* Deep mesh, for hero / footer: layered translucent navy, modern not flat */
.cosmos-mesh-dark {
	position: relative;
	background-color: var(--wp--preset--color--navy-deep);
	background-image:
		radial-gradient(55% 75% at 8% 0%, rgba(56, 108, 176, 0.45) 0%, rgba(56, 108, 176, 0) 55%),
		radial-gradient(50% 60% at 100% 8%, rgba(27, 75, 133, 0.55) 0%, rgba(27, 75, 133, 0) 60%),
		radial-gradient(60% 80% at 85% 100%, rgba(255, 127, 0, 0.1) 0%, rgba(255, 127, 0, 0) 60%);
	overflow: hidden;
}

/* Whisper-soft tint section (services area) */
.cosmos-tint {
	background-color: var(--wp--preset--color--mist);
	background-image:
		radial-gradient(50% 60% at 100% 0%, rgba(56, 108, 176, 0.07) 0%, rgba(56, 108, 176, 0) 60%);
}

/* ---------------------------------------------------------------------------
   Frosted glass utilities
--------------------------------------------------------------------------- */

.cosmos-glass {
	background: var(--cosmos-glass-bg);
	border: 1px solid var(--cosmos-glass-border);
	border-radius: var(--cosmos-radius);
	box-shadow: var(--cosmos-shadow);
	-webkit-backdrop-filter: var(--cosmos-glass-blur);
	backdrop-filter: var(--cosmos-glass-blur);
}

.cosmos-glass-strong {
	background: var(--cosmos-glass-bg-strong);
}

.cosmos-glass-dark {
	background: var(--cosmos-glass-dark-bg);
	border: 1px solid var(--cosmos-glass-dark-border);
	border-radius: var(--cosmos-radius);
	box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.55);
	-webkit-backdrop-filter: var(--cosmos-glass-blur-lg);
	backdrop-filter: var(--cosmos-glass-blur-lg);
}

/* Solid fallback for browsers without backdrop-filter */
@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
	.cosmos-glass,
	.cosmos-glass-strong {
		background: var(--wp--preset--color--base);
	}
	.cosmos-glass-dark {
		background: rgba(13, 33, 60, 0.92);
	}
	.cosmos-header {
		background: rgba(255, 255, 255, 0.96) !important;
	}
}

/* ---------------------------------------------------------------------------
   Eyebrow, subtler tick, sentence-friendly
--------------------------------------------------------------------------- */

.cosmos-eyebrow {
	display: inline-flex;
	align-items: center;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.92;
}

.cosmos-eyebrow::before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 1px;
	background: var(--wp--preset--color--orange);
	margin-right: 0.7rem;
	opacity: 0.85;
}

/* ---------------------------------------------------------------------------
   Cards, glass panels
--------------------------------------------------------------------------- */

.cosmos-card {
	position: relative;
	background: var(--cosmos-glass-bg-strong);
	border: 1px solid var(--cosmos-glass-border);
	border-radius: var(--cosmos-radius);
	box-shadow: var(--cosmos-shadow);
	-webkit-backdrop-filter: var(--cosmos-glass-blur);
	backdrop-filter: var(--cosmos-glass-blur);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.3s ease, border-color 0.3s ease;
}

.cosmos-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--cosmos-shadow-lift);
	border-color: rgba(56, 108, 176, 0.3);
}

/* Dark glass project cards */
.cosmos-card-dark {
	position: relative;
	background: var(--cosmos-glass-dark-bg);
	border: 1px solid var(--cosmos-glass-dark-border);
	border-radius: var(--cosmos-radius);
	box-shadow: 0 18px 50px -28px rgba(0, 0, 0, 0.6);
	-webkit-backdrop-filter: var(--cosmos-glass-blur);
	backdrop-filter: var(--cosmos-glass-blur);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
		background 0.3s ease, border-color 0.3s ease;
}

.cosmos-card-dark:hover {
	transform: translateY(-6px);
	background: rgba(20, 46, 80, 0.62);
	border-color: rgba(255, 255, 255, 0.26);
}

@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
	.cosmos-card { background: var(--wp--preset--color--base); }
	.cosmos-card-dark { background: rgba(13, 33, 60, 0.92); }
}

/* Sector tag on project cards, subtle pill */
.cosmos-tag {
	display: inline-block;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sky);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	padding: 0.25rem 0.7rem;
	border-radius: 999px;
}

/* Tag on light glass cards */
.cosmos-tag-light {
	display: inline-block;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-blue);
	background: rgba(56, 108, 176, 0.08);
	border: 1px solid rgba(56, 108, 176, 0.2);
	padding: 0.25rem 0.7rem;
	border-radius: 999px;
}

/* ---------------------------------------------------------------------------
   Buttons, soft pill, gentle lift
--------------------------------------------------------------------------- */

.wp-block-button__link {
	transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px -12px rgba(255, 127, 0, 0.5);
}

.is-style-outline .wp-block-button__link {
	border-width: 1px;
}

.is-style-outline .wp-block-button__link:hover {
	box-shadow: 0 12px 26px -14px rgba(17, 51, 94, 0.4);
}

/* Glass outline button on dark backgrounds */
.cosmos-btn-glass .wp-block-button__link {
	background: rgba(255, 255, 255, 0.1) !important;
	border: 1px solid rgba(255, 255, 255, 0.28);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.cosmos-btn-glass .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.18) !important;
	box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------------------
   Header & navigation, frosted sticky bar
--------------------------------------------------------------------------- */

.cosmos-header .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: 0.92rem;
	letter-spacing: 0.01em;
	color: var(--wp--preset--color--ink);
	transition: color 0.2s ease;
}

.cosmos-header .wp-block-navigation-item__content:hover,
.cosmos-header .current-menu-item .wp-block-navigation-item__content {
	color: var(--wp--preset--color--brand-blue);
}

/* ---------------------------------------------------------------------------
   Breadcrumb bar (Yoast), glass strip
--------------------------------------------------------------------------- */

.cosmos-breadcrumb {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.82rem;
	color: var(--wp--preset--color--slate);
}

.cosmos-breadcrumb .cosmos-glass {
	display: inline-block;
	padding: 0.45rem 1rem;
	border-radius: 999px;
}

.cosmos-breadcrumb a {
	color: var(--wp--preset--color--brand-blue);
	text-decoration: none;
}

.cosmos-breadcrumb a:hover {
	color: var(--wp--preset--color--orange);
}

.cosmos-breadcrumb .breadcrumb_last,
.cosmos-breadcrumb [aria-current="page"] {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Stats strip, glass tiles on light
--------------------------------------------------------------------------- */

.cosmos-stat-number {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: clamp(2.2rem, 4vw, 3.1rem);
	line-height: 1;
	color: var(--wp--preset--color--navy);
	letter-spacing: -0.01em;
}

.cosmos-stat-number .has-inline-color,
.cosmos-stat-accent {
	color: var(--wp--preset--color--brand-blue);
}

/* ---------------------------------------------------------------------------
   Values strip, quiet markers, sentence case
--------------------------------------------------------------------------- */

.cosmos-value-item {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	letter-spacing: 0;
	color: var(--wp--preset--color--navy);
	display: inline-flex;
	align-items: center;
}

.cosmos-value-item::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wp--preset--color--orange);
	margin-right: 0.6rem;
	flex: none;
}

/* ---------------------------------------------------------------------------
   Long-form reading (single post), comfortable measure
--------------------------------------------------------------------------- */

.cosmos-article {
	font-size: 1.12rem;
	line-height: 1.8;
}

.cosmos-article p {
	margin-block: 1.35em;
}

.cosmos-article h2 {
	margin-top: 2em;
}

.cosmos-article h3 {
	margin-top: 1.6em;
}

.cosmos-article blockquote {
	border-left: 3px solid var(--wp--preset--color--brand-blue);
	padding-left: 1.4rem;
	font-style: italic;
	color: var(--wp--preset--color--slate);
}

.cosmos-meta {
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--slate);
	text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
   Card-grid post links / excerpts polish
--------------------------------------------------------------------------- */

.cosmos-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--navy);
	transition: color 0.2s ease;
}

.cosmos-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--brand-blue);
}

.cosmos-card-dark .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--base);
}

.cosmos-card-dark .wp-block-post-title a:hover {
	color: var(--wp--preset--color--sky);
}

/* Pagination spacing */
.wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--50);
	gap: 0.75rem;
}

/* ---------------------------------------------------------------------------
   Page-load reveal (CSS only, staggered) + hover blur transitions
--------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
	.cosmos-reveal > * {
		opacity: 0;
		transform: translateY(16px);
		animation: cosmos-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
	}

	.cosmos-reveal > *:nth-child(1) { animation-delay: 0.05s; }
	.cosmos-reveal > *:nth-child(2) { animation-delay: 0.16s; }
	.cosmos-reveal > *:nth-child(3) { animation-delay: 0.27s; }
	.cosmos-reveal > *:nth-child(4) { animation-delay: 0.38s; }
	.cosmos-reveal > *:nth-child(5) { animation-delay: 0.49s; }
}

@keyframes cosmos-rise {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------------------------------------------------------------------------
   Footer, refined deep glass-ish
--------------------------------------------------------------------------- */

.cosmos-footer a {
	text-decoration: none;
	color: inherit;
	transition: color 0.2s ease;
}

.cosmos-footer a:hover {
	color: var(--wp--preset--color--sky) !important;
}

/* Snowflake separator nod to the logo */
.cosmos-flake-sep {
	text-align: center;
	color: var(--wp--preset--color--brand-blue);
	letter-spacing: 1.4em;
	opacity: 0.45;
}

/* ---------------------------------------------------------------------------
   Legacy class shims (kept so old hooks elsewhere don't break)
--------------------------------------------------------------------------- */

.cosmos-blueprint { position: relative; }
.cosmos-blueprint-light { position: relative; }

/* ===========================================================================
   Motion layer, Three.js hero canvas + CSS scroll-driven parallax
   (compositor-thread, progressive enhancement, reduced-motion safe)
   =========================================================================== */

.cosmos-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.cosmos-hero-canvas {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.cosmos-hero-canvas canvas {
	width: 100%;
	height: 100%;
	display: block;
}

.cosmos-hero-inner {
	position: relative;
	z-index: 1;
}

/* Scroll-driven parallax & reveals, native, no JS, zero main-thread cost */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		/* Hero content drifts up + fades slightly as it scrolls away */
		.cosmos-hero-inner {
			animation: cosmos-hero-parallax linear both;
			animation-timeline: view();
			animation-range: exit 0% exit 100%;
		}

		/* Hero backdrop moves slower than scroll (classic parallax depth) */
		.cosmos-hero-canvas,
		.cosmos-hero.cosmos-mesh-dark::before {
			animation: cosmos-bg-parallax linear both;
			animation-timeline: view();
			animation-range: exit 0% exit 100%;
		}

		/* Glass cards float in as they enter the viewport */
		.cosmos-card,
		.cosmos-card-dark {
			animation: cosmos-float-in 1ms linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 55%;
		}

		/* Interior page headers: mesh glow drifts as you scroll past */
		.cosmos-mesh-light {
			animation: cosmos-mesh-drift linear both;
			animation-timeline: view();
			animation-range: exit 0% exit 100%;
		}
	}
}

@keyframes cosmos-hero-parallax {
	to {
		transform: translateY(-9%);
		opacity: 0.45;
	}
}

@keyframes cosmos-bg-parallax {
	to {
		transform: translateY(14%);
	}
}

@keyframes cosmos-float-in {
	from {
		opacity: 0;
		transform: translateY(26px) scale(0.985);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes cosmos-mesh-drift {
	to {
		background-position: 0 60px, 30px 0, 0 -40px;
	}
}

/* ---------------------------------------------------------------------------
   Links, kill the default heavy blue underline; quiet, engineered affordance
--------------------------------------------------------------------------- */

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	text-decoration-color: rgba(56, 108, 176, 0.35);
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
	text-decoration-color: currentColor;
}

/* No underline where the element already signals "link" */
.wp-block-navigation a,
.wp-block-button a,
.wp-element-button,
.wp-block-post-title a,
h1 a, h2 a, h3 a, h4 a,
.cosmos-footer a,
.wp-block-site-logo a,
.cosmos-tag a,
.wp-block-query-pagination a,
.wp-block-post-excerpt__more-link {
	text-decoration: none;
}

.wp-block-post-title a:hover,
.wp-block-post-excerpt__more-link:hover {
	color: var(--wp--preset--color--orange);
}

/* ---------------------------------------------------------------------------
   Floating header — detached frosted bar over the page, blue runs to the top
--------------------------------------------------------------------------- */

/* NOTE: no transform / filter / backdrop-filter on the header or any
   ancestor of the navigation block (traps the mobile menu's fixed overlay).
   Frost lives on a ::before pseudo. JS (cosmos-header.js) drives states:
   .is-top   = full-width flush bar at page top
   .is-pill  = floating rounded bar, pops in when scrolling up
   .is-hidden= slides away when scrolling down */
header:has(> .cosmos-header) {
	position: fixed;
	top: 0;
	inset-inline: 0;
	margin-inline: auto;
	width: 100%;
	z-index: 200;
	transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		top 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

body.admin-bar header:has(> .cosmos-header) {
	top: 32px;
}

header.is-pill:has(> .cosmos-header) {
	top: 0.9rem;
	width: min(1380px, calc(100% - 1.6rem));
}

body.admin-bar header.is-pill:has(> .cosmos-header) {
	top: calc(0.9rem + 32px);
}

header.is-hidden:has(> .cosmos-header) {
	transform: translateY(-130%);
}

.cosmos-header {
	position: relative;
	isolation: isolate;
	border-radius: 0;
	transition: border-radius 0.35s ease;
}

header.is-pill .cosmos-header {
	border-radius: 999px;
}

/* Top state: completely clean, no frost, page shows through untouched. */
.cosmos-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: transparent;
	border: 1px solid transparent;
	box-shadow: none;
	transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Pill state: frosted glass */
header.is-pill .cosmos-header::before {
	background: rgba(255, 255, 255, 0.55);
	border-color: rgba(17, 51, 94, 0.12);
	box-shadow: 0 8px 30px -12px rgba(11, 35, 66, 0.3);
	-webkit-backdrop-filter: saturate(160%) blur(20px);
	backdrop-filter: saturate(160%) blur(20px);
}

/* Mobile overlay: full screen, above everything */
.cosmos-header .wp-block-navigation__responsive-container.is-menu-open {
	z-index: 300;
	padding: 4.5rem 2rem 2rem;
}

/* First band of every page clears the floating bar */
.cosmos-hero {
	padding-top: calc(var(--wp--preset--spacing--70) + 3.5rem) !important;
}

main > .cosmos-mesh-light:first-child {
	padding-top: calc(var(--wp--preset--spacing--50) + 6rem) !important;
}

main.cosmos-pad-top {
	padding-top: calc(var(--wp--preset--spacing--50) + 6rem) !important;
}

/* Flush bar over the dark home hero: text flips light. In pill state the
   frosted bar is light, so text stays navy everywhere. */
body.home header:not(.is-pill) .cosmos-header .wp-block-navigation-item__content,
body.error404 header:not(.is-pill) .cosmos-header .wp-block-navigation-item__content {
	color: var(--wp--preset--color--sky);
}

body.home header:not(.is-pill) .cosmos-header .wp-block-navigation-item__content:hover,
body.error404 header:not(.is-pill) .cosmos-header .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--base);
}

/* Brand: site title next to logo */
.cosmos-brand .wp-block-site-title a {
	font-family: var(--wp--preset--font-family--display);
	color: var(--wp--preset--color--navy);
	text-decoration: none;
	white-space: nowrap;
}

body.home header:not(.is-pill) .cosmos-brand .wp-block-site-title a,
body.error404 header:not(.is-pill) .cosmos-brand .wp-block-site-title a {
	color: var(--wp--preset--color--base);
}

/* Header is position:fixed (out of flow) but still a flow sibling for the
   block-gap rule, which left a white strip above the hero. */
.wp-site-blocks > main {
	margin-block-start: 0 !important;
}

/* ---------------------------------------------------------------------------
   Navigation breakpoint + fullscreen mobile menu
   WP's built-in hamburger breakpoint is 600px; the inline menu starts
   wrapping well above that. Force the overlay menu below 1080px.
--------------------------------------------------------------------------- */

/* Desktop: hide the in-menu CTA item (CTA lives in the header bar) */
.wp-block-navigation .cosmos-menu-cta {
	display: none !important;
}

@media (max-width: 1080px) {
	/* Swap inline nav for hamburger before items can wrap */
	.cosmos-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}

	.cosmos-header .wp-block-navigation__responsive-container-open {
		display: flex !important;
	}

	/* Hamburger sits far right; header CTA hides (it moves into the menu) */
	.cosmos-header .wp-block-navigation {
		order: 3;
	}

	.cosmos-header > .wp-block-group > .wp-block-buttons {
		display: none;
	}

	/* In-menu CTA becomes a real button */
	.wp-block-navigation .is-menu-open .cosmos-menu-cta {
		display: block !important;
		margin-top: 1.6rem;
	}

	.is-menu-open .cosmos-menu-cta .wp-block-navigation-item__content {
		display: inline-block;
		background: var(--wp--preset--color--orange);
		color: var(--wp--preset--color--base) !important;
		padding: 0.85rem 2.2rem;
		border-radius: 999px;
		font-size: 1.05rem !important;
	}
}

/* Hamburger + close icon size/color */
.cosmos-header .wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--navy);
}

body.home header:not(.is-pill) .cosmos-header .wp-block-navigation__responsive-container-open,
body.error404 header:not(.is-pill) .cosmos-header .wp-block-navigation__responsive-container-open {
	color: var(--wp--preset--color--base);
}

.cosmos-header .wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	width: 28px;
	height: 28px;
}

/* Fullscreen overlay: full width + dynamic viewport height, roomy items */
.cosmos-header .wp-block-navigation__responsive-container.is-menu-open {
	inset: 0;
	padding: 5.5rem 2.2rem 2.5rem;
	z-index: 300;
}

.cosmos-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start;
}

.cosmos-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start;
	gap: 0.4rem;
}

.cosmos-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: clamp(1.5rem, 5vw, 2.2rem);
	color: var(--wp--preset--color--base);
	padding: 0.35rem 0;
}

.cosmos-header .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--base);
}


/* Airflow canvas inside the mobile menu overlay */
.wp-block-navigation__responsive-container .cosmos-hero-canvas {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	display: none;
}

.wp-block-navigation__responsive-container.is-menu-open .cosmos-hero-canvas {
	display: block;
}

.wp-block-navigation__responsive-container.is-menu-open > :not(.cosmos-hero-canvas) {
	position: relative;
	z-index: 1;
}

/* ---------------------------------------------------------------------------
   Mobile menu polish: hover, current page highlight, CTA padding
--------------------------------------------------------------------------- */

.cosmos-header .is-menu-open .wp-block-navigation-item__content {
	position: relative;
	transition: color 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.cosmos-header .is-menu-open .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--orange);
	transform: translateX(8px);
}

/* Current page: orange tick + warm color */
.cosmos-header .is-menu-open .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--orange);
}

.cosmos-header .is-menu-open .wp-block-navigation-item__content[aria-current="page"]::before {
	content: "";
	position: absolute;
	left: -1.1rem;
	top: 50%;
	width: 0.55rem;
	height: 2px;
	background: var(--wp--preset--color--orange);
}

/* CTA pill: padding/size win over the generic item rule */
.cosmos-header .is-menu-open .cosmos-menu-cta .wp-block-navigation-item__content {
	padding: 0.9rem 2.4rem !important;
	font-size: 1.1rem !important;
	transform: none;
}

.cosmos-header .is-menu-open .cosmos-menu-cta .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--base);
	transform: translateY(-2px);
}

.cosmos-header .is-menu-open .cosmos-menu-cta .wp-block-navigation-item__content::before {
	content: none;
}

/* ------------------------------------------------------------------
   Project media: featured images in cards / headers + gallery slideshow
   ------------------------------------------------------------------ */

/* Featured image inside cards: bleed to the card edges, crop consistent */
.cosmos-card .wp-block-post-featured-image,
.cosmos-card-dark .wp-block-post-featured-image {
	overflow: hidden;
	border-radius: 18px 18px 0 0;
}

/* Constrained layout forces margin-inline auto !important; out-shout it */
.cosmos-card .wp-block-post-featured-image {
	margin: -1.8rem -1.6rem 0.4rem !important;
	width: calc(100% + 3.2rem);
	max-width: none !important;
}

.cosmos-card-dark .wp-block-post-featured-image {
	margin: -1.8rem -1.5rem 0.4rem !important;
	width: calc(100% + 3rem);
	max-width: none !important;
}

.cosmos-card .wp-block-post-featured-image img,
.cosmos-card-dark .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 0.45s ease;
}

.cosmos-card:hover .wp-block-post-featured-image img,
.cosmos-card-dark:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

/* Dark card text: titles + read-more readable on navy glass */
.cosmos-card-dark .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--base);
}

.cosmos-card-dark .wp-block-post-title a:hover {
	color: var(--wp--preset--color--orange);
}

.cosmos-card-dark .wp-block-post-excerpt__more-link {
	color: var(--wp--preset--color--sky);
}

/* Single project header image */
.cosmos-project-hero-img img {
	display: block;
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
	border-radius: 22px;
	box-shadow: 0 24px 60px -28px rgba(17, 51, 94, 0.45);
}

/* Slideshow: scroll-snap strip enhanced with arrows + dots */
.cosmos-slideshow {
	position: relative;
	margin-top: var(--wp--preset--spacing--50, 2.5rem);
}

.cosmos-slides {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	border-radius: 18px;
	scrollbar-width: none;
}

.cosmos-slides::-webkit-scrollbar {
	display: none;
}

.cosmos-slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
}

.cosmos-slide img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.cosmos-slide-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2.6rem;
	height: 2.6rem;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: rgba(17, 51, 94, 0.45);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	font-size: 1.05rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.cosmos-slide-btn:hover {
	background: var(--wp--preset--color--orange);
	border-color: var(--wp--preset--color--orange);
}

.cosmos-slide-prev {
	left: 0.8rem;
}

.cosmos-slide-next {
	right: 0.8rem;
}

.cosmos-slide-dots {
	display: flex;
	justify-content: center;
	gap: 0.45rem;
	margin-top: 0.9rem;
}

.cosmos-slide-dot {
	width: 0.55rem;
	height: 0.55rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(17, 51, 94, 0.25);
	cursor: pointer;
	transition: background 0.2s ease, width 0.2s ease;
}

.cosmos-slide-dot.is-active {
	width: 1.4rem;
	background: var(--wp--preset--color--orange);
}

/* Single image or no JS: hide controls, strip still scrolls */
.cosmos-slideshow.is-static .cosmos-slide-btn,
.cosmos-slideshow.is-static .cosmos-slide-dots,
.cosmos-slideshow:not(.is-enhanced) .cosmos-slide-btn {
	display: none;
}
