/* ==========================================================================
   ClockBridge, NoteBridge and KnobBridge app pages (templates/page-clockbridge.html,
   page-notebridge.html, page-knobbridge.html). Enqueued only on those three pages.
   Colours are the apps' own (midibridge design system): dark base, one
   yellow for "locked / on", orange for "listening", grey for everything at rest.
   Every selector is scoped to main.mbr, or to body:has(main.mbr) for the
   header/footer chrome on these pages alone.
   ========================================================================== */

.mbr {
	--mbr-bg: #0f1012;
	--mbr-surface: #1b1c20;
	--mbr-line: #2a2c31;
	--mbr-ink: #f2f3f5;
	--mbr-grey: #8b8f97;
	--mbr-idle: #5c6068;
	--mbr-accent: #ffd60a;
	--mbr-orange: #ff9f0a;
	--mbr-red: #ff5a52;
	--mbr-pad: var(--wp--style--root--padding-left, 22px);
	--mbr-band-y: 112px;

	background: var(--mbr-bg);
	color: var(--mbr-ink);
	font-size: 17px;
	line-height: 1.65;
	overflow: clip;
}

/* The global page-top offset and the template-part block gap don't apply. */
main.wp-block-group.mbr {
	padding-top: 0;
	padding-bottom: 0;
	margin-block-start: 0;
}
body:has(main.mbr) .wp-site-blocks > footer { margin-block-start: 0; }

.mbr :where(h1, h2, h3, h4) { color: var(--mbr-ink); }
.mbr :where(p, li, figcaption) { color: var(--mbr-grey); }
.mbr a { color: var(--mbr-accent); text-decoration: underline; text-decoration-color: rgba(255, 214, 10, 0.4); text-underline-offset: 3px; }
.mbr a:hover { color: #ffe45c; text-decoration-color: currentColor; }
.mbr a:focus-visible,
.mbr summary:focus-visible,
.mbr .wp-block-button__link:focus-visible { outline: 2px solid var(--mbr-accent); outline-offset: 3px; border-radius: 4px; }
.mbr strong { color: var(--mbr-ink); }

/* The icon is decoration, not a photo: no lightbox, no zoom cursor. */
.mbr .mbr-icon img { pointer-events: none; }

/* ---------- Header on these pages: dark, to match the app ---------- */
body:has(main.mbr) .teemusk-header.has-white-background-color {
	background-color: #0f1012 !important;
	border-bottom-color: #2a2c31 !important;
}
body:has(main.mbr) .teemusk-header .wp-block-site-title a { color: #f2f3f5; }
body:has(main.mbr) .teemusk-header .teemusk-tagline { color: #8b8f97; }
body:has(main.mbr) .teemusk-header .wp-block-navigation__responsive-container:not(.is-menu-open) a,
body:has(main.mbr) .teemusk-header .wp-block-navigation__responsive-container-open { color: #f2f3f5; }

/* ---------- Shared bits ---------- */
.mbr-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--mbr-accent) !important;
	margin: 0;
}
.mbr h2 {
	font-weight: 800;
	font-size: clamp(30px, 4.2vw, 48px);
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin-top: 16px;
}
.mbr h3 {
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.005em;
	line-height: 1.3;
}

.mbr-band {
	position: relative;
	padding: var(--mbr-band-y) var(--mbr-pad);
	scroll-margin-top: 24px;
}
.mbr-band + .mbr-band { border-top: 1px solid var(--mbr-line); }
.mbr-band > * { position: relative; }
.mbr-center { text-align: center; }
.mbr-band.mbr-center > h2,
.mbr-band.mbr-center > .mbr-eyebrow { margin-inline: auto; }
.mbr .mbr-lede { font-size: 18px; }

/* ---------- Hero ---------- */
.mbr .mbr-hero {
	min-height: min(88vh, 860px);
	padding: 112px var(--mbr-pad) 128px;
	align-items: center;
	text-align: center;
	background: var(--mbr-bg);
}
/* The featured image (a blurred capture of the app in AUM) sits far back;
   a yellow light rises behind the icon. CSS, so a new hero image keeps it. */
.mbr .mbr-hero .wp-block-cover__background {
	opacity: 1 !important;
	background:
		radial-gradient(ellipse 38% 34% at 50% 30%, rgba(255, 214, 10, 0.2), transparent 70%),
		radial-gradient(ellipse 70% 60% at 50% 45%, rgba(15, 16, 18, 0.2), rgba(15, 16, 18, 0.78) 100%),
		linear-gradient(to bottom, rgba(15, 16, 18, 0.35) 0%, rgba(15, 16, 18, 0.3) 55%, var(--mbr-bg) 100%) !important;
}
.mbr .mbr-hero .wp-block-cover__inner-container { width: 100%; max-width: 980px; margin-inline: auto; }

.mbr .mbr-hero .mbr-icon { margin: 0 auto 32px; }
.mbr .mbr-hero .mbr-icon img {
	display: block;
	width: 136px;
	height: 136px;
	border-radius: 22.5%;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.1),
		0 0 56px rgba(255, 214, 10, 0.28),
		0 20px 44px rgba(0, 0, 0, 0.55);
}
.mbr-hero .mbr-eyebrow { margin-bottom: 20px; }
.mbr h1.mbr-title {
	font-weight: 800;
	font-size: clamp(44px, 8.4vw, 104px) !important;
	line-height: 0.98 !important;
	letter-spacing: -0.035em;
	margin: 0;
	color: var(--mbr-ink);
}
.mbr .mbr-subtitle {
	font-size: clamp(19px, 2.3vw, 26px);
	line-height: 1.35;
	color: var(--mbr-ink);
	opacity: 0.86;
	margin: 20px auto 0;
	max-width: 640px;
}

/* ClockBridge motif: four beat dots, the lit one walking across the bar. */
.mbr-beats {
	display: flex;
	justify-content: center;
	gap: 18px;
	margin: 40px 0 0;
}
.mbr-beats span {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--mbr-idle);
}
.mbr-beats span:first-child { background: var(--mbr-accent); box-shadow: 0 0 12px rgba(255, 214, 10, 0.7); }

