*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
html,
body {
	width: 100%;
	height: 100%;
	overflow: hidden;
	font-family: "Syne", sans-serif;
	cursor: none;
	transition: background 2.5s ease;
}
body {
	background: #0f0a06;
}
canvas {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
}
#c-bg {
	z-index: 1;
}
#c-fx {
	z-index: 2;
}
#c-top {
	z-index: 3;
	pointer-events: none;
}
#grain {
	position: fixed;
	inset: -200%;
	width: 400%;
	height: 400%;
	z-index: 4;
	pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	opacity: 0.03;
	animation: gr 0.1s steps(1) infinite;
}
@keyframes gr {
	0% {
		transform: translate(0, 0);
	}
	10% {
		transform: translate(-4%, -3%);
	}
	20% {
		transform: translate(3%, 5%);
	}
	30% {
		transform: translate(-2%, 4%);
	}
	40% {
		transform: translate(6%, -2%);
	}
	50% {
		transform: translate(-3%, 2%);
	}
	60% {
		transform: translate(2%, 6%);
	}
	70% {
		transform: translate(-5%, -1%);
	}
	80% {
		transform: translate(1%, 3%);
	}
	90% {
		transform: translate(-2%, -4%);
	}
	100% {
		transform: translate(4%, 2%);
	}
}
#vig {
	position: fixed;
	inset: 0;
	z-index: 5;
	pointer-events: none;
}
#dot {
	position: fixed;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	pointer-events: none;
	z-index: 999;
	transform: translate(-50%, -50%);
	mix-blend-mode: screen;
	transition: background 0.8s;
}
#ring {
	position: fixed;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	pointer-events: none;
	z-index: 998;
	transform: translate(-50%, -50%);
	transition: width 0.3s, height 0.3s, border 0.4s;
}

/* NAV */
#mode-switcher {
	position: fixed;
	top: 1.4rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 20;
	pointer-events: all;
}
#mode-track {
	position: relative;
	display: flex;
	align-items: center;
	height: 40px;
	border-radius: 20px;
	padding: 4px;
	border: 1px solid rgba(255, 255, 255, 0.09);
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	transition: border-color 1s ease, background 1s ease;
}
.mode-pill {
	position: relative;
	z-index: 2;
	padding: 0 1rem;
	height: 32px;
	border-radius: 16px;
	border: none;
	background: transparent;
	font-family: "Syne", sans-serif;
	font-weight: 600;
	font-size: 0.65rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: none;
	outline: none;
	transition: color 0.4s, background 0.4s, font-weight 0.3s;
	white-space: nowrap;
}
.mode-pill:hover {
	opacity: 0.85;
}
#mode-thumb {
	position: absolute;
	top: 4px;
	height: 32px;
	border-radius: 16px;
	pointer-events: none;
	z-index: 1;
	transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
		width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.8s;
}

/* UI */
#ui {
	position: fixed;
	inset: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	gap: 0;
}

#hero {
	text-align: center;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 2s cubic-bezier(0.16, 1, 0.3, 1),
		transform 2s cubic-bezier(0.16, 1, 0.3, 1);
	margin-bottom: 0.6rem;
}
#hero.in {
	opacity: 1;
	transform: translateY(0);
}

#h1-text {
	font-family: "Cormorant Garamond", serif;
	font-weight: 300;
	font-style: italic;
	font-size: clamp(3.2rem, 6.5vw, 7rem);
	line-height: 1;
	letter-spacing: -0.02em;
	display: block;
	text-align: center;
	transition: opacity 1.2s;
}
.word-wrap {
	display: inline;
	white-space: nowrap;
}
.accent-word .char {
	font-style: normal;
}
.char {
	display: inline-block;
	will-change: transform;
	transition: color 1.2s, opacity 0.4s;
}
.word-space {
	display: inline-block;
	width: 0.28em;
}

.tagline {
	display: block;
	margin-top: 0.4rem;
	font-family: "Syne", sans-serif;
	font-weight: 300;
	font-size: clamp(0.42rem, 0.68vw, 0.55rem);
	letter-spacing: 0.4em;
	text-transform: uppercase;
	transition: opacity 1.2s, color 1.2s;
	will-change: transform;
}
body.active #h1-text {
	opacity: 0.18;
}
body.active .tagline {
	opacity: 0.18;
}

