/* Landing: full-screen loading then centered options */
.tytype-landing-page .site-main {
	max-width: none;
	padding: 0;
	margin: 0;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tytype-landing-screen {
	position: relative;
	width: 100%;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ----- Meditative gradient + pulsating circles (homepage background) ----- */
.tytype-landing-bg {
	position: fixed;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}

.tytype-landing-homepage-bg,
.tytype-landing-theme-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.tytype-landing-fallback-bg {
	position: absolute;
	inset: 0;
	background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.tytype-landing-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	opacity: 0.5;
	animation: tytype-orb-pulse 8s ease-in-out infinite;
}

.tytype-landing-orb--1 {
	width: 40vmin;
	height: 40vmin;
	left: 10%;
	top: 15%;
	background: rgba(134, 239, 172, 0.4);
	animation-duration: 12s;
	animation-delay: 0s;
}

.tytype-landing-orb--2 {
	width: 35vmin;
	height: 35vmin;
	right: 15%;
	top: 25%;
	background: rgba(167, 243, 208, 0.35);
	animation-duration: 10s;
	animation-delay: -2s;
}

.tytype-landing-orb--3 {
	width: 50vmin;
	height: 50vmin;
	left: 50%;
	bottom: 10%;
	background: rgba(187, 247, 208, 0.3);
	animation-duration: 15s;
	animation-delay: -4s;
}

.tytype-landing-orb--4 {
	width: 25vmin;
	height: 25vmin;
	left: 25%;
	bottom: 30%;
	background: rgba(110, 231, 183, 0.35);
	animation-duration: 9s;
	animation-delay: -1s;
}

.tytype-landing-orb--5 {
	width: 30vmin;
	height: 30vmin;
	right: 25%;
	bottom: 20%;
	background: rgba(167, 243, 208, 0.25);
	animation-duration: 11s;
	animation-delay: -3s;
}

.tytype-landing-orb--6 {
	width: 45vmin;
	height: 45vmin;
	left: 40%;
	top: 40%;
	background: rgba(204, 251, 230, 0.25);
	animation-duration: 14s;
	animation-delay: -5s;
}

@keyframes tytype-orb-pulse {
	0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.5; }
	25% { transform: scale(1.15) translate(3%, -2%); opacity: 0.65; }
	50% { transform: scale(0.92) translate(-2%, 3%); opacity: 0.4; }
	75% { transform: scale(1.08) translate(2%, 2%); opacity: 0.55; }
}

/* Choose theme button on homepage: fixed position with space from screen edge */
.tytype-theme-toggle--landing {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 100;
}

/* ----- Loading phase: full viewport, black background ----- */
.tytype-loading {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	min-height: 100%;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
	pointer-events: auto;
}

.tytype-loading.ended {
	pointer-events: none;
}

.tytype-loading-inner {
	text-align: center;
}

.tytype-loading-brand {
	margin: 0;
	font-size: clamp(3rem, 14vw, 6rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	color: #fff;
	white-space: nowrap;
}

.tytype-loading-logo {
	display: block;
	max-width: min(85vw, 520px);
	width: 100%;
	height: auto;
}

.tytype-loading-logo [id^="letter-"] {
	transform-origin: 50% 50%;
}

.tytype-letter {
	display: inline-block;
	transform-origin: 50% 70%;
	text-shadow: 0 0 0 transparent;
}

/* ----- Options phase: full height so hands can sit at bottom ----- */
.tytype-options-phase {
	position: relative;
	z-index: 5;
	width: 100%;
	min-height: 100vh;
	height: 100vh;
	display: flex;
	align-items: stretch;
	justify-content: center;
	padding: 2rem;
	opacity: 0;
	visibility: hidden;
	box-sizing: border-box;
}

.tytype-options-phase.visible {
	opacity: 1;
	visibility: visible;
}

/* Wrapper: full height column – card centered above, hands anchored at bottom */
.tytype-landing-wrap {
	width: 100%;
	min-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Top half: flex growth, centers the interface card */
.tytype-landing-wrap-top {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

/* iOS-style glossy card: white, rounded, semi-transparent with backdrop blur */
.tytype-landing {
	text-align: center;
	width: 100%;
	max-width: 400px;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-radius: 24px;
	padding: 2rem 1.75rem;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.4) inset,
		0 4px 24px rgba(0, 0, 0, 0.08),
		0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Hands: grow to fill space below card, image pinned to bottom of viewport */
.tytype-landing-hands-wrap {
	flex: 1;
	min-height: 0;
	width: 100%;
	max-width: 420px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.tytype-landing-hands {
	width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: bottom center;
	display: block;
}

.tytype-brand-small {
	margin-bottom: 2rem;
	line-height: 0;
}
.tytype-brand-small .tytype-brand-small-logo {
	display: block;
	width: 100%;
	max-width: 200px;
	height: auto;
	margin: 0 auto;
}

.tytype-landing-options {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.tytype-landing-btn {
	display: block;
	padding: 1rem 1.5rem;
	font-size: 1.1rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 12px;
	border: none;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
}
.tytype-landing-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.tytype-landing-btn:focus {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
}

.tytype-landing-btn-solo {
	background: linear-gradient(135deg, #22c55e, #16a34a);
	color: #fff;
}
.tytype-landing-btn-learn {
	background: linear-gradient(135deg, #3b82f6, #2563eb);
	color: #fff;
	border: none;
	width: 100%;
	font-family: inherit;
}

/* ----- Learn Blind Typing modal ----- */
.tytype-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}
.tytype-modal[data-open="true"] {
	display: flex;
	opacity: 1;
	visibility: visible;
}

.tytype-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	cursor: pointer;
}

.tytype-modal-box {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	padding: 1.5rem 1.75rem;
}

.tytype-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 36px;
	height: 36px;
	padding: 0;
	font-size: 1.5rem;
	line-height: 1;
	color: #6b7280;
	background: none;
	border: none;
	cursor: pointer;
	border-radius: 8px;
	transition: color 0.2s, background 0.2s;
}
.tytype-modal-close:hover {
	color: #111;
	background: #f3f4f6;
}

.tytype-modal-title {
	margin: 0 2rem 1rem 0;
	font-size: 1.5rem;
	font-weight: 700;
	color: #111;
}

.tytype-modal-content {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.tytype-modal-img {
	width: 100%;
	height: auto;
	border-radius: 10px;
	object-fit: cover;
}

.tytype-modal-img-placeholder {
	width: 100%;
	height: 200px;
	background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
	border-radius: 10px;
}

.tytype-modal-text {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #374151;
}
.tytype-modal-text p {
	margin: 0 0 0.75rem 0;
}
.tytype-modal-text p:last-child {
	margin-bottom: 0;
}

.tytype-modal-link {
	color: #2563eb;
	font-weight: 600;
	text-decoration: none;
}
.tytype-modal-link:hover {
	text-decoration: underline;
}