/* NoteBridge motif: one mapping row, input boxes to output boxes. */
.mbr-map {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: 40px 0 0;
	font-weight: 700;
	font-size: 17px;
	line-height: 1;
	color: var(--mbr-ink);
}
.mbr-map span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	height: 48px;
	padding: 0 12px;
	border-radius: 10px;
	background: #08090a;
	border: 1px solid var(--mbr-line);
}
.mbr-map .mbr-map__arrow { min-width: 0; padding: 0 4px; background: none; border: 0; color: var(--mbr-grey); font-weight: 400; }
.mbr-map .mbr-map__out { background: var(--mbr-accent); border-color: var(--mbr-accent); color: #0f1012; box-shadow: 0 0 20px rgba(255, 214, 10, 0.45); }

/* App Store placeholder badge. */
.mbr .mbr-badge {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	margin: 40px auto 0;
	padding: 10px 24px 12px;
	border: 1px solid rgba(242, 243, 245, 0.4);
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.6);
	color: var(--mbr-ink);
	line-height: 1.1;
	text-align: left;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
/* Apple's own "Download on the App Store" badge, linked to the listing (live apps only). */
.mbr .mbr-store { margin: 40px auto 0; }
.mbr .mbr-store.mbr-store--end { margin-top: 48px; }
.mbr .mbr-store a { display: inline-block; border-radius: 10px; transition: transform 0.15s ease; }
.mbr .mbr-store a:hover { transform: translateY(-1px); }
.mbr .mbr-store img { display: block; width: 180px; height: auto; }
.mbr .mbr-store--end + .mbr-fineprint { margin-top: 16px; }
.mbr-badge__top { font-size: 12px; letter-spacing: 0.04em; color: var(--mbr-grey); }
.mbr-badge__main { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; color: #fff; }
.mbr .mbr-price { font-size: 15px; margin: 16px 0 0; color: var(--mbr-ink); opacity: 0.8; }
.mbr .mbr-jump {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin: 32px 0 0;
	color: var(--mbr-idle);
}
.mbr .mbr-jump a { color: var(--mbr-ink); text-decoration: none; padding: 8px 4px; }
.mbr .mbr-jump a:hover { color: var(--mbr-accent); }

/* ---------- What it does ---------- */
/* ClockBridge's ring states, drawn as the rings themselves. */
.mbr-states {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin: 40px 0 8px;
	padding: 0;
	list-style: none;
}
.mbr-states li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px 12px 14px;
	border: 1px solid var(--mbr-line);
	border-radius: 999px;
	background: var(--mbr-surface);
	font-size: 15px;
	color: var(--mbr-ink);
}
.mbr-states li::before {
	content: "";
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 4px solid var(--ring, var(--mbr-idle));
	box-sizing: border-box;
}
.mbr-states .is-locked { --ring: var(--mbr-accent); }
.mbr-states .is-locked::before { box-shadow: 0 0 10px rgba(255, 214, 10, 0.6); }
.mbr-states .is-lost { --ring: var(--mbr-red); }

/* ---------- Set it up ---------- */
.mbr-setup { background: var(--mbr-surface); }
.mbr-setup > h2,
.mbr-setup > .mbr-eyebrow { text-align: center; }
.mbr-steps { gap: 20px; margin-top: 48px; }
.mbr-step {
	position: relative;
	padding: 28px 24px;
	border: 1px solid var(--mbr-line);
	border-radius: 16px;
	background: var(--mbr-bg);
}
.mbr .mbr-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 2px solid var(--mbr-accent);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 14px;
	font-weight: 600;
	color: var(--mbr-accent);
	margin: 0;
}
.mbr-step h3 { margin-top: 16px; margin-bottom: 8px; }
.mbr-step p:last-child { margin-bottom: 0; font-size: 16px; }
.mbr .mbr-note { text-align: center; margin: 32px auto 0; max-width: 620px; font-size: 15px; }