#cue {
	font-family: "Cormorant Garamond", serif;
	font-style: italic;
	font-weight: 300;
	font-size: clamp(0.84rem, 1.1vw, 1rem);
	letter-spacing: 0.08em;
	opacity: 0;
	transition: opacity 1.2s, color 1.2s;
	text-align: center;
	margin-bottom: 1.6rem;
	will-change: transform;
}
#cue.show {
	opacity: 1;
}
.cue-char {
	display: inline-block;
	will-change: transform;
}

#btn-wrap {
	pointer-events: all;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s,
		transform 2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}
#btn-wrap.in {
	opacity: 1;
	transform: translateY(0);
}
#breath-btn {
	position: relative;
	width: 112px;
	height: 112px;
	border-radius: 50%;
	background: transparent;
	border: none;
	outline: none;
	cursor: none;
	display: flex;
	align-items: center;
	justify-content: center;
}
#btn-fill {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.14);
	transition: transform 0.12s linear, border-color 0.12s, box-shadow 0.12s,
		background 0.12s;
}
#ir1,
#ir2 {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	border: 1px solid transparent;
}
#ir1 {
	inset: -12px;
	animation: idr 4.5s ease-in-out infinite;
}
#ir2 {
	inset: -24px;
	animation: idr 4.5s ease-in-out infinite 1.5s;
}
@keyframes idr {
	0%,
	100% {
		transform: scale(1);
		opacity: 0;
	}
	50% {
		transform: scale(1.05);
		opacity: 0.55;
	}
}
#btn-label {
	position: relative;
	z-index: 2;
	font-family: "Syne", sans-serif;
	font-weight: 800;
	font-size: 0.52rem;
	letter-spacing: 0.44em;
	text-transform: uppercase;
	margin-right: -0.44em;
	pointer-events: none;
	user-select: none;
	transition: color 0.8s;
}

#affirmation {
	position: fixed;
	bottom: 28%;
	left: 50%;
	transform: translateX(-50%);
	z-index: 12;
	pointer-events: none;
	text-align: center;
	width: min(560px, 88vw);
	opacity: 0;
	transition: opacity 2.2s ease;
}
#affirmation p {
	font-family: "Cormorant Garamond", serif;
	font-style: italic;
	font-weight: 300;
	font-size: clamp(0.95rem, 1.8vw, 1.38rem);
	line-height: 1.62;
	letter-spacing: 0.03em;
}

#bar-counter {
	position: fixed;
	bottom: 1.8rem;
	right: 2.2rem;
	z-index: 11;
	display: flex;
	align-items: flex-end;
	gap: 3px;
	height: 30px;
	opacity: 0;
	transition: opacity 1s 0.8s;
}
#bar-counter.show {
	opacity: 1;
}
.breath-bar {
	width: 3px;
	border-radius: 1px 1px 0 0;
	transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
#bar-lbl {
	position: fixed;
	bottom: 0.6rem;
	right: 2.2rem;
	z-index: 11;
	font-size: 0.4rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity 1s 0.8s, color 1s;
}
#bar-lbl.show {
	opacity: 1;
}
#session-label {
	position: fixed;
	bottom: 1.8rem;
	left: 2.2rem;
	z-index: 11;
	opacity: 0;
	transition: opacity 1s 0.8s;
}
#session-label.show {
	opacity: 1;
}
#session-label .sl-p {
	font-family: "Cormorant Garamond", serif;
	font-style: italic;
	font-weight: 300;
	font-size: 0.84rem;
	letter-spacing: 0.04em;
	transition: color 1s;
}
#session-label .sl-d {
	font-size: 0.42rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	margin-top: 0.22rem;
	transition: color 1s;
}
#track-name {
	position: fixed;
	bottom: 1.4rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 11;
	text-align: center;
	font-family: "Cormorant Garamond", serif;
	font-style: italic;
	font-weight: 300;
	font-size: 0.76rem;
	letter-spacing: 0.05em;
	opacity: 0;
	transition: opacity 1.5s, color 1s;
	pointer-events: none;
	max-width: 420px;
}
#track-name.show {
	opacity: 1;
}

.ripple {
	position: fixed;
	border-radius: 50%;
	pointer-events: none;
	z-index: 9;
	transform: translate(-50%, -50%) scale(0);
	animation: rpo 0.85s ease-out forwards;
}
@keyframes rpo {
	to {
		transform: translate(-50%, -50%) scale(1);
		opacity: 0;
	}
}

#mode-flash {
	position: fixed;
	inset: 0;
	z-index: 50;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.18s ease;
}
#mode-flash.pop {
	opacity: 1;
}