/* ═══════════════════════════════════════════════════════════
   ë shell (proto @e/ui)
   self-contained global chrome: design tokens, loader, force
   canvases, ë mark, menu toggle, ecosystem menu.
   scoped under the --e- token namespace and .e- class prefix so
   it never fights a host site's own tokens or typography.
   ═══════════════════════════════════════════════════════════ */

:root {
  --e-bg:    #050505;
  --e-text:  #f7f7f2;
  --e-red:   #ff3b30;
  --e-green: #9cff57;
  --e-font:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --e-mono:  'DM Mono', monospace;
  --e-ease:  cubic-bezier(.19, 1, .22, 1);
}

/* scroll lock only while the menu is open (shell-owned state) */
body.menu-open { overflow: hidden; }

/* ── LOADER ─────────────────────────────────────────────── */
.e-loader {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  transition: opacity .7s .3s var(--e-ease), visibility 0s linear 1s;
}
.e-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#loader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ── FORCE CANVASES ─────────────────────────────────────── */
#three-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .86;
}
#field {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .34;
}

/* ── ë MARK ─────────────────────────────────────────────── */
.e-site-logo {
  position: fixed;
  top: 20px;
  left: 28px;
  z-index: 220;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-family: var(--e-font);
  font-weight: 900;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--e-text);
  text-decoration: none;
  opacity: .82;
  transition: opacity .2s;
}
.e-site-logo:hover { opacity: 1; }

/* ── MENU TOGGLE ────────────────────────────────────────── */
.e-header-actions {
  position: fixed;
  top: 20px;
  right: 28px;
  z-index: 221;
  display: flex;
  align-items: center;
  gap: 10px;
}
.e-menu-btn {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 8px 18px;
  color: var(--e-red);
  font-family: var(--e-mono);
  font-size: .46rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  border: 1.5px solid var(--e-red);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.e-menu-btn:hover { background: rgba(255, 59, 48, .08); color: var(--e-red); border-color: var(--e-red); }
body.menu-open .e-menu-btn { color: rgba(255, 255, 255, .55); border-color: rgba(255, 255, 255, .2); background: transparent; }
.e-menu-btn-label { transition: color .2s; }

/* ── MENU PANEL ─────────────────────────────────────────── */
.e-menu-panel {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(4, 4, 4, .98);
  transform: translateY(-105%);
  visibility: hidden;
  overflow-y: auto;
  transition: transform .62s var(--e-ease), visibility 0s linear .62s;
}
body.menu-open .e-menu-panel {
  transform: translateY(0);
  visibility: visible;
  transition-delay: 0s;
}
.e-menu-panel::before {
  content: '';
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--e-red);
  opacity: 0;
  transition: opacity .5s var(--e-ease) .3s;
  z-index: 2;
  pointer-events: none;
}
body.menu-open .e-menu-panel::before { opacity: .7; }

.e-menu-panel-inner {
  display: grid;
  grid-template-columns: 1fr .88fr .92fr;
  gap: 0;
  min-height: 80svh;
  padding: 100px 40px 52px;
  pointer-events: none;
}
.e-menu-panel-inner a,
.e-menu-col { pointer-events: all; }

.e-menu-col {
  border-top: 1px solid rgba(255, 59, 48, .22);
  padding-top: 24px;
  padding-right: 40px;
  display: flex;
  flex-direction: column;
}
.e-menu-col:not(:first-child) {
  border-left: 1px solid rgba(255, 59, 48, .16);
  padding-left: 40px;
}

.e-menu-kicker {
  display: block;
  margin-bottom: 28px;
  font-family: var(--e-mono);
  font-size: .52rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--e-red);
  opacity: .55;
}