/* ---------- Features ---------- */
.mbr-features > h2,
.mbr-features > .mbr-eyebrow { text-align: center; }
.mbr-cards { gap: 20px; margin-top: 48px; }
.mbr-card {
	position: relative;
	padding: 28px 24px 24px;
	border: 1px solid var(--mbr-line);
	border-radius: 16px;
	background: var(--mbr-surface);
}
/* A small lit dot, the apps' "on" state. */
.mbr-card::before {
	content: "";
	display: block;
	width: 10px;
	height: 10px;
	margin-bottom: 18px;
	border-radius: 50%;
	background: var(--mbr-accent);
	box-shadow: 0 0 10px rgba(255, 214, 10, 0.6);
}
.mbr-card h3 { margin: 0; font-size: 18px; }
.mbr-card p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; }
.mbr .mbr-fineprint {
	text-align: center;
	margin: 40px 0 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	letter-spacing: 0.06em;
	color: var(--mbr-ink);
}
.mbr-aside {
	margin-top: 40px;
	padding: 28px 32px;
	border: 1px solid rgba(255, 214, 10, 0.3);
	border-radius: 16px;
	background: rgba(255, 214, 10, 0.05);
}
.mbr-aside h3 { margin: 0; color: var(--mbr-accent); }
.mbr-aside p { margin: 8px 0 0; font-size: 16px; }

/* ---------- Screenshots ---------- */
.mbr-shots > h2,
.mbr-shots > .mbr-eyebrow { text-align: center; }
.mbr-shots .wp-block-columns { gap: 24px; margin-top: 48px; }
.mbr-shots > .wp-block-image { margin-top: 48px; }
.mbr .mbr-shot img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	border: 1px solid var(--mbr-line);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(255, 255, 255, 0.02);
}
.mbr .mbr-shot figcaption {
	margin-top: 16px;
	text-align: center;
	font-size: 14px;
	color: var(--mbr-grey);
}

