/* =========================================================
   AXON — shared styles (every page)
   ========================================================= */
:root {
  --accent: #aa88ff;
  --text: #dddddd;
  --muted: #8a8a8a;
  --chip: #1c1c1c;
  --line: #2a2a2a;
  --pad: 24px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --mono: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #000; }
body {
  min-height: 100%;
  background: #000;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px; line-height: 1.35; letter-spacing: .02em;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* ---------- Layers ---------- */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
body.no-gl #bg { display: none; }
body.no-gl::before {
  content: ""; position: fixed; inset: 0; z-index: 0;
  background: #000 url("../cosmos.webp") center / contain no-repeat;
  opacity: .35;
}
body.page-home.no-gl::before { opacity: 1; }

/* Page veil: fades in/out between pages */
.veil {
  position: fixed; inset: 0; z-index: 20; background: #000; pointer-events: none;
  animation: veil-out .9s .1s var(--ease) both;
}
body.is-leaving .veil { animation: veil-in .55s var(--ease) both; }
@keyframes veil-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes veil-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Brand ---------- */
.brand { position: absolute; top: var(--pad); left: var(--pad); display: flex; align-items: center; gap: 14px; text-decoration: none; z-index: 2; }
.brand svg { width: 40px; height: 40px; flex: none; transition: transform .8s var(--ease); }
.brand:hover svg { transform: rotate(45deg); }
.brand-name { font-size: 20px; color: #fff; line-height: 1; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- Navigation ---------- */
.nav {
  position: absolute; top: 37px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; gap: 26px; font-size: 11px;
}
.nav a { position: relative; text-decoration: none; color: var(--muted); transition: color .3s; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::before { content: "["; color: var(--accent); }
.nav a[aria-current="page"]::after { content: "]"; color: var(--accent); }
.menu-btn { display: none; position: absolute; top: 37px; right: var(--pad); z-index: 2; font-size: 11px; color: var(--muted); }
.menu-btn:hover { color: #fff; }
.menu {
  position: fixed; inset: 0; z-index: 15; background: rgba(0, 0, 0, .94);
  display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 var(--pad);
  opacity: 0; pointer-events: none; transition: opacity .5s var(--ease);
}
.menu.is-open { opacity: 1; pointer-events: auto; }
.menu a { font-size: clamp(28px, 9vw, 54px); color: #fff; text-decoration: none; line-height: 1.15; transform: translateY(14px); opacity: 0; transition: transform .6s var(--ease), opacity .6s var(--ease), color .3s; }
.menu.is-open a { transform: none; opacity: 1; }
.menu a:nth-child(2) { transition-delay: .04s; } .menu a:nth-child(3) { transition-delay: .08s; }
.menu a:nth-child(4) { transition-delay: .12s; } .menu a:nth-child(5) { transition-delay: .16s; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--accent); }
.menu small { display: block; margin-bottom: 18px; font-size: 11px; color: var(--muted); }
.menu-close { position: absolute; top: 37px; right: var(--pad); font-size: 11px; color: var(--muted); }

@media (max-width: 1000px) {
  .nav { display: none; }
  .menu-btn { display: block; }
}

/* ---------- Chips ---------- */
.chip { display: inline-block; background: var(--chip); padding: 5px 9px; font-size: 11px; color: #cfcfcf; cursor: pointer; transition: background .3s, color .3s; outline: none; text-decoration: none; }
.chip:hover { background: #2a2a2a; }
.chip.is-active { background: #e6e6e6; color: #000; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Content pages ---------- */
.page { position: relative; z-index: 1; min-height: 100vh; }
.page-head { height: 120px; }
.wrap { padding: 0 var(--pad); }
.col { max-width: 620px; }
.eyebrow { font-size: 11px; color: var(--muted); }
.eyebrow b { font-weight: 400; color: var(--accent); }
.h-xl { font-size: clamp(34px, 5.4vw, 72px); font-weight: 400; color: #fff; line-height: 1.02; letter-spacing: -.01em; }
.h-l { font-size: clamp(22px, 2.6vw, 32px); font-weight: 400; color: #fff; line-height: 1.12; }
.h-s { font-size: 13px; font-weight: 400; color: var(--accent); }
.prose { text-transform: none; font-size: 14px; line-height: 1.7; color: var(--text); letter-spacing: 0; }
.prose p + p { margin-top: 1.1em; }
.prose a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: #fff; font-weight: 400; }
.link { text-decoration: underline; text-underline-offset: 3px; transition: opacity .3s; }
.link:hover { opacity: .7; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px;
  border: 1px solid var(--line); background: #0a0a0a; color: #fff; font-size: 12px; text-decoration: none;
  transition: border-color .3s, background .3s;
}
.btn:hover { border-color: var(--accent); background: #120f1d; }
.rule { border: 0; border-top: 1px solid var(--line); }
.spec { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; font-size: 12px; }
.spec dt { color: var(--muted); }
.spec dd { color: #fff; }

/* Reveal on scroll */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.foot {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr auto auto; gap: 24px 48px; align-items: end;
  padding: 80px var(--pad) var(--pad); font-size: 11px; color: var(--muted);
}
.foot .big { font-size: clamp(40px, 9vw, 130px); color: #fff; line-height: .85; letter-spacing: -.02em; }
.foot nav { display: grid; grid-template-columns: repeat(2, auto); gap: 4px 28px; }
.foot nav a { text-decoration: none; transition: color .3s; }
.foot nav a:hover { color: #fff; }
.foot .sky b { font-weight: 400; color: var(--accent); }
@media (max-width: 760px) {
  .foot { grid-template-columns: 1fr; }
}

/* ---------- Loader (home, first visit) ---------- */
.loader {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 2; pointer-events: none; text-align: center;
  display: none; transition: opacity .8s var(--ease);
}
body.is-loading .loader { display: block; }
.loader.is-done { opacity: 0; }
.loader-line { display: flex; gap: 18px; justify-content: center; font-size: 11px; color: var(--muted); }
.loader-line b { font-weight: 400; color: #fff; min-width: 3ch; text-align: right; }
.loader-bar { margin: 10px auto 0; width: 220px; height: 1px; background: var(--line); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.loader-hint { margin-top: 10px; font-size: 10px; color: #555; }

/* ---------- Wish (caught shooting star) ---------- */
.wish {
  position: fixed; z-index: 5; max-width: 300px; pointer-events: none;
  font-size: 11px; line-height: 1.45; color: #fff; mix-blend-mode: plus-lighter;
  opacity: 0;
}
.wish b { display: block; font-weight: 400; color: var(--accent); margin-bottom: 4px; }

/* ---------- Custom cursor ---------- */
body.has-cursor, body.has-cursor * { cursor: none !important; }
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 30; pointer-events: none;
  border-radius: 50%; opacity: 0; transition: opacity .3s;
}
body.has-cursor .cursor.is-on, body.has-cursor .cursor-dot.is-on { opacity: 1; }
.cursor { width: 30px; height: 30px; margin: -15px 0 0 -15px; mix-blend-mode: difference; }
.cursor i {
  position: absolute; inset: 0; border-radius: 50%; border: 1px solid #fff;
  transition: transform .45s var(--ease), background .3s, border-color .3s;
}
.cursor.is-link i { transform: scale(1.9); background: rgba(255, 255, 255, .12); }
.cursor.is-text i { transform: scale(.4, 1.1); border-radius: 2px; }
.cursor.is-hold i { transform: scale(.55); background: #fff; }
.cursor-dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; background: #fff; }

@media (prefers-reduced-motion: reduce) {
  .veil { animation: none; opacity: 0; }
  .rv { opacity: 1; transform: none; transition: none; }
  .menu a { transition: none; }
}

/* ---------- Content-page header ---------- */
.site-head { position: absolute; top: 0; left: 0; right: 0; height: 110px; z-index: 3; }
.site-head .brand, .site-head .nav { mix-blend-mode: plus-lighter; }

/* ---------- Range slider (journal demos) ---------- */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 160px; height: 1px; background: var(--line); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 0; }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 0; }

/* Narrow screens: the field sits behind the text, so shade it for reading */
@media (max-width: 1000px) {
  .page::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .5) 65%, rgba(0, 0, 0, .15) 100%);
  }
}
