89 lines
2.7 KiB
CSS
89 lines
2.7 KiB
CSS
/* ==========================================================================
|
|
tui-pages website - animated ASCII mountain background (chafa-rendered)
|
|
|
|
The mountain background is JS-driven: tools/mountain.py renders 60
|
|
procedural 3D mountain-flyover PNG frames; chafa converts each to 80x24
|
|
ASCII; tools/build_mountain_js.py bundles them into static/js/mountain.js.
|
|
static/js/mountain-bg.js cycles the frames at 12 fps into a single
|
|
<pre class="tp-mountain-frame"> element mounted at the bottom of <body>.
|
|
|
|
This CSS file:
|
|
- positions the frame as a full-bleed fixed background
|
|
- tints the dense characters rust-orange with text-shadow + glow
|
|
- adds a CRT scanline overlay
|
|
- disables the animation under prefers-reduced-motion
|
|
========================================================================== */
|
|
|
|
/* Full-bleed ASCII mountain background ---------------------------------- */
|
|
.tp-mountain-frame {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 0;
|
|
pointer-events: none;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
font-size: clamp(8px, 1.2vw, 14px);
|
|
line-height: 1.0;
|
|
letter-spacing: 0;
|
|
color: #f4a26b; /* warm rust-orange tint, picks up the brand */
|
|
text-shadow: 0 0 8px rgba(183, 65, 14, 0.35); /* phosphor glow */
|
|
opacity: 0.45;
|
|
white-space: pre;
|
|
background: transparent;
|
|
overflow: hidden;
|
|
user-select: none;
|
|
}
|
|
|
|
/* CRT scanlines overlay - a thin moving line every 2px. Faint so it doesn't
|
|
fight the page content. */
|
|
.tp-mountain-frame::after {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0;
|
|
background: repeating-linear-gradient(
|
|
to bottom,
|
|
transparent 0,
|
|
transparent 2px,
|
|
rgba(0, 0, 0, 0.20) 2px,
|
|
rgba(0, 0, 0, 0.20) 3px
|
|
);
|
|
pointer-events: none;
|
|
animation: tp-mtn-scanline 8s linear infinite;
|
|
mix-blend-mode: multiply;
|
|
}
|
|
|
|
@keyframes tp-mtn-scanline {
|
|
0% { background-position: 0 0; }
|
|
100% { background-position: 0 6px; }
|
|
}
|
|
|
|
/* Light theme: dim the background, drop the glow, switch to dark text. */
|
|
:root[data-theme="winter"] .tp-mountain-frame {
|
|
opacity: 0.20;
|
|
color: #2a1810;
|
|
text-shadow: none;
|
|
mix-blend-mode: multiply;
|
|
}
|
|
|
|
:root[data-theme="winter"] .tp-mountain-frame::after {
|
|
background: repeating-linear-gradient(
|
|
to bottom,
|
|
transparent 0,
|
|
transparent 2px,
|
|
rgba(255, 255, 255, 0.12) 2px,
|
|
rgba(255, 255, 255, 0.12) 3px
|
|
);
|
|
mix-blend-mode: screen;
|
|
}
|
|
|
|
/* Reduced motion: keep the first frame static, no scanline drift. */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.tp-mountain-frame::after {
|
|
animation: none !important;
|
|
}
|
|
}
|