/* ---------- Support ---------- */
.mbr-support > h2,
.mbr-support > .mbr-eyebrow,
.mbr-support > .mbr-intro { text-align: center; }
.mbr-support .wp-block-buttons { justify-content: center; gap: 16px; margin: 32px 0 48px; }
.mbr .wp-block-button__link {
	background: var(--mbr-accent);
	color: #0f1012;
	font-weight: 700;
	border-radius: 999px;
	padding: 14px 26px;
	text-decoration: none;
	box-shadow: 0 0 24px rgba(255, 214, 10, 0.3);
}
.mbr .wp-block-button__link:hover { color: #0f1012; filter: brightness(1.08); text-decoration: none; }
.mbr .is-style-ghost .wp-block-button__link {
	background: transparent;
	color: var(--mbr-ink);
	border: 1px solid var(--mbr-line);
	box-shadow: none;
}
.mbr .is-style-ghost .wp-block-button__link:hover { color: var(--mbr-accent); border-color: var(--mbr-accent); }

.mbr .mbr-faq-title { font-size: 15px; font-family: var(--wp--preset--font-family--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mbr-grey); margin: 0 0 8px; font-weight: 500; }
/* Questions light, answers grey. Set on the details element, the summary and
   anything inside it, with the text fill too: iOS Safari drew the questions
   in the site's dark ink on 2026-10-13 although desktop engines took the colour. */
.mbr .wp-block-details { border-color: var(--mbr-line); color: var(--mbr-ink); }
.mbr .wp-block-details > summary,
.mbr .wp-block-details > summary * {
	color: #f2f3f5 !important;
	-webkit-text-fill-color: #f2f3f5;
}
.mbr .wp-block-details > summary { font-size: 18px; font-weight: 700; padding: 20px 0; }
.mbr .wp-block-details > summary::after { border-color: var(--mbr-accent); }
.mbr .wp-block-details p { margin: 0 0 8px; font-size: 16px; color: #8b8f97 !important; -webkit-text-fill-color: #8b8f97; }
.mbr .wp-block-details p a { color: var(--mbr-accent) !important; -webkit-text-fill-color: var(--mbr-accent); }

/* ---------- Privacy ---------- */
.mbr-privacy { background: var(--mbr-surface); }
.mbr-privacy h2 { margin-bottom: 0; }
.mbr .mbr-updated {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mbr-accent);
	margin-top: 16px;
}
.mbr-privacy h3 { margin-top: 40px; margin-bottom: 8px; font-size: 18px; }
.mbr-privacy p { color: #b9bcc3; }
.mbr-privacy p + p { margin-top: 16px; }
.mbr .mbr-maker { margin-top: 48px; font-size: 14px; }

/* ---------- Motion (only when the visitor allows it) ---------- */
@media (prefers-reduced-motion: no-preference) {
	.mbr-beats span,
	.mbr-beats span:first-child {
		background: var(--mbr-idle);
		box-shadow: none;
		animation: mbr-beat 2s steps(1, end) infinite;
	}
	.mbr-beats span:nth-child(2) { animation-delay: 0.5s; }
	.mbr-beats span:nth-child(3) { animation-delay: 1s; }
	.mbr-beats span:nth-child(4) { animation-delay: 1.5s; }
	.mbr-map .mbr-map__out { animation: mbr-glow 2.4s ease-in-out infinite; }
	.mbr-card { transition: transform 0.3s ease, border-color 0.3s ease; }
	.mbr-card:hover { transform: translateY(-3px); border-color: rgba(255, 214, 10, 0.35); }
}
@keyframes mbr-beat {
	0% { background: var(--mbr-accent); box-shadow: 0 0 12px rgba(255, 214, 10, 0.7); }
	25% { background: var(--mbr-idle); box-shadow: none; }
}
@keyframes mbr-glow {
	0%, 100% { box-shadow: 0 0 12px rgba(255, 214, 10, 0.3); }
	50% { box-shadow: 0 0 28px rgba(255, 214, 10, 0.65); }
}

/* ---------- Phone ---------- */
@media (max-width: 781px) {
	.mbr { --mbr-band-y: 72px; font-size: 16px; }
	.mbr .mbr-hero { min-height: 0; padding: 72px var(--mbr-pad) 88px; }
	.mbr .mbr-hero .mbr-icon { margin-bottom: 24px; }
	.mbr .mbr-hero .mbr-icon img { width: 96px; height: 96px; }
	.mbr .mbr-lede { font-size: 17px; }
	.mbr-steps,
	.mbr-cards,
	.mbr-shots .wp-block-columns { margin-top: 32px; }
	.mbr-map { gap: 6px; font-size: 15px; }
	.mbr-map span { min-width: 46px; height: 42px; padding: 0 8px; }
	.mbr-states { gap: 10px; }
	.mbr-aside { padding: 24px; }
	.mbr .mbr-jump { line-height: 2.2; }
}