.e-menu-nav {
  display: grid;
  gap: 2px;
}
.e-menu-nav a {
  display: block;
  width: fit-content;
  font-family: var(--e-font);
  font-size: clamp(1.9rem, 3.8vw, 3.8rem);
  font-weight: 300;
  line-height: .96;
  letter-spacing: -.02em;
  text-transform: lowercase;
  color: rgba(245, 245, 242, .38);
  text-decoration: none;
  transition: color .25s var(--e-ease), transform .25s var(--e-ease);
}
.e-menu-nav a:hover { color: var(--e-red); transform: translateX(10px); }

.e-menu-list {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}
.e-menu-group { margin-top: 4px; }
.e-menu-subkicker {
  display: block;
  margin: 0 0 14px;
  font-family: var(--e-mono);
  font-size: .48rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 59, 48, .52);
}
.e-menu-list a {
  display: block;
  font-family: var(--e-font);
  font-size: 1.12rem;
  font-weight: 300;
  color: rgba(245, 245, 242, .45);
  text-decoration: none;
  transition: color .2s var(--e-ease), transform .2s var(--e-ease);
}
.e-menu-list a:hover { color: var(--e-text); transform: translateX(6px); }

.e-menu-since {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--e-mono);
  font-size: .5rem;
  letter-spacing: .14em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, .16);
}

