/* ===========================================================================
   Bublr — site navigation: a floating pill bar (logo, links, CTA).
   Fixed + backdrop-blurred; firms on scroll (.is-stuck), hides on scroll-down
   and returns on scroll-up. Mobile collapses the links into a dropdown panel.
   =========================================================================== */

html { scroll-behavior: smooth; }

.bublr-topnav {
	position: fixed;
	top: 0;
	left: 0; right: 0;
	z-index: 1000;
	background: transparent;
	padding: clamp(10px, 1.5vw, 16px) clamp(12px, 3vw, 26px) 0;
	transition: background 0.3s ease, box-shadow 0.3s ease;
}
/* Float the pill over the hero on the homepage. */
body.home .bublr-topnav { position: fixed; }
/* Scrolled — the pill firms up. */
.bublr-topnav.is-stuck .bublr-topnav__inner {
	background: rgba(245, 242, 235, 0.97);
	box-shadow: 0 16px 38px -18px rgba(10, 40, 28, 0.42);
}

.bublr-topnav__inner {
	max-width: 1120px;
	margin: 0 auto;
	height: 62px;
	padding: 0 14px 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	border-radius: 999px;
	background: rgba(245, 242, 235, 0.78);
	-webkit-backdrop-filter: saturate(150%) blur(16px);
	backdrop-filter: saturate(150%) blur(16px);
	border: 1px solid rgba(10, 11, 14, 0.08);
	box-shadow: 0 12px 32px -16px rgba(10, 40, 28, 0.34);
	transition: background 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}

.bublr-topnav__logo {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: var(--black, #0A0A0A);
	text-decoration: none;
	flex: 0 0 auto;
}
.bublr-topnav__mark { width: auto; height: 28px; transition: height 0.3s ease; }
.bublr-topnav__word {
	font-family: var(--font-round, "Fredoka", sans-serif);
	font-weight: 600;
	font-size: 22px;
	letter-spacing: -0.01em;
	line-height: 1;
}

.bublr-topnav__links {
	display: flex;
	align-items: center;
	gap: 30px;
	margin-left: auto;
	margin-right: 26px;
}
.bublr-topnav__link {
	font-family: var(--font-head, "Poppins", sans-serif);
	font-weight: 500;
	font-size: 15px;
	color: var(--black, #0A0A0A);
	text-decoration: none;
	opacity: 0.82;
	transition: opacity 0.2s ease;
}
.bublr-topnav__link:hover { opacity: 1; }

.bublr-topnav__actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.bublr-topnav__cta { padding: 11px 22px; font-size: 14.5px; }
.bublr-topnav__cta--mobileonly { display: none; }

/* The homepage hero is a CREAM stage, so the overlaid bar keeps its dark
   logo/links/toggle (the default) — no light-on-light invisibility. */

/* Hamburger toggle — hidden on desktop. */
.bublr-topnav__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px; height: 42px;
	margin-right: -8px;
	background: none;
	border: 0;
	color: var(--black, #0A0A0A);
	cursor: pointer;
}
.bublr-topnav__bars { position: relative; display: inline-block; width: 22px; height: 14px; }
.bublr-topnav__bars span {
	position: absolute; left: 0;
	width: 100%; height: 2px;
	background: currentColor; border-radius: 2px;
	transition: transform 0.28s ease, opacity 0.2s ease;
}
.bublr-topnav__bars span:nth-child(1) { top: 0; }
.bublr-topnav__bars span:nth-child(2) { top: 6px; }
.bublr-topnav__bars span:nth-child(3) { top: 12px; }
.bublr-topnav.is-open .bublr-topnav__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.bublr-topnav.is-open .bublr-topnav__bars span:nth-child(2) { opacity: 0; }
.bublr-topnav.is-open .bublr-topnav__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Keep the waitlist anchor clear of the fixed bar when jumped to. */
#waitlist { scroll-margin-top: 96px; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
	.bublr-topnav__toggle { display: inline-flex; }
	.bublr-topnav__links {
		position: absolute;
		top: calc(100% + 10px);
		left: clamp(12px, 3vw, 26px);
		right: clamp(12px, 3vw, 26px);
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
		margin: 0;
		padding: 14px 18px 18px;
		background: rgba(245, 242, 235, 0.98);
		-webkit-backdrop-filter: blur(16px);
		backdrop-filter: blur(16px);
		border: 1px solid rgba(10, 10, 10, 0.08);
		border-radius: 22px;
		box-shadow: 0 22px 40px -22px rgba(10, 40, 28, 0.45);
		opacity: 0;
		transform: translateY(-10px);
		pointer-events: none;
		transition: opacity 0.26s ease, transform 0.26s ease;
	}
	.bublr-topnav.is-open .bublr-topnav__links { opacity: 1; transform: none; pointer-events: auto; }
	/* In the dropdown the links are always on a light panel — force dark text. */
	body.home .bublr-topnav .bublr-topnav__link { color: var(--black, #0A0A0A); opacity: 0.9; }
	.bublr-topnav__link { padding: 12px 6px; font-size: 16px; border-bottom: 1px solid rgba(10, 10, 10, 0.06); }
	.bublr-topnav__cta--mobileonly { display: inline-flex; justify-content: center; margin-top: 12px; }
}

/* ---------------------------------------------------------------------------
   Smart scroll behaviour — slide out of the way on the way down, glide back
   (condensed + solid) on the way up. Transform is added to the transition so
   the hide/reveal is smooth; a later declaration intentionally overrides the
   base transition above.
   --------------------------------------------------------------------------- */
.bublr-topnav {
	transition:
		transform 0.4s cubic-bezier(0.33, 0, 0.2, 1),
		background 0.3s ease,
		border-color 0.3s ease,
		box-shadow 0.3s ease;
	will-change: transform;
}
.bublr-topnav.is-hidden { transform: translateY(-100%); }

/* Condense once scrolled — slimmer bar, smaller mark/word/CTA (desktop only;
   mobile keeps a stable height so the dropdown stays aligned). */
@media (min-width: 821px) {
	.bublr-topnav__inner { transition: height 0.3s ease; }
	.bublr-topnav__mark,
	.bublr-topnav__word,
	.bublr-topnav__cta {
		transition: width 0.3s ease, font-size 0.3s ease, padding 0.3s ease;
	}
	.bublr-topnav.is-stuck .bublr-topnav__inner { height: 54px; }
	.bublr-topnav.is-stuck .bublr-topnav__mark { height: 23px; }
	.bublr-topnav.is-stuck .bublr-topnav__word { font-size: 20px; }
	.bublr-topnav.is-stuck .bublr-topnav__cta { padding: 9px 18px; font-size: 14px; }
}

/* ---------------------------------------------------------------------------
   Wordmark logo — real bublr PNG. White over the dark homepage hero, dark on
   solid/light pages and once scrolled. Condenses with the bar.
   --------------------------------------------------------------------------- */
.bublr-topnav__logo { gap: 0; }
.bublr-topnav__logoimg {
	height: 26px;
	width: auto;
	display: block;
	transition: height 0.3s ease;
}
.bublr-topnav__logoimg--light { display: none; }
/* Pill is light on every page, so always use the dark wordmark. */
@media (min-width: 821px) {
	.bublr-topnav.is-stuck .bublr-topnav__logoimg { height: 22px; }
}
