/**
 * File:          assets/css/scene.css
 * Version:       0.1.0
 * Last Modified: 2026-08-11
 * Changes:       The fixed WebGL field, its vignettes, the nav, and the HUD.
 */

/* --- The field ------------------------------------------------------------ */
/* Three fixed layers behind everything: a radial base (which is also the
   fallback if WebGL is unavailable), the shader canvas, and a vignette that
   darkens the edges so foreground text always has a calmer ground. */

.field,
.field__canvas,
.field__vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.field {
  z-index: 0;
  background: radial-gradient(ellipse at 50% 30%, var(--void-2) 0%, var(--void) 70%);
}
.field__canvas {
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: block;
}
.field__vignette {
  z-index: 2;
  background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0) 30%, rgba(2, 3, 7, 0.5) 100%);
}

.page { position: relative; z-index: 3; }

/* --- Nav ------------------------------------------------------------------ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: 18px var(--grid-margin);
  background: rgba(4, 5, 10, 0.72);
  border-bottom: 1px solid var(--hairline);
}
@supports (backdrop-filter: blur(4px)) {
  /* The tint can lighten once blur is doing the separation, but it stays high
     enough that headline text scrolling underneath never ghosts through. */
  .nav { background: rgba(4, 5, 10, 0.55); backdrop-filter: blur(16px); }
}

.wordmark {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--cyan); }

.nav__links {
  display: flex;
  gap: clamp(var(--s2), 2.6vw, 36px);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav__links a {
  color: var(--text-2);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.nav__links a:hover,
.nav__links a[aria-current="true"] { color: var(--cyan); border-bottom-color: var(--cyan); }

.nav__cta {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--void);
  background: var(--cyan);
  padding: 11px 22px;
  border-radius: var(--r-sm);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 24px var(--glow-cyan);
  transition: background var(--dur-fast) var(--ease);
}
.nav__cta:hover { background: #7FF3FF; color: var(--void); }

/* Below 720px the section links move to a scrolling second row rather than
   disappearing — this page is long, and one nav target is not navigation. */
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; padding-block: 12px; }
  .nav__links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__links a { white-space: nowrap; }
}

/* --- HUD ------------------------------------------------------------------ */
/* Names the scene you are currently flying through. It is a wayfinder, not an
   ornament: five acts of full-bleed shader would otherwise give the reader no
   sense of position at all. */

.hud {
  position: fixed;
  bottom: 32px;
  left: var(--grid-margin);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.hud.is-on { opacity: 1; }

.hud__index {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.hud__track {
  width: 56px;
  height: 2px;
  background: rgba(234, 242, 255, 0.2);
  position: relative;
  overflow: hidden;
}
.hud__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 20%;
  background: var(--cyan);
  transition: width var(--dur-base) var(--ease);
}
.hud__name {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-2);
}

@media (max-width: 720px) { .hud { display: none; } }

/* === END OF FILE (FILENAME: assets/css/scene.css) === */
