/* Layout: one full-screen WebGL eye, wordmark bottom left and Enter bottom right, a black thesis room behind the pupil. Single near-black world by choice. */
:root {
  --ink: #030303;
  --bone: #e6e4de;
  --white: #f4f4f1;
  --line: rgba(230, 228, 222, 0.22);
  --f-mark: "Lexend Zetta", "Eurostile", Arial, sans-serif;
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html { background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--bone); font-family: var(--f-display); overflow: hidden; }
@media (pointer: fine) { body, button { cursor: none; } }

#gl, #fallback { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#gl { image-rendering: pixelated; image-rendering: crisp-edges; }
#fallback { object-fit: cover; object-position: 70% center; }

.hud {
  position: fixed; inset: auto 0 0 0; z-index: 2; pointer-events: none;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 0 clamp(16px, 3vw, 36px) calc(env(safe-area-inset-bottom, 0px) + 22px);
  transition: opacity .6s;
}
.hud.away { opacity: 0; }
/* the O of OMNIUS is the eye: same cap height as the letters, sitting on the baseline */
.wordmark {
  display: flex; align-items: baseline; color: var(--bone);
  font-family: var(--f-mark); font-weight: 200; font-size: clamp(20px, 2.2vw, 30px); letter-spacing: .08em; line-height: 1;
}
.wordmark .o { display: inline-block; width: .78em; height: .78em; margin-right: .1em; transform: translateY(.04em); }
.wordmark .o svg { width: 100%; height: 100%; display: block; }
.box {
  pointer-events: auto;
  font-family: var(--f-display); font-stretch: 85%; font-weight: 600; font-size: 10.5px;
  letter-spacing: .07em; text-transform: uppercase; line-height: 1;
  color: var(--bone); background: transparent; border: 1px solid var(--line);
  padding: 6px 9px 5px; border-radius: 0; transition: background .2s, color .2s;
}
.box:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.box:focus-visible { outline: 1px solid var(--bone); outline-offset: 3px; }
.box.solid { background: var(--bone); color: var(--ink); border-color: var(--bone); }

/* inside the pupil: two full-screen pages, the thesis (A) and the companies (B) */
.thesis {
  --ease: cubic-bezier(.77, 0, .18, 1);
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  position: fixed; inset: 0; z-index: 4; background: var(--ink); overflow: hidden;
  opacity: 0; visibility: hidden; transition: opacity .6s, visibility 0s .6s;
}
.thesis.on { opacity: 1; visibility: visible; transition: opacity .6s, visibility 0s; }
.thesis, .thesis * { cursor: auto; }
.thesis button { cursor: pointer; }
.page { position: absolute; inset: 0; transition: transform 1.15s var(--ease), opacity 1s var(--ease); }
.pb { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; transform: translateY(100%); outline: none; scrollbar-width: thin; scrollbar-color: #2a2a28 transparent; }
.thesis.at-b .pa { transform: translateY(-14vh); opacity: 0; pointer-events: none; }
.thesis.at-b .pb { transform: none; }

/* page A: the thesis, three bold lines stacked on one left edge, typed out one after another */
.thesis .lines {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(22px, 5vh, 56px);
  padding: clamp(80px, 12vh, 140px) clamp(20px, 8vw, 140px);
}
.thesis .lines p {
  margin: 0; max-width: 24ch; min-height: .95em; color: var(--white);
  font-family: var(--f-display); font-weight: 700; font-stretch: 78%; text-transform: uppercase;
  font-size: clamp(32px, 4.8vw, 80px); line-height: .95; letter-spacing: -.02em;
  transition: transform 1.15s var(--ease), color .9s ease;
}
.thesis .lines p.done { color: rgba(244, 244, 241, .34); }
.thesis.at-b .lines p { transform: translateY(-26vh); }
.thesis.at-b .lines p:nth-child(2) { transition-delay: .05s; }
.thesis.at-b .lines p:nth-child(3) { transition-delay: .1s; }
.thesis .lines p.typing::after {
  content: ""; display: inline-block; width: .42em; height: .8em; margin-left: .06em;
  vertical-align: -.04em; background: var(--white);
}
.cue {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); transform: translateX(-50%);
  background: none; border: 0; padding: 8px 10px; color: #8a877f;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  opacity: 0; pointer-events: none; transition: opacity 1s, color .2s;
}
.cue.on { opacity: 1; pointer-events: auto; }
.cue:hover, .cue:focus-visible { color: var(--bone); outline: none; }

