/* ── LANDING ── */
.landing {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.4rem 0;
  overflow-y: auto;
  transition: opacity 0.5s ease;
}

body.manifesto-transitioning .landing { overflow-y: hidden; }

.site-name-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  opacity: 0;
  animation: fadeUp 1s ease 0.3s forwards;
  position: relative;
  z-index: 3;
  padding-left: 3rem;
  /* Hero font-size lives here (JS overrides with a fitted px value). The mark
     height (0.74em) and gap (0.16em) follow it in em, so one JS write scales the
     whole lockup — the mark can't go stale on its own. clamp() is the no-JS size. */
  font-size: clamp(3rem, 12vw, 18rem);
  gap: 0.16em;
}

.site-mark {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 0.74em;
  color: var(--cream);
  /* Matches the wordmark exactly: same bloom glow, no scrim, same resting opacity.
     Starts hidden and landing.js fades it to 0.65 over the scramble so the lockup
     arrives as one. */
  filter: url(#text-bloom);
  opacity: 0;
}
.site-mark svg {
  height: 100%;
  width: auto;
  display: block;
}

.site-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 1em;            /* inherits the fitted hero size from .site-name-wrap */
  /* Fills the row to the viewport edge so the #text-bloom filter region (a % of
     the box) is wide enough that its hard rectangular edges fall off-screen
     rather than clipping the bloom just left of the first letter. */
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  filter: url(#text-bloom);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--cream);
  opacity: 0.65;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: block;
  text-align: left;
  line-height: 0.95;
}

/* #12 fallback: applied by landing.js only if the #text-bloom SVG filter is
   missing. Approximates the bloom glow + a readability halo so the hero never
   renders naked. Not present in normal operation. */
.site-name--nobloom {
  filter: none;
  text-shadow:
    0 0 18px rgba(var(--cream-rgb),0.45),
    0 0 6px rgba(var(--cream-rgb),0.35),
    0 1px 4px rgba(0,0,0,0.5);
}

/* ── LANDING BACKGROUNDS ── */
#landingBg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.landing-bg-design {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.85;
  filter: saturate(1.15);
  transition: opacity 0.9s ease;
}

.landing-bg-design.dimmed {
  opacity: 0;
}

/* WebGL canvas: stacks above the static <img> inside #landingBg so it covers
   the fallback. Inherits dim/transition mirroring from .landing-bg-design via
   landing-bg.js MutationObserver. */
.landing-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.85;
  filter: saturate(1.15);
  transition: opacity 0.9s ease;
  pointer-events: none;
  display: block;
}

.landing-bg-canvas.dimmed {
  opacity: 0;
}

/* When the WebGL canvas is alive, hide the static <img> fallback so the
   two layers don't composite. bgDesignEl still receives the inline opacity
   changes the page-open transitions emit — the MutationObserver in
   landing-bg.js mirrors those onto the canvas. */
body.landing-bg-canvas-active .landing-bg-design {
  visibility: hidden;
}

#landingBgHover {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}

#landingBgHover.active {
  opacity: 1;
}

.landing-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.15);
  display: block;
}

#landingBgHover .landing-bg-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

/* ── LANDING MAIN ── */
.landing-main {
  flex: 1 0 auto;
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
}

/* ── NAV ── */
.landing-nav {
  display: flex;
  flex-direction: column;
}

.landing-main .landing-nav {
  flex: 1;
  min-width: 0;
  padding-left: 3rem;
  padding-right: 2rem;
  align-self: center;
}

.nav-item {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 1.5rem;
  padding: 2rem 0;
  text-decoration: none;
  color: var(--cream);
  cursor: pointer;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  pointer-events: auto;
}

.nav-item:nth-child(1) { animation-delay: 0.55s; }
.nav-item:nth-child(2) { animation-delay: 0.70s; }
.nav-item:nth-child(3) { animation-delay: 0.85s; }
.nav-item:nth-child(4) { animation-delay: 1.00s; }

.nav-item .nav-label {
  font-family: 'DM Mono', monospace;
  font-size: clamp(1rem, 2.736vw, 3.6rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  text-align: left;
  position: relative;
  transform-origin: left center;   /* scale grows/recedes from the // marker side */
  /* dark readability halo over the bloom art (default state); hover swaps to accent glow */
  text-shadow: 0 1px 6px rgba(0,0,0,0.55), 0 0 2px rgba(0,0,0,0.5);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), text-shadow 0.4s ease, opacity 0.4s ease, filter 0.4s ease, color 0.4s ease;
  pointer-events: auto;
}

