/* Anubix Threads: the public anubix.io page. Built from the Threads spike; see README.md. */
@font-face { font-family: "Inter"; src: url("fonts/inter-latin.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
/* Subset: only the hieroglyphs this page draws (SIL Open Font License). */
@font-face { font-family: "Noto Sans Egyptian Hieroglyphs"; src: url("fonts/noto-hieroglyphs-subset.woff2") format("woff2"); font-display: swap; }

/* Dark-only on purpose: the scene is light on a night sky. */
:root {
  --night: #050B16; --panel: #0B1726; --rule: #1C2B3F;
  --papyrus: #E6DDCB; --sand: #A39C86; --gold: #C9A84C; --gold-text: #D9BC6A; --nile: #5FD3D3;
  --glyph: "Noto Sans Egyptian Hieroglyphs", serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --night: #050B16; } }
:root[data-theme="dark"] { --night: #050B16; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--night); color: var(--papyrus); font: 400 1rem/1.6 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--gold-text); }
:focus-visible { outline: 2px solid var(--nile); outline-offset: 3px; border-radius: 3px; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
body.exploring #stage { touch-action: none; z-index: 5; }
body.exploring #labels { z-index: 6; }

.top { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top, 0px)) 24px 14px; background: linear-gradient(var(--night), transparent); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--papyrus); text-decoration: none; font: 500 1.15rem Newsreader, serif; letter-spacing: .01em; }
.brand .eye { font-family: var(--glyph); color: var(--gold); font-size: 1.6rem; line-height: 1; }
.top a.mail { font-size: .9rem; color: var(--papyrus); text-decoration: none; border: 1px solid var(--rule); padding: 6px 12px; border-radius: 999px; }
.top a.mail:hover { border-color: var(--gold); }

main { position: relative; z-index: 2; pointer-events: none; }
.ch { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 96px 24px; }
.ch-in { max-width: 30rem; pointer-events: auto; }
.ch .glyph { font-family: var(--glyph); font-size: 2.2rem; color: var(--gold); line-height: 1; display: block; margin-bottom: 14px; }
.ch .step { font-size: .85rem; color: var(--sand); margin: 0 0 6px; }
.ch h2, .ch h1 { font: 400 clamp(2rem, 4.2vw, 3.1rem)/1.08 Newsreader, serif; margin: 0 0 16px; letter-spacing: -.01em; text-wrap: balance; }
.ch p { margin: 0 0 14px; color: #CFC7B4; max-width: 34em; }
.ch .note { font-size: .88rem; color: var(--sand); }
.signals { list-style: none; padding: 0; margin: 8px 0 0; max-width: 22rem; font-size: .93rem; }
.signals li { display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--rule); padding: 3px 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 500 .95rem Inter, sans-serif; color: var(--night); background: var(--gold); border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--gold-text); }
.btn-ghost { background: transparent; color: var(--papyrus); border: 1px solid var(--rule); }
.btn-ghost:hover { background: var(--panel); border-color: var(--gold); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--sand); margin: 4px 0 18px; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.ch-in.shade { background: color-mix(in srgb, var(--night) 72%, transparent); padding: 20px 22px; margin: -20px -22px; border-radius: 10px; }

/* Labels projected from the scene. */
.lbl { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12px; line-height: 1.25; color: var(--papyrus); text-shadow: 0 0 6px var(--night), 0 0 2px var(--night); will-change: transform, opacity; transform: translate(-50%, -140%); }
.lbl .r { display: block; color: var(--sand); font-size: 11px; opacity: 0; transition: opacity .2s; }
.lbl.hot .r { opacity: 1; }
.lbl.co { font: 500 13px Newsreader, serif; color: #F1EADB; }
.lbl.center { font: 500 17px Newsreader, serif; color: #FFF6E0; transform: translate(-50%, 70%); text-align: center; }
.lbl.center .r { opacity: 1; font: 400 12px Inter, sans-serif; }
.lbl button { pointer-events: auto; font: 500 12px Inter, sans-serif; color: var(--gold-text); background: color-mix(in srgb, var(--night) 70%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 999px; padding: 3px 10px; margin-top: 4px; cursor: pointer; }
.lbl button:hover { background: var(--panel); border-color: var(--gold); }
.lbl.bridge { color: var(--gold-text); font-weight: 600; }
.lbl.bridge .r { opacity: 1; }

/* Explore mode: the graph takes the screen. */
.bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 12; display: none; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--rule); border-radius: 12px; backdrop-filter: blur(8px); }
body.exploring .bar { display: flex; }
body.exploring main, body.exploring .top { visibility: hidden; }
.bar .t { flex: 1 1 260px; min-width: 0; }
.bar .t strong { font: 500 1.05rem Newsreader, serif; display: block; }
.bar .t span { font-size: .85rem; color: var(--sand); }
.dots { display: flex; gap: 6px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; padding: 0; cursor: pointer; }
.dots button[aria-current="true"] { background: var(--gold); }
.panel { position: fixed; top: 16px; right: 16px; z-index: 12; width: 230px; display: none; padding: 14px 16px; background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--rule); border-radius: 12px; font-size: .85rem; backdrop-filter: blur(8px); }
body.exploring .panel { display: block; }
.panel summary { cursor: pointer; font-weight: 500; }
.panel label { display: block; margin-top: 10px; color: var(--sand); }
.panel input[type=range] { width: 100%; accent-color: var(--gold); }
.panel .hint { margin: 12px 0 0; color: var(--sand); font-size: .8rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nogl #stage, .nogl #labels, .nogl [data-explore] { display: none; }

@media (max-width: 48rem) {
  .ch { align-items: flex-end; padding: 96px 16px 40px; }
  .ch-in { background: color-mix(in srgb, var(--night) 80%, transparent); padding: 18px; border-radius: 12px; }
  .ch-in.shade { margin: 0; }
  .top { padding: 12px 16px; }
  .panel { display: none !important; }
  .bar { left: 8px; right: 8px; bottom: 8px; }
}

.legend .sw-owner { background: #C9A84C; }
.legend .sw-officer { background: #5FD3D3; }
.legend .sw-director { background: #B9AE95; }
.notfound { pointer-events: auto; max-width: 34rem; padding: 20vh 24px; margin: 0 auto; }
.notfound h1 { font: 400 clamp(2rem, 4.2vw, 3.1rem)/1.1 Newsreader, serif; margin: 0 0 16px; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 8px 14px; background: var(--gold); color: var(--night); border-radius: 999px; text-decoration: none; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }
a, button, summary { touch-action: manipulation; }
