:root {
  --void: #000000;
  --panel: #0a0a0a;
  --line: #1e1e1e;
  --line-strong: #333333;
  --ash: #8c8c8c;
  --bone: #ededed;
  --white: #ffffff;

  --display: "Unbounded", "Arial Black", sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --nav-h: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: var(--white); color: var(--void); }

:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--void);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
}

h2 {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--white);
}

h2 {
  font-size: clamp(26px, 3.4vw, 50px);
  line-height: 1.1;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid var(--white);
  border-radius: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  background: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-solid { background: var(--white); color: var(--void); }
.btn-solid:hover { background: var(--void); color: var(--white); }

.btn-line { border-color: var(--line-strong); color: var(--bone); }
.btn-line:hover { border-color: var(--white); color: var(--white); }

.btn-small { min-height: 38px; padding: 0 16px; font-size: 12px; }

/* Nav */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}

.nav.is-stuck {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}

.brand-mark { width: 22px; height: 22px; color: var(--white); display: block; }
.brand-mark svg { display: block; width: 100%; height: 100%; }

.brand-name {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--white);
}

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ash);
  padding: 8px 0;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

/* Hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 48px) var(--gutter) 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-inner {
  position: relative;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding-bottom: clamp(40px, 7vh, 88px);
  pointer-events: none;
}
.hero-inner a { pointer-events: auto; }

.hero-inner .eyebrow { font-weight: 400; line-height: 1.6; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-facts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  background: var(--void);
}

.hero-facts div {
  padding: 20px 24px 22px 0;
  border-right: 1px solid var(--line);
}
.hero-facts div + div { padding-left: 24px; }
.hero-facts div:last-child { border-right: 0; }

.hero-facts dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
}

.hero-facts dd {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--white);
}

/* Sections */

.section {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 160px) var(--gutter) 0;
}

.section-head { max-width: 760px; margin-bottom: clamp(36px, 6vh, 64px); }
.section-head .eyebrow { margin-bottom: 18px; }
.section-sub { margin-top: 18px; color: var(--ash); max-width: 56ch; }

/* System browser */

.browser {
  --index-w: clamp(250px, 24vw, 320px);
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
}

.index {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--index-w);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.index-group + .index-group { border-top: 1px solid var(--line); }

.index-label {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 14px 20px 10px;
  background: var(--panel);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
}

.index-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 20px;
  border: 0;
  border-left: 2px solid transparent;
  background: none;
  text-align: left;
  font-size: 15px;
  color: var(--ash);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.index-item:hover { color: var(--white); }
.index-item:focus-visible { outline-offset: -3px; }

.index-item .sigil { width: 18px; height: 18px; flex: none; opacity: 0.5; }

.index-item[aria-current="true"] {
  color: var(--white);
  background: #121212;
  border-left-color: var(--white);
}
.index-item[aria-current="true"] .sigil { opacity: 1; }

.sigil svg { display: block; width: 100%; height: 100%; }

.stage {
  position: relative;
  min-width: 0;
  min-height: 540px;
  aspect-ratio: 16 / 9;
  margin-left: var(--index-w);
  background: var(--void);
  overflow: hidden;
}

.frame { position: absolute; inset: 0; }

.frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.5s ease;
}
.frame video.is-on { opacity: 1; }

.frame-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 20px;
  padding: 24px;
  color: var(--white);
}

.frame-sigil { width: min(28%, 220px); aspect-ratio: 1; opacity: 0.1; }
.frame-state.is-waiting .frame-sigil { animation: wait 1.4s ease-in-out infinite alternate; }

.frame-note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ash);
  text-align: center;
}

@keyframes wait {
  from { opacity: 0.05; }
  to { opacity: 0.2; }
}

.meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 110px clamp(24px, 3vw, 44px) clamp(24px, 3vw, 40px);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.meta > * { opacity: 0; transform: translateY(10px); }
.meta.is-in > * { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease; }
.meta.is-in > :nth-child(2) { transition-delay: 0.05s; }
.meta.is-in > :nth-child(3) { transition-delay: 0.1s; }

.meta-cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone);
}

.meta h3 {
  margin-top: 8px;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(24px, 2.8vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tags li {
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.5);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--white);
}

/* About and contact */

.about {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 96px);
  padding-bottom: clamp(80px, 12vh, 160px);
}

.about .eyebrow { margin-bottom: 18px; }
.about h2 { font-size: clamp(24px, 2.6vw, 38px); }
.about p:not(.eyebrow):not(.contact-note) { margin-top: 20px; color: var(--ash); max-width: 52ch; }

.contact {
  align-self: start;
  padding: clamp(24px, 3vw, 44px);
  border: 1px solid var(--line-strong);
  background: var(--panel);
}

.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.contact-note {
  min-height: 20px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ash);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ash);
}
.foot a { margin-left: auto; text-decoration: none; }
.foot a:hover { color: var(--white); }

/* Reveal */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* Smaller screens */

@media (max-width: 860px) {
  .nav-links { display: none; }

  .browser { display: flex; flex-direction: column; }
  .stage { order: -1; margin-left: 0; min-height: 560px; aspect-ratio: auto; border-bottom: 1px solid var(--line); }
  .index { position: static; width: auto; border-right: 0; max-height: 60svh; }
  .meta { padding-top: 90px; }

  .about { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }

  .hero-facts { grid-template-columns: minmax(0, 1fr); }
  .hero-facts div,
  .hero-facts div + div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .hero-facts div:last-child { border-bottom: 0; }
  .hero-facts dd { margin-top: 0; text-align: right; }

  .btn { width: 100%; }
  .btn-small { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .meta > * { opacity: 1; transform: none; transition: none; }
  .frame-state.is-waiting .frame-sigil { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