@media (max-width: 900px) {
  .e-menu-panel-inner {
    grid-template-columns: 1fr .9fr;
    padding: 88px 28px 48px;
    min-height: auto;
  }
  .e-menu-col:last-child {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding-left: 0;
    padding-top: 24px;
    margin-top: 4px;
  }
}
@media (max-width: 600px) {
  .e-menu-panel-inner { grid-template-columns: 1fr; padding: 80px 20px 40px; }
  .e-menu-col:not(:first-child) { border-left: none; border-top: 1px solid rgba(255, 255, 255, .06); padding-left: 0; padding-top: 20px; margin-top: 4px; }
  .e-menu-nav a { font-size: clamp(1.7rem, 7vw, 2.8rem); }
  .e-site-logo { top: 20px; left: 20px; }
  .e-header-actions { right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .e-menu-panel { transition: none; }
  .e-menu-nav a, .e-menu-list a { transition: color .2s; }
}

/* ── live home port: header extras, cursor spirit, memorial, floats, theme ── */
.header-coords {
  position: fixed; top: 31px; left: 50%; z-index: 220;
  transform: translateX(-50%); pointer-events: none;
  font-family: 'Space Mono', monospace;
  font-size: .52rem; letter-spacing: .18em;
  color: rgba(255,255,255,.32); text-transform: lowercase; white-space: nowrap;
}
.theme-btn {
  display: flex; align-items: center; justify-content: center;
  color: rgba(245,245,242,.42);
  font-size: .8rem; line-height: 1;
  padding: 6px 11px;
  border: 1.5px solid rgba(245,245,242,.18);
  border-radius: 8px; background: transparent;
  transition: color .2s, border-color .2s, background .2s;
  cursor: pointer;
}
.theme-btn:hover, .theme-btn[aria-pressed="true"] { color: #ff3b30; border-color: #ff3b30; background: rgba(208,98,36,.1); }
.electro-btn {
  display: flex; align-items: center;
  color: rgba(245,245,242,.42);
  font-family: 'Space Mono', monospace;
  font-size: .46rem; letter-spacing: .22em; text-transform: uppercase;
  padding: 8px 14px;
  border: 1.5px solid rgba(245,245,242,.18);
  border-radius: 8px; background: transparent; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.electro-btn:hover, .electro-btn[aria-pressed="true"] { background: rgba(255,59,48,.08); color: #ff3b30; border-color: #ff3b30; }
.stop-music-btn {
  display: none; align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: .46rem; letter-spacing: .22em; text-transform: uppercase;
  padding: 8px 18px;
  border: 1.5px solid #ff3b30; border-radius: 8px;
  background: #ff3b30; color: #050505; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.stop-music-btn.is-visible { display: flex; }
.stop-music-btn:hover { background: #f2f0eb; border-color: #f2f0eb; color: #050505; }

#cursor-spirit {
  position: fixed; top: 0; left: 0;
  width: 40px; height: 40px;
  pointer-events: none;
  transform: translate3d(-100px, -100px, 0);
  z-index: 400;
}
.cursor-aura { position: absolute; inset: 0; border-radius: 50%; background: transparent; animation: breathe 3.4s ease-in-out infinite alternate; }
.cursor-eyes { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; gap: 6px; align-items: center; justify-content: center; }
.eye { width: 7px; height: 7px; border-radius: 50%; background: #ff3b30; transition: transform 0.07s ease-out, opacity 0.07s ease-out; }
.eye.blink { transform: scaleY(0.08) scaleX(1.3); opacity: 0.2; }
@keyframes breathe { 0% { transform: scale(0.9); } 50% { transform: scale(1.02); } 100% { transform: scale(1.08); } }

.electro-memorial {
  position: fixed; inset: 0; z-index: 175;
  visibility: hidden; pointer-events: none; overflow: hidden;
  background: #050505; color: #f2f0eb;
  transform: translateY(104%);
  transition: transform .78s cubic-bezier(.19,1,.22,1), visibility 0s linear .78s;
}
body.electro-on .electro-memorial { visibility: visible; pointer-events: all; transform: translateY(0); transition-delay: 0s; }
body.electro-on { background: #080101; }
body.electro-on #three-field, body.electro-on #field { opacity: 1; filter: saturate(1.7) contrast(1.18); }
body.electro-on .texture { opacity: .13; background-size: 12px 12px, 5px 5px; }
body.electro-on .e-home-footer { opacity: 0; transform: translateY(18px); pointer-events: none; }
.electro-copy {
  position: relative; z-index: 2; min-height: 100svh;
  width: min(1180px, calc(100vw - 56px));
  padding: clamp(96px, 14vh, 156px) 0 clamp(80px, 12vh, 132px);
  margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.electro-logo { width: clamp(220px, 34vw, 520px); height: auto; margin-bottom: 40px; opacity: .95; }
.electro-kicker, .electro-meta { font-family: 'Space Mono', monospace; font-size: .58rem; letter-spacing: .2em; text-transform: lowercase; color: #ff3b30; }
.electro-copy h2 { margin: 16px 0 12px; max-width: 12ch; font-size: clamp(2.4rem, 8.5vw, 7.5rem); font-weight: 800; line-height: .88; letter-spacing: -.01em; text-transform: lowercase; color: #ff3b30; }
.electro-eux { font-family: 'Space Mono', monospace; font-size: clamp(.8rem, 1.6vw, 1.1rem); letter-spacing: .18em; color: rgba(255,59,48,.5) !important; margin: 0 0 32px !important; text-transform: lowercase; }
.electro-copy p { margin: 0 0 16px; max-width: 58ch; font-size: clamp(.95rem, 1.8vw, 1.42rem); line-height: 1.3; font-weight: 400; text-transform: lowercase; color: rgba(247,247,242,.72); }
.electro-meta { margin-top: 36px; display: block; }
.electro-close {
  position: fixed; right: 28px; bottom: 28px; z-index: 3;
  padding: 10px 16px;
  border: 1.5px solid rgba(255,59,48,.4); border-radius: 8px;
  background: transparent; color: #ff3b30;
  font-family: 'Space Mono', monospace; font-size: .52rem; letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.electro-close:hover { border-color: #ff3b30; background: rgba(255,59,48,.08); }

.hero-float-labels { position: fixed; inset: 0; z-index: 10; pointer-events: none; transition: opacity .7s cubic-bezier(.19,1,.22,1), transform .7s cubic-bezier(.19,1,.22,1); }
.hero-float-label {
  position: absolute;
  font-family: 'Space Mono', monospace;
  font-size: .68rem; letter-spacing: .18em; text-transform: lowercase;
  color: rgba(245,245,242,.38); white-space: nowrap; min-height: 1em;
  animation: hintFloat 5s ease-in-out infinite;
}
.hero-float-label--ghost { color: rgba(245,245,242,.22); }
.hero-float-label--code { color: rgba(255,59,48,.42); }
#phLine1 { top: 15%; right: 5vw; animation-duration: 7.2s; }
#phLine2 { top: 44%; right: 4vw; animation-duration: 6.4s; }
#phLine3 { top: 15%; left: 7vw; animation-duration: 9.1s; }
#phLine4 { top: 30%; left: 7vw; animation-duration: 8.3s; }
#phLine5 { bottom: 14%; right: 5vw; animation-duration: 5.9s; }
.hero-float-labels--gone { opacity: 0 !important; transform: translateY(-8px); }
@keyframes hintFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* moris theme: warm earthy palette swap */
html.theme-moris {
  --background: #0a140d;
  --text: #fefae0;
  --soft: #ebe3a7;
  --muted: #a8936a;
  --line: rgba(254,250,224,.10);
  --red: #d06224;
}
html.theme-moris body { background: #0a140d; }
html.theme-moris #three-field, html.theme-moris #field { filter: hue-rotate(26deg) saturate(1.15) brightness(1.18); }

/* radio playing state, red EQ per live */
.e-radio-btn.playing { color: #ff3b30; }
.e-radio-btn.playing .e-radio-eq span {
  background: #ff3b30;
  animation: eqBar 1.1s ease-in-out infinite;
}
.e-radio-btn.playing .e-radio-eq span:nth-child(1) { animation-duration: 1.0s; animation-delay: 0s; }
.e-radio-btn.playing .e-radio-eq span:nth-child(2) { animation-duration: 0.7s; animation-delay: -.3s; }
.e-radio-btn.playing .e-radio-eq span:nth-child(3) { animation-duration: 1.3s; animation-delay: -.6s; }
.e-radio-btn.playing .e-radio-eq span:nth-child(4) { animation-duration: 0.9s; animation-delay: -.1s; }

/* native cursor hidden on fine pointers, the spirit eyes ARE the cursor (live verbatim).
   !important so ported cursor:pointer declarations can't resurface the hand */
@media (hover: hover) and (pointer: fine) {
  html, body, a, button, input, select, textarea,
  [role='button'], .eco-toggle, .cta, .e-radio-btn, .e-scroll-cue,
  .e-menu-panel, .e-menu-panel *, [data-menu-toggle], [data-loader] { cursor: none !important; }
}

/* loader intro sequence: frames stacked, shown one at a time via .show */
.loader-sequence {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  pointer-events: none;
  transition: opacity .45s cubic-bezier(.19,1,.22,1), transform .55s cubic-bezier(.19,1,.22,1);
}
.e-loader.is-hidden .loader-sequence { opacity: 0; transform: scale(.985); }
.loader-frame {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity .5s cubic-bezier(.19,1,.22,1);
}
.loader-frame.show { opacity: 1; }
.loader-mark { width: clamp(58px, 7vw, 96px); height: auto; filter: drop-shadow(0 0 24px rgba(255,59,48,.16)); }
.loader-tag {
  font-family: 'Space Mono', monospace;
  font-size: clamp(1.85rem, 5vw, 2.75rem); font-weight: 700;
  letter-spacing: .08em; color: rgba(247,247,242,.92); text-transform: lowercase;
}
.loader-years, .loader-dates { font-family: 'Space Mono', monospace; color: rgba(247,247,242,.92); text-transform: lowercase; }
.loader-years { font-size: clamp(1.9rem, 6vw, 3rem); letter-spacing: .04em; }
.loader-dates { font-size: clamp(1.5rem, 5vw, 2.4rem); letter-spacing: .24em; }
.loader-enter {
  font-family: 'Space Mono', monospace;
  font-size: .62rem; letter-spacing: .26em; text-transform: lowercase;
  color: rgba(255,59,48,.85);
}

/* cursor spirit: clickable-hover feedback, the eyes glow + widen */
#cursor-spirit .cursor-eyes { transition: gap .18s ease-out; }
#cursor-spirit .eye { transition: transform .18s ease-out, box-shadow .18s ease-out, opacity 0.07s ease-out; }
#cursor-spirit.is-hover .cursor-eyes { gap: 7px; }
#cursor-spirit.is-hover .eye {
  transform: scale(1.18);
  box-shadow: 0 0 10px rgba(255,59,48,.7);
}
#cursor-spirit.is-hover .cursor-aura {
  background: radial-gradient(circle, rgba(255,59,48,.12), transparent 65%);
}

/* warp-out: fly into the ë core, rings blow past the viewer, fade to black */
.orbit-core { cursor: none; transition: transform .3s cubic-bezier(.19,1,.22,1); }
.orbit-core:hover { transform: scale(1.12); }
.orbit-core:hover img { opacity: 1; }
body.warp-out .orbit-wrap {
  transform: scale(6) !important;
  opacity: 0;
  transition: transform .7s cubic-bezier(.55,0,.85,.36), opacity .6s ease .1s !important;
}
body.warp-out main { opacity: 0; transition: opacity .55s ease .12s; }
body.warp-out::after {
  content: '';
  position: fixed; inset: 0; z-index: 900;
  background: #000; opacity: 0;
  animation: warpFade .7s ease forwards;
  pointer-events: none;
}
@keyframes warpFade { to { opacity: 1; } }

/* warp-in on /eco: arrive out of black */
.eco-warp-fade {
  position: fixed; inset: 0; z-index: 900;
  background: #000; pointer-events: none;
  animation: warpArrive 1.4s cubic-bezier(.19,1,.22,1) forwards;
}
@keyframes warpArrive { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }

/* mobile: header slims down, coords yield to the buttons */
@media (max-width: 720px) {
  .header-coords { display: none; }
  .electro-btn { padding-inline: 10px; font-size: .42rem; }
  .e-header-actions { gap: 7px; right: 16px; }
  .site-logo { left: 16px !important; }
}

@media (max-width: 720px) {
  .hero-float-label { font-size: .55rem; }
  #phLine5 { right: 16px; }
  .e-footer-loc { font-size: .46rem; }
  .e-home-footer { padding: 12px 16px 16px; }
}

/* menu 808 button, live verbatim */
.menu-808-btn {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 28px; padding: 14px 18px;
  border: 1px solid #ff3b30; border-radius: 4px;
  text-decoration: none; position: relative; overflow: hidden;
  transition: background .25s cubic-bezier(.19,1,.22,1), transform .15s cubic-bezier(.19,1,.22,1);
  background: #ff3b30;
}
.menu-808-btn:hover { transform: translateY(-1px); background: #f7f7f2; border-color: #f7f7f2; }
.menu-808-label { display: block; font-family: 'Space Mono', monospace; font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; letter-spacing: -.02em; line-height: 1; color: #050505; }
.menu-808-sub { display: block; font-family: 'Space Mono', monospace; font-size: .55rem; letter-spacing: .14em; text-transform: lowercase; color: rgba(5,5,5,.7); }

.site-logo { transition: opacity .45s ease; }
body.logo-hidden .site-logo { opacity: 0 !important; pointer-events: none !important; }

/* /eco: the ë force yields to the node map, faint presence only */
body.eco-clean #three-field,
body.eco-clean #field {
  opacity: .14;
  transition: opacity .8s ease;
}

/* memorial → sëssions doorway */
.electro-sessions-link {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Space Mono', monospace;
  font-size: .62rem; letter-spacing: .16em; text-transform: lowercase;
  color: #f7f7f2; text-decoration: underline; text-underline-offset: 5px;
  transition: color .2s;
}
.electro-sessions-link:hover { color: #ff3b30; }

/* thin red scrollbar + red selection, live verbatim */
html { scrollbar-color: #ff3b30 #050505; scrollbar-width: thin; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #ff3b30; }
::selection { background: #ff3b30; color: #000; }
