/* ALEPH /lab — monochrome, Akkurat Mono (the al3.ph face, loaded from the homepage's own font files) */
@font-face {
  font-family: "Akkurat mono";
  src: url("/al3-site/_a/al3.ph/fonts/Akkurat-Mono.woff") format("woff"), url("/al3-site/_a/al3.ph/fonts/Akkurat-Mono.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --mono: "Akkurat mono", "Akkurat Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --alef: "STIX Two Text", "STIX Two Math", "Times New Roman", "Cambria Math", serif;
  --fg: #fff;
  --dim: rgba(255, 255, 255, .56);
  --faint: rgba(255, 255, 255, .28);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --pad: clamp(14px, 2.2vw, 28px);
}
* { box-sizing: border-box }
html, body { margin: 0; height: 100%; background: #000; color: var(--fg); overflow: hidden; overscroll-behavior: none }
body {
  font: 400 13px/1.5 var(--mono);
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit }
button, input { font: inherit; color: inherit }
::selection { background: #fff; color: #000 }
:focus-visible { outline: 1px solid #fff; outline-offset: 3px }
.alef { font-family: var(--alef); font-weight: 400; letter-spacing: 0 }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap }

canvas.layer { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none }
#field { z-index: 0; opacity: 0; transition: opacity 1.4s var(--ease) }
.entered #field { opacity: 1 }
#egg { z-index: 2 }
#serp { z-index: 1; opacity: 0; transition: opacity .6s var(--ease) }
.entered #serp { opacity: 1 }

/* ---------- arrival: the NCA grows ℵ from one cell */
#arrival {
  position: fixed; inset: 0; z-index: 5; display: grid; place-items: center;
  transition: opacity .9s var(--ease) .15s, visibility 0s 0s; /* coming back (zoomed out of the dive) */
}
#arrival .cell {
  position: relative; width: min(72vmin, 620px); aspect-ratio: 1;
  transition: transform 1.1s cubic-bezier(.7, 0, .2, 1), opacity 1.1s var(--ease);
  cursor: crosshair;
}
/* tall phones: a slightly smaller ℵ leaves the serpents room above and below */
@media (max-aspect-ratio: 4/5) { #arrival .cell { width: min(64vmin, 620px) } }
#nca { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: auto }
#arrival .hint {
  position: absolute; left: 0; right: 0; bottom: calc(var(--pad) * 2.4); margin: 0; text-align: center;
  color: var(--dim); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
#arrival .hint.on { opacity: 1 }
#arrival .hint button { all: unset; cursor: pointer; padding: 10px 14px; color: var(--fg) }
#arrival .hint button:focus-visible { outline: 1px solid #fff }
#arrival .whisper .touch { display: none }
@media (pointer: coarse) { #arrival .whisper .kb { display: none } #arrival .whisper .touch { display: inline } }
#arrival .whisper #askHint { all: unset; cursor: pointer; color: var(--dim); border-bottom: 1px solid var(--faint); padding: 6px 0 2px; pointer-events: auto }
#arrival .whisper { display: block; margin-top: 4px; color: var(--faint); letter-spacing: .14em; text-transform: none; font-size: 11px }
.entered #arrival { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .9s var(--ease), visibility 0s .9s }
.entered #arrival .cell { transform: scale(.004); opacity: .2 }

/* ---------- the world: real DOM text placed by the camera */
#world { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .8s var(--ease) .25s }
.entered #world { opacity: 1 }
.node-card, .node-label, .node-core, .answer {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform, opacity; contain: layout style;
}
.node-card {
  width: var(--cw, 520px); text-align: center; pointer-events: auto; user-select: text; -webkit-user-select: text;
  padding: 0 4px;
}
.node-card .k { margin: 0 0 14px; color: var(--dim); font-size: 11px; letter-spacing: .24em; text-transform: uppercase }
.node-card h2 { margin: 0; font-weight: 400; font-size: var(--h, 34px); line-height: 1.12; letter-spacing: -.01em; text-transform: uppercase; overflow-wrap: anywhere }
.node-card p.b { margin: 16px auto 0; max-width: 40ch; color: rgba(255, 255, 255, .82); font-size: 14px; line-height: 1.6 }
.node-card .ln { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; font-size: 12px; letter-spacing: .06em }
.node-card .ln a { text-decoration: none; border-bottom: 1px solid var(--faint); padding: 4px 0 2px; transition: border-color .3s }
.node-card .ln a:hover { border-color: #fff }
.node-card .ln a::after { content: " ↗"; color: var(--dim) }
.node-card .ln a[href^="mailto:"]::after { content: "" }
.node-label {
  width: max-content; white-space: nowrap; text-align: center; pointer-events: auto; cursor: pointer;
  font-size: 10.5px; line-height: 1.35; letter-spacing: .16em; text-transform: uppercase; color: var(--dim);
  padding: 6px 2px; transition: color .25s;
}
.node-label.wrap { white-space: normal; text-wrap: balance }
.node-label:hover, .node-label.focus { color: #fff }
.node-label.focus::before { content: ""; position: absolute; left: 50%; top: -3px; width: 1px; height: 6px; background: #fff }
.node-core { pointer-events: none; line-height: 1; color: #fff; text-align: center; width: 0; white-space: nowrap }
.node-core span { display: inline-block; transform: translate(-50%, -54%) }
.hidden { visibility: hidden }

/* answers placed at the question's coordinates */
.answer { width: var(--cw, 520px); pointer-events: auto; user-select: text; -webkit-user-select: text; text-align: left }
.answer .k { margin: 0 0 12px; color: var(--dim); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase }
.answer .qq { margin: 0; font-size: 20px; line-height: 1.3; text-transform: none; letter-spacing: -.005em }
.answer .aa { margin: 16px 0 0; max-width: 60ch; font-size: 14px; line-height: 1.65; color: rgba(255, 255, 255, .86); white-space: pre-wrap; min-height: 3em; max-height: min(52vh, 30em); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent }
.answer .aa.scroll { touch-action: pan-y; padding-right: 6px; -webkit-mask-image: linear-gradient(#000 calc(100% - 2em), transparent); mask-image: linear-gradient(#000 calc(100% - 2em), transparent) }
.answer .aa.streaming::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--dim) }
.answer .src { margin: 14px 0 0; color: var(--faint); font-size: 10.5px; letter-spacing: .12em }
.answer .src:empty { display: none }
.answer .go { margin: 18px 0 0 }
.answer .go button { font: inherit; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #fff; background: none; border: 1px solid rgba(255,255,255,.35); padding: 9px 14px; cursor: pointer; transition: background .2s, color .2s }
.answer .go button:hover, .answer .go button:focus-visible { background: #fff; color: #000 }
@keyframes blink { 50% { opacity: 0 } }

/* ---------- HUD */
.hud { position: fixed; left: 0; right: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: var(--pad); pointer-events: none; transition: opacity .8s var(--ease) }
.hud > * { pointer-events: auto }
.hud.top { top: 0 }
.hud.bottom { bottom: 0; align-items: flex-end; color: var(--dim); font-size: 10.5px; letter-spacing: .12em }
.mark { text-decoration: none; letter-spacing: .32em; font-size: 12px; display: inline-flex; gap: 10px; align-items: baseline }
.mark .alef { font-size: 17px }
#crumbs { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 0 8px; flex-wrap: wrap; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); opacity: 0; transition: opacity .6s }
.entered #crumbs { opacity: 1 }
#crumbs button { all: unset; cursor: pointer; padding: 6px 0; white-space: nowrap }
#crumbs button:hover, #crumbs button:focus-visible { color: #fff }
#crumbs .sep { color: var(--faint) }
#crumbs [aria-current] { color: #fff }
#askBtn { all: unset; cursor: pointer; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; padding: 8px 0 8px 12px; color: var(--dim); white-space: nowrap }
#askBtn:hover, #askBtn:focus-visible { color: #fff }
/* `all: unset` would inherit the HUD's pointer-events:none: every HUD control must stay clickable/tappable */
.hud button, .hud a, #askBtn { pointer-events: auto }
@media (pointer: coarse) { #askBtn { padding: 12px 4px 12px 16px } }
#askBtn kbd { font: inherit; border: 1px solid var(--faint); padding: 1px 5px; margin-left: 8px; letter-spacing: 0 }
#coord { font-variant-numeric: tabular-nums; white-space: pre; line-height: 1.6 }
#coord b { font-weight: 400; color: var(--fg) }
#keys { text-align: right; line-height: 1.6; color: var(--faint) }
.idle .hud, .idle #ask { opacity: 0 }
body:not(.entered) .hud.bottom { opacity: 0 }

/* ---------- ask */
#ask {
  position: fixed; left: 50%; bottom: calc(var(--pad) + 34px); z-index: 7; width: min(560px, calc(100vw - 2 * var(--pad)));
  transform: translate(-50%, 12px); opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s .4s;
  margin: 0; padding: 10px 16px 8px; background: rgba(0, 0, 0, .84); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
#ask.open { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s }
#ask .row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255, 255, 255, .5); padding: 6px 0 }
#ask .row .alef { font-size: 20px; line-height: 1 }
#q { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; padding: 8px 0; caret-color: #fff }
#q::placeholder { color: var(--faint) }
#ask .meta { margin: 8px 0 0; display: flex; justify-content: space-between; color: var(--faint); font-size: 10.5px; letter-spacing: .12em; font-variant-numeric: tabular-nums; min-height: 1.5em }
#ghost { position: fixed; left: 50%; bottom: calc(var(--pad) + 44px); transform: translateX(-50%); z-index: 7; color: var(--faint); letter-spacing: .5em; text-transform: uppercase; font-size: 12px; pointer-events: none; opacity: 0; transition: opacity .3s }
#ghost.on { opacity: 1 }

/* secret-word captions */
#caption { position: fixed; left: 0; right: 0; top: 50%; z-index: 4; text-align: center; pointer-events: none; padding: 0 var(--pad); transform: translateY(calc(min(36vmin, 300px))); opacity: 0; transition: opacity .8s var(--ease) }
#caption.on { opacity: 1 }
#caption .t { font-size: 11px; letter-spacing: .3em; text-transform: uppercase }
#caption .s { margin-top: 8px; color: var(--dim); font-size: 12px; max-width: 52ch; margin-inline: auto; line-height: 1.6 }
.egging #world, .egging .hud { opacity: .12 }
.egging #world { transition: opacity .6s }

/* ---------- brands: each company's face for its titles (body text stays in the mono), a hint of its colour */
.node-card.branded h2, .node-card.branded .k, .node-label.branded { font-family: var(--bf), var(--mono) }
.node-card.branded h2 { letter-spacing: 0; line-height: 1.08 }
/* very wide display faces (pixel fonts) stay on the title only: kicker and labels keep the mono */
.node-card.branded.title-only .k { font-family: var(--mono) }
.node-card.branded.title-only h2 { line-height: 1.25 }
.node-label.hinted:hover, .node-label.hinted.focus, .node-label.hinted.vhover { color: color-mix(in srgb, #fff 58%, var(--brand)) }
.node-label.hinted.focus::before { background: color-mix(in srgb, #fff 50%, var(--brand)) }

/* ---------- link previews */
#lpv {
  position: fixed; left: 0; top: 0; z-index: 30; width: 320px; pointer-events: none;
  background: #050505; border: 1px solid rgba(255, 255, 255, .22); border-radius: 2px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transition: opacity .22s var(--ease), visibility 0s .22s;
}
#lpv.on { opacity: 1; visibility: visible; transition-delay: 0s }
#lpv.touch { pointer-events: auto }
#lpv .im { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid rgba(255, 255, 255, .12); background: #111 }
#lpv img { display: block; width: 100%; height: 100% ; object-fit: cover }
#lpv .tx { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px 9px; font-size: 10.5px; letter-spacing: .1em; line-height: 1.3 }
#lpv .dom { color: #fff; white-space: nowrap }
#lpv .lab { color: var(--dim); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
#lpv .go { display: none; color: #fff; text-decoration: none; border-bottom: 1px solid var(--faint); white-space: nowrap }
#lpv.touch .go { display: inline }
@media (max-width: 640px) { #lpv { width: min(300px, calc(100vw - 20px)) } }

/* ---------- the drawn cursor (while a serpent has done something to the real one) */
html.vcursor, html.vcursor * { cursor: none !important }
#vcursor { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity .25s var(--ease); will-change: transform; mix-blend-mode: difference }
#vcursor.on { opacity: 1 }
#vcursor.on.gone { opacity: 0; transition-duration: .12s }
#vcursor svg { position: absolute; left: -16px; top: -16px; overflow: visible }
#vcursor .ring { fill: none; stroke: #fff; stroke-width: 1 }
#vcursor .dot { fill: #fff }
#vcursor .arc { fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 1; stroke-dasharray: 100; stroke-dashoffset: 0; transform: rotate(-90deg); opacity: 0; transition: opacity .3s }
#vcursor .tick { stroke: rgba(255, 255, 255, .45); stroke-width: 1; opacity: 0; transition: opacity .3s }
#vcursor[data-kind="slow"] .arc, #vcursor[data-kind="fast"] .arc, #vcursor[data-kind="held"] .arc { opacity: 1 }
#vcursor[data-kind="fast"] .tick { opacity: 1 }
#vcursor[data-kind="slow"] .ring { stroke-dasharray: 1.5 2 }
#vcursor .tag { position: absolute; left: 15px; top: 9px; font: 400 9.5px/1 var(--mono); letter-spacing: .16em; color: rgba(255, 255, 255, .7); white-space: nowrap; text-transform: uppercase }
.node-label.vhover, #crumbs button.vhover, #askBtn.vhover, .node-card .ln a.vhover { color: #fff; border-color: #fff }

/* ---------- the window becomes a single point under ~140px */
#point { display: none }
@media (max-width: 140px), (max-height: 90px) {
  body > *:not(#point) { display: none !important }
  #point { display: block; position: fixed; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff }
}

/* ---------- small screens */
@media (max-width: 640px) {
  .node-card .k { margin-bottom: 10px }
  .node-card p.b { font-size: 14.5px }
  .answer .qq { font-size: 17px }
  #keys { display: none }
  /* phones: larger, brighter captions with a dark halo, so they stand clear of the dots behind them */
  .node-label { font-size: 12.5px; letter-spacing: .05em; line-height: 1.25; color: rgba(255, 255, 255, .86); text-shadow: 0 0 2px #000, 0 0 5px #000, 0 0 10px #000 }
  #coord .xy { display: none }
  #crumbs { display: none }
  .hud.bottom { justify-content: center; text-align: center }
}

/* ---------- reduced motion: stepped, no drift */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important }
}

/* ---------- print: an engraved certificate of the point you were at */
#certificate { display: none }
@media print {
  @page { size: A4; margin: 14mm }
  html, body { background: #fff !important; color: #000 !important; overflow: visible; height: auto }
  body > *:not(#certificate) { display: none !important }
  #certificate { display: block !important; color: #000; font: 10pt/1.55 var(--mono) }
  .cert { position: relative; border: 1.2pt solid #000; padding: 12mm 14mm; min-height: 260mm; text-align: center; display: flex; flex-direction: column; align-items: center }
  .cert::before { content: ""; position: absolute; inset: 2.2mm; border: .4pt solid #000; pointer-events: none }
  .cert .guil { width: 64mm; height: 64mm; margin: 6mm auto 4mm }
  .cert h1 { font-weight: 400; font-size: 13pt; letter-spacing: .5em; margin: 6mm 0 2mm; text-transform: uppercase }
  .cert .sub { letter-spacing: .3em; font-size: 8pt; text-transform: uppercase }
  .cert .big { font-family: var(--alef); font-size: 54pt; line-height: 1; margin: 2mm 0 }
  .cert dl { display: grid; grid-template-columns: max-content 1fr; gap: 2.2mm 8mm; text-align: left; margin: 8mm auto 0; max-width: 150mm; font-size: 9.5pt }
  .cert dt { letter-spacing: .2em; text-transform: uppercase; font-size: 7.5pt; padding-top: .6mm }
  .cert dd { margin: 0; word-break: break-all }
  .cert .oath { margin: 10mm auto 0; max-width: 120mm; font-size: 9pt; font-style: normal }
  .cert .foot { margin-top: auto; padding-top: 8mm; font-size: 7.5pt; letter-spacing: .24em; text-transform: uppercase; display: flex; justify-content: space-between; width: 100% }
}
/* touch screens: each point is a button, a thin ring around its disc above the label (a tap on either flies in) */
@media (pointer: coarse) {
  .node-label::after {
    content: ""; position: absolute; left: 50%; top: calc(-1 * var(--o, 0px)); width: var(--d, 0px); height: var(--d, 0px);
    transform: translate(-50%, -50%); border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; pointer-events: auto;
    background: radial-gradient(circle, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02) 70%);
  }
  .node-label.focus::after { border-color: rgba(255, 255, 255, .9); border-width: 1.5px }
  .node-label.focus::before { display: none }
}