/* the seam: a line of light that travels with the top edge of page B */
.seam {
  position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 2; pointer-events: none;
  background: var(--bone); box-shadow: 0 0 18px 1px rgba(230, 228, 222, .55); opacity: 0;
}
.thesis.sweep-down .seam { animation: seamDown 1.15s var(--ease); }
.thesis.sweep-up .seam { animation: seamUp 1.15s var(--ease); }
@keyframes seamDown { 0% { transform: translateY(100vh); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes seamUp { 0% { transform: translateY(0); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(100vh); opacity: 0; } }

.pageno {
  position: absolute; right: clamp(16px, 3vw, 36px); bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); z-index: 3;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: #8a877f; font-variant-numeric: tabular-nums;
}
.thesis .back { position: absolute; left: clamp(16px, 3vw, 36px); top: calc(env(safe-area-inset-top, 0px) + 20px); z-index: 3; }

/* page B: the companies, as a hairline grid of tiles */
.dir { padding: clamp(80px, 13vh, 150px) clamp(20px, 5vw, 80px) 110px; }
.dir-head { display: grid; gap: 12px; margin-bottom: clamp(28px, 5vh, 48px); }
.dir-head h2 { margin: 0; font-family: var(--f-mark); font-weight: 200; font-size: clamp(28px, 4vw, 54px); letter-spacing: .06em; text-transform: uppercase; color: var(--white); }
.dir-head p { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8a877f; font-variant-numeric: tabular-nums; }
.tiles {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.tiles li {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0;
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .9s var(--ease);
}
.thesis.at-b .tiles li { opacity: 1; transform: none; transition-delay: calc(.35s + min(var(--i), 16) * 35ms); }
.tile {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 14px;
  min-height: clamp(280px, 24vw, 320px); padding: 18px 18px 20px; overflow: hidden;
  color: inherit; text-decoration: none; background: var(--ink); transition: background .35s;
}
.thesis .tile, .thesis .tile * { cursor: pointer; }
.tile:hover, .tile:focus-visible { background: #090909; outline: none; }
.t-top { display: flex; justify-content: flex-end; align-items: center; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: #6f6d68; font-variant-numeric: tabular-nums; }
.t-arr { display: inline-block; font-size: 15px; color: #6f6d68; transition: transform .45s var(--ease), color .3s; }
.tile:hover .t-arr, .tile:focus-visible .t-arr { transform: translate(4px, -4px); color: var(--bone); }
.t-logo { display: grid; place-items: center; }
.t-logo img { width: 56px; height: 56px; display: block; object-fit: contain; transition: transform .6s var(--ease), filter .4s; filter: grayscale(.35); }
.tile:hover .t-logo img, .tile:focus-visible .t-logo img { transform: scale(1.12) translateY(-6px); filter: none; }
.t-bot { display: grid; gap: 5px; min-width: 0; }
.t-name { font-weight: 600; font-size: 16.5px; color: var(--white); }
.t-line { font-size: 13.5px; line-height: 1.4; color: #a9a69e; }
/* corner brackets, the site's cursor motif, close in on hover */
.tile .c { position: absolute; width: 10px; height: 10px; border: 1px solid var(--bone); opacity: 0; transition: opacity .3s, transform .45s var(--ease); }
.tile .c1 { left: 8px; top: 8px; border-right: 0; border-bottom: 0; transform: translate(-6px, -6px); }
.tile .c2 { right: 8px; top: 8px; border-left: 0; border-bottom: 0; transform: translate(6px, -6px); }
.tile .c3 { left: 8px; bottom: 8px; border-right: 0; border-top: 0; transform: translate(-6px, 6px); }
.tile .c4 { right: 8px; bottom: 8px; border-left: 0; border-top: 0; transform: translate(6px, 6px); }
.tile:hover .c, .tile:focus-visible .c { opacity: 1; transform: none; }
/* the longer description rises over the tile on hover */
.t-desc {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  padding: 18px 18px 20px; background: #0b0b0b;
  transform: translateY(101%); transition: transform .6s var(--ease);
}
.tile:hover .t-desc, .tile:focus-visible .t-desc { transform: none; }
.t-dname { font-weight: 600; font-size: 16.5px; color: var(--white); }
.t-dtext { font-size: 13px; line-height: 1.5; color: #d6d3cb; }
.t-open { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--bone); }
.t-open i { font-style: normal; display: inline-block; transition: transform .45s var(--ease); }
.tile:hover .t-open i { transform: translate(3px, -3px); }

.ret { position: fixed; left: 0; top: 0; z-index: 5; pointer-events: none; width: 0; height: 0; opacity: 0; transition: opacity .3s; }
.ret.on { opacity: 1; }
.ret b { position: absolute; width: 7px; height: 7px; border: 1px solid var(--bone); }
.ret b:nth-child(1) { left: -13px; top: -13px; border-right: 0; border-bottom: 0; }
.ret b:nth-child(2) { left: 6px; top: -13px; border-left: 0; border-bottom: 0; }
.ret b:nth-child(3) { left: -13px; top: 6px; border-right: 0; border-top: 0; }
.ret b:nth-child(4) { left: 6px; top: 6px; border-left: 0; border-top: 0; }
.ret::before { content: ""; position: absolute; left: -1px; top: -1px; width: 2px; height: 2px; background: var(--bone); }
@media (pointer: coarse) { .ret { display: none; } }

@media (max-width: 640px) {
  .t-desc { position: static; transform: none; background: none; padding: 0; }
  .t-desc .t-dname, .t-desc .t-open { display: none; }
  .tile { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .page, .thesis .lines p, .tiles li, .t-desc, .t-logo img, .t-arr, .tile .c { transition: none !important; }
  .thesis.sweep-down .seam, .thesis.sweep-up .seam { animation: none; }
}
