/* ==========================================================================
   POOLS PROS — boot screen (v2)
   The wordmark is revealed by rising water. Same solver as everything else,
   so the line that uncovers the logo is a real surface, not a gradient.
   ========================================================================== */

.boot--v2 {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: #05121d;
	display: block;
	overflow: hidden;
	transition: opacity 0.6s var(--ease);
}

/* A real pool photograph, graded back so the type still reads on top. */
.boot__photo {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background: #05121d;
}

.boot__photo img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 118%;
	height: 118%;
	transform: translate(-50%, -50%);
	object-fit: cover;
	filter: saturate(0.72) contrast(1.04) brightness(0.5);
	transform-origin: center;
	animation: bootdrift 26s var(--ease-io) infinite alternate;
}

/* the wash of water sweeping over everything as the page takes over */
.boot--v2::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 5;
	background: var(--ink);
	transform: scaleY(0);
	transform-origin: bottom;
	pointer-events: none;
	transition: transform 0.9s var(--ease);
}

.boot--v2.is-out { opacity: 0; }
.boot--v2.is-out::after { transform: scaleY(1); }

@keyframes bootdrift {
	from { transform: translate(-50%, -50%) scale(1.04); }
	to { transform: translate(-50%, -50%) scale(1.14); }
}

/* backdrop */
.boot__caustics {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	opacity: 0.3;
	mix-blend-mode: screen;
	z-index: 1;
}

.boot__grid {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
	background-image:
		linear-gradient(to right, rgba(233, 244, 245, 0.045) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(233, 244, 245, 0.045) 1px, transparent 1px);
	background-size: calc(100% / 12) 100%, 100% 96px;
}

/* legibility over bright water */
.boot__veil {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(to right, rgba(5, 18, 29, 0.72) 0%, rgba(5, 18, 29, 0.18) 46%, rgba(5, 18, 29, 0.1) 100%),
		linear-gradient(to top, rgba(5, 18, 29, 0.86) 0%, rgba(5, 18, 29, 0.2) 38%, rgba(5, 18, 29, 0.1) 100%);
}

.boot__frame {
	position: relative;
	z-index: 2;
	height: 100%;
	width: 100%;
	max-width: 1560px;
	margin-inline: auto;
	padding: clamp(1.1rem, 2.4vw, 2rem) var(--gutter);
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: clamp(1rem, 3vh, 2.5rem);
}

/* ------------------------------------------------------------- top bar -- */
.boot__bar {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid var(--line);
}

.boot__bar span:first-child { color: var(--text-2); }
.boot__bar span:last-child { color: var(--text-3); }

/* -------------------------------------------------------------- centre -- */
.boot__center {
	display: grid;
	place-content: center;
	justify-items: center;
	gap: clamp(1rem, 2.4vh, 1.75rem);
	min-height: 0;
}

.boot__mark {
	display: block;
	width: min(440px, 64vw);
	height: auto;
}

.boot__strap {
	font-family: var(--font-mono);
	font-size: 0.625rem;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--text-3);
	text-align: center;
	padding-left: 0.34em;
}

.boot__strap b {
	color: var(--aqua);
	font-weight: 400;
}

/* letters arrive one by one, so the line reads as typed rather than pasted */
.boot__strap span {
	display: inline-block;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.boot__strap span.is-on { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- foot -- */
.boot__foot {
	display: grid;
	gap: clamp(0.85rem, 2vh, 1.5rem);
}

/* the tank: full width, real surface */
.boot__tank {
	position: relative;
	height: clamp(66px, 10vh, 104px);
	border: 1px solid var(--line-strong);
	overflow: hidden;
	background: #05080a;
}

.boot__tank canvas {
	display: block;
	width: 100%;
	height: 100%;
}

/* inlet pipe */
.boot__inlet {
	position: absolute;
	top: 0;
	left: 50%;
	width: 72px;
	height: 3px;
	transform: translateX(-50%);
	background: var(--line-strong);
}

.boot__inlet::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 3px;
	width: 1px;
	height: 12px;
	transform: translateX(-50%);
	background: linear-gradient(to bottom, var(--aqua), transparent);
}

/* readout row */
.boot__readout {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--line);
}

.boot__status {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--font-mono);
	font-size: 0.5625rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--text-3);
}

.boot__status::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--aqua);
	animation: bootpulse 1.5s var(--ease-io) infinite;
}

@keyframes bootpulse {
	0%, 100% { opacity: 0.2; transform: scale(0.8); }
	50% { opacity: 1; transform: scale(1); }
}

/* the percentage, on rolling digits */
.odo {
	display: inline-flex;
	align-items: flex-start;
	font-family: var(--font-mono);
	font-size: clamp(1.5rem, 3.6vw, 2.6rem);
	line-height: 1;
	letter-spacing: 0.02em;
	color: var(--text);
	font-variant-numeric: tabular-nums;
}

.odo__digit {
	display: block;
	height: 1em;
	overflow: hidden;
}

.odo__strip {
	display: block;
	transition: transform 0.45s var(--ease);
}

.odo__strip i {
	display: block;
	height: 1em;
	line-height: 1;
	font-style: normal;
}

.odo__unit {
	font-size: 0.34em;
	letter-spacing: 0.2em;
	color: var(--aqua);
	align-self: flex-end;
	padding-bottom: 0.25em;
	padding-left: 0.35em;
}

.boot__log {
	font-family: var(--font-mono);
	font-size: 0.625rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text-2);
	text-align: right;
	min-height: 1.2em;
	max-width: 46ch;
}

.boot__log span {
	opacity: 0;
	transition: opacity 0.28s linear;
}

.boot__log span.is-on { opacity: 1; }
.boot__log span.is-done { color: var(--aqua); }

/* fine print bottom left */
.boot__fine {
	position: absolute;
	left: var(--gutter);
	bottom: clamp(1.1rem, 2.4vw, 2rem);
	z-index: 3;
	font-family: var(--font-mono);
	font-size: 0.5rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--text-3);
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	opacity: 0.7;
}

@media (max-width: 640px) {
	.boot__readout { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
	.boot__log { text-align: left; }
	.boot__fine { display: none; }
	.boot__tank { height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
	.boot__caustics { display: none; }
	.boot__status::before { animation: none; opacity: 1; }
	.odo__strip { transition: none; }
	.boot__strap span { transition: none; opacity: 1; transform: none; }
}