/* ==========================================================================
   Mountain Labs — homepage
   Palette:  #0b0e0c bg / #12160f panel / #e8e3d3 ink / #ffb000 amber
             #7fd8c9 signal (cool, used sparingly) / #3a4038 hairline
   Type:     monospace throughout — this is a terminal, not a brochure.
   ========================================================================== */

:root {
	--ml-bg: #0b0e0c;
	--ml-panel: #12160f;
	--ml-ink: #e8e3d3;
	--ml-ink-dim: #9a9585;
	--ml-amber: #ffb000;
	--ml-amber-dim: #8a6a2f;
	--ml-signal: #7fd8c9;
	--ml-line: #2c3129;
	--ml-mono: ui-monospace, "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular",
		Menlo, Consolas, "Liberation Mono", monospace;
}

.ml-home {
	background: var(--ml-bg);
	color: var(--ml-ink);
	font-family: var(--ml-mono);
	margin: 0;
	overflow-x: hidden;
}

.ml-home *,
.ml-home *::before,
.ml-home *::after {
	box-sizing: border-box;
}

.ml-home :focus-visible {
	outline: 2px solid var(--ml-amber);
	outline-offset: 3px;
}

/* -------------------------------------------------- contour background -- */

#ml-contours {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	opacity: 0.55;
	pointer-events: none;
}

/* -------------------------------------------------------------- layout -- */

.ml-wrap {
	position: relative;
	z-index: 1;
	max-width: 780px;
	margin: 0 auto;
	padding: clamp(2rem, 6vw, 5rem) 1.5rem 4rem;
}

/* ------------------------------------------------------------- hero ----- */

.ml-hero {
	min-height: min(70vh, 640px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2.5rem;
}

.ml-terminal {
	border: 1px solid var(--ml-line);
	background: rgba(18, 22, 15, 0.7);
	padding: 1.25rem 1.5rem;
	font-size: 0.85rem;
	line-height: 1.9;
	color: var(--ml-ink-dim);
	backdrop-filter: blur(2px);
}

.ml-line {
	margin: 0;
	white-space: pre-wrap;
	border-right: 2px solid transparent;
	overflow: hidden;
	width: 0;
	animation: ml-reveal 0s linear forwards;
}

.ml-line .ml-ok {
	color: var(--ml-signal);
}

.ml-cursor {
	color: var(--ml-amber);
	animation: ml-blink 1s step-end infinite;
}

.ml-title {
	margin: 0;
}

.ml-title-main {
	display: block;
	font-size: clamp(2.4rem, 9vw, 4.2rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ml-amber);
	text-shadow: 0 0 24px rgba(255, 176, 0, 0.25);
}

.ml-title-sub {
	display: block;
	margin-top: 0.6rem;
	font-size: clamp(0.85rem, 2.4vw, 1rem);
	font-weight: 400;
	color: var(--ml-ink-dim);
	letter-spacing: 0.02em;
}

/* -------------------------------------------------------- telemetry ---- */

.ml-telemetry {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: var(--ml-line);
	border: 1px solid var(--ml-line);
	margin: 3rem 0;
}

.ml-stat {
	background: var(--ml-panel);
	padding: 0.9rem 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.ml-stat-label {
	font-size: 0.65rem;
	letter-spacing: 0.1em;
	color: var(--ml-ink-dim);
}

.ml-stat-value {
	font-size: 0.95rem;
	color: var(--ml-ink);
}

.ml-stat-value.ml-ok {
	color: var(--ml-signal);
}

@media (max-width: 560px) {
	.ml-telemetry {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* --------------------------------------------------------------- log --- */

.ml-log-heading {
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	color: var(--ml-amber-dim);
	text-transform: lowercase;
	font-weight: 400;
	margin: 0 0 1.25rem;
}

.ml-entry {
	border-top: 1px solid var(--ml-line);
	padding: 1.1rem 0;
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 1rem;
}

.ml-entry:last-child {
	border-bottom: 1px solid var(--ml-line);
}

.ml-entry-time {
	font-size: 0.7rem;
	color: var(--ml-ink-dim);
	letter-spacing: 0.05em;
}

.ml-entry p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.65;
	color: var(--ml-ink);
}

.ml-entry:last-child p {
	color: var(--ml-amber-dim);
	letter-spacing: 0.25em;
	cursor: default;
}

@media (max-width: 560px) {
	.ml-entry {
		grid-template-columns: 1fr;
		gap: 0.35rem;
	}
}

/* ------------------------------------------------------------ footer --- */

.ml-footer {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--ml-line);
	font-size: 0.7rem;
	color: var(--ml-ink-dim);
}

/* ------------------------------------------------------ classified ----- */

.ml-classified {
	position: fixed;
	inset: 0;
	z-index: 10;
	background: rgba(11, 14, 12, 0.92);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

.ml-classified[hidden] {
	display: none;
}

.ml-classified-inner {
	position: relative;
	max-width: 520px;
	width: 100%;
	border: 1px solid var(--ml-amber-dim);
	background: var(--ml-panel);
	padding: 2rem 1.75rem;
	box-shadow: 0 0 40px rgba(255, 176, 0, 0.12);
}

.ml-classified-stamp {
	margin: 0 0 1rem;
	font-size: 0.7rem;
	letter-spacing: 0.15em;
	color: var(--ml-amber);
}

.ml-classified-body {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--ml-ink);
	min-height: 4.5em;
}

.ml-classified-close {
	position: absolute;
	top: 0.75rem;
	right: 0.9rem;
	background: none;
	border: none;
	color: var(--ml-ink-dim);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.ml-classified-close:hover {
	color: var(--ml-amber);
}

/* -------------------------------------------------------- animation ---- */

@keyframes ml-blink {
	50% {
		opacity: 0;
	}
}

@keyframes ml-reveal {
	to {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ml-line {
		width: 100%;
		animation: none;
	}

	.ml-cursor {
		animation: none;
	}

	#ml-contours {
		display: none;
	}
}