/* #2 — non-hovered rows go out of focus (blur, not dim). Same :has() gate as the
   old spotlight: gated on a row actually being hovered, not container :hover, so
   the empty column area doesn't blur all four. Labels only — nums stay crisp. */
.landing-nav:has(.nav-item:hover) .nav-item:not(:hover) .nav-label {
  filter: blur(2.5px);
  transform: scale(0.92);          /* recede — paired with the hovered row's zoom-in */
}
.landing-nav:has(.nav-item:hover) .nav-item:not(:hover) .nav-num {
  filter: blur(2.5px);
}

.nav-item:hover .nav-label {
  transform: translateX(0.6rem) scale(1.08);
  color: var(--accent);
  text-shadow: 0 0 12px rgba(var(--accent-rgb),0.55), 0 0 30px rgba(var(--accent-rgb),0.25);
}

/* #1 — blinking prompt caret on the hovered row (terminal "active line").
   Trailing block cursor, accent-colored, appears only on hover. No layout shift
   on the other rows since it lives in the hovered label's ::after. */
.nav-item .nav-label::after {
  content: '';
  display: inline-block;
  width: 0.46em;
  height: 0.92em;
  margin-left: 0.22em;
  vertical-align: -0.1em;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb),0.7);
  opacity: 0;                       /* hidden until hover */
  transform: scaleY(0.85);
  transform-origin: center bottom;
}
.nav-item:hover .nav-label::after {
  animation: navCaretBlink 1.05s steps(1) infinite;
}
@keyframes navCaretBlink {
  0%, 55%   { opacity: 1; }
  55.01%, 100% { opacity: 0; }
}

/* #6 — accent underline anchors the hovered row; grows in from the left so the
   bg-image swap isn't the only signal. Sits just under the wordmark. */
.nav-item .nav-label::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.18em;
  height: 2px;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb),0.55);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}
.nav-item:hover .nav-label::before {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .nav-item:hover .nav-label::after { animation: none; opacity: 1; }
  .nav-item .nav-label::before { transition: none; }
  .nav-item .nav-label { transition: none; }
}

/* #6 — no opacity dim on the other rows; they stay full-strength and the
   hover bg-image swap + the hovered row's caret/underline/glow carry the
   differentiation instead. (Old :has() spotlight removed 2026-06-14.) */

.nav-item .nav-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.05em;
  min-width: 2.8rem;
  opacity: 0.78;
  position: relative;
  z-index: 1;
  /* dark readability halo over the bloom art (default state) */
  text-shadow: 0 1px 6px rgba(0,0,0,0.7), 0 0 3px rgba(0,0,0,0.6);
  transition: color 0.35s ease, text-shadow 0.3s, opacity 0.3s, filter 0.4s ease;
  pointer-events: auto;
}

.nav-item:hover .nav-num {
  opacity: 1;
  text-shadow: 0 0 10px rgba(var(--cream-rgb),0.6), 0 0 24px rgba(var(--cream-rgb),0.25);
}

/* ── LOCKUP MARK — andrewander glyph beside the hero ──
   No hover behavior on the mark or wordmark — the lockup is static. */

.nav-item:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

/* // → /> crossfade on hover */
.nav-item .nav-num[data-alt] {
  position: relative;
}

.nav-item .nav-num[data-alt]::after {
  content: attr(data-alt);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  color: var(--cream);
  transition: opacity 0.35s ease, text-shadow 0.4s ease, color 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}

.nav-item:hover .nav-num[data-alt] {
  color: transparent;
  text-shadow: none;
}

/* /> marker takes the accent color on hover, matching the label text, underline
   and caret. */
.nav-item:hover .nav-num[data-alt]::after {
  opacity: 1;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(var(--accent-rgb),0.6), 0 0 24px rgba(var(--accent-rgb),0.25);
}

/* ── FOOTER ── */
.landing .footer-line {
  position: relative;
  z-index: 3;
  color: var(--cream);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .landing-nav {
    padding-left: 6vw;
  }
}